add gigawear auth repository

This commit is contained in:
2026-09-14 18:30:53 +03:00
parent e77046018d
commit f41d7aec33
23 changed files with 254 additions and 41 deletions
@@ -0,0 +1,20 @@
package ru.shadowsparky.gigawear.common
import kotlinx.serialization.Serializable
import ru.shadowsparky.http.domain.TokenInfo
interface AuthRepository {
suspend fun login(request: LoginRequest): TokenInfo
suspend fun update(oldTokenInfo: TokenInfo): TokenInfo
companion object {
const val LOGIN_PATH = "login"
const val UPDATE_TOKEN_PATH = "updateToken"
}
}
@Serializable
data class LoginRequest(
val login: String,
val code: Int
)