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

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

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

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

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

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

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

/** 消息模板更新 PATCH /operation/updateMessageTemplate */
export async function updateMessageTemplate1(
  body: BusinessAPI.MessageTemplateUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseMessageTemplateVO>(
    "/operation/updateMessageTemplate",
    {
      method: "PATCH",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}
