using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Threading.Tasks; using LCU.Library.Internal.DispatcherModels.Entities; namespace LCU.Api.Internal.DispatcherLib.Repositories; public interface IWorkItemRepository { Task> ListAsync(); Task FindByIdAsync(int id); Task> FindByJobIdAsync(int jobId); Task> FindByJobIdWithExecutionsAsync(int jobId, int numberOfWorkItemExecutions, int numberOfExecutionMessages); Task GetFirstOrDefaultWorkItemByJobId(int jobId); Task GetNextWorkItemByJobId(int jobId, int currentWorkItemOrder); Task GetTrackedWorkItem(int workItemId); Task AddAsync(WorkItem workItem); void AddList(IEnumerable workItems); void Update(WorkItem workItem); void RemoveList(IEnumerable workItems); }