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

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

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

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