import type { HttpClient } from '@services' import type { ApiError, Response } from '@types' export type AddCommentInput = { houseId: string bookingId: string comment: string } const addComment = (http: HttpClient) => ({ query: ( input: AddCommentInput, ): Promise< Response< { id: string content: string relationships: { commentableId: string } }, undefined, ApiError > > => { return http.post( `v3/user/houses/${input.houseId}/bookings/${input.bookingId}/owner_bookings/comments`, { comment: { content: input.comment } }, ) }, }) export default addComment