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

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

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

/** 发货单生成单据 PUT /operation/generateDocumentOrderShip */
export async function generateDocumentOrderShip(
  body: BusinessAPI.OrderShipGenerateDocumentCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>("/operation/generateDocumentOrderShip", {
    method: "PUT",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 发货单生成单据 PATCH /operation/generateDocumentOrderShip */
export async function generateDocumentOrderShip1(
  body: BusinessAPI.OrderShipGenerateDocumentCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>("/operation/generateDocumentOrderShip", {
    method: "PATCH",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

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

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

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

/** 发货单更新 PUT /operation/updateOrderShip */
export async function updateOrderShip(
  body: BusinessAPI.OrderShipUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseOrderShipVO>(
    "/operation/updateOrderShip",
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 发货单更新 PATCH /operation/updateOrderShip */
export async function updateOrderShip1(
  body: BusinessAPI.OrderShipUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseOrderShipVO>(
    "/operation/updateOrderShip",
    {
      method: "PATCH",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}
