feat: booking references api type filter (#21179)
* feat: add `type` filter for booking references API endpointa * Update openapi.json * feat: add enum validation for booking reference types in filter input * refactor: rename externalUid to eventUid and add destinationCalendarId in booking references * refactor: replace enum with const array for BookingReferenceType * fix: type safety for booking references where clause using Prisma types * refactor: rename BookingReferenceType to BookingReferences
This commit is contained in:
+4
-2
@@ -1,4 +1,5 @@
|
||||
import { BookingUidGuard } from "@/ee/bookings/2024-08-13/guards/booking-uid.guard";
|
||||
import { BookingReferencesFilterInput_2024_08_13 } from "@/ee/bookings/2024-08-13/inputs/booking-references-filter.input";
|
||||
import { BookingReferencesOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/booking-references.output";
|
||||
import { BookingReferencesService_2024_08_13 } from "@/ee/bookings/2024-08-13/services/booking-references.service";
|
||||
import { BookingsService_2024_08_13 } from "@/ee/bookings/2024-08-13/services/bookings.service";
|
||||
@@ -82,9 +83,10 @@ export class OrganizationsTeamsBookingsController {
|
||||
})
|
||||
@HttpCode(HttpStatus.OK)
|
||||
async getBookingReferences(
|
||||
@Param("bookingUid") bookingUid: string
|
||||
@Param("bookingUid") bookingUid: string,
|
||||
@Query() filter: BookingReferencesFilterInput_2024_08_13
|
||||
): Promise<BookingReferencesOutput_2024_08_13> {
|
||||
const bookingReferences = await this.bookingReferencesService.getOrgBookingReferences(bookingUid);
|
||||
const bookingReferences = await this.bookingReferencesService.getOrgBookingReferences(bookingUid, filter);
|
||||
|
||||
return {
|
||||
status: SUCCESS_STATUS,
|
||||
|
||||
Reference in New Issue
Block a user