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


import cd.casic.ci.process.dto.req.pipeline.*;
import cd.casic.ci.process.dto.resp.context.TreeRunContextResp;
import cd.casic.ci.process.dto.resp.pipeline.PipelineFindResp;
import cd.casic.ci.process.dto.resp.pipeline.PipelineUseCountResp;
import cd.casic.ci.process.process.dataObject.base.BaseIdReq;
import cd.casic.ci.process.process.dataObject.pipeline.PipPipeline;
import cd.casic.framework.commons.pojo.PageResult;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.validation.Valid;

import java.util.List;

/**
 * @author HopeLi
 * @version v1.0
 * @ClassName PipelineService
 * @Date: 2025/5/13 10:27
 * @Description:
 */
public interface PipelineService extends IService<PipPipeline> {
    String createPipeline(@Valid PipelineCreateReq pipelineReq);

    List<PipelineFindResp> findPipelineList(@Valid PipelineQueryReq pipelineQueryReq);

    void deletePipeline(@Valid PipelineReq req);

    void updatePipeline(@Valid PipelineUpdateReq pipeline);

    PageResult<PipelineFindResp> findPipelinePage(@Valid PipelineQueryReq query);

    void pipelineClone(@Valid PipelineReq req);

    PipelineFindResp findPipelineById(@Valid PipelineQueryReq pipelineQueryReq);

    TreeRunContextResp getPipelineRunState(String pipelineId);
    Long getGroupCount(String groupId);

    void transformTemplateByPipeline(@Valid BaseIdReq req);
    Boolean targetVersionInUse(List<String> targetVersionId);

    String aiCreatePipeline(@Valid AiPipelineCreateReq req);

    PipelineUseCountResp countPipelineByUserId(Long userId);
}
