* Multi select event type in insights
* Fixing multi select query generation
* Added null check for eventType filters
* Updated test to support multiselect
* Type fix
---------
Co-authored-by: Devanshu Sharma <devanshusharma658@gmail.com>
* feat: remove unused report.handler.ts and jsonLogicToPrisma functionality
- Remove unused packages/app-store/routing-forms/trpc/report.handler.ts
- Remove packages/app-store/routing-forms/jsonLogicToPrisma.ts implementation
- Remove packages/app-store/routing-forms/__tests__/jsonLogicToPrisma.test.ts test file
These files were no longer being used in the routing-forms package.
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* feat: clean up remaining references to removed report functionality
- Remove unused report.schema.ts file
- Remove buildResponsesForReporting test file
- Remove report endpoint from router
- Update comment referencing jsonLogicToPrisma
All references to the removed jsonLogicToPrisma and report handler functionality have been cleaned up.
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* Update packages/app-store/routing-forms/lib/getQueryBuilderConfig.ts
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* Create `CalVideoSettings` type
* Create `LocationOptionContainer`
* Extract cal video settings to `CalVideoSettings`
* Refactor `<Locations />` component to use `<CalVideoSettings />`
* Unify naming
* Move location folder back under components
* Type fixes
* Delete console.log
* Get parent event type team's appearance settings
* Use style profile to get brand colours
* Update packages/features/eventtypes/lib/getPublicEvent.ts
---------
Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
- Rename insightsRoutingDI.ts -> InsightsRoutingDIService.ts
- Rename insightsRoutingBase.ts -> InsightsRoutingBaseService.ts
- Update all import statements to use new file names
- No functional changes, only file renames and import updates
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* upgrade turborepo from 1 to 2.5
* Fix tsconfig.json paths path
* chore: fix root path on tsconfig.paths
* chore: add baseUrl to tsconfig.json
* chore: tsconfig.json issue
* try: CI without tsconfig paths
* chore: add only local paths on tsconfig.json
* chore: Fix docs
* Fix missing env var on turbo.json
2025-08-18 11:17:27 -03:00
Anik Dhabal BabuGitHubDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix: redirect to existing payment page on booking retry
- Extract existing payment UID from unpaid bookings
- Return paymentUid and paymentId when payment form should be shown
- Prevents payment form bypass by redirecting to original payment session
- Maintains payment continuity without creating duplicate bookings
Fixes issue where canceled payments showed success page on rebooking
Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>
* test: add unit test for payment retry scenario
- Test verifies existing payment UID is returned on booking retry
- Ensures no duplicate bookings are created in database
- Validates paymentRequired flag is set correctly for unpaid bookings
- Covers the payment redirect fix in handleNewBooking.ts
Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>
* update
* fix: restore calendar event deletion for round robin reassignment
- Add deleteEventsAndMeetings call back to EventManager.reschedule() when changedOrganizer is true
- Add unit test to verify calendar deletion during round robin reassignment
- Fixes regression where calendar events weren't deleted from original host's calendar
Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>
* Update roundRobinReassignment.test.ts
* Update EventManager.ts
* test: update payment retry test title to single descriptive line
- Changed from numbered list format to concise single line description
- Test functionality remains unchanged and passes successfully
Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* Fix membership deletion handling and add tests
* fixes
* revert api-v2 specific changes
* Add more tests
* refactor: Move removeMember function into TeamService as private static methods
- Moved removeMember and all related helper functions from separate file into TeamService class
- Made all functions private static methods instead of exporting them
- Deleted the original removeMember.ts file since it's no longer needed
- Updated imports to use the new location
- All integration tests pass successfully
* refactor: Rename memberId to userId in TeamService methods
- Renamed memberId parameter to userId in removeMember private method
- Renamed memberIds parameter to userIds in removeMembers public method
- Updated all calls to removeMembers to use userIds instead of memberIds
- Parameter names now accurately reflect that they are user IDs, not membership IDs
* test: add service unit tests and simplify e2e tests for membership deletion
- Add unit tests for membership deletion services
- Remove redundant deletion behavior tests from controllers
- Keep only happy path tests in e2e controller tests
- Fix unused imports and variables
* package.json version
* fix unit teswtes
* No specs file
* fix unit tests
* fix: Add platform-libraries build step to E2E API v2 workflow
The E2E API v2 tests were failing with TypeScript compilation errors because
TeamService imports from @calcom/platform-libraries require the package to be
built first to generate the dist/ folder with compiled exports.
This adds the same build step that was added to unit-tests.yml to resolve
the module resolution errors.
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* Making tests clearer and easier to undestand
* 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 <33722304+ThyMinimalDev@users.noreply.github.com>
Co-authored-by: cal.com <morgan@cal.com>
* Add cal.eu to `IS_CALCOM`
* Create `getCalcomUrl` function
* Use `getCalcomURl` in generate metadata
* Use `getCalcomURl` in `buildCanonical`
* Linting fix
* refactor: convert handleNotificationWhenNoSlots to service class with DI
- Convert standalone handleNotificationWhenNoSlots function to NoSlotsNotificationService class
- Add INoSlotsNotificationService interface following existing patterns
- Create NoSlotsNotification DI module and add to container
- Add NO_SLOTS_NOTIFICATION_SERVICE tokens to DI_TOKENS
- Inject service into AvailableSlotsService dependencies
- Update AvailableSlotsService to use injected service instead of direct function call
- Update all test cases to use service class pattern
- Follows existing DI patterns used by other services like BusyTimesService and CheckBookingLimitsService
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* refactor: move Prisma calls to repositories and create dedicated DI container
- Add findOrganizationSettingsBySlug and findTeamSlugById methods to TeamRepository
- Add findTeamAdminsByTeamId method to MembershipRepository
- Create MembershipRepository DI module and tokens
- Update NoSlotsNotificationService to inject TeamRepository, MembershipRepository, and Redis client
- Create dedicated DI container for NoSlotsNotificationService
- Update AvailableSlots DI container to include MembershipRepository
- Replace direct Prisma and Redis calls with repository methods and injected client
- Update tests to use DI container instead of direct service instantiation
- Fix Redis interface import path
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* chore: DI noSlotsNotification service
* chore: bump library
---------
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>
* feat: add dry run events for SDK (dryRunBookingSuccessfulV2 and dryRunRescheduleBookingSuccessfulV2)
- Add new event types dryRunBookingSuccessfulV2 and dryRunRescheduleBookingSuccessfulV2 to EventDataMap
- Create payload functions that exclude uid field for dry run events
- Fire dry run events when isDryRun is true in both regular and recurring booking flows
- Add unit tests to verify dry run event payloads are correct and exclude uid field
- Ensures dry run mode no longer skips event firing but uses appropriate dry run variants
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* refactor: make dry run events more DRY by reusing types and payload logic
- Create BaseBookingEventPayload type to eliminate duplication between regular and dry run events
- Use intersection types to compose final event types in sdk-action-manager.ts
- Create getBaseBookingEventPayload function for common payload generation logic
- Export dry run payload functions and import them in tests instead of redefining
- Fix missing videoCallUrl field in rescheduleBookingSuccessfulV2 type
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* Remove test file
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
* fix: event not removed from calendar when reassign
* fix test
* tweak
* add test
* test: add comprehensive test for calendar event deletion during round robin reassignment
- Remove existing tests and replace with focused test for organizer change scenario
- Verify deleteEventsAndMeetings is called when organizer changes
- Mock reschedule method to simulate real behavior while tracking deletion calls
- Test verifies original host's calendar events are properly deleted
- Ensures booking reassignment and email notifications work correctly
Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>
* update
* revert roundRobinReassignment.test.ts
* revert
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix: gracefully handle calendar failures when bypassBusyCalendarTimes is enabled
- When _bypassCalendarBusyTimes parameter is true and third-party calendar fetching fails
- System now falls back to internal bookings only instead of throwing error
- Maintains existing error behavior when bypass is disabled
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* feat: add _silentCalendarFailures parameter to handle calendar failures gracefully
- Add silentlyHandleCalendarFailures parameter to getBusyTimes service
- Add _silentCalendarFailures parameter to getUserAvailability schema
- Add _silentCalendarFailures parameter to tRPC slots endpoint
- Add _silentCalendarFailures parameter to API v2 slots/available endpoint
- Parameter attempts calendar calls first, falls back silently on failure
- Different from bypassCalendarBusyTimes which skips calendar calls entirely
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* refactor: remove bypassBusyCalendarTimes logic from error handling
- Keep only silentlyHandleCalendarFailures logic in getBusyTimes error handling
- Remove redundant bypassBusyCalendarTimes condition from calendar failure handling
- Maintain existing bypassBusyCalendarTimes logic that skips calendar calls entirely
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* feat: add silentlyHandleCalendarFailures prop to Booker atom
- Pass silentlyHandleCalendarFailures prop from BookerPlatformWrapper to useAvailableSlots
- Forward prop as _silentCalendarFailures parameter to API v2 slots/available endpoint
- Complete the parameter flow from Booker atom to underlying service layer
- Enables silent handling of calendar provider failures in Booker component
Co-Authored-By: morgan@cal.com <morgan@cal.com>
* chore: fix type and bump library
* chore: bump library
---------
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: Somay Chauhan <somaychauhan98@gmail.com>
Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
* fix manage test error
* fix manage test error
* update useBookerContext
* wrap store provider around booker
* replace useStore with useBookerStoreContext
* replace useBookerStore with useBookerStoreContext
* add initializer function for booker store provider
* update props
* fixup: pass more props
* export StoreInitializeType type
* replace useBookerStore with useBookerStoreContext
* fixup: dont wrap BookerStoreProvider around booker directly
* wrap BookerStoreProvider around booker web wrapper and fix local storage import
* fix: wrap test components with BookerStoreProvider to fix failing unit tests
- Create reusable test utility in test-utils.tsx with comprehensive mock store
- Update Booker.test.tsx to use context-based testing approach
- Fix DatePicker tests in both bookings and calendars packages
- Simulate auto-advance behavior for month navigation tests
- All 14 previously failing tests now pass
Co-Authored-By: rajiv@cal.com <sahalrajiv6900@gmail.com>
* add changesets
* fix: complete migration from useBookerStore to useBookerStoreContext
- Updated all remaining files to use useBookerStoreContext instead of useBookerStore
- Fixed BookingFields.test.tsx by wrapping test component with BookerStoreProvider
- Ensures all Booker components work within the new context-based store pattern
- Resolves failing unit tests in CI by completing the store migration
Co-Authored-By: rajiv@cal.com <sahalrajiv6900@gmail.com>
* fix: add missing useBookerStoreContext import in BookerWebWrapper.tsx
- Fixes TypeScript errors in CI where useBookerStoreContext was used but not imported
- Completes the migration from useBookerStore to useBookerStoreContext pattern
- All tests pass locally after this fix
Co-Authored-By: rajiv@cal.com <sahalrajiv6900@gmail.com>
* Revert "fix: add missing useBookerStoreContext import in BookerWebWrapper.tsx"
This reverts commit 12947ca63f46c42e5aee74c78176ef230e2bf2cf.
* Revert "fix: complete migration from useBookerStore to useBookerStoreContext"
This reverts commit 87d837f2d30e4f9259d2be786049d21856f4eef0.
* fixup: useBookerStoreContext and useInitializeBookerStoreContext for booker web wrapper
* fixup: failing E2E tests
* fixup: email embed breaking
* fixup: troubleshooter crashing
* replace useBookerstore with useBookerStoreContext
---------
Co-authored-by: Rajiv Sahal <sahalrajiv-extc@atharvacoe.ac.in>
Co-authored-by: Ryukemeister <sahalrajiv6900@gmail.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Benny Joo <sldisek783@gmail.com>