refactor: rename eventType files to eventTypeRepository and eventTypeService#22670
refactor: rename eventType files to eventTypeRepository and eventTypeService#22670
Conversation
…Service - Rename packages/lib/server/repository/eventType.ts to eventTypeRepository.ts - Rename packages/lib/server/service/eventType.ts to eventTypeService.ts - Update all import statements across the codebase to use new filenames - No functional changes, only file path updates Co-Authored-By: eunjae@cal.com <hey@eunjae.dev>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
WalkthroughThis change updates import statements across multiple files in the codebase to reference a new module path for the Estimated code review effort1 (~2 minutes) Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
apps/web/lib/video/[uid]/getServerSideProps.tsOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-playwright". (The package "eslint-plugin-playwright" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: The plugin "eslint-plugin-playwright" was referenced from the config file in ".eslintrc.js". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. packages/app-store/routing-forms/lib/crmRouting/routerGetCrmContactOwnerEmail.tsOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-playwright". (The package "eslint-plugin-playwright" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: The plugin "eslint-plugin-playwright" was referenced from the config file in ".eslintrc.js". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. packages/app-store/salesforce/lib/routingFormBookingFormHandler.tsOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the plugin "eslint-plugin-playwright". (The package "eslint-plugin-playwright" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: The plugin "eslint-plugin-playwright" was referenced from the config file in ".eslintrc.js". If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
✅ No security or compliance issues detected. Reviewed everything up to e7360e1. Security Overview
Detected Code Changes
Reply to this PR with |
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (07/22/25)1 reviewer was added to this PR based on Keith Williams's automation. |
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (4)
packages/trpc/server/routers/viewer/eventTypes/getTeamAndEventTypeOptions.handler.ts (1)
2-2: Import path updated – looks goodNo further issues spotted for this line.
packages/trpc/server/routers/viewer/slots/isAvailable.handler.ts (1)
5-5: Import path update acknowledgedChange is purely mechanical and correct.
packages/trpc/server/routers/viewer/eventTypes/duplicate.handler.ts (1)
5-5: Import path update acknowledgedLooks good.
packages/trpc/server/routers/viewer/slots/util.ts (1)
46-46: Import path update acknowledgedNo issues found with the type-only import.
🧹 Nitpick comments (3)
packages/app-store/salesforce/lib/routingFormBookingFormHandler.ts (1)
2-2: Use path alias for consistency (optional).The new relative import works, but elsewhere in the repo we standardize on the
@calcom/...alias.
Switching to@calcom/lib/server/service/eventTypeServicewould keep the style uniform and avoid future breakage if this file is moved.packages/trpc/server/routers/viewer/slots/util.ts (1)
670-675: Heavy Day.js usage in hot path – consider optimisation
getStartTime(and several other helpers) calldayjs/dayjs.utc()inside tight loops that run for every availability request. Day.js with timezone support is notably slow; nativeDate, numeric epoch comparisons, or pre-computedutc()objects can yield sizeable latency wins in slot-generation endpoints.packages/lib/getConnectedDestinationCalendars.ts (1)
12-12: Prefer project-wide alias over relative path for uniformityMost other modules now import the repository via the
@calcom/lib/server/repository/eventTypeRepositoryalias instead of a relative path. Sticking to the alias keeps grepping simpler and avoids breakage if this file is ever moved.-import { EventTypeRepository } from "./server/repository/eventTypeRepository"; +import { EventTypeRepository } from "@calcom/lib/server/repository/eventTypeRepository";
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (18)
apps/web/lib/video/[uid]/getServerSideProps.ts(1 hunks)packages/app-store/routing-forms/lib/crmRouting/routerGetCrmContactOwnerEmail.ts(1 hunks)packages/app-store/salesforce/lib/routingFormBookingFormHandler.ts(1 hunks)packages/features/credentials/deleteCredential.test.ts(1 hunks)packages/lib/di/modules/eventType.ts(1 hunks)packages/lib/event-types/getEventTypeById.ts(1 hunks)packages/lib/event-types/getEventTypesByViewer.ts(1 hunks)packages/lib/getConnectedDestinationCalendars.ts(1 hunks)packages/lib/getUserAvailability.ts(1 hunks)packages/platform/libraries/repositories.ts(1 hunks)packages/trpc/server/routers/viewer/eventTypes/create.handler.ts(1 hunks)packages/trpc/server/routers/viewer/eventTypes/duplicate.handler.ts(1 hunks)packages/trpc/server/routers/viewer/eventTypes/getEventTypesFromGroup.handler.ts(1 hunks)packages/trpc/server/routers/viewer/eventTypes/getTeamAndEventTypeOptions.handler.ts(1 hunks)packages/trpc/server/routers/viewer/eventTypes/util.ts(1 hunks)packages/trpc/server/routers/viewer/routing-forms/findTeamMembersMatchingAttributeLogicOfRoute.handler.ts(1 hunks)packages/trpc/server/routers/viewer/slots/isAvailable.handler.ts(1 hunks)packages/trpc/server/routers/viewer/slots/util.ts(1 hunks)
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Flag excessive Day.js use in performance-critical code. Functions like .add, .diff, .isBefore, and .isAfter are slow, especially in timezone mode. Prefer .utc() for better performance. Where possible, replace with native Date and direct .valueOf() comparisons for faster execution. Recommend using native methods or Day.js .utc() consistently in hot paths like loops.
Files:
packages/app-store/salesforce/lib/routingFormBookingFormHandler.tspackages/trpc/server/routers/viewer/eventTypes/create.handler.tspackages/app-store/routing-forms/lib/crmRouting/routerGetCrmContactOwnerEmail.tspackages/lib/event-types/getEventTypeById.tsapps/web/lib/video/[uid]/getServerSideProps.tspackages/lib/di/modules/eventType.tspackages/trpc/server/routers/viewer/eventTypes/getTeamAndEventTypeOptions.handler.tspackages/trpc/server/routers/viewer/slots/util.tspackages/features/credentials/deleteCredential.test.tspackages/lib/getConnectedDestinationCalendars.tspackages/trpc/server/routers/viewer/eventTypes/util.tspackages/trpc/server/routers/viewer/eventTypes/getEventTypesFromGroup.handler.tspackages/trpc/server/routers/viewer/routing-forms/findTeamMembersMatchingAttributeLogicOfRoute.handler.tspackages/trpc/server/routers/viewer/slots/isAvailable.handler.tspackages/lib/getUserAvailability.tspackages/trpc/server/routers/viewer/eventTypes/duplicate.handler.tspackages/lib/event-types/getEventTypesByViewer.tspackages/platform/libraries/repositories.ts
🧠 Learnings (11)
packages/app-store/salesforce/lib/routingFormBookingFormHandler.ts (1)
Learnt from: eunjae-lee
PR: #22106
File: packages/features/insights/components/FailedBookingsByField.tsx:65-71
Timestamp: 2025-07-15T12:59:34.389Z
Learning: In the FailedBookingsByField component (packages/features/insights/components/FailedBookingsByField.tsx), although routingFormId is typed as optional in useInsightsParameters, the system automatically enforces a routing form filter, so routingFormId is always present in practice. This means the data always contains only one entry, making the single-entry destructuring approach safe.
packages/lib/event-types/getEventTypeById.ts (1)
Learnt from: vijayraghav-io
PR: #21072
File: packages/app-store/office365calendar/api/webhook.ts:120-123
Timestamp: 2025-07-18T17:57:16.395Z
Learning: The office365calendar webhook handler in packages/app-store/office365calendar/api/webhook.ts is specifically designed for Office365 calendar integration, not as a generic webhook handler. Therefore, it's safe to assume that fetchAvailabilityAndSetCache method will be implemented in the Office365CalendarService, making explicit validation checks unnecessary.
packages/trpc/server/routers/viewer/slots/util.ts (1)
Learnt from: eunjae-lee
PR: #22106
File: packages/features/insights/components/FailedBookingsByField.tsx:65-71
Timestamp: 2025-07-15T12:59:34.389Z
Learning: In the FailedBookingsByField component (packages/features/insights/components/FailedBookingsByField.tsx), although routingFormId is typed as optional in useInsightsParameters, the system automatically enforces a routing form filter, so routingFormId is always present in practice. This means the data always contains only one entry, making the single-entry destructuring approach safe.
packages/features/credentials/deleteCredential.test.ts (2)
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to backend/**/*.{ts,tsx} : Make sure the credential.key field is never returned back from tRPC endpoints or APIs.
Learnt from: vijayraghav-io
PR: #21072
File: .env.example:354-357
Timestamp: 2025-07-18T08:49:18.779Z
Learning: For E2E integration tests that require real third-party service credentials (like Outlook calendar), it's acceptable to temporarily include actual test account credentials in .env.example during feature development and validation, provided there's a clear plan to replace them with placeholder values before final release. Test credentials should be for dedicated test tenants/accounts, not production systems.
packages/lib/getConnectedDestinationCalendars.ts (2)
Learnt from: vijayraghav-io
PR: #21072
File: packages/app-store/office365calendar/api/webhook.ts:120-123
Timestamp: 2025-07-18T17:57:16.395Z
Learning: The office365calendar webhook handler in packages/app-store/office365calendar/api/webhook.ts is specifically designed for Office365 calendar integration, not as a generic webhook handler. Therefore, it's safe to assume that fetchAvailabilityAndSetCache method will be implemented in the Office365CalendarService, making explicit validation checks unnecessary.
Learnt from: vijayraghav-io
PR: #21072
File: packages/prisma/schema.prisma:891-891
Timestamp: 2025-07-18T08:47:01.264Z
Learning: The Outlook Calendar integration in Cal.com intentionally reuses subscription IDs across multiple event types for efficiency. The upsertSelectedCalendarsForEventTypeIds method creates separate SelectedCalendar records for each eventTypeId, all sharing the same outlookSubscriptionId. This subscription sharing pattern means that unique constraints like @@unique([outlookSubscriptionId, eventTypeId]) should not be applied as they would prevent this intended functionality.
packages/trpc/server/routers/viewer/eventTypes/util.ts (1)
Learnt from: hariombalhara
PR: #22547
File: packages/embeds/embed-core/src/lib/eventHandlers/scrollByDistanceEventHandler.ts:11-14
Timestamp: 2025-07-16T11:46:28.759Z
Learning: In Cal.com's embed system, internal events like "__scrollByDistance" are fired by Cal.com's own code, so runtime validation of event data structure is unnecessary since TypeScript type system guarantees type safety for internal events.
packages/trpc/server/routers/viewer/eventTypes/getEventTypesFromGroup.handler.ts (2)
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to backend/**/*.{ts,tsx} : For Prisma queries: Never use Includes - use select.
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to backend/**/*.{ts,tsx} : For Prisma queries: Only select data you need.
packages/trpc/server/routers/viewer/routing-forms/findTeamMembersMatchingAttributeLogicOfRoute.handler.ts (3)
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to backend/**/*.{ts,tsx} : For Prisma queries: Only select data you need.
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to backend/**/*.{ts,tsx} : For Prisma queries: Never use Includes - use select.
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to backend/**/*.{ts,tsx} : For Prisma queries: Select selects only the fields you specify explicitly.
packages/trpc/server/routers/viewer/slots/isAvailable.handler.ts (1)
Learnt from: vijayraghav-io
PR: #21072
File: packages/app-store/office365calendar/api/webhook.ts:120-123
Timestamp: 2025-07-18T17:57:16.395Z
Learning: The office365calendar webhook handler in packages/app-store/office365calendar/api/webhook.ts is specifically designed for Office365 calendar integration, not as a generic webhook handler. Therefore, it's safe to assume that fetchAvailabilityAndSetCache method will be implemented in the Office365CalendarService, making explicit validation checks unnecessary.
packages/lib/getUserAvailability.ts (1)
Learnt from: vijayraghav-io
PR: #21072
File: packages/app-store/office365calendar/api/webhook.ts:120-123
Timestamp: 2025-07-18T17:57:16.395Z
Learning: The office365calendar webhook handler in packages/app-store/office365calendar/api/webhook.ts is specifically designed for Office365 calendar integration, not as a generic webhook handler. Therefore, it's safe to assume that fetchAvailabilityAndSetCache method will be implemented in the Office365CalendarService, making explicit validation checks unnecessary.
packages/platform/libraries/repositories.ts (1)
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to backend/**/*.{ts,tsx} : For Prisma queries: Select selects only the fields you specify explicitly.
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Flag excessive Day.js use in performance-critical code. Functions like .add, .diff, .isBefore, and .isAfter are slow, especially in timezone mode. Prefer .utc() for better performance. Where possible, replace with native Date and direct .valueOf() comparisons for faster execution. Recommend using native methods or Day.js .utc() consistently in hot paths like loops.
Files:
packages/app-store/salesforce/lib/routingFormBookingFormHandler.tspackages/trpc/server/routers/viewer/eventTypes/create.handler.tspackages/app-store/routing-forms/lib/crmRouting/routerGetCrmContactOwnerEmail.tspackages/lib/event-types/getEventTypeById.tsapps/web/lib/video/[uid]/getServerSideProps.tspackages/lib/di/modules/eventType.tspackages/trpc/server/routers/viewer/eventTypes/getTeamAndEventTypeOptions.handler.tspackages/trpc/server/routers/viewer/slots/util.tspackages/features/credentials/deleteCredential.test.tspackages/lib/getConnectedDestinationCalendars.tspackages/trpc/server/routers/viewer/eventTypes/util.tspackages/trpc/server/routers/viewer/eventTypes/getEventTypesFromGroup.handler.tspackages/trpc/server/routers/viewer/routing-forms/findTeamMembersMatchingAttributeLogicOfRoute.handler.tspackages/trpc/server/routers/viewer/slots/isAvailable.handler.tspackages/lib/getUserAvailability.tspackages/trpc/server/routers/viewer/eventTypes/duplicate.handler.tspackages/lib/event-types/getEventTypesByViewer.tspackages/platform/libraries/repositories.ts
🧠 Learnings (11)
packages/app-store/salesforce/lib/routingFormBookingFormHandler.ts (1)
Learnt from: eunjae-lee
PR: #22106
File: packages/features/insights/components/FailedBookingsByField.tsx:65-71
Timestamp: 2025-07-15T12:59:34.389Z
Learning: In the FailedBookingsByField component (packages/features/insights/components/FailedBookingsByField.tsx), although routingFormId is typed as optional in useInsightsParameters, the system automatically enforces a routing form filter, so routingFormId is always present in practice. This means the data always contains only one entry, making the single-entry destructuring approach safe.
packages/lib/event-types/getEventTypeById.ts (1)
Learnt from: vijayraghav-io
PR: #21072
File: packages/app-store/office365calendar/api/webhook.ts:120-123
Timestamp: 2025-07-18T17:57:16.395Z
Learning: The office365calendar webhook handler in packages/app-store/office365calendar/api/webhook.ts is specifically designed for Office365 calendar integration, not as a generic webhook handler. Therefore, it's safe to assume that fetchAvailabilityAndSetCache method will be implemented in the Office365CalendarService, making explicit validation checks unnecessary.
packages/trpc/server/routers/viewer/slots/util.ts (1)
Learnt from: eunjae-lee
PR: #22106
File: packages/features/insights/components/FailedBookingsByField.tsx:65-71
Timestamp: 2025-07-15T12:59:34.389Z
Learning: In the FailedBookingsByField component (packages/features/insights/components/FailedBookingsByField.tsx), although routingFormId is typed as optional in useInsightsParameters, the system automatically enforces a routing form filter, so routingFormId is always present in practice. This means the data always contains only one entry, making the single-entry destructuring approach safe.
packages/features/credentials/deleteCredential.test.ts (2)
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to backend/**/*.{ts,tsx} : Make sure the credential.key field is never returned back from tRPC endpoints or APIs.
Learnt from: vijayraghav-io
PR: #21072
File: .env.example:354-357
Timestamp: 2025-07-18T08:49:18.779Z
Learning: For E2E integration tests that require real third-party service credentials (like Outlook calendar), it's acceptable to temporarily include actual test account credentials in .env.example during feature development and validation, provided there's a clear plan to replace them with placeholder values before final release. Test credentials should be for dedicated test tenants/accounts, not production systems.
packages/lib/getConnectedDestinationCalendars.ts (2)
Learnt from: vijayraghav-io
PR: #21072
File: packages/app-store/office365calendar/api/webhook.ts:120-123
Timestamp: 2025-07-18T17:57:16.395Z
Learning: The office365calendar webhook handler in packages/app-store/office365calendar/api/webhook.ts is specifically designed for Office365 calendar integration, not as a generic webhook handler. Therefore, it's safe to assume that fetchAvailabilityAndSetCache method will be implemented in the Office365CalendarService, making explicit validation checks unnecessary.
Learnt from: vijayraghav-io
PR: #21072
File: packages/prisma/schema.prisma:891-891
Timestamp: 2025-07-18T08:47:01.264Z
Learning: The Outlook Calendar integration in Cal.com intentionally reuses subscription IDs across multiple event types for efficiency. The upsertSelectedCalendarsForEventTypeIds method creates separate SelectedCalendar records for each eventTypeId, all sharing the same outlookSubscriptionId. This subscription sharing pattern means that unique constraints like @@unique([outlookSubscriptionId, eventTypeId]) should not be applied as they would prevent this intended functionality.
packages/trpc/server/routers/viewer/eventTypes/util.ts (1)
Learnt from: hariombalhara
PR: #22547
File: packages/embeds/embed-core/src/lib/eventHandlers/scrollByDistanceEventHandler.ts:11-14
Timestamp: 2025-07-16T11:46:28.759Z
Learning: In Cal.com's embed system, internal events like "__scrollByDistance" are fired by Cal.com's own code, so runtime validation of event data structure is unnecessary since TypeScript type system guarantees type safety for internal events.
packages/trpc/server/routers/viewer/eventTypes/getEventTypesFromGroup.handler.ts (2)
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to backend/**/*.{ts,tsx} : For Prisma queries: Never use Includes - use select.
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to backend/**/*.{ts,tsx} : For Prisma queries: Only select data you need.
packages/trpc/server/routers/viewer/routing-forms/findTeamMembersMatchingAttributeLogicOfRoute.handler.ts (3)
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to backend/**/*.{ts,tsx} : For Prisma queries: Only select data you need.
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to backend/**/*.{ts,tsx} : For Prisma queries: Never use Includes - use select.
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to backend/**/*.{ts,tsx} : For Prisma queries: Select selects only the fields you specify explicitly.
packages/trpc/server/routers/viewer/slots/isAvailable.handler.ts (1)
Learnt from: vijayraghav-io
PR: #21072
File: packages/app-store/office365calendar/api/webhook.ts:120-123
Timestamp: 2025-07-18T17:57:16.395Z
Learning: The office365calendar webhook handler in packages/app-store/office365calendar/api/webhook.ts is specifically designed for Office365 calendar integration, not as a generic webhook handler. Therefore, it's safe to assume that fetchAvailabilityAndSetCache method will be implemented in the Office365CalendarService, making explicit validation checks unnecessary.
packages/lib/getUserAvailability.ts (1)
Learnt from: vijayraghav-io
PR: #21072
File: packages/app-store/office365calendar/api/webhook.ts:120-123
Timestamp: 2025-07-18T17:57:16.395Z
Learning: The office365calendar webhook handler in packages/app-store/office365calendar/api/webhook.ts is specifically designed for Office365 calendar integration, not as a generic webhook handler. Therefore, it's safe to assume that fetchAvailabilityAndSetCache method will be implemented in the Office365CalendarService, making explicit validation checks unnecessary.
packages/platform/libraries/repositories.ts (1)
Learnt from: CR
PR: calcom/cal.com#0
File: .cursor/rules/review.mdc:0-0
Timestamp: 2025-07-21T13:54:11.770Z
Learning: Applies to backend/**/*.{ts,tsx} : For Prisma queries: Select selects only the fields you specify explicitly.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Check for E2E label
- GitHub Check: Security Check
🔇 Additional comments (13)
apps/web/lib/video/[uid]/getServerSideProps.ts (1)
15-15: LGTM – import path correctly updated.No further action needed.
packages/features/credentials/deleteCredential.test.ts (1)
11-11: LGTM – import path correctly updated.No further action needed.
packages/app-store/routing-forms/lib/crmRouting/routerGetCrmContactOwnerEmail.ts (1)
2-2: LGTM – import path correctly updated.No further action needed.
packages/lib/event-types/getEventTypeById.ts (1)
14-14: LGTM – import path correctly updated.No further action needed.
packages/trpc/server/routers/viewer/eventTypes/create.handler.ts (1)
6-6: No lingering references to the old import path foundI’ve verified across the repository that there are no imports using
@calcom/lib/server/repository/eventType(without “Repository”). All occurrences now correctly reference@calcom/lib/server/repository/eventTypeRepository.packages/lib/getConnectedDestinationCalendars.ts (1)
12-12: No stray old module paths foundI ran the suggested scans:
rg --fixed-strings '"@calcom/lib/server/repository/eventType"' --glob '!.git/**' rg --fixed-strings '"./server/repository/eventType"' --glob 'packages/**/*.{ts,tsx}'and got no matches. The mechanical rename appears clean—no further action needed.
packages/lib/event-types/getEventTypesByViewer.ts (1)
12-12: Import update looks goodImport path matches the new filename; no further action needed.
packages/lib/di/modules/eventType.ts (1)
4-4: Module binding updated correctlyThe IoC binding now references the renamed repository file; everything else remains untouched.
packages/trpc/server/routers/viewer/routing-forms/findTeamMembersMatchingAttributeLogicOfRoute.handler.ts (1)
17-17: Import path updated as expectedChange is mechanical and consistent with the rename.
packages/trpc/server/routers/viewer/eventTypes/util.ts (1)
5-5: Type-only import path fixedNothing else to flag. Good catch.
packages/trpc/server/routers/viewer/eventTypes/getEventTypesFromGroup.handler.ts (1)
6-6: No leftovereventTypeimports found
Verified with ripgrep—there are no remaining references to the old@calcom/lib/server/repository/eventTypepath. The import rename is complete.packages/lib/getUserAvailability.ts (1)
29-29: Updated repository import LGTMThe switch to
eventTypeRepositorymatches the new filename; no functional impact.packages/platform/libraries/repositories.ts (1)
4-4: Alias points to renamed repository – looks goodExport now targets the new module; downstream consumers stay intact.
E2E results are ready! |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
refactor: rename eventType files to eventTypeRepository and eventTypeService
Summary
This PR renames two TypeScript files to follow more descriptive naming conventions:
packages/lib/server/repository/eventType.ts→eventTypeRepository.tspackages/lib/server/service/eventType.ts→eventTypeService.tsAll import statements across the codebase (18 files) have been updated to reference the new file paths. The exports (
EventTypeRepositoryandEventTypeServiceclasses) remain unchanged - only the file paths were modified.Review & Testing Checklist for Human
git grep -r "server/repository/eventType\|server/service/eventType"to verify no old import paths remainTZ=UTC yarn testto ensure no tests are broken by the file renamesDiagram
%%{ init : { "theme" : "default" }}%% graph TD %% Renamed files EventTypeRepo["packages/lib/server/repository/<br/>eventTypeRepository.ts"]:::major-edit EventTypeService["packages/lib/server/service/<br/>eventTypeService.ts"]:::major-edit %% Key importers PlatformLibs["packages/platform/libraries/<br/>repositories.ts"]:::minor-edit TRPCCreate["packages/trpc/server/routers/viewer/<br/>eventTypes/create.handler.ts"]:::minor-edit TRPCDupe["packages/trpc/server/routers/viewer/<br/>eventTypes/duplicate.handler.ts"]:::minor-edit VideoProps["apps/web/lib/video/[uid]/<br/>getServerSideProps.ts"]:::minor-edit RoutingForms["packages/app-store/routing-forms/<br/>lib/crmRouting/..."]:::minor-edit SalesforceHandler["packages/app-store/salesforce/<br/>lib/routingFormBookingFormHandler.ts"]:::minor-edit %% Dependencies EventTypeRepo --> PlatformLibs EventTypeRepo --> TRPCCreate EventTypeRepo --> TRPCDupe EventTypeRepo --> VideoProps EventTypeRepo --> RoutingForms EventTypeService --> SalesforceHandler subgraph Legend L1[Major Edit]:::major-edit L2[Minor Edit]:::minor-edit L3[Context/No Edit]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
yarn type-check:ci) passes successfullyLink to Devin run: https://app.devin.ai/sessions/4d8ed432958b4d3ea36b36e68eaa2c1b
Requested by: @eunjae-lee