using Refit;
using Sledgemapper.Shared.Entities;
using System.Net.Http;
using System.Threading.Tasks;

namespace Sledgemapper
{
    [Headers("Authorization: Bearer")]
    public interface IMapApi
    {
        [Get("/session/{sessionName}")]
        Task<Session> Session(string sessionName);

        [Post("/session/{sessionName}")]
        Task<bool> NewSession(string sessionName);

        [Post("/session/{sessionName}/snapshot")]
        Task SaveSnapshot([Body] Session session, string sessionName);

        [Post("/session/{sessionName}/tile")]
        Task NewTile([Body] Tile tile, string sessionName);

        [Post("/session/{sessionName}/overlay")]
        Task NewOverlay([Body] Overlay overlay, string sessionName);

        [Post("/session/{sessionName}/wall")]
        Task NewWall([Body] Wall overlay, string sessionName);

        [Delete("/session/{sessionName}/wall")]
        Task DeleteWall([Body] Wall wall, string sessionName);

        [Delete("/session/{sessionName}/tile")]
        Task DeleteTile([Body] Tile tile, string sessionName);

        [Delete("/session/{sessionName}/overlay")]
        Task DeleteOverlay([Body] Overlay overlay, string sessionName);


    [Headers("Authorization")]
        [Post("/users/register")]
        Task<HttpResponseMessage> Register([Body] RegisterModel registerModel);

    [Headers("Authorization")]
        [Post("/users/authenticate")]
        Task<AuthenticateResponse> Authenticate([Body] AuthenticateModel registerModel);
    }
}