// *********************************************************************** // // AgileWebs // // *********************************************************************** using Core.Thalos.BuildingBlocks; using Core.Thalos.Domain.Contexts.Onboarding.Request; namespace Core.Thalos.Provider.Contracts { public interface IUserProvider { /// /// Creates a new User. /// /// The User to be created. /// A representing /// the asynchronous execution of the service. ValueTask CreateUser(UserRequest newUser, CancellationToken cancellationToken); /// /// Gets an User by identifier. /// /// The User identifier. /// A representing /// the asynchronous execution of the service. ValueTask GetUserById(string _id, CancellationToken cancellationToken); /// /// Gets all the users. /// /// A representing /// the asynchronous execution of the service. ValueTask> GetAllUsers(CancellationToken cancellationToken); /// /// Gets an User by email. /// /// The User email. /// A representing /// the asynchronous execution of the service. ValueTask GetUserByEmail(string? email, CancellationToken cancellationToken); /// /// Validates if a users exists by email. /// /// The User email. /// A representing /// the asynchronous execution of the service. ValueTask ValidateUserExistence(string? email, CancellationToken cancellationToken); /// /// Changes the status of the user. /// /// The user identifier. /// The new status of the user. /// A representing /// the asynchronous execution of the service. ValueTask ChangeUserStatus(string id, Blueprint.Mongo.StatusEnum newStatus, CancellationToken cancellationToken); /// /// Updates a User by id. /// /// The User to be updated. /// The User identifier. /// A representing /// the asynchronous execution of the service. ValueTask UpdateUser(UserAdapter entity, CancellationToken cancellationToken); /// /// Logs in the user. /// /// The User's email. /// 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 representing /// the asynchronous execution of the service. ValueTask LogOutUserSession(string email, CancellationToken cancellationToken); /// /// Gets the token adapter for a user. /// /// The user's email. /// A representing the asynchronous execution of the service. ValueTask GetToken(string email, CancellationToken cancellationToken); /// /// Delete an User by identifier. /// /// The User identifier. /// A representing /// the asynchronous execution of the service. ValueTask DeleteUser(string _id, CancellationToken cancellationToken); } }