import axios from "@/config/axios";
import { CreateDomainType } from "../types/Types";

export const createDomain = async (params: CreateDomainType) => {
  const { data } = await axios.post(`/domains`, params);
  return data;
};

export const getDomains = async () => {
  const { data } = await axios.get(`/domains`);
  return data;
};

export const getDnsRecords = async () => {
  const { data } = await axios.get(`/domains/dns-records`);
  return data;
};

export const verifyDnsRecord = async () => {
  const { data } = await axios.get(`/domains/verify-dns`);
  return data;
};

export const getSpace = async () => {
  const { data } = await axios.get(`/business/quota`);
  return data;
};
