package com.adealink.weparty.account.login.datasource.remote

import com.adealink.frame.base.Rlt
import com.adealink.frame.network.data.Res
import com.adealink.weparty.account.login.data.GoogleLoginReq
import com.adealink.weparty.account.login.data.LoginResult
import com.adealink.weparty.account.login.data.RandomProfile
import com.adealink.weparty.account.login.data.TestLoginReq
import com.adealink.weparty.account.login.phone.data.PhoneLoginReq
import com.adealink.weparty.account.login.phone.data.SendPhoneVerifyReq
import retrofit2.http.Body
import retrofit2.http.Core
import retrofit2.http.POST

interface LoginHttpService {


    @Core
    @POST("user/login/google/enter")
    suspend fun googleLogin(@Body req: GoogleLoginReq): Rlt<Res<LoginResult>>

    @POST("user/login/email/enter")
    suspend fun testLogin(@Body req: TestLoginReq): Rlt<Res<LoginResult>>

    @POST("user/login/mobile/enter")
    suspend fun phoneLogin(@Body req: PhoneLoginReq): Rlt<Res<LoginResult>>

    /**
     * 刷新token
     */
    @Core
    @POST("user/renewalToken")
    suspend fun refreshToken(): Rlt<Res<Any>>


    @POST("user/info/random/profiles")
    suspend fun randomProfile(): Rlt<Res<RandomProfile>>


    @POST("user/login/mobile/sendCode")
    suspend fun sendPhoneVerifyCode(
        @Body req: SendPhoneVerifyReq
    ): Rlt<Res<Any>>


}