fix: pass cancellation reason for seated event cancellations in API v2 (#24409)

* fix: pass cancellation reason for seated event cancellations in API v2

- Add cancellationReason field to CancelSeatedBookingInput_2024_08_13 type
- Update transformInputCancelSeatedBooking to use provided cancellationReason
- Fix pre-existing ESLint warnings (no-prototype-builtins) in isRescheduleSeatedBody and isCancelSeatedBody
- Fixes issue where API v2 throws 'cancellation reason required' error even when reason is provided
- Resolves validation error for hosts canceling seated events via API v2

Co-Authored-By: anik@cal.com <adhabal2002@gmail.com>

* Update input.service.ts

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2025-10-13 07:19:34 +00:00
1 parent b01ceb427d
commit 18c546a171
2 files changed
+6 -1

No files matched your search

@@ -817,7 +817,7 @@ export class InputBookingsService_2024_08_13 {
// for an individual person, so api users need to call booking by booking using uid + seatUid to cancel it.
return {
uid: bookingUid,
cancellationReason: "",
cancellationReason: inputBooking.cancellationReason || "",
allRemainingBookings: false,
seatReferenceUid: inputBooking.seatUid,
};
@@ -24,4 +24,9 @@ export class CancelSeatedBookingInput_2024_08_13 {
})
@IsString()
seatUid!: string;
@IsString()
@IsOptional()
@ApiPropertyOptional({ example: "User requested cancellation" })
cancellationReason?: string;
}