import request from '~/utils/request.js'

export function getWafLogList(params) {
  return request({
    url: '/v1/admin/wafLog/getList',
    method: 'get',
    params
  })
}

export function getWafLogInfo(id) {
  return request({
    url: '/v1/admin/wafLog/get',
    method: 'get',
    params: { id }
  })
}

// 获取API描述映射
export function getApiDescriptions() {
  return request({
    url: '/v1/admin/wafLog/getApiDescriptions',
    method: 'get'
  })
}

// 导出WAF日志
export function exportWafLog(params) {
  return request({
    url: '/v1/admin/wafLog/export',
    method: 'post',
    data: params,
    responseType: 'blob'
  })
}