import type { Booking } from '@entities' import type { HttpClient } from '@services' import type { ApiError, Response } from '@types' export type ModifyOwnerBookingInput = { houseId: string period: { check_in_date: string; check_out_date: string } } const modifyOwnerBooking = (http: HttpClient) => { return { query: ( input: ModifyOwnerBookingInput, ): Promise< Response< Booking<{ serialized: true; ownerBooking: true }>, undefined, ApiError > > => { return http.post(`v1/user/houses/${input.houseId}/owner_bookings`, { owner_booking: input.period, }) }, } } export default modifyOwnerBooking