main.com.sceyt.chatuikit.persistence.repositories.ChannelsRepository.kt Maven / Gradle / Ivy
package com.sceyt.chatuikit.persistence.repositories
import com.sceyt.chat.models.member.Member
import com.sceyt.chatuikit.data.models.SceytResponse
import com.sceyt.chatuikit.data.models.channels.CreateChannelData
import com.sceyt.chatuikit.data.models.channels.EditChannelData
import com.sceyt.chatuikit.data.models.channels.GetAllChannelsResponse
import com.sceyt.chatuikit.data.models.channels.SceytChannel
import com.sceyt.chatuikit.data.models.channels.SceytMember
import kotlinx.coroutines.flow.Flow
interface ChannelsRepository {
suspend fun getChannel(id: Long): SceytResponse
suspend fun getChannelFromServerByUrl(url: String): SceytResponse>
suspend fun getChannels(query: String): SceytResponse>
suspend fun getAllChannels(limit: Int): Flow
suspend fun loadMoreChannels(): SceytResponse>
suspend fun createChannel(channelData: CreateChannelData): SceytResponse
suspend fun leaveChannel(channelId: Long): SceytResponse
suspend fun clearHistory(channelId: Long, forEveryone: Boolean): SceytResponse
suspend fun hideChannel(channelId: Long): SceytResponse
suspend fun markChannelAsRead(channelId: Long): SceytResponse
suspend fun markChannelAsUnRead(channelId: Long): SceytResponse
suspend fun blockChannel(channelId: Long): SceytResponse
suspend fun unBlockChannel(channelId: Long): SceytResponse
suspend fun uploadAvatar(avatarUri: String): SceytResponse
suspend fun editChannel(channelId: Long, data: EditChannelData): SceytResponse
suspend fun deleteChannel(channelId: Long): SceytResponse
suspend fun loadChannelMembers(channelId: Long, offset: Int, role: String?): SceytResponse>
suspend fun addMembersToChannel(channelId: Long, members: List): SceytResponse
suspend fun changeChannelOwner(channelId: Long, userId: String): SceytResponse
suspend fun changeChannelMemberRole(channelId: Long, vararg member: Member): SceytResponse
suspend fun deleteMember(channelId: Long, userId: String): SceytResponse
suspend fun blockAndDeleteMember(channelId: Long, userId: String): SceytResponse
suspend fun unMuteChannel(channelId: Long): SceytResponse
suspend fun muteChannel(channelId: Long, muteUntil: Long): SceytResponse
suspend fun enableAutoDelete(channelId: Long, period: Long): SceytResponse
suspend fun disableAutoDelete(channelId: Long): SceytResponse
suspend fun pinChannel(channelId: Long): SceytResponse
suspend fun unpinChannel(channelId: Long): SceytResponse
suspend fun join(channelId: Long): SceytResponse
}