import { get, post, download } from '@/api/request';

const env = import.meta.env;
const PREFIX = env.VITE_API_PREFIX_DATA;

export const getSimulationTaskFileApi = (params: any) => {
  return post(`${PREFIX}dataAnalysis/getSimulationTaskFile`, params);
};

export const getCSVDataApi = (params: any) => {
  return get(`${PREFIX}dataAnalysis/getCSVData`, params);
};

export const exportTaskFileByScriptApi = (params: any, filename: string) => {
  return download(`${PREFIX}dataAnalysis/exportTaskFileByScript`, params, filename);
};
export const getSimulationTaskFilesApi = (params: any) => {
  return post(`${PREFIX}dataAnalysis/getSimulationTaskFile`, params);
};
