package cd.casic.ci.process.process.service.sast;

import cd.casic.ci.process.dto.req.sast.*;
import cd.casic.ci.process.dto.resp.sast.*;
import cd.casic.framework.commons.pojo.PageParam;
import cd.casic.framework.commons.pojo.PageResult;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import jakarta.servlet.http.HttpServletResponse;

import java.io.File;
import java.util.List;

public interface SastService {
    String getToken();
    Boolean applicationExist(String applicationName);
    public SastFileUploadResp uploadFile(File multipartFile);
    public SastIdentifiedLanguageTaskResp createIdentifiedLanguageTask(SastIdentifiedLanguageTaskReq req);
    public SastIdentifiedLanguageTaskResp getIdentifiedLanguageTaskStatus(String taskId);
    List<SastEngineConfigResp> engineConfig(List<String> languageIdList);
    SastDetectionConfigResp detectionConfig(String languageId);
    SastApplicationCreateResp applicationCreate(SastApplicationCreateReq req);
    SastApplicationCreateResp applicationStash(SastApplicationStashReq req);
    SastApplicationEchoResp getApplicationEcho(String applicationId);
    String reportIndex(SastReportCreateReq req);
    public String reportDownload(String reportId);
    public List<SastLanguageResp> language();
    public PageResult<SastReportResp> reportList(PageParam pageParam);

    public void reportDelete(String reportId);

    public SastApplicationStatusResp getApplicationStatus(String applicationId);

    public JSONObject jsonReportDownload(String reportId);
    public SastReportStatusResp getReportStatus(String reportId);
    SastApplicationStashResp stashScan(String applicationId);
    List<SastEngineLogResp> engineLog(String applicationId);
    SastApplicationBinaryStashResp applicationBinaryStash(SastApplicationBinaryStashReq req) ;
    SastApplicationStashResp binaryStashScan(String applicationId);
    void saveReportVulInfo(List<SastVulInfoReq> list,String targetType,String targetName,String city,String instanceId,String taskId,String taskType);
}
