// @ts-ignore
/* eslint-disable */
import request from "../request";

/** 创建费用 POST /operation/createCost */
export async function createCost(
  body: BusinessAPI.CostCreateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseCostVO>("/operation/createCost", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 费用删除 DELETE /operation/destroyCost */
export async function destroyCost(
  body: BusinessAPI.CostDestroyCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>("/operation/destroyCost", {
    method: "DELETE",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 费用拖拽排序 PUT /operation/dragCost */
export async function dragCost(
  body: BusinessAPI.CostDragCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>("/operation/dragCost", {
    method: "PUT",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 费用拖拽排序 PATCH /operation/dragCost */
export async function dragCost1(
  body: BusinessAPI.CostDragCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>("/operation/dragCost", {
    method: "PATCH",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 费用列表 GET /operation/listCost */
export async function listCost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.listCostParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.MultiResponseCostVO>("/operation/listCost", {
    method: "GET",
    params: {
      ...params,
      costListQry: undefined,
      ...params["costListQry"],
    },
    ...(options || {}),
  });
}

/** 费用列表 GET /operation/pageCost */
export async function pageCost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.pageCostParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.PageResponseCostVO>("/operation/pageCost", {
    method: "GET",
    params: {
      ...params,
      costPageQry: undefined,
      ...params["costPageQry"],
    },
    ...(options || {}),
  });
}

/** 费用详情 GET /operation/showCost */
export async function showCost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.showCostParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseCostVO>("/operation/showCost", {
    method: "GET",
    params: {
      ...params,
      costShowQry: undefined,
      ...params["costShowQry"],
    },
    ...(options || {}),
  });
}

/** 费用更新 PUT /operation/updateCost */
export async function updateCost(
  body: BusinessAPI.CostUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseCostVO>("/operation/updateCost", {
    method: "PUT",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 费用更新 PATCH /operation/updateCost */
export async function updateCost1(
  body: BusinessAPI.CostUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseCostVO>("/operation/updateCost", {
    method: "PATCH",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
