feat: add integration options for API v2 update booking location endpoint#26363
Merged
Ryukemeister merged 83 commits intomainfrom Mar 17, 2026
Conversation
…s-for-update-booking-location
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
…s-for-update-booking-location
…s-for-update-booking-location
…s-for-update-booking-location
…s-for-update-booking-location
Contributor
Devin AI is resolving merge conflictsThis PR has merge conflicts with the Devin will:
If you prefer to resolve conflicts manually, you can close the Devin session and handle it yourself. |
…s-for-update-booking-location Co-Authored-By: unknown <>
…s-for-update-booking-location
apps/api/v2/src/ee/bookings/2024-08-13/services/booking-video.service.ts
Show resolved
Hide resolved
apps/api/v2/src/ee/bookings/2024-08-13/services/booking-video.service.ts
Outdated
Show resolved
Hide resolved
…s-for-update-booking-location
…s-for-update-booking-location
…s-for-update-booking-location
…s-for-update-booking-location
…s-for-update-booking-location
…s-for-update-booking-location
…s-for-update-booking-location
…s-for-update-booking-location
…s-for-update-booking-location
apps/api/v2/src/ee/bookings/2024-08-13/services/booking-location-integration.service.ts
Show resolved
Hide resolved
…s-for-update-booking-location
Contributor
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/update-booking-location.e2e-spec.ts">
<violation number="1" location="apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/update-booking-location.e2e-spec.ts:519">
P2: This fallback test is too weak to prove the booking switched to Cal Video; it would still pass for other integration URLs.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/update-booking-location.e2e-spec.ts
Outdated
Show resolved
Hide resolved
Contributor
Devin AI is addressing Cubic AI's review feedbackA Devin session has been created to address the issues identified by Cubic AI. |
…Daily URL Replace weak assertion that would pass for any HTTP URL with a strict check against the known Cal Video mock values (integrations:daily and the mock Daily URL). This ensures the test actually proves the booking fell back to Cal Video rather than any other integration. Addresses Cubic AI review feedback (confidence 9/10). Co-Authored-By: bot_apk <apk@cognition.ai>
ThyMinimalDev
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds support for integration-based locations (video conferencing) to the API v2 Update Booking Location endpoint, addressing CAL-6964.
New Features
Technical Changes
BookingLocationService_2024_08_13: Added integration routing and specialized handlers for each integration type with smart fallback logic (e.g., Google Meet without Google Calendar falls back to Cal Video)BookingLocationIntegrationService_2024_08_13,BookingLocationCalendarSyncService_2024_08_13,BookingLocationCredentialService_2024_08_13,BookingVideoService_2024_08_13: New service classes split out for integration handling, calendar sync, credential resolution, and video operationsBookingsRepository_2024_08_13: AddedgetBookingByUidWithUserAndEventDetailsandgetBookingByIdWithUserAndEventDetailsmethodsUpdateBookingLocationInput_2024_08_13: AddedUpdateBookingInputIntegrationLocation_2024_08_13to the input schema with Swagger docsbookingWithUserAndEventDetailsSelect: New shared Prisma select added topackages/prisma/selects/booking.tspackages/platform/libraries: ExportedupdateEvent,CredentialRepository,BookingReferenceRepository,buildCalEventFromBooking,sendLocationChangeEmailsAndSMS, and other utilities needed by the integration servicesE2E Tests (added per review feedback)
cal-videointegrationgoogle_calendarBookingReference + credential, mocksupdateEventreturning ahangoutLink, asserts the location is the Google Meet URLoffice365_calendarBookingReference + credential, mocksupdateEventreturning aurl, asserts the location is the MS Teams URL@calcom/platform-libraries(updateEvent,CredentialRepository.findCredentialForCalendarServiceById,sendLocationChangeEmailsAndSMS) and@calcom/platform-libraries/conferencing(createMeeting)API Usage Example
Updates since last revision
Code simplification pass across the service layer for improved readability:
booking-location-credential.service.ts: ExtractedresolveCredentialId()private method — replaces nested if/else with early returns for cleaner credential ID resolution logicbooking-location-integration.service.ts: Removed redundant explicit type annotations on.referencescallbacks (TS infers them). ExtractedbuildUpdatedMetadata()andemitLocationChangeEvents()helpers to eliminate duplicated audit + notification code acrosshandleCalendarBasedIntegration()andupdateBookingWithVideoLocation()booking-location.service.ts: ExtractedsendLocationChangeNotifications()helper with early-return guard clauses. Consolidated duplicateBookingForLocationUpdatetype — now defined once inbooking-location-integration.service.tsand imported hereMandatory Tasks (DO NOT REMOVE)
How should this be tested?
TZ=UTC yarn test apps/api/v2/src/ee/bookings/2024-08-13/controllers/e2e/update-booking-location.e2e-spec.ts/v2/bookings/{uid}/locationwith{ "location": { "type": "integration", "integration": "cal-video" } }Human Review Checklist
updateEventmock logic (evt.conferenceData?.createRequestfor Google Meet detection) matches the actual service implementation inbooking-location-integration.service.tsresolveCredentialId()method in credential service preserves the original priority order (delegationCredentialId → credentialId → type match)emitLocationChangeEvents()correctly handles the audit + notification flow for both calendar-based and direct video integrationsLink to Devin run: https://app.devin.ai/sessions/eaca73aee7084c4b9895341aa000cfcf
Requested by: @Ryukemeister