import { AxiosResponse } from 'axios' ; import { makeRequest } from '../makeRequest' ; import { ContactFormData } from '../../types/redux/contact-reducer-types' ; api function returns { object } export const sendEmailWith = ( contactFormData ) : Promise < AxiosResponse < { success : boolean ; } > > => { return makeRequest ( { url : '/api/contact' , method : 'POST' , data : contactFormData , headers : { 'Content-Type' : 'application/json' } , } ) ; } ;