package com.yaoai.pipeline.service;

import com.yaoai.domain.entity.AssemblyTask;

import java.util.List;

public interface AssemblyPipelineService {

    default AssemblyTask startAssembly(Long projectId, Long episodeId, Long tenantId) {
        return startAssembly(projectId, episodeId, tenantId, null);
    }

    /**
     * Creates an async assembly task. When videoTaskIds is provided, the task
     * uses exactly those succeeded video tasks in the given order.
     */
    AssemblyTask startAssembly(Long projectId, Long episodeId, Long tenantId, List<Long> videoTaskIds);

    AssemblyTask getLatest(Long episodeId, Long tenantId);

    String signedDownloadUrl(AssemblyTask task);
}
