// 数据导出相关
import { request } from '@/utils/request/index.ts';
// 列表接口
export const listApi = async (data?: Record<string, any>) => {
  return await request({
    url: `/data/list_info`,
    method: 'GET',
    params: data
  })
};

// 更新标注
export const updateLabelApi  = async (data: Record<string, any>) => {
  return await request({
    url: `/data/save_label`,
    method: 'POST',
    data: data
  })
}

// 获取导出数据文件在线地址
export const getExportUrlApi = async (data: Record<string, any>) => {
  return await request({
    url: `/data/export_data`,
    method: 'GET',
    params: data,
    getRaw: true
  })
}

// 导入标注
export const importLabelByFileApi = async (data: Record<string, any>) => {
return await request({
   url: `/data/batch_label`,
    method: 'POST',
    headers: {
      Accept: 'application/json',
      authorization: `Bearer ${localStorage.token}`
    },
    data,
    dataRaw: true,
  })
}
