{-|Module: BattlePlace.Token.TypesDescription: Token types.License: MIT-}{-# LANGUAGE GeneralizedNewtypeDeriving #-}module BattlePlace.Token.Types ( InternalToken(..) , Ticket(..) ) whereimport qualified Data.Aeson as Jimport qualified Data.Text as Timport Servant.API-- | Internal token.-- Token is encrypted, and contains some internal information.newtype InternalToken a = InternalToken T.Text deriving (J.FromJSON, J.ToJSON, FromHttpApiData, ToHttpApiData)-- | Ticket.-- Ticket doesn't contain information, it's just an ID.newtype Ticket = Ticket T.Text deriving (J.FromJSON, J.ToJSON)