Skip to content

Scheduling infrastructure for absolutely everyone.

refactor: Move @calcom/core to @calcom/lib (#19655)

Keith Williams7180eb067a6c
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index f7b9b690089..d264a8530ba 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -12,9 +12,9 @@
/packages/app-store/larkcalendar/**/* @calcom/Foundation
/packages/app-store/office365calendar/**/* @calcom/Foundation
/packages/app-store/zohocalendar/**/* @calcom/Foundation
-/packages/core/getAggregatedAvailability.ts @calcom/Foundation
-/packages/core/getUserAvailability.ts @calcom/Foundation
/packages/features/bookings/lib/**/* @calcom/Foundation
+/packages/lib/getAggregatedAvailability.ts @calcom/Foundation
+/packages/lib/getUserAvailability.ts @calcom/Foundation
/packages/lib/server/getLuckyUser.ts @calcom/Foundation
/packages/lib/slots.ts @calcom/Foundation
/packages/platform/**/* @calcom/Platform
diff --git a/apps/api/v1/next.config.js b/apps/api/v1/next.config.js
index 289dfbb9e80..e58eba76c77 100644
--- a/apps/api/v1/next.config.js
+++ b/apps/api/v1/next.config.js
@@ -10,7 +10,6 @@ const nextConfig = {
},
transpilePackages: [
"@calcom/app-store",
- "@calcom/core",
"@calcom/dayjs",
"@calcom/emails",
"@calcom/features",
diff --git a/apps/api/v1/package.json b/apps/api/v1/package.json
index 8546d248a6c..e94c67a0cef 100644
--- a/apps/api/v1/package.json
+++ b/apps/api/v1/package.json
@@ -24,7 +24,6 @@
},
"dependencies": {
"@calcom/app-store": "*",
- "@calcom/core": "*",
"@calcom/dayjs": "*",
"@calcom/emails": "*",
"@calcom/features": "*",
diff --git a/apps/api/v1/pages/api/availability/_get.ts b/apps/api/v1/pages/api/availability/_get.ts
index 2839cf9253c..28567dc387a 100644
--- a/apps/api/v1/pages/api/availability/_get.ts
+++ b/apps/api/v1/pages/api/availability/_get.ts
@@ -1,7 +1,7 @@
import type { NextApiRequest } from "next";
import { z } from "zod";
-import { getUserAvailability } from "@calcom/core/getUserAvailability";
+import { getUserAvailability } from "@calcom/lib/getUserAvailability";
import { HttpError } from "@calcom/lib/http-error";
import { defaultResponder } from "@calcom/lib/server/defaultResponder";
import prisma from "@calcom/prisma";
diff --git a/apps/api/v1/pages/api/bookings/[id]/recordings/_get.ts b/apps/api/v1/pages/api/bookings/[id]/recordings/_get.ts
index acfd0609acc..7aee663c877 100644
--- a/apps/api/v1/pages/api/bookings/[id]/recordings/_get.ts
+++ b/apps/api/v1/pages/api/bookings/[id]/recordings/_get.ts
@@ -1,9 +1,11 @@
import type { NextApiRequest } from "next";
-import { getRecordingsOfCalVideoByRoomName } from "@calcom/core/videoClient";
-import { getDownloadLinkOfCalVideoByRecordingId } from "@calcom/core/videoClient";
import { HttpError } from "@calcom/lib/http-error";
import { defaultResponder } from "@calcom/lib/server/defaultResponder";
+import {
+ getRecordingsOfCalVideoByRoomName,
+ getDownloadLinkOfCalVideoByRecordingId,
+} from "@calcom/lib/videoClient";
import prisma from "@calcom/prisma";
import type { RecordingItemSchema } from "@calcom/prisma/zod-utils";
import type { PartialReference } from "@calcom/types/EventManager";
diff --git a/apps/api/v1/pages/api/bookings/[id]/transcripts/[recordingId]/_get.ts b/apps/api/v1/pages/api/bookings/[id]/transcripts/[recordingId]/_get.ts
index b5cf739664d..9cf5c2e30b7 100644
--- a/apps/api/v1/pages/api/bookings/[id]/transcripts/[recordingId]/_get.ts
+++ b/apps/api/v1/pages/api/bookings/[id]/transcripts/[recordingId]/_get.ts
@@ -1,11 +1,11 @@
import type { NextApiRequest } from "next";
+import { HttpError } from "@calcom/lib/http-error";
+import { defaultResponder } from "@calcom/lib/server/defaultResponder";
import {
getTranscriptsAccessLinkFromRecordingId,
checkIfRoomNameMatchesInRecording,
-} from "@calcom/core/videoClient";
-import { HttpError } from "@calcom/lib/http-error";
-import { defaultResponder } from "@calcom/lib/server/defaultResponder";
+} from "@calcom/lib/videoClient";
import prisma from "@calcom/prisma";
import type { PartialReference } from "@calcom/types/EventManager";
diff --git a/apps/api/v1/pages/api/bookings/[id]/transcripts/_get.ts b/apps/api/v1/pages/api/bookings/[id]/transcripts/_get.ts
index 88e6d3ac82a..821f2ec2f21 100644
--- a/apps/api/v1/pages/api/bookings/[id]/transcripts/_get.ts
+++ b/apps/api/v1/pages/api/bookings/[id]/transcripts/_get.ts
@@ -1,8 +1,8 @@
import type { NextApiRequest } from "next";
-import { getAllTranscriptsAccessLinkFromRoomName } from "@calcom/core/videoClient";
import { HttpError } from "@calcom/lib/http-error";
import { defaultResponder } from "@calcom/lib/server/defaultResponder";
+import { getAllTranscriptsAccessLinkFromRoomName } from "@calcom/lib/videoClient";
import prisma from "@calcom/prisma";
import type { PartialReference } from "@calcom/types/EventManager";
diff --git a/apps/api/v1/pages/api/destination-calendars/[id]/_patch.ts b/apps/api/v1/pages/api/destination-calendars/[id]/_patch.ts
index 965790f130e..c23d8b151be 100644
--- a/apps/api/v1/pages/api/destination-calendars/[id]/_patch.ts
+++ b/apps/api/v1/pages/api/destination-calendars/[id]/_patch.ts
@@ -2,7 +2,7 @@ import type { Prisma } from "@prisma/client";
import type { NextApiRequest } from "next";
import type { z } from "zod";
-import { getCalendarCredentialsWithoutDwd, getConnectedCalendars } from "@calcom/core/CalendarManager";
+import { getCalendarCredentialsWithoutDwd, getConnectedCalendars } from "@calcom/lib/CalendarManager";
import { HttpError } from "@calcom/lib/http-error";
import { defaultResponder } from "@calcom/lib/server/defaultResponder";
import prisma from "@calcom/prisma";
diff --git a/apps/api/v1/pages/api/destination-calendars/_post.ts b/apps/api/v1/pages/api/destination-calendars/_post.ts
index 5875efedb50..06a133c4bc0 100644
--- a/apps/api/v1/pages/api/destination-calendars/_post.ts
+++ b/apps/api/v1/pages/api/destination-calendars/_post.ts
@@ -1,6 +1,6 @@
import type { NextApiRequest } from "next";
-import { getCalendarCredentialsWithoutDwd, getConnectedCalendars } from "@calcom/core/CalendarManager";
+import { getCalendarCredentialsWithoutDwd, getConnectedCalendars } from "@calcom/lib/CalendarManager";
import { HttpError } from "@calcom/lib/http-error";
import { defaultResponder } from "@calcom/lib/server/defaultResponder";
import prisma from "@calcom/prisma";
diff --git a/apps/api/v1/test/lib/bookings/[id]/recordings/_get.test.ts b/apps/api/v1/test/lib/bookings/[id]/recordings/_get.test.ts
index 7a0cc731bd9..2e241fcb88c 100644
--- a/apps/api/v1/test/lib/bookings/[id]/recordings/_get.test.ts
+++ b/apps/api/v1/test/lib/bookings/[id]/recordings/_get.test.ts
@@ -5,11 +5,11 @@ import type { NextApiRequest, NextApiResponse } from "next";
import { createMocks } from "node-mocks-http";
import { describe, expect, test, vi, afterEach } from "vitest";
+import { buildBooking } from "@calcom/lib/test/builder";
import {
getRecordingsOfCalVideoByRoomName,
getDownloadLinkOfCalVideoByRecordingId,
-} from "@calcom/core/videoClient";
-import { buildBooking } from "@calcom/lib/test/builder";
+} from "@calcom/lib/videoClient";
import { getAccessibleUsers } from "~/lib/utils/retrieveScopedAccessibleUsers";
@@ -22,7 +22,7 @@ type CustomNextApiResponse = NextApiResponse & Response;
const adminUserId = 1;
const memberUserId = 10;
-vi.mock("@calcom/core/videoClient", () => {
+vi.mock("@calcom/lib/videoClient", () => {
return {
getRecordingsOfCalVideoByRoomName: vi.fn(),
getDownloadLinkOfCalVideoByRecordingId: vi.fn(),
diff --git a/apps/api/v1/test/lib/bookings/[id]/transcripts/[recordingId]/_get.test.ts b/apps/api/v1/test/lib/bookings/[id]/transcripts/[recordingId]/_get.test.ts
index c6320fc9e71..8d865ceda59 100644
--- a/apps/api/v1/test/lib/bookings/[id]/transcripts/[recordingId]/_get.test.ts
+++ b/apps/api/v1/test/lib/bookings/[id]/transcripts/[recordingId]/_get.test.ts
@@ -5,11 +5,11 @@ import type { NextApiRequest, NextApiResponse } from "next";
import { createMocks } from "node-mocks-http";
import { describe, expect, test, vi, afterEach } from "vitest";
+import { buildBooking } from "@calcom/lib/test/builder";
import {
getTranscriptsAccessLinkFromRecordingId,
checkIfRoomNameMatchesInRecording,
-} from "@calcom/core/videoClient";
-import { buildBooking } from "@calcom/lib/test/builder";
+} from "@calcom/lib/videoClient";
import { getAccessibleUsers } from "~/lib/utils/retrieveScopedAccessibleUsers";
@@ -19,7 +19,7 @@ import handler from "../../../../../../pages/api/bookings/[id]/transcripts/[reco
type CustomNextApiRequest = NextApiRequest & Request;
type CustomNextApiResponse = NextApiResponse & Response;
-vi.mock("@calcom/core/videoClient", () => {
+vi.mock("@calcom/lib/videoClient", () => {
return {
getTranscriptsAccessLinkFromRecordingId: vi.fn(),
checkIfRoomNameMatchesInRecording: vi.fn(),
diff --git a/apps/api/v1/test/lib/bookings/[id]/transcripts/_get.test.ts b/apps/api/v1/test/lib/bookings/[id]/transcripts/_get.test.ts
index a821935bd85..49fb9d33fbb 100644
--- a/apps/api/v1/test/lib/bookings/[id]/transcripts/_get.test.ts
+++ b/apps/api/v1/test/lib/bookings/[id]/transcripts/_get.test.ts
@@ -5,8 +5,8 @@ import type { NextApiRequest, NextApiResponse } from "next";
import { createMocks } from "node-mocks-http";
import { describe, expect, test, vi, afterEach } from "vitest";
-import { getAllTranscriptsAccessLinkFromRoomName } from "@calcom/core/videoClient";
import { buildBooking } from "@calcom/lib/test/builder";
+import { getAllTranscriptsAccessLinkFromRoomName } from "@calcom/lib/videoClient";
import { getAccessibleUsers } from "~/lib/utils/retrieveScopedAccessibleUsers";
@@ -16,7 +16,7 @@ import handler from "../../../../../pages/api/bookings/[id]/transcripts/_get";
type CustomNextApiRequest = NextApiRequest & Request;
type CustomNextApiResponse = NextApiResponse & Response;
-vi.mock("@calcom/core/videoClient", () => {
+vi.mock("@calcom/lib/videoClient", () => {
return {
getAllTranscriptsAccessLinkFromRoomName: vi.fn(),
};
diff --git a/apps/api/v2/src/ee/calendars/services/calendars.service.ts b/apps/api/v2/src/ee/calendars/services/calendars.service.ts
index 2f8018bb7c7..ef07970547f 100644
--- a/apps/api/v2/src/ee/calendars/services/calendars.service.ts
+++ b/apps/api/v2/src/ee/calendars/services/calendars.service.ts
@@ -88,6 +88,7 @@ export class CalendarsService {
dateTo,
composedSelectedCalendars
);
+ // @ts-expect-error Element implicitly has any type
const calendarBusyTimesConverted = calendarBusyTimes.map((busyTime) => {
const busyTimeStart = DateTime.fromJSDate(new Date(busyTime.start)).setZone(timezone);
const busyTimeEnd = DateTime.fromJSDate(new Date(busyTime.end)).setZone(timezone);
diff --git a/apps/web/app/api/availability/calendar/route.ts b/apps/web/app/api/availability/calendar/route.ts
index 796b0ce2f3b..06bb7aa1f03 100644
--- a/apps/web/app/api/availability/calendar/route.ts
+++ b/apps/web/app/api/availability/calendar/route.ts
@@ -3,9 +3,9 @@ import type { NextRequest } from "next/server";
import { NextResponse } from "next/server";
import { z } from "zod";
-import { getCalendarCredentials, getConnectedCalendars } from "@calcom/core/CalendarManager";
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
import { CalendarCache } from "@calcom/features/calendar-cache/calendar-cache";
+import { getCalendarCredentials, getConnectedCalendars } from "@calcom/lib/CalendarManager";
import { HttpError } from "@calcom/lib/http-error";
import notEmpty from "@calcom/lib/notEmpty";
import { SelectedCalendarRepository } from "@calcom/lib/server/repository/selectedCalendar";
diff --git a/apps/web/components/apps/installation/ConfigureStepCard.tsx b/apps/web/components/apps/installation/ConfigureStepCard.tsx
index 1df0c1490b5..11b690eb928 100644
--- a/apps/web/components/apps/installation/ConfigureStepCard.tsx
+++ b/apps/web/components/apps/installation/ConfigureStepCard.tsx
@@ -7,9 +7,9 @@ import { useFieldArray, useFormContext } from "react-hook-form";
import { useForm } from "react-hook-form";
import { z } from "zod";
-import type { LocationObject } from "@calcom/core/location";
import { locationsResolver } from "@calcom/lib/event-types/utils/locationsResolver";
import { useLocale } from "@calcom/lib/hooks/useLocale";
+import type { LocationObject } from "@calcom/lib/location";
import type { AppCategories } from "@calcom/prisma/enums";
import type { EventTypeMetaDataSchema, eventTypeBookingFields } from "@calcom/prisma/zod-utils";
import { Button, Form, Icon, Avatar } from "@calcom/ui";
diff --git a/apps/web/lib/apps/installation/[[...step]]/getServerSideProps.ts b/apps/web/lib/apps/installation/[[...step]]/getServerSideProps.ts
index 43b0745fd15..d308f18ec2f 100644
--- a/apps/web/lib/apps/installation/[[...step]]/getServerSideProps.ts
+++ b/apps/web/lib/apps/installation/[[...step]]/getServerSideProps.ts
@@ -5,12 +5,12 @@ import { z } from "zod";
import { appStoreMetadata } from "@calcom/app-store/appStoreMetaData";
import { isConferencing as isConferencingApp } from "@calcom/app-store/utils";
-import type { LocationObject } from "@calcom/core/location";
import { getLocale } from "@calcom/features/auth/lib/getLocale";
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
import { AppOnboardingSteps } from "@calcom/lib/apps/appOnboardingSteps";
import { CAL_URL } from "@calcom/lib/constants";
import { getPlaceholderAvatar } from "@calcom/lib/defaultAvatarImage";
+import type { LocationObject } from "@calcom/lib/location";
import { UserRepository } from "@calcom/lib/server/repository/user";
import prisma from "@calcom/prisma";
import { eventTypeBookingFields } from "@calcom/prisma/zod-utils";
diff --git a/apps/web/lib/daily-webhook/tests/recorded-daily-video.test.ts b/apps/web/lib/daily-webhook/tests/recorded-daily-video.test.ts
index ce072d175d6..36d9c1be78d 100644
--- a/apps/web/lib/daily-webhook/tests/recorded-daily-video.test.ts
+++ b/apps/web/lib/daily-webhook/tests/recorded-daily-video.test.ts
@@ -16,7 +16,7 @@ import { describe, afterEach, test, vi, beforeEach, beforeAll } from "vitest";
import { appStoreMetadata } from "@calcom/app-store/apps.metadata.generated";
import { getRoomNameFromRecordingId, getBatchProcessorJobAccessLink } from "@calcom/app-store/dailyvideo/lib";
-import { getDownloadLinkOfCalVideoByRecordingId } from "@calcom/core/videoClient";
+import { getDownloadLinkOfCalVideoByRecordingId } from "@calcom/lib/videoClient";
import prisma from "@calcom/prisma";
import { WebhookTriggerEvents } from "@calcom/prisma/enums";
import { BookingStatus } from "@calcom/prisma/enums";
@@ -37,7 +37,7 @@ vi.mock("@calcom/app-store/dailyvideo/lib", () => {
};
});
-vi.mock("@calcom/core/videoClient", () => {
+vi.mock("@calcom/lib/videoClient", () => {
return {
getDownloadLinkOfCalVideoByRecordingId: vi.fn(),
};
diff --git a/apps/web/modules/apps/installation/[[...step]]/step-view.tsx b/apps/web/modules/apps/installation/[[...step]]/step-view.tsx
index e18eb3ad3dc..a00d8bb5060 100644
--- a/apps/web/modules/apps/installation/[[...step]]/step-view.tsx
+++ b/apps/web/modules/apps/installation/[[...step]]/step-view.tsx
@@ -9,12 +9,12 @@ import type { z } from "zod";
import checkForMultiplePaymentApps from "@calcom/app-store/_utils/payments/checkForMultiplePaymentApps";
import useAddAppMutation from "@calcom/app-store/_utils/useAddAppMutation";
import type { EventTypeAppSettingsComponentProps, EventTypeModel } from "@calcom/app-store/types";
-import type { LocationObject } from "@calcom/core/location";
import type { LocationFormValues } from "@calcom/features/eventtypes/lib/types";
import { AppOnboardingSteps } from "@calcom/lib/apps/appOnboardingSteps";
import { getAppOnboardingUrl } from "@calcom/lib/apps/getAppOnboardingUrl";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
+import type { LocationObject } from "@calcom/lib/location";
import type { Team } from "@calcom/prisma/client";
import type { eventTypeBookingFields } from "@calcom/prisma/zod-utils";
import { eventTypeMetaDataSchemaWithTypedApps } from "@calcom/prisma/zod-utils";
diff --git a/apps/web/modules/bookings/views/bookings-single-view.tsx b/apps/web/modules/bookings/views/bookings-single-view.tsx
index 2455aad2730..bbb777b2f0f 100644
--- a/apps/web/modules/bookings/views/bookings-single-view.tsx
+++ b/apps/web/modules/bookings/views/bookings-single-view.tsx
@@ -15,8 +15,6 @@ import BookingPageTagManager from "@calcom/app-store/BookingPageTagManager";
import type { getEventLocationValue } from "@calcom/app-store/locations";
import { getSuccessPageLocationMessage, guessEventLocationType } from "@calcom/app-store/locations";
import { getEventTypeAppData } from "@calcom/app-store/utils";
-import type { nameObjectSchema } from "@calcom/core/event";
-import { getEventName } from "@calcom/core/event";
import type { ConfigType } from "@calcom/dayjs";
import dayjs from "@calcom/dayjs";
import {
@@ -36,6 +34,8 @@ import {
formatToLocalizedTime,
formatToLocalizedTimezone,
} from "@calcom/lib/date-fns";
+import type { nameObjectSchema } from "@calcom/lib/event";
+import { getEventName } from "@calcom/lib/event";
import useGetBrandingColours from "@calcom/lib/getBrandColours";
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
import { useLocale } from "@calcom/lib/hooks/useLocale";
diff --git a/apps/web/modules/test-setup.ts b/apps/web/modules/test-setup.ts
index 32524c982e8..3027d7e0b89 100644
--- a/apps/web/modules/test-setup.ts
+++ b/apps/web/modules/test-setup.ts
@@ -35,7 +35,7 @@ vi.mock("@calcom/app-store/utils", () => ({
getEventTypeAppData: vi.fn(),
}));
-vi.mock("@calcom/core/event", () => ({
+vi.mock("@calcom/lib/event", () => ({
getEventName: vi.fn(),
}));
diff --git a/apps/web/next.config.js b/apps/web/next.config.js
index 4ce4cbeafc2..46bd0e145e6 100644
--- a/apps/web/next.config.js
+++ b/apps/web/next.config.js
@@ -201,7 +201,6 @@ const nextConfig = {
},
transpilePackages: [
"@calcom/app-store",
- "@calcom/core",
"@calcom/dayjs",
"@calcom/emails",
"@calcom/embed-core",
diff --git a/apps/web/package.json b/apps/web/package.json
index 9f63510528f..35fd14f76a4 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -30,7 +30,6 @@
"@boxyhq/saml-jackson": "1.18.6",
"@calcom/app-store": "*",
"@calcom/app-store-cli": "*",
- "@calcom/core": "*",
"@calcom/dayjs": "*",
"@calcom/embed-core": "workspace:*",
"@calcom/embed-react": "workspace:*",
diff --git a/apps/web/pages/api/recorded-daily-video.ts b/apps/web/pages/api/recorded-daily-video.ts
index 3d583a0ecce..0df77a22420 100644
--- a/apps/web/pages/api/recorded-daily-video.ts
+++ b/apps/web/pages/api/recorded-daily-video.ts
@@ -2,11 +2,6 @@ import { createHmac } from "crypto";
import type { NextApiRequest, NextApiResponse } from "next";
import { getRoomNameFromRecordingId, getBatchProcessorJobAccessLink } from "@calcom/app-store/dailyvideo/lib";
-import {
- getDownloadLinkOfCalVideoByRecordingId,
- submitBatchProcessorTranscriptionJob,
-} from "@calcom/core/videoClient";
-import { getAllTranscriptsAccessLinkFromMeetingId } from "@calcom/core/videoClient";
import { sendDailyVideoRecordingEmails } from "@calcom/emails";
import { sendDailyVideoTranscriptEmails } from "@calcom/emails";
import { getTeamIdFromEventType } from "@calcom/lib/getTeamIdFromEventType";
@@ -14,6 +9,11 @@ import { HttpError } from "@calcom/lib/http-error";
import logger from "@calcom/lib/logger";
import { safeStringify } from "@calcom/lib/safeStringify";
import { defaultHandler } from "@calcom/lib/server/defaultHandler";
+import {
+ getAllTranscriptsAccessLinkFromMeetingId,
+ getDownloadLinkOfCalVideoByRecordingId,
+ submitBatchProcessorTranscriptionJob,
+} from "@calcom/lib/videoClient";
import prisma from "@calcom/prisma";
import { getBooking } from "@calcom/web/lib/daily-webhook/getBooking";
import { getBookingReference } from "@calcom/web/lib/daily-webhook/getBookingReference";
diff --git a/packages/app-store/_utils/CRMRoundRobinSkip.ts b/packages/app-store/_utils/CRMRoundRobinSkip.ts
index 6c44bfef5ba..3a77ee025fa 100644
--- a/packages/app-store/_utils/CRMRoundRobinSkip.ts
+++ b/packages/app-store/_utils/CRMRoundRobinSkip.ts
@@ -1,7 +1,7 @@
import type { Prisma } from "@prisma/client";
import type { z } from "zod";
-import CrmManager from "@calcom/core/crmManager/crmManager";
+import CrmManager from "@calcom/lib/crmManager/crmManager";
import logger from "@calcom/lib/logger";
import { prisma } from "@calcom/prisma";
import type { EventTypeAppMetadataSchema } from "@calcom/prisma/zod-utils";
diff --git a/packages/app-store/caldavcalendar/package.json b/packages/app-store/caldavcalendar/package.json
index 01a9a3ba352..e9304fe54ec 100644
--- a/packages/app-store/caldavcalendar/package.json
+++ b/packages/app-store/caldavcalendar/package.json
@@ -6,7 +6,6 @@
"main": "./index.ts",
"description": "Caldav is a protocol that allows different clients/servers to access scheduling information on remote servers as well as schedule meetings with other users on the same server or other servers. It extends WebDAV specification and uses iCalendar format for the data.",
"dependencies": {
- "@calcom/core": "*",
"@calcom/lib": "*",
"@calcom/prisma": "*",
"@calcom/ui": "*",
diff --git a/packages/app-store/exchange2013calendar/package.json b/packages/app-store/exchange2013calendar/package.json
index 2cbf1ea02f2..ed4eaf9889f 100644
--- a/packages/app-store/exchange2013calendar/package.json
+++ b/packages/app-store/exchange2013calendar/package.json
@@ -5,7 +5,6 @@
"main": "./index.ts",
"description": "For calendars hosted on on-premises Microsoft Exchange 2013 servers",
"dependencies": {
- "@calcom/core": "*",
"@calcom/lib": "*",
"@calcom/prisma": "*",
"@calcom/ui": "*",
diff --git a/packages/app-store/exchange2016calendar/package.json b/packages/app-store/exchange2016calendar/package.json
index 82122f8ae94..20f74414352 100644
--- a/packages/app-store/exchange2016calendar/package.json
+++ b/packages/app-store/exchange2016calendar/package.json
@@ -5,7 +5,6 @@
"main": "./index.ts",
"description": "For calendars hosted on on-premises Microsoft Exchange 2016 servers",
"dependencies": {
- "@calcom/core": "*",
"@calcom/lib": "*",
"@calcom/prisma": "*",
"@calcom/ui": "*",
diff --git a/packages/app-store/ics-feedcalendar/package.json b/packages/app-store/ics-feedcalendar/package.json
index f9cbd94d04d..bf089d35aea 100644
--- a/packages/app-store/ics-feedcalendar/package.json
+++ b/packages/app-store/ics-feedcalendar/package.json
@@ -5,7 +5,6 @@
"version": "0.0.0",
"main": "./index.ts",
"dependencies": {
- "@calcom/core": "*",
"@calcom/lib": "*",
"@calcom/prisma": "*",
"@calcom/ui": "*",
diff --git a/packages/app-store/salesforce/lib/CrmService.ts b/packages/app-store/salesforce/lib/CrmService.ts
index 688d8d89dd5..3f462d4b6a5 100644
--- a/packages/app-store/salesforce/lib/CrmService.ts
+++ b/packages/app-store/salesforce/lib/CrmService.ts
@@ -4,9 +4,9 @@ import { RRule } from "rrule";
import { z } from "zod";
import type { FormResponse } from "@calcom/app-store/routing-forms/types/types";
-import { RetryableError } from "@calcom/core/crmManager/errors";
import { getLocation } from "@calcom/lib/CalEventParser";
import { WEBAPP_URL } from "@calcom/lib/constants";
+import { RetryableError } from "@calcom/lib/crmManager/errors";
import { checkIfFreeEmailDomain } from "@calcom/lib/freeEmailDomainCheck/checkIfFreeEmailDomain";
import logger from "@calcom/lib/logger";
import { safeStringify } from "@calcom/lib/safeStringify";
diff --git a/packages/app-store/vital/lib/reschedule.ts b/packages/app-store/vital/lib/reschedule.ts
index e90c24e60f8..655e1051022 100644
--- a/packages/app-store/vital/lib/reschedule.ts
+++ b/packages/app-store/vital/lib/reschedule.ts
@@ -1,13 +1,13 @@
import type { Booking, BookingReference, User } from "@prisma/client";
import type { TFunction } from "next-i18next";
-import { CalendarEventBuilder } from "@calcom/core/builders/CalendarEvent/builder";
-import { CalendarEventDirector } from "@calcom/core/builders/CalendarEvent/director";
-import { deleteMeeting } from "@calcom/core/videoClient";
import dayjs from "@calcom/dayjs";
import { sendRequestRescheduleEmailAndSMS } from "@calcom/emails";
+import { CalendarEventBuilder } from "@calcom/lib/builders/CalendarEvent/builder";
+import { CalendarEventDirector } from "@calcom/lib/builders/CalendarEvent/director";
import logger from "@calcom/lib/logger";
import { getTranslation } from "@calcom/lib/server/i18n";
+import { deleteMeeting } from "@calcom/lib/videoClient";
import prisma from "@calcom/prisma";
import { BookingStatus } from "@calcom/prisma/enums";
import type { EventTypeMetadata } from "@calcom/prisma/zod-utils";
diff --git a/packages/app-store/wipemycalother/lib/reschedule.ts b/packages/app-store/wipemycalother/lib/reschedule.ts
index a0740bc0ab8..1473b3b66a1 100644
--- a/packages/app-store/wipemycalother/lib/reschedule.ts
+++ b/packages/app-store/wipemycalother/lib/reschedule.ts
@@ -1,13 +1,13 @@
import type { Booking, BookingReference, User } from "@prisma/client";
import type { TFunction } from "next-i18next";
-import { CalendarEventBuilder } from "@calcom/core/builders/CalendarEvent/builder";
-import { CalendarEventDirector } from "@calcom/core/builders/CalendarEvent/director";
-import { deleteMeeting } from "@calcom/core/videoClient";
import dayjs from "@calcom/dayjs";
import { sendRequestRescheduleEmailAndSMS } from "@calcom/emails";
+import { CalendarEventBuilder } from "@calcom/lib/builders/CalendarEvent/builder";
+import { CalendarEventDirector } from "@calcom/lib/builders/CalendarEvent/director";
import logger from "@calcom/lib/logger";
import { getTranslation } from "@calcom/lib/server/i18n";
+import { deleteMeeting } from "@calcom/lib/videoClient";
import prisma from "@calcom/prisma";
import { BookingStatus } from "@calcom/prisma/enums";
import type { EventTypeMetadata } from "@calcom/prisma/zod-utils";
diff --git a/packages/core/index.ts b/packages/core/index.ts
deleted file mode 100644
index 3f4526787aa..00000000000
--- a/packages/core/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export * from "./CalendarManager";
-export * from "./EventManager";
-export { default as getBusyTimes } from "./getBusyTimes";
-export * from "./videoClient";
diff --git a/packages/core/package.json b/packages/core/package.json
deleted file mode 100644
index c46ffee0e9b..00000000000
--- a/packages/core/package.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "name": "@calcom/core",
- "sideEffects": false,
- "description": "Cal.com core functionality",
- "version": "0.0.0",
- "private": true,
- "license": "MIT",
- "main": "./index.ts",
- "scripts": {
- "clean": "rm -rf .turbo && rm -rf node_modules"
- },
- "dependencies": {
- "@calcom/app-store": "*",
- "@calcom/dayjs": "*",
- "@calcom/lib": "*",
- "ical.js": "^1.4.0",
- "ics": "^2.37.0",
- "uuid": "^8.3.2"
- },
- "devDependencies": {
- "@calcom/tsconfig": "*",
- "@calcom/types": "*"
- }
-}
diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json
deleted file mode 100644
index 7bead360580..00000000000
--- a/packages/core/tsconfig.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "@calcom/tsconfig/base.json",
- "compilerOptions": {
- "baseUrl": ".",
- "target": "es5",
- "lib": ["dom", "dom.iterable", "esnext"]
- },
- "include": [".", "../types/*.d.ts"],
- "exclude": ["dist", "build", "node_modules"]
-}
diff --git a/packages/emails/email-manager.ts b/packages/emails/email-manager.ts
index 92794500670..25ead053666 100644
--- a/packages/emails/email-manager.ts
+++ b/packages/emails/email-manager.ts
@@ -3,9 +3,9 @@ import { cloneDeep } from "lodash";
import type { TFunction } from "next-i18next";
import type { z } from "zod";
-import type { EventNameObjectType } from "@calcom/core/event";
-import { getEventName } from "@calcom/core/event";
import type BaseEmail from "@calcom/emails/templates/_base-email";
+import type { EventNameObjectType } from "@calcom/lib/event";
+import { getEventName } from "@calcom/lib/event";
import { formatCalEvent } from "@calcom/lib/formatCalendarEvent";
import logger from "@calcom/lib/logger";
import { safeStringify } from "@calcom/lib/safeStringify";
diff --git a/packages/features/bookings/Booker/components/OutOfOfficeInSlots.tsx b/packages/features/bookings/Booker/components/OutOfOfficeInSlots.tsx
index 24b3da45836..c0a1ee7bd56 100644
--- a/packages/features/bookings/Booker/components/OutOfOfficeInSlots.tsx
+++ b/packages/features/bookings/Booker/components/OutOfOfficeInSlots.tsx
@@ -1,8 +1,8 @@
import { Trans } from "next-i18next";
import { useRouter } from "next/navigation";
-import type { IOutOfOfficeData } from "@calcom/core/getUserAvailability";
import { classNames } from "@calcom/lib";
+import type { IOutOfOfficeData } from "@calcom/lib/getUserAvailability";
import { useCompatSearchParams } from "@calcom/lib/hooks/useCompatSearchParams";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button } from "@calcom/ui";
diff --git a/packages/features/bookings/components/AvailableTimes.tsx b/packages/features/bookings/components/AvailableTimes.tsx
index f36921a6417..51ab4dc2e16 100644
--- a/packages/features/bookings/components/AvailableTimes.tsx
+++ b/packages/features/bookings/components/AvailableTimes.tsx
@@ -4,7 +4,6 @@ import { AnimatePresence, m } from "framer-motion";
import { useMemo } from "react";
import { useIsPlatform } from "@calcom/atoms/monorepo";
-import type { IOutOfOfficeData } from "@calcom/core/getUserAvailability";
import dayjs from "@calcom/dayjs";
import { OutOfOfficeInSlots } from "@calcom/features/bookings/Booker/components/OutOfOfficeInSlots";
import type { IUseBookingLoadingStates } from "@calcom/features/bookings/Booker/components/hooks/useBookings";
@@ -12,6 +11,7 @@ import type { BookerEvent } from "@calcom/features/bookings/types";
import type { Slot } from "@calcom/features/schedules";
import { classNames } from "@calcom/lib";
import { getPaymentAppData } from "@calcom/lib/getPaymentAppData";
+import type { IOutOfOfficeData } from "@calcom/lib/getUserAvailability";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { localStorage } from "@calcom/lib/webstorage";
import type { IGetAvailableSlots } from "@calcom/trpc/server/routers/viewer/slots/util";
diff --git a/packages/features/bookings/lib/conflictChecker/checkForConflicts.test.ts b/packages/features/bookings/lib/conflictChecker/checkForConflicts.test.ts
index 1d347af07c8..08c0b26ecc0 100644
--- a/packages/features/bookings/lib/conflictChecker/checkForConflicts.test.ts
+++ b/packages/features/bookings/lib/conflictChecker/checkForConflicts.test.ts
@@ -1,7 +1,7 @@
import { describe, expect, it } from "vitest";
-import type { CurrentSeats } from "@calcom/core/getUserAvailability";
import dayjs from "@calcom/dayjs";
+import type { CurrentSeats } from "@calcom/lib/getUserAvailability";
import type { EventBusyDate } from "@calcom/types/Calendar";
import { checkForConflicts } from "./checkForConflicts";
diff --git a/packages/features/bookings/lib/conflictChecker/checkForConflicts.ts b/packages/features/bookings/lib/conflictChecker/checkForConflicts.ts
index 6b1f14fc3ec..177e4171a75 100644
--- a/packages/features/bookings/lib/conflictChecker/checkForConflicts.ts
+++ b/packages/features/bookings/lib/conflictChecker/checkForConflicts.ts
@@ -1,7 +1,7 @@
import type { Dayjs } from "dayjs";
-import type { CurrentSeats } from "@calcom/core/getUserAvailability";
import dayjs from "@calcom/dayjs";
+import type { CurrentSeats } from "@calcom/lib/getUserAvailability";
import type { BufferedBusyTime } from "@calcom/types/BufferedBusyTime";
type BufferedBusyTimes = BufferedBusyTime[];
diff --git a/packages/features/bookings/lib/handleCancelBooking.ts b/packages/features/bookings/lib/handleCancelBooking.ts
index 203b1ebda5d..72fecf72f4f 100644
--- a/packages/features/bookings/lib/handleCancelBooking.ts
+++ b/packages/features/bookings/lib/handleCancelBooking.ts
@@ -3,7 +3,6 @@ import type { NextApiRequest } from "next";
import { FAKE_DAILY_CREDENTIAL } from "@calcom/app-store/dailyvideo/lib/VideoApiAdapter";
import { DailyLocationType } from "@calcom/app-store/locations";
-import EventManager from "@calcom/core/EventManager";
import dayjs from "@calcom/dayjs";
import { sendCancelledEmailsAndSMS } from "@calcom/emails";
import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";
@@ -15,6 +14,7 @@ import { deleteWebhookScheduledTriggers } from "@calcom/features/webhooks/lib/sc
import sendPayload from "@calcom/features/webhooks/lib/sendOrSchedulePayload";
import type { EventTypeInfo } from "@calcom/features/webhooks/lib/sendPayload";
import { isPrismaObjOrUndefined, parseRecurringEvent } from "@calcom/lib";
+import EventManager from "@calcom/lib/EventManager";
import { getBookerBaseUrl } from "@calcom/lib/getBookerUrl/server";
import getOrgIdFromMemberOrTeamId from "@calcom/lib/getOrgIdFromMemberOrTeamId";
import { getTeamIdFromEventType } from "@calcom/lib/getTeamIdFromEventType";
diff --git a/packages/features/bookings/lib/handleConfirmation.ts b/packages/features/bookings/lib/handleConfirmation.ts
index 24a59a20985..01acd9e7795 100644
--- a/packages/features/bookings/lib/handleConfirmation.ts
+++ b/packages/features/bookings/lib/handleConfirmation.ts
@@ -1,7 +1,5 @@
import type { Prisma } from "@prisma/client";
-import type { EventManagerUser } from "@calcom/core/EventManager";
-import EventManager from "@calcom/core/EventManager";
import { scheduleMandatoryReminder } from "@calcom/ee/workflows/lib/reminders/scheduleMandatoryReminder";
import { sendScheduledEmailsAndSMS } from "@calcom/emails";
import {
@@ -15,6 +13,8 @@ import { scheduleTrigger } from "@calcom/features/webhooks/lib/scheduleTrigger";
import sendPayload from "@calcom/features/webhooks/lib/sendOrSchedulePayload";
import type { EventPayloadType, EventTypeInfo } from "@calcom/features/webhooks/lib/sendPayload";
import { getVideoCallUrlFromCalEvent } from "@calcom/lib/CalEventParser";
+import type { EventManagerUser } from "@calcom/lib/EventManager";
+import EventManager from "@calcom/lib/EventManager";
import { getBookerBaseUrl } from "@calcom/lib/getBookerUrl/server";
import getOrgIdFromMemberOrTeamId from "@calcom/lib/getOrgIdFromMemberOrTeamId";
import { getTeamIdFromEventType } from "@calcom/lib/getTeamIdFromEventType";
diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.ts
index b0f8c2ab9ee..5ebf5b5719b 100644
--- a/packages/features/bookings/lib/handleNewBooking.ts
+++ b/packages/features/bookings/lib/handleNewBooking.ts
@@ -13,9 +13,6 @@ import {
OrganizerDefaultConferencingAppType,
} from "@calcom/app-store/locations";
import { getAppFromSlug } from "@calcom/app-store/utils";
-import EventManager from "@calcom/core/EventManager";
-import { getEventName } from "@calcom/core/event";
-import monitorCallbackAsync from "@calcom/core/sentryWrapper";
import dayjs from "@calcom/dayjs";
import { scheduleMandatoryReminder } from "@calcom/ee/workflows/lib/reminders/scheduleMandatoryReminder";
import {
@@ -47,6 +44,7 @@ import {
scheduleTrigger,
} from "@calcom/features/webhooks/lib/scheduleTrigger";
import { getVideoCallUrlFromCalEvent } from "@calcom/lib/CalEventParser";
+import EventManager from "@calcom/lib/EventManager";
import { shouldIgnoreContactOwner } from "@calcom/lib/bookings/routing/utils";
import { getDefaultEvent, getUsernameList } from "@calcom/lib/defaultEvents";
import {
@@ -55,6 +53,7 @@ import {
} from "@calcom/lib/domainWideDelegation/server";
import { ErrorCode } from "@calcom/lib/errorCodes";
import { getErrorFromUnknown } from "@calcom/lib/errors";
+import { getEventName } from "@calcom/lib/event";
import { extractBaseEmail } from "@calcom/lib/extract-base-email";
import { getBookerBaseUrl } from "@calcom/lib/getBookerUrl/server";
import getOrgIdFromMemberOrTeamId from "@calcom/lib/getOrgIdFromMemberOrTeamId";
@@ -65,6 +64,7 @@ import logger from "@calcom/lib/logger";
import { handlePayment } from "@calcom/lib/payment/handlePayment";
import { getPiiFreeCalendarEvent, getPiiFreeEventType } from "@calcom/lib/piiFreeData";
import { safeStringify } from "@calcom/lib/safeStringify";
+import monitorCallbackAsync from "@calcom/lib/sentryWrapper";
import { getLuckyUser } from "@calcom/lib/server/getLuckyUser";
import { getTranslation } from "@calcom/lib/server/i18n";
import { WorkflowRepository } from "@calcom/lib/server/repository/workflow";
diff --git a/packages/features/bookings/lib/handleNewBooking/ensureAvailableUsers.ts b/packages/features/bookings/lib/handleNewBooking/ensureAvailableUsers.ts
index db1527cc514..4163b998254 100644
--- a/packages/features/bookings/lib/handleNewBooking/ensureAvailableUsers.ts
+++ b/packages/features/bookings/lib/handleNewBooking/ensureAvailableUsers.ts
@@ -1,12 +1,12 @@
import type { Logger } from "tslog";
-import { getBusyTimesForLimitChecks } from "@calcom/core/getBusyTimes";
-import { getUsersAvailability } from "@calcom/core/getUserAvailability";
import dayjs from "@calcom/dayjs";
import type { Dayjs } from "@calcom/dayjs";
import { checkForConflicts } from "@calcom/features/bookings/lib/conflictChecker/checkForConflicts";
import { parseBookingLimit, parseDurationLimit } from "@calcom/lib";
import { ErrorCode } from "@calcom/lib/errorCodes";
+import { getBusyTimesForLimitChecks } from "@calcom/lib/getBusyTimes";
+import { getUsersAvailability } from "@calcom/lib/getUserAvailability";
import { getPiiFreeUser } from "@calcom/lib/piiFreeData";
import { safeStringify } from "@calcom/lib/safeStringify";
diff --git a/packages/features/bookings/lib/handleSeats/cancel/cancelAttendeeSeat.ts b/packages/features/bookings/lib/handleSeats/cancel/cancelAttendeeSeat.ts
index 4a14b91efab..9a8e87691d1 100644
--- a/packages/features/bookings/lib/handleSeats/cancel/cancelAttendeeSeat.ts
+++ b/packages/features/bookings/lib/handleSeats/cancel/cancelAttendeeSeat.ts
@@ -1,7 +1,6 @@
import type { NextApiRequest } from "next";
import { getCalendar } from "@calcom/app-store/_utils/getCalendar";
-import { updateMeeting } from "@calcom/core/videoClient";
import { sendCancelledSeatEmailsAndSMS } from "@calcom/emails";
import sendPayload from "@calcom/features/webhooks/lib/sendOrSchedulePayload";
import type { EventPayloadType, EventTypeInfo } from "@calcom/features/webhooks/lib/sendPayload";
@@ -12,6 +11,7 @@ import logger from "@calcom/lib/logger";
import { safeStringify } from "@calcom/lib/safeStringify";
import { getTranslation } from "@calcom/lib/server/i18n";
import { WorkflowRepository } from "@calcom/lib/server/repository/workflow";
+import { updateMeeting } from "@calcom/lib/videoClient";
import prisma from "@calcom/prisma";
import { WebhookTriggerEvents } from "@calcom/prisma/enums";
import { bookingCancelAttendeeSeatSchema } from "@calcom/prisma/zod-utils";
diff --git a/packages/features/bookings/lib/handleSeats/create/createNewSeat.ts b/packages/features/bookings/lib/handleSeats/create/createNewSeat.ts
index 0905d865ed7..1161a355000 100644
--- a/packages/features/bookings/lib/handleSeats/create/createNewSeat.ts
+++ b/packages/features/bookings/lib/handleSeats/create/createNewSeat.ts
@@ -2,13 +2,13 @@
import { cloneDeep } from "lodash";
import { uuid } from "short-uuid";
-import EventManager from "@calcom/core/EventManager";
import { sendScheduledSeatsEmailsAndSMS } from "@calcom/emails";
import { refreshCredentials } from "@calcom/features/bookings/lib/getAllCredentialsForUsersOnEvent/refreshCredentials";
import {
allowDisablingAttendeeConfirmationEmails,
allowDisablingHostConfirmationEmails,
} from "@calcom/features/ee/workflows/lib/allowDisablingStandardEmails";
+import EventManager from "@calcom/lib/EventManager";
import { ErrorCode } from "@calcom/lib/errorCodes";
import { HttpError } from "@calcom/lib/http-error";
import { handlePayment } from "@calcom/lib/payment/handlePayment";
diff --git a/packages/features/bookings/lib/handleSeats/lib/lastAttendeeDeleteBooking.ts b/packages/features/bookings/lib/handleSeats/lib/lastAttendeeDeleteBooking.ts
index 97c22aac0b2..a969e2494d5 100644
--- a/packages/features/bookings/lib/handleSeats/lib/lastAttendeeDeleteBooking.ts
+++ b/packages/features/bookings/lib/handleSeats/lib/lastAttendeeDeleteBooking.ts
@@ -2,9 +2,9 @@ import type { Attendee } from "@prisma/client";
// eslint-disable-next-line no-restricted-imports
import { getCalendar } from "@calcom/app-store/_utils/getCalendar";
-import { deleteMeeting } from "@calcom/core/videoClient";
import { getAllDwdCredentialsForUser } from "@calcom/lib/domainWideDelegation/server";
import { getDwdOrFindRegularCredential } from "@calcom/lib/domainWideDelegation/server";
+import { deleteMeeting } from "@calcom/lib/videoClient";
import prisma from "@calcom/prisma";
import { BookingStatus } from "@calcom/prisma/enums";
import type { CalendarEvent } from "@calcom/types/Calendar";
diff --git a/packages/features/bookings/lib/handleSeats/reschedule/attendee/attendeeRescheduleSeatedBooking.ts b/packages/features/bookings/lib/handleSeats/reschedule/attendee/attendeeRescheduleSeatedBooking.ts
index 14a75509714..023ce6f0684 100644
--- a/packages/features/bookings/lib/handleSeats/reschedule/attendee/attendeeRescheduleSeatedBooking.ts
+++ b/packages/features/bookings/lib/handleSeats/reschedule/attendee/attendeeRescheduleSeatedBooking.ts
@@ -1,8 +1,8 @@
// eslint-disable-next-line no-restricted-imports
import { cloneDeep } from "lodash";
-import type EventManager from "@calcom/core/EventManager";
import { sendRescheduledSeatEmailAndSMS } from "@calcom/emails";
+import type EventManager from "@calcom/lib/EventManager";
import { getTranslation } from "@calcom/lib/server/i18n";
import prisma from "@calcom/prisma";
import type { Person, CalendarEvent } from "@calcom/types/Calendar";
diff --git a/packages/features/bookings/lib/handleSeats/reschedule/owner/combineTwoSeatedBookings.ts b/packages/features/bookings/lib/handleSeats/reschedule/owner/combineTwoSeatedBookings.ts
index 42d0e4fc9df..e28a0a6b118 100644
--- a/packages/features/bookings/lib/handleSeats/reschedule/owner/combineTwoSeatedBookings.ts
+++ b/packages/features/bookings/lib/handleSeats/reschedule/owner/combineTwoSeatedBookings.ts
@@ -2,8 +2,8 @@
import { cloneDeep } from "lodash";
import { uuid } from "short-uuid";
-import type EventManager from "@calcom/core/EventManager";
import { sendRescheduledEmailsAndSMS } from "@calcom/emails";
+import type EventManager from "@calcom/lib/EventManager";
import { ErrorCode } from "@calcom/lib/errorCodes";
import { HttpError } from "@calcom/lib/http-error";
import prisma from "@calcom/prisma";
diff --git a/packages/features/bookings/lib/handleSeats/reschedule/owner/moveSeatedBookingToNewTimeSlot.ts b/packages/features/bookings/lib/handleSeats/reschedule/owner/moveSeatedBookingToNewTimeSlot.ts
index 5a04e20e9f6..320fb8634de 100644
--- a/packages/features/bookings/lib/handleSeats/reschedule/owner/moveSeatedBookingToNewTimeSlot.ts
+++ b/packages/features/bookings/lib/handleSeats/reschedule/owner/moveSeatedBookingToNewTimeSlot.ts
@@ -1,8 +1,8 @@
// eslint-disable-next-line no-restricted-imports
import { cloneDeep } from "lodash";
-import type EventManager from "@calcom/core/EventManager";
import { sendRescheduledEmailsAndSMS } from "@calcom/emails";
+import type EventManager from "@calcom/lib/EventManager";
import prisma from "@calcom/prisma";
import type { AdditionalInformation, AppsStatus } from "@calcom/types/Calendar";
diff --git a/packages/features/bookings/lib/handleSeats/reschedule/owner/ownerRescheduleSeatedBooking.ts b/packages/features/bookings/lib/handleSeats/reschedule/owner/ownerRescheduleSeatedBooking.ts
index d5c932fd599..317a131cef4 100644
--- a/packages/features/bookings/lib/handleSeats/reschedule/owner/ownerRescheduleSeatedBooking.ts
+++ b/packages/features/bookings/lib/handleSeats/reschedule/owner/ownerRescheduleSeatedBooking.ts
@@ -1,5 +1,5 @@
// eslint-disable-next-line no-restricted-imports
-import type EventManager from "@calcom/core/EventManager";
+import type EventManager from "@calcom/lib/EventManager";
import type { createLoggerWithEventDetails } from "../../../handleNewBooking";
import type {
diff --git a/packages/features/bookings/lib/handleSeats/reschedule/rescheduleSeatedBooking.ts b/packages/features/bookings/lib/handleSeats/reschedule/rescheduleSeatedBooking.ts
index a08b26cd79f..c861df0082a 100644
--- a/packages/features/bookings/lib/handleSeats/reschedule/rescheduleSeatedBooking.ts
+++ b/packages/features/bookings/lib/handleSeats/reschedule/rescheduleSeatedBooking.ts
@@ -1,7 +1,7 @@
// eslint-disable-next-line no-restricted-imports
-import EventManager from "@calcom/core/EventManager";
import dayjs from "@calcom/dayjs";
import { refreshCredentials } from "@calcom/features/bookings/lib/getAllCredentialsForUsersOnEvent/refreshCredentials";
+import EventManager from "@calcom/lib/EventManager";
import { HttpError } from "@calcom/lib/http-error";
import prisma from "@calcom/prisma";
import { BookingStatus } from "@calcom/prisma/enums";
diff --git a/packages/features/calendars/DatePicker.tsx b/packages/features/calendars/DatePicker.tsx
index 4588615dad8..9aae86e8975 100644
--- a/packages/features/calendars/DatePicker.tsx
+++ b/packages/features/calendars/DatePicker.tsx
@@ -1,7 +1,6 @@
import { useEffect } from "react";
import { shallow } from "zustand/shallow";
-import type { IFromUser, IToUser } from "@calcom/core/getUserAvailability";
import type { Dayjs } from "@calcom/dayjs";
import dayjs from "@calcom/dayjs";
import { useEmbedStyles } from "@calcom/embed-core/embed-iframe";
@@ -9,6 +8,7 @@ import { useBookerStore } from "@calcom/features/bookings/Booker/store";
import { getAvailableDatesInMonth } from "@calcom/features/calendars/lib/getAvailableDatesInMonth";
import classNames from "@calcom/lib/classNames";
import { daysInMonth, yyyymmdd } from "@calcom/lib/date-fns";
+import type { IFromUser, IToUser } from "@calcom/lib/getUserAvailability";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { weekdayNames } from "@calcom/lib/weekday";
import { Button, SkeletonText } from "@calcom/ui";
diff --git a/packages/features/calendars/weeklyview/types/state.ts b/packages/features/calendars/weeklyview/types/state.ts
index e9a673c6a7f..d87c66a00a0 100644
--- a/packages/features/calendars/weeklyview/types/state.ts
+++ b/packages/features/calendars/weeklyview/types/state.ts
@@ -1,4 +1,4 @@
-import type { IFromUser, IToUser } from "@calcom/core/getUserAvailability";
+import type { IFromUser, IToUser } from "@calcom/lib/getUserAvailability";
import type { TimeRange } from "@calcom/types/schedule";
import type { CalendarEvent } from "./events";
diff --git a/packages/features/credentials/handleDeleteCredential.ts b/packages/features/credentials/handleDeleteCredential.ts
index a32429e52f6..852cd323f7a 100644
--- a/packages/features/credentials/handleDeleteCredential.ts
+++ b/packages/features/credentials/handleDeleteCredential.ts
@@ -3,12 +3,12 @@ import z from "zod";
import { getCalendar } from "@calcom/app-store/_utils/getCalendar";
import { appStoreMetadata } from "@calcom/app-store/appStoreMetaData";
-import { DailyLocationType } from "@calcom/core/location";
import { sendCancelledEmailsAndSMS } from "@calcom/emails";
import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";
import { deleteWebhookScheduledTriggers } from "@calcom/features/webhooks/lib/scheduleTrigger";
import { isPrismaObjOrUndefined, parseRecurringEvent } from "@calcom/lib";
import { buildNonDwdCredential } from "@calcom/lib/domainWideDelegation/server";
+import { DailyLocationType } from "@calcom/lib/location";
import { deletePayment } from "@calcom/lib/payment/deletePayment";
import { getTranslation } from "@calcom/lib/server/i18n";
import { bookingMinimalSelect, prisma } from "@calcom/prisma";
diff --git a/packages/features/ee/payments/api/webhook.ts b/packages/features/ee/payments/api/webhook.ts
index 2be55d0fe88..7cf78ee2333 100644
--- a/packages/features/ee/payments/api/webhook.ts
+++ b/packages/features/ee/payments/api/webhook.ts
@@ -4,11 +4,11 @@ import type { NextApiRequest, NextApiResponse } from "next";
import type Stripe from "stripe";
import stripe from "@calcom/app-store/stripepayment/lib/server";
-import EventManager from "@calcom/core/EventManager";
import { sendAttendeeRequestEmailAndSMS, sendOrganizerRequestEmail } from "@calcom/emails";
import { doesBookingRequireConfirmation } from "@calcom/features/bookings/lib/doesBookingRequireConfirmation";
import { getAllCredentials } from "@calcom/features/bookings/lib/getAllCredentialsForUsersOnEvent/getAllCredentials";
import { handleConfirmation } from "@calcom/features/bookings/lib/handleConfirmation";
+import EventManager from "@calcom/lib/EventManager";
import { IS_PRODUCTION } from "@calcom/lib/constants";
import { getErrorFromUnknown } from "@calcom/lib/errors";
import { HttpError as HttpCode } from "@calcom/lib/http-error";
@@ -130,7 +130,7 @@ const webhookHandlers: Record<string, WebhookHandler | undefined> = {
/**
* @deprecated
- * We need to create a PaymentManager in `@calcom/core`
+ * We need to create a PaymentManager in `@calcom/lib`
* to prevent circular dependencies on App Store migration
*/
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
diff --git a/packages/features/ee/round-robin/handleRescheduleEventManager.ts b/packages/features/ee/round-robin/handleRescheduleEventManager.ts
index 1bd158036af..616f39e5004 100644
--- a/packages/features/ee/round-robin/handleRescheduleEventManager.ts
+++ b/packages/features/ee/round-robin/handleRescheduleEventManager.ts
@@ -3,12 +3,12 @@ import type { Prisma } from "@prisma/client";
import { metadata as GoogleMeetMetadata } from "@calcom/app-store/googlevideo/_metadata";
import { MeetLocationType } from "@calcom/app-store/locations";
-import EventManager from "@calcom/core/EventManager";
-import type { EventManagerInitParams } from "@calcom/core/EventManager";
import { getAllCredentials } from "@calcom/features/bookings/lib/getAllCredentialsForUsersOnEvent/getAllCredentials";
import type { EventType } from "@calcom/features/bookings/lib/getAllCredentialsForUsersOnEvent/getAllCredentials";
import { getVideoCallDetails } from "@calcom/features/bookings/lib/handleNewBooking/getVideoCallDetails";
import { getVideoCallUrlFromCalEvent } from "@calcom/lib/CalEventParser";
+import EventManager from "@calcom/lib/EventManager";
+import type { EventManagerInitParams } from "@calcom/lib/EventManager";
import logger from "@calcom/lib/logger";
import { getTranslation } from "@calcom/lib/server/i18n";
import { BookingReferenceRepository } from "@calcom/lib/server/repository/bookingReference";
diff --git a/packages/features/ee/round-robin/roundRobinManualReassignment.test.ts b/packages/features/ee/round-robin/roundRobinManualReassignment.test.ts
index ea8e76a68dd..9c3023c45bd 100644
--- a/packages/features/ee/round-robin/roundRobinManualReassignment.test.ts
+++ b/packages/features/ee/round-robin/roundRobinManualReassignment.test.ts
@@ -19,7 +19,7 @@ import { BookingRepository } from "@calcom/lib/server/repository/booking";
import { SchedulingType, BookingStatus, WorkflowMethods } from "@calcom/prisma/enums";
import { test } from "@calcom/web/test/fixtures/fixtures";
-vi.mock("@calcom/core/EventManager");
+vi.mock("@calcom/lib/EventManager");
const testDestinationCalendar = {
integration: "test-calendar",
@@ -59,7 +59,7 @@ describe("roundRobinManualReassignment test", () => {
test("manually reassign round robin organizer", async ({ emails }) => {
const roundRobinManualReassignment = (await import("./roundRobinManualReassignment")).default;
- const EventManager = (await import("@calcom/core/EventManager")).default;
+ const EventManager = (await import("@calcom/lib/EventManager")).default;
const eventManagerSpy = vi.spyOn(EventManager.prototype as any, "reschedule");
eventManagerSpy.mockResolvedValue({ referencesToCreate: [] });
@@ -160,7 +160,7 @@ describe("roundRobinManualReassignment test", () => {
test("Manually reassign round robin host with fixed host as organizer", async () => {
const roundRobinManualReassignment = (await import("./roundRobinManualReassignment")).default;
- const EventManager = (await import("@calcom/core/EventManager")).default;
+ const EventManager = (await import("@calcom/lib/EventManager")).default;
const eventManagerSpy = vi.spyOn(EventManager.prototype as any, "reschedule");
@@ -250,7 +250,7 @@ describe("roundRobinManualReassignment test", () => {
test("sends cancellation email to previous RR host when reassigning", async ({ emails }) => {
const roundRobinManualReassignment = (await import("./roundRobinManualReassignment")).default;
- const EventManager = (await import("@calcom/core/EventManager")).default;
+ const EventManager = (await import("@calcom/lib/EventManager")).default;
const eventManagerSpy = vi.spyOn(EventManager.prototype as any, "reschedule");
eventManagerSpy.mockResolvedValue({ referencesToCreate: [] });
diff --git a/packages/features/ee/round-robin/roundRobinManualReassignment.ts b/packages/features/ee/round-robin/roundRobinManualReassignment.ts
index d970b93c8a1..c9b1a1904a1 100644
--- a/packages/features/ee/round-robin/roundRobinManualReassignment.ts
+++ b/packages/features/ee/round-robin/roundRobinManualReassignment.ts
@@ -2,7 +2,6 @@
import { cloneDeep } from "lodash";
import { OrganizerDefaultConferencingAppType, getLocationValueForDB } from "@calcom/app-store/locations";
-import { getEventName } from "@calcom/core/event";
import dayjs from "@calcom/dayjs";
import {
sendRoundRobinCancelledEmailsAndSMS,
@@ -22,6 +21,7 @@ import { isPrismaObjOrUndefined } from "@calcom/lib";
import { getVideoCallUrlFromCalEvent } from "@calcom/lib/CalEventParser";
import { SENDER_NAME } from "@calcom/lib/constants";
import { enrichUserWithDwdCredentialsWithoutOrgId } from "@calcom/lib/domainWideDelegation/server";
+import { getEventName } from "@calcom/lib/event";
import { getBookerBaseUrl } from "@calcom/lib/getBookerUrl/server";
import logger from "@calcom/lib/logger";
import { getTranslation } from "@calcom/lib/server/i18n";
diff --git a/packages/features/ee/round-robin/roundRobinReassignment.test.ts b/packages/features/ee/round-robin/roundRobinReassignment.test.ts
index 4c3ee84d8ef..3a1a65747a5 100644
--- a/packages/features/ee/round-robin/roundRobinReassignment.test.ts
+++ b/packages/features/ee/round-robin/roundRobinReassignment.test.ts
@@ -19,7 +19,7 @@ import { BookingRepository } from "@calcom/lib/server/repository/booking";
import { SchedulingType, BookingStatus, WorkflowMethods } from "@calcom/prisma/enums";
import { test } from "@calcom/web/test/fixtures/fixtures";
-vi.mock("@calcom/core/EventManager");
+vi.mock("@calcom/lib/EventManager");
const testDestinationCalendar = {
integration: "test-calendar",
@@ -59,7 +59,7 @@ describe("roundRobinReassignment test", () => {
test("reassign new round robin organizer", async ({ emails }) => {
const roundRobinReassignment = (await import("./roundRobinReassignment")).default;
- const EventManager = (await import("@calcom/core/EventManager")).default;
+ const EventManager = (await import("@calcom/lib/EventManager")).default;
const eventManagerSpy = vi.spyOn(EventManager.prototype as any, "reschedule");
eventManagerSpy.mockResolvedValue({ referencesToCreate: [] });
@@ -190,7 +190,7 @@ describe("roundRobinReassignment test", () => {
// TODO: add fixed hosts test
test("Reassign round robin host with fixed host as organizer", async () => {
const roundRobinReassignment = (await import("./roundRobinReassignment")).default;
- const EventManager = (await import("@calcom/core/EventManager")).default;
+ const EventManager = (await import("@calcom/lib/EventManager")).default;
const eventManagerSpy = vi.spyOn(EventManager.prototype as any, "reschedule");
diff --git a/packages/features/ee/round-robin/roundRobinReassignment.ts b/packages/features/ee/round-robin/roundRobinReassignment.ts
index 6f08b994ede..2390a45239f 100644
--- a/packages/features/ee/round-robin/roundRobinReassignment.ts
+++ b/packages/features/ee/round-robin/roundRobinReassignment.ts
@@ -2,7 +2,6 @@
import { cloneDeep } from "lodash";
import { OrganizerDefaultConferencingAppType, getLocationValueForDB } from "@calcom/app-store/locations";
-import { getEventName } from "@calcom/core/event";
import dayjs from "@calcom/dayjs";
import {
sendRoundRobinCancelledEmailsAndSMS,
@@ -26,6 +25,7 @@ import {
enrichHostsWithDwdCredentials,
enrichUserWithDwdCredentialsWithoutOrgId,
} from "@calcom/lib/domainWideDelegation/server";
+import { getEventName } from "@calcom/lib/event";
import { getBookerBaseUrl } from "@calcom/lib/getBookerUrl/server";
import logger from "@calcom/lib/logger";
import { getLuckyUser } from "@calcom/lib/server/getLuckyUser";
diff --git a/packages/features/ee/users/pages/users-edit-view.tsx b/packages/features/ee/users/pages/users-edit-view.tsx
index c2146074934..ab8249ddd83 100644
--- a/packages/features/ee/users/pages/users-edit-view.tsx
+++ b/packages/features/ee/users/pages/users-edit-view.tsx
@@ -3,7 +3,7 @@
import { usePathname, useRouter } from "next/navigation";
import { z } from "zod";
-import NoSSR from "@calcom/core/components/NoSSR";
+import NoSSR from "@calcom/lib/components/NoSSR";
import { useParamsWithFallback } from "@calcom/lib/hooks/useParamsWithFallback";
import { getParserWithGeneric } from "@calcom/prisma/zod-utils";
import { trpc } from "@calcom/trpc/react";
diff --git a/packages/features/ee/users/pages/users-listing-view.tsx b/packages/features/ee/users/pages/users-listing-view.tsx
index 78bd5862810..3ab0d5ad162 100644
--- a/packages/features/ee/users/pages/users-listing-view.tsx
+++ b/packages/features/ee/users/pages/users-listing-view.tsx
@@ -1,6 +1,6 @@
"use client";
-import NoSSR from "@calcom/core/components/NoSSR";
+import NoSSR from "@calcom/lib/components/NoSSR";
import { UsersTable } from "../components/UsersTable";
diff --git a/packages/features/eventtypes/components/tabs/advanced/CustomEventTypeModal.tsx b/packages/features/eventtypes/components/tabs/advanced/CustomEventTypeModal.tsx
index 6f43feefbb6..b41bfcf0131 100644
--- a/packages/features/eventtypes/components/tabs/advanced/CustomEventTypeModal.tsx
+++ b/packages/features/eventtypes/components/tabs/advanced/CustomEventTypeModal.tsx
@@ -3,11 +3,10 @@ import type { SubmitHandler } from "react-hook-form";
import { FormProvider } from "react-hook-form";
import { useForm, useFormContext } from "react-hook-form";
-import type { EventNameObjectType } from "@calcom/core/event";
-import { getEventName } from "@calcom/core/event";
-import { validateCustomEventName } from "@calcom/core/event";
import type { InputClassNames } from "@calcom/features/eventtypes/lib/types";
import { classNames } from "@calcom/lib";
+import type { EventNameObjectType } from "@calcom/lib/event";
+import { getEventName, validateCustomEventName } from "@calcom/lib/event";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { Button, Dialog, DialogClose, DialogFooter, DialogContent, TextField } from "@calcom/ui";
diff --git a/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx b/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx
index 6ac7161750c..9bb526f53b0 100644
--- a/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx
+++ b/packages/features/eventtypes/components/tabs/advanced/EventAdvancedTab.tsx
@@ -9,8 +9,6 @@ import {
SelectedCalendarSettingsScope,
SelectedCalendarsSettingsWebWrapperSkeleton,
} from "@calcom/atoms/monorepo";
-import type { EventNameObjectType } from "@calcom/core/event";
-import { getEventName } from "@calcom/core/event";
import getLocationsOptionsForSelect from "@calcom/features/bookings/lib/getLocationOptionsForSelect";
import DestinationCalendarSelector from "@calcom/features/calendars/DestinationCalendarSelector";
import useLockedFieldsManager from "@calcom/features/ee/managed-event-types/hooks/useLockedFieldsManager";
@@ -34,6 +32,8 @@ import { BookerLayoutSelector } from "@calcom/features/settings/BookerLayoutSele
import { classNames } from "@calcom/lib";
import cx from "@calcom/lib/classNames";
import { DEFAULT_LIGHT_BRAND_COLOR, DEFAULT_DARK_BRAND_COLOR, APP_NAME } from "@calcom/lib/constants";
+import type { EventNameObjectType } from "@calcom/lib/event";
+import { getEventName } from "@calcom/lib/event";
import { generateHashedLink } from "@calcom/lib/generateHashedLink";
import { checkWCAGContrastColor } from "@calcom/lib/getBrandColours";
import { useLocale } from "@calcom/lib/hooks/useLocale";
diff --git a/packages/features/eventtypes/lib/types.ts b/packages/features/eventtypes/lib/types.ts
index 2490eafd603..f9cdf1ab324 100644
--- a/packages/features/eventtypes/lib/types.ts
+++ b/packages/features/eventtypes/lib/types.ts
@@ -1,7 +1,7 @@
import type { z } from "zod";
-import type { EventLocationType } from "@calcom/core/location";
import type { ChildrenEventType } from "@calcom/features/eventtypes/components/ChildrenEventTypeSelect";
+import type { EventLocationType } from "@calcom/lib/location";
import type { AttributesQueryValue } from "@calcom/lib/raqb/types";
import type { EventTypeTranslation } from "@calcom/prisma/client";
import type { PeriodType, SchedulingType } from "@calcom/prisma/enums";
diff --git a/packages/features/flags/pages/flag-listing-view.tsx b/packages/features/flags/pages/flag-listing-view.tsx
index 23f08ed768e..69b026fc981 100644
--- a/packages/features/flags/pages/flag-listing-view.tsx
+++ b/packages/features/flags/pages/flag-listing-view.tsx
@@ -2,7 +2,7 @@
import { Suspense } from "react";
-import NoSSR from "@calcom/core/components/NoSSR";
+import NoSSR from "@calcom/lib/components/NoSSR";
import { SkeletonText, SkeletonContainer } from "@calcom/ui";
import { FlagAdminList } from "../components/FlagAdminList";
diff --git a/packages/features/instant-meeting/handleInstantMeeting.ts b/packages/features/instant-meeting/handleInstantMeeting.ts
index 6e6209c5445..e10f25d49c9 100644
--- a/packages/features/instant-meeting/handleInstantMeeting.ts
+++ b/packages/features/instant-meeting/handleInstantMeeting.ts
@@ -4,7 +4,6 @@ import type { NextApiRequest } from "next";
import short from "short-uuid";
import { v5 as uuidv5 } from "uuid";
-import { createInstantMeetingWithCalVideo } from "@calcom/core/videoClient";
import dayjs from "@calcom/dayjs";
import getBookingDataSchema from "@calcom/features/bookings/lib/getBookingDataSchema";
import { getBookingFieldsWithSystemFields } from "@calcom/features/bookings/lib/getBookingFields";
@@ -19,6 +18,7 @@ import { WEBAPP_URL } from "@calcom/lib/constants";
import getOrgIdFromMemberOrTeamId from "@calcom/lib/getOrgIdFromMemberOrTeamId";
import logger from "@calcom/lib/logger";
import { getTranslation } from "@calcom/lib/server/i18n";
+import { createInstantMeetingWithCalVideo } from "@calcom/lib/videoClient";
import prisma from "@calcom/prisma";
import { BookingStatus, WebhookTriggerEvents } from "@calcom/prisma/enums";
diff --git a/packages/features/noShow/handleSendingAttendeeNoShowDataToApps.ts b/packages/features/noShow/handleSendingAttendeeNoShowDataToApps.ts
index b30faebb331..b0128e98cac 100644
--- a/packages/features/noShow/handleSendingAttendeeNoShowDataToApps.ts
+++ b/packages/features/noShow/handleSendingAttendeeNoShowDataToApps.ts
@@ -1,7 +1,7 @@
import type { z } from "zod";
import type { eventTypeAppCardZod } from "@calcom/app-store/eventTypeAppCardZod";
-import CrmManager from "@calcom/core/crmManager/crmManager";
+import CrmManager from "@calcom/lib/crmManager/crmManager";
import logger from "@calcom/lib/logger";
import prisma from "@calcom/prisma";
import { eventTypeAppMetadataOptionalSchema, EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";
diff --git a/packages/features/tasker/tasks/crm/__tests__/createCRMEvent.test.ts b/packages/features/tasker/tasks/crm/__tests__/createCRMEvent.test.ts
index d4516f32a7b..e685ee1c745 100644
--- a/packages/features/tasker/tasks/crm/__tests__/createCRMEvent.test.ts
+++ b/packages/features/tasker/tasks/crm/__tests__/createCRMEvent.test.ts
@@ -2,7 +2,7 @@ import prismaMock from "../../../../../../tests/libs/__mocks__/prismaMock";
import { describe, expect, it, beforeEach, vi } from "vitest";
-import { RetryableError } from "@calcom/core/crmManager/errors";
+import { RetryableError } from "@calcom/lib/crmManager/errors";
import { BookingStatus } from "@calcom/prisma/enums";
import { createCRMEvent } from "../createCRMEvent";
@@ -62,7 +62,7 @@ vi.mock("../lib/buildCalendarEvent", () => ({
}));
const mockCreateEvent = vi.fn().mockResolvedValue({ id: "sf-event-123" });
-vi.mock("@calcom/core/crmManager/crmManager", () => ({
+vi.mock("@calcom/lib/crmManager/crmManager", () => ({
default: class MockCrmManager {
private credential: CRMCredential;
diff --git a/packages/features/tasker/tasks/crm/createCRMEvent.ts b/packages/features/tasker/tasks/crm/createCRMEvent.ts
index 48e07b0670b..0dbaed41cd5 100644
--- a/packages/features/tasker/tasks/crm/createCRMEvent.ts
+++ b/packages/features/tasker/tasks/crm/createCRMEvent.ts
@@ -1,7 +1,7 @@
import type { Prisma } from "@prisma/client";
import { appDataSchemas } from "@calcom/app-store/apps.schemas.generated";
-import { RetryableError } from "@calcom/core/crmManager/errors";
+import { RetryableError } from "@calcom/lib/crmManager/errors";
import logger from "@calcom/lib/logger";
import { safeStringify } from "@calcom/lib/safeStringify";
import prisma from "@calcom/prisma";
@@ -171,7 +171,7 @@ export async function createCRMEvent(payload: string): Promise<void> {
continue;
}
- const CrmManager = (await import("@calcom/core/crmManager/crmManager")).default;
+ const CrmManager = (await import("@calcom/lib/crmManager/crmManager")).default;
const crm = new CrmManager(crmCredential, app);
diff --git a/packages/features/webhooks/lib/scheduleTrigger.ts b/packages/features/webhooks/lib/scheduleTrigger.ts
index 79a3f0e56c3..262bfa6153f 100644
--- a/packages/features/webhooks/lib/scheduleTrigger.ts
+++ b/packages/features/webhooks/lib/scheduleTrigger.ts
@@ -2,8 +2,8 @@ import type { Prisma, Webhook, Booking } from "@prisma/client";
import { v4 } from "uuid";
import { selectOOOEntries } from "@calcom/app-store/zapier/api/subscriptions/listOOOEntries";
-import { getHumanReadableLocationValue } from "@calcom/core/location";
import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";
+import { getHumanReadableLocationValue } from "@calcom/lib/location";
import logger from "@calcom/lib/logger";
import { safeStringify } from "@calcom/lib/safeStringify";
import { getTranslation } from "@calcom/lib/server/i18n";
diff --git a/packages/core/CalendarManager.test.ts b/packages/lib/CalendarManager.test.ts
similarity index 100%
rename from packages/core/CalendarManager.test.ts
rename to packages/lib/CalendarManager.test.ts
diff --git a/packages/core/CalendarManager.ts b/packages/lib/CalendarManager.ts
similarity index 100%
rename from packages/core/CalendarManager.ts
rename to packages/lib/CalendarManager.ts
diff --git a/packages/core/EventManager.ts b/packages/lib/EventManager.ts
similarity index 99%
rename from packages/core/EventManager.ts
rename to packages/lib/EventManager.ts
index 17b146d6a15..b817f79be4b 100644
--- a/packages/core/EventManager.ts
+++ b/packages/lib/EventManager.ts
@@ -9,9 +9,9 @@ import { FAKE_DAILY_CREDENTIAL } from "@calcom/app-store/dailyvideo/lib/VideoApi
import { appKeysSchema as calVideoKeysSchema } from "@calcom/app-store/dailyvideo/zod";
import { getLocationFromApp, MeetLocationType } from "@calcom/app-store/locations";
import getApps from "@calcom/app-store/utils";
-import CRMScheduler from "@calcom/core/crmManager/tasker/crmScheduler";
import { FeaturesRepository } from "@calcom/features/flags/features.repository";
import { getUid } from "@calcom/lib/CalEventParser";
+import CRMScheduler from "@calcom/lib/crmManager/tasker/crmScheduler";
import logger from "@calcom/lib/logger";
import {
getPiiFreeDestinationCalendar,
diff --git a/packages/core/bookingLimits/getBusyTimesFromLimits.ts b/packages/lib/bookingLimits/getBusyTimesFromLimits.ts
similarity index 100%
rename from packages/core/bookingLimits/getBusyTimesFromLimits.ts
rename to packages/lib/bookingLimits/getBusyTimesFromLimits.ts
diff --git a/packages/core/bookingLimits/limitManager.ts b/packages/lib/bookingLimits/limitManager.ts
similarity index 100%
rename from packages/core/bookingLimits/limitManager.ts
rename to packages/lib/bookingLimits/limitManager.ts
diff --git a/packages/core/builders/CalendarEvent/builder.ts b/packages/lib/builders/CalendarEvent/builder.ts
similarity index 100%
rename from packages/core/builders/CalendarEvent/builder.ts
rename to packages/lib/builders/CalendarEvent/builder.ts
diff --git a/packages/core/builders/CalendarEvent/class.ts b/packages/lib/builders/CalendarEvent/class.ts
similarity index 100%
rename from packages/core/builders/CalendarEvent/class.ts
rename to packages/lib/builders/CalendarEvent/class.ts
diff --git a/packages/core/builders/CalendarEvent/director.ts b/packages/lib/builders/CalendarEvent/director.ts
similarity index 100%
rename from packages/core/builders/CalendarEvent/director.ts
rename to packages/lib/builders/CalendarEvent/director.ts
diff --git a/packages/core/components/NoSSR.tsx b/packages/lib/components/NoSSR.tsx
similarity index 100%
rename from packages/core/components/NoSSR.tsx
rename to packages/lib/components/NoSSR.tsx
diff --git a/packages/core/crmManager/crmManager.test.ts b/packages/lib/crmManager/crmManager.test.ts
similarity index 100%
rename from packages/core/crmManager/crmManager.test.ts
rename to packages/lib/crmManager/crmManager.test.ts
diff --git a/packages/core/crmManager/crmManager.ts b/packages/lib/crmManager/crmManager.ts
similarity index 100%
rename from packages/core/crmManager/crmManager.ts
rename to packages/lib/crmManager/crmManager.ts
diff --git a/packages/core/crmManager/errors.ts b/packages/lib/crmManager/errors.ts
similarity index 100%
rename from packages/core/crmManager/errors.ts
rename to packages/lib/crmManager/errors.ts
diff --git a/packages/core/crmManager/tasker/crmScheduler.ts b/packages/lib/crmManager/tasker/crmScheduler.ts
similarity index 100%
rename from packages/core/crmManager/tasker/crmScheduler.ts
rename to packages/lib/crmManager/tasker/crmScheduler.ts
diff --git a/packages/lib/date-ranges.ts b/packages/lib/date-ranges.ts
index 3e23e24eaaf..94d330cdec6 100644
--- a/packages/lib/date-ranges.ts
+++ b/packages/lib/date-ranges.ts
@@ -1,6 +1,6 @@
-import type { IOutOfOfficeData } from "@calcom/core/getUserAvailability";
import type { Dayjs } from "@calcom/dayjs";
import dayjs from "@calcom/dayjs";
+import type { IOutOfOfficeData } from "@calcom/lib/getUserAvailability";
import type { Availability } from "@calcom/prisma/client";
export type DateRange = {
diff --git a/packages/lib/event-types/getEventTypeById.ts b/packages/lib/event-types/getEventTypeById.ts
index 00f239653ef..ffac9c6a0eb 100644
--- a/packages/lib/event-types/getEventTypeById.ts
+++ b/packages/lib/event-types/getEventTypeById.ts
@@ -2,10 +2,10 @@ import { Prisma } from "@prisma/client";
import { getLocationGroupedOptions } from "@calcom/app-store/server";
import { getEventTypeAppData } from "@calcom/app-store/utils";
-import type { LocationObject } from "@calcom/core/location";
import { getBookingFieldsWithSystemFields } from "@calcom/features/bookings/lib/getBookingFields";
import { parseBookingLimit, parseDurationLimit, parseRecurringEvent, parseEventTypeColor } from "@calcom/lib";
import { getUserAvatarUrl } from "@calcom/lib/getAvatarUrl";
+import type { LocationObject } from "@calcom/lib/location";
import { getTranslation } from "@calcom/lib/server/i18n";
import { EventTypeRepository } from "@calcom/lib/server/repository/eventType";
import { UserRepository } from "@calcom/lib/server/repository/user";
diff --git a/packages/core/event.test.ts b/packages/lib/event.test.ts
similarity index 100%
rename from packages/core/event.test.ts
rename to packages/lib/event.test.ts
diff --git a/packages/core/event.ts b/packages/lib/event.ts
similarity index 100%
rename from packages/core/event.ts
rename to packages/lib/event.ts
diff --git a/packages/core/getAggregatedAvailability.test.ts b/packages/lib/getAggregatedAvailability.test.ts
similarity index 100%
rename from packages/core/getAggregatedAvailability.test.ts
rename to packages/lib/getAggregatedAvailability.test.ts
diff --git a/packages/core/getAggregatedAvailability.ts b/packages/lib/getAggregatedAvailability.ts
similarity index 100%
rename from packages/core/getAggregatedAvailability.ts
rename to packages/lib/getAggregatedAvailability.ts
diff --git a/packages/core/getAggregatedAvailability/date-range-utils/mergeOverlappingDateRanges.test.ts b/packages/lib/getAggregatedAvailability/date-range-utils/mergeOverlappingDateRanges.test.ts
similarity index 100%
rename from packages/core/getAggregatedAvailability/date-range-utils/mergeOverlappingDateRanges.test.ts
rename to packages/lib/getAggregatedAvailability/date-range-utils/mergeOverlappingDateRanges.test.ts
diff --git a/packages/core/getAggregatedAvailability/date-range-utils/mergeOverlappingDateRanges.ts b/packages/lib/getAggregatedAvailability/date-range-utils/mergeOverlappingDateRanges.ts
similarity index 100%
rename from packages/core/getAggregatedAvailability/date-range-utils/mergeOverlappingDateRanges.ts
rename to packages/lib/getAggregatedAvailability/date-range-utils/mergeOverlappingDateRanges.ts
diff --git a/packages/core/getBusyTimes.ts b/packages/lib/getBusyTimes.ts
similarity index 99%
rename from packages/core/getBusyTimes.ts
rename to packages/lib/getBusyTimes.ts
index 9b2d84b6261..414d1768340 100644
--- a/packages/core/getBusyTimes.ts
+++ b/packages/lib/getBusyTimes.ts
@@ -2,8 +2,8 @@ import type { Booking, EventType } from "@prisma/client";
import { Prisma } from "@prisma/client";
import * as Sentry from "@sentry/nextjs";
-import { getBusyCalendarTimes } from "@calcom/core/CalendarManager";
import dayjs from "@calcom/dayjs";
+import { getBusyCalendarTimes } from "@calcom/lib/CalendarManager";
import { subtract } from "@calcom/lib/date-ranges";
import { intervalLimitKeyToUnit } from "@calcom/lib/intervalLimit";
import logger from "@calcom/lib/logger";
diff --git a/packages/core/getCalendarsEvents.test.ts b/packages/lib/getCalendarsEvents.test.ts
similarity index 100%
rename from packages/core/getCalendarsEvents.test.ts
rename to packages/lib/getCalendarsEvents.test.ts
diff --git a/packages/core/getCalendarsEvents.ts b/packages/lib/getCalendarsEvents.ts
similarity index 100%
rename from packages/core/getCalendarsEvents.ts
rename to packages/lib/getCalendarsEvents.ts
diff --git a/packages/lib/getConnectedDestinationCalendars.ts b/packages/lib/getConnectedDestinationCalendars.ts
index 5f3b12512e0..b3844c32ca3 100644
--- a/packages/lib/getConnectedDestinationCalendars.ts
+++ b/packages/lib/getConnectedDestinationCalendars.ts
@@ -1,4 +1,4 @@
-import { getCalendarCredentials, getConnectedCalendars } from "@calcom/core/CalendarManager";
+import { getCalendarCredentials, getConnectedCalendars } from "@calcom/lib/CalendarManager";
import { isDwdCredential } from "@calcom/lib/domainWideDelegation/clientAndServer";
import { enrichUserWithDwdCredentialsWithoutOrgId } from "@calcom/lib/domainWideDelegation/server";
import logger from "@calcom/lib/logger";
diff --git a/packages/core/getUserAvailability.ts b/packages/lib/getUserAvailability.ts
similarity index 100%
rename from packages/core/getUserAvailability.ts
rename to packages/lib/getUserAvailability.ts
diff --git a/packages/core/location.ts b/packages/lib/location.ts
similarity index 100%
rename from packages/core/location.ts
rename to packages/lib/location.ts
diff --git a/packages/lib/payment/handlePaymentSuccess.ts b/packages/lib/payment/handlePaymentSuccess.ts
index dca394d8b0c..a54509a12e5 100644
--- a/packages/lib/payment/handlePaymentSuccess.ts
+++ b/packages/lib/payment/handlePaymentSuccess.ts
@@ -1,11 +1,11 @@
import type { Prisma } from "@prisma/client";
-import EventManager from "@calcom/core/EventManager";
import { sendScheduledEmailsAndSMS } from "@calcom/emails";
import { doesBookingRequireConfirmation } from "@calcom/features/bookings/lib/doesBookingRequireConfirmation";
import { getAllCredentials } from "@calcom/features/bookings/lib/getAllCredentialsForUsersOnEvent/getAllCredentials";
import { handleBookingRequested } from "@calcom/features/bookings/lib/handleBookingRequested";
import { handleConfirmation } from "@calcom/features/bookings/lib/handleConfirmation";
+import EventManager from "@calcom/lib/EventManager";
import { HttpError as HttpCode } from "@calcom/lib/http-error";
import { getBooking } from "@calcom/lib/payment/getBooking";
import prisma from "@calcom/prisma";
diff --git a/packages/core/sentryWrapper.ts b/packages/lib/sentryWrapper.ts
similarity index 100%
rename from packages/core/sentryWrapper.ts
rename to packages/lib/sentryWrapper.ts
diff --git a/packages/lib/server/getLuckyUser.ts b/packages/lib/server/getLuckyUser.ts
index 35b9ea5fca3..8340e2c6c7b 100644
--- a/packages/lib/server/getLuckyUser.ts
+++ b/packages/lib/server/getLuckyUser.ts
@@ -2,8 +2,8 @@ import type { Prisma, User } from "@prisma/client";
import type { FormResponse, Fields } from "@calcom/app-store/routing-forms/types/types";
import { zodRoutes } from "@calcom/app-store/routing-forms/zod";
-import { getBusyCalendarTimes } from "@calcom/core/CalendarManager";
import dayjs from "@calcom/dayjs";
+import { getBusyCalendarTimes } from "@calcom/lib/CalendarManager";
import logger from "@calcom/lib/logger";
import { acrossQueryValueCompatiblity } from "@calcom/lib/raqb/raqbUtils";
import { raqbQueryValueSchema } from "@calcom/lib/raqb/zod";
diff --git a/packages/lib/slots.ts b/packages/lib/slots.ts
index 34a9000272b..371165269cb 100644
--- a/packages/lib/slots.ts
+++ b/packages/lib/slots.ts
@@ -1,6 +1,6 @@
-import type { IFromUser, IOutOfOfficeData, IToUser } from "@calcom/core/getUserAvailability";
import type { Dayjs } from "@calcom/dayjs";
import dayjs from "@calcom/dayjs";
+import type { IFromUser, IOutOfOfficeData, IToUser } from "@calcom/lib/getUserAvailability";
import { getTimeZone } from "./date-fns";
import type { DateRange } from "./date-ranges";
diff --git a/packages/core/videoClient.ts b/packages/lib/videoClient.ts
similarity index 100%
rename from packages/core/videoClient.ts
rename to packages/lib/videoClient.ts
diff --git a/packages/platform/atoms/event-types/hooks/useEventTypeForm.ts b/packages/platform/atoms/event-types/hooks/useEventTypeForm.ts
index 0899637d8c7..5fe6106e8c6 100644
--- a/packages/platform/atoms/event-types/hooks/useEventTypeForm.ts
+++ b/packages/platform/atoms/event-types/hooks/useEventTypeForm.ts
@@ -4,7 +4,6 @@ import { useForm } from "react-hook-form";
import { z } from "zod";
import checkForMultiplePaymentApps from "@calcom/app-store/_utils/payments/checkForMultiplePaymentApps";
-import { validateCustomEventName } from "@calcom/core/event";
import {
DEFAULT_PROMPT_VALUE,
DEFAULT_BEGIN_MESSAGE,
@@ -17,6 +16,7 @@ import type {
EventTypeUpdateInput,
} from "@calcom/features/eventtypes/lib/types";
import { validateIntervalLimitOrder } from "@calcom/lib";
+import { validateCustomEventName } from "@calcom/lib/event";
import { locationsResolver } from "@calcom/lib/event-types/utils/locationsResolver";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { validateBookerLayouts } from "@calcom/lib/validateBookerLayouts";
diff --git a/packages/platform/libraries/index.ts b/packages/platform/libraries/index.ts
index 52b935ea0e5..5964dffa0b2 100644
--- a/packages/platform/libraries/index.ts
+++ b/packages/platform/libraries/index.ts
@@ -126,7 +126,7 @@ export type { ConnectedDestinationCalendars } from "@calcom/lib/getConnectedDest
export { getConnectedApps } from "@calcom/lib/getConnectedApps";
export { bulkUpdateEventsToDefaultLocation } from "@calcom/lib/bulkUpdateEventsToDefaultLocation";
export type { ConnectedApps } from "@calcom/lib/getConnectedApps";
-export { getBusyCalendarTimes } from "@calcom/core/CalendarManager";
+export { getBusyCalendarTimes } from "@calcom/lib/CalendarManager";
export {
transformWorkingHoursForAtom,
@@ -226,7 +226,7 @@ export { roundRobinManualReassignment } from "@calcom/features/ee/round-robin/ro
export { ErrorCode } from "@calcom/lib/errorCodes";
export { IcsFeedCalendarService };
-export { validateCustomEventName } from "@calcom/core/event";
+export { validateCustomEventName } from "@calcom/lib/event";
export { getEnabledAppsFromCredentials };
export type { App };
export type { CredentialDataWithTeamName };
diff --git a/packages/platform/libraries/package.json b/packages/platform/libraries/package.json
index 2f5ce50a9da..28a2b22bcea 100644
--- a/packages/platform/libraries/package.json
+++ b/packages/platform/libraries/package.json
@@ -17,7 +17,6 @@
"postpublish": "node scripts/postpublish.js"
},
"dependencies": {
- "@calcom/core": "*",
"@calcom/features": "*",
"@calcom/lib": "*"
},
diff --git a/packages/trpc/server/routers/loggedInViewer/getCalVideoRecordings.handler.ts b/packages/trpc/server/routers/loggedInViewer/getCalVideoRecordings.handler.ts
index 4fac9db3813..baf20765a4e 100644
--- a/packages/trpc/server/routers/loggedInViewer/getCalVideoRecordings.handler.ts
+++ b/packages/trpc/server/routers/loggedInViewer/getCalVideoRecordings.handler.ts
@@ -1,4 +1,4 @@
-import { getRecordingsOfCalVideoByRoomName } from "@calcom/core/videoClient";
+import { getRecordingsOfCalVideoByRoomName } from "@calcom/lib/videoClient";
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
import { TRPCError } from "@trpc/server";
diff --git a/packages/trpc/server/routers/loggedInViewer/getDownloadLinkOfCalVideoRecordings.handler.ts b/packages/trpc/server/routers/loggedInViewer/getDownloadLinkOfCalVideoRecordings.handler.ts
index 056203991b1..99e6e67dd0b 100644
--- a/packages/trpc/server/routers/loggedInViewer/getDownloadLinkOfCalVideoRecordings.handler.ts
+++ b/packages/trpc/server/routers/loggedInViewer/getDownloadLinkOfCalVideoRecordings.handler.ts
@@ -1,6 +1,6 @@
/// <reference types="@calcom/types/next-auth" />
-import { getDownloadLinkOfCalVideoByRecordingId } from "@calcom/core/videoClient";
import { IS_SELF_HOSTED } from "@calcom/lib/constants";
+import { getDownloadLinkOfCalVideoByRecordingId } from "@calcom/lib/videoClient";
import { TRPCError } from "@trpc/server";
diff --git a/packages/trpc/server/routers/loggedInViewer/getUserTopBanners.handler.ts b/packages/trpc/server/routers/loggedInViewer/getUserTopBanners.handler.ts
index 398197db147..41856d43415 100644
--- a/packages/trpc/server/routers/loggedInViewer/getUserTopBanners.handler.ts
+++ b/packages/trpc/server/routers/loggedInViewer/getUserTopBanners.handler.ts
@@ -1,4 +1,4 @@
-import { getCalendarCredentials, getConnectedCalendars } from "@calcom/core/CalendarManager";
+import { getCalendarCredentials, getConnectedCalendars } from "@calcom/lib/CalendarManager";
import { buildNonDwdCredentials } from "@calcom/lib/domainWideDelegation/server";
import { prisma } from "@calcom/prisma";
import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";
diff --git a/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.test.ts b/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.test.ts
index d261f079b74..7f0f991ce50 100644
--- a/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.test.ts
+++ b/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.test.ts
@@ -12,7 +12,7 @@ import { setupAndTeardown } from "@calcom/web/test/utils/bookingScenario/setupAn
import { describe, it, vi, expect } from "vitest";
-import { getConnectedCalendars } from "@calcom/core/CalendarManager";
+import { getConnectedCalendars } from "@calcom/lib/CalendarManager";
import { SchedulingType, MembershipRole } from "@calcom/prisma/enums";
import { TRPCError } from "@trpc/server";
@@ -20,7 +20,7 @@ import { TRPCError } from "@trpc/server";
import type { TrpcSessionUser } from "../../trpc";
import { setDestinationCalendarHandler } from "./setDestinationCalendar.handler";
-vi.mock("@calcom/core/CalendarManager", () => ({
+vi.mock("@calcom/lib/CalendarManager", () => ({
getConnectedCalendars: vi.fn(),
getCalendarCredentials: vi.fn().mockImplementation((creds) => creds),
}));
diff --git a/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.ts b/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.ts
index 66a90425629..bcecad70172 100644
--- a/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.ts
+++ b/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.ts
@@ -1,4 +1,4 @@
-import { getCalendarCredentials, getConnectedCalendars } from "@calcom/core/CalendarManager";
+import { getCalendarCredentials, getConnectedCalendars } from "@calcom/lib/CalendarManager";
import { getUsersCredentials } from "@calcom/lib/server/getUsersCredentials";
import { DestinationCalendarRepository } from "@calcom/lib/server/repository/destinationCalendar";
import { prisma } from "@calcom/prisma";
diff --git a/packages/trpc/server/routers/viewer/availability/calendarOverlay.handler.ts b/packages/trpc/server/routers/viewer/availability/calendarOverlay.handler.ts
index a36630ec063..6fb4f30a012 100644
--- a/packages/trpc/server/routers/viewer/availability/calendarOverlay.handler.ts
+++ b/packages/trpc/server/routers/viewer/availability/calendarOverlay.handler.ts
@@ -1,5 +1,5 @@
-import { getBusyCalendarTimes } from "@calcom/core/CalendarManager";
import dayjs from "@calcom/dayjs";
+import { getBusyCalendarTimes } from "@calcom/lib/CalendarManager";
import { enrichUserWithDwdCredentialsWithoutOrgId } from "@calcom/lib/domainWideDelegation/server";
import { prisma } from "@calcom/prisma";
import type { EventBusyDate } from "@calcom/types/Calendar";
diff --git a/packages/trpc/server/routers/viewer/availability/user.handler.ts b/packages/trpc/server/routers/viewer/availability/user.handler.ts
index 38939220d54..1755e05e02d 100644
--- a/packages/trpc/server/routers/viewer/availability/user.handler.ts
+++ b/packages/trpc/server/routers/viewer/availability/user.handler.ts
@@ -1,4 +1,4 @@
-import { getUserAvailability } from "@calcom/core/getUserAvailability";
+import { getUserAvailability } from "@calcom/lib/getUserAvailability";
import type { TrpcSessionUser } from "../../../trpc";
import type { TUserInputSchema } from "./user.schema";
diff --git a/packages/trpc/server/routers/viewer/bookings/addGuests.handler.ts b/packages/trpc/server/routers/viewer/bookings/addGuests.handler.ts
index 992f4aa0b66..3496480caa3 100644
--- a/packages/trpc/server/routers/viewer/bookings/addGuests.handler.ts
+++ b/packages/trpc/server/routers/viewer/bookings/addGuests.handler.ts
@@ -1,7 +1,7 @@
-import EventManager from "@calcom/core/EventManager";
import dayjs from "@calcom/dayjs";
import { sendAddGuestsEmails } from "@calcom/emails";
import { parseRecurringEvent } from "@calcom/lib";
+import EventManager from "@calcom/lib/EventManager";
import { getUsersCredentials } from "@calcom/lib/server/getUsersCredentials";
import { getTranslation } from "@calcom/lib/server/i18n";
import { isTeamAdmin, isTeamOwner } from "@calcom/lib/server/queries/teams";
diff --git a/packages/trpc/server/routers/viewer/bookings/editLocation.handler.ts b/packages/trpc/server/routers/viewer/bookings/editLocation.handler.ts
index fbec5acec39..76a5328dd1b 100644
--- a/packages/trpc/server/routers/viewer/bookings/editLocation.handler.ts
+++ b/packages/trpc/server/routers/viewer/bookings/editLocation.handler.ts
@@ -2,9 +2,9 @@ import type { z } from "zod";
import { getEventLocationType, OrganizerDefaultConferencingAppType } from "@calcom/app-store/locations";
import { getAppFromSlug } from "@calcom/app-store/utils";
-import EventManager from "@calcom/core/EventManager";
import { sendLocationChangeEmailsAndSMS } from "@calcom/emails";
import { getVideoCallUrlFromCalEvent } from "@calcom/lib/CalEventParser";
+import EventManager from "@calcom/lib/EventManager";
import { buildCalEventFromBooking } from "@calcom/lib/buildCalEventFromBooking";
import logger from "@calcom/lib/logger";
import { safeStringify } from "@calcom/lib/safeStringify";
diff --git a/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts b/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts
index 70574af92e5..92db3fbf49d 100644
--- a/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts
+++ b/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts
@@ -2,9 +2,6 @@ import type { BookingReference, EventType } from "@prisma/client";
import type { TFunction } from "next-i18next";
import { getCalendar } from "@calcom/app-store/_utils/getCalendar";
-import { CalendarEventBuilder } from "@calcom/core/builders/CalendarEvent/builder";
-import { CalendarEventDirector } from "@calcom/core/builders/CalendarEvent/director";
-import { deleteMeeting } from "@calcom/core/videoClient";
import dayjs from "@calcom/dayjs";
import { sendRequestRescheduleEmailAndSMS } from "@calcom/emails";
import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";
@@ -12,6 +9,8 @@ import getWebhooks from "@calcom/features/webhooks/lib/getWebhooks";
import { deleteWebhookScheduledTriggers } from "@calcom/features/webhooks/lib/scheduleTrigger";
import sendPayload from "@calcom/features/webhooks/lib/sendOrSchedulePayload";
import { isPrismaObjOrUndefined } from "@calcom/lib";
+import { CalendarEventBuilder } from "@calcom/lib/builders/CalendarEvent/builder";
+import { CalendarEventDirector } from "@calcom/lib/builders/CalendarEvent/director";
import { getDwdOrRegularCredential } from "@calcom/lib/domainWideDelegation/server";
import { getBookerBaseUrl } from "@calcom/lib/getBookerUrl/server";
import getOrgIdFromMemberOrTeamId from "@calcom/lib/getOrgIdFromMemberOrTeamId";
@@ -21,6 +20,7 @@ import { safeStringify } from "@calcom/lib/safeStringify";
import { getUsersCredentials } from "@calcom/lib/server/getUsersCredentials";
import { getTranslation } from "@calcom/lib/server/i18n";
import { WorkflowRepository } from "@calcom/lib/server/repository/workflow";
+import { deleteMeeting } from "@calcom/lib/videoClient";
import { prisma } from "@calcom/prisma";
import type { WebhookTriggerEvents } from "@calcom/prisma/enums";
import { BookingStatus } from "@calcom/prisma/enums";
diff --git a/packages/trpc/server/routers/viewer/slots/util.ts b/packages/trpc/server/routers/viewer/slots/util.ts
index 05f0db3f72a..449877b8a3f 100644
--- a/packages/trpc/server/routers/viewer/slots/util.ts
+++ b/packages/trpc/server/routers/viewer/slots/util.ts
@@ -3,11 +3,6 @@ import { countBy } from "lodash";
import type { Logger } from "tslog";
import { v4 as uuid } from "uuid";
-import { getAggregatedAvailability } from "@calcom/core/getAggregatedAvailability";
-import { getBusyTimesForLimitChecks } from "@calcom/core/getBusyTimes";
-import type { CurrentSeats, GetAvailabilityUser, IFromUser, IToUser } from "@calcom/core/getUserAvailability";
-import { getUsersAvailability } from "@calcom/core/getUserAvailability";
-import monitorCallbackAsync, { monitorCallbackSync } from "@calcom/core/sentryWrapper";
import type { Dayjs } from "@calcom/dayjs";
import dayjs from "@calcom/dayjs";
import { getSlugOrRequestedSlug, orgDomainConfig } from "@calcom/ee/organizations/lib/orgDomains";
@@ -20,6 +15,10 @@ import { shouldIgnoreContactOwner } from "@calcom/lib/bookings/routing/utils";
import { RESERVED_SUBDOMAINS } from "@calcom/lib/constants";
import { getUTCOffsetByTimezone } from "@calcom/lib/date-fns";
import { getDefaultEvent } from "@calcom/lib/defaultEvents";
+import { getAggregatedAvailability } from "@calcom/lib/getAggregatedAvailability";
+import { getBusyTimesForLimitChecks } from "@calcom/lib/getBusyTimes";
+import type { CurrentSeats, GetAvailabilityUser, IFromUser, IToUser } from "@calcom/lib/getUserAvailability";
+import { getUsersAvailability } from "@calcom/lib/getUserAvailability";
import {
calculatePeriodLimits,
isTimeOutOfBounds,
@@ -27,6 +26,7 @@ import {
} from "@calcom/lib/isOutOfBounds";
import logger from "@calcom/lib/logger";
import { safeStringify } from "@calcom/lib/safeStringify";
+import monitorCallbackAsync, { monitorCallbackSync } from "@calcom/lib/sentryWrapper";
import { EventTypeRepository } from "@calcom/lib/server/repository/eventType";
import { UserRepository, withSelectedCalendars } from "@calcom/lib/server/repository/user";
import getSlots from "@calcom/lib/slots";
diff --git a/packages/trpc/server/routers/viewer/teams/getMemberAvailability.handler.ts b/packages/trpc/server/routers/viewer/teams/getMemberAvailability.handler.ts
index c110d207260..d10b6a7a716 100644
--- a/packages/trpc/server/routers/viewer/teams/getMemberAvailability.handler.ts
+++ b/packages/trpc/server/routers/viewer/teams/getMemberAvailability.handler.ts
@@ -1,5 +1,5 @@
-import { getUserAvailability } from "@calcom/core/getUserAvailability";
import { enrichUserWithDwdCredentialsWithoutOrgId } from "@calcom/lib/domainWideDelegation/server";
+import { getUserAvailability } from "@calcom/lib/getUserAvailability";
import { isTeamMember } from "@calcom/lib/server/queries/teams";
import { MembershipRepository } from "@calcom/lib/server/repository/membership";
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
diff --git a/tests/libs/__mocks__/CalendarManager.ts b/tests/libs/__mocks__/CalendarManager.ts
index 8a0cdd17e84..4554b060e2a 100644
--- a/tests/libs/__mocks__/CalendarManager.ts
+++ b/tests/libs/__mocks__/CalendarManager.ts
@@ -1,9 +1,9 @@
import { beforeEach, vi } from "vitest";
import { mockReset, mockDeep } from "vitest-mock-extended";
-import type * as CalendarManager from "@calcom/core/CalendarManager";
+import type * as CalendarManager from "@calcom/lib/CalendarManager";
-vi.mock("@calcom/core/CalendarManager", () => CalendarManagerMock);
+vi.mock("@calcom/lib/CalendarManager", () => CalendarManagerMock);
beforeEach(() => {
mockReset(CalendarManagerMock);
diff --git a/tests/libs/__mocks__/videoClient.ts b/tests/libs/__mocks__/videoClient.ts
index eb83c80ec3a..cc21f8c1918 100644
--- a/tests/libs/__mocks__/videoClient.ts
+++ b/tests/libs/__mocks__/videoClient.ts
@@ -1,9 +1,9 @@
import { beforeEach, vi } from "vitest";
import { mockReset, mockDeep } from "vitest-mock-extended";
-import type * as videoClient from "@calcom/core/videoClient";
+import type * as videoClient from "@calcom/lib/videoClient";
-vi.mock("@calcom/core/videoClient", () => videoClientMock);
+vi.mock("@calcom/lib/videoClient", () => videoClientMock);
beforeEach(() => {
mockReset(videoClientMock);
diff --git a/vitest.workspace.ts b/vitest.workspace.ts
index 98c08338ed4..e22b5999302 100644
--- a/vitest.workspace.ts
+++ b/vitest.workspace.ts
@@ -79,7 +79,7 @@ const workspaces = packagedEmbedTestsOnly
"apps/api/v1/**/*",
"apps/api/v2/**/*",
],
- name: "@calcom/core",
+ name: "@calcom/lib",
setupFiles: ["setupVitest.ts"],
},
},
diff --git a/yarn.lock b/yarn.lock
index c37105fbd1a..8416da199c4 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3602,7 +3602,6 @@ __metadata:
resolution: "@calcom/api@workspace:apps/api/v1"
dependencies:
"@calcom/app-store": "*"
- "@calcom/core": "*"
"@calcom/dayjs": "*"
"@calcom/emails": "*"
"@calcom/features": "*"
@@ -3804,7 +3803,6 @@ __metadata:
version: 0.0.0-use.local
resolution: "@calcom/caldavcalendar@workspace:packages/app-store/caldavcalendar"
dependencies:
- "@calcom/core": "*"
"@calcom/lib": "*"
"@calcom/prisma": "*"
"@calcom/types": "*"
@@ -3888,21 +3886,6 @@ __metadata:
languageName: unknown
linkType: soft
-"@calcom/core@*, @calcom/core@workspace:packages/core":
- version: 0.0.0-use.local
- resolution: "@calcom/core@workspace:packages/core"
- dependencies:
- "@calcom/app-store": "*"
- "@calcom/dayjs": "*"
- "@calcom/lib": "*"
- "@calcom/tsconfig": "*"
- "@calcom/types": "*"
- ical.js: ^1.4.0
- ics: ^2.37.0
- uuid: ^8.3.2
- languageName: unknown
- linkType: soft
-
"@calcom/cron@workspace:packages/app-store/cron":
version: 0.0.0-use.local
resolution: "@calcom/cron@workspace:packages/app-store/cron"
@@ -4116,7 +4099,6 @@ __metadata:
version: 0.0.0-use.local
resolution: "@calcom/exchange2013calendar@workspace:packages/app-store/exchange2013calendar"
dependencies:
- "@calcom/core": "*"
"@calcom/lib": "*"
"@calcom/prisma": "*"
"@calcom/types": "*"
@@ -4130,7 +4112,6 @@ __metadata:
version: 0.0.0-use.local
resolution: "@calcom/exchange2016calendar@workspace:packages/app-store/exchange2016calendar"
dependencies:
- "@calcom/core": "*"
"@calcom/lib": "*"
"@calcom/prisma": "*"
"@calcom/types": "*"
@@ -4323,7 +4304,6 @@ __metadata:
version: 0.0.0-use.local
resolution: "@calcom/ics-feed@workspace:packages/app-store/ics-feedcalendar"
dependencies:
- "@calcom/core": "*"
"@calcom/lib": "*"
"@calcom/prisma": "*"
"@calcom/types": "*"
@@ -4585,7 +4565,6 @@ __metadata:
version: 0.0.2
resolution: "@calcom/platform-libraries@npm:0.0.2"
dependencies:
- "@calcom/core": "*"
"@calcom/features": "*"
"@calcom/lib": "*"
checksum: 61b6be1b9d0be8a54ca8b1dff4b1e4db122b3c30d9203467f5347232eaf600ca3892da45a2de8abfe75327086406c33c1f6f75cd12a7147744437bc85a0ee755
@@ -4596,7 +4575,6 @@ __metadata:
version: 0.0.123
resolution: "@calcom/platform-libraries@npm:0.0.123"
dependencies:
- "@calcom/core": "*"
"@calcom/features": "*"
"@calcom/lib": "*"
checksum: ef755b7fa3a650ccc802d28e982d0f25e344d11613444771ef26923fdb25d7a9cea85c4f00f01d2c36f8c54f3de2cd0d729c883810345621f55fb8ec316c40fc
@@ -4607,7 +4585,6 @@ __metadata:
version: 0.0.0-use.local
resolution: "@calcom/platform-libraries@workspace:packages/platform/libraries"
dependencies:
- "@calcom/core": "*"
"@calcom/features": "*"
"@calcom/lib": "*"
"@types/node": ^20.3.1
@@ -5098,7 +5075,6 @@ __metadata:
"@calcom/app-store": "*"
"@calcom/app-store-cli": "*"
"@calcom/config": "*"
- "@calcom/core": "*"
"@calcom/dayjs": "*"
"@calcom/embed-core": "workspace:*"
"@calcom/embed-react": "workspace:*"