hunk.code_window:         endTime: true,
           location: true,
           description: true,
           user: {
             select: {
               email: true,
               name: true,
  
hunk.labels: keep keep add keep keep keep keep
hunk.after_edit:         userPrimaryEmail: true,
  
hunk.file_path: packages/features/ee/workflows/lib/getWorkflowReminders.ts
hunk.type: add
file: import { entityPrismaWhereClause } from "@calcom/lib/entityPermissionUtils";
  import type { PrismaClient } from "@calcom/prisma";
  import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
  
  import { getSerializableForm } from "../lib/getSerializableForm";
  import type { TFormQueryInputSchema } from "./formQuery.schema";
  
  interface FormsHandlerOptions {
    ctx: {
      prisma: PrismaClient;
      user: NonNullable<TrpcSessionUser>;
    };
    input: TFormQueryInputSchema;
  }
  
  export const formQueryHandler = async ({ ctx, input }: FormsHandlerOptions) => {
    const { prisma, user } = ctx;
    const form = await prisma.app_RoutingForms_Form.findFirst({
      where: {
        AND: [
          entityPrismaWhereClause({ userId: user.id }),
          {
            id: input.id,
          },
        ],
      },
      include: {
        team: { select: { slug: true, name: true } },
        _count: {
          select: {
            responses: true,
          },
        },
      },
    });
  
    if (!form) {
      return null;
    }
  
    return await getSerializableForm({ form });
  };
  
  export default formQueryHandler;
  