Добавлен Yandex

This commit is contained in:
2026-04-19 00:22:05 +03:00
parent 586e2b61fd
commit b3c00b1719
24 changed files with 710 additions and 49 deletions

View File

@@ -0,0 +1,17 @@
package com.github.nullptroma.wallenc.domain.auth
/**
* Результат входа через Яндекс (без зависимости от Yandex SDK).
*/
sealed interface RemoteYandexAuthResult {
data class Success(val accessToken: String) : RemoteYandexAuthResult
data class Failure(val message: String) : RemoteYandexAuthResult
data object Cancelled : RemoteYandexAuthResult
}
/**
* Запуск OAuth Яндекса. Реализация только в модуле app (Yandex Auth SDK).
*/
fun interface RemoteYandexSignInLauncher {
fun launch(onResult: (RemoteYandexAuthResult) -> Unit)
}

View File

@@ -1,6 +1,7 @@
package com.github.nullptroma.wallenc.domain.interfaces
import kotlinx.coroutines.flow.StateFlow
import java.util.UUID
interface IVaultsManager {
val localVault: IVault
@@ -8,5 +9,7 @@ interface IVaultsManager {
val remoteVaults: StateFlow<List<IVault>>
val allStorages: StateFlow<List<IStorage>>
val allVaults: StateFlow<List<IVault>>
fun addYandexVault(email: String, token: String)
suspend fun addYandexVault(accessToken: String)
suspend fun removeRemoteVault(vaultUuid: UUID)
}

View File

@@ -0,0 +1,8 @@
package com.github.nullptroma.wallenc.domain.interfaces
/**
* Удалённый vault Яндекс с привязанным аккаунтом (почта для UI).
*/
interface IYandexVault : IVault {
val accountEmail: String
}