Skip to content

Conversation

@ThyMinimalDev
Copy link
Contributor

@ThyMinimalDev ThyMinimalDev commented Nov 19, 2025

What does this PR do?

This PR adds the hashedLink field to the BOOKING_ webhooks payload, allowing webhook consumers to identify when a booking was made via a private link and which specific link was used.

Changes:

  • Added hashedLink field to the CalendarEvent type definition
  • Added withHashedLink() method to CalendarEventBuilder for setting the hashedLink
  • Updated RegularBookingService to pass the hashedLink from the booking request to the CalendarEvent

The hashedLink is automatically included in webhook payloads via the existing spread operator in getWebhookPayloadForBooking, which spreads the entire CalendarEvent object into the payload.

Link to Devin run: https://app.devin.ai/sessions/97d690b2c1ae4f5895daa06bd8f5a32e
Requested by: [email protected] (@ThyMinimalDev)

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. Create a private link for an event type that requires confirmation
  2. Book via the private link (e.g., /d/{hashedLink}/{eventSlug})
  3. Set up a webhook subscriber for BOOKING_REQUESTED events
  4. Verify the webhook payload includes the hashedLink field with the correct link token value
  5. Verify bookings made without a private link have hashedLink as null or undefined

Expected behavior:

  • When booking via private link: hashedLink should contain the link token (e.g., "sgdthj8mu4nsLNTYi3fW2p")
  • When booking via regular link: hashedLink should be null or undefined

Important Review Points

⚠️ Critical areas to review:

  1. Webhook payload verification: Confirm that hashedLink actually appears in the webhook payload by tracing through getWebhookPayloadForBooking → webhook delivery
  2. Other booking paths: Check if there are other booking creation flows (API v2, reschedule, etc.) that also need to include hashedLink
  3. Field population logic: Verify the condition hasHashedBookingLink ? reqBody.hashedLink ?? null : null correctly identifies private link bookings
  4. No tests added: This PR does not include automated tests for the new field in webhook payloads
  5. Backward compatibility: Confirm existing webhook consumers won't break with the new optional field
Screenshot 2025-11-20 at 11 34 36

- Add hashedLink field to CalendarEvent type definition
- Add withHashedLink method to CalendarEventBuilder
- Pass hashedLink from booking request to CalendarEvent in RegularBookingService
- hashedLink will now be included in webhook payloads when booking via private API links

Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@keithwillcode keithwillcode added core area: core, team members only foundation platform Anything related to our platform plan labels Nov 19, 2025
@ThyMinimalDev ThyMinimalDev marked this pull request as ready for review November 19, 2025 15:38
@ThyMinimalDev ThyMinimalDev requested a review from a team as a code owner November 19, 2025 15:38
@graphite-app graphite-app bot requested a review from a team November 19, 2025 15:38
@vercel
Copy link

vercel bot commented Nov 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
cal Ignored Ignored Nov 20, 2025 7:49am
cal-eu Ignored Ignored Nov 20, 2025 7:49am

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

@github-actions
Copy link
Contributor

E2E results are ready!

@ThyMinimalDev ThyMinimalDev changed the title feat: add hashedLink to BOOKING_REQUESTED webhook payload feat: add hashedLink to BOOKING_ webhooks payload Nov 20, 2025
@ThyMinimalDev ThyMinimalDev enabled auto-merge (squash) November 20, 2025 09:49
@ThyMinimalDev ThyMinimalDev merged commit 342e5ba into main Nov 20, 2025
67 of 70 checks passed
@ThyMinimalDev ThyMinimalDev deleted the devin/1763562558-add-hashedlink-to-webhook-payload branch November 20, 2025 11:24
ThyMinimalDev added a commit that referenced this pull request Nov 20, 2025
- Add hashedLink field to CalendarEvent type definition
- Add withHashedLink method to CalendarEventBuilder
- Pass hashedLink from booking request to CalendarEvent in RegularBookingService
- hashedLink will now be included in webhook payloads when booking via private API links

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@ThyMinimalDev ThyMinimalDev changed the title feat: add hashedLink to BOOKING_ webhooks payload feat: add hashedLink to BOOKING_REQUEST/CREATED webhooks payload Nov 21, 2025
@ThyMinimalDev ThyMinimalDev changed the title feat: add hashedLink to BOOKING_REQUEST/CREATED webhooks payload feat: add hashedLink to BOOKING_REQUEST/CREATED webhooks payload via RegularBookingService Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only foundation platform Anything related to our platform plan ready-for-e2e size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants