import request from '@/utils/request'
import { PageType, StrAnyObj, StrAnyObjArr } from '@/typings'

export function getListApi(params?: StrAnyObj): Promise<StrAnyObjArr> {
  return request.get('/sysUser/getList', params)
}

export function getPageApi(params: StrAnyObj): Promise<PageType<StrAnyObj>> {
  return request.get('/sysUser/getPage', params)
}

export function getDetailApi(params: StrAnyObj): Promise<StrAnyObj> {
  return request.get('/sysUser/getDetail', params)
}

export function addApi(data: StrAnyObj): Promise<void> {
  return request.post('/sysUser/add', data)
}

export function editApi(data: StrAnyObj): Promise<void> {
  return request.post('/sysUser/edit', data)
}

export function deleteApi(data: StrAnyObj): Promise<void> {
  return request.post('/sysUser/delete', data)
}

export function resetPwdApi(data: StrAnyObj): Promise<void> {
  return request.post('/sysUser/resetPwd', data)
}
