refactor: calEventParser CalendarEvent ISP (#25890)

* refactor: calEventParser CalendarEvent ISP

* update

* fix: complete CalEventParser ISP refactoring - update call sites and fix type errors

- Update getUid call sites to pass only uid instead of whole CalendarEvent
- Update getLocation call sites to pass narrow shape with videoCallData, additionalInformation, location, uid
- Update narrow input shapes to accept null for location (matching CalendarEvent type)
- Update recurringEvent type to accept RecurringEvent | null instead of boolean
- Update videoCallData type to be more flexible ({ type?: string; url?: string })
- Fix ManageLink.tsx to pass recurringEvent directly instead of converting to boolean

Co-Authored-By: [email protected] <[email protected]>

* test: update CalEventParser tests to use narrow input shapes

- Update getPublicVideoCallUrl test to pass uid instead of calEvent
- Update getVideoCallPassword tests to pass videoCallData instead of calEvent

Co-Authored-By: [email protected] <[email protected]>

* few fix

* fix type error

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Morgan <[email protected]>
This commit is contained in:
authored and GitHub committed 2026-01-17 10:40:01 +05:30
1 parent c42d60256d
commit 9fcddbf27b
17 files changed
+426 -136

No files matched your search

+23 -2
View File
@@ -5,9 +5,30 @@ export function ManageLink(props: { calEvent: CalendarEvent; attendee: Person })
// Only the original attendee can make changes to the event
// Guests cannot
const t = props.attendee.language.translate;
const cancelLink = getCancelLink(props.calEvent, props.attendee);
const cancelLink = getCancelLink(
{
platformClientId: props.calEvent.platformClientId,
platformCancelUrl: props.calEvent.platformCancelUrl,
type: props.calEvent.type,
organizer: props.calEvent.organizer,
recurringEvent: props.calEvent.recurringEvent,
bookerUrl: props.calEvent.bookerUrl,
uid: props.calEvent.uid,
attendeeSeatId: props.calEvent.attendeeSeatId,
team: props.calEvent.team,
},
props.attendee
);
const rescheduleLink = getRescheduleLink({ calEvent: props.calEvent, attendee: props.attendee });
const bookingLink = getBookingUrl(props.calEvent);
const bookingLink = getBookingUrl({
platformClientId: props.calEvent.platformClientId,
platformBookingUrl: props.calEvent.platformBookingUrl,
bookerUrl: props.calEvent.bookerUrl,
type: props.calEvent.type,
uid: props.calEvent.uid,
organizer: props.calEvent.organizer,
attendeeSeatId: props.calEvent.attendeeSeatId,
});
const isOriginalAttendee = props.attendee.email === props.calEvent.attendees[0]?.email;
const isOrganizer = props.calEvent.organizer.email === props.attendee.email;