hercules-ci-api-0.7.2.0: Hercules CI API definition with Servant
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hercules.API.Accounts

Documentation

data AccountResourceGroup auth f Source #

Constructors

AccountResourceGroup 

Fields

Instances

Instances details
Generic (AccountResourceGroup auth f) Source # 
Instance details

Defined in Hercules.API.Accounts

Associated Types

type Rep (AccountResourceGroup auth f) :: Type -> Type #

Methods

from :: AccountResourceGroup auth f -> Rep (AccountResourceGroup auth f) x #

to :: Rep (AccountResourceGroup auth f) x -> AccountResourceGroup auth f #

type Rep (AccountResourceGroup auth f) Source # 
Instance details

Defined in Hercules.API.Accounts

type Rep (AccountResourceGroup auth f) = D1 ('MetaData "AccountResourceGroup" "Hercules.API.Accounts" "hercules-ci-api-0.7.2.0-inplace" 'False) (C1 ('MetaCons "AccountResourceGroup" 'PrefixI 'True) ((S1 ('MetaSel ('Just "get") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- (Summary "Get the account." :> (auth :> Get '[JSON] Account)))) :*: S1 ('MetaSel ('Just "getSettings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- (Summary "Get the account settings." :> ("settings" :> (auth :> Get '[JSON] AccountSettings)))))) :*: (S1 ('MetaSel ('Just "patchSettings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- (Summary "Update the account settings." :> ("settings" :> (ReqBody '[JSON] AccountSettingsPatch :> (auth :> Patch '[JSON] AccountSettings)))))) :*: S1 ('MetaSel ('Just "postDisableAllProjects") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- (Summary "Disable all projects in the account." :> ("disable-all-projects" :> (auth :> Post '[JSON] Int))))))))

accountById' :: (GenericMode f, Generic (subapi auth f), GServantProduct (Rep (subapi auth f)), (f :- ("accounts" :> (Capture' ('[] :: [Type]) "accountId" (Id Account) :> (((Summary "Get the account." :> (auth :> Get '[JSON] Account)) :<|> (Summary "Get the account settings." :> ("settings" :> (auth :> Get '[JSON] AccountSettings)))) :<|> ((Summary "Update the account settings." :> ("settings" :> (ReqBody '[JSON] AccountSettingsPatch :> (auth :> Patch '[JSON] AccountSettings)))) :<|> (Summary "Disable all projects in the account." :> ("disable-all-projects" :> (auth :> Post '[JSON] Int)))))))) ~ (t -> GToServant (Rep (subapi auth f)))) => t -> AccountsAPI auth f -> subapi auth f Source #

accountByAuth' :: (GenericMode mode, Generic (subapi a mode), GServantProduct (Rep (subapi a mode)), (mode :- ("accounts" :> ("me" :> (((Summary "Get the account." :> (a :> Get '[JSON] Account)) :<|> (Summary "Get the account settings." :> ("settings" :> (a :> Get '[JSON] AccountSettings)))) :<|> ((Summary "Update the account settings." :> ("settings" :> (ReqBody '[JSON] AccountSettingsPatch :> (a :> Patch '[JSON] AccountSettings)))) :<|> (Summary "Disable all projects in the account." :> ("disable-all-projects" :> (a :> Post '[JSON] Int)))))))) ~ GToServant (Rep (subapi a mode))) => AccountsAPI a mode -> subapi a mode Source #

data AccountsAPI auth f Source #

Constructors

AccountsAPI 

Fields

Instances

Instances details
Generic (AccountsAPI auth f) Source # 
Instance details

Defined in Hercules.API.Accounts

Associated Types

type Rep (AccountsAPI auth f) :: Type -> Type #

Methods

from :: AccountsAPI auth f -> Rep (AccountsAPI auth f) x #

to :: Rep (AccountsAPI auth f) x -> AccountsAPI auth f #

type Rep (AccountsAPI auth f) Source # 
Instance details

Defined in Hercules.API.Accounts

