import type { SupportedCurrencies } from '@entities' import type { HttpClient } from '@services' import type { Response } from '@types' export type LpRequestInput = { request: { start_date: string end_date: string phone: string destination_id: number budget: number email: string first_name: string last_name: string people: number } currency: SupportedCurrencies } export type CreateLpRequestResponse = { id: string type: string userId: number createdAt: string clientComment: null | string favoriteContact: string[] endDate: string houseId: number numberOfAdults: number | null numberOfBabies: number | null numberOfChildren: number | null people: number startDate: string stripeClientSecret: string timeZone: null timeSlot: string[] updatedAt: string landingPageName: string | null landingPageUrl: string | null matterportRequest: boolean notes: string | null uuid: string } export type LpRequestErrors = { response: { data: { errors: [ { request: Record[]> }, ] } } } const createLpRequest = (http: HttpClient) => ({ query: ( input: LpRequestInput, ): Promise> => { return http.post('v1/requests', input) }, }) export default createLpRequest