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

/** 创建消息接收 POST /operation/createMessageReceiver */
export async function createMessageReceiver(
  body: BusinessAPI.MessageReceiverCreateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseMessageReceiverVO>(
    "/operation/createMessageReceiver",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

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

/** 获取未读消息数量 GET /operation/getUnreadCount */
export async function getUnreadCount(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.getUnreadCountParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseInteger>(
    "/operation/getUnreadCount",
    {
      method: "GET",
      params: {
        ...params,
        messageReceiverUnreadCountQry: undefined,
        ...params["messageReceiverUnreadCountQry"],
      },
      ...(options || {}),
    },
  );
}

/** 消息接收列表 GET /operation/listMessageReceiver */
export async function listMessageReceiver(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.listMessageReceiverParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.MultiResponseMessageReceiverVO>(
    "/operation/listMessageReceiver",
    {
      method: "GET",
      params: {
        ...params,
        messageReceiverListQry: undefined,
        ...params["messageReceiverListQry"],
      },
      ...(options || {}),
    },
  );
}

/** 标记消息已读 POST /operation/markReadMessageReceiver */
export async function markReadMessageReceiver(
  body: BusinessAPI.MessageReceiverMarkReadCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>("/operation/markReadMessageReceiver", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 消息接收列表 GET /operation/pageMessageReceiver */
export async function pageMessageReceiver(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.pageMessageReceiverParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.PageResponseMessageReceiverVO>(
    "/operation/pageMessageReceiver",
    {
      method: "GET",
      params: {
        ...params,
        messageReceiverPageQry: undefined,
        ...params["messageReceiverPageQry"],
      },
      ...(options || {}),
    },
  );
}

/** 消息接收详情 GET /operation/showMessageReceiver */
export async function showMessageReceiver(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.showMessageReceiverParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseMessageReceiverVO>(
    "/operation/showMessageReceiver",
    {
      method: "GET",
      params: {
        ...params,
        messageReceiverShowQry: undefined,
        ...params["messageReceiverShowQry"],
      },
      ...(options || {}),
    },
  );
}

/** 消息接收更新 PUT /operation/updateMessageReceiver */
export async function updateMessageReceiver(
  body: BusinessAPI.MessageReceiverUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseMessageReceiverVO>(
    "/operation/updateMessageReceiver",
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 消息接收更新 PATCH /operation/updateMessageReceiver */
export async function updateMessageReceiver1(
  body: BusinessAPI.MessageReceiverUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseMessageReceiverVO>(
    "/operation/updateMessageReceiver",
    {
      method: "PATCH",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}
