using EntitlementDAL.DTOs; using GB5Shared.DTO.Framework.Login; namespace EntitlementBLL.Interfaces; public interface IEntitlementAuditBLL { Task> GetEntitlementLogAsync(int clientId, LoginDTO login, CancellationToken ct); Task> GetFlagLogAsync(int featureFlagId, LoginDTO login, CancellationToken ct); /// Writes a standalone LENTITLEMENTAUDIT row for actions that don't originate from a /// specific Save/Update BLL call (e.g. Dapr-driven lifecycle events: GOLIVE_ACTIVATED, /// ENGAGEMENT_COMPLETED) — SL must go through this rather than IAuditDAL directly. Task LogActionAsync(int clientId, int subscriptionId, string action, string? remarks, LoginDTO login, CancellationToken ct); } // Also exposes CRUD for MENTITLEMENT itself (Entitlement.svc Save/Delete) and Feature/FeatureGroup // menu-set mapping saves, grouped here to avoid a 1:1 interface-per-detail-table explosion. public interface IEntitlementCrudBLL { Task SaveAsync(EntitlementDTO dto, LoginDTO login, CancellationToken ct); Task DeleteAsync(int entitlementId, LoginDTO login, CancellationToken ct); Task> GetFeatureListAsync(LoginDTO login, CancellationToken ct); /// Paged admin list of MENTITLEMENT grants (Entitlement.svc/GetList). Filters: /// clientId/featureId/entitlementSource = -1 for any; isEnabled = null for any. Task> GetListAsync( int clientId, int featureId, int entitlementSource, bool? isEnabled, int page, int pageSize, LoginDTO login, CancellationToken ct); }