using FastEndpoints;
using FrameworkBLL.SchedulerTaskGenerator;
using FrameworkDAL.CustomCode.SchedulerTaskGenerator;
using GB5Shared.DTO.Framework.Login;
using GB5Shared.DTO.Framework.ResponseStandard;
using GB5Shared.FastEndPoint;
using System;
using System.Threading;
using System.Threading.Tasks;
using static GB5Shared.GB5Constant.Constant;
namespace FrameworkSL.Endpoints.SchedulerTaskGenerator
{
///
/// Returns a full scheduler monitor view — all active jobs with:
/// - Latest execution status (Pending / Running / Success / Failed / DLQ)
/// - Next run countdown (computed in BLL)
/// - Action types (Mail, SMS, WebService, WhatsApp, etc.)
/// - Retry count and last error message
/// - Duration in milliseconds
/// - Summary counts by status
///
/// GET /Scheduler/Monitor
///
/// ✅ This endpoint ONLY calls ISchedulerMonitorBLL.GetMonitorAsync.
/// It never calls BLL internals (ComputeNextRun etc.) — CS0122 fixed.
///
public sealed class GetSchedulerMonitorEndpoint
: BaseEndpoint<
GetSchedulerMonitorEndpoint.GetSchedulerMonitorParameters,
ResponseStandardDTO