wire-api-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.API.Routes.API

Synopsis

Documentation

class ServiceAPI service (v :: Version) where Source #

Minimal complete definition

Nothing

Associated Types

type ServiceAPIRoutes service Source #

type SpecialisedAPIRoutes v service :: Type Source #

Instances

Instances details
ServiceAPI BrigAPITag v Source # 
Instance details

Defined in Wire.API.Routes.Public.Brig

ServiceAPI OAuthAPITag v Source # 
Instance details

Defined in Wire.API.Routes.Public.Brig.OAuth

ServiceAPI CannonAPITag v Source # 
Instance details

Defined in Wire.API.Routes.Public.Cannon

ServiceAPI CargoholdAPITag v Source # 
Instance details

Defined in Wire.API.Routes.Public.Cargohold

ServiceAPI GalleyAPITag v Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley

ServiceAPI GundeckAPITag v Source # 
Instance details

Defined in Wire.API.Routes.Public.Gundeck

ServiceAPI ProxyAPITag v Source #

FUTUREWORK(fisx): (1) the verb could be added to the swagger docs in the appropriate place here; it's always defined in the Summary, but the RawM doesn't allow to constrain it. (2) there should be a way to make this more type-safe: assertMethod in Proxy.API.Public could take a type-level string literal argument containing the method, and that argument could be funnelled there from the routing table somehow: `"spotify" :> "api" :> "token" :> OnlyMethod POST :> RawM`, and then the ServerT instance for OnlyMethod requires a proxy argument in the handler of the same type. Or something. (am i massifly over-engineering things here?)

Instance details

Defined in Wire.API.Routes.Public.Proxy

ServiceAPI SparAPITag v Source # 
Instance details

Defined in Wire.API.Routes.Public.Spar

ServiceAPI VersionAPITag v Source # 
Instance details

Defined in Wire.API.Routes.API

data API api r Source #

A Servant handler on a polysemy stack. This is used to help with type inference.

hoistAPIHandler :: forall api r n. HasServer api '[Domain] => (forall x. Sem r x -> n x) -> API api r -> ServerT api n Source #

hoistAPI :: forall api1 api2 r1 r2. (ServerT api1 (Sem r1) -> ServerT api2 (Sem r2)) -> API api1 r1 -> API api2 r2 Source #

mkAPI :: forall r0 api. (HasServer api '[Domain], ServerEffects (DeclaredErrorEffects api) r0) => ServerT api (Sem (Append (DeclaredErrorEffects api) r0)) -> API api r0 Source #

Convert a polysemy handler to an API value.

mkNamedAPI :: forall name r0 api. (HasServer api '[Domain], ServerEffects (DeclaredErrorEffects api) r0) => ServerT api (Sem (Append (DeclaredErrorEffects api) r0)) -> API (Named name api) r0 Source #

Convert a polysemy handler to a named API value.

(<@>) :: API api1 r -> API api2 r -> API (api1 :<|> api2) r infixr 3 Source #

Combine APIs.

class ServerEffect eff r where Source #

Methods

interpretServerEffect :: Sem (eff ': r) a -> Sem r a Source #

Instances

Instances details
(KnownError (MapError e), Member (Error DynError :: (Type -> Type) -> Type -> Type) r) => ServerEffect (Error (Tagged e Text) :: (Type -> Type) -> Type -> Type) r Source # 
Instance details

Defined in Wire.API.Routes.API

Methods

interpretServerEffect :: Sem (Error (Tagged e Text) ': r) a -> Sem r a Source #

Member (Error DynError :: (Type -> Type) -> Type -> Type) r => ServerEffect (Error AuthenticationError :: (Type -> Type) -> Type -> Type) r Source # 
Instance details

Defined in Wire.API.Error.Galley

Member (Error JSONResponse :: (Type -> Type) -> Type -> Type) r => ServerEffect (Error MLSProposalFailure :: (Type -> Type) -> Type -> Type) r Source # 
Instance details

Defined in Wire.API.Error.Galley

Member (Error JSONResponse :: (Type -> Type) -> Type -> Type) r => ServerEffect (Error NonFederatingBackends :: (Type -> Type) -> Type -> Type) r Source # 
Instance details

Defined in Wire.API.Error.Galley

Member (Error DynError :: (Type -> Type) -> Type -> Type) r => ServerEffect (Error TeamFeatureError :: (Type -> Type) -> Type -> Type) r Source # 
Instance details

Defined in Wire.API.Error.Galley

Member (Error JSONResponse :: (Type -> Type) -> Type -> Type) r => ServerEffect (Error UnreachableBackends :: (Type -> Type) -> Type -> Type) r Source # 
Instance details

Defined in Wire.API.Error.Galley

Member (Error JSONResponse :: (Type -> Type) -> Type -> Type) r => ServerEffect (Error UnreachableBackendsLegacy :: (Type -> Type) -> Type -> Type) r Source # 
Instance details

Defined in Wire.API.Error.Galley

(KnownError (MapError e), Member (Error DynError :: (Type -> Type) -> Type -> Type) r) => ServerEffect (ErrorS e :: (Type -> Type) -> Type -> Type) r Source # 
Instance details

Defined in Wire.API.Routes.API

Methods

interpretServerEffect :: Sem (ErrorS e ': r) a -> Sem r a Source #

class ServerEffects r r1 where Source #

Methods

interpretServerEffects :: Sem (Append r r1) a -> Sem r1 a Source #

Instances

Instances details
ServerEffects ('[] :: [Effect]) r Source # 
Instance details

Defined in Wire.API.Routes.API

Methods

interpretServerEffects :: Sem (Append '[] r) a -> Sem r a Source #

(ServerEffects r r1, ServerEffect eff (Append r r1)) => ServerEffects (eff ': r) r1 Source # 
Instance details

Defined in Wire.API.Routes.API

Methods

interpretServerEffects :: Sem (Append (eff ': r) r1) a -> Sem r1 a Source #

hoistServerWithDomain :: forall api m n. HasServer api '[Domain] => (forall x. m x -> n x) -> ServerT api m -> ServerT api n Source #