import axios from "../../../config/axios";
import { SearchQueryDto, SearchResponse } from "../types/SearchTypes";

export const searchMessages = async (
  query: SearchQueryDto
): Promise<SearchResponse> => {
  const { data } = await axios.get(`/email/search`, { params: query });
  return data;
};
