Skip to content

Commit

Permalink
Merge pull request #1465 from digitallyinduced/basic-master
Browse files Browse the repository at this point in the history
Added DataSync types for user signup and confirmation
  • Loading branch information
mpscholten committed May 23, 2022
2 parents 620482b + 2bb6ce6 commit c9794f2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions IHP/DataSync/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ data DataSyncMessage
| CommitTransaction { requestId :: !Int, id :: !UUID }
| LoginWithEmailAndPassword { requestId :: !Int, email :: !Text, password :: !Text }
| LoginWithJWT { requestId :: !Int, jwt :: !Text }
| CreateUser { requestId :: !Int, email :: !Text, password :: !Text }
| ConfirmUser { requestId :: !Int, userId :: !UUID, token :: !Text }
deriving (Eq, Show)

data DataSyncResponse
Expand All @@ -52,6 +54,12 @@ data DataSyncResponse
| UserUnconfirmed { requestId :: !Int }
| InvalidCredentials { requestId :: !Int }

| DidCreateUser { requestId :: !Int, userId :: !UUID, emailConfirmationRequired :: !Bool, jwt :: !Text }
| CreateUserFailed { requestId :: !Int, validationFailures :: [(Text, Text)] }
| DidConfirmUser { requestId :: !Int, jwt :: !Text }
| DidConfirmUserAlready { requestId :: !Int }
| ConfirmUserFailed { requestId :: !Int }

data GraphQLResult = GraphQLResult { graphQLResult :: !UndecodedJSON, requestId :: !Int }

data DataSyncTransaction
Expand Down

0 comments on commit c9794f2

Please sign in to comment.