import axios from "@/config/axios";
import { SignatureData, SignatureResponse } from "../types/Types";

export const getSignature = async (): Promise<SignatureResponse> => {
  const { data } = await axios.get("/email-signatures");
  return data;
};

export const createSignature = async (
  params: SignatureData
): Promise<SignatureResponse> => {
  const { data } = await axios.post("/email-signatures", params);
  return data;
};

export const updateSignature = async (
  params: SignatureData
): Promise<SignatureResponse> => {
  const { data } = await axios.patch("/email-signatures", params);
  return data;
};
