import { http } from "@/shared/api/httpClient";
import { API_ROUTES } from "@/shared/constants/api-routes";

import { FunnelRequest, FunnelResponse, FunnelResponseSchema } from "./types";

export const getFunnel = async (payload: FunnelRequest) => {
  return http.post<FunnelResponse>(API_ROUTES.funnel(), payload, {
    tags: ["funnel"],
    schema: FunnelResponseSchema,
    revalidate: 0,
  });
};
