Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data StoredUserUpdate = MkStoredUserUpdate {}
- data StoredUserHandleUpdate = MkStoredUserHandleUpdate {}
- data StoredUserUpdateError = StoredUserUpdateHandleExists
- data UserStore m a where
- GetIndexUser :: UserId -> UserStore m (Maybe IndexUser)
- GetIndexUsersPaginated :: Int32 -> Maybe PagingState -> UserStore m (PageWithState IndexUser)
- GetUsers :: [UserId] -> UserStore m [StoredUser]
- UpdateUser :: UserId -> StoredUserUpdate -> UserStore m ()
- UpdateUserHandleEither :: UserId -> StoredUserHandleUpdate -> UserStore m (Either StoredUserUpdateError ())
- DeleteUser :: User -> UserStore m ()
- LookupHandle :: Handle -> UserStore m (Maybe UserId)
- GlimpseHandle :: Handle -> UserStore m (Maybe UserId)
- LookupStatus :: UserId -> UserStore m (Maybe AccountStatus)
- IsActivated :: UserId -> UserStore m Bool
- LookupLocale :: UserId -> UserStore m (Maybe (Maybe Language, Maybe Country))
- UpdateUserTeam :: UserId -> TeamId -> UserStore m ()
- GetActivityTimestamps :: UserId -> UserStore m [Maybe UTCTime]
- GetRichInfo :: UserId -> UserStore m (Maybe RichInfoAssocList)
- GetUserAuthenticationInfo :: UserId -> UserStore m (Maybe (Maybe Password, AccountStatus))
- getUserAuthenticationInfo :: forall r. Member UserStore r => UserId -> Sem r (Maybe (Maybe Password, AccountStatus))
- getRichInfo :: forall r. Member UserStore r => UserId -> Sem r (Maybe RichInfoAssocList)
- getActivityTimestamps :: forall r. Member UserStore r => UserId -> Sem r [Maybe UTCTime]
- updateUserTeam :: forall r. Member UserStore r => UserId -> TeamId -> Sem r ()
- lookupLocale :: forall r. Member UserStore r => UserId -> Sem r (Maybe (Maybe Language, Maybe Country))
- isActivated :: forall r. Member UserStore r => UserId -> Sem r Bool
- lookupStatus :: forall r. Member UserStore r => UserId -> Sem r (Maybe AccountStatus)
- glimpseHandle :: forall r. Member UserStore r => Handle -> Sem r (Maybe UserId)
- lookupHandle :: forall r. Member UserStore r => Handle -> Sem r (Maybe UserId)
- deleteUser :: forall r. Member UserStore r => User -> Sem r ()
- updateUserHandleEither :: forall r. Member UserStore r => UserId -> StoredUserHandleUpdate -> Sem r (Either StoredUserUpdateError ())
- updateUser :: forall r. Member UserStore r => UserId -> StoredUserUpdate -> Sem r ()
- getUsers :: forall r. Member UserStore r => [UserId] -> Sem r [StoredUser]
- getIndexUsersPaginated :: forall r. Member UserStore r => Int32 -> Maybe PagingState -> Sem r (PageWithState IndexUser)
- getIndexUser :: forall r. Member UserStore r => UserId -> Sem r (Maybe IndexUser)
- getUser :: Member UserStore r => UserId -> Sem r (Maybe StoredUser)
- updateUserHandle :: (Member UserStore r, Member (Error StoredUserUpdateError) r) => UserId -> StoredUserHandleUpdate -> Sem r ()
Documentation
data StoredUserUpdate Source #
Update of any "simple" attributes (ones that do not involve locking, like handle, or validation protocols, like email).
| see UserProfileUpdate
.
Instances
data StoredUserHandleUpdate Source #
Update user handle (this involves several http requests for locking the required handle). The old/previous handle (for deciding idempotency).
Instances
data UserStore m a where Source #
Effect containing database logic around StoredUser
. (Example: claim handle lock is
database logic; validate handle is application logic.)
getUserAuthenticationInfo :: forall r. Member UserStore r => UserId -> Sem r (Maybe (Maybe Password, AccountStatus)) Source #
getRichInfo :: forall r. Member UserStore r => UserId -> Sem r (Maybe RichInfoAssocList) Source #
lookupLocale :: forall r. Member UserStore r => UserId -> Sem r (Maybe (Maybe Language, Maybe Country)) Source #
isActivated :: forall r. Member UserStore r => UserId -> Sem r Bool Source #
Whether the account has been activated by verifying an email address or phone number.
lookupStatus :: forall r. Member UserStore r => UserId -> Sem r (Maybe AccountStatus) Source #
glimpseHandle :: forall r. Member UserStore r => Handle -> Sem r (Maybe UserId) Source #
The interpretation for LookupHandle
and GlimpseHandle
may differ in terms of how consistent they are. If that
matters for the interpretation, this operation may give you stale locks,
but is faster and more resilient.
lookupHandle :: forall r. Member UserStore r => Handle -> Sem r (Maybe UserId) Source #
This operation looks up a handle but is guaranteed to not give you stale locks.
It is potentially slower and less resilient than GlimpseHandle
.
updateUserHandleEither :: forall r. Member UserStore r => UserId -> StoredUserHandleUpdate -> Sem r (Either StoredUserUpdateError ()) Source #
updateUser :: forall r. Member UserStore r => UserId -> StoredUserUpdate -> Sem r () Source #
getIndexUsersPaginated :: forall r. Member UserStore r => Int32 -> Maybe PagingState -> Sem r (PageWithState IndexUser) Source #
updateUserHandle :: (Member UserStore r, Member (Error StoredUserUpdateError) r) => UserId -> StoredUserHandleUpdate -> Sem r () Source #