wire-api-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.API.Routes.Public.Brig.Bot

Documentation

type DeleteResponses = '[RespondEmpty 204 "", Respond 200 "User found" RemoveBotResponse] Source #

type BotAPI = Named "add-bot" (Summary "Add bot" :> (CanThrow 'AccessDenied :> (CanThrow 'InvalidConversation :> (CanThrow 'TooManyConversationMembers :> (CanThrow 'ServiceDisabled :> (ZAccess :> (ZConn :> ("conversations" :> (Capture "Conversation ID" ConvId :> ("bots" :> (ReqBody '[JSON] AddBot :> MultiVerb1 'POST '[JSON] (Respond 201 "" AddBotResponse)))))))))))) :<|> (Named "remove-bot" (Summary "Remove bot" :> (CanThrow 'AccessDenied :> (CanThrow 'InvalidConversation :> (ZAccess :> (ZConn :> ("conversations" :> (Capture "Conversation ID" ConvId :> ("bots" :> (Capture "Bot ID" BotId :> MultiVerb 'DELETE '[JSON] DeleteResponses (Maybe RemoveBotResponse)))))))))) :<|> (Named "bot-get-self" (Summary "Get self" :> (CanThrow 'UserNotFound :> (CanThrow 'AccessDenied :> (ZBot :> ("bot" :> ("self" :> Get '[JSON] UserProfile)))))) :<|> (Named "bot-delete-self" (Summary "Delete self" :> (CanThrow 'AccessDenied :> (CanThrow 'InvalidBot :> (ZBot :> (ZConversation :> ("bot" :> ("self" :> MultiVerb1 'DELETE '[JSON] (RespondEmpty 200 "")))))))) :<|> (Named "bot-list-prekeys" (Summary "List prekeys for bot" :> (CanThrow 'AccessDenied :> (ZBot :> ("bot" :> ("client" :> ("prekeys" :> Get '[JSON] [PrekeyId])))))) :<|> (Named "bot-update-prekeys" (Summary "Update prekeys for bot" :> (CanThrow 'AccessDenied :> (CanThrow 'ClientNotFound :> (ZBot :> ("bot" :> ("client" :> ("prekeys" :> (ReqBody '[JSON] UpdateBotPrekeys :> MultiVerb1 'POST '[JSON] (RespondEmpty 200 ""))))))))) :<|> (Named "bot-get-client-v6" (Summary "Get client for bot" :> (Until 'V7 :> (CanThrow 'AccessDenied :> (CanThrow 'ClientNotFound :> (ZBot :> ("bot" :> ("client" :> MultiVerb 'GET '[JSON] '[ErrorResponse 'ClientNotFound, VersionedRespond 'V6 200 "Client found" Client] (Maybe Client)))))))) :<|> (Named "bot-get-client" (Summary "Get client for bot" :> (From 'V7 :> (CanThrow 'AccessDenied :> (CanThrow 'ClientNotFound :> (ZBot :> ("bot" :> ("client" :> MultiVerb 'GET '[JSON] '[ErrorResponse 'ClientNotFound, Respond 200 "Client found" Client] (Maybe Client)))))))) :<|> (Named "bot-claim-users-prekeys" (Summary "Claim users prekeys" :> (CanThrow 'AccessDenied :> (CanThrow 'TooManyClients :> (CanThrow 'MissingLegalholdConsentOldClients :> (CanThrow 'MissingLegalholdConsent :> (ZBot :> ("bot" :> ("users" :> ("prekeys" :> (ReqBody '[JSON] UserClients :> Post '[JSON] UserClientPrekeyMap)))))))))) :<|> (Named "bot-list-users" (Summary "List users" :> (CanThrow 'AccessDenied :> (ZBot :> ("bot" :> ("users" :> (QueryParam' [Required, Strict] "ids" (CommaSeparatedList UserId) :> Get '[JSON] [BotUserView])))))) :<|> Named "bot-get-user-clients" (Summary "Get user clients" :> (CanThrow 'AccessDenied :> (ZBot :> ("bot" :> ("users" :> (Capture "User ID" UserId :> ("clients" :> Get '[JSON] [PubClient])))))))))))))))) Source #