using GB5Shared.DTO.Framework.Login; namespace FrameworkBLL.DataSync { public interface IDataSyncRunBLL { // Main orchestration entry point — called by scheduler job AND TriggerSyncJob endpoint. // triggeredBy: 0=Scheduler, 1=Manual // Returns the RunId of the created TDSYNCRUNLOG entry. Task ExecuteSyncJobAsync(int syncJobId, byte triggeredBy, int? triggeredByUserId, LoginDTO login, CancellationToken ct); // Called by the background Task.Run inside ExecuteSyncJobAsync on a fresh DI scope. // Exists so the background task resolves a properly-scoped BLL instance rather than // capturing the disposed request-scope instance. Task RunBackgroundAsync(int syncJobId, int runId, LoginDTO login, CancellationToken ct); Task GetSyncRunLog(int runId, LoginDTO login, CancellationToken ct); Task GetSyncRunLogList(int syncJobId, int offset, int pageSize, LoginDTO login, CancellationToken ct); } }