module Web.Slack.Auth
where
import Data.Aeson.TH
import GHC.Generics (Generic)
import Web.FormUrlEncoded
import Web.Slack.Util
import Data.Text (Text)
newtype TestReq =
TestReq
{ testReqToken :: Text
}
deriving (Eq, Generic, Show)
$(deriveJSON (jsonOpts "testReq") ''TestReq)
instance ToForm TestReq where
toForm =
genericToForm (formOpts "testReq")
mkTestReq
:: Text
-> TestReq
mkTestReq =
TestReq
data TestRsp =
TestRsp
{ testRspOk :: Bool
, testRspUrl :: Text
, testRspTeam :: Text
, testRspUser :: Text
, testRspTeamId :: Text
, testRspUserId :: Text
, testRspEnterpriseId :: Maybe Text
}
deriving (Eq, Generic, Show)
$(deriveJSON (jsonOpts "testRsp") ''TestRsp)