using System;
using System.Threading.Tasks;
using DevHive.Common.Models.Identity;
using DevHive.Services.Models.User;
namespace DevHive.Services.Interfaces
{
public interface IUserService
{
///
/// Log ins an existing user and gives him/her a JWT Token for further authorization
///
/// Login service model, conaining user's username and password
/// A JWT Token for authorization
Task LoginUser(LoginServiceModel loginModel);
///
/// Registers a new user and gives him/her a JWT Token for further authorization
///
/// Register service model, containing the new user's data
/// A JWT Token for authorization
Task RegisterUser(RegisterServiceModel registerModel);
///
/// Get a user by his username. Used for querying profiles without provided authentication
///
/// User's username, who's to be queried
/// The queried user or null, if non existant
Task GetUserByUsername(string username);
///
/// Get a user by his Guid. Used for querying full user's profile
/// Requires authenticated user
///
/// User's username, who's to be queried
/// The queried user or null, if non existant
Task GetUserById(Guid id);
///
/// Updates a user's data, provided a full model with new details
/// Requires authenticated user
///
/// Full update user model for updating
/// Read model of the new user
Task UpdateUser(UpdateUserServiceModel updateUserServiceModel);
///
/// Uploads the given picture and assigns it's link to the user in the database
/// Requires authenticated user
///
/// Contains User's Guid and the new picture to be updated
/// The new picture's URL
Task UpdateProfilePicture(UpdateProfilePictureServiceModel updateProfilePictureServiceModel);
Task AddFriend(Guid id, UpdateFriendServiceModel updateFriendServiceModel);
///
/// Deletes a user from the database and removes his data entirely
/// Requires authenticated user
///
/// The user's Guid, who's to be deleted
/// True if successfull, false otherwise
Task DeleteUser(Guid id);
///
/// We don't talk about that!
///
///
///
Task SuperSecretPromotionToAdmin(Guid userId);
}
}