{- Gitea API. This documentation describes the Gitea API. OpenAPI Version: 3.0.1 Gitea API. API version: 1.20.6 Generated by OpenAPI Generator (https://openapi-generator.tech) -} {-| Module : Gitea.API.Miscellaneous -} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MonoLocalBinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-unused-binds -fno-warn-unused-imports #-} module Gitea.API.Miscellaneous where import Gitea.Core import Gitea.MimeTypes import Gitea.Model as M import qualified Data.Aeson as A import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import qualified Data.Data as P (Typeable, TypeRep, typeOf, typeRep) import qualified Data.Foldable as P import qualified Data.Map as Map import qualified Data.Maybe as P import qualified Data.Proxy as P (Proxy(..)) import qualified Data.Set as Set import qualified Data.String as P import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy.Encoding as TL import qualified Data.Time as TI import qualified Network.HTTP.Client.MultipartFormData as NH import qualified Network.HTTP.Media as ME import qualified Network.HTTP.Types as NH import qualified Web.FormUrlEncoded as WH import qualified Web.HttpApiData as WH import Data.Text (Text) import GHC.Base ((<|>)) import Prelude ((==),(/=),($), (.),(<$>),(<*>),(>>=),Maybe(..),Bool(..),Char,Double,FilePath,Float,Int,Integer,String,fmap,undefined,mempty,maybe,pure,Monad,Applicative,Functor) import qualified Prelude as P -- * Operations -- ** Miscellaneous -- *** getGitignoreTemplateInfo -- | @GET \/gitignore\/templates\/{name}@ -- -- Returns information about a gitignore template -- -- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken' -- getGitignoreTemplateInfo :: Name -- ^ "name" - name of the template -> GiteaRequest GetGitignoreTemplateInfo MimeNoContent GitignoreTemplateInfo MimeJSON getGitignoreTemplateInfo (Name name) = _mkRequest "GET" ["/gitignore/templates/",toPath name] `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken) data GetGitignoreTemplateInfo -- | @application/json@ instance Produces GetGitignoreTemplateInfo MimeJSON -- *** getLabelTemplateInfo -- | @GET \/label\/templates\/{name}@ -- -- Returns all labels in a template -- -- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken' -- getLabelTemplateInfo :: Name -- ^ "name" - name of the template -> GiteaRequest GetLabelTemplateInfo MimeNoContent [LabelTemplate] MimeJSON getLabelTemplateInfo (Name name) = _mkRequest "GET" ["/label/templates/",toPath name] `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken) data GetLabelTemplateInfo -- | @application/json@ instance Produces GetLabelTemplateInfo MimeJSON -- *** getLicenseTemplateInfo -- | @GET \/licenses\/{name}@ -- -- Returns information about a license template -- -- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken' -- getLicenseTemplateInfo :: Name -- ^ "name" - name of the license -> GiteaRequest GetLicenseTemplateInfo MimeNoContent LicenseTemplateInfo MimeJSON getLicenseTemplateInfo (Name name) = _mkRequest "GET" ["/licenses/",toPath name] `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken) data GetLicenseTemplateInfo -- | @application/json@ instance Produces GetLicenseTemplateInfo MimeJSON -- *** getNodeInfo -- | @GET \/nodeinfo@ -- -- Returns the nodeinfo of the Gitea application -- -- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken' -- getNodeInfo :: GiteaRequest GetNodeInfo MimeNoContent NodeInfo MimeJSON getNodeInfo = _mkRequest "GET" ["/nodeinfo"] `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken) data GetNodeInfo -- | @application/json@ instance Produces GetNodeInfo MimeJSON -- *** getSigningKey -- | @GET \/signing-key.gpg@ -- -- Get default signing-key.gpg -- -- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken' -- getSigningKey :: GiteaRequest GetSigningKey MimeNoContent Text MimePlainText getSigningKey = _mkRequest "GET" ["/signing-key.gpg"] `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken) data GetSigningKey -- | @text/plain@ instance Produces GetSigningKey MimePlainText -- *** getVersion -- | @GET \/version@ -- -- Returns the version of the Gitea application -- -- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken' -- getVersion :: GiteaRequest GetVersion MimeNoContent ServerVersion MimeJSON getVersion = _mkRequest "GET" ["/version"] `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken) data GetVersion -- | @application/json@ instance Produces GetVersion MimeJSON -- *** listGitignoresTemplates -- | @GET \/gitignore\/templates@ -- -- Returns a list of all gitignore templates -- -- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken' -- listGitignoresTemplates :: GiteaRequest ListGitignoresTemplates MimeNoContent [Text] MimeJSON listGitignoresTemplates = _mkRequest "GET" ["/gitignore/templates"] `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken) data ListGitignoresTemplates -- | @application/json@ instance Produces ListGitignoresTemplates MimeJSON -- *** listLabelTemplates -- | @GET \/label\/templates@ -- -- Returns a list of all label templates -- -- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken' -- listLabelTemplates :: GiteaRequest ListLabelTemplates MimeNoContent [Text] MimeJSON listLabelTemplates = _mkRequest "GET" ["/label/templates"] `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken) data ListLabelTemplates -- | @application/json@ instance Produces ListLabelTemplates MimeJSON -- *** listLicenseTemplates -- | @GET \/licenses@ -- -- Returns a list of all license templates -- -- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken' -- listLicenseTemplates :: GiteaRequest ListLicenseTemplates MimeNoContent [LicensesTemplateListEntry] MimeJSON listLicenseTemplates = _mkRequest "GET" ["/licenses"] `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken) data ListLicenseTemplates -- | @application/json@ instance Produces ListLicenseTemplates MimeJSON -- *** renderMarkdown -- | @POST \/markdown@ -- -- Render a markdown document as HTML -- -- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken' -- renderMarkdown :: (Consumes RenderMarkdown MimeJSON) => GiteaRequest RenderMarkdown MimeJSON Text MimeTextHtml renderMarkdown = _mkRequest "POST" ["/markdown"] `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken) data RenderMarkdown instance HasBodyParam RenderMarkdown MarkdownOption -- | @application/json@ instance Consumes RenderMarkdown MimeJSON -- | @text/html@ instance Produces RenderMarkdown MimeTextHtml -- *** renderMarkdownRaw -- | @POST \/markdown\/raw@ -- -- Render raw markdown as HTML -- -- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken' -- renderMarkdownRaw :: (Consumes RenderMarkdownRaw MimePlainText, MimeRender MimePlainText Body) => Body -- ^ "body" - Request body to render -> GiteaRequest RenderMarkdownRaw MimePlainText Text MimeTextHtml renderMarkdownRaw body = _mkRequest "POST" ["/markdown/raw"] `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken) `setBodyParam` body data RenderMarkdownRaw -- | /Body Param/ "body" - Request body to render instance HasBodyParam RenderMarkdownRaw Body -- | @text/plain@ instance Consumes RenderMarkdownRaw MimePlainText -- | @text/html@ instance Produces RenderMarkdownRaw MimeTextHtml -- *** renderMarkup -- | @POST \/markup@ -- -- Render a markup document as HTML -- -- AuthMethod: 'AuthApiKeyTOTPHeader', 'AuthApiKeyAuthorizationHeaderToken', 'AuthApiKeySudoHeader', 'AuthBasicBasicAuth', 'AuthApiKeyAccessToken', 'AuthApiKeySudoParam', 'AuthApiKeyToken' -- renderMarkup :: (Consumes RenderMarkup MimeJSON) => GiteaRequest RenderMarkup MimeJSON Text MimeTextHtml renderMarkup = _mkRequest "POST" ["/markup"] `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyTOTPHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAuthorizationHeaderToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoHeader) `_hasAuthType` (P.Proxy :: P.Proxy AuthBasicBasicAuth) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyAccessToken) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeySudoParam) `_hasAuthType` (P.Proxy :: P.Proxy AuthApiKeyToken) data RenderMarkup instance HasBodyParam RenderMarkup MarkupOption -- | @application/json@ instance Consumes RenderMarkup MimeJSON -- | @text/html@ instance Produces RenderMarkup MimeTextHtml