// ***********************************************************************
// 
//     AgileWebs
// 
// ***********************************************************************
using Core.Thalos.BuildingBlocks;
using Core.Thalos.Domain.Contexts.Onboarding.Request;
namespace Core.Thalos.Provider.Contracts
{
    /// 
    /// Interface for Role-related service operations.
    /// 
    public interface IRoleProvider
    {
        /// 
        /// Creates a new Role.
        /// 
        /// The Role to be created.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask CreateRole(RoleRequest newRole, CancellationToken cancellationToken);
        /// 
        /// Gets a Role by its identifier.
        /// 
        /// The Role Mongo identifier.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask GetRoleById(string _id, CancellationToken cancellationToken);
        /// 
        /// Gets all Roles.
        /// 
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask> GetAllRoles(CancellationToken cancellationToken);
        /// 
        /// Changes the status of a Role.
        /// 
        /// The Role Mongo identifier.
        /// The new status of the Role.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask ChangeRoleStatus(string _id, Core.Blueprint.Mongo.StatusEnum newStatus, CancellationToken cancellationToken);
        /// 
        /// Updates a Role.
        /// 
        /// The Role to be updated.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask UpdateRole(RoleAdapter entity, CancellationToken cancellationToken);
        /// 
        /// Adds an application to the Role's list of applications.
        /// 
        /// The identifier of the Role to which the application will be added.
        /// The application enum value to add.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous operation with the updated Role.
        /// 
        ValueTask AddApplicationToRole(string roleId, ApplicationsEnum application, CancellationToken cancellationToken);
        /// 
        /// Removes an application from the Role's list of applications.
        /// 
        /// The identifier of the Role from which the application will be removed.
        /// The application enum value to remove.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous operation with the updated Role.
        /// 
        ValueTask RemoveApplicationFromRole(string roleId, ApplicationsEnum application, CancellationToken cancellationToken);
        /// 
        /// Deletes a Role by its identifier.
        /// 
        /// The Role Mongo identifier.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask DeleteRole(string _id, CancellationToken cancellationToken);
    }
}