// ***********************************************************************
//
// AgileWebs
//
// ***********************************************************************
using Core.Thalos.Adapters;
using Core.Thalos.Adapters.Common.Enums;
using Core.Thalos.Domain.Contexts.Onboarding.Request;
namespace Core.Thalos.Provider.Contracts
{
public interface IRoleProvider
{
///
/// Creates a new Role.
///
/// The Role to be created.
/// A representing
/// the asynchronous execution of the service.
ValueTask CreateRole(RoleRequest newRole, CancellationToken cancellationToken);
///
/// Gets an Role by identifier.
///
/// The Role identifier.
/// A representing
/// the asynchronous execution of the service.
ValueTask GetRoleById(string _id, CancellationToken cancellationToken);
///
/// Gets all the roles.
///
/// A representing
/// the asynchronous execution of the service.
ValueTask> GetAllRoles(CancellationToken cancellationToken);
///
/// Changes the status of the role.
///
/// The role identifier.
/// The new status of the role.
/// The updated entity.
/// A representing
/// the asynchronous execution of the service.
ValueTask ChangeRoleStatus(string id, Core.Blueprint.Mongo.StatusEnum newStatus, CancellationToken cancellationToken);
///
/// Updates a Role by id.
///
/// The Role to be updated.
/// The Role identifier.
/// 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 representing the asynchronous operation, with the updated role object.
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 representing the asynchronous operation, with the updated role object.
ValueTask RemoveApplicationFromRole(string roleId, ApplicationsEnum application, CancellationToken cancellationToken);
}
}