* refactor: convert findQualifiedHostsWithDelegationCredentials to service class with DI
- Create QualifiedHostsService class following UserAvailabilityService pattern
- Add IQualifiedHostsService interface with prisma and bookingRepo dependencies
- Create DI module and container for qualified hosts service
- Update filterHostsBySameRoundRobinHost to accept prisma as parameter
- Update all usage sites to use the new service:
- loadAndValidateUsers.ts
- slots/util.ts
- test mocks in _post.test.ts
- Maintain backward compatibility with original function export
- Fix type issues in team properties (rrResetInterval, rrTimestampBasis)
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: update filterHostsBySameRoundRobinHost test to include prisma parameter
- Add missing prisma parameter to all test function calls
- Resolves unit test failure caused by function signature change
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: resolve type issues in FilterHostsService
- Import PrismaClient type instead of using unknown
- Fix type compatibility for BookingRepository constructor
- Update test mocks to use proper BookingRepository type
- Ensure all DI dependencies are properly typed
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* refactor: rename DI files to CamelCase and update imports
- Rename all files in packages/lib/di from kebab-case to CamelCase
- Update 22 external files with import statements to use new file names
- Update internal DI module files with corrected imports
- Maintain consistency with TypeScript naming conventions
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* chore: bump platform libs
* chore: bump platform libs
* fix: remove obsolete vitest mock after service class refactoring
- Remove obsolete mock for old function module
- Keep correct mock for new DI container
- Resolves CI unit test failures
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: correct import path for calAIPhone zod-utils module
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: Booker active booking limit can't be switched off (#23005)
* refactor: Get rid of `getServerSideProps` for /getting-started pages (#23003)
* refactor
* fix type check
* fix: Remove Reporting page within Routing Forms (#22990)
* fix error in handleNewBooking (#23011)
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
* Documentation edits made through Mintlify web editor (#23007)
Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
* fix: Contact support button position changed from absolute to fixed (#23002)
* feat: Add private links to API (#22943)
* --init
* address change requests
* adding further changes
* address feedback
* further changes
* further clean-up
* clean up
* fix module import and others
* add guards
* remove unnecessary comments
* remove unnecessary comments
* cleanup
* sort coderabbig suggestions
* improve check
* chore: bump platform libraries
---------
Co-authored-by: Lauris Skraucis <lauris.skraucis@gmail.com>
Co-authored-by: supalarry <laurisskraucis@gmail.com>
* chore: release v5.5.15
* chore: bump platform libs
* chore: bump platform libs
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: morgan@cal.com <morgan@cal.com>
Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>
Co-authored-by: Sahitya Chandra <sahityajb@gmail.com>
Co-authored-by: Carina Wollendorfer <30310907+CarinaWolli@users.noreply.github.com>
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
Co-authored-by: Ayush Kumar <kumarayushkumar@protonmail.com>
Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com>
Co-authored-by: Lauris Skraucis <lauris.skraucis@gmail.com>
Co-authored-by: supalarry <laurisskraucis@gmail.com>
Co-authored-by: emrysal <me@alexvanandel.com>
* refactor: convert getBusyTimes to service class with dependency injection
- Create BusyTimesService following UserAvailabilityService pattern
- Add DI tokens, module, and container setup for BusyTimesService
- Update all usage locations to use service instead of direct function calls
- Maintain existing function signatures for backward compatibility
- Add legacy exports to ensure smooth transition
- Update type references in trpc util to use service prototype
- Fix linting issues by making legacy exports async with proper imports
- All tests pass and type checking succeeds
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* refactor: busy time service
* fix: api v2 eslint plugins version mismatch
* chore: bump platform libs
* chore: bump platform libs
* fix: missing di busyTimesModule in slots service
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: morgan@cal.com <morgan@cal.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* refactor: move getTotalBookingDuration to BookingRepository
- Move getTotalBookingDuration function from standalone file to BookingRepository class
- Update all usage sites to call method through repository instance
- Remove standalone function file packages/lib/server/queries/booking/index.ts
- Add prisma import to util.ts for BookingRepository instantiation
- Maintain exact same method signature and functionality
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fix: remove eslint-config-next to resolve TypeScript ESLint conflicts
- Remove eslint-config-next dependency that was causing version conflicts
- Resolves 'Class extends value undefined is not a constructor or null' errors
- ESLint 'next' config issue appears to be pre-existing in main branch
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* fixup! Merge branch 'main' into devin/move-getTotalBookingDuration-1754460208
* chore: bump platform libs
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: morgan@cal.com <morgan@cal.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
2025-08-07 10:53:18 +03:00
Omar LópezGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* refactor: getUserAvailability into service with DI
* chore: bump platform libs
* disable bull queue in e2e for bookings
* chore: bump platform libs
* chore: bump platform libs
* fix: should update event type bookingFields test
---------
Co-authored-by: Alex van Andel <me@alexvanandel.com>
* refactor: convert checkBookingLimits to class service with dependency injection
- Create CheckBookingLimitsService class following AvailableSlotsService pattern
- Add countBookingsByEventTypeAndDateRange method to BookingRepository
- Move direct prisma calls from service to repository layer
- Implement dependency injection with proper DI tokens and modules
- Update all usage points to use the new service through DI
- Maintain backward compatibility with error-throwing wrapper functions
- Update tests to use the new service pattern
- Resolve TODO comment in AvailableSlotsService for DI integration
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* chore: DI CheckBookingLimitsService in v2 slots service
* chore: bump libraries
* chore: create getCheckBookingLimitsService
* refactor: convert checkBookingAndDurationLimits to service class with DI
- Create CheckBookingAndDurationLimitsService class following DI pattern
- Add DI tokens and module for the new service
- Update booking-limits container to provide the new service
- Refactor handleNewBooking.ts to use service through DI
- Maintain backward compatibility with deprecated function export
- Preserve all existing functionality while improving code organization
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* chore: CheckBookingAndDurationLimitsService
* chore: bump platform libs
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: morgan@cal.com <morgan@cal.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
2025-07-31 02:03:18 +01:00
devin-ai-integration[bot]GitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>morgan@cal.com <morgan@cal.com>
* refactor: convert BookingRepository to use dependency injection pattern
- Add constructor injection for PrismaClient to BookingRepository
- Convert all static methods to instance methods using this.prismaClient
- Update all usage sites to use two-step instantiation pattern:
const bookingRepo = new BookingRepository(prisma); bookingRepo.method(...)
- Apply same dependency injection pattern as UserRepository, TeamRepository, and SelectedSlotsRepository
- Update test files to use correct prismaMock import paths
- Maintain all existing functionality and type safety
Files updated:
- BookingRepository class structure and all 15 static methods
- Video meeting pages and booking views
- Booking utilities and services (handleNewBooking, originalRescheduledBookingUtils)
- Round robin handlers and reassignment logic
- Interval limits and booking limits checking
- Test files with proper mocking setup
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* chore: bump platform libs
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: morgan@cal.com <morgan@cal.com>
* refactor: Remove intervalLimits from @calcom/lib and export directly
* Tackle other places that use parseBookingLimit/parseDurationLimit
* More type fixups that were hidden by previous fails
* Fixed up booking-limits file
* Remove server-only