Copyright | (c) CNRS 2017-Present |
---|---|
License | AGPL + CECILL v3 |
Maintainer | team@gargantext.org |
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- type GargAPI = MkGargAPI (GargAPIVersion GargAPI')
- type MkGargAPI sub = "api" :> (Summary "API " :> sub)
- type GargAPIVersion sub = "v1.0" :> (Summary "Garg API Version " :> sub)
- type GargVersion = "version" :> (Summary "Backend version" :> Get '[JSON] Text)
- type AuthAPI = "auth" :> (Summary "AUTH API" :> (ReqBody '[JSON] AuthRequest :> Post '[JSON] AuthResponse))
- type GargAPI' = AuthAPI :<|> (("forgot-password" :> ForgotPasswordAPI) :<|> (("async" :> ("forgot-password" :> ForgotPasswordAsyncAPI)) :<|> (GargVersion :<|> (GargPrivateAPI :<|> ("public" :> API)))))
- type MkProtectedAPI private = Auth '[JWT, Cookie] AuthenticatedUser :> private
- type GargPrivateAPI = MkProtectedAPI GargPrivateAPI'
- type GargAdminAPI = ("user" :> (Summary "First user endpoint" :> Roots)) :<|> ("nodes" :> (Summary "Nodes endpoint" :> (ReqBody '[JSON] [NodeId] :> NodesAPI)))
- type NodeEndpoint = "node" :> (Summary "Node endpoint" :> (Capture "node_id" NodeId :> NodeAPI HyperdataAny))
- type GargPrivateAPI' = GargAdminAPI :<|> (NodeEndpoint :<|> (("context" :> (Summary "Node endpoint" :> (Capture "node_id" ContextId :> ContextAPI HyperdataAny))) :<|> (("corpus" :> (Summary "Corpus endpoint" :> (Capture "corpus_id" CorpusId :> NodeAPI HyperdataCorpus))) :<|> (("corpus" :> (Summary "Corpus endpoint" :> (Capture "node1_id" NodeId :> ("document" :> (Capture "node2_id" NodeId :> NodeNodeAPI HyperdataAny))))) :<|> (("corpus" :> (Capture "node_id" CorpusId :> API)) :<|> (("annuaire" :> (Summary "Annuaire endpoint" :> (Capture "annuaire_id" AnnuaireId :> NodeAPI HyperdataAnnuaire))) :<|> (("annuaire" :> (Summary "Contact endpoint" :> (Capture "annuaire_id" NodeId :> API))) :<|> (("document" :> (Summary "Document endpoint" :> (Capture "doc_id" DocId :> ("ngrams" :> TableNgramsApi)))) :<|> (("texts" :> (Capture "node_id" DocId :> API)) :<|> (("phylo" :> (Capture "node_id" DocId :> API)) :<|> (("count" :> (Summary "Count endpoint" :> (ReqBody '[JSON] Query :> CountAPI))) :<|> (("graph" :> (Summary "Graph endpoint" :> (Capture "graph_id" NodeId :> GraphAPI))) :<|> (("tree" :> (Summary "Tree endpoint" :> (Capture "tree_id" NodeId :> PolicyChecked TreeAPI))) :<|> (("treeflat" :> (Summary "Flat tree endpoint" :> (Capture "tree_id" NodeId :> TreeFlatAPI))) :<|> (("members" :> (Summary "Team node members" :> MembersAPI)) :<|> (AddWithForm :<|> (AddWithQuery :<|> (GETAPI :<|> (JSONAPI :<|> (CSVAPI :<|> ("shareurl" :> API)))))))))))))))))))))
- type API = WithCustomErrorScheme (SwaggerAPI :<|> (GargAPI :<|> (API :<|> FrontEndAPI)))
- type SwaggerAPI = SwaggerSchemaUI "swagger-ui" "swagger.json"
- serverGargAdminAPI :: GargServer GargAdminAPI
- serverPrivateGargAPI' :: AuthenticatedUser -> ServerT GargPrivateAPI' (GargM Env BackendInternalError)
- type WaitAPI = Get '[JSON] Text
- waitAPI :: Int -> GargServer WaitAPI
- addCorpusWithQuery :: User -> ServerT AddWithQuery (GargM Env BackendInternalError)
- addCorpusWithForm :: User -> ServerT AddWithForm (GargM Env BackendInternalError)
- addCorpusWithFile :: User -> ServerT AddWithFile (GargM Env BackendInternalError)
- addAnnuaireWithForm :: ServerT AddWithForm (GargM Env BackendInternalError)
Documentation
type GargAPI = MkGargAPI (GargAPIVersion GargAPI') #
type GargAPIVersion sub = "v1.0" :> (Summary "Garg API Version " :> sub) #
type AuthAPI = "auth" :> (Summary "AUTH API" :> (ReqBody '[JSON] AuthRequest :> Post '[JSON] AuthResponse)) #
type GargAPI' = AuthAPI :<|> (("forgot-password" :> ForgotPasswordAPI) :<|> (("async" :> ("forgot-password" :> ForgotPasswordAsyncAPI)) :<|> (GargVersion :<|> (GargPrivateAPI :<|> ("public" :> API))))) #
type MkProtectedAPI private = Auth '[JWT, Cookie] AuthenticatedUser :> private #
type GargAdminAPI = ("user" :> (Summary "First user endpoint" :> Roots)) :<|> ("nodes" :> (Summary "Nodes endpoint" :> (ReqBody '[JSON] [NodeId] :> NodesAPI))) #
type NodeEndpoint = "node" :> (Summary "Node endpoint" :> (Capture "node_id" NodeId :> NodeAPI HyperdataAny)) #
type GargPrivateAPI' = GargAdminAPI :<|> (NodeEndpoint :<|> (("context" :> (Summary "Node endpoint" :> (Capture "node_id" ContextId :> ContextAPI HyperdataAny))) :<|> (("corpus" :> (Summary "Corpus endpoint" :> (Capture "corpus_id" CorpusId :> NodeAPI HyperdataCorpus))) :<|> (("corpus" :> (Summary "Corpus endpoint" :> (Capture "node1_id" NodeId :> ("document" :> (Capture "node2_id" NodeId :> NodeNodeAPI HyperdataAny))))) :<|> (("corpus" :> (Capture "node_id" CorpusId :> API)) :<|> (("annuaire" :> (Summary "Annuaire endpoint" :> (Capture "annuaire_id" AnnuaireId :> NodeAPI HyperdataAnnuaire))) :<|> (("annuaire" :> (Summary "Contact endpoint" :> (Capture "annuaire_id" NodeId :> API))) :<|> (("document" :> (Summary "Document endpoint" :> (Capture "doc_id" DocId :> ("ngrams" :> TableNgramsApi)))) :<|> (("texts" :> (Capture "node_id" DocId :> API)) :<|> (("phylo" :> (Capture "node_id" DocId :> API)) :<|> (("count" :> (Summary "Count endpoint" :> (ReqBody '[JSON] Query :> CountAPI))) :<|> (("graph" :> (Summary "Graph endpoint" :> (Capture "graph_id" NodeId :> GraphAPI))) :<|> (("tree" :> (Summary "Tree endpoint" :> (Capture "tree_id" NodeId :> PolicyChecked TreeAPI))) :<|> (("treeflat" :> (Summary "Flat tree endpoint" :> (Capture "tree_id" NodeId :> TreeFlatAPI))) :<|> (("members" :> (Summary "Team node members" :> MembersAPI)) :<|> (AddWithForm :<|> (AddWithQuery :<|> (GETAPI :<|> (JSONAPI :<|> (CSVAPI :<|> ("shareurl" :> API))))))))))))))))))))) #
type API = WithCustomErrorScheme (SwaggerAPI :<|> (GargAPI :<|> (API :<|> FrontEndAPI))) #
type SwaggerAPI = SwaggerSchemaUI "swagger-ui" "swagger.json" #
API for serving swagger.json
serverPrivateGargAPI' :: AuthenticatedUser -> ServerT GargPrivateAPI' (GargM Env BackendInternalError) #
waitAPI :: Int -> GargServer WaitAPI #
addAnnuaireWithForm :: ServerT AddWithForm (GargM Env BackendInternalError) #