package com.salpa.subject.service;

import com.salpa.subject.domain.MonitorProjectSyncTask;
import com.salpa.subject.domain.data.DatabaseDocumentSimpleResponse;
import com.salpa.subject.domain.data.TableDocumentResponse;

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

public interface DocumentService {

    int createSyncTask(Integer projectId, Long userId, boolean ignoreIfExists);

    List<Map<String ,Object>> getVersionsByProjectId(Integer projectId);

    List<Map<String ,Object>> getTableDocumentByProjectId(Integer projectId, Long version, String search);

    List<MonitorProjectSyncTask> getSyncTaskList(Integer[] taskIds);

    int cancelTask(Integer taskId);

    void export(Integer projectId, Long version, String fileType, OutputStream out);

    DatabaseDocumentSimpleResponse getSimpleByProjectId(Integer projectId, Long version, String search, Long originalVersion);

    TableDocumentResponse getTableDetail(Integer id,Integer projectId,Long version,Long originalVersion);

    void updateSyncTask(int syncTask);

    String getSyncTaskStatus(Integer taskId);
}
