package com.ruoyi.platform.service;

import com.ruoyi.platform.domain.Dataset;
import com.ruoyi.platform.vo.LabelDatasetVersionVo;
import com.ruoyi.platform.vo.NewDatasetVo;
import com.ruoyi.platform.vo.QueryModelMetricsVo;
import org.springframework.core.io.InputStreamResource;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface NewDatasetService {


    String newCreateDataset(NewDatasetVo datasetVo) throws Exception;

    String newCreateVersion(NewDatasetVo datasetVo) throws Exception;

    List<Map<String, String>> uploadDatasetlocal(MultipartFile[] files, String uuid) throws Exception;

    ResponseEntity<InputStreamResource> downloadDatasetlocal(String filePath) throws Exception;

    ResponseEntity<InputStreamResource> downloadAllDatasetFilesNew(String name, String identifier, Integer id, String version, Boolean isPublic) throws IOException, Exception;

    Page<NewDatasetVo> newPersonalQueryByPage(Dataset dataset, PageRequest pageRequest) throws Exception;

    Page<NewDatasetVo> newPubilcQueryByPage(Dataset dataset, PageRequest pageRequest) throws Exception;

    NewDatasetVo getNewDatasetDesc(Integer repoId, String name, String repo, String owner, String version, Boolean isPublic) throws Exception;

    List<Map<String, Object>> getVersionList(String repo, String owner) throws Exception;

    void deleteDatasetNew(Integer repoId, String repo, String owner, Boolean isPublic) throws Exception;

    void deleteDatasetVersionNew(Integer repoId, String repo, String owner, String version, String relativePath) throws Exception;

    Map<String, Object> getVersionsCompare(QueryModelMetricsVo querydatasetVo) throws Exception;

    String newCreateVersionFromLabelStudio(LabelDatasetVersionVo datasetVo) throws Exception;

    List<NewDatasetVo> convert(List<Map<String, Object>> lst, String datasetTopic, String datasetTagName, String datasetTypeName);
}