type Rep (AccountsAPI auth f) = D1 ('MetaData "AccountsAPI" "Hercules.API.Accounts" "hercules-ci-api-0.7.2.0-inplace" 'False) (C1 ('MetaCons "AccountsAPI" 'PrefixI 'True) (((S1 ('MetaSel ('Just "accountByAuth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- Substitute ("accounts" :> ("me" :> Placeholder)) (ToServantApi (AccountResourceGroup auth)))) :*: (S1 ('MetaSel ('Just "accountByAuthGetNotificationSettings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- (Summary "Retrieve notification settings" :> ("accounts" :> ("me" :> ("settings" :> ("notifications" :> (auth :> Get '[JSON] NotificationSettings)))))))) :*: S1 ('MetaSel ('Just "accountByAuthPatchNotificationSettings") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- (Summary "Update notification settings" :> ("accounts" :> ("me" :> ("settings" :> ("notifications" :> (ReqBody '[JSON] NotificationSettingsPatch :> (auth :> Patch '[JSON] NotificationSettings))))))))))) :*: (S1 ('MetaSel ('Just "accountById") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- Substitute ("accounts" :> (Capture "accountId" (Id Account) :> Placeholder)) (ToServantApi (AccountResourceGroup auth)))) :*: (S1 ('MetaSel ('Just "accountByName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- Substitute ("site" :> (Capture "site" (Name SourceHostingSite) :> ("account" :> (Capture "account" (Name Account) :> Placeholder)))) (ToServantApi (AccountResourceGroup auth)))) :*: S1 ('MetaSel ('Just "findAccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- (Summary "Accounts that the authenticated user owns, admins or collaborates with." :> ("accounts" :> (QueryParam "site" (Name SourceHostingSite) :> (QueryParam "name" (Name Account) :> (auth :> Get '[JSON] [Account])))))))))) :*: ((S1 ('MetaSel ('Just "postCLIAuthorizationRequest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- (Summary "Create a request to authorize the CLI." :> ("auth" :> ("cli" :> ("authorization" :> ("request" :> (ReqBody '[JSON] CLIAuthorizationRequestCreate :> Post '[JSON] CLIAuthorizationRequestCreateResponse)))))))) :*: (S1 ('MetaSel ('Just "getCLIAuthorizationRequestStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- (Summary "Check the request status" :> ("auth" :> ("cli" :> ("authorization" :> ("request" :> ("status" :> (Capture "temporaryToken" Text :> Get '[JSON] CLIAuthorizationRequestStatus))))))))) :*: S1 ('MetaSel ('Just "getCLIAuthorizationRequest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- (Summary "Retrieve the request" :> ("auth" :> ("cli" :> ("authorization" :> ("request" :> (Capture "browserToken" Text :> (auth :> Get '[JSON] CLIAuthorizationRequest))))))))))) :*: ((S1 ('MetaSel ('Just "confirmCLIAuthorizationRequest") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- (Summary "Retrieve the request" :> ("auth" :> ("cli" :> ("authorization" :> ("request" :> (Capture "browserToken" Text :> ("confirm" :> (auth :> Post '[JSON] NoContent)))))))))) :*: S1 ('MetaSel ('Just "getCLITokens") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- (Summary "List the CLI tokens associated with the current account." :> ("auth" :> ("cli" :> ("tokens" :> (auth :> Get '[JSON] CLITokensResponse)))))))) :*: (S1 ('MetaSel ('Just "revokeCLIToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- (Summary "Permanently disallow the use of a CLI token." :> ("auth" :> ("cli" :> ("tokens" :> (Capture "cliTokenId" (Id "CLIToken") :> ("revoke" :> (auth :> Post '[JSON] NoContent))))))))) :*: S1 ('MetaSel ('Just "installationStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (f :- (Summary "Retrieve installation status after redirect from external source site settings." :> ("sites" :> (Capture "siteId" (Id SourceHostingSite) :> ("installation" :> (Capture "installationId" Int :> ("status" :> (auth :> Get '[JSON] AccountInstallationStatus))))))))))))))