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

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

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

/** 瓜农发票列表 GET /operation/listSupplierInvoice */
export async function listSupplierInvoice(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.listSupplierInvoiceParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.MultiResponseSupplierInvoiceVO>(
    "/operation/listSupplierInvoice",
    {
      method: "GET",
      params: {
        ...params,
        supplierInvoiceListQry: undefined,
        ...params["supplierInvoiceListQry"],
      },
      ...(options || {}),
    },
  );
}

/** 瓜农发票列表 GET /operation/pageSupplierInvoice */
export async function pageSupplierInvoice(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.pageSupplierInvoiceParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.PageResponseSupplierInvoiceVO>(
    "/operation/pageSupplierInvoice",
    {
      method: "GET",
      params: {
        ...params,
        supplierInvoicePageQry: undefined,
        ...params["supplierInvoicePageQry"],
      },
      ...(options || {}),
    },
  );
}

/** 瓜农发票详情 GET /operation/showSupplierInvoice */
export async function showSupplierInvoice(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.showSupplierInvoiceParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseSupplierInvoiceVO>(
    "/operation/showSupplierInvoice",
    {
      method: "GET",
      params: {
        ...params,
        supplierInvoiceShowQry: undefined,
        ...params["supplierInvoiceShowQry"],
      },
      ...(options || {}),
    },
  );
}

/** 瓜农发票更新 PUT /operation/updateSupplierInvoice */
export async function updateSupplierInvoice(
  body: BusinessAPI.SupplierInvoiceUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseSupplierInvoiceVO>(
    "/operation/updateSupplierInvoice",
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 瓜农发票更新 PATCH /operation/updateSupplierInvoice */
export async function updateSupplierInvoice1(
  body: BusinessAPI.SupplierInvoiceUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseSupplierInvoiceVO>(
    "/operation/updateSupplierInvoice",
    {
      method: "PATCH",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}
