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

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

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

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