package com.zaojiao.app.core.auth.http

import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface AuthApi {
    @POST("/app/sms/v2/checkCode/app/{phone}/{code}")
    suspend fun loginBySms(
        @Path(value = "phone") phone: String,
        @Path(value = "code") code: String,
    ): AuthResult

    @GET("/app/login/v2/{code}")
    suspend fun loginByWechat(
        @Path(value = "code") code: String,
    ): AuthResult

    @POST("/app/login/oneClickLogin")
    suspend fun loginByOneClick(
        @Body token: String,
    ): AuthResult

    @POST("app/login/refreshToken/{refreshToken}")
    suspend fun refreshToken(
        @Path(value = "refreshToken") refreshToken: String,
    ): AuthResult
}