package com.fabledsword.minstrel.api.endpoints

import com.fabledsword.minstrel.models.wire.LoginRequestBody
import com.fabledsword.minstrel.models.wire.LoginResponseWire
import retrofit2.http.Body
import retrofit2.http.POST

/**
 * Retrofit interface for `/api/auth`. Mirrors
 * `flutter_client/lib/api/endpoints/auth.dart`.
 *
 * The actual session-cookie capture happens in
 * [com.fabledsword.minstrel.api.AuthCookieInterceptor]; we don't
 * pass the response `token` around manually.
 */
interface AuthApi {
    @POST("api/auth/login")
    suspend fun login(@Body body: LoginRequestBody): LoginResponseWire

    @POST("api/auth/logout")
    suspend fun logout()
}
