// ***********************************************************************
//
// AgileWebs
//
// ***********************************************************************
using Core.Blueprint.Storage.Adapters;
using Core.Thalos.Adapters;
using Core.Thalos.Adapters.Common.Enums;
using Core.Thalos.Domain.Contexts.Onboarding.Request;
namespace Core.Thalos.Provider.Contracts
{
public interface IUserService
{
///
/// Creates a new User.
///
/// The User to be created.
/// A representing
/// the asynchronous execution of the service.
Task CreateUserService(UserRequest newUser);
///
/// Gets an User by identifier.
///
/// The User identifier.
/// A representing
/// the asynchronous execution of the service.
Task GetUserByIdService(string id);
///
/// Gets all the users.
///
/// A representing
/// the asynchronous execution of the service.
Task> GetAllUsersService();
///
/// Gets an User by email.
///
/// The User email.
/// A representing
/// the asynchronous execution of the service.
Task GetUserByEmailService(string? email);
///
/// Validates if a users exists by email.
///
/// The User email.
/// A representing
/// the asynchronous execution of the service.
Task ValidateUserExistenceService(string? email);
///
/// Changes the status of the user.
///
/// The user identifier.
/// The new status of the user.
/// A representing
/// the asynchronous execution of the service.
Task ChangeUserStatusService(string id, StatusEnum newStatus);
///
/// Updates a User by id.
///
/// The User to be updated.
/// The User identifier.
/// A representing
/// the asynchronous execution of the service.
Task UpdateUserService(UserAdapter entity, string id);
///
/// Logs in the user.
///
/// The User's email.
/// A representing
/// the asynchronous execution of the service.
Task LogInUserService(string email);
///
/// Logs out the user's session.
///
/// The User's email.
/// A representing
/// the asynchronous execution of the service.
Task LogOutUserSessionService(string email);
///
/// Adds a company to the user's list of companies.
///
/// The identifier of the user to whom the company will be added.
/// The identifier of the company to add.
/// A representing the asynchronous operation, with the updated user object.
Task AddCompanyToUserService(string userId, string companyId);
///
/// Removes a company from the user's list of companies.
///
/// The identifier of the user from whom the company will be removed.
/// The identifier of the company to remove.
/// A representing the asynchronous operation, with the updated user object.
Task RemoveCompanyFromUserService(string userId, string companyId);
///
/// Adds a project to the user's list of projects.
///
/// The identifier of the user to whom the project will be added.
/// The identifier of the project to add.
/// A representing the asynchronous operation, with the updated user object.
Task AddProjectToUserService(string userId, string projectId);
///
/// Removes a project from the user's list of projects.
///
/// The identifier of the user from whom the project will be removed.
/// The identifier of the project to remove.
/// A representing the asynchronous operation, with the updated user object.
Task RemoveProjectFromUserService(string userId, string projectId);
///
/// Gets the token adapter for a user.
///
/// The user's email.
/// A representing the asynchronous execution of the service.
Task GetTokenAdapter(string email);
}
}