[CLEAN] Synthetic Benchmark PR #26523 - chore: Integrate confirmation booking audit #713
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.
Benchmark PR calcom#26523
Type: Clean (correct implementation)
Original PR Title: chore: Integrate confirmation booking audit
Original PR Description: ## What does this PR do?
Integrates booking audit logging for booking confirmation (acceptance) and rejection events. This is part of the booking audit integration plan (PR-2).
Core Changes:
onBookingAccepted) and bulk/recurring booking acceptance (onBulkBookingsAccepted). Refactored to useSimplifiedActorIdentifierunion type for flexible actor specification.onBookingRejected) viafireRejectionEventhelper. PassesactionSource/userUuidtohandleConfirmation. Input type now requiresactionSourceandactor.actionSourcefield to the booking confirm input schema (values: WEBAPP, API_V1, API_V2, WEBHOOK, MAGIC_LINK)actionSource: "WEBAPP"andactorwhen calling confirmHandler from tRPCactionSource: "API_V2"andactorfor confirm and decline operationsactionSource: "MAGIC_LINK"andactorfor magic link confirmationsPayment Webhook Integration:
appSlugfor actor identification. Creates app actor from credentialId or falls back to appSlug.appSlugfor audit actor identificationSchema Changes:
MAGIC_LINKtoBookingAuditSourceenum20260107093019_add_magic_link_sourcemigrationrejectionReasonfromStringChangeSchema(old/new) toz.string().nullable()(single value). Changedstatusto useBookingStatusChangeSchema.ActorIdentificationtype exportTest Infrastructure:
integration-utils.tsconfirmHandlerdirectly and includemakeUserActormockUpdates since last revision
MAGIC_LINKas a newBookingAuditSourceenum value with corresponding migration/api/linkand/api/verify-booking-token) now passactionSource: "MAGIC_LINK"andactorto confirmHandlermakeUserActorMandatory Tasks (DO NOT REMOVE)
How should this be tested?
onBookingAcceptedonBulkBookingsAcceptedand share the sameoperationIdonBookingRejectedactionSourceis "API_V2"actionSourceis "MAGIC_LINK"Human Review Checklist
MAGIC_LINKmigration runs correctlyhandleConfirmationpass requiredactionSourceand eitheruserUuidoractorSimplifiedActorIdentifierunion type correctly enforces mutual exclusivity ofuserUuidandactorappSlugRejectedAuditDataschema change (rejectionReason no longer has old/new) is acceptableChecklist
Link to Devin run: https://app.devin.ai/sessions/5914b63665314f9480f0cf5fd2d6fd13
Requested by: @hariombalhara
Original PR URL: calcom#26523