chore: Integrate creation/rescheduling booking audit for Recurring/regular booking/seated bookings (#26046)
* Integrate creation/rescheduling booking audit * fix: add missing hostUserUuid to booking audit test data Co-Authored-By: [email protected] <[email protected]> * fix-ci * feat: enhance booking audit with seat reference - Added support for seat reference in booking audit actions. - Updated localization for booking creation to include seat information. - Modified relevant services to pass attendee seat ID during booking creation. * fix: update test data to match schema requirements - Add seatReferenceUid: null to default mock audit log data - Add seatReferenceUid: null to multiple audit logs test case - Convert SEAT_RESCHEDULED test data to use numeric timestamps instead of ISO strings Co-Authored-By: [email protected] <[email protected]> * Allow nullish seatReferenceUid * feat: enhance booking audit to support rescheduledBy information - Updated booking audit actions to include rescheduledBy details, allowing tracking of who rescheduled a booking. - Refactored related services to accommodate the new rescheduledBy parameter in booking events. - Adjusted type definitions and function signatures to reflect the changes in the booking audit context. * Avoid possible run time issue * Fix imoport path * fix failing test due to merge from main\ * Pass useruuid --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
0408ce0741
commit
75d611c2e8
36 files changed
+1198
-453
No files matched your search
@@ -58,24 +58,7 @@ async function handler(req: NextApiRequest & { userId?: number; traceContext: Tr
|
||||
},
|
||||
});
|
||||
|
||||
// const booking = await createBookingThroughFactory();
|
||||
return booking;
|
||||
|
||||
// To be added in the follow-up PR
|
||||
// async function createBookingThroughFactory() {
|
||||
// console.log("Creating booking through factory");
|
||||
// const regularBookingService = getRegularBookingService();
|
||||
|
||||
// const booking = await regularBookingService.createBooking({
|
||||
// bookingData: req.body,
|
||||
// bookingMeta: {
|
||||
// userId: session?.user?.id || -1,
|
||||
// hostname: req.headers.host || "",
|
||||
// forcedSlug: req.headers["x-cal-force-slug"] as string | undefined,
|
||||
// },
|
||||
// });
|
||||
// return booking;
|
||||
// }
|
||||
}
|
||||
|
||||
export default defaultResponder(handler, "/api/book/event");
|
||||
export default defaultResponder(handler, "/api/book/event");
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { NextApiRequest } from "next";
|
||||
|
||||
import { getServerSession } from "@calcom/features/auth/lib/getServerSession";
|
||||
import { getRecurringBookingService } from "@calcom/features/bookings/di/RecurringBookingService.container";
|
||||
import type { BookingResponse } from "@calcom/features/bookings/types";
|
||||
@@ -55,6 +54,7 @@ async function handler(req: NextApiRequest & RequestMeta) {
|
||||
platformBookingLocation: req.platformBookingLocation,
|
||||
noEmail: req.noEmail,
|
||||
},
|
||||
creationSource: "WEBAPP",
|
||||
});
|
||||
|
||||
return createdBookings;
|
||||
@@ -62,4 +62,4 @@ async function handler(req: NextApiRequest & RequestMeta) {
|
||||
|
||||
export const handleRecurringEventBooking = handler;
|
||||
|
||||
export default defaultResponder(handler);
|
||||
export default defaultResponder(handler);
|
||||
Reference in new issue
Block a user