using e_suite.Database.Audit;
using e_suite.Utilities.Pagination;
using eSuite.Core.Miscellaneous;

namespace e_suite.API.Common;

public interface IWorkflowTemplateManager
{
    Task<PaginatedData<GetWorkflowTemplate>> GetWorkflowTemplatesAsync(Paging paging, CancellationToken cancellationToken);

    Task<PaginatedData<GetWorkflowTemplateVersion>> GetWorkflowTemplateVersionsAsync(Paging paging, CancellationToken cancellationToken);
    Task<GetWorkflowTemplateVersion?> GetWorkflowTemplateAsync(GeneralIdRef generalIdRef, CancellationToken cancellationToken);
    Task EditTemplateVersion(AuditUserDetails auditUserDetails, GetWorkflowTemplateVersion template, CancellationToken cancellationToken);
    Task PatchTemplateVersion(AuditUserDetails auditUserDetails, IGeneralIdRef templateId, PatchWorkflowTemplateVersion patchTemplate, CancellationToken cancellationToken);
    Task PostTemplateVersion(AuditUserDetails auditUserDetails, CreateWorkflowTemplateVersion template, CancellationToken cancellationToken);
    Task DeleteTemplateVersion(AuditUserDetails auditUserDetails, IGeneralIdRef templateId, CancellationToken cancellationToken);
    Task<List<TaskMetadata>> GetAllowedTaskMetadataList(string taskType, CancellationToken cancellationToken);
    Task DeleteTemplate(AuditUserDetails auditUserDetails, GeneralIdRef templateId, CancellationToken cancellationToken);
}