Updated on 2026-08-14

This commit is contained in:
Tangem 2025-04-22 17:19:42 +05:00
parent ebbce95832
commit 896da1def0
20 changed files with 564 additions and 9 deletions

1
domain/notifications/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/build

View file

@ -0,0 +1,12 @@
plugins {
alias(deps.plugins.kotlin.jvm)
alias(deps.plugins.kotlin.serialization)
id("configuration")
}
dependencies {
implementation(deps.arrow.core)
implementation(deps.kotlin.coroutines)
implementation(projects.domain.notifications.models)
}

View file

@ -0,0 +1 @@
/build

View file

@ -0,0 +1,5 @@
plugins {
alias(deps.plugins.kotlin.jvm)
alias(deps.plugins.kotlin.serialization)
id("configuration")
}

View file

@ -0,0 +1,7 @@
package com.tangem.domain.notifications.models
data class NotificationsEligibleNetwork(
val id: String,
val networkId: String,
val name: String,
)

View file

@ -0,0 +1,34 @@
package com.tangem.domain.notifications
import com.tangem.domain.notifications.models.NotificationsEligibleNetwork
interface NotificationsRepository {
@Throws
suspend fun createApplicationId(pushToken: String? = null): String
suspend fun saveApplicationId(appId: String)
suspend fun getApplicationId(): String?
@Throws
suspend fun setNotificationsEnabledForWallet(walletId: String, enabled: Boolean)
@Throws
suspend fun associateApplicationIdWithWallets(appId: String, wallets: List<String>)
@Throws
suspend fun isNotificationsEnabledForWallet(walletId: String): Boolean
@Throws
suspend fun setWalletName(walletId: String, walletName: String)
@Throws
suspend fun getWalletName(walletId: String): String?
@Throws
suspend fun sendPushToken(appId: String, pushToken: String)
@Throws
suspend fun getEligibleNetworks(): List<NotificationsEligibleNetwork>
}