// ***********************************************************************
// 
//     AgileWebs
// 
// ***********************************************************************
using Core.Thalos.BuildingBlocks;
using Core.Thalos.Domain.Contexts.Onboarding.Request;
namespace Core.Thalos.Provider.Contracts
{
    /// 
    /// Interface for User-related service operations.
    /// 
    public interface IUserProvider
    {
        /// 
        /// Creates a new User.
        /// 
        /// The User to be created.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask CreateUser(UserRequest newUser, CancellationToken cancellationToken);
        /// 
        /// Gets a User by Mongo identifier.
        /// 
        /// The User Mongo identifier.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask GetUserById(string _id, CancellationToken cancellationToken);
        /// 
        /// Gets all Users.
        /// 
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask> GetAllUsers(CancellationToken cancellationToken);
        /// 
        /// Gets a User by email.
        /// 
        /// The User's email.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask GetUserByEmail(string email, CancellationToken cancellationToken);
        /// 
        /// Validates if a User exists by email.
        /// 
        /// The User's email.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask ValidateUserExistence(string email, CancellationToken cancellationToken);
        /// 
        /// Changes the status of a User.
        /// 
        /// The User Mongo identifier.
        /// The new status of the User.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask ChangeUserStatus(string _id, Blueprint.Mongo.StatusEnum newStatus, CancellationToken cancellationToken);
        /// 
        /// Updates a User.
        /// 
        /// The User to be updated.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask UpdateUser(UserAdapter entity, CancellationToken cancellationToken);
        /// 
        /// Logs in the User.
        /// 
        /// The User's email.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask LogInUser(string email, CancellationToken cancellationToken);
        /// 
        /// Logs out the User's session.
        /// 
        /// The User's email.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask LogOutUserSession(string email, CancellationToken cancellationToken);
        /// 
        /// Gets the TokenAdapter for a User.
        /// 
        /// The User's email.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask GetToken(string email, CancellationToken cancellationToken);
        /// 
        /// Deletes a User by Mongo identifier.
        /// 
        /// The User Mongo identifier.
        /// A token to cancel the asynchronous operation.
        /// 
        /// A  representing the asynchronous execution of the service.
        /// 
        ValueTask DeleteUser(string _id, CancellationToken cancellationToken);
    }
}