using GB5Shared.DTO.Framework.Login; using GB5Shared.DTO.Report; using GB5Shared.Export.Pivot; namespace GB5Shared.Export { public interface IReportExport { // --- Original overloads: data is fetched internally via ReportURICalling --- Task ExcelExport(ReportCallingDTO reportCallingDTO, LoginDTO loginDTO, CancellationToken cancellationToken); Task CSVExport(ReportCallingDTO reportCallingDTO, LoginDTO loginDTO, CancellationToken cancellationToken); Task JsonReport(ReportCallingDTO reportCallingDTO, LoginDTO loginDTO, CancellationToken cancellationToken); Task PdfExport(ReportCallingDTO reportCallingDTO, LoginDTO loginDTO, CancellationToken cancellationToken); Task PdfNativeExport(ReportCallingDTO reportCallingDTO, LoginDTO loginDTO, CancellationToken cancellationToken); // --- Pre-fetched data overloads: caller supplies rows, no internal re-fetch --- Task ExcelExport(ReportCallingDTO reportCallingDTO, LoginDTO loginDTO, IAsyncEnumerable> data, CancellationToken cancellationToken); Task CSVExport(ReportCallingDTO reportCallingDTO, LoginDTO loginDTO, IAsyncEnumerable> data, CancellationToken cancellationToken); Task JsonReport(ReportCallingDTO reportCallingDTO, LoginDTO loginDTO, IAsyncEnumerable> data, CancellationToken cancellationToken); Task PdfExport(ReportCallingDTO reportCallingDTO, LoginDTO loginDTO, IAsyncEnumerable> data, CancellationToken cancellationToken); Task PdfNativeExport(ReportCallingDTO reportCallingDTO, LoginDTO loginDTO, IAsyncEnumerable> data, CancellationToken cancellationToken); Task GetReportFormat(int reportFormatId, LoginDTO loginDTO); Task GetReport(int reportId, LoginDTO loginDTO); Task> GetReportView(int reportViewId, LoginDTO loginDTO); Task> GetStandardFields(string ouId, LoginDTO loginDTO); Task> GetReportViewField(int reportViewId, int fieldIsDisplay, LoginDTO loginDTO); Task GetReportViewMeta(int reportViewId, LoginDTO loginDTO, CancellationToken ct); Task> GetPivotFieldConfig(int reportViewId, LoginDTO loginDTO, CancellationToken ct); /// /// Single dispatch entry-point for all export formats. /// Adding a new format only requires changes inside — never in endpoint base classes. /// NdJsonStream (code 6) is handled at the endpoint level and must NOT be passed here. /// Task ExportAsync( int formatCode, ReportCallingDTO reportCallingDTO, LoginDTO loginDTO, IAsyncEnumerable> rows, CancellationToken ct); } }