chore: remove TRPC barrel exports (#19598)
* remove barrel export for client * fix more imports * remove server barrel * remove more barrel exporst and fix tssconfig * fix types * fix imports for removed barrels * fig ssg createserverside helpers * restore lock * new yarn lock * remove barel exports * remove barrel * replace client with react in tsconfig * fix yarn lock * Update exports for trpc to not be types * add ENDPOINTS export to the correct location * other exports fixes lost due to barrel * fix client error export * more imports --------- Co-authored-by: hbjORbj <sldisek783@gmail.com> Co-authored-by: Keith Williams <keithwillcode@gmail.com>
This commit is contained in:
46 files changed
+89
-67
No files matched your search
@@ -6,10 +6,11 @@ import { trpc } from "app/_trpc/client";
|
||||
import { useState } from "react";
|
||||
import superjson from "superjson";
|
||||
|
||||
import { httpBatchLink, httpLink, loggerLink, splitLink, TRPCClientError } from "@calcom/trpc/client";
|
||||
import { ENDPOINTS } from "@calcom/trpc/react/shared";
|
||||
import type { AppRouter } from "@calcom/trpc/server/routers/_app";
|
||||
|
||||
import { httpBatchLink, httpLink, loggerLink, splitLink, TRPCClientError } from "@trpc/client";
|
||||
|
||||
export type Endpoint = (typeof ENDPOINTS)[number];
|
||||
|
||||
const MAX_QUERY_RETRIES = 3;
|
||||
|
||||
@@ -3,11 +3,12 @@ import { useForm } from "react-hook-form";
|
||||
import { Schedule } from "@calcom/features/schedules";
|
||||
import { DEFAULT_SCHEDULE } from "@calcom/lib/availability";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import type { TRPCClientErrorLike } from "@calcom/trpc/react";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { AppRouter } from "@calcom/trpc/server/routers/_app";
|
||||
import { Button, Form } from "@calcom/ui";
|
||||
|
||||
import type { TRPCClientErrorLike } from "@trpc/client";
|
||||
|
||||
interface ISetupAvailabilityProps {
|
||||
nextStep: () => void;
|
||||
defaultScheduleId?: number | null;
|
||||
|
||||
@@ -12,13 +12,14 @@ import { fetchUsername } from "@calcom/lib/fetchUsername";
|
||||
import hasKeyInMetadata from "@calcom/lib/hasKeyInMetadata";
|
||||
import { useDebounce } from "@calcom/lib/hooks/useDebounce";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import type { TRPCClientErrorLike } from "@calcom/trpc/client";
|
||||
import type { RouterOutputs } from "@calcom/trpc/react";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { AppRouter } from "@calcom/trpc/server/routers/_app";
|
||||
import { Button, Dialog, DialogClose, DialogContent, DialogFooter, Input, Label } from "@calcom/ui";
|
||||
import { Icon } from "@calcom/ui";
|
||||
|
||||
import type { TRPCClientErrorLike } from "@trpc/client";
|
||||
|
||||
export enum UsernameChangeStatusEnum {
|
||||
UPGRADE = "UPGRADE",
|
||||
}
|
||||
|
||||
@@ -8,12 +8,13 @@ import { useEffect, useState } from "react";
|
||||
import { fetchUsername } from "@calcom/lib/fetchUsername";
|
||||
import { useDebounce } from "@calcom/lib/hooks/useDebounce";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import type { TRPCClientErrorLike } from "@calcom/trpc/client";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { AppRouter } from "@calcom/trpc/server/routers/_app";
|
||||
import { Button, Dialog, DialogClose, DialogContent, TextField, DialogFooter, Tooltip } from "@calcom/ui";
|
||||
import { Icon } from "@calcom/ui";
|
||||
|
||||
import type { TRPCClientErrorLike } from "@trpc/client";
|
||||
|
||||
interface ICustomUsernameProps {
|
||||
currentUsername: string | undefined;
|
||||
setCurrentUsername?: (newUsername: string) => void;
|
||||
|
||||
@@ -6,12 +6,13 @@ import { Controller, useForm } from "react-hook-form";
|
||||
|
||||
import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider";
|
||||
import { WEBSITE_URL, IS_SELF_HOSTED } from "@calcom/lib/constants";
|
||||
import type { TRPCClientErrorLike } from "@calcom/trpc/client";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { AppRouter } from "@calcom/trpc/server/routers/_app";
|
||||
|
||||
import useRouterQuery from "@lib/hooks/useRouterQuery";
|
||||
|
||||
import type { TRPCClientErrorLike } from "@trpc/client";
|
||||
|
||||
interface UsernameAvailabilityFieldProps {
|
||||
onSuccessMutation?: () => void;
|
||||
onErrorMutation?: (error: TRPCClientErrorLike<AppRouter>) => void;
|
||||
|
||||
@@ -10,9 +10,10 @@ import { getQueryParam } from "@calcom/features/bookings/Booker/utils/query-para
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc } from "@calcom/trpc";
|
||||
import { TRPCClientError } from "@calcom/trpc/react";
|
||||
import { Button, EmptyScreen, Alert } from "@calcom/ui";
|
||||
|
||||
import { TRPCClientError } from "@trpc/client";
|
||||
|
||||
function ConnectAndJoin() {
|
||||
const { t } = useLocale();
|
||||
const router = useRouter();
|
||||
|
||||
@@ -28,7 +28,7 @@ import { HttpError } from "@calcom/lib/http-error";
|
||||
import type { MembershipRole } from "@calcom/prisma/enums";
|
||||
import { SchedulingType } from "@calcom/prisma/enums";
|
||||
import type { RouterOutputs } from "@calcom/trpc/react";
|
||||
import { trpc, TRPCClientError } from "@calcom/trpc/react";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import {
|
||||
Alert,
|
||||
Badge,
|
||||
@@ -60,6 +60,8 @@ import classNames from "@calcom/ui/classNames";
|
||||
|
||||
import useMeQuery from "@lib/hooks/useMeQuery";
|
||||
|
||||
import { TRPCClientError } from "@trpc/client";
|
||||
|
||||
type GetUserEventGroupsResponse = RouterOutputs["viewer"]["eventTypes"]["getUserEventGroups"];
|
||||
type GetEventTypesFromGroupsResponse = RouterOutputs["viewer"]["eventTypes"]["getEventTypesFromGroup"];
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { md } from "@calcom/lib/markdownIt";
|
||||
import turndown from "@calcom/lib/turndownService";
|
||||
import { IdentityProvider } from "@calcom/prisma/enums";
|
||||
import type { TRPCClientErrorLike } from "@calcom/trpc/client";
|
||||
import type { RouterOutputs } from "@calcom/trpc/react";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import type { AppRouter } from "@calcom/trpc/server/routers/_app";
|
||||
@@ -51,6 +50,8 @@ import SecondaryEmailConfirmModal from "@components/settings/SecondaryEmailConfi
|
||||
import SecondaryEmailModal from "@components/settings/SecondaryEmailModal";
|
||||
import { UsernameAvailabilityField } from "@components/ui/UsernameAvailability";
|
||||
|
||||
import type { TRPCClientErrorLike } from "@trpc/client";
|
||||
|
||||
const SkeletonLoader = () => {
|
||||
return (
|
||||
<SkeletonContainer>
|
||||
|
||||
@@ -5,11 +5,12 @@ import { symmetricDecrypt } from "@calcom/lib/crypto";
|
||||
import { defaultResponder } from "@calcom/lib/server/defaultResponder";
|
||||
import prisma from "@calcom/prisma";
|
||||
import { UserPermissionRole } from "@calcom/prisma/enums";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
import { createContext } from "@calcom/trpc/server/createContext";
|
||||
import { bookingsRouter } from "@calcom/trpc/server/routers/viewer/bookings/_router";
|
||||
import type { UserProfile } from "@calcom/types/UserProfile";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
enum DirectAction {
|
||||
ACCEPT = "accept",
|
||||
REJECT = "reject",
|
||||
|
||||
@@ -4,12 +4,13 @@ import { z } from "zod";
|
||||
import { defaultResponder } from "@calcom/lib/server/defaultResponder";
|
||||
import prisma from "@calcom/prisma";
|
||||
import { UserPermissionRole } from "@calcom/prisma/enums";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
import { createContext } from "@calcom/trpc/server/createContext";
|
||||
import { bookingsRouter } from "@calcom/trpc/server/routers/viewer/bookings/_router";
|
||||
import { createCallerFactory } from "@calcom/trpc/server/trpc";
|
||||
import type { UserProfile } from "@calcom/types/UserProfile";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
enum DirectAction {
|
||||
ACCEPT = "accept",
|
||||
REJECT = "reject",
|
||||
|
||||
@@ -4,9 +4,10 @@ import superjson from "superjson";
|
||||
|
||||
import { CALCOM_VERSION } from "@calcom/lib/constants";
|
||||
import prisma, { readonlyPrisma } from "@calcom/prisma";
|
||||
import { createServerSideHelpers } from "@calcom/trpc/react/server";
|
||||
import { appRouter } from "@calcom/trpc/server/routers/_app";
|
||||
|
||||
import { createServerSideHelpers } from "@trpc/react-query/server";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const { i18n } = require("@calcom/config/next-i18next.config");
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import { forms } from "@calcom/app-store/routing-forms/trpc/procedures/forms";
|
||||
import { getLocale } from "@calcom/features/auth/lib/getLocale";
|
||||
import { map } from "@calcom/features/flags/server/procedures/map";
|
||||
import { CALCOM_VERSION } from "@calcom/lib/constants";
|
||||
import { createServerSideHelpers } from "@calcom/trpc/react/server";
|
||||
import { createContext } from "@calcom/trpc/server/createContext";
|
||||
import { me } from "@calcom/trpc/server/routers/loggedInViewer/procedures/me";
|
||||
import { teamsAndUserProfilesQuery } from "@calcom/trpc/server/routers/loggedInViewer/procedures/teamsAndUserProfilesQuery";
|
||||
@@ -16,6 +15,8 @@ import { get } from "@calcom/trpc/server/routers/viewer/eventTypes/procedures/ge
|
||||
import { hasTeamPlan } from "@calcom/trpc/server/routers/viewer/teams/procedures/hasTeamPlan";
|
||||
import { router, mergeRouters } from "@calcom/trpc/server/trpc";
|
||||
|
||||
import { createServerSideHelpers } from "@trpc/react-query/server";
|
||||
|
||||
const loggedInRouter = router({
|
||||
me,
|
||||
});
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { PrismaClient } from "@calcom/prisma/client";
|
||||
import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import getAppKeysFromSlug from "../../_utils/getAppKeysFromSlug";
|
||||
import type { BasecampToken } from "../lib/CalendarService";
|
||||
import { refreshAccessToken } from "../lib/helpers";
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { PrismaClient } from "@calcom/prisma/client";
|
||||
import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import getAppKeysFromSlug from "../../_utils/getAppKeysFromSlug";
|
||||
import type { BasecampToken } from "../lib/CalendarService";
|
||||
import { refreshAccessToken } from "../lib/helpers";
|
||||
|
||||
@@ -11,7 +11,7 @@ import { IS_CALCOM } from "@calcom/lib/constants";
|
||||
import useApp from "@calcom/lib/hooks/useApp";
|
||||
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { trpc, TRPCClientError } from "@calcom/trpc/react";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery";
|
||||
import type { inferSSRProps } from "@calcom/types/inferSSRProps";
|
||||
import type { Brand } from "@calcom/types/utils";
|
||||
@@ -36,6 +36,8 @@ import {
|
||||
} from "@calcom/ui";
|
||||
import classNames from "@calcom/ui/classNames";
|
||||
|
||||
import { TRPCClientError } from "@trpc/react-query";
|
||||
|
||||
import { getAbsoluteEventTypeRedirectUrl } from "../getEventTypeRedirectUrl";
|
||||
import { RoutingPages } from "../lib/RoutingPages";
|
||||
import { isFallbackRoute } from "../lib/isFallbackRoute";
|
||||
|
||||
@@ -8,9 +8,10 @@ import { safeStringify } from "@calcom/lib/safeStringify";
|
||||
import { prisma } from "@calcom/prisma";
|
||||
import type { App_RoutingForms_Form } from "@calcom/prisma/client";
|
||||
import { RoutingFormSettings } from "@calcom/prisma/zod-utils";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
import type { ZResponseInputSchema } from "@calcom/trpc/server/routers/viewer/routing-forms/response.schema";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import isRouter from "../lib/isRouter";
|
||||
import { onFormSubmission } from "../trpc/utils";
|
||||
import type { FormResponse, SerializableForm } from "../types/types";
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { entityPrismaWhereClause } from "@calcom/lib/entityPermissionUtils";
|
||||
import type { PrismaClient } from "@calcom/prisma";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import getConnectedForms from "../lib/getConnectedForms";
|
||||
import { isFormCreateEditAllowed } from "../lib/isFormCreateEditAllowed";
|
||||
import type { TDeleteFormInputSchema } from "./deleteForm.schema";
|
||||
|
||||
@@ -3,9 +3,10 @@ import { Prisma } from "@prisma/client";
|
||||
|
||||
import { entityPrismaWhereClause, canEditEntity } from "@calcom/lib/entityPermissionUtils";
|
||||
import type { PrismaClient } from "@calcom/prisma";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import { createFallbackRoute } from "../lib/createFallbackRoute";
|
||||
import { getSerializableForm } from "../lib/getSerializableForm";
|
||||
import { isFallbackRoute } from "../lib/isFallbackRoute";
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import type { PrismaClient } from "@calcom/prisma";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import { enabledIncompleteBookingApps } from "../lib/enabledIncompleteBookingApps";
|
||||
import type { TGetIncompleteBookingSettingsInputSchema } from "./getIncompleteBookingSettings.schema";
|
||||
|
||||
|
||||
@@ -3,9 +3,10 @@ import type { z } from "zod";
|
||||
import logger from "@calcom/lib/logger";
|
||||
import type { PrismaClient } from "@calcom/prisma";
|
||||
import type { App_RoutingForms_FormResponse } from "@calcom/prisma/client";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import { jsonLogicToPrisma } from "../jsonLogicToPrisma";
|
||||
import { getSerializableForm } from "../lib/getSerializableForm";
|
||||
import { ensureStringOrStringArray, getLabelsFromOptionIds } from "../lib/reportingUtils";
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import logger from "@calcom/lib/logger";
|
||||
import type { PrismaClient } from "@calcom/prisma";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import incompleteBookingActionDataSchemas from "../lib/incompleteBooking/actionDataSchemas";
|
||||
import type { TSaveIncompleteBookingSettingsInputSchema } from "./saveIncompleteBookingSettings.schema";
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"@components/*": ["../../apps/web/components/*"],
|
||||
/* A `package` should never import from `apps` ↓ */
|
||||
"@lib/*": ["../../apps/web/lib/*"],
|
||||
"@prisma/client/*": ["@calcom/prisma/client/*"],
|
||||
"@prisma/client/*": ["@calcom/prisma/client/*"]
|
||||
},
|
||||
"resolveJsonModule": true,
|
||||
"experimentalDecorators": true
|
||||
|
||||
@@ -10,7 +10,6 @@ import CredentialsProvider from "next-auth/providers/credentials";
|
||||
import EmailProvider from "next-auth/providers/email";
|
||||
import GoogleProvider from "next-auth/providers/google";
|
||||
|
||||
|
||||
import { updateProfilePhotoGoogle } from "@calcom/app-store/_utils/oauth/updateProfilePhotoGoogle";
|
||||
import GoogleCalendarService from "@calcom/app-store/googlecalendar/lib/CalendarService";
|
||||
import { LicenseKeySingleton } from "@calcom/ee/common/server/LicenseKeyService";
|
||||
@@ -42,12 +41,12 @@ import { CreationSource } from "@calcom/prisma/enums";
|
||||
import { IdentityProvider, MembershipRole } from "@calcom/prisma/enums";
|
||||
import { teamMetadataSchema, userMetadata } from "@calcom/prisma/zod-utils";
|
||||
|
||||
import { getOrgUsernameFromEmail } from "../signup/utils/getOrgUsernameFromEmail";
|
||||
import { ErrorCode } from "./ErrorCode";
|
||||
import { dub } from "./dub";
|
||||
import { isPasswordValid } from "./isPasswordValid";
|
||||
import CalComAdapter from "./next-auth-custom-adapter";
|
||||
import { verifyPassword } from "./verifyPassword";
|
||||
import { getOrgUsernameFromEmail } from "../signup/utils/getOrgUsernameFromEmail"
|
||||
|
||||
const log = logger.getSubLogger({ prefix: ["next-auth-options"] });
|
||||
const GOOGLE_API_CREDENTIALS = process.env.GOOGLE_API_CREDENTIALS || "{}";
|
||||
@@ -897,7 +896,7 @@ export const getOptions = ({
|
||||
email: user.email,
|
||||
// Slugify the incoming name and append a few random characters to
|
||||
// prevent conflicts for users with the same name.
|
||||
username: getOrgUsernameFromEmail(user.name,getDomainFromEmail(user.email)),
|
||||
username: getOrgUsernameFromEmail(user.name, getDomainFromEmail(user.email)),
|
||||
emailVerified: new Date(Date.now()),
|
||||
name: user.name,
|
||||
identityProvider: idP,
|
||||
|
||||
+2
-6
@@ -14,12 +14,8 @@ import { refreshCredential } from "./refreshCredential";
|
||||
export async function refreshCredentials(
|
||||
credentials: Array<CredentialForCalendarService>
|
||||
): Promise<Array<CredentialForCalendarService>> {
|
||||
const nonDwdCredentials = credentials.filter(
|
||||
(cred) => !isDwdCredential({ credentialId: cred.id })
|
||||
);
|
||||
const dwdCredentials = credentials.filter((cred) =>
|
||||
isDwdCredential({ credentialId: cred.id })
|
||||
);
|
||||
const nonDwdCredentials = credentials.filter((cred) => !isDwdCredential({ credentialId: cred.id }));
|
||||
const dwdCredentials = credentials.filter((cred) => isDwdCredential({ credentialId: cred.id }));
|
||||
const refreshedDbCredentials = await async.mapLimit(nonDwdCredentials, 5, refreshCredential);
|
||||
return buildAllCredentials({ dwdCredentials, existingCredentials: refreshedDbCredentials });
|
||||
}
|
||||
@@ -3,7 +3,8 @@ import { HOSTED_CAL_FEATURES } from "@calcom/lib/constants";
|
||||
import { OrganizationRepository } from "@calcom/lib/server/repository/organization";
|
||||
import type { PrismaClient } from "@calcom/prisma";
|
||||
import { IdentityProvider } from "@calcom/prisma/enums";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import jackson from "./jackson";
|
||||
import { tenantPrefix, samlProductID } from "./saml";
|
||||
|
||||
@@ -4,11 +4,12 @@ import { getOrgFullOrigin } from "@calcom/ee/organizations/lib/orgDomains";
|
||||
import { CreationSource } from "@calcom/prisma/enums";
|
||||
import { RedirectType } from "@calcom/prisma/enums";
|
||||
import { _UserModel as User } from "@calcom/prisma/zod";
|
||||
import type { inferRouterOutputs } from "@calcom/trpc";
|
||||
import { TRPCError } from "@calcom/trpc";
|
||||
import { authedAdminProcedure } from "@calcom/trpc/server/procedures/authedProcedure";
|
||||
import { router } from "@calcom/trpc/server/trpc";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
import type { inferRouterOutputs } from "@trpc/server";
|
||||
|
||||
export type UserAdminRouter = typeof userAdminRouter;
|
||||
export type UserAdminRouterOutputs = inferRouterOutputs<UserAdminRouter>;
|
||||
|
||||
|
||||
@@ -38,4 +38,4 @@ export class CalendarAppDomainWideDelegationNotSetupError extends CalendarAppDom
|
||||
super(message);
|
||||
this.name = "CalendarAppDomainWideDelegationNotSetupError";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import prisma from "@calcom/prisma";
|
||||
import { SMSLockState } from "@calcom/prisma/enums";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import type { RateLimitHelper } from "./rateLimit";
|
||||
import { rateLimiter } from "./rateLimit";
|
||||
|
||||
@@ -18,7 +18,8 @@ import { orgDomainConfig } from "@calcom/features/ee/organizations/lib/orgDomain
|
||||
import { isAuthorizedToViewFormOnOrgDomain } from "@calcom/features/routing-forms/lib/isAuthorizedToViewForm";
|
||||
import logger from "@calcom/lib/logger";
|
||||
import { RoutingFormRepository } from "@calcom/lib/server/repository/routingForm";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
const log = logger.getSubLogger({ prefix: ["[routing-forms]", "[router]"] });
|
||||
const querySchema = z
|
||||
|
||||
@@ -15,10 +15,12 @@ import { useTypedQuery } from "@calcom/lib/hooks/useTypedQuery";
|
||||
import { HttpError } from "@calcom/lib/http-error";
|
||||
import { telemetryEventTypes, useTelemetry } from "@calcom/lib/telemetry";
|
||||
import { SchedulingType } from "@calcom/prisma/enums";
|
||||
import { trpc, TRPCClientError } from "@calcom/trpc/react";
|
||||
import { trpc } from "@calcom/trpc/react";
|
||||
import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery";
|
||||
import { showToast } from "@calcom/ui";
|
||||
|
||||
import { TRPCClientError } from "@trpc/react-query";
|
||||
|
||||
import { useEventTypeForm } from "../hooks/useEventTypeForm";
|
||||
import { useHandleRouteChange } from "../hooks/useHandleRouteChange";
|
||||
import { useTabsNavigations } from "../hooks/useTabsNavigations";
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export * from "@trpc/client";
|
||||
@@ -1,4 +1 @@
|
||||
export * from "./client";
|
||||
export * from "./next";
|
||||
export * from "./react";
|
||||
export * from "./server";
|
||||
@@ -1 +0,0 @@
|
||||
export * from "@trpc/next";
|
||||
@@ -1,2 +1,5 @@
|
||||
export * from "@trpc/react-query";
|
||||
export * from "./trpc";
|
||||
export type { RouterInputs, RouterOutputs } from "./trpc";
|
||||
|
||||
export { trpc, transformer } from "./trpc";
|
||||
|
||||
export { ENDPOINTS } from "./shared";
|
||||
@@ -1 +0,0 @@
|
||||
export * from "@trpc/react-query/server";
|
||||
@@ -1,16 +1,14 @@
|
||||
import type { NextPageContext } from "next/types";
|
||||
import superjson from "superjson";
|
||||
|
||||
import { httpBatchLink } from "../client";
|
||||
import { httpLink } from "../client";
|
||||
import { loggerLink } from "../client";
|
||||
import { splitLink } from "../client";
|
||||
import type { CreateTRPCNext } from "../next";
|
||||
import { createTRPCNext } from "../next";
|
||||
import { httpBatchLink, httpLink, loggerLink, splitLink } from "@trpc/client";
|
||||
import type { CreateTRPCNext } from "@trpc/next";
|
||||
import { createTRPCNext } from "@trpc/next";
|
||||
// ℹ️ Type-only import:
|
||||
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export
|
||||
import type { TRPCClientErrorLike } from "../react";
|
||||
import type { inferRouterInputs, inferRouterOutputs } from "../server";
|
||||
import type { TRPCClientErrorLike } from "@trpc/react-query";
|
||||
import type { inferRouterInputs, inferRouterOutputs } from "@trpc/server";
|
||||
|
||||
import type { AppRouter } from "../server/routers/_app";
|
||||
import { ENDPOINTS } from "./shared";
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export * from "@trpc/server";
|
||||
@@ -2,7 +2,8 @@ import { sendEmailVerification } from "@calcom/features/auth/lib/verifyEmail";
|
||||
import { checkRateLimitAndThrowError } from "@calcom/lib/checkRateLimitAndThrowError";
|
||||
import logger from "@calcom/lib/logger";
|
||||
import { prisma } from "@calcom/prisma";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import type { TRPCContext } from "../../../createContext";
|
||||
import type { TrpcSessionUser } from "../../../trpc";
|
||||
|
||||
@@ -2,7 +2,8 @@ import type { z } from "zod";
|
||||
|
||||
import { DomainWideDelegationRepository } from "@calcom/lib/server/repository/domainWideDelegation";
|
||||
import { WorkspacePlatformRepository } from "@calcom/lib/server/repository/workspacePlatform";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import type { DomainWideDelegationUpdateSchema } from "./schema";
|
||||
import {
|
||||
|
||||
+2
-1
@@ -22,9 +22,10 @@ import { getSerializableForm } from "@calcom/routing-forms/lib/getSerializableFo
|
||||
import { getServerTimingHeader } from "@calcom/routing-forms/lib/getServerTimingHeader";
|
||||
import isRouter from "@calcom/routing-forms/lib/isRouter";
|
||||
import { RouteActionType } from "@calcom/routing-forms/zod";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import type { TFindTeamMembersMatchingAttributeLogicOfRouteInputSchema } from "./findTeamMembersMatchingAttributeLogicOfRoute.schema";
|
||||
|
||||
interface FindTeamMembersMatchingAttributeLogicOfRouteHandlerOptions {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { getSerializableForm } from "@calcom/app-store/routing-forms/lib/getSerializableForm";
|
||||
import { handleResponse } from "@calcom/app-store/routing-forms/lib/handleResponse";
|
||||
import type { PrismaClient } from "@calcom/prisma";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import type { TResponseInputSchema } from "./response.schema";
|
||||
|
||||
|
||||
@@ -3,9 +3,10 @@ import { randomBytes } from "crypto";
|
||||
import { WEBAPP_URL } from "@calcom/lib/constants";
|
||||
import { isTeamAdmin } from "@calcom/lib/server/queries/teams";
|
||||
import { prisma } from "@calcom/prisma";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import type { TCreateInviteInputSchema } from "./createInvite.schema";
|
||||
|
||||
type CreateInviteOptions = {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { isTeamAdmin } from "@calcom/lib/server/queries/teams";
|
||||
import { prisma } from "@calcom/prisma";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import type { TDeleteInviteInputSchema } from "./deleteInvite.schema";
|
||||
|
||||
type DeleteInviteOptions = {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { isTeamAdmin } from "@calcom/lib/server/queries/teams";
|
||||
import { prisma } from "@calcom/prisma";
|
||||
import { TRPCError } from "@calcom/trpc/server";
|
||||
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
|
||||
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
import type { TSetInviteExpirationInputSchema } from "./setInviteExpiration.schema";
|
||||
|
||||
type SetInviteExpirationOptions = {
|
||||
|
||||
@@ -25,10 +25,7 @@
|
||||
"../types/tanstack-table.d.ts",
|
||||
"../types/next.d.ts",
|
||||
"../types/window.d.ts",
|
||||
"client",
|
||||
"next",
|
||||
"react",
|
||||
"server"
|
||||
"react"
|
||||
],
|
||||
"exclude": ["**/node_modules/**", "types/router.d.ts"],
|
||||
"compilerOptions": {
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
import { useState, type PropsWithChildren } from "react";
|
||||
|
||||
import { httpBatchLink } from "@calcom/trpc";
|
||||
import type { AppRouter } from "@calcom/trpc/server/routers/_app";
|
||||
|
||||
import { httpBatchLink } from "@trpc/client";
|
||||
import { createTRPCReact } from "@trpc/react-query";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
|
||||
Reference in new issue
Block a user