Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- selectTeam :: PrepQuery R (Identity TeamId) (UserId, Text, Icon, Maybe Text, Bool, Maybe TeamStatus, Maybe (Writetime TeamStatus), Maybe TeamBinding, Maybe Icon)
- selectTeamName :: PrepQuery R (Identity TeamId) (Identity Text)
- selectTeamBinding :: PrepQuery R (Identity TeamId) (Identity (Maybe TeamBinding))
- selectTeamBindingWritetime :: PrepQuery R (Identity TeamId) (Identity (Maybe Int64))
- selectTeamConv :: PrepQuery R (TeamId, ConvId) (Identity ConvId)
- selectTeamConvs :: PrepQuery R (Identity TeamId) (Identity ConvId)
- selectTeamConvsFrom :: PrepQuery R (TeamId, ConvId) (Identity ConvId)
- selectTeamMember :: PrepQuery R (TeamId, UserId) (Permissions, Maybe UserId, Maybe UTCTimeMillis, Maybe UserLegalHoldStatus)
- selectTeamMembers :: PrepQuery R (Identity TeamId) (UserId, Permissions, Maybe UserId, Maybe UTCTimeMillis, Maybe UserLegalHoldStatus)
- selectTeamMembersFrom :: PrepQuery R (TeamId, UserId) (UserId, Permissions, Maybe UserId, Maybe UTCTimeMillis, Maybe UserLegalHoldStatus)
- selectTeamMembers' :: PrepQuery R (TeamId, [UserId]) (UserId, Permissions, Maybe UserId, Maybe UTCTimeMillis, Maybe UserLegalHoldStatus)
- selectUserTeams :: PrepQuery R (Identity UserId) (Identity TeamId)
- selectOneUserTeam :: PrepQuery R (Identity UserId) (Identity TeamId)
- selectUserTeamsIn :: PrepQuery R (UserId, [TeamId]) (Identity TeamId)
- selectUserTeamsFrom :: PrepQuery R (UserId, TeamId) (Identity TeamId)
- insertTeam :: PrepQuery W (TeamId, UserId, Text, Icon, Maybe Text, TeamStatus, TeamBinding) ()
- insertTeamConv :: PrepQuery W (TeamId, ConvId) ()
- deleteTeamConv :: PrepQuery W (TeamId, ConvId) ()
- insertTeamMember :: PrepQuery W (TeamId, UserId, Permissions, Maybe UserId, Maybe UTCTimeMillis) ()
- deleteTeamMember :: PrepQuery W (TeamId, UserId) ()
- insertBillingTeamMember :: PrepQuery W (TeamId, UserId) ()
- deleteBillingTeamMember :: PrepQuery W (TeamId, UserId) ()
- listBillingTeamMembers :: PrepQuery R (Identity TeamId) (Identity UserId)
- insertTeamAdmin :: PrepQuery W (TeamId, UserId) ()
- deleteTeamAdmin :: PrepQuery W (TeamId, UserId) ()
- listTeamAdmins :: PrepQuery R (Identity TeamId) (Identity UserId)
- updatePermissions :: PrepQuery W (Permissions, TeamId, UserId) ()
- insertUserTeam :: PrepQuery W (UserId, TeamId) ()
- deleteUserTeam :: PrepQuery W (UserId, TeamId) ()
- markTeamDeleted :: PrepQuery W (TeamStatus, TeamId) ()
- deleteTeam :: PrepQuery W (TeamStatus, TeamId) ()
- updateTeamName :: PrepQuery W (Text, TeamId) ()
- updateTeamIcon :: PrepQuery W (Text, TeamId) ()
- updateTeamIconKey :: PrepQuery W (Text, TeamId) ()
- updateTeamStatus :: PrepQuery W (TeamStatus, TeamId) ()
- updateTeamSplashScreen :: PrepQuery W (Text, TeamId) ()
- selectConv :: PrepQuery R (Identity ConvId) (ConvType, Maybe UserId, Maybe (Set Access), Maybe AccessRoleLegacy, Maybe (Set AccessRole), Maybe Text, Maybe TeamId, Maybe Bool, Maybe Milliseconds, Maybe ReceiptMode, Maybe ProtocolTag, Maybe GroupId, Maybe Epoch, Maybe (Writetime Epoch), Maybe CipherSuiteTag)
- isConvDeleted :: PrepQuery R (Identity ConvId) (Identity (Maybe Bool))
- insertConv :: PrepQuery W (ConvId, ConvType, Maybe UserId, Set Access, Set AccessRole, Maybe Text, Maybe TeamId, Maybe Milliseconds, Maybe ReceiptMode, ProtocolTag, Maybe GroupId) ()
- insertMLSSelfConv :: PrepQuery W (ConvId, ConvType, Maybe UserId, Set Access, Set AccessRole, Maybe Text, Maybe TeamId, Maybe Milliseconds, Maybe ReceiptMode, Maybe GroupId) ()
- updateToMixedConv :: PrepQuery W (ConvId, ProtocolTag, GroupId, Epoch) ()
- updateToMLSConv :: PrepQuery W (ConvId, ProtocolTag) ()
- updateConvAccess :: PrepQuery W (Set Access, Set AccessRole, ConvId) ()
- updateConvReceiptMode :: PrepQuery W (ReceiptMode, ConvId) ()
- updateConvMessageTimer :: PrepQuery W (Maybe Milliseconds, ConvId) ()
- updateConvName :: PrepQuery W (Text, ConvId) ()
- updateConvType :: PrepQuery W (ConvType, ConvId) ()
- getConvEpoch :: PrepQuery R (Identity ConvId) (Identity (Maybe Epoch))
- updateConvEpoch :: PrepQuery W (Epoch, ConvId) ()
- updateConvCipherSuite :: PrepQuery W (CipherSuiteTag, ConvId) ()
- deleteConv :: PrepQuery W (Identity ConvId) ()
- markConvDeleted :: PrepQuery W (Identity ConvId) ()
- selectGroupInfo :: PrepQuery R (Identity ConvId) (Identity (Maybe GroupInfoData))
- updateGroupInfo :: PrepQuery W (GroupInfoData, ConvId) ()
- insertCode :: PrepQuery W (Key, Value, ConvId, Scope, Maybe Password, Int32) ()
- lookupCode :: PrepQuery R (Key, Scope) (Value, Int32, ConvId, Maybe Password)
- deleteCode :: PrepQuery W (Key, Scope) ()
- selectUserConvs :: PrepQuery R (Identity UserId) (Identity ConvId)
- selectUserConvsIn :: PrepQuery R (UserId, [ConvId]) (Identity ConvId)
- selectUserConvsFrom :: PrepQuery R (UserId, ConvId) (Identity ConvId)
- insertUserConv :: PrepQuery W (UserId, ConvId) ()
- deleteUserConv :: PrepQuery W (UserId, ConvId) ()
- selectSubConversation :: PrepQuery R (ConvId, SubConvId) (Maybe CipherSuiteTag, Maybe Epoch, Maybe (Writetime Epoch), Maybe GroupId)
- insertSubConversation :: PrepQuery W (ConvId, SubConvId, Epoch, GroupId, Maybe GroupInfoData) ()
- updateSubConvGroupInfo :: PrepQuery W (ConvId, SubConvId, Maybe GroupInfoData) ()
- selectSubConvGroupInfo :: PrepQuery R (ConvId, SubConvId) (Identity (Maybe GroupInfoData))
- selectSubConvEpoch :: PrepQuery R (ConvId, SubConvId) (Identity (Maybe Epoch))
- insertEpochForSubConversation :: PrepQuery W (Epoch, ConvId, SubConvId) ()
- insertCipherSuiteForSubConversation :: PrepQuery W (CipherSuiteTag, ConvId, SubConvId) ()
- listSubConversations :: PrepQuery R (Identity ConvId) (SubConvId, CipherSuiteTag, Epoch, Writetime Epoch, GroupId)
- deleteSubConversation :: PrepQuery W (ConvId, SubConvId) ()
- type MemberStatus = Int32
- selectMember :: PrepQuery R (ConvId, UserId) (UserId, Maybe ServiceId, Maybe ProviderId, Maybe MemberStatus, Maybe MutedStatus, Maybe Text, Maybe Bool, Maybe Text, Maybe Bool, Maybe Text, Maybe RoleName)
- selectMembers :: PrepQuery R (Identity ConvId) (UserId, Maybe ServiceId, Maybe ProviderId, Maybe MemberStatus, Maybe MutedStatus, Maybe Text, Maybe Bool, Maybe Text, Maybe Bool, Maybe Text, Maybe RoleName)
- selectAllMembers :: PrepQuery R () (UserId, Maybe ServiceId, Maybe ProviderId, Maybe MemberStatus, Maybe MutedStatus, Maybe Text, Maybe Bool, Maybe Text, Maybe Bool, Maybe Text, Maybe RoleName)
- insertMember :: PrepQuery W (ConvId, UserId, Maybe ServiceId, Maybe ProviderId, RoleName) ()
- removeMember :: PrepQuery W (ConvId, UserId) ()
- updateOtrMemberMutedStatus :: PrepQuery W (MutedStatus, Maybe Text, ConvId, UserId) ()
- updateOtrMemberArchived :: PrepQuery W (Bool, Maybe Text, ConvId, UserId) ()
- updateMemberHidden :: PrepQuery W (Bool, Maybe Text, ConvId, UserId) ()
- updateMemberConvRoleName :: PrepQuery W (RoleName, ConvId, UserId) ()
- insertRemoteMember :: PrepQuery W (ConvId, Domain, UserId, RoleName) ()
- removeRemoteMember :: PrepQuery W (ConvId, Domain, UserId) ()
- selectRemoteMember :: PrepQuery R (ConvId, Domain, UserId) (Identity RoleName)
- selectRemoteMembers :: PrepQuery R (Identity ConvId) (Domain, UserId, RoleName)
- updateRemoteMemberConvRoleName :: PrepQuery W (RoleName, ConvId, Domain, UserId) ()
- selectRemoteMembersByDomain :: PrepQuery R (Identity Domain) (ConvId, UserId, RoleName)
- insertUserRemoteConv :: PrepQuery W (UserId, Domain, ConvId) ()
- selectUserRemoteConvs :: PrepQuery R (Identity UserId) (Domain, ConvId)
- selectRemoteConvMemberStatuses :: PrepQuery R (UserId, Domain, [ConvId]) (ConvId, Maybe MutedStatus, Maybe Text, Maybe Bool, Maybe Text, Maybe Bool, Maybe Text)
- selectRemoteConvMembers :: PrepQuery R (UserId, Domain, ConvId) (Identity UserId)
- deleteUserRemoteConv :: PrepQuery W (UserId, Domain, ConvId) ()
- selectLocalMembersByDomain :: PrepQuery R (Identity Domain) (ConvId, UserId)
- updateRemoteOtrMemberMutedStatus :: PrepQuery W (MutedStatus, Maybe Text, Domain, ConvId, UserId) ()
- updateRemoteOtrMemberArchived :: PrepQuery W (Bool, Maybe Text, Domain, ConvId, UserId) ()
- updateRemoteMemberHidden :: PrepQuery W (Bool, Maybe Text, Domain, ConvId, UserId) ()
- selectClients :: PrepQuery R (Identity [UserId]) (UserId, Set ClientId)
- rmClients :: PrepQuery W (Identity UserId) ()
- upsertMemberAddClient :: ClientId -> QueryString W (Identity UserId) ()
- upsertMemberRmClient :: ClientId -> QueryString W (Identity UserId) ()
- addMLSClient :: PrepQuery W (GroupId, Domain, UserId, ClientId, Int32) ()
- planMLSClientRemoval :: PrepQuery W (GroupId, Domain, UserId, ClientId) ()
- removeMLSClient :: PrepQuery W (GroupId, Domain, UserId, ClientId) ()
- removeAllMLSClients :: PrepQuery W (Identity GroupId) ()
- lookupMLSClients :: PrepQuery R (Identity GroupId) (Domain, UserId, ClientId, Int32, Bool)
- acquireCommitLock :: PrepQuery W (GroupId, Epoch, Int32) Row
- releaseCommitLock :: PrepQuery W (GroupId, Epoch) ()
- rmSrv :: PrepQuery W (ProviderId, ServiceId) ()
- insertSrv :: PrepQuery W (ProviderId, ServiceId, HttpsUrl, ServiceToken, Set (Fingerprint Rsa), Bool) ()
- selectSrv :: PrepQuery R (ProviderId, ServiceId) (HttpsUrl, ServiceToken, Set (Fingerprint Rsa), Bool)
- insertBot :: PrepQuery W (ConvId, BotId, ServiceId, ProviderId) ()
- insertLegalHoldSettings :: PrepQuery W (HttpsUrl, Fingerprint Rsa, ServiceToken, ServiceKey, TeamId) ()
- selectLegalHoldSettings :: PrepQuery R (Identity TeamId) (HttpsUrl, Fingerprint Rsa, ServiceToken, ServiceKey)
- removeLegalHoldSettings :: PrepQuery W (Identity TeamId) ()
- insertPendingPrekeys :: PrepQuery W (UserId, PrekeyId, Text) ()
- dropPendingPrekeys :: PrepQuery W (Identity UserId) ()
- selectPendingPrekeys :: PrepQuery R (Identity UserId) (PrekeyId, Text)
- updateUserLegalHoldStatus :: PrepQuery W (UserLegalHoldStatus, TeamId, UserId) ()
- selectLegalHoldWhitelistedTeam :: PrepQuery R (Identity TeamId) (Identity TeamId)
- insertLegalHoldWhitelistedTeam :: PrepQuery W (Identity TeamId) ()
- removeLegalHoldWhitelistedTeam :: PrepQuery W (Identity TeamId) ()
- selectSearchVisibility :: PrepQuery R (Identity TeamId) (Identity (Maybe TeamSearchVisibility))
- updateSearchVisibility :: PrepQuery W (TeamSearchVisibility, TeamId) ()
- selectCustomBackend :: PrepQuery R (Identity Domain) (HttpsUrl, HttpsUrl)
- upsertCustomBackend :: PrepQuery W (HttpsUrl, HttpsUrl, Domain) ()
- deleteCustomBackend :: PrepQuery W (Identity Domain) ()
Documentation
selectTeam :: PrepQuery R (Identity TeamId) (UserId, Text, Icon, Maybe Text, Bool, Maybe TeamStatus, Maybe (Writetime TeamStatus), Maybe TeamBinding, Maybe Icon) Source #
selectTeamBinding :: PrepQuery R (Identity TeamId) (Identity (Maybe TeamBinding)) Source #
selectTeamMember :: PrepQuery R (TeamId, UserId) (Permissions, Maybe UserId, Maybe UTCTimeMillis, Maybe UserLegalHoldStatus) Source #
selectTeamMembers :: PrepQuery R (Identity TeamId) (UserId, Permissions, Maybe UserId, Maybe UTCTimeMillis, Maybe UserLegalHoldStatus) Source #
This query fetches **all** members of a team, it should always be paginated
selectTeamMembersFrom :: PrepQuery R (TeamId, UserId) (UserId, Permissions, Maybe UserId, Maybe UTCTimeMillis, Maybe UserLegalHoldStatus) Source #
selectTeamMembers' :: PrepQuery R (TeamId, [UserId]) (UserId, Permissions, Maybe UserId, Maybe UTCTimeMillis, Maybe UserLegalHoldStatus) Source #
insertTeam :: PrepQuery W (TeamId, UserId, Text, Icon, Maybe Text, TeamStatus, TeamBinding) () Source #
insertTeamMember :: PrepQuery W (TeamId, UserId, Permissions, Maybe UserId, Maybe UTCTimeMillis) () Source #
updatePermissions :: PrepQuery W (Permissions, TeamId, UserId) () Source #
This is not an upsert, but we can't add `IF EXISTS` here, or cassandra will yell `Invalid "Batch with conditions cannot span multiple tables"` at us. So we make sure in the application logic to only call this if the user exists (in the handler, not entirely race-condition-proof, unfortunately).
markTeamDeleted :: PrepQuery W (TeamStatus, TeamId) () Source #
deleteTeam :: PrepQuery W (TeamStatus, TeamId) () Source #
updateTeamStatus :: PrepQuery W (TeamStatus, TeamId) () Source #
selectConv :: PrepQuery R (Identity ConvId) (ConvType, Maybe UserId, Maybe (Set Access), Maybe AccessRoleLegacy, Maybe (Set AccessRole), Maybe Text, Maybe TeamId, Maybe Bool, Maybe Milliseconds, Maybe ReceiptMode, Maybe ProtocolTag, Maybe GroupId, Maybe Epoch, Maybe (Writetime Epoch), Maybe CipherSuiteTag) Source #
insertConv :: PrepQuery W (ConvId, ConvType, Maybe UserId, Set Access, Set AccessRole, Maybe Text, Maybe TeamId, Maybe Milliseconds, Maybe ReceiptMode, ProtocolTag, Maybe GroupId) () Source #
insertMLSSelfConv :: PrepQuery W (ConvId, ConvType, Maybe UserId, Set Access, Set AccessRole, Maybe Text, Maybe TeamId, Maybe Milliseconds, Maybe ReceiptMode, Maybe GroupId) () Source #
updateToMixedConv :: PrepQuery W (ConvId, ProtocolTag, GroupId, Epoch) () Source #
updateToMLSConv :: PrepQuery W (ConvId, ProtocolTag) () Source #
updateConvAccess :: PrepQuery W (Set Access, Set AccessRole, ConvId) () Source #
updateConvReceiptMode :: PrepQuery W (ReceiptMode, ConvId) () Source #
updateConvMessageTimer :: PrepQuery W (Maybe Milliseconds, ConvId) () Source #
updateConvCipherSuite :: PrepQuery W (CipherSuiteTag, ConvId) () Source #
selectGroupInfo :: PrepQuery R (Identity ConvId) (Identity (Maybe GroupInfoData)) Source #
updateGroupInfo :: PrepQuery W (GroupInfoData, ConvId) () Source #
selectSubConversation :: PrepQuery R (ConvId, SubConvId) (Maybe CipherSuiteTag, Maybe Epoch, Maybe (Writetime Epoch), Maybe GroupId) Source #
insertSubConversation :: PrepQuery W (ConvId, SubConvId, Epoch, GroupId, Maybe GroupInfoData) () Source #
updateSubConvGroupInfo :: PrepQuery W (ConvId, SubConvId, Maybe GroupInfoData) () Source #
listSubConversations :: PrepQuery R (Identity ConvId) (SubConvId, CipherSuiteTag, Epoch, Writetime Epoch, GroupId) Source #
type MemberStatus = Int32 Source #
selectMember :: PrepQuery R (ConvId, UserId) (UserId, Maybe ServiceId, Maybe ProviderId, Maybe MemberStatus, Maybe MutedStatus, Maybe Text, Maybe Bool, Maybe Text, Maybe Bool, Maybe Text, Maybe RoleName) Source #
selectMembers :: PrepQuery R (Identity ConvId) (UserId, Maybe ServiceId, Maybe ProviderId, Maybe MemberStatus, Maybe MutedStatus, Maybe Text, Maybe Bool, Maybe Text, Maybe Bool, Maybe Text, Maybe RoleName) Source #
selectAllMembers :: PrepQuery R () (UserId, Maybe ServiceId, Maybe ProviderId, Maybe MemberStatus, Maybe MutedStatus, Maybe Text, Maybe Bool, Maybe Text, Maybe Bool, Maybe Text, Maybe RoleName) Source #
insertMember :: PrepQuery W (ConvId, UserId, Maybe ServiceId, Maybe ProviderId, RoleName) () Source #
updateOtrMemberMutedStatus :: PrepQuery W (MutedStatus, Maybe Text, ConvId, UserId) () Source #
selectRemoteConvMemberStatuses :: PrepQuery R (UserId, Domain, [ConvId]) (ConvId, Maybe MutedStatus, Maybe Text, Maybe Bool, Maybe Text, Maybe Bool, Maybe Text) Source #
updateRemoteOtrMemberMutedStatus :: PrepQuery W (MutedStatus, Maybe Text, Domain, ConvId, UserId) () Source #
upsertMemberAddClient :: ClientId -> QueryString W (Identity UserId) () Source #
upsertMemberRmClient :: ClientId -> QueryString W (Identity UserId) () Source #
insertSrv :: PrepQuery W (ProviderId, ServiceId, HttpsUrl, ServiceToken, Set (Fingerprint Rsa), Bool) () Source #
selectSrv :: PrepQuery R (ProviderId, ServiceId) (HttpsUrl, ServiceToken, Set (Fingerprint Rsa), Bool) Source #
insertLegalHoldSettings :: PrepQuery W (HttpsUrl, Fingerprint Rsa, ServiceToken, ServiceKey, TeamId) () Source #
selectLegalHoldSettings :: PrepQuery R (Identity TeamId) (HttpsUrl, Fingerprint Rsa, ServiceToken, ServiceKey) Source #