refactor: move handleNotificationWhenNoSlots from trpc to features/slots (#25538)

Move handleNotificationWhenNoSlots.ts and its test file from
packages/trpc/server/routers/viewer/slots/ to packages/features/slots/
to resolve circular dependency issue where packages/features imports
from packages/trpc.

This file is not TRPC-specific and belongs in the features package.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Benny Joo
2025-12-08 10:54:21 +02:00
committed by GitHub
co-authored by Devin AI
parent e10c4c1cb5
commit 584f5581fa
6 changed files with 7 additions and 7 deletions
@@ -2,7 +2,7 @@ import { DI_TOKENS } from "@calcom/features/di/tokens";
import { redisModule } from "@calcom/features/redis/di/redisModule";
import { membershipRepositoryModule } from "@calcom/features/users/di/MembershipRepository.module";
import { prismaModule } from "@calcom/features/di/modules/Prisma";
import type { NoSlotsNotificationService } from "@calcom/trpc/server/routers/viewer/slots/handleNotificationWhenNoSlots";
import type { NoSlotsNotificationService } from "@calcom/features/slots/handleNotificationWhenNoSlots";
import { createContainer } from "../di";
import { noSlotsNotificationModule } from "../modules/NoSlotsNotification";
@@ -1,5 +1,5 @@
import type { INoSlotsNotificationService } from "@calcom/trpc/server/routers/viewer/slots/handleNotificationWhenNoSlots";
import { NoSlotsNotificationService } from "@calcom/trpc/server/routers/viewer/slots/handleNotificationWhenNoSlots";
import type { INoSlotsNotificationService } from "@calcom/features/slots/handleNotificationWhenNoSlots";
import { NoSlotsNotificationService } from "@calcom/features/slots/handleNotificationWhenNoSlots";
import { createModule } from "../di";
import { DI_TOKENS } from "../tokens";
@@ -1,5 +1,5 @@
import i18nMock from "../../../../../../tests/libs/__mocks__/libServerI18n";
import prismaMock from "../../../../../../tests/libs/__mocks__/prismaMock";
import i18nMock from "../../../tests/libs/__mocks__/libServerI18n";
import prismaMock from "../../../tests/libs/__mocks__/prismaMock";
import { vi, describe, it, beforeAll, afterAll, expect, beforeEach, afterEach } from "vitest";
+1 -1
View File
@@ -2,7 +2,7 @@ import { FilterHostsService } from "@calcom/features/bookings/lib/host-filtering
import { QualifiedHostsService } from "@calcom/features/bookings/lib/host-filtering/findQualifiedHostsWithDelegationCredentials";
import { BusyTimesService } from "@calcom/features/busyTimes/services/getBusyTimes";
import { validateRoundRobinSlotAvailability } from "@calcom/features/ee/round-robin/utils/validateRoundRobinSlotAvailability";
import { NoSlotsNotificationService } from "@calcom/trpc/server/routers/viewer/slots/handleNotificationWhenNoSlots";
import { NoSlotsNotificationService } from "@calcom/features/slots/handleNotificationWhenNoSlots";
import { AvailableSlotsService } from "@calcom/trpc/server/routers/viewer/slots/util";
export { AvailableSlotsService };
@@ -58,7 +58,7 @@ import type { CredentialForCalendarService } from "@calcom/types/Credential";
import { TRPCError } from "@trpc/server";
import type { TGetScheduleInputSchema } from "./getSchedule.schema";
import type { NoSlotsNotificationService } from "./handleNotificationWhenNoSlots";
import type { NoSlotsNotificationService } from "@calcom/features/slots/handleNotificationWhenNoSlots";
import type { GetScheduleOptions } from "./types";
const log = logger.getSubLogger({ prefix: ["[slots/util]"] });