Scheduling infrastructure for absolutely everyone.
refactor: remove circular dependency between prisma and app-store packages (#23475)
Keith Williams79a09362c96e
diff --git a/apps/web/app/(booking-page-wrapper)/team/[slug]/[type]/queries.ts b/apps/web/app/(booking-page-wrapper)/team/[slug]/[type]/queries.tsindex c7318949364..8b6f09836f3 100644--- a/apps/web/app/(booking-page-wrapper)/team/[slug]/[type]/queries.ts+++ b/apps/web/app/(booking-page-wrapper)/team/[slug]/[type]/queries.ts@@ -1,6 +1,7 @@import type { GetServerSidePropsContext } from "next";import { unstable_cache } from "next/cache";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import { getTeamData } from "@calcom/features/ee/teams/lib/getTeamData";import {getEventTypeHosts,@@ -17,7 +18,6 @@ import { UserRepository } from "@calcom/lib/server/repository/user";import { prisma } from "@calcom/prisma";import type { Prisma } from "@calcom/prisma/client";import type { SchedulingType } from "@calcom/prisma/enums";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";export async function getCachedTeamData(teamSlug: string, orgSlug: string | null) {return unstable_cache(async () => getTeamData(teamSlug, orgSlug), ["team-data", teamSlug, orgSlug ?? ""], {diff --git a/apps/web/modules/apps/installation/[[...step]]/step-view.tsx b/apps/web/modules/apps/installation/[[...step]]/step-view.tsxindex 76b08c3229d..9646d5f3560 100644--- a/apps/web/modules/apps/installation/[[...step]]/step-view.tsx+++ b/apps/web/modules/apps/installation/[[...step]]/step-view.tsx@@ -9,6 +9,7 @@ import type { z } from "zod";import checkForMultiplePaymentApps from "@calcom/app-store/_utils/payments/checkForMultiplePaymentApps";import useAddAppMutation from "@calcom/app-store/_utils/useAddAppMutation";import type { EventTypeAppSettingsComponentProps, EventTypeModel } from "@calcom/app-store/types";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import type { LocationFormValues } from "@calcom/features/eventtypes/lib/types";import { AppOnboardingSteps } from "@calcom/lib/apps/appOnboardingSteps";import { getAppOnboardingUrl } from "@calcom/lib/apps/getAppOnboardingUrl";@@ -17,7 +18,6 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";import type { LocationObject } from "@calcom/lib/location";import type { Team } from "@calcom/prisma/client";import type { eventTypeBookingFields } from "@calcom/prisma/zod-utils";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";import type { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";import { trpc } from "@calcom/trpc/react";import type { AppMeta } from "@calcom/types/App";diff --git a/apps/web/modules/bookings/views/bookings-single-view.getServerSideProps.tsx b/apps/web/modules/bookings/views/bookings-single-view.getServerSideProps.tsxindex 505d59f8b64..98530ff041b 100644--- a/apps/web/modules/bookings/views/bookings-single-view.getServerSideProps.tsx+++ b/apps/web/modules/bookings/views/bookings-single-view.getServerSideProps.tsx@@ -2,6 +2,7 @@ import { createRouterCaller } from "app/_trpc/context";import type { GetServerSidePropsContext } from "next";import { z } from "zod";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import { orgDomainConfig } from "@calcom/ee/organizations/lib/orgDomains";import { getServerSession } from "@calcom/features/auth/lib/getServerSession";import getBookingInfo from "@calcom/features/bookings/lib/getBookingInfo";@@ -12,7 +13,7 @@ import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML";import { maybeGetBookingUidFromSeat } from "@calcom/lib/server/maybeGetBookingUidFromSeat";import { BookingRepository } from "@calcom/lib/server/repository/booking";import prisma from "@calcom/prisma";-import { customInputSchema, eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";+import { customInputSchema } from "@calcom/prisma/zod-utils";import { meRouter } from "@calcom/trpc/server/routers/viewer/me/_router";import type { inferSSRProps } from "@lib/types/inferSSRProps";diff --git a/apps/web/modules/bookings/views/bookings-single-view.tsx b/apps/web/modules/bookings/views/bookings-single-view.tsxindex 9e9a972e00b..78c8f4f141a 100644--- a/apps/web/modules/bookings/views/bookings-single-view.tsx+++ b/apps/web/modules/bookings/views/bookings-single-view.tsx@@ -13,6 +13,7 @@ import BookingPageTagManager from "@calcom/app-store/BookingPageTagManager";import type { getEventLocationValue } from "@calcom/app-store/locations";import { getSuccessPageLocationMessage, guessEventLocationType } from "@calcom/app-store/locations";import { getEventTypeAppData } from "@calcom/app-store/utils";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import type { ConfigType } from "@calcom/dayjs";import dayjs from "@calcom/dayjs";import {@@ -45,7 +46,7 @@ import { getIs24hClockFromLocalStorage, isBrowserLocale24h } from "@calcom/lib/timport { CURRENT_TIMEZONE } from "@calcom/lib/timezoneConstants";import { localStorage } from "@calcom/lib/webstorage";import { BookingStatus, SchedulingType } from "@calcom/prisma/enums";-import { bookingMetadataSchema, eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";+import { bookingMetadataSchema } from "@calcom/prisma/zod-utils";import { trpc } from "@calcom/trpc/react";import { Alert } from "@calcom/ui/components/alert";import { Avatar } from "@calcom/ui/components/avatar";diff --git a/apps/web/modules/test-setup.ts b/apps/web/modules/test-setup.tsindex d1f07153481..25148028b12 100644--- a/apps/web/modules/test-setup.ts+++ b/apps/web/modules/test-setup.ts@@ -128,10 +128,13 @@ vi.mock("@calcom/prisma/zod-utils", () => ({EventTypeMetaDataSchema: {parse: vi.fn(),},- eventTypeMetaDataSchemaWithTypedApps: {+ bookingMetadataSchema: {parse: vi.fn(),},- bookingMetadataSchema: {+}));++vi.mock("@calcom/app-store/zod-utils", () => ({+ eventTypeMetaDataSchemaWithTypedApps: {parse: vi.fn(),},}));diff --git a/apps/web/playwright/integrations-stripe.e2e.ts b/apps/web/playwright/integrations-stripe.e2e.tsindex 05b5af67dd0..df6fa114b53 100644--- a/apps/web/playwright/integrations-stripe.e2e.ts+++ b/apps/web/playwright/integrations-stripe.e2e.ts@@ -1,9 +1,9 @@import { expect } from "@playwright/test";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import prisma from "@calcom/prisma";import type Prisma from "@calcom/prisma/client";import { SchedulingType } from "@calcom/prisma/enums";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";import { test, todo } from "./lib/fixtures";import type { Fixtures } from "./lib/fixtures";diff --git a/packages/app-store/_utils/CRMRoundRobinSkip.ts b/packages/app-store/_utils/CRMRoundRobinSkip.tsindex 43d12b5b0f2..683ce1f8af8 100644--- a/packages/app-store/_utils/CRMRoundRobinSkip.ts+++ b/packages/app-store/_utils/CRMRoundRobinSkip.ts@@ -1,10 +1,10 @@import type { z } from "zod";+import type { EventTypeAppMetadataSchema } from "@calcom/app-store/zod-utils";import CrmManager from "@calcom/lib/crmManager/crmManager";import logger from "@calcom/lib/logger";import { prisma } from "@calcom/prisma";import type { Prisma } from "@calcom/prisma/client";-import type { EventTypeAppMetadataSchema } from "@calcom/prisma/zod-utils";import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";export async function getCRMContactOwnerForRRLeadSkip(diff --git a/packages/app-store/_utils/getEventTypeAppData.ts b/packages/app-store/_utils/getEventTypeAppData.tsindex 299bcdf5bbf..abafe50b77f 100644--- a/packages/app-store/_utils/getEventTypeAppData.ts+++ b/packages/app-store/_utils/getEventTypeAppData.ts@@ -1,7 +1,7 @@import type { z } from "zod";+import type { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import type { BookerEvent } from "@calcom/features/bookings/types";-import type { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";export type EventTypeApps = NonNullable<NonNullable<z.infer<typeof eventTypeMetaDataSchemaWithTypedApps>>["apps"]diff --git a/packages/app-store/_utils/payments/checkForMultiplePaymentApps.ts b/packages/app-store/_utils/payments/checkForMultiplePaymentApps.tsindex aed2b8385b3..a9a9cd6b7fa 100644--- a/packages/app-store/_utils/payments/checkForMultiplePaymentApps.ts+++ b/packages/app-store/_utils/payments/checkForMultiplePaymentApps.ts@@ -1,6 +1,6 @@import type z from "zod";-import type { eventTypeAppMetadataOptionalSchema } from "@calcom/prisma/zod-utils";+import type { eventTypeAppMetadataOptionalSchema } from "@calcom/app-store/zod-utils";import type { appDataSchemas } from "../../apps.schemas.generated";diff --git a/packages/app-store/_utils/payments/handlePaymentSuccess.ts b/packages/app-store/_utils/payments/handlePaymentSuccess.tsindex 35460a41c80..ee6075dcca2 100644--- a/packages/app-store/_utils/payments/handlePaymentSuccess.ts+++ b/packages/app-store/_utils/payments/handlePaymentSuccess.ts@@ -1,3 +1,4 @@+import { eventTypeAppMetadataOptionalSchema } from "@calcom/app-store/zod-utils";import { sendScheduledEmailsAndSMS } from "@calcom/emails";import { doesBookingRequireConfirmation } from "@calcom/features/bookings/lib/doesBookingRequireConfirmation";import { getAllCredentialsIncludeServiceAccountKey } from "@calcom/features/bookings/lib/getAllCredentialsForUsersOnEvent/getAllCredentials";@@ -13,7 +14,6 @@ import prisma from "@calcom/prisma";import type { Prisma } from "@calcom/prisma/client";import { BookingStatus } from "@calcom/prisma/enums";import type { EventTypeMetadata } from "@calcom/prisma/zod-utils";-import { eventTypeAppMetadataOptionalSchema } from "@calcom/prisma/zod-utils";const log = logger.getSubLogger({ prefix: ["[handlePaymentSuccess]"] });export async function handlePaymentSuccess(paymentId: number, bookingId: number) {diff --git a/packages/lib/server/service/eventTypeService.ts b/packages/app-store/salesforce/lib/eventTypeService.tssimilarity index 88%rename from packages/lib/server/service/eventTypeService.tsrename to packages/app-store/salesforce/lib/eventTypeService.tsindex 88d3646b07d..adf91215c56 100644--- a/packages/lib/server/service/eventTypeService.ts+++ b/packages/app-store/salesforce/lib/eventTypeService.ts@@ -1,7 +1,8 @@import type { appDataSchemas } from "@calcom/app-store/apps.schemas.generated";+import { EventTypeAppMetadataSchema } from "@calcom/app-store/zod-utils";import { prisma } from "@calcom/prisma";import type { Prisma } from "@calcom/prisma/client";-import { EventTypeMetaDataSchema, EventTypeAppMetadataSchema } from "@calcom/prisma/zod-utils";+import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";export class EventTypeService {static async getEventTypeAppDataFromId(eventTypeId: number, appSlug: keyof typeof appDataSchemas) {diff --git a/packages/app-store/salesforce/lib/routingFormBookingFormHandler.ts b/packages/app-store/salesforce/lib/routingFormBookingFormHandler.tsindex 4ecfc954170..9bbecc9d046 100644--- a/packages/app-store/salesforce/lib/routingFormBookingFormHandler.ts+++ b/packages/app-store/salesforce/lib/routingFormBookingFormHandler.ts@@ -1,8 +1,8 @@import { CredentialRepository } from "../../../lib/server/repository/credential";-import { EventTypeService } from "../../../lib/server/service/eventTypeService";import type { AttributeRoutingConfig } from "../../routing-forms/types/types";import SalesforceCRMService from "./CrmService";import { SalesforceRecordEnum, RoutingReasons } from "./enums";+import { EventTypeService } from "./eventTypeService";const routingFormBookingFormHandler = async (attendeeEmail: string,diff --git a/packages/app-store/zod-utils.ts b/packages/app-store/zod-utils.tsnew file mode 100644index 00000000000..5f5996311ac--- /dev/null+++ b/packages/app-store/zod-utils.ts@@ -0,0 +1,17 @@+import { z } from "zod";++import { eventTypeMetaDataSchemaWithoutApps } from "@calcom/prisma/zod-utils";++import { appDataSchemas } from "./apps.schemas.generated";++export const EventTypeAppMetadataSchema = z.object(appDataSchemas).partial();+export const eventTypeAppMetadataOptionalSchema = EventTypeAppMetadataSchema.optional();++export const eventTypeMetaDataSchemaWithTypedApps = eventTypeMetaDataSchemaWithoutApps+ .unwrap()+ .merge(+ z.object({+ apps: eventTypeAppMetadataOptionalSchema,+ })+ )+ .nullable();diff --git a/packages/features/bookings/lib/getAllCredentialsForUsersOnEvent/getAllCredentials.ts b/packages/features/bookings/lib/getAllCredentialsForUsersOnEvent/getAllCredentials.tsindex 46843b6fbd6..eeca15bcac4 100644--- a/packages/features/bookings/lib/getAllCredentialsForUsersOnEvent/getAllCredentials.ts+++ b/packages/features/bookings/lib/getAllCredentialsForUsersOnEvent/getAllCredentials.ts@@ -1,10 +1,10 @@-import type z from "zod";+import type { z } from "zod";+import { eventTypeAppMetadataOptionalSchema } from "@calcom/app-store/zod-utils";import { enrichUserWithDelegationCredentialsIncludeServiceAccountKey } from "@calcom/lib/delegationCredential/server";import { UserRepository } from "@calcom/lib/server/repository/user";import prisma from "@calcom/prisma";import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";-import { eventTypeAppMetadataOptionalSchema } from "@calcom/prisma/zod-utils";import type { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";import type { CredentialPayload } from "@calcom/types/Credential";diff --git a/packages/features/bookings/lib/handleCancelBooking.ts b/packages/features/bookings/lib/handleCancelBooking.tsindex 876d43e3514..e70423e7945 100644--- a/packages/features/bookings/lib/handleCancelBooking.ts+++ b/packages/features/bookings/lib/handleCancelBooking.ts@@ -2,6 +2,7 @@ import type { z } from "zod";import { DailyLocationType } from "@calcom/app-store/constants";import { FAKE_DAILY_CREDENTIAL } from "@calcom/app-store/dailyvideo/lib/VideoApiAdapter";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import dayjs from "@calcom/dayjs";import { sendCancelledEmailsAndSMS } from "@calcom/emails";import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";@@ -32,11 +33,7 @@ import prisma from "@calcom/prisma";import type { Prisma, WorkflowReminder } from "@calcom/prisma/client";import type { WebhookTriggerEvents } from "@calcom/prisma/enums";import { BookingStatus } from "@calcom/prisma/enums";-import {- bookingMetadataSchema,- eventTypeMetaDataSchemaWithTypedApps,- bookingCancelInput,-} from "@calcom/prisma/zod-utils";+import { bookingMetadataSchema, bookingCancelInput } from "@calcom/prisma/zod-utils";import type { EventTypeMetadata } from "@calcom/prisma/zod-utils";import { getAllWorkflowsFromEventType } from "@calcom/trpc/server/routers/viewer/workflows/util";import type { CalendarEvent } from "@calcom/types/Calendar";diff --git a/packages/features/bookings/lib/handleConfirmation.ts b/packages/features/bookings/lib/handleConfirmation.tsindex 0fc3ce0eeb1..f53f0598c81 100644--- a/packages/features/bookings/lib/handleConfirmation.ts+++ b/packages/features/bookings/lib/handleConfirmation.ts@@ -1,3 +1,4 @@+import { eventTypeAppMetadataOptionalSchema } from "@calcom/app-store/zod-utils";import { scheduleMandatoryReminder } from "@calcom/ee/workflows/lib/reminders/scheduleMandatoryReminder";import { sendScheduledEmailsAndSMS } from "@calcom/emails";import {@@ -23,7 +24,7 @@ import type { Prisma } from "@calcom/prisma/client";import type { SchedulingType } from "@calcom/prisma/enums";import { BookingStatus, WebhookTriggerEvents, WorkflowTriggerEvents } from "@calcom/prisma/enums";import type { PlatformClientParams } from "@calcom/prisma/zod-utils";-import { EventTypeMetaDataSchema, eventTypeAppMetadataOptionalSchema } from "@calcom/prisma/zod-utils";+import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";import { getAllWorkflowsFromEventType } from "@calcom/trpc/server/routers/viewer/workflows/util";import type { AdditionalInformation, CalendarEvent } from "@calcom/types/Calendar";diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.tsindex 5ac724d1179..8556326ac8e 100644--- a/packages/features/bookings/lib/handleNewBooking.ts+++ b/packages/features/bookings/lib/handleNewBooking.ts@@ -10,6 +10,8 @@ import {OrganizerDefaultConferencingAppType,} from "@calcom/app-store/locations";import { getAppFromSlug } from "@calcom/app-store/utils";+import { eventTypeAppMetadataOptionalSchema } from "@calcom/app-store/zod-utils";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import dayjs from "@calcom/dayjs";import { scheduleMandatoryReminder } from "@calcom/ee/workflows/lib/reminders/scheduleMandatoryReminder";import getICalUID from "@calcom/emails/lib/getICalUID";@@ -75,11 +77,7 @@ import {WorkflowTriggerEvents,CreationSource,} from "@calcom/prisma/enums";-import {- eventTypeAppMetadataOptionalSchema,- eventTypeMetaDataSchemaWithTypedApps,- userMetadata as userMetadataSchema,-} from "@calcom/prisma/zod-utils";+import { userMetadata as userMetadataSchema } from "@calcom/prisma/zod-utils";import { getAllWorkflowsFromEventType } from "@calcom/trpc/server/routers/viewer/workflows/util";import type {AdditionalInformation,diff --git a/packages/features/bookings/lib/handlePayment.ts b/packages/features/bookings/lib/handlePayment.tsindex 83fe57fc6d5..26a397bcd7c 100644--- a/packages/features/bookings/lib/handlePayment.ts+++ b/packages/features/bookings/lib/handlePayment.ts@@ -1,7 +1,7 @@import { PaymentServiceMap } from "@calcom/app-store/payment.services.generated";import type { EventTypeAppsList } from "@calcom/app-store/utils";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import type { AppCategories, Prisma, EventType } from "@calcom/prisma/client";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";import type { CalendarEvent } from "@calcom/types/Calendar";import type { IAbstractPaymentService } from "@calcom/types/PaymentService";diff --git a/packages/features/bookings/lib/handleSeats/create/createNewSeat.ts b/packages/features/bookings/lib/handleSeats/create/createNewSeat.tsindex 12b0f9e9506..94f3a0de923 100644--- a/packages/features/bookings/lib/handleSeats/create/createNewSeat.ts+++ b/packages/features/bookings/lib/handleSeats/create/createNewSeat.ts@@ -2,6 +2,7 @@import { cloneDeep } from "lodash";import { uuid } from "short-uuid";+import { eventTypeAppMetadataOptionalSchema } from "@calcom/app-store/zod-utils";import { sendScheduledSeatsEmailsAndSMS } from "@calcom/emails";import { refreshCredentials } from "@calcom/features/bookings/lib/getAllCredentialsForUsersOnEvent/refreshCredentials";import { handlePayment } from "@calcom/features/bookings/lib/handlePayment";@@ -15,7 +16,6 @@ import { HttpError } from "@calcom/lib/http-error";import prisma from "@calcom/prisma";import type { Prisma } from "@calcom/prisma/client";import { BookingStatus } from "@calcom/prisma/enums";-import { eventTypeAppMetadataOptionalSchema } from "@calcom/prisma/zod-utils";import { findBookingQuery } from "../../handleNewBooking/findBookingQuery";import type { IEventTypePaymentCredentialType } from "../../handleNewBooking/types";diff --git a/packages/features/credentials/handleDeleteCredential.ts b/packages/features/credentials/handleDeleteCredential.tsindex a785086985b..6111aaced3b 100644--- a/packages/features/credentials/handleDeleteCredential.ts+++ b/packages/features/credentials/handleDeleteCredential.ts@@ -2,6 +2,11 @@ import z from "zod";import { getCalendar } from "@calcom/app-store/_utils/getCalendar";import { appStoreMetadata } from "@calcom/app-store/appStoreMetaData";+import {+ type EventTypeAppMetadataSchema,+ eventTypeAppMetadataOptionalSchema,+} from "@calcom/app-store/zod-utils";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import { sendCancelledEmailsAndSMS } from "@calcom/emails";import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";import { deleteWebhookScheduledTriggers } from "@calcom/features/webhooks/lib/scheduleTrigger";@@ -15,9 +20,8 @@ import { bookingMinimalSelect, prisma } from "@calcom/prisma";import type { Prisma } from "@calcom/prisma/client";import { AppCategories, BookingStatus } from "@calcom/prisma/enums";import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";-import type { EventTypeAppMetadataSchema, EventTypeMetadata } from "@calcom/prisma/zod-utils";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";-import { EventTypeMetaDataSchema, eventTypeAppMetadataOptionalSchema } from "@calcom/prisma/zod-utils";+import type { EventTypeMetadata } from "@calcom/prisma/zod-utils";+import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";import { userMetadata as userMetadataSchema } from "@calcom/prisma/zod-utils";type App = {diff --git a/packages/features/ee/managed-event-types/lib/handleChildrenEventTypes.ts b/packages/features/ee/managed-event-types/lib/handleChildrenEventTypes.tsindex 7cb5d229d4e..d6b227b830e 100644--- a/packages/features/ee/managed-event-types/lib/handleChildrenEventTypes.ts+++ b/packages/features/ee/managed-event-types/lib/handleChildrenEventTypes.ts@@ -1,12 +1,12 @@// eslint-disable-next-line no-restricted-importsimport type { DeepMockProxy } from "vitest-mock-extended";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import { sendSlugReplacementEmail } from "@calcom/emails/email-manager";import { getTranslation } from "@calcom/lib/server/i18n";import type { PrismaClient } from "@calcom/prisma";import type { Prisma } from "@calcom/prisma/client";import { SchedulingType } from "@calcom/prisma/enums";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";import { allManagedEventTypeProps, unlockedManagedEventTypeProps } from "@calcom/prisma/zod-utils";import { EventTypeSchema } from "@calcom/prisma/zod/modelSchema/EventTypeSchema";diff --git a/packages/features/ee/payments/api/webhook.ts b/packages/features/ee/payments/api/webhook.tsindex dd735d50f8f..40ef94a325b 100644--- a/packages/features/ee/payments/api/webhook.ts+++ b/packages/features/ee/payments/api/webhook.ts@@ -3,6 +3,7 @@ import type { NextApiRequest, NextApiResponse } from "next";import type Stripe from "stripe";import { handlePaymentSuccess } from "@calcom/app-store/_utils/payments/handlePaymentSuccess";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import { sendAttendeeRequestEmailAndSMS, sendOrganizerRequestEmail } from "@calcom/emails";import { doesBookingRequireConfirmation } from "@calcom/features/bookings/lib/doesBookingRequireConfirmation";import { getAllCredentialsIncludeServiceAccountKey } from "@calcom/features/bookings/lib/getAllCredentialsForUsersOnEvent/getAllCredentials";@@ -20,7 +21,6 @@ import { safeStringify } from "@calcom/lib/safeStringify";import { prisma } from "@calcom/prisma";import type { Prisma } from "@calcom/prisma/client";import { BookingStatus } from "@calcom/prisma/enums";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";const log = logger.getSubLogger({ prefix: ["[paymentWebhook]"] });diff --git a/packages/features/ee/round-robin/roundRobinManualReassignment.ts b/packages/features/ee/round-robin/roundRobinManualReassignment.tsindex 9c4bf20fa0d..7cef29f663f 100644--- a/packages/features/ee/round-robin/roundRobinManualReassignment.ts+++ b/packages/features/ee/round-robin/roundRobinManualReassignment.ts@@ -1,6 +1,7 @@// eslint-disable-next-line no-restricted-importsimport { cloneDeep } from "lodash";+import { eventTypeAppMetadataOptionalSchema } from "@calcom/app-store/zod-utils";import dayjs from "@calcom/dayjs";import {sendRoundRobinReassignedEmailsAndSMS,@@ -34,7 +35,6 @@ import { getTimeFormatStringFromUserTimeFormat } from "@calcom/lib/timeFormat";import { prisma } from "@calcom/prisma";import { WorkflowActions, WorkflowMethods, WorkflowTriggerEvents } from "@calcom/prisma/enums";import type { EventTypeMetadata, PlatformClientParams } from "@calcom/prisma/zod-utils";-import { eventTypeAppMetadataOptionalSchema } from "@calcom/prisma/zod-utils";import type { CalendarEvent } from "@calcom/types/Calendar";import { handleRescheduleEventManager } from "./handleRescheduleEventManager";diff --git a/packages/features/ee/round-robin/roundRobinReassignment.ts b/packages/features/ee/round-robin/roundRobinReassignment.tsindex b48c0a88987..f0793d1207d 100644--- a/packages/features/ee/round-robin/roundRobinReassignment.ts+++ b/packages/features/ee/round-robin/roundRobinReassignment.ts@@ -2,6 +2,7 @@import { cloneDeep } from "lodash";import { OrganizerDefaultConferencingAppType, getLocationValueForDB } from "@calcom/app-store/locations";+import { eventTypeAppMetadataOptionalSchema } from "@calcom/app-store/zod-utils";import dayjs from "@calcom/dayjs";import {sendRoundRobinReassignedEmailsAndSMS,@@ -33,7 +34,6 @@ import { getTimeFormatStringFromUserTimeFormat } from "@calcom/lib/timeFormat";import { prisma } from "@calcom/prisma";import { userMetadata as userMetadataSchema } from "@calcom/prisma/zod-utils";import type { EventTypeMetadata, PlatformClientParams } from "@calcom/prisma/zod-utils";-import { eventTypeAppMetadataOptionalSchema } from "@calcom/prisma/zod-utils";import type { CalendarEvent } from "@calcom/types/Calendar";import { handleRescheduleEventManager } from "./handleRescheduleEventManager";diff --git a/packages/features/eventtypes/components/EventTypeDescription.tsx b/packages/features/eventtypes/components/EventTypeDescription.tsxindex 854465f16bb..e01835b38a4 100644--- a/packages/features/eventtypes/components/EventTypeDescription.tsx+++ b/packages/features/eventtypes/components/EventTypeDescription.tsx@@ -1,5 +1,6 @@import { useMemo } from "react";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import { Price } from "@calcom/features/bookings/components/event-meta/Price";import { PriceIcon } from "@calcom/features/bookings/components/event-meta/PriceIcon";import { getPaymentAppData } from "@calcom/lib/getPaymentAppData";@@ -9,7 +10,6 @@ import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML";import type { baseEventTypeSelect } from "@calcom/prisma";import type { Prisma, EventType } from "@calcom/prisma/client";import { SchedulingType } from "@calcom/prisma/enums";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";import classNames from "@calcom/ui/classNames";import { Badge } from "@calcom/ui/components/badge";diff --git a/packages/features/eventtypes/components/tabs/instant/EventInstantTab.tsx b/packages/features/eventtypes/components/tabs/instant/EventInstantTab.tsxindex b3938b4c137..99318ab73ad 100644--- a/packages/features/eventtypes/components/tabs/instant/EventInstantTab.tsx+++ b/packages/features/eventtypes/components/tabs/instant/EventInstantTab.tsx@@ -1,6 +1,6 @@+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import type { EventTypeSetupProps } from "@calcom/features/eventtypes/lib/types";import { getPaymentAppData } from "@calcom/lib/getPaymentAppData";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";import InstantEventController from "./InstantEventController";diff --git a/packages/features/eventtypes/components/tabs/recurring/EventRecurringTab.tsx b/packages/features/eventtypes/components/tabs/recurring/EventRecurringTab.tsxindex 630d7a3e4bc..b13d1387cff 100644--- a/packages/features/eventtypes/components/tabs/recurring/EventRecurringTab.tsx+++ b/packages/features/eventtypes/components/tabs/recurring/EventRecurringTab.tsx@@ -1,5 +1,5 @@+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import { getPaymentAppData } from "@calcom/lib/getPaymentAppData";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";import type { RecurringEventControllerProps } from "./RecurringEventController";import RecurringEventController from "./RecurringEventController";diff --git a/packages/features/eventtypes/lib/getPublicEvent.ts b/packages/features/eventtypes/lib/getPublicEvent.tsindex 6053c93a101..8928a96ad79 100644--- a/packages/features/eventtypes/lib/getPublicEvent.ts+++ b/packages/features/eventtypes/lib/getPublicEvent.ts@@ -1,6 +1,7 @@import type { LocationObject } from "@calcom/app-store/locations";import { privacyFilteredLocations } from "@calcom/app-store/locations";import { getAppFromSlug } from "@calcom/app-store/utils";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import dayjs from "@calcom/dayjs";import { getBookingFieldsWithSystemFields } from "@calcom/features/bookings/lib/getBookingFields";import { getSlugOrRequestedSlug } from "@calcom/features/ee/organizations/lib/orgDomains";@@ -19,7 +20,6 @@ import type { Team } from "@calcom/prisma/client";import type { BookerLayoutSettings } from "@calcom/prisma/zod-utils";import {BookerLayouts,- eventTypeMetaDataSchemaWithTypedApps,bookerLayoutOptions,bookerLayouts as bookerLayoutsSchema,customInputSchema,diff --git a/packages/features/eventtypes/lib/types.ts b/packages/features/eventtypes/lib/types.tsindex 91070bef5b8..90070c80b91 100644--- a/packages/features/eventtypes/lib/types.ts+++ b/packages/features/eventtypes/lib/types.ts@@ -1,20 +1,21 @@import { z } from "zod";+import type { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import type { ChildrenEventType } from "@calcom/features/eventtypes/components/ChildrenEventTypeSelect";import type { IntervalLimit } from "@calcom/lib/intervalLimits/intervalLimitSchema";import type { EventLocationType } from "@calcom/lib/location";import type { AttributesQueryValue } from "@calcom/lib/raqb/types";import type { EventTypeTranslation } from "@calcom/prisma/client";-import type { PeriodType } from "@calcom/prisma/enums";-import { SchedulingType } from "@calcom/prisma/enums";-import type {- BookerLayoutSettings,- customInputSchema,- eventTypeMetaDataSchemaWithTypedApps,- eventTypeBookingFields,- eventTypeColor,+import { type PeriodType, SchedulingType } from "@calcom/prisma/enums";+import {+ eventTypeLocations,+ EventTypeMetaDataSchema,+ eventTypeSlug,+ type BookerLayoutSettings,} from "@calcom/prisma/zod-utils";-import { eventTypeSlug, eventTypeLocations, EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";+import type { customInputSchema } from "@calcom/prisma/zod-utils";+import type { eventTypeBookingFields } from "@calcom/prisma/zod-utils";+import type { eventTypeColor } from "@calcom/prisma/zod-utils";import type { RouterOutputs, RouterInputs } from "@calcom/trpc/react";import type { RecurringEvent } from "@calcom/types/Calendar";diff --git a/packages/features/noShow/handleSendingAttendeeNoShowDataToApps.ts b/packages/features/noShow/handleSendingAttendeeNoShowDataToApps.tsindex 915ea0acb5f..e499bdf89a4 100644--- a/packages/features/noShow/handleSendingAttendeeNoShowDataToApps.ts+++ b/packages/features/noShow/handleSendingAttendeeNoShowDataToApps.ts@@ -1,10 +1,11 @@import type { z } from "zod";import type { eventTypeAppCardZod } from "@calcom/app-store/eventTypeAppCardZod";+import { eventTypeAppMetadataOptionalSchema } from "@calcom/app-store/zod-utils";import CrmManager from "@calcom/lib/crmManager/crmManager";import logger from "@calcom/lib/logger";import prisma from "@calcom/prisma";-import { eventTypeAppMetadataOptionalSchema, EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";+import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";import type { NoShowAttendees } from "../handleMarkNoShow";import { noShowEnabledApps } from "./noShowEnabledApps";diff --git a/packages/lib/EventManager.ts b/packages/lib/EventManager.tsindex d665b3c3b88..e2a77d3979f 100644--- a/packages/lib/EventManager.ts+++ b/packages/lib/EventManager.ts@@ -24,7 +24,6 @@ import { CredentialRepository } from "@calcom/lib/server/repository/credential";import { prisma } from "@calcom/prisma";import type { DestinationCalendar, BookingReference } from "@calcom/prisma/client";import { createdEventSchema } from "@calcom/prisma/zod-utils";-import type { EventTypeAppMetadataSchema } from "@calcom/prisma/zod-utils";import type { AdditionalInformation, CalendarEvent, NewCalendarEventType } from "@calcom/types/Calendar";import type { CredentialForCalendarService } from "@calcom/types/Credential";import type { Event } from "@calcom/types/Event";@@ -130,20 +129,20 @@ type createdEventSchema = z.infer<typeof createdEventSchema>;export type EventManagerInitParams = {user: EventManagerUser;- eventTypeAppMetadata?: z.infer<typeof EventTypeAppMetadataSchema>;+ eventTypeAppMetadata?: Record<string, any>;};export default class EventManager {calendarCredentials: CredentialForCalendarService[];videoCredentials: CredentialForCalendarService[];crmCredentials: CredentialForCalendarService[];- appOptions?: z.infer<typeof EventTypeAppMetadataSchema>;+ appOptions?: Record<string, any>;/*** Takes an array of credentials and initializes a new instance of the EventManager.** @param user*/- constructor(user: EventManagerUser, eventTypeAppMetadata?: z.infer<typeof EventTypeAppMetadataSchema>) {+ constructor(user: EventManagerUser, eventTypeAppMetadata?: Record<string, any>) {log.silly("Initializing EventManager", safeStringify({ user: getPiiFreeUser(user) }));const appCredentials = getApps(user.credentials, true).flatMap((app) =>app.credentials.map((creds) => ({ ...creds, appName: app.name }))diff --git a/packages/lib/defaultEvents.ts b/packages/lib/defaultEvents.tsindex 684ccfe29dc..511c1352884 100644--- a/packages/lib/defaultEvents.ts+++ b/packages/lib/defaultEvents.ts@@ -4,7 +4,7 @@ import type { Prisma, SelectedCalendar } from "@calcom/prisma/client";import { PeriodType, SchedulingType } from "@calcom/prisma/enums";import type { userSelect } from "@calcom/prisma/selects";import type { CustomInputSchema } from "@calcom/prisma/zod-utils";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";import type { CredentialPayload } from "@calcom/types/Credential";diff --git a/packages/lib/event-types/getEventTypeById.ts b/packages/lib/event-types/getEventTypeById.tsindex 68169086e6b..3cbd419eec7 100644--- a/packages/lib/event-types/getEventTypeById.ts+++ b/packages/lib/event-types/getEventTypeById.ts@@ -1,6 +1,7 @@//import "server-only";import { getLocationGroupedOptions } from "@calcom/app-store/server";import { getEventTypeAppData } from "@calcom/app-store/utils";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import { getBookingFieldsWithSystemFields } from "@calcom/features/bookings/lib/getBookingFields";import { getUserAvatarUrl } from "@calcom/lib/getAvatarUrl";import { parseBookingLimit } from "@calcom/lib/intervalLimits/isBookingLimits";@@ -14,7 +15,7 @@ import { UserRepository } from "@calcom/lib/server/repository/user";import type { PrismaClient } from "@calcom/prisma";import type { Prisma } from "@calcom/prisma/client";import { SchedulingType, MembershipRole } from "@calcom/prisma/enums";-import { customInputSchema, eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";+import { customInputSchema } from "@calcom/prisma/zod-utils";import { TRPCError } from "@trpc/server";diff --git a/packages/lib/getPaymentAppData.ts b/packages/lib/getPaymentAppData.tsindex 113605b82c7..30e135efc14 100644--- a/packages/lib/getPaymentAppData.ts+++ b/packages/lib/getPaymentAppData.ts@@ -4,9 +4,9 @@ import { getEventTypeAppData } from "@calcom/app-store/_utils/getEventTypeAppDatimport type { appDataSchemas } from "@calcom/app-store/apps.schemas.generated";import type { appDataSchema, paymentOptionEnum } from "@calcom/app-store/stripepayment/zod";import type { EventTypeAppsList } from "@calcom/app-store/utils";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import type { BookerEvent } from "@calcom/features/bookings/types";import type { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";export function getPaymentAppData(_eventType: Pick<BookerEvent, "price" | "currency"> & {diff --git a/packages/lib/payment/handleNoShowFee.ts b/packages/lib/payment/handleNoShowFee.tsindex 78cd5af6b6f..b5f102366f3 100644--- a/packages/lib/payment/handleNoShowFee.ts+++ b/packages/lib/payment/handleNoShowFee.ts@@ -1,5 +1,6 @@// eslint-disable-next-lineimport { PaymentServiceMap } from "@calcom/app-store/payment.services.generated";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import dayjs from "@calcom/dayjs";import { sendNoShowFeeChargedEmail } from "@calcom/emails";import { ErrorCode } from "@calcom/lib/errorCodes";@@ -11,7 +12,6 @@ import { MembershipRepository } from "@calcom/lib/server/repository/membership";import { TeamRepository } from "@calcom/lib/server/repository/team";import prisma from "@calcom/prisma";import type { Prisma } from "@calcom/prisma/client";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";import type { CalendarEvent } from "@calcom/types/Calendar";import type { IAbstractPaymentService } from "@calcom/types/PaymentService";diff --git a/packages/lib/payment/processNoShowFeeOnCancellation.ts b/packages/lib/payment/processNoShowFeeOnCancellation.tsindex dd57c4bfd14..39f73dc1031 100644--- a/packages/lib/payment/processNoShowFeeOnCancellation.ts+++ b/packages/lib/payment/processNoShowFeeOnCancellation.ts@@ -1,7 +1,7 @@+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import logger from "@calcom/lib/logger";import { MembershipRepository } from "@calcom/lib/server/repository/membership";import type { Payment } from "@calcom/prisma/client";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";import { handleNoShowFee } from "./handleNoShowFee";import { shouldChargeNoShowCancellationFee } from "./shouldChargeNoShowCancellationFee";diff --git a/packages/lib/payment/shouldChargeNoShowCancellationFee.test.ts b/packages/lib/payment/shouldChargeNoShowCancellationFee.test.tsindex 126e7fc1df4..b32ab910408 100644--- a/packages/lib/payment/shouldChargeNoShowCancellationFee.test.ts+++ b/packages/lib/payment/shouldChargeNoShowCancellationFee.test.ts@@ -1,7 +1,7 @@import { describe, expect, it, vi, beforeAll } from "vitest";import type { z } from "zod";-import type { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";+import type { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import { shouldChargeNoShowCancellationFee } from "./shouldChargeNoShowCancellationFee";diff --git a/packages/lib/payment/shouldChargeNoShowCancellationFee.ts b/packages/lib/payment/shouldChargeNoShowCancellationFee.tsindex ca1bc9ec8a8..44bfa9e0275 100644--- a/packages/lib/payment/shouldChargeNoShowCancellationFee.ts+++ b/packages/lib/payment/shouldChargeNoShowCancellationFee.ts@@ -1,6 +1,6 @@import type { z } from "zod";-import type { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";+import type { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";export const shouldChargeNoShowCancellationFee = ({eventTypeMetadata,diff --git a/packages/platform/atoms/event-types/hooks/useTabsNavigations.tsx b/packages/platform/atoms/event-types/hooks/useTabsNavigations.tsxindex 8ed05ccf1f5..6dec69eeeee 100644--- a/packages/platform/atoms/event-types/hooks/useTabsNavigations.tsx+++ b/packages/platform/atoms/event-types/hooks/useTabsNavigations.tsx@@ -5,6 +5,7 @@ import type { TFunction } from "i18next";import { useMemo } from "react";import type { UseFormReturn } from "react-hook-form";+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import useLockedFieldsManager from "@calcom/features/ee/managed-event-types/hooks/useLockedFieldsManager";import type { Workflow } from "@calcom/features/ee/workflows/lib/types";import type {@@ -15,7 +16,6 @@ import type {} from "@calcom/features/eventtypes/lib/types";import { getPaymentAppData } from "@calcom/lib/getPaymentAppData";import { useLocale } from "@calcom/lib/hooks/useLocale";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";import type { VerticalTabItemProps } from "@calcom/ui/components/navigation";type Props = {diff --git a/packages/prisma/zod-utils.ts b/packages/prisma/zod-utils.tsindex 6ca8946d2a9..c0a2558ca92 100644--- a/packages/prisma/zod-utils.ts+++ b/packages/prisma/zod-utils.ts@@ -11,7 +11,6 @@ import type {ZodTypeAny,} from "zod";-import { appDataSchemas } from "@calcom/app-store/apps.schemas.generated";import { isPasswordValid } from "@calcom/features/auth/lib/isPasswordValid";import type { FieldType as FormBuilderFieldType } from "@calcom/features/form-builder/schema";import { fieldsSchema as formBuilderFieldsSchema } from "@calcom/features/form-builder/schema";@@ -83,9 +82,6 @@ export type BookerLayoutSettings = z.infer<typeof bookerLayouts>;export const RequiresConfirmationThresholdUnits: z.ZodType<UnitTypeLongPlural> = z.enum(["hours", "minutes"]);-export const EventTypeAppMetadataSchema = z.object(appDataSchemas).partial();-export const eventTypeAppMetadataOptionalSchema = EventTypeAppMetadataSchema.optional();-const _eventTypeMetaDataSchemaWithoutApps = z.object({smartContractAddress: z.string().optional(),blockchainId: z.number().optional(),@@ -136,13 +132,6 @@ export const eventTypeMetaDataSchemaWithUntypedApps = _eventTypeMetaDataSchemaWiexport const EventTypeMetaDataSchema = eventTypeMetaDataSchemaWithUntypedApps.nullable();export const eventTypeMetaDataSchemaWithoutApps = _eventTypeMetaDataSchemaWithoutApps.nullable();-export const eventTypeMetaDataSchemaWithTypedApps = _eventTypeMetaDataSchemaWithoutApps- .merge(- z.object({- apps: eventTypeAppMetadataOptionalSchema,- })- )- .nullable();export type EventTypeMetadata = z.infer<typeof EventTypeMetaDataSchema>;diff --git a/packages/trpc/server/routers/viewer/eventTypes/heavy/update.handler.ts b/packages/trpc/server/routers/viewer/eventTypes/heavy/update.handler.tsindex 421072a4de3..2868f017ae2 100644--- a/packages/trpc/server/routers/viewer/eventTypes/heavy/update.handler.ts+++ b/packages/trpc/server/routers/viewer/eventTypes/heavy/update.handler.ts@@ -2,6 +2,7 @@ import type { NextApiResponse, GetServerSidePropsContext } from "next";import type { appDataSchemas } from "@calcom/app-store/apps.schemas.generated";import { DailyLocationType } from "@calcom/app-store/constants";+import { eventTypeAppMetadataOptionalSchema } from "@calcom/app-store/zod-utils";import updateChildrenEventTypes from "@calcom/features/ee/managed-event-types/lib/handleChildrenEventTypes";import {allowDisablingAttendeeConfirmationEmails,@@ -25,20 +26,19 @@ import {EventTypeAutoTranslatedField,RRTimestampBasis,} from "@calcom/prisma/enums";-import { eventTypeAppMetadataOptionalSchema } from "@calcom/prisma/zod-utils";import { eventTypeLocations } from "@calcom/prisma/zod-utils";import { TRPCError } from "@trpc/server";import type { TrpcSessionUser } from "../../../../types";import { setDestinationCalendarHandler } from "../../../viewer/calendars/setDestinationCalendar.handler";-import type { TUpdateInputSchema } from "./update.schema";import {ensureUniqueBookingFields,ensureEmailOrPhoneNumberIsPresent,handleCustomInputs,handlePeriodType,} from "../util";+import type { TUpdateInputSchema } from "./update.schema";type SessionUser = NonNullable<TrpcSessionUser>;diff --git a/packages/trpc/server/routers/viewer/workflows/getAllActiveWorkflows.handler.ts b/packages/trpc/server/routers/viewer/workflows/getAllActiveWorkflows.handler.tsindex 706eaa58c66..d580cf34167 100644--- a/packages/trpc/server/routers/viewer/workflows/getAllActiveWorkflows.handler.ts+++ b/packages/trpc/server/routers/viewer/workflows/getAllActiveWorkflows.handler.ts@@ -1,5 +1,5 @@+import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/app-store/zod-utils";import { isTeamMember } from "@calcom/lib/server/queries/teams";-import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";import type { TrpcSessionUser } from "@calcom/trpc/server/types";import { TRPCError } from "@trpc/server";