import { request } from '@/plugins/http-fetch';

/**
 * 查询SGWC-CDR会话事件
 * @param query 查询参数
 * @returns object
 */
export function listSGWCDataCDR(query: Record<string, any>) {
  return request({
    url: '/neData/sgwc/cdr/list',
    method: 'GET',
    params: query,
    timeout: 60_000,
  });
}

/**
 * SGWC-CDR会话删除
 * @param id 信息ID
 * @returns object
 */
export function delSGWCDataCDR(cdrIds: string | number) {
  return request({
    url: `/neData/sgwc/cdr/${cdrIds}`,
    method: 'DELETE',
    timeout: 60_000,
  });
}

/**
 * SGWC-CDR会话列表导出
 * @param data 查询列表条件
 * @returns object
 */
export function exportSGWCDataCDR(data: Record<string, any>) {
  return request({
    url: '/neData/sgwc/cdr/export',
    method: 'POST',
    data,
    responseType: 'blob',
    timeout: 60_000,
  });
}
