import {
  GetOverviewDetailResponse,
  GetOverviewListParams,
  GetOverviewListResponse,
  OverviewParams,
} from "@/types";
import { service } from "@dage/web-components";

export const overviewApi = {
  getList(data: GetOverviewListParams) {
    return service.post<GetOverviewListResponse>(
      "/api/cms/company/pageList",
      data
    );
  },
  getDetail: (id: string) => {
    return service.get<GetOverviewDetailResponse>(
      `/api/cms/company/detail/${id}`
    );
  },
  save(params: OverviewParams) {
    return service.post("/api/cms/company/save", params);
  },
  del: (id: number) => {
    return service.get(`/api/cms/company/remove/${id}`);
  },
};
