import apiRequest from '@/network/http/apiRequest'

/**
 * 获取Api Request分页
 * @param data
 * @returns
 */
export function getApiRequestByPage(data: any) {
  return apiRequest({
    url: '/paas/api/request/page',
    method: 'GET',
    params: data,
  })
}

/**
 * 获取Api Request列表
 * @param data
 * @returns
 */
export function getApiRequestByList(data: any) {
  return apiRequest({
    url: '/paas/api/request',
    method: 'GET',
    params: data,
  })
}

/**
 * 根据Id获取Api Request
 * @param reqId
 * @returns
 */
export function getApiRequestById(reqId: number) {
  return apiRequest({
    url: `/paas/api/request/${reqId}`,
    method: 'GET',
  })
}

/**
 * 删除Api
 * @param reqId
 * @returns
 */
export function deleteApiRequestById(reqId: number) {
  return apiRequest({
    url: `/paas/api/request/${reqId}`,
    method: 'DELETE',
  })
}
