module Galley.API.Public.CustomBackend where
import Galley.API.CustomBackend
import Galley.App
import Wire.API.Routes.API
import Wire.API.Routes.Public.Galley.CustomBackend
customBackendAPI :: API CustomBackendAPI GalleyEffects
customBackendAPI :: API CustomBackendAPI GalleyEffects
customBackendAPI = forall {k} (name :: k) (r0 :: EffectRow) api.
(HasServer api '[Domain],
ServerEffects (DeclaredErrorEffects api) r0) =>
ServerT api (Sem (Append (DeclaredErrorEffects api) r0))
-> API (Named name api) r0
forall (name :: Symbol) (r0 :: EffectRow) api.
(HasServer api '[Domain],
ServerEffects (DeclaredErrorEffects api) r0) =>
ServerT api (Sem (Append (DeclaredErrorEffects api) r0))
-> API (Named name api) r0
mkNamedAPI @"get-custom-backend-by-domain" ServerT
(Summary
"Shows information about custom backends related to a given email domain"
:> (CanThrow 'CustomBackendNotFound
:> ("custom-backend"
:> ("by-domain"
:> (Capture'
'[Description "URL-encoded email domain"] "domain" Domain
:> Get '[JSON] CustomBackend)))))
(Sem
(Append
(DeclaredErrorEffects
(Summary
"Shows information about custom backends related to a given email domain"
:> (CanThrow 'CustomBackendNotFound
:> ("custom-backend"
:> ("by-domain"
:> (Capture'
'[Description "URL-encoded email domain"] "domain" Domain
:> Get '[JSON] CustomBackend))))))
'[BrigAccess, SparAccess, NotificationSubsystem, GundeckAPIAccess,
Rpc, ExternalAccess, FederatorAccess,
BackendNotificationQueueAccess, BotAccess, FireAndForget,
ClientStore, CodeStore, ProposalStore, ConversationStore,
SubConversationStore, Random, CustomBackendStore, TeamFeatureStore,
LegalHoldStore, MemberStore, SearchVisibilityStore, ServiceStore,
TeamNotificationStore, TeamStore, TeamMemberStore InternalPaging,
TeamMemberStore CassandraPaging, ListItems CassandraPaging ConvId,
ListItems CassandraPaging (Remote ConvId),
ListItems LegacyPaging ConvId, ListItems LegacyPaging TeamId,
ListItems InternalPaging TeamId, Input AllTeamFeatures,
Input (Maybe [TeamId], FeatureDefaults LegalholdConfig),
Input (Local ()), Input Opts, Input UTCTime, Queue DeleteItem,
Logger (Msg -> Msg), Error DynError, Input ClientState, Input Env,
HashPassword, Error InvalidInput, Error InternalError,
Error FederationError, Async, Delay, Fail, Embed IO,
Error JSONResponse, Resource, Final IO]))
Domain
-> Sem
'[Error (Tagged 'CustomBackendNotFound ()), BrigAccess, SparAccess,
NotificationSubsystem, GundeckAPIAccess, Rpc, ExternalAccess,
FederatorAccess, BackendNotificationQueueAccess, BotAccess,
FireAndForget, ClientStore, CodeStore, ProposalStore,
ConversationStore, SubConversationStore, Random,
CustomBackendStore, TeamFeatureStore, LegalHoldStore, MemberStore,
SearchVisibilityStore, ServiceStore, TeamNotificationStore,
TeamStore, TeamMemberStore InternalPaging,
TeamMemberStore CassandraPaging, ListItems CassandraPaging ConvId,
ListItems CassandraPaging (Remote ConvId),
ListItems LegacyPaging ConvId, ListItems LegacyPaging TeamId,
ListItems InternalPaging TeamId, Input AllTeamFeatures,
Input (Maybe [TeamId], FeatureDefaults LegalholdConfig),
Input (Local ()), Input Opts, Input UTCTime, Queue DeleteItem,
Logger (Msg -> Msg), Error DynError, Input ClientState, Input Env,
HashPassword, Error InvalidInput, Error InternalError,
Error FederationError, Async, Delay, Fail, Embed IO,
Error JSONResponse, Resource, Final IO]
CustomBackend
forall (r :: EffectRow).
(Member CustomBackendStore r,
Member (Error (Tagged 'CustomBackendNotFound ())) r) =>
Domain -> Sem r CustomBackend
getCustomBackendByDomain