wire-api-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.API.Routes.Internal.Gundeck

Synopsis

Documentation

data ReqBodyHack Source #

this can be replaced by `ReqBody '[JSON] Presence` once the fix in cannon from https://github.com/wireapp/wire-server/pull/4246 has been deployed everywhere.

Background: Cannon.WS.regInfo called gundeck without setting the content-type header here. wai-routes and wai-predicates were able to work with that; servant is less lenient.

Instances

Instances details
RoutesToPaths route => RoutesToPaths (ReqBodyHack :> route :: Type) Source #

cloned from instance for ReqBody'.

Instance details

Defined in Wire.API.Routes.Internal.Gundeck

HasOpenApi sub => HasOpenApi (ReqBodyHack :> sub :: Type) Source #

cloned from instance for ReqBody'.

Instance details

Defined in Wire.API.Routes.Internal.Gundeck

(HasServer api context, HasContextEntry (MkContextWithErrorFormatter context) ErrorFormatters) => HasServer (ReqBodyHack :> api :: Type) context Source #

cloned from instance for ReqBody'.

Instance details

Defined in Wire.API.Routes.Internal.Gundeck

Associated Types

type ServerT (ReqBodyHack :> api) m Source #

Methods

route :: Proxy (ReqBodyHack :> api) -> Context context -> Delayed env (Server (ReqBodyHack :> api)) -> Router env Source #

hoistServerWithContext :: Proxy (ReqBodyHack :> api) -> Proxy context -> (forall x. m x -> n x) -> ServerT (ReqBodyHack :> api) m -> ServerT (ReqBodyHack :> api) n Source #

type ServerT (ReqBodyHack :> api :: Type) m Source # 
Instance details

Defined in Wire.API.Routes.Internal.Gundeck

type ServerT (ReqBodyHack :> api :: Type) m = Presence -> ServerT api m

type InternalAPI = "i" :> (("status" :> Get '[JSON] NoContent) :<|> (("push" :> ("v2" :> (ReqBody '[JSON] [Push] :> Post '[JSON] NoContent))) :<|> (("presences" :> ((QueryParam' [Required, Strict] "ids" (CommaSeparatedList UserId) :> Get '[JSON] [Presence]) :<|> ((Capture "uid" UserId :> Get '[JSON] [Presence]) :<|> ((ReqBodyHack :> Verb 'POST 201 '[JSON] (Headers '[Header "Location" URI] NoContent)) :<|> (Capture "uid" UserId :> ("devices" :> (Capture "did" ConnId :> ("cannons" :> (Capture "cannon" CannonId :> Delete '[JSON] NoContent))))))))) :<|> ((ZUser :> ("clients" :> (Capture "cid" ClientId :> Delete '[JSON] NoContent))) :<|> ((ZUser :> ("user" :> Delete '[JSON] NoContent)) :<|> ("push-tokens" :> (Capture "uid" UserId :> Get '[JSON] PushTokenList))))))) Source #