Updated on 2026-08-14
This commit is contained in:
parent
ebbce95832
commit
896da1def0
20 changed files with 564 additions and 9 deletions
1
domain/notifications/.gitignore
vendored
Normal file
1
domain/notifications/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/build
|
||||
12
domain/notifications/build.gradle.kts
Normal file
12
domain/notifications/build.gradle.kts
Normal 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)
|
||||
}
|
||||
1
domain/notifications/models/.gitignore
vendored
Normal file
1
domain/notifications/models/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/build
|
||||
5
domain/notifications/models/build.gradle.kts
Normal file
5
domain/notifications/models/build.gradle.kts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
plugins {
|
||||
alias(deps.plugins.kotlin.jvm)
|
||||
alias(deps.plugins.kotlin.serialization)
|
||||
id("configuration")
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.tangem.domain.notifications.models
|
||||
|
||||
data class NotificationsEligibleNetwork(
|
||||
val id: String,
|
||||
val networkId: String,
|
||||
val name: String,
|
||||
)
|
||||
|
|
@ -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>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue