namespace FrameworkSL.Hubs.DataSync { // Strongly-typed SignalR client contract for the DataSyncHub. // Hub group: "datasync:{runId}" — client joins via JoinRunGroup(int runId). public interface IDataSyncClient { // Sent per chunk: table name, chunk number, rows written so far Task ReceiveProgress(SyncProgressDTO progress); // Sent once on run completion (success, partial failure, or failure) Task ReceiveRunCompleted(SyncRunSummaryDTO summary); // Sent on run failure or validation error Task ReceiveError(int runId, string message); } public sealed record SyncProgressDTO( int RunId, string TableName, int ChunkNumber, int RowsInChunk, int TotalRowsSoFar, string Status); public sealed record SyncRunSummaryDTO( int RunId, int SyncJobId, byte Status, int TotalRows, int InsertedRows, int UpdatedRows, int DeletedRows, int SkippedRows, string? ErrorDetail, DateTime StartedAt, DateTime EndedAt); }