module IHP.DataSync.REST.Types where

import IHP.Prelude

data ApiController
    = CreateRecordAction { ApiController -> Text
table :: Text } -- ^ POST /api/books
    | UpdateRecordAction { table :: Text, ApiController -> UUID
id :: UUID }
    | DeleteRecordAction { table :: Text, id :: UUID }
    | ShowRecordAction   { table :: Text, id :: UUID } -- ^ GET /api/books/9ba0ffbc-bfc1-4d7d-8152-30a6648806f7
    | ListRecordsAction  { table :: Text } -- ^ GET /api/books
    | GraphQLQueryAction
    deriving (ApiController -> ApiController -> Bool
(ApiController -> ApiController -> Bool)
-> (ApiController -> ApiController -> Bool) -> Eq ApiController
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApiController -> ApiController -> Bool
$c/= :: ApiController -> ApiController -> Bool
== :: ApiController -> ApiController -> Bool
$c== :: ApiController -> ApiController -> Bool
Eq, Int -> ApiController -> ShowS
[ApiController] -> ShowS
ApiController -> String
(Int -> ApiController -> ShowS)
-> (ApiController -> String)
-> ([ApiController] -> ShowS)
-> Show ApiController
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApiController] -> ShowS
$cshowList :: [ApiController] -> ShowS
show :: ApiController -> String
$cshow :: ApiController -> String
showsPrec :: Int -> ApiController -> ShowS
$cshowsPrec :: Int -> ApiController -> ShowS
Show, Typeable ApiController
Constr
DataType
Typeable ApiController
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> ApiController -> c ApiController)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c ApiController)
-> (ApiController -> Constr)
-> (ApiController -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c ApiController))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e))
    -> Maybe (c ApiController))
-> ((forall b. Data b => b -> b) -> ApiController -> ApiController)
-> (forall r r'.
    (r -> r' -> r)
    -> r -> (forall d. Data d => d -> r') -> ApiController -> r)
-> (forall r r'.
    (r' -> r -> r)
    -> r -> (forall d. Data d => d -> r') -> ApiController -> r)
-> (forall u. (forall d. Data d => d -> u) -> ApiController -> [u])
-> (forall u.
    Int -> (forall d. Data d => d -> u) -> ApiController -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> ApiController -> m ApiController)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ApiController -> m ApiController)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> ApiController -> m ApiController)
-> Data ApiController
ApiController -> Constr
ApiController -> DataType
(forall b. Data b => b -> b) -> ApiController -> ApiController
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ApiController -> c ApiController
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ApiController
forall a.
Typeable a
-> (forall (c :: * -> *).
    (forall d b. Data d => c (d -> b) -> d -> c b)
    -> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
    (forall b r. Data b => c (b -> r) -> c r)
    -> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
    Typeable t =>
    (forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
    Typeable t =>
    (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
    (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
    (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
    Monad m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
    MonadPlus m =>
    (forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall u. Int -> (forall d. Data d => d -> u) -> ApiController -> u
forall u. (forall d. Data d => d -> u) -> ApiController -> [u]
forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ApiController -> r
forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ApiController -> r
forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ApiController -> m ApiController
forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ApiController -> m ApiController
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ApiController
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ApiController -> c ApiController
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ApiController)
forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ApiController)
$cGraphQLQueryAction :: Constr
$cListRecordsAction :: Constr
$cShowRecordAction :: Constr
$cDeleteRecordAction :: Constr
$cUpdateRecordAction :: Constr
$cCreateRecordAction :: Constr
$tApiController :: DataType
gmapMo :: (forall d. Data d => d -> m d) -> ApiController -> m ApiController
$cgmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ApiController -> m ApiController
gmapMp :: (forall d. Data d => d -> m d) -> ApiController -> m ApiController
$cgmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ApiController -> m ApiController
gmapM :: (forall d. Data d => d -> m d) -> ApiController -> m ApiController
$cgmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ApiController -> m ApiController
gmapQi :: Int -> (forall d. Data d => d -> u) -> ApiController -> u
$cgmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ApiController -> u
gmapQ :: (forall d. Data d => d -> u) -> ApiController -> [u]
$cgmapQ :: forall u. (forall d. Data d => d -> u) -> ApiController -> [u]
gmapQr :: (r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ApiController -> r
$cgmapQr :: forall r r'.
(r' -> r -> r)
-> r -> (forall d. Data d => d -> r') -> ApiController -> r
gmapQl :: (r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ApiController -> r
$cgmapQl :: forall r r'.
(r -> r' -> r)
-> r -> (forall d. Data d => d -> r') -> ApiController -> r
gmapT :: (forall b. Data b => b -> b) -> ApiController -> ApiController
$cgmapT :: (forall b. Data b => b -> b) -> ApiController -> ApiController
dataCast2 :: (forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ApiController)
$cdataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e))
-> Maybe (c ApiController)
dataCast1 :: (forall d. Data d => c (t d)) -> Maybe (c ApiController)
$cdataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c ApiController)
dataTypeOf :: ApiController -> DataType
$cdataTypeOf :: ApiController -> DataType
toConstr :: ApiController -> Constr
$ctoConstr :: ApiController -> Constr
gunfold :: (forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ApiController
$cgunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c ApiController
gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ApiController -> c ApiController
$cgfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ApiController -> c ApiController
$cp1Data :: Typeable ApiController
Data)