using IWS5.Core.DTO;
using IWS5.Core.Models;
using IWS5.Core.Models.Request;
using IWS5.Core.Models.Request.Process;

namespace IWS5.Core.Services;

/// <summary>
/// Interface for managing rights-related operations.
/// </summary>
public interface IRightsService
{
    /// <summary>
    /// Updates the rights based on the provided request.
    /// </summary>
    /// <param name="request">The request containing the rights to be updated.</param>
    /// <returns>A task representing the asynchronous operation.</returns>
    Task UpdateRights(UpdateRightRequest request);

    /// <summary>
    /// Lists the process rights for a specific process and group.
    /// </summary>
    /// <param name="request">The request containing the process ID and group GUID.</param>
    /// <returns>A task that represents the asynchronous operation. The task result contains the process permissions DTO.</returns>
    Task<Response<ProcessPermissionsDTO>> ListProcessRights(ListProcessRightsRequest request);

    /// <summary>
    /// Lists the queue rights for a specific queue and group.
    /// </summary>
    /// <param name="request">The request containing the queue name and group GUID.</param>
    /// <returns>A task that represents the asynchronous operation. The task result contains the queue permission DTO.</returns>
    Task<Response<QueuePermissionDTO>> ListQueuesRights(ListQueuesRightsRequest request);
}
