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

/** 创建员工信息 POST /operation/createEmployee */
export async function createEmployee(
  body: BusinessAPI.EmployeeCreateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseEmployeeVO>(
    "/operation/createEmployee",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

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

/** 封禁员工 POST /operation/disableEmployee */
export async function disableEmployee(
  body: BusinessAPI.EmployeeDisableCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>("/operation/disableEmployee", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 员工信息列表 GET /operation/listEmployee */
export async function listEmployee(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.listEmployeeParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.MultiResponseEmployeeVO>(
    "/operation/listEmployee",
    {
      method: "GET",
      params: {
        ...params,
        employeeListQry: undefined,
        ...params["employeeListQry"],
      },
      ...(options || {}),
    },
  );
}

/** 员工信息列表 GET /operation/pageEmployee */
export async function pageEmployee(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.pageEmployeeParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.PageResponseEmployeeVO>(
    "/operation/pageEmployee",
    {
      method: "GET",
      params: {
        ...params,
        employeePageQry: undefined,
        ...params["employeePageQry"],
      },
      ...(options || {}),
    },
  );
}

/** 重置员工密码 POST /operation/restEmployeePassword */
export async function restEmployeePassword(
  body: BusinessAPI.EmployeeRestPasswordCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>("/operation/restEmployeePassword", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** 员工信息详情 GET /operation/showEmployee */
export async function showEmployee(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: BusinessAPI.showEmployeeParams,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseEmployeeVO>(
    "/operation/showEmployee",
    {
      method: "GET",
      params: {
        ...params,
        employeeShowQry: undefined,
        ...params["employeeShowQry"],
      },
      ...(options || {}),
    },
  );
}

/** 员工信息更新 PUT /operation/updateEmployee */
export async function updateEmployee(
  body: BusinessAPI.EmployeeUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseEmployeeVO>(
    "/operation/updateEmployee",
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 员工信息更新 PATCH /operation/updateEmployee */
export async function updateEmployee1(
  body: BusinessAPI.EmployeeUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.SingleResponseEmployeeVO>(
    "/operation/updateEmployee",
    {
      method: "PATCH",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 修改员工角色 POST /operation/updateEmployeeRole */
export async function updateEmployeeRole(
  body: BusinessAPI.UserRoleUpdateCmd,
  options?: { [key: string]: any },
) {
  return request<BusinessAPI.Response>("/operation/updateEmployeeRole", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}
