import type {
  TSimChannelsDeleteParam,
  TSimChannelsEditParam,
  TSimChannelsExportParam,
  TSimChannelsListParam,
  TSimChannelsListRes,
  TSimChannelsModel,
  TSimChannelsViewModel,
  TSimChannelsViewParam,
  TSimChannelsViewRes,
} from './type';

import { requestClient } from '#/api/request';

// 获取通道列表列表
export function List(params:any) {
  return requestClient.get<any>('iot/tSimChannels/list', { params });
}

// 删除/批量删除通道列表
export function Delete(params:any) {
  return requestClient.post<any>('iot/tSimChannels/delete', { ...params });
}

// 添加/编辑通道列表
export function Edit(params:any) {
  return requestClient.post<any>('iot/tSimChannels/edit', { ...params });
}

// 获取通道列表指定详情
export function View(params:any) {
  return requestClient.get<any>('iot/tSimChannels/view', { params });
}

// 导出通道列表
export function Export(params:any) {
  return requestClient.post<Blob>('/iot/tSimChannels/export',  { ...params } , {
    headers: { 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8' },
    responseType: 'blob',
  });
}