import { fetch, post, ApiResponse } from './index'

export function queryMenuPage(params = {}): Promise<ApiResponse<any>> {
  return fetch({ url: '/upms/menu/page', params })
}

export function refreshMenu(params = {}): Promise<ApiResponse<any>> {
  return fetch({ url: '/upms/menu/refresh', params })
}

export function createMenu(params = {}): Promise<ApiResponse<any>> {
  return post({ url: '/upms/menu/create', params })
}

export function removeMenu(params = {}): Promise<ApiResponse<any>> {
  return post({ url: '/upms/menu/remove', params })
}

export function updateMenu(params = {}): Promise<ApiResponse<any>> {
  return post({ url: '/upms/menu/update', params })
}
