Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- randomUser :: (HasCallStack, MakesValue domain) => domain -> CreateUser -> App Value
- deleteUser :: (HasCallStack, MakesValue user) => user -> App ()
- createTeam :: (HasCallStack, MakesValue domain) => domain -> Int -> App (Value, String, [Value])
- data CreateTeamMember = CreateTeamMember {}
- createTeamMember :: (HasCallStack, MakesValue inviter) => inviter -> CreateTeamMember -> App Value
- connectTwoUsers :: (HasCallStack, MakesValue alice, MakesValue bob) => alice -> bob -> App ()
- connectUsers :: (HasCallStack, MakesValue usr) => [usr] -> App ()
- assertConnection :: (HasCallStack, MakesValue alice, MakesValue bob) => alice -> bob -> String -> App ()
- createAndConnectUsers :: (HasCallStack, MakesValue domain) => [domain] -> App [Value]
- createUsers :: (HasCallStack, MakesValue domain) => [domain] -> App [Value]
- getAllConvs :: (HasCallStack, MakesValue u) => u -> App [Value]
- simpleMixedConversationSetup :: (HasCallStack, MakesValue domain) => domain -> App (Value, Value, ConvId)
- supportMLS :: (HasCallStack, MakesValue u) => u -> App ()
- addUserToTeam :: (HasCallStack, MakesValue u) => u -> App Value
- createMLSOne2OnePartner :: (MakesValue user, MakesValue domain, MakesValue convDomain, HasCallStack) => domain -> user -> convDomain -> App Value
- randomToken :: HasCallStack => App String
- data TokenLength
- randomSnsToken :: HasCallStack => TokenLength -> App String
- randomId :: HasCallStack => App String
- randomUUIDv1 :: HasCallStack => App String
- randomUserId :: (HasCallStack, MakesValue domain) => domain -> App Value
- withFederatingBackendsAllowDynamic :: HasCallStack => ((String, String, String) -> App a) -> App a
- createOne2OneConversation :: (HasCallStack, MakesValue domain1, MakesValue domain2) => domain1 -> domain2 -> App (Value, Value, Value)
- data One2OneConvState
- toConvType :: One2OneConvState -> Int
- getOne2OneConversation :: HasCallStack => Value -> Value -> One2OneConvState -> App Value
- setupProvider :: (HasCallStack, MakesValue user) => user -> NewProvider -> App Value
- setUpLHDevice :: (HasCallStack, MakesValue tid, MakesValue owner, MakesValue uid) => tid -> owner -> uid -> (String, Int) -> App ()
- lhDeviceIdOf :: MakesValue user => user -> App String
- randomScimUser :: App Value
- randomScimUserWith :: HasCallStack => String -> String -> App Value
- uploadProfilePicture :: (HasCallStack, MakesValue usr) => usr -> App (String, String, String)
- downloadProfilePicture :: (HasCallStack, MakesValue caller) => caller -> String -> String -> App (String, String)
- uploadDownloadProfilePicture :: (HasCallStack, MakesValue usr) => usr -> App (String, String)
- addUsersToFailureContext :: MakesValue user => [(String, user)] -> App a -> App a
- addJSONToFailureContext :: MakesValue a => String -> a -> App b -> App b
- registerTestIdPWithMeta :: (HasCallStack, MakesValue owner) => owner -> App Response
- registerTestIdPWithMetaWithPrivateCreds :: (HasCallStack, MakesValue owner) => owner -> App (Response, (IdPMetadata, SignPrivCreds))
- loginWithSaml :: HasCallStack => Bool -> String -> Value -> (String, (IdPMetadata, SignPrivCreds)) -> App ()
Documentation
randomUser :: (HasCallStack, MakesValue domain) => domain -> CreateUser -> App Value Source #
deleteUser :: (HasCallStack, MakesValue user) => user -> App () Source #
createTeam :: (HasCallStack, MakesValue domain) => domain -> Int -> App (Value, String, [Value]) Source #
returns (owner, team id, members)
data CreateTeamMember Source #
Instances
Default CreateTeamMember Source # | |
Defined in SetupHelpers |
createTeamMember :: (HasCallStack, MakesValue inviter) => inviter -> CreateTeamMember -> App Value Source #
connectTwoUsers :: (HasCallStack, MakesValue alice, MakesValue bob) => alice -> bob -> App () Source #
connectUsers :: (HasCallStack, MakesValue usr) => [usr] -> App () Source #
assertConnection :: (HasCallStack, MakesValue alice, MakesValue bob) => alice -> bob -> String -> App () Source #
createAndConnectUsers :: (HasCallStack, MakesValue domain) => [domain] -> App [Value] Source #
createUsers :: (HasCallStack, MakesValue domain) => [domain] -> App [Value] Source #
getAllConvs :: (HasCallStack, MakesValue u) => u -> App [Value] Source #
simpleMixedConversationSetup :: (HasCallStack, MakesValue domain) => domain -> App (Value, Value, ConvId) Source #
Setup a team user, another user, connect the two, create a proteus conversation, upgrade to mixed. Return the two users and the conversation.
supportMLS :: (HasCallStack, MakesValue u) => u -> App () Source #
addUserToTeam :: (HasCallStack, MakesValue u) => u -> App Value Source #
createMLSOne2OnePartner :: (MakesValue user, MakesValue domain, MakesValue convDomain, HasCallStack) => domain -> user -> convDomain -> App Value Source #
Create a user on the given domain, such that the 1-1 conversation with
other
resides on convDomain
. This connects the two users as a side-effect.
randomToken :: HasCallStack => App String Source #
data TokenLength Source #
randomSnsToken :: HasCallStack => TokenLength -> App String Source #
randomUUIDv1 :: HasCallStack => App String Source #
randomUserId :: (HasCallStack, MakesValue domain) => domain -> App Value Source #
withFederatingBackendsAllowDynamic :: HasCallStack => ((String, String, String) -> App a) -> App a Source #
createOne2OneConversation :: (HasCallStack, MakesValue domain1, MakesValue domain2) => domain1 -> domain2 -> App (Value, Value, Value) Source #
Create two users on different domains such that the one-to-one conversation, once finalised, will be hosted on the backend given by the first domain.
toConvType :: One2OneConvState -> Int Source #
Converts to an integer corresponding to the numeric representation of the
ConvType
type.
getOne2OneConversation :: HasCallStack => Value -> Value -> One2OneConvState -> App Value Source #
Fetch the one-to-one conversation between the two users that is in one of two possible states.
setupProvider :: (HasCallStack, MakesValue user) => user -> NewProvider -> App Value Source #
Create a provider, get an activation code, activate the provider and log it in. The return value is the created provider.
:: (HasCallStack, MakesValue tid, MakesValue owner, MakesValue uid) | |
=> tid | |
-> owner | |
-> uid | |
-> (String, Int) | the host and port the LH service is running on |
-> App () |
setup a legalhold device for uid
, authorised by owner
at the specified port
lhDeviceIdOf :: MakesValue user => user -> App String Source #
randomScimUserWith :: HasCallStack => String -> String -> App Value Source #
uploadProfilePicture :: (HasCallStack, MakesValue usr) => usr -> App (String, String, String) Source #
This adds one random asset to the $sel:assets:PutSelf
field in the user record and returns an asset
key. The asset carries a fresh UUIDv4 in text form (even though it is typed preview
and
image
).
downloadProfilePicture :: (HasCallStack, MakesValue caller) => caller -> String -> String -> App (String, String) Source #
Take a calling user (any user will do) and an asset domain and key, and return a
(temporarily valid) s3 url plus asset payload (if created with uploadProfilePicture
,
that's a UUIDv4).
uploadDownloadProfilePicture :: (HasCallStack, MakesValue usr) => usr -> App (String, String) Source #
Call uploadProfilePicture
and downloadPicture
, returning the return value of the
latter.
addUsersToFailureContext :: MakesValue user => [(String, user)] -> App a -> App a Source #
addJSONToFailureContext :: MakesValue a => String -> a -> App b -> App b Source #
registerTestIdPWithMeta :: (HasCallStack, MakesValue owner) => owner -> App Response Source #
registerTestIdPWithMetaWithPrivateCreds :: (HasCallStack, MakesValue owner) => owner -> App (Response, (IdPMetadata, SignPrivCreds)) Source #
loginWithSaml :: HasCallStack => Bool -> String -> Value -> (String, (IdPMetadata, SignPrivCreds)) -> App () Source #
Given a team configured with saml sso, attempt a login with valid credentials. This function simulates client *and* IdP (instead of talking to an IdP). It can be used to test scim-provisioned users as well as saml auto-provisioning without scim.