Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/app-store/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export const MeetLocationType = "integrations:google:meet";

export const MSTeamsLocationType = "integrations:office365_video";

export const DailyLocationType = "integrations:daily";
3 changes: 2 additions & 1 deletion packages/app-store/locations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ import type { EventLocationTypeFromAppMeta } from "../types/App";
import {
MeetLocationType as importedMeetLocationType,
MSTeamsLocationType as importedMSTeamsLocationType,
DailyLocationType as importedDailyLocationType,
} from "./constants";

export const MeetLocationType = importedMeetLocationType;
export const MSTeamsLocationType = importedMSTeamsLocationType;
export const DailyLocationType = importedDailyLocationType;

export type DefaultEventLocationType = {
default: true;
Expand Down Expand Up @@ -69,7 +71,6 @@ export type EventLocationTypeFromApp = Ensure<

export type EventLocationType = DefaultEventLocationType | EventLocationTypeFromApp;

export const DailyLocationType = "integrations:daily";
export const CalVideoLocationType = DailyLocationType;

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/features/bookings/lib/handleCancelBooking.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Prisma, WorkflowReminder } from "@prisma/client";
import type { z } from "zod";

import { DailyLocationType } from "@calcom/app-store/constants";
import { FAKE_DAILY_CREDENTIAL } from "@calcom/app-store/dailyvideo/lib/VideoApiAdapter";
import { DailyLocationType } from "@calcom/app-store/locations";
import dayjs from "@calcom/dayjs";
import { sendCancelledEmailsAndSMS } from "@calcom/emails";
import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Booking, User, Webhook } from "@prisma/client";
import { afterAll, beforeAll, describe, expect, test, vi } from "vitest";

import { DailyLocationType } from "@calcom/app-store/locations";
import { DailyLocationType } from "@calcom/app-store/constants";
import { getMeetingSessionsFromRoomName } from "@calcom/features/tasker/tasks/triggerNoShow/getMeetingSessionsFromRoomName";
import { triggerHostNoShow } from "@calcom/features/tasker/tasks/triggerNoShow/triggerHostNoShow";
import { sendGenericWebhookPayload } from "@calcom/features/webhooks/lib/sendPayload";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DailyLocationType } from "@calcom/app-store/locations";
import { DailyLocationType } from "@calcom/app-store/constants";
import dayjs from "@calcom/dayjs";
import tasker from "@calcom/features/tasker";
import getWebhooks from "@calcom/features/webhooks/lib/getWebhooks";
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/defaultEvents.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Prisma, SelectedCalendar } from "@prisma/client";

import { DailyLocationType } from "@calcom/app-store/locations";
import { DailyLocationType } from "@calcom/app-store/constants";
import slugify from "@calcom/lib/slugify";
import { PeriodType, SchedulingType } from "@calcom/prisma/enums";
import type { userSelect } from "@calcom/prisma/selects";
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/server/getDefaultLocations.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import getAppKeysFromSlug from "@calcom/app-store/_utils/getAppKeysFromSlug";
import { DailyLocationType } from "@calcom/app-store/locations";
import { DailyLocationType } from "@calcom/app-store/constants";
import getApps from "@calcom/app-store/utils";
import { getUsersCredentialsIncludeServiceAccountKey } from "@calcom/lib/server/getUsersCredentials";
import { userMetadata as userMetadataSchema } from "@calcom/prisma/zod-utils";
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/videoClient.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import short from "short-uuid";
import { v5 as uuidv5 } from "uuid";

import { DailyLocationType } from "@calcom/app-store/constants";
import { getDailyAppKeys } from "@calcom/app-store/dailyvideo/lib/getDailyAppKeys";
import { DailyLocationType } from "@calcom/app-store/locations";
import { VideoApiAdapterMap } from "@calcom/app-store/video.adapters.generated";
import { sendBrokenIntegrationEmail } from "@calcom/emails";
import { getUid } from "@calcom/lib/CalEventParser";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { z } from "zod";

import { DailyLocationType } from "@calcom/app-store/locations";
import { DailyLocationType } from "@calcom/app-store/constants";

import { commonBookingSchema } from "./types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Prisma } from "@prisma/client";

import { DailyLocationType } from "@calcom/app-store/locations";
import { DailyLocationType } from "@calcom/app-store/constants";
import { getDefaultLocations } from "@calcom/lib/server/getDefaultLocations";
import { EventTypeRepository } from "@calcom/lib/server/repository/eventTypeRepository";
import type { PrismaClient } from "@calcom/prisma";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Prisma } from "@prisma/client";
import type { NextApiResponse, GetServerSidePropsContext } from "next";

import type { appDataSchemas } from "@calcom/app-store/apps.schemas.generated";
import { DailyLocationType } from "@calcom/app-store/locations";
import { DailyLocationType } from "@calcom/app-store/constants";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Import moved to constants — good call

This avoids pulling heavy deps from locations; nice perf/treeshaking win.

Run to confirm repo-wide consistency and a safe transition:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "1) Ensure no remaining imports from locations for DailyLocationType"
rg -nP 'import\s+{[^}]*\bDailyLocationType\b[^}]*}\s+from\s+["'\'']@calcom/app-store/locations["'\'']'

echo "2) Ensure constants exports DailyLocationType"
rg -nP '^export\s+.*\bDailyLocationType\b' packages/app-store/constants.ts

echo "3) If keeping a transitional re-export, verify it exists (or intentionally removed)"
rg -nP '\bDailyLocationType\b' packages/app-store/locations.ts -n -C2 || true

Length of output: 1095


Update test import for DailyLocationType (and MeetLocationType)
In packages/lib/server/getDefaultLocations.test.ts (line 7), change the import from

import { DailyLocationType, MeetLocationType } from "@calcom/app-store/locations";

to

import { DailyLocationType, MeetLocationType } from "@calcom/app-store/constants";
🤖 Prompt for AI Agents
In packages/trpc/server/routers/viewer/eventTypes/heavy/update.handler.ts around
line 5, the import for DailyLocationType is from the wrong module; update the
import source from "@calcom/app-store/locations" to
"@calcom/app-store/constants" (and do the same for MeetLocationType if present)
so the test and code use the correct exported enums/constants; ensure only the
constants module is referenced and remove any obsolete/duplicate imports.

import updateChildrenEventTypes from "@calcom/features/ee/managed-event-types/lib/handleChildrenEventTypes";
import {
allowDisablingAttendeeConfirmationEmails,
Expand Down
Loading