using FrameworkDAL.DTO.DirectAction; using GB5Shared.DTO.Framework.Login; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; namespace FrameworkDAL.CustomCode.DirectAction { public interface IDirectActionConfigDAL { Task GetHeaderByIdAsync( int directActionId, LoginDTO login, CancellationToken ct = default); Task> GetDetailsByDirectActionIdAsync( int directActionId, LoginDTO login, CancellationToken ct = default); Task GetDetailByActionCodeAsync( string actionCode, LoginDTO login, CancellationToken ct = default); Task> GetAllActiveDetailsAsync( LoginDTO login, CancellationToken ct = default); /// /// Returns the first pending workflow task for the given entity ObjectId. /// Used by EventSubBLL when the event payload is an entity DTO (not a WF notification) /// and ContextId/AssigneeUserId must be resolved from TWORKFLOWTASK. /// Returns null when no pending task exists. /// Task<(int WorkflowTaskId, int AssigneeUserId)?> GetPendingWorkflowTaskAsync( int objectId, LoginDTO login, CancellationToken ct = default); /// Resolves a Published MEIPFLOWDEFINITION.FlowCode for the given FlowId /// (MDIRECTACTIONDETAIL.FLOWID), or null if FlowId is not set or not published. Task GetFlowCodeByFlowIdAsync( int flowId, int tenantId, LoginDTO login, CancellationToken ct = default); } }