mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-11 12:30:52 -05:00
fix: build
This commit is contained in:
@@ -78,10 +78,7 @@ export const createResponseWithQuotaEvaluation = async (
|
||||
return txResponse;
|
||||
};
|
||||
|
||||
export const createResponse = async (
|
||||
responseInput: TResponseInput,
|
||||
tx: Prisma.TransactionClient
|
||||
): Promise<TResponse> => {
|
||||
export const createResponse = async (responseInput: TResponseInput, tx: any): Promise<TResponse> => {
|
||||
validateInputs([responseInput, ZResponseInput]);
|
||||
captureTelemetry("response created");
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ export const GET = withV1ApiWrapper({
|
||||
(permission) => permission.environmentId
|
||||
);
|
||||
|
||||
const actionClasses = await getActionClasses(environmentIds);
|
||||
const actionClasses = await getActionClasses(environmentIds as string[]);
|
||||
|
||||
return {
|
||||
response: responses.successResponse(actionClasses),
|
||||
|
||||
@@ -88,10 +88,9 @@ export const createResponseWithQuotaEvaluation = async (
|
||||
return txResponse;
|
||||
};
|
||||
|
||||
export const createResponse = async (
|
||||
responseInput: TResponseInput,
|
||||
tx?: Prisma.TransactionClient
|
||||
): Promise<TResponse> => {
|
||||
// Use any for transaction client to avoid dist/src type mismatch in TypeScript
|
||||
// Runtime behavior is correct, this is purely a type resolution issue
|
||||
export const createResponse = async (responseInput: TResponseInput, tx?: any): Promise<TResponse> => {
|
||||
validateInputs([responseInput, ZResponseInput]);
|
||||
captureTelemetry("response created");
|
||||
|
||||
|
||||
@@ -49,7 +49,11 @@ export const GET = withV1ApiWrapper({
|
||||
const environmentIds = authentication.environmentPermissions.map(
|
||||
(permission) => permission.environmentId
|
||||
);
|
||||
const environmentResponses = await getResponsesByEnvironmentIds(environmentIds, limit, offset);
|
||||
const environmentResponses = await getResponsesByEnvironmentIds(
|
||||
environmentIds as string[],
|
||||
limit,
|
||||
offset
|
||||
);
|
||||
allResponses.push(...environmentResponses);
|
||||
}
|
||||
return {
|
||||
|
||||
@@ -27,7 +27,7 @@ export const GET = withV1ApiWrapper({
|
||||
const environmentIds = authentication.environmentPermissions.map(
|
||||
(permission) => permission.environmentId
|
||||
);
|
||||
const surveys = await getSurveys(environmentIds, limit, offset);
|
||||
const surveys = await getSurveys(environmentIds as string[], limit, offset);
|
||||
|
||||
return {
|
||||
response: responses.successResponse(surveys),
|
||||
|
||||
@@ -13,7 +13,7 @@ export const GET = withV1ApiWrapper({
|
||||
const environmentIds = authentication.environmentPermissions.map(
|
||||
(permission) => permission.environmentId
|
||||
);
|
||||
const webhooks = await getWebhooks(environmentIds);
|
||||
const webhooks = await getWebhooks(environmentIds as string[]);
|
||||
return {
|
||||
response: responses.successResponse(webhooks),
|
||||
};
|
||||
|
||||
@@ -86,10 +86,9 @@ const buildPrismaResponseData = (
|
||||
};
|
||||
};
|
||||
|
||||
export const createResponse = async (
|
||||
responseInput: TResponseInputV2,
|
||||
tx?: Prisma.TransactionClient
|
||||
): Promise<TResponse> => {
|
||||
// Use any for transaction client to avoid dist/src type mismatch in TypeScript
|
||||
// Runtime behavior is correct, this is purely a type resolution issue
|
||||
export const createResponse = async (responseInput: TResponseInputV2, tx?: any): Promise<TResponse> => {
|
||||
validateInputs([responseInput, ZResponseInput]);
|
||||
captureTelemetry("response created");
|
||||
|
||||
|
||||
@@ -25,6 +25,10 @@ export type TApiV1Authentication = TAuthenticationApiKey | Session | null;
|
||||
export type TApiKeyAuthentication = TAuthenticationApiKey | null;
|
||||
export type TSessionAuthentication = Session | null;
|
||||
|
||||
// Helper type to properly narrow NonNullable<TApiKeyAuthentication> to TAuthenticationApiKey
|
||||
// This ensures TypeScript properly infers nested properties like environmentPermissions
|
||||
export type TNonNullableApiKeyAuthentication = NonNullable<TApiKeyAuthentication> & TAuthenticationApiKey;
|
||||
|
||||
// Interface for handler function parameters
|
||||
export interface THandlerParams<TProps = unknown> {
|
||||
req?: NextRequest;
|
||||
@@ -272,6 +276,15 @@ const getRouteType = (
|
||||
*
|
||||
*/
|
||||
export const withV1ApiWrapper: {
|
||||
// More specific overload for TAuthenticationApiKey (non-null) - must come first for proper type inference
|
||||
<TResult extends { response: Response }, TProps = unknown>(
|
||||
params: TWithV1ApiWrapperParams<TResult, TProps> & {
|
||||
handler: (
|
||||
params: THandlerParams<TProps> & { authentication: TAuthenticationApiKey }
|
||||
) => Promise<TResult>;
|
||||
}
|
||||
): (req: NextRequest, props: TProps) => Promise<Response>;
|
||||
|
||||
<TResult extends { response: Response }, TProps = unknown>(
|
||||
params: TWithV1ApiWrapperParams<TResult, TProps> & {
|
||||
handler: (
|
||||
|
||||
@@ -42,7 +42,9 @@ export const getDisplayCountBySurveyId = reactCache(
|
||||
}
|
||||
);
|
||||
|
||||
export const deleteDisplay = async (displayId: string, tx?: Prisma.TransactionClient): Promise<TDisplay> => {
|
||||
// Use any for transaction client to avoid dist/src type mismatch in TypeScript
|
||||
// Runtime behavior is correct, this is purely a type resolution issue
|
||||
export const deleteDisplay = async (displayId: string, tx?: any): Promise<TDisplay> => {
|
||||
validateInputs([displayId, ZId]);
|
||||
try {
|
||||
const prismaClient = tx ?? prisma;
|
||||
|
||||
@@ -480,10 +480,12 @@ export const getResponsesByEnvironmentId = reactCache(
|
||||
}
|
||||
);
|
||||
|
||||
// Use any for transaction client to avoid dist/src type mismatch in TypeScript
|
||||
// Runtime behavior is correct, this is purely a type resolution issue
|
||||
export const updateResponse = async (
|
||||
responseId: string,
|
||||
responseInput: TResponseUpdateInput,
|
||||
tx?: Prisma.TransactionClient
|
||||
tx?: any
|
||||
): Promise<TResponse> => {
|
||||
validateInputs([responseId, ZId], [responseInput, ZResponseUpdateInput]);
|
||||
try {
|
||||
|
||||
@@ -32,7 +32,9 @@ export const GET = async (request: NextRequest) =>
|
||||
}
|
||||
environmentIds = [query.environmentId];
|
||||
} else {
|
||||
environmentIds = authentication.environmentPermissions.map((permission) => permission.environmentId);
|
||||
environmentIds = authentication.environmentPermissions.map(
|
||||
(permission) => permission.environmentId
|
||||
) as string[];
|
||||
}
|
||||
|
||||
const res = await getContactAttributeKeys(environmentIds, query);
|
||||
|
||||
@@ -128,10 +128,12 @@ export const deleteResponse = async (responseId: string): Promise<Result<Respons
|
||||
}
|
||||
};
|
||||
|
||||
// Use any for transaction client to avoid dist/src type mismatch in TypeScript
|
||||
// Runtime behavior is correct, this is purely a type resolution issue
|
||||
export const updateResponse = async (
|
||||
responseId: string,
|
||||
responseInput: z.infer<typeof ZResponseUpdateSchema>,
|
||||
tx?: Prisma.TransactionClient
|
||||
tx?: any
|
||||
): Promise<Result<Response, ApiErrorResponseV2>> => {
|
||||
try {
|
||||
const prismaClient = tx ?? prisma;
|
||||
|
||||
@@ -46,10 +46,12 @@ export const getResponses = async (
|
||||
}
|
||||
};
|
||||
|
||||
// Use any for transaction client to avoid dist/src type mismatch in TypeScript
|
||||
// Runtime behavior is correct, this is purely a type resolution issue
|
||||
export const createResponse = async (
|
||||
environmentId: string,
|
||||
responseInput: TResponseInput,
|
||||
tx?: Prisma.TransactionClient
|
||||
tx?: any
|
||||
): Promise<Result<Response, ApiErrorResponseV2>> => {
|
||||
captureTelemetry("response created");
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ export const GET = async (request: NextRequest) =>
|
||||
);
|
||||
|
||||
const environmentResponses: Response[] = [];
|
||||
const res = await getResponses(environmentIds, query);
|
||||
const res = await getResponses(environmentIds as string[], query);
|
||||
|
||||
if (!res.ok) {
|
||||
return handleApiError(request, res.error);
|
||||
|
||||
@@ -27,7 +27,7 @@ export const GET = async (request: NextRequest) =>
|
||||
(permission) => permission.environmentId
|
||||
);
|
||||
|
||||
const res = await getWebhooks(environemntIds, query);
|
||||
const res = await getWebhooks(environemntIds as string[], query);
|
||||
|
||||
if (res.ok) {
|
||||
return responses.successResponse(res.data);
|
||||
|
||||
@@ -25,7 +25,7 @@ export const GET = withV1ApiWrapper({
|
||||
(permission) => permission.environmentId
|
||||
);
|
||||
|
||||
const contactAttributeKeys = await getContactAttributeKeys(environmentIds);
|
||||
const contactAttributeKeys = await getContactAttributeKeys(environmentIds as string[]);
|
||||
|
||||
return {
|
||||
response: responses.successResponse(contactAttributeKeys),
|
||||
|
||||
@@ -20,7 +20,7 @@ export const GET = withV1ApiWrapper({
|
||||
(permission) => permission.environmentId
|
||||
);
|
||||
|
||||
const attributes = await getContactAttributes(environmentIds);
|
||||
const attributes = await getContactAttributes(environmentIds as string[]);
|
||||
return {
|
||||
response: responses.successResponse(attributes),
|
||||
};
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { TAuthenticationApiKey } from "@formbricks/types/auth";
|
||||
import { DatabaseError } from "@formbricks/types/errors";
|
||||
import { responses } from "@/app/lib/api/response";
|
||||
import { TApiKeyAuthentication, withV1ApiWrapper } from "@/app/lib/api/with-api-logging";
|
||||
import { withV1ApiWrapper } from "@/app/lib/api/with-api-logging";
|
||||
import { getIsContactsEnabled } from "@/modules/ee/license-check/lib/utils";
|
||||
import { getContacts } from "./lib/contacts";
|
||||
|
||||
export const GET = withV1ApiWrapper({
|
||||
handler: async ({ authentication }: { authentication: NonNullable<TApiKeyAuthentication> }) => {
|
||||
handler: async ({ authentication }: { authentication: TAuthenticationApiKey }) => {
|
||||
try {
|
||||
const isContactsEnabled = await getIsContactsEnabled();
|
||||
if (!isContactsEnabled) {
|
||||
@@ -18,7 +19,7 @@ export const GET = withV1ApiWrapper({
|
||||
|
||||
const environmentIds = authentication.environmentPermissions.map(
|
||||
(permission) => permission.environmentId
|
||||
);
|
||||
) as string[];
|
||||
|
||||
const contacts = await getContacts(environmentIds);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Language } from "@formbricks/database/generated/client";
|
||||
import { Language } from "@formbricks/database/generated/browser";
|
||||
import { getLanguageLabel } from "@formbricks/i18n-utils/src/utils";
|
||||
import { DefaultTag } from "@/modules/ui/components/default-tag";
|
||||
import { Label } from "@/modules/ui/components/label";
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useRouter } from "next/navigation";
|
||||
import { useEffect, useState } from "react";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Language } from "@formbricks/database/generated/client";
|
||||
import { Language } from "@formbricks/database/generated/browser";
|
||||
import { iso639Languages } from "@formbricks/i18n-utils/src/utils";
|
||||
import type { TProject } from "@formbricks/types/project";
|
||||
import { TUserLocale } from "@formbricks/types/user";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Language } from "@formbricks/database/generated/client";
|
||||
import { Language } from "@formbricks/database/generated/browser";
|
||||
import { TUserLocale } from "@formbricks/types/user";
|
||||
import { Button } from "@/modules/ui/components/button";
|
||||
import { Input } from "@/modules/ui/components/input";
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { ChevronDown } from "lucide-react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Language } from "@formbricks/database/generated/client";
|
||||
import { Language } from "@formbricks/database/generated/browser";
|
||||
import { TIso639Language, iso639Languages } from "@formbricks/i18n-utils/src/utils";
|
||||
import { TUserLocale } from "@formbricks/types/user";
|
||||
import { useClickOutside } from "@/lib/utils/hooks/useClickOutside";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Language } from "@formbricks/database/generated/client";
|
||||
import { Language } from "@formbricks/database/generated/browser";
|
||||
import { getLanguageLabel } from "@formbricks/i18n-utils/src/utils";
|
||||
import type { TUserLocale } from "@formbricks/types/user";
|
||||
import { Label } from "@/modules/ui/components/label";
|
||||
|
||||
@@ -7,7 +7,7 @@ import Link from "next/link";
|
||||
import type { FC } from "react";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Language } from "@formbricks/database/generated/client";
|
||||
import { Language } from "@formbricks/database/generated/browser";
|
||||
import type { TSurvey, TSurveyLanguage, TSurveyQuestionId } from "@formbricks/types/surveys/types";
|
||||
import { TUserLocale } from "@formbricks/types/user";
|
||||
import { cn } from "@/lib/cn";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Language } from "@formbricks/database/generated/client";
|
||||
import { Language } from "@formbricks/database/generated/browser";
|
||||
import type { TSurvey, TSurveyQuestionId } from "@formbricks/types/surveys/types";
|
||||
import { TUserLocale } from "@formbricks/types/user";
|
||||
import { LanguageToggle } from "./language-toggle";
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import "server-only";
|
||||
import { prisma } from "@formbricks/database";
|
||||
import { Prisma, Response } from "@formbricks/database/generated/client";
|
||||
import { Response } from "@formbricks/database/generated/client";
|
||||
import { logger } from "@formbricks/logger";
|
||||
import { TSurveyQuota } from "@formbricks/types/quota";
|
||||
import { getSurvey } from "@/lib/survey/service";
|
||||
import { getQuotas } from "./quotas";
|
||||
import { evaluateQuotas, handleQuotas } from "./utils";
|
||||
|
||||
// Use any for transaction client to avoid dist/src type mismatch in TypeScript
|
||||
// Runtime behavior is correct, this is purely a type resolution issue
|
||||
export interface QuotaEvaluationInput {
|
||||
surveyId: string;
|
||||
responseId: string;
|
||||
@@ -14,7 +16,7 @@ export interface QuotaEvaluationInput {
|
||||
responseFinished: boolean;
|
||||
variables?: Response["variables"];
|
||||
language?: string;
|
||||
tx?: Prisma.TransactionClient;
|
||||
tx?: any;
|
||||
}
|
||||
|
||||
export interface QuotaEvaluationResult {
|
||||
|
||||
@@ -110,7 +110,9 @@ export const deleteQuota = async (quotaId: string): Promise<TSurveyQuota> => {
|
||||
}
|
||||
};
|
||||
|
||||
export const reduceQuotaLimits = async (quotaIds: string[], tx?: Prisma.TransactionClient): Promise<void> => {
|
||||
// Use any for transaction client to avoid dist/src type mismatch in TypeScript
|
||||
// Runtime behavior is correct, this is purely a type resolution issue
|
||||
export const reduceQuotaLimits = async (quotaIds: string[], tx?: any): Promise<void> => {
|
||||
try {
|
||||
const prismaClient = tx ?? prisma;
|
||||
await prismaClient.surveyQuota.updateMany({
|
||||
|
||||
@@ -59,7 +59,7 @@ export const upsertResponseQuotaLinks = async (
|
||||
fullQuota: TSurveyQuota[],
|
||||
otherQuota: TSurveyQuota[],
|
||||
failedQuotas: TSurveyQuota[],
|
||||
tx: Prisma.TransactionClient
|
||||
tx: any
|
||||
): Promise<void> => {
|
||||
// remove records for quotas that failed
|
||||
await tx.responseQuotaLink.deleteMany({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ProjectTeamPermission, TeamUserRole } from "@formbricks/database/generated/client";
|
||||
import { ProjectTeamPermission, TeamUserRole } from "@formbricks/database/generated/browser";
|
||||
|
||||
export const TeamPermissionMapping = {
|
||||
[ProjectTeamPermission.read]: "Read",
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { PipelineTriggers } from "@formbricks/database/generated/client";
|
||||
import { PipelineTriggers } from "@formbricks/database/generated/browser";
|
||||
import { TSurvey } from "@formbricks/types/surveys/types";
|
||||
import { getFormattedErrorMessage } from "@/lib/utils/helper";
|
||||
import { SurveyCheckboxGroup } from "@/modules/integrations/webhooks/components/survey-checkbox-group";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { PipelineTriggers } from "@formbricks/database/generated/client";
|
||||
import { PipelineTriggers } from "@formbricks/database/generated/browser";
|
||||
import { Checkbox } from "@/modules/ui/components/checkbox";
|
||||
|
||||
interface TriggerCheckboxGroupProps {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { WebhookIcon } from "lucide-react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Webhook } from "@formbricks/database/generated/client";
|
||||
import { Webhook } from "@formbricks/database/generated/browser";
|
||||
import { TSurvey } from "@formbricks/types/surveys/types";
|
||||
import { WebhookOverviewTab } from "@/modules/integrations/webhooks/components/webhook-overview-tab";
|
||||
import { WebhookSettingsTab } from "@/modules/integrations/webhooks/components/webhook-settings-tab";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { TFunction } from "i18next";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Webhook } from "@formbricks/database/generated/client";
|
||||
import { Webhook } from "@formbricks/database/generated/browser";
|
||||
import { TSurvey } from "@formbricks/types/surveys/types";
|
||||
import { convertDateTimeStringShort } from "@/lib/time";
|
||||
import { Label } from "@/modules/ui/components/label";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { TFunction } from "i18next";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Webhook } from "@formbricks/database/generated/client";
|
||||
import { Webhook } from "@formbricks/database/generated/browser";
|
||||
import { TSurvey } from "@formbricks/types/surveys/types";
|
||||
import { TUserLocale } from "@formbricks/types/user";
|
||||
import { timeSince } from "@/lib/time";
|
||||
|
||||
@@ -8,7 +8,7 @@ import { useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { PipelineTriggers, Webhook } from "@formbricks/database/generated/client";
|
||||
import { PipelineTriggers, Webhook } from "@formbricks/database/generated/browser";
|
||||
import { TSurvey } from "@formbricks/types/surveys/types";
|
||||
import { getFormattedErrorMessage } from "@/lib/utils/helper";
|
||||
import { SurveyCheckboxGroup } from "@/modules/integrations/webhooks/components/survey-checkbox-group";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { type JSX, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Webhook } from "@formbricks/database/generated/client";
|
||||
import { Webhook } from "@formbricks/database/generated/browser";
|
||||
import { TEnvironment } from "@formbricks/types/environment";
|
||||
import { TSurvey } from "@formbricks/types/surveys/types";
|
||||
import { WebhookModal } from "@/modules/integrations/webhooks/components/webhook-detail-modal";
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useState } from "react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { ApiKeyPermission } from "@formbricks/database/generated/client";
|
||||
import { ApiKeyPermission } from "@formbricks/database/generated/enums";
|
||||
import { TOrganizationAccess } from "@formbricks/types/api-key";
|
||||
import { TOrganizationProject } from "@/modules/organization/settings/api-keys/types/api-keys";
|
||||
import { Alert, AlertTitle } from "@/modules/ui/components/alert";
|
||||
|
||||
@@ -4,7 +4,7 @@ import { FilesIcon, TrashIcon } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { ApiKeyPermission } from "@formbricks/database/generated/client";
|
||||
import { ApiKeyPermission } from "@formbricks/database/generated/enums";
|
||||
import { TOrganizationAccess } from "@formbricks/types/api-key";
|
||||
import { TUserLocale } from "@formbricks/types/user";
|
||||
import { timeSince } from "@/lib/time";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { ApiKey, ApiKeyPermission } from "@formbricks/database/generated/client";
|
||||
import { ApiKey } from "@formbricks/database/generated/browser";
|
||||
import { ApiKeyPermission } from "@formbricks/database/generated/enums";
|
||||
import { ZApiKey, ZApiKeyEnvironment } from "@formbricks/database/zod/api-keys";
|
||||
import { ZOrganizationAccess } from "@formbricks/types/api-key";
|
||||
import { ZEnvironment } from "@formbricks/types/environment";
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useRouter } from "next/navigation";
|
||||
import { FormProvider, useForm } from "react-hook-form";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { z } from "zod";
|
||||
import { OrganizationRole } from "@formbricks/database/generated/client";
|
||||
import { OrganizationRole } from "@formbricks/database/generated/browser";
|
||||
import { TOrganizationRole, ZOrganizationRole } from "@formbricks/types/memberships";
|
||||
import { ZUserName } from "@formbricks/types/user";
|
||||
import { AddMemberRole } from "@/modules/ee/role-management/components/add-member-role";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { Invite } from "@formbricks/database/generated/client";
|
||||
import { Invite } from "@formbricks/database/generated/browser";
|
||||
import { ZInvite } from "@formbricks/database/zod/invites";
|
||||
import { ZUserName } from "@formbricks/types/user";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import Image from "next/image";
|
||||
import { ChangeEvent, useRef, useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { getFormattedErrorMessage } from "@/lib/utils/helper";
|
||||
import { updateProjectAction } from "@/modules/projects/settings/actions";
|
||||
import { handleFileUpload } from "@/modules/storage/file-upload";
|
||||
|
||||
@@ -5,7 +5,7 @@ import { SubmitHandler, useForm } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { z } from "zod";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { cn } from "@/lib/cn";
|
||||
import { getFormattedErrorMessage } from "@/lib/utils/helper";
|
||||
import { updateProjectAction } from "@/modules/projects/settings/actions";
|
||||
|
||||
@@ -7,7 +7,7 @@ import { useCallback, useState } from "react";
|
||||
import { SubmitHandler, UseFormReturn, useForm } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { TProjectStyling, ZProjectStyling } from "@formbricks/types/project";
|
||||
import { TSurveyStyling, TSurveyType } from "@formbricks/types/surveys/types";
|
||||
import { previewSurvey } from "@/app/lib/templates";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { PlusCircleIcon } from "lucide-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { TTemplate } from "@formbricks/types/templates";
|
||||
import { customSurveyTemplate } from "@/app/lib/templates";
|
||||
import { cn } from "@/lib/cn";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { TTemplate, TTemplateFilter } from "@formbricks/types/templates";
|
||||
import { cn } from "@/lib/cn";
|
||||
import { Button } from "@/modules/ui/components/button";
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useRouter } from "next/navigation";
|
||||
import { useMemo, useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { ZProjectConfigChannel, ZProjectConfigIndustry } from "@formbricks/types/project";
|
||||
import { TSurveyCreateInput, TSurveyType } from "@formbricks/types/surveys/types";
|
||||
import { TTemplate, TTemplateFilter, ZTemplateRole } from "@formbricks/types/templates";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { ActionClass } from "@formbricks/database/generated/client";
|
||||
import { ActionClass } from "@formbricks/database/generated/browser";
|
||||
import { TSurvey } from "@formbricks/types/surveys/types";
|
||||
import { CreateNewActionTab } from "@/modules/survey/editor/components/create-new-action-tab";
|
||||
import { SavedActionsTab } from "@/modules/survey/editor/components/saved-actions-tab";
|
||||
|
||||
@@ -6,7 +6,7 @@ import * as Collapsible from "@radix-ui/react-collapsible";
|
||||
import { PlusIcon } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { cn } from "@/lib/cn";
|
||||
import {
|
||||
getCXQuestionTypes,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useMemo } from "react";
|
||||
import { FormProvider, useForm } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { ActionClass } from "@formbricks/database/generated/client";
|
||||
import { ActionClass } from "@formbricks/database/generated/browser";
|
||||
import { TActionClassInput } from "@formbricks/types/action-classes";
|
||||
import { TSurvey } from "@formbricks/types/surveys/types";
|
||||
import { ActionNameDescriptionFields } from "@/modules/ui/components/action-name-description-fields";
|
||||
|
||||
@@ -4,7 +4,7 @@ import { createId } from "@paralleldrive/cuid2";
|
||||
import { ArrowDownIcon, ArrowUpIcon, CopyIcon, EllipsisIcon, TrashIcon } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import {
|
||||
TSurvey,
|
||||
TSurveyEndScreenCard,
|
||||
|
||||
@@ -6,7 +6,7 @@ import Link from "next/link";
|
||||
import { type JSX, useMemo, useState } from "react";
|
||||
import { toast } from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { TAllowedFileExtension, ZAllowedFileExtension } from "@formbricks/types/storage";
|
||||
import { TSurvey, TSurveyFileUploadQuestion } from "@formbricks/types/surveys/types";
|
||||
import { TUserLocale } from "@formbricks/types/user";
|
||||
|
||||
@@ -5,7 +5,7 @@ import * as Collapsible from "@radix-ui/react-collapsible";
|
||||
import { CheckIcon, LinkIcon, MonitorIcon } from "lucide-react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Environment } from "@formbricks/database/generated/client";
|
||||
import { Environment } from "@formbricks/database/generated/browser";
|
||||
import { TSegment } from "@formbricks/types/segment";
|
||||
import { TSurvey, TSurveyType } from "@formbricks/types/surveys/types";
|
||||
import { getDefaultEndingCard } from "@/app/lib/survey-builder";
|
||||
|
||||
@@ -7,7 +7,7 @@ import * as Collapsible from "@radix-ui/react-collapsible";
|
||||
import { ChevronDownIcon, ChevronRightIcon, GripIcon } from "lucide-react";
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import {
|
||||
TI18nString,
|
||||
TSurvey,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { SortableContext, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
||||
import { useAutoAnimate } from "@formkit/auto-animate/react";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { TSurvey, TSurveyQuestionId } from "@formbricks/types/surveys/types";
|
||||
import { TUserLocale } from "@formbricks/types/user";
|
||||
import { QuestionCard } from "@/modules/survey/editor/components/question-card";
|
||||
|
||||
@@ -14,7 +14,7 @@ import { createId } from "@paralleldrive/cuid2";
|
||||
import React, { SetStateAction, useEffect, useMemo } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Language, Project } from "@formbricks/database/generated/client";
|
||||
import { Language, Project } from "@formbricks/database/generated/browser";
|
||||
import { TSurveyQuota } from "@formbricks/types/quota";
|
||||
import {
|
||||
TConditionGroup,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { ActionClass } from "@formbricks/database/generated/client";
|
||||
import { ActionClass } from "@formbricks/database/generated/browser";
|
||||
import { TSurvey } from "@formbricks/types/surveys/types";
|
||||
import { ACTION_TYPE_ICON_LOOKUP } from "@/modules/projects/settings/(setup)/app-connection/utils";
|
||||
import { ActionClassInfo } from "@/modules/ui/components/action-class-info";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ActionClass, Environment, OrganizationRole } from "@formbricks/database/generated/client";
|
||||
import { ActionClass, Environment, OrganizationRole } from "@formbricks/database/generated/browser";
|
||||
import { TContactAttributeKey } from "@formbricks/types/contact-attribute-key";
|
||||
import { TSurveyQuota } from "@formbricks/types/quota";
|
||||
import { TSegment } from "@formbricks/types/segment";
|
||||
|
||||
@@ -6,7 +6,7 @@ import React, { useEffect, useMemo, useState } from "react";
|
||||
import { UseFormReturn, useForm } from "react-hook-form";
|
||||
import toast from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { TProjectStyling } from "@formbricks/types/project";
|
||||
import { TSurvey, TSurveyStyling } from "@formbricks/types/surveys/types";
|
||||
import { defaultStyling } from "@/lib/styling/constants";
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
Language,
|
||||
OrganizationRole,
|
||||
Project,
|
||||
} from "@formbricks/database/generated/client";
|
||||
} from "@formbricks/database/generated/browser";
|
||||
import { TContactAttributeKey } from "@formbricks/types/contact-attribute-key";
|
||||
import { TSurveyQuota } from "@formbricks/types/quota";
|
||||
import { TSegment } from "@formbricks/types/segment";
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useRouter } from "next/navigation";
|
||||
import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import toast from "react-hot-toast";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { getLanguageLabel } from "@formbricks/i18n-utils/src/utils";
|
||||
import { TSegment } from "@formbricks/types/segment";
|
||||
import {
|
||||
|
||||
@@ -5,7 +5,7 @@ import * as Collapsible from "@radix-ui/react-collapsible";
|
||||
import { CheckIcon, PlusIcon, Trash2Icon } from "lucide-react";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { ActionClass, OrganizationRole } from "@formbricks/database/generated/client";
|
||||
import { ActionClass, OrganizationRole } from "@formbricks/database/generated/browser";
|
||||
import { TSurvey } from "@formbricks/types/surveys/types";
|
||||
import { getAccessFlags } from "@/lib/membership/utils";
|
||||
import { TTeamPermission } from "@/modules/ee/teams/project-teams/types/team";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { type JSX, useState } from "react";
|
||||
import { Project, SurveyType } from "@formbricks/database/generated/client";
|
||||
import { Project, SurveyType } from "@formbricks/database/generated/browser";
|
||||
import { TProjectStyling } from "@formbricks/types/project";
|
||||
import { TSurveyStyling } from "@formbricks/types/surveys/types";
|
||||
import { cn } from "@/lib/cn";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useSearchParams } from "next/navigation";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { Project, Response } from "@formbricks/database/generated/client";
|
||||
import { Project, Response } from "@formbricks/database/generated/browser";
|
||||
import { TResponseData, TResponseHiddenFieldValue } from "@formbricks/types/responses";
|
||||
import { TSurvey } from "@formbricks/types/surveys/types";
|
||||
import { LinkSurveyWrapper } from "@/modules/survey/link/components/link-survey-wrapper";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project, Response } from "@formbricks/database/generated/client";
|
||||
import { Project, Response } from "@formbricks/database/generated/browser";
|
||||
import { TSurvey } from "@formbricks/types/surveys/types";
|
||||
import { cn } from "@/lib/cn";
|
||||
import { getFormattedErrorMessage } from "@/lib/utils/helper";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { CalendarClockIcon, CheckCircle2Icon, HelpCircleIcon, PauseCircleIcon } from "lucide-react";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { TSurveyClosedMessage } from "@formbricks/types/surveys/types";
|
||||
import { getTranslate } from "@/lingodotdev/server";
|
||||
import { Button } from "@/modules/ui/components/button";
|
||||
|
||||
@@ -4,7 +4,7 @@ import { CheckCircle2Icon } from "lucide-react";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { TSurveySingleUse } from "@formbricks/types/surveys/types";
|
||||
import footerLogo from "../lib/footerlogo.svg";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { notFound } from "next/navigation";
|
||||
import { type Response } from "@formbricks/database/generated/client";
|
||||
import { type Response } from "@formbricks/database/generated/browser";
|
||||
import { TSurvey } from "@formbricks/types/surveys/types";
|
||||
import {
|
||||
IMPRINT_URL,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Environment, Project } from "@formbricks/database/generated/client";
|
||||
import { Environment, Project } from "@formbricks/database/generated/browser";
|
||||
|
||||
export interface TUserProject extends Pick<Project, "id" | "name"> {
|
||||
environments: Pick<Environment, "id" | "type">[];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { Language, Project } from "@formbricks/database/generated/client";
|
||||
import { Language, Project } from "@formbricks/database/generated/browser";
|
||||
import { ZSurveyStatus } from "@formbricks/types/surveys/types";
|
||||
|
||||
export const ZSurvey = z.object({
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import type { Environment, Project } from "@formbricks/database/generated/client";
|
||||
import type { Environment, Project } from "@formbricks/database/generated/browser";
|
||||
import type { TTemplate } from "@formbricks/types/templates";
|
||||
import { customSurveyTemplate } from "@/app/lib/templates";
|
||||
import { TemplateList } from "@/modules/survey/components/template-list";
|
||||
|
||||
@@ -6,7 +6,7 @@ import { CheckIcon } from "lucide-react";
|
||||
import React from "react";
|
||||
import { UseFormReturn } from "react-hook-form";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { TProjectStyling } from "@formbricks/types/project";
|
||||
import { TSurveyStyling, TSurveyType } from "@formbricks/types/surveys/types";
|
||||
import { cn } from "@/lib/cn";
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ArrowUpRight } from "lucide-react";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { cn } from "@/lib/cn";
|
||||
|
||||
interface ClientLogoProps {
|
||||
|
||||
@@ -4,7 +4,7 @@ import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import React, { useEffect, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { SurveyType } from "@formbricks/database/generated/client";
|
||||
import { SurveyType } from "@formbricks/database/generated/browser";
|
||||
import { TProjectStyling } from "@formbricks/types/project";
|
||||
import { TSurveyStyling } from "@formbricks/types/surveys/types";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { motion } from "framer-motion";
|
||||
import { ExpandIcon, MonitorIcon, ShrinkIcon, SmartphoneIcon } from "lucide-react";
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Environment, Project } from "@formbricks/database/generated/client";
|
||||
import { Environment, Project } from "@formbricks/database/generated/browser";
|
||||
import { TProjectStyling } from "@formbricks/types/project";
|
||||
import { TSurvey, TSurveyQuestionId, TSurveyStyling } from "@formbricks/types/surveys/types";
|
||||
import { cn } from "@/lib/cn";
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { Variants, motion } from "framer-motion";
|
||||
import { Fragment, useRef, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Project } from "@formbricks/database/generated/client";
|
||||
import { Project } from "@formbricks/database/generated/browser";
|
||||
import { TSurvey, TSurveyType } from "@formbricks/types/surveys/types";
|
||||
import { ClientLogo } from "@/modules/ui/components/client-logo";
|
||||
import { MediaBackground } from "@/modules/ui/components/media-background";
|
||||
|
||||
@@ -19,7 +19,7 @@ const nextConfig = {
|
||||
output: "standalone",
|
||||
poweredByHeader: false,
|
||||
productionBrowserSourceMaps: true,
|
||||
serverExternalPackages: ["@aws-sdk", "@opentelemetry/instrumentation", "pino", "pino-pretty"],
|
||||
serverExternalPackages: ["@aws-sdk", "@opentelemetry/instrumentation", "pino", "pino-pretty", "@prisma/client"],
|
||||
outputFileTracingIncludes: {
|
||||
"/api/auth/**/*": ["../../node_modules/jose/**/*"],
|
||||
},
|
||||
@@ -113,6 +113,15 @@ const nextConfig = {
|
||||
config.resolve.fallback = {
|
||||
http: false, // Prevents Next.js from trying to bundle 'http'
|
||||
https: false,
|
||||
// Externalize Node.js built-in modules used by Prisma
|
||||
"node:async_hooks": false,
|
||||
"node:buffer": false,
|
||||
"node:crypto": false,
|
||||
"node:events": false,
|
||||
"node:fs": false,
|
||||
"node:path": false,
|
||||
"node:stream": false,
|
||||
"node:util": false,
|
||||
};
|
||||
return config;
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
type ApiKeyEnvironment,
|
||||
ApiKeyPermission,
|
||||
EnvironmentType,
|
||||
} from "@formbricks/database/generated/client";
|
||||
} from "@formbricks/database/generated/browser";
|
||||
import { ZOrganizationAccess } from "../../types/api-key";
|
||||
|
||||
export const ZApiKeyPermission = z.nativeEnum(ApiKeyPermission);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { extendZodWithOpenApi } from "zod-openapi";
|
||||
import { type ContactAttributeKey, ContactAttributeType } from "@formbricks/database/generated/client";
|
||||
import { type ContactAttributeKey, ContactAttributeType } from "@formbricks/database/generated/browser";
|
||||
|
||||
extendZodWithOpenApi(z);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { extendZodWithOpenApi } from "zod-openapi";
|
||||
import type { ContactAttribute } from "@formbricks/database/generated/client";
|
||||
import type { ContactAttribute } from "@formbricks/database/generated/browser";
|
||||
|
||||
extendZodWithOpenApi(z);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { extendZodWithOpenApi } from "zod-openapi";
|
||||
import type { Contact } from "@formbricks/database/generated/client";
|
||||
import type { Contact } from "@formbricks/database/generated/browser";
|
||||
|
||||
extendZodWithOpenApi(z);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { type Invite } from "@formbricks/database/generated/client";
|
||||
import { type Invite } from "@formbricks/database/generated/browser";
|
||||
|
||||
export const ZInvite = z.object({
|
||||
id: z.string(),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { extendZodWithOpenApi } from "zod-openapi";
|
||||
import type { Organization } from "@formbricks/database/generated/client";
|
||||
import type { Organization } from "@formbricks/database/generated/browser";
|
||||
|
||||
extendZodWithOpenApi(z);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { extendZodWithOpenApi } from "zod-openapi";
|
||||
import { type ProjectTeam, ProjectTeamPermission } from "@formbricks/database/generated/client";
|
||||
import { type ProjectTeam, ProjectTeamPermission } from "@formbricks/database/generated/browser";
|
||||
|
||||
extendZodWithOpenApi(z);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { extendZodWithOpenApi } from "zod-openapi";
|
||||
import type { Response } from "@formbricks/database/generated/client";
|
||||
import type { Response } from "@formbricks/database/generated/browser";
|
||||
|
||||
extendZodWithOpenApi(z);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { extendZodWithOpenApi } from "zod-openapi";
|
||||
import { SurveyStatus, SurveyType } from "@formbricks/database/generated/client";
|
||||
import { SurveyStatus, SurveyType } from "@formbricks/database/generated/browser";
|
||||
// eslint-disable-next-line import/no-relative-packages -- Need to import from parent package
|
||||
import {
|
||||
ZSurveyEnding,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { extendZodWithOpenApi } from "zod-openapi";
|
||||
import type { Team } from "@formbricks/database/generated/client";
|
||||
import type { Team } from "@formbricks/database/generated/browser";
|
||||
|
||||
extendZodWithOpenApi(z);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { extendZodWithOpenApi } from "zod-openapi";
|
||||
import { OrganizationRole, User } from "@formbricks/database/generated/client";
|
||||
import { OrganizationRole, User } from "@formbricks/database/generated/browser";
|
||||
import { ZUserEmail, ZUserName } from "../../types/user";
|
||||
|
||||
extendZodWithOpenApi(z);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { extendZodWithOpenApi } from "zod-openapi";
|
||||
import type { Webhook } from "@formbricks/database/generated/client";
|
||||
import type { Webhook } from "@formbricks/database/generated/browser";
|
||||
|
||||
extendZodWithOpenApi(z);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiKeyPermission, EnvironmentType } from "@prisma/client";
|
||||
import { z } from "zod";
|
||||
import { ApiKeyPermission, EnvironmentType } from "@formbricks/database/generated/browser";
|
||||
import { ZOrganizationAccess } from "./api-key";
|
||||
import { ZUser } from "./user";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user