From 2a268accffd9be2c9fd6ef8ddd3c3096d956689f Mon Sep 17 00:00:00 2001 From: Dhruwang Jariwala <67850763+Dhruwang@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:53:22 +0530 Subject: [PATCH] chore: vercel style guide (part 1) (#4451) --- .../lib/{deleteFile.ts => delete-file.ts} | 2 +- .../lib/{getFile.ts => get-file.ts} | 24 ++++---- .../[accessType]/[fileName]/route.ts | 33 ++++++----- apps/web/lib/cache/contact-attribute-key.ts | 8 +-- apps/web/lib/cache/contact-attribute.ts | 10 ++-- apps/web/lib/cache/contact.ts | 8 +-- apps/web/lib/cache/document.ts | 20 +++---- apps/web/lib/cache/insight.ts | 6 +- apps/web/lib/cache/membership.ts | 6 +- apps/web/lib/cache/organization.ts | 10 ++-- apps/web/lib/cache/team.ts | 10 ++-- .../web/lib/utils/action-client-middleware.ts | 8 +-- apps/web/lib/utils/action-client.ts | 1 + apps/web/lib/utils/helper.ts | 2 +- apps/web/lib/utils/services.ts | 58 ++++++------------- apps/web/package.json | 5 +- packages/lib/storage/service.ts | 6 +- pnpm-lock.yaml | 13 ++++- 18 files changed, 116 insertions(+), 114 deletions(-) rename apps/web/app/storage/[environmentId]/[accessType]/[fileName]/lib/{deleteFile.ts => delete-file.ts} (93%) rename apps/web/app/storage/[environmentId]/[accessType]/[fileName]/lib/{getFile.ts => get-file.ts} (61%) diff --git a/apps/web/app/storage/[environmentId]/[accessType]/[fileName]/lib/deleteFile.ts b/apps/web/app/storage/[environmentId]/[accessType]/[fileName]/lib/delete-file.ts similarity index 93% rename from apps/web/app/storage/[environmentId]/[accessType]/[fileName]/lib/deleteFile.ts rename to apps/web/app/storage/[environmentId]/[accessType]/[fileName]/lib/delete-file.ts index f62f3c134c..2e837d9233 100644 --- a/apps/web/app/storage/[environmentId]/[accessType]/[fileName]/lib/deleteFile.ts +++ b/apps/web/app/storage/[environmentId]/[accessType]/[fileName]/lib/delete-file.ts @@ -1,7 +1,7 @@ import { responses } from "@/app/lib/api/response"; import { storageCache } from "@formbricks/lib/storage/cache"; import { deleteFile } from "@formbricks/lib/storage/service"; -import { TAccessType } from "@formbricks/types/storage"; +import { type TAccessType } from "@formbricks/types/storage"; export const handleDeleteFile = async (environmentId: string, accessType: TAccessType, fileName: string) => { try { diff --git a/apps/web/app/storage/[environmentId]/[accessType]/[fileName]/lib/getFile.ts b/apps/web/app/storage/[environmentId]/[accessType]/[fileName]/lib/get-file.ts similarity index 61% rename from apps/web/app/storage/[environmentId]/[accessType]/[fileName]/lib/getFile.ts rename to apps/web/app/storage/[environmentId]/[accessType]/[fileName]/lib/get-file.ts index 8223656d0b..73be4632f7 100644 --- a/apps/web/app/storage/[environmentId]/[accessType]/[fileName]/lib/getFile.ts +++ b/apps/web/app/storage/[environmentId]/[accessType]/[fileName]/lib/get-file.ts @@ -1,11 +1,14 @@ import { responses } from "@/app/lib/api/response"; import { notFound } from "next/navigation"; -import path from "path"; -import { UPLOADS_DIR } from "@formbricks/lib/constants"; -import { isS3Configured } from "@formbricks/lib/constants"; +import path from "node:path"; +import { UPLOADS_DIR, isS3Configured } from "@formbricks/lib/constants"; import { getLocalFile, getS3File } from "@formbricks/lib/storage/service"; -export const getFile = async (environmentId: string, accessType: string, fileName: string) => { +export const getFile = async ( + environmentId: string, + accessType: string, + fileName: string +): Promise => { if (!isS3Configured()) { try { const { fileBuffer, metaData } = await getLocalFile( @@ -32,15 +35,16 @@ export const getFile = async (environmentId: string, accessType: string, fileNam status: 302, headers: { Location: signedUrl, - // public file, cache for one hour, private file, cache for 10 minutes - "Cache-Control": `public, max-age=${accessType === "public" ? 3600 : 600}, s-maxage=3600, stale-while-revalidate=300`, + "Cache-Control": + accessType === "public" + ? `public, max-age=3600, s-maxage=3600, stale-while-revalidate=300` + : `public, max-age=600, s-maxage=3600, stale-while-revalidate=300`, }, }); - } catch (err) { - if (err.name === "NoSuchKey") { + } catch (error: unknown) { + if (error instanceof Error && error.name === "NoSuchKey") { return responses.notFoundResponse("File not found", fileName); - } else { - return responses.internalServerErrorResponse("Internal server error"); } + return responses.internalServerErrorResponse("Internal server error"); } }; diff --git a/apps/web/app/storage/[environmentId]/[accessType]/[fileName]/route.ts b/apps/web/app/storage/[environmentId]/[accessType]/[fileName]/route.ts index 540fc33780..5a3f70ef78 100644 --- a/apps/web/app/storage/[environmentId]/[accessType]/[fileName]/route.ts +++ b/apps/web/app/storage/[environmentId]/[accessType]/[fileName]/route.ts @@ -1,18 +1,18 @@ import { authenticateRequest } from "@/app/api/v1/auth"; import { responses } from "@/app/lib/api/response"; import { transformErrorToDetails } from "@/app/lib/api/validator"; -import { handleDeleteFile } from "@/app/storage/[environmentId]/[accessType]/[fileName]/lib/deleteFile"; +import { handleDeleteFile } from "@/app/storage/[environmentId]/[accessType]/[fileName]/lib/delete-file"; import { authOptions } from "@/modules/auth/lib/authOptions"; import { getServerSession } from "next-auth"; -import { NextRequest } from "next/server"; +import { type NextRequest } from "next/server"; import { hasUserEnvironmentAccess } from "@formbricks/lib/environment/auth"; import { ZStorageRetrievalParams } from "@formbricks/types/storage"; -import { getFile } from "./lib/getFile"; +import { getFile } from "./lib/get-file"; export const GET = async ( request: NextRequest, props: { params: Promise<{ environmentId: string; accessType: string; fileName: string }> } -) => { +): Promise => { const params = await props.params; const paramValidation = ZStorageRetrievalParams.safeParse(params); @@ -36,7 +36,7 @@ export const GET = async ( const session = await getServerSession(authOptions); - if (!session || !session.user) { + if (!session?.user) { // check for api key auth const res = await authenticateRequest(request); @@ -44,19 +44,22 @@ export const GET = async ( return responses.notAuthenticatedResponse(); } - return await getFile(environmentId, accessType, fileName); - } else { - const isUserAuthorized = await hasUserEnvironmentAccess(session.user.id, environmentId); - - if (!isUserAuthorized) { - return responses.unauthorizedResponse(); - } - return await getFile(environmentId, accessType, fileName); } + + const isUserAuthorized = await hasUserEnvironmentAccess(session.user.id, environmentId); + + if (!isUserAuthorized) { + return responses.unauthorizedResponse(); + } + + return await getFile(environmentId, accessType, fileName); }; -export const DELETE = async (_: NextRequest, props: { params: Promise<{ fileName: string }> }) => { +export const DELETE = async ( + _: NextRequest, + props: { params: Promise<{ fileName: string }> } +): Promise => { const params = await props.params; if (!params.fileName) { return responses.badRequestResponse("Fields are missing or incorrectly formatted", { @@ -79,7 +82,7 @@ export const DELETE = async (_: NextRequest, props: { params: Promise<{ fileName const session = await getServerSession(authOptions); - if (!session || !session.user) { + if (!session?.user) { return responses.notAuthenticatedResponse(); } diff --git a/apps/web/lib/cache/contact-attribute-key.ts b/apps/web/lib/cache/contact-attribute-key.ts index b71292d0ef..f1654ed80b 100644 --- a/apps/web/lib/cache/contact-attribute-key.ts +++ b/apps/web/lib/cache/contact-attribute-key.ts @@ -18,17 +18,17 @@ export const contactAttributeKeyCache = { return `contactAttributeKey-environment-${environmentId}-key-${key}`; }, }, - revalidate({ id, environmentId, key }: RevalidateProps): void { + revalidate: ({ id, environmentId, key }: RevalidateProps): void => { if (id) { - revalidateTag(this.tag.byId(id)); + revalidateTag(contactAttributeKeyCache.tag.byId(id)); } if (environmentId) { - revalidateTag(this.tag.byEnvironmentId(environmentId)); + revalidateTag(contactAttributeKeyCache.tag.byEnvironmentId(environmentId)); } if (environmentId && key) { - revalidateTag(this.tag.byEnvironmentIdAndKey(environmentId, key)); + revalidateTag(contactAttributeKeyCache.tag.byEnvironmentIdAndKey(environmentId, key)); } }, }; diff --git a/apps/web/lib/cache/contact-attribute.ts b/apps/web/lib/cache/contact-attribute.ts index b0eb0a8f0a..16d8621275 100644 --- a/apps/web/lib/cache/contact-attribute.ts +++ b/apps/web/lib/cache/contact-attribute.ts @@ -22,19 +22,19 @@ export const contactAttributeCache = { return `contactAttributes-${environmentId}`; }, }, - revalidate({ contactId, environmentId, userId, key }: RevalidateProps): void { + revalidate: ({ contactId, environmentId, userId, key }: RevalidateProps): void => { if (environmentId) { - revalidateTag(this.tag.byEnvironmentId(environmentId)); + revalidateTag(contactAttributeCache.tag.byEnvironmentId(environmentId)); } if (environmentId && userId) { - revalidateTag(this.tag.byEnvironmentIdAndUserId(environmentId, userId)); + revalidateTag(contactAttributeCache.tag.byEnvironmentIdAndUserId(environmentId, userId)); } if (contactId) { - revalidateTag(this.tag.byContactId(contactId)); + revalidateTag(contactAttributeCache.tag.byContactId(contactId)); } if (contactId && key) { - revalidateTag(this.tag.byKeyAndContactId(key, contactId)); + revalidateTag(contactAttributeCache.tag.byKeyAndContactId(key, contactId)); } }, }; diff --git a/apps/web/lib/cache/contact.ts b/apps/web/lib/cache/contact.ts index 23a674305a..d9d99a1c57 100644 --- a/apps/web/lib/cache/contact.ts +++ b/apps/web/lib/cache/contact.ts @@ -18,17 +18,17 @@ export const contactCache = { return `environments-${environmentId}-contactByUserId-${userId}`; }, }, - revalidate({ id, environmentId, userId }: RevalidateProps): void { + revalidate: ({ id, environmentId, userId }: RevalidateProps): void => { if (id) { - revalidateTag(this.tag.byId(id)); + revalidateTag(contactCache.tag.byId(id)); } if (environmentId) { - revalidateTag(this.tag.byEnvironmentId(environmentId)); + revalidateTag(contactCache.tag.byEnvironmentId(environmentId)); } if (environmentId && userId) { - revalidateTag(this.tag.byEnvironmentIdAndUserId(environmentId, userId)); + revalidateTag(contactCache.tag.byEnvironmentIdAndUserId(environmentId, userId)); } }, }; diff --git a/apps/web/lib/cache/document.ts b/apps/web/lib/cache/document.ts index 65126dd9ce..97dc8b3bb1 100644 --- a/apps/web/lib/cache/document.ts +++ b/apps/web/lib/cache/document.ts @@ -1,5 +1,5 @@ import { revalidateTag } from "next/cache"; -import { TSurveyQuestionId } from "@formbricks/types/surveys/types"; +import { type TSurveyQuestionId } from "@formbricks/types/surveys/types"; interface RevalidateProps { id?: string; @@ -37,30 +37,30 @@ export const documentCache = { return `insights-${insightId}-surveys-${surveyId}-questions-${questionId}-documents`; }, }, - revalidate({ id, environmentId, surveyId, responseId, questionId, insightId }: RevalidateProps): void { + revalidate: ({ id, environmentId, surveyId, responseId, questionId, insightId }: RevalidateProps): void => { if (id) { - revalidateTag(this.tag.byId(id)); + revalidateTag(documentCache.tag.byId(id)); } if (environmentId) { - revalidateTag(this.tag.byEnvironmentId(environmentId)); + revalidateTag(documentCache.tag.byEnvironmentId(environmentId)); } if (responseId) { - revalidateTag(this.tag.byResponseId(responseId)); + revalidateTag(documentCache.tag.byResponseId(responseId)); } if (surveyId) { - revalidateTag(this.tag.bySurveyId(surveyId)); + revalidateTag(documentCache.tag.bySurveyId(surveyId)); } if (responseId && questionId) { - revalidateTag(this.tag.byResponseIdQuestionId(responseId, questionId)); + revalidateTag(documentCache.tag.byResponseIdQuestionId(responseId, questionId)); } if (surveyId && questionId) { - revalidateTag(this.tag.bySurveyIdQuestionId(surveyId, questionId)); + revalidateTag(documentCache.tag.bySurveyIdQuestionId(surveyId, questionId)); } if (insightId) { - revalidateTag(this.tag.byInsightId(insightId)); + revalidateTag(documentCache.tag.byInsightId(insightId)); } if (insightId && surveyId && questionId) { - revalidateTag(this.tag.byInsightIdSurveyIdQuestionId(insightId, questionId)); + revalidateTag(documentCache.tag.byInsightIdSurveyIdQuestionId(insightId, surveyId, questionId)); } }, }; diff --git a/apps/web/lib/cache/insight.ts b/apps/web/lib/cache/insight.ts index 0affe5cb92..420154e69e 100644 --- a/apps/web/lib/cache/insight.ts +++ b/apps/web/lib/cache/insight.ts @@ -14,12 +14,12 @@ export const insightCache = { return `environments-${environmentId}-documentGroups`; }, }, - revalidate({ id, environmentId }: RevalidateProps): void { + revalidate: ({ id, environmentId }: RevalidateProps): void => { if (id) { - revalidateTag(this.tag.byId(id)); + revalidateTag(insightCache.tag.byId(id)); } if (environmentId) { - revalidateTag(this.tag.byEnvironmentId(environmentId)); + revalidateTag(insightCache.tag.byEnvironmentId(environmentId)); } }, }; diff --git a/apps/web/lib/cache/membership.ts b/apps/web/lib/cache/membership.ts index 2960890811..ed6ecde13c 100644 --- a/apps/web/lib/cache/membership.ts +++ b/apps/web/lib/cache/membership.ts @@ -14,13 +14,13 @@ export const membershipCache = { return `users-${userId}-memberships`; }, }, - revalidate({ organizationId, userId }: RevalidateProps): void { + revalidate: ({ organizationId, userId }: RevalidateProps): void => { if (organizationId) { - revalidateTag(this.tag.byOrganizationId(organizationId)); + revalidateTag(membershipCache.tag.byOrganizationId(organizationId)); } if (userId) { - revalidateTag(this.tag.byUserId(userId)); + revalidateTag(membershipCache.tag.byUserId(userId)); } }, }; diff --git a/apps/web/lib/cache/organization.ts b/apps/web/lib/cache/organization.ts index a01f2cd193..1d483e7155 100644 --- a/apps/web/lib/cache/organization.ts +++ b/apps/web/lib/cache/organization.ts @@ -22,21 +22,21 @@ export const organizationCache = { return "organizations-count"; }, }, - revalidate({ id, userId, environmentId, count }: RevalidateProps): void { + revalidate: ({ id, userId, environmentId, count }: RevalidateProps): void => { if (id) { - revalidateTag(this.tag.byId(id)); + revalidateTag(organizationCache.tag.byId(id)); } if (userId) { - revalidateTag(this.tag.byUserId(userId)); + revalidateTag(organizationCache.tag.byUserId(userId)); } if (environmentId) { - revalidateTag(this.tag.byEnvironmentId(environmentId)); + revalidateTag(organizationCache.tag.byEnvironmentId(environmentId)); } if (count) { - revalidateTag(this.tag.byCount()); + revalidateTag(organizationCache.tag.byCount()); } }, }; diff --git a/apps/web/lib/cache/team.ts b/apps/web/lib/cache/team.ts index b80cd7f1c7..7d9ba48a46 100644 --- a/apps/web/lib/cache/team.ts +++ b/apps/web/lib/cache/team.ts @@ -22,18 +22,18 @@ export const teamCache = { return `organization-${organizationId}-teams`; }, }, - revalidate({ id, projectId, userId, organizationId }: RevalidateProps): void { + revalidate: ({ id, projectId, userId, organizationId }: RevalidateProps): void => { if (id) { - revalidateTag(this.tag.byId(id)); + revalidateTag(teamCache.tag.byId(id)); } if (projectId) { - revalidateTag(this.tag.byProjectId(projectId)); + revalidateTag(teamCache.tag.byProjectId(projectId)); } if (userId) { - revalidateTag(this.tag.byUserId(userId)); + revalidateTag(teamCache.tag.byUserId(userId)); } if (organizationId) { - revalidateTag(this.tag.byOrganizationId(organizationId)); + revalidateTag(teamCache.tag.byOrganizationId(organizationId)); } }, }; diff --git a/apps/web/lib/utils/action-client-middleware.ts b/apps/web/lib/utils/action-client-middleware.ts index 8677f1f2f9..17ad2d948e 100644 --- a/apps/web/lib/utils/action-client-middleware.ts +++ b/apps/web/lib/utils/action-client-middleware.ts @@ -1,11 +1,11 @@ import { getProjectPermissionByUserId, getTeamRoleByTeamIdUserId } from "@/modules/ee/teams/lib/roles"; -import { TTeamPermission } from "@/modules/ee/teams/project-teams/types/teams"; -import { TTeamRole } from "@/modules/ee/teams/team-list/types/teams"; +import { type TTeamPermission } from "@/modules/ee/teams/project-teams/types/teams"; +import { type TTeamRole } from "@/modules/ee/teams/team-list/types/teams"; import { returnValidationErrors } from "next-safe-action"; import { ZodIssue, z } from "zod"; import { getMembershipRole } from "@formbricks/lib/membership/hooks/actions"; import { AuthorizationError } from "@formbricks/types/errors"; -import { TOrganizationRole } from "@formbricks/types/memberships"; +import { type TOrganizationRole } from "@formbricks/types/memberships"; const formatErrors = (issues: ZodIssue[]): Record => { return { @@ -58,7 +58,7 @@ export const checkAuthorizationUpdated = async ({ }) => { const role = await getMembershipRole(userId, organizationId); - for (let accessItem of access) { + for (const accessItem of access) { if (accessItem.type === "organization") { if (accessItem.schema) { const resultSchema = accessItem.schema.strict(); diff --git a/apps/web/lib/utils/action-client.ts b/apps/web/lib/utils/action-client.ts index 6497b41230..97d073fa47 100644 --- a/apps/web/lib/utils/action-client.ts +++ b/apps/web/lib/utils/action-client.ts @@ -24,6 +24,7 @@ export const actionClient = createSafeActionClient({ return e.message; } + // eslint-disable-next-line no-console -- This error needs to be logged for debugging server-side errors console.error("SERVER ERROR: ", e); return DEFAULT_SERVER_ERROR_MESSAGE; }, diff --git a/apps/web/lib/utils/helper.ts b/apps/web/lib/utils/helper.ts index 4dbaa773eb..28682dd770 100644 --- a/apps/web/lib/utils/helper.ts +++ b/apps/web/lib/utils/helper.ts @@ -19,7 +19,7 @@ import { } from "@/lib/utils/services"; import { ResourceNotFoundError } from "@formbricks/types/errors"; -export const getFormattedErrorMessage = (result) => { +export const getFormattedErrorMessage = (result): string => { let message = ""; if (result.serverError) { diff --git a/apps/web/lib/utils/services.ts b/apps/web/lib/utils/services.ts index 2fde3153c8..80d3ab502f 100644 --- a/apps/web/lib/utils/services.ts +++ b/apps/web/lib/utils/services.ts @@ -104,10 +104,8 @@ export const getEnvironment = reactCache( return environment; } catch (error) { if (error instanceof Prisma.PrismaClientKnownRequestError) { - console.error(error); throw new DatabaseError(error.message); } - throw error; } }, @@ -194,7 +192,6 @@ export const getLanguage = async (languageId: string): Promise<{ projectId: stri return language; } catch (error) { if (error instanceof Prisma.PrismaClientKnownRequestError) { - console.error(error); throw new DatabaseError(error.message); } throw error; @@ -205,15 +202,13 @@ export const getProject = reactCache( async (projectId: string): Promise<{ organizationId: string } | null> => cache( async () => { - let projectPrisma; try { - projectPrisma = await prisma.project.findUnique({ + const projectPrisma = await prisma.project.findUnique({ where: { id: projectId, }, select: { organizationId: true }, }); - return projectPrisma; } catch (error) { if (error instanceof Prisma.PrismaClientKnownRequestError) { @@ -306,7 +301,6 @@ export const getSurvey = reactCache( return survey; } catch (error) { if (error instanceof Prisma.PrismaClientKnownRequestError) { - console.error(error); throw new DatabaseError(error.message); } throw error; @@ -324,21 +318,15 @@ export const getTag = reactCache( cache( async () => { validateInputs([id, ZId]); - - try { - const tag = await prisma.tag.findUnique({ - where: { - id, - }, - select: { - environmentId: true, - }, - }); - - return tag; - } catch (error) { - throw error; - } + const tag = await prisma.tag.findUnique({ + where: { + id, + }, + select: { + environmentId: true, + }, + }); + return tag; }, [`utils-getTag-${id}`], { @@ -476,29 +464,19 @@ export const isProjectPartOfOrganization = async ( organizationId: string, projectId: string ): Promise => { - try { - const project = await getProject(projectId); - if (!project) { - throw new ResourceNotFoundError("Project", projectId); - } - - return project.organizationId === organizationId; - } catch (error) { - throw error; + const project = await getProject(projectId); + if (!project) { + throw new ResourceNotFoundError("Project", projectId); } + return project.organizationId === organizationId; }; export const isTeamPartOfOrganization = async (organizationId: string, teamId: string): Promise => { - try { - const team = await getTeam(teamId); - if (!team) { - throw new ResourceNotFoundError("Team", teamId); - } - - return team.organizationId === organizationId; - } catch (error) { - throw error; + const team = await getTeam(teamId); + if (!team) { + throw new ResourceNotFoundError("Team", teamId); } + return team.organizationId === organizationId; }; export const getContact = reactCache( diff --git a/apps/web/package.json b/apps/web/package.json index aba110a613..81bbd0eecb 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -38,6 +38,7 @@ "@opentelemetry/instrumentation": "0.53.0", "@opentelemetry/sdk-logs": "0.53.0", "@paralleldrive/cuid2": "2.2.2", + "@prisma/client": "5.20.0", "@radix-ui/react-accordion": "1.2.0", "@radix-ui/react-checkbox": "1.1.1", "@radix-ui/react-collapsible": "1.1.1", @@ -87,6 +88,7 @@ "lucide-react": "0.452.0", "mime": "4.0.4", "next": "15.0.3", + "next-auth": "4.24.10", "next-intl": "3.20.0", "next-safe-action": "7.9.3", "optional": "0.1.4", @@ -111,7 +113,8 @@ "tailwindcss": "3.4.13", "ua-parser-js": "1.0.39", "webpack": "5.95.0", - "xlsx": "0.18.5" + "xlsx": "0.18.5", + "zod": "3.23.8" }, "devDependencies": { "@formbricks/config-typescript": "workspace:*", diff --git a/packages/lib/storage/service.ts b/packages/lib/storage/service.ts index aa93f64e6a..deb8bb7daa 100644 --- a/packages/lib/storage/service.ts +++ b/packages/lib/storage/service.ts @@ -310,7 +310,11 @@ export const putFile = async ( } }; -export const deleteFile = async (environmentId: string, accessType: TAccessType, fileName: string) => { +export const deleteFile = async ( + environmentId: string, + accessType: TAccessType, + fileName: string +): Promise<{ success: boolean; message: string; code?: number }> => { if (!isS3Configured()) { try { await deleteLocalFile(path.join(UPLOADS_DIR, environmentId, accessType, fileName)); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2481b49b61..f0bca5ec28 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -151,7 +151,7 @@ importers: version: 8.12.1 autoprefixer: specifier: 10.4.20 - version: 10.4.20(postcss@8.4.41) + version: 10.4.20(postcss@8.4.49) clsx: specifier: 2.1.1 version: 2.1.1 @@ -421,6 +421,9 @@ importers: '@paralleldrive/cuid2': specifier: 2.2.2 version: 2.2.2 + '@prisma/client': + specifier: 5.20.0 + version: 5.20.0(prisma@5.20.0) '@radix-ui/react-accordion': specifier: 1.2.0 version: 1.2.0(@types/react-dom@18.3.0)(@types/react@18.3.11)(react-dom@19.0.0-rc-ed15d500-20241110(react@19.0.0-rc-ed15d500-20241110))(react@19.0.0-rc-ed15d500-20241110) @@ -504,7 +507,7 @@ importers: version: 3.4.33(react@19.0.0-rc-ed15d500-20241110)(sswr@2.1.0(svelte@5.4.0))(svelte@5.4.0)(vue@3.5.13(typescript@5.7.2))(zod@3.23.8) autoprefixer: specifier: 10.4.20 - version: 10.4.20(postcss@8.4.49) + version: 10.4.20(postcss@8.4.41) bcryptjs: specifier: 2.4.3 version: 2.4.3 @@ -568,6 +571,9 @@ importers: next: specifier: 15.0.3 version: 15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@19.0.0-rc-ed15d500-20241110(react@19.0.0-rc-ed15d500-20241110))(react@19.0.0-rc-ed15d500-20241110) + next-auth: + specifier: 4.24.10 + version: 4.24.10(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@19.0.0-rc-ed15d500-20241110(react@19.0.0-rc-ed15d500-20241110))(react@19.0.0-rc-ed15d500-20241110))(nodemailer@6.9.16)(react-dom@19.0.0-rc-ed15d500-20241110(react@19.0.0-rc-ed15d500-20241110))(react@19.0.0-rc-ed15d500-20241110) next-intl: specifier: 3.20.0 version: 3.20.0(next@15.0.3(@opentelemetry/api@1.9.0)(@playwright/test@1.45.3)(react-dom@19.0.0-rc-ed15d500-20241110(react@19.0.0-rc-ed15d500-20241110))(react@19.0.0-rc-ed15d500-20241110))(react@19.0.0-rc-ed15d500-20241110) @@ -643,6 +649,9 @@ importers: xlsx: specifier: 0.18.5 version: 0.18.5 + zod: + specifier: 3.23.8 + version: 3.23.8 devDependencies: '@formbricks/config-typescript': specifier: workspace:*