{-# LANGUAGE TemplateHaskell #-}
module Galley.Effects.SubConversationStore where
import Data.Id
import Galley.API.MLS.Types
import Imports
import Polysemy
import Wire.API.Conversation.Protocol
import Wire.API.MLS.CipherSuite
import Wire.API.MLS.Group
import Wire.API.MLS.GroupInfo
import Wire.API.MLS.SubConversation
data SubConversationStore m a where
CreateSubConversation :: ConvId -> SubConvId -> GroupId -> SubConversationStore m SubConversation
GetSubConversation :: ConvId -> SubConvId -> SubConversationStore m (Maybe SubConversation)
GetSubConversationGroupInfo :: ConvId -> SubConvId -> SubConversationStore m (Maybe GroupInfoData)
GetSubConversationEpoch :: ConvId -> SubConvId -> SubConversationStore m (Maybe Epoch)
SetSubConversationGroupInfo :: ConvId -> SubConvId -> Maybe GroupInfoData -> SubConversationStore m ()
SetSubConversationEpoch :: ConvId -> SubConvId -> Epoch -> SubConversationStore m ()
SetSubConversationCipherSuite :: ConvId -> SubConvId -> CipherSuiteTag -> SubConversationStore m ()
ListSubConversations :: ConvId -> SubConversationStore m (Map SubConvId ConversationMLSData)
DeleteSubConversation :: ConvId -> SubConvId -> SubConversationStore m ()
makeSem ''SubConversationStore