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

/** 创建纸箱规格 POST /operation/createBoxSpec */
export async function createBoxSpec(
  body: BusinessAPI.BoxSpecCreateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseBoxSpecVO>(
    "/operation/createBoxSpec",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

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

/** 纸箱规格列表 GET /operation/listBoxSpec */
export async function listBoxSpec(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.listBoxSpecParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.MultiResponseBoxSpecVO>("/operation/listBoxSpec", {
    method: "GET",
    params: {
      ...params,
      boxSpecListQry: undefined,
      ...params["boxSpecListQry"],
    },
    ...(options || {}),
  });
}

/** 纸箱规格列表 GET /operation/pageBoxSpec */
export async function pageBoxSpec(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.pageBoxSpecParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.PageResponseBoxSpecVO>("/operation/pageBoxSpec", {
    method: "GET",
    params: {
      ...params,
      boxSpecPageQry: undefined,
      ...params["boxSpecPageQry"],
    },
    ...(options || {}),
  });
}

/** 纸箱规格详情 GET /operation/showBoxSpec */
export async function showBoxSpec(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.showBoxSpecParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseBoxSpecVO>(
    "/operation/showBoxSpec",
    {
      method: "GET",
      params: {
        ...params,
        boxSpecShowQry: undefined,
        ...params["boxSpecShowQry"],
      },
      ...(options || {}),
    },
  );
}

/** 纸箱规格更新 PUT /operation/updateBoxSpec */
export async function updateBoxSpec(
  body: BusinessAPI.BoxSpecUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseBoxSpecVO>(
    "/operation/updateBoxSpec",
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 纸箱规格更新 PATCH /operation/updateBoxSpec */
export async function updateBoxSpec1(
  body: BusinessAPI.BoxSpecUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseBoxSpecVO>(
    "/operation/updateBoxSpec",
    {
      method: "PATCH",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}
