wire-api-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.API.Routes.Internal.Galley

Documentation

type LegalHoldFeaturesStatusChangeFederatedCalls = '[MakesFederatedCall 'Galley "on-conversation-updated", MakesFederatedCall 'Galley "on-mls-message-sent"] Source #

type family IAllFeaturesAPI cfgs where ... Source #

Equations

IAllFeaturesAPI '[cfg] = IFeatureAPI1 cfg 
IAllFeaturesAPI (cfg : cfgs) = IFeatureAPI1 cfg :<|> IAllFeaturesAPI cfgs 

type InternalAPIBase = Named "status" ("status" :> MultiVerb 'GET '[JSON] '[RespondEmpty 200 "OK"] ()) :<|> (Named "delete-user" (Summary "Remove a user from their teams and conversations and erase their clients" :> (MakesFederatedCall 'Galley "on-conversation-updated" :> (MakesFederatedCall 'Galley "on-mls-message-sent" :> (ZLocalUser :> (ZOptConn :> ("user" :> MultiVerb 'DELETE '[JSON] '[RespondEmpty 200 "Remove a user from Galley"] ())))))) :<|> (Named "connect" (Summary "Create a connect conversation (deprecated)" :> (MakesFederatedCall 'Brig "api-version" :> (MakesFederatedCall 'Galley "on-conversation-created" :> (MakesFederatedCall 'Galley "on-conversation-updated" :> (CanThrow 'ConvNotFound :> (CanThrow 'InvalidOperation :> (CanThrow 'NotConnected :> (CanThrow UnreachableBackends :> (ZLocalUser :> (ZOptConn :> ("conversations" :> ("connect" :> (ReqBody '[JSON] Connect :> ConversationVerb 'V6 Conversation))))))))))))) :<|> (Named "get-conversation-clients" (Summary "Get mls conversation client list" :> (CanThrow 'ConvNotFound :> ("group" :> (Capture "gid" GroupId :> MultiVerb1 'GET '[JSON] (Respond 200 "Clients" ClientList))))) :<|> (Named "guard-legalhold-policy-conflicts" ("guard-legalhold-policy-conflicts" :> (CanThrow 'MissingLegalholdConsent :> (CanThrow 'MissingLegalholdConsentOldClients :> (ReqBody '[JSON] GuardLegalholdPolicyConflicts :> MultiVerb1 'PUT '[JSON] (RespondEmpty 200 "Guard Legalhold Policy"))))) :<|> (ILegalholdWhitelistedTeamsAPI :<|> (ITeamsAPI :<|> (IMiscAPI :<|> (Named "upsert-one2one" (Summary "Create or Update a connect or one2one conversation." :> ("conversations" :> ("one2one" :> ("upsert" :> (ReqBody '[JSON] UpsertOne2OneConversationRequest :> MultiVerb1 'POST '[JSON] (RespondEmpty 200 "Upsert One2One Policy")))))) :<|> (IFeatureAPI :<|> (IFederationAPI :<|> (IConversationAPI :<|> IEJPDAPI))))))))))) Source #

type ILegalholdWhitelistedTeamsAPIBase = Named "set-team-legalhold-whitelisted" (MultiVerb1 'PUT '[JSON] (RespondEmpty 200 "Team Legalhold Whitelisted")) :<|> (Named "unset-team-legalhold-whitelisted" (MultiVerb1 'DELETE '[JSON] (RespondEmpty 204 "Team Legalhold un-Whitelisted")) :<|> Named "get-team-legalhold-whitelisted" (MultiVerb 'GET '[JSON] '[RespondEmpty 404 "Team not Legalhold Whitelisted", RespondEmpty 200 "Team Legalhold Whitelisted"] Bool)) Source #

type ITeamsAPIBase = Named "get-team-internal" (CanThrow 'TeamNotFound :> Get '[JSON] TeamData) :<|> (Named "create-binding-team" (ZUser :> (ReqBody '[JSON] BindingNewTeam :> MultiVerb1 'PUT '[JSON] (WithHeaders '[Header "Location" TeamId] TeamId (RespondEmpty 201 "OK")))) :<|> (Named "delete-binding-team" (CanThrow 'NoBindingTeam :> (CanThrow 'NotAOneMemberTeam :> (CanThrow 'DeleteQueueFull :> (CanThrow 'TeamNotFound :> (QueryFlag "force" :> MultiVerb1 'DELETE '[JSON] (RespondEmpty 202 "OK")))))) :<|> (Named "get-team-name" ("name" :> (CanThrow 'TeamNotFound :> Get '[JSON] TeamName)) :<|> (Named "update-team-status" ("status" :> (CanThrow 'TeamNotFound :> (CanThrow 'InvalidTeamStatusUpdate :> (ReqBody '[JSON] TeamStatusUpdate :> MultiVerb1 'PUT '[JSON] (RespondEmpty 200 "OK"))))) :<|> (("members" :> (Named "unchecked-add-team-member" (CanThrow 'TooManyTeamMembers :> (CanThrow 'TooManyTeamMembersOnTeamWithLegalhold :> (CanThrow 'TooManyTeamAdmins :> (ReqBody '[JSON] NewTeamMember :> MultiVerb1 'POST '[JSON] (RespondEmpty 200 "OK"))))) :<|> (Named "unchecked-get-team-members" (QueryParam' '[Strict] "maxResults" (Range 1 HardTruncationLimit Int32) :> Get '[JSON] TeamMemberList) :<|> (Named "unchecked-get-team-member" (Capture "uid" UserId :> (CanThrow 'TeamMemberNotFound :> Get '[JSON] TeamMember)) :<|> (Named "can-user-join-team" ("check" :> (CanThrow 'TooManyTeamMembersOnTeamWithLegalhold :> MultiVerb1 'GET '[JSON] (RespondEmpty 200 "User can join"))) :<|> Named "unchecked-update-team-member" (CanThrow 'AccessDenied :> (CanThrow 'InvalidPermissions :> (CanThrow 'TeamNotFound :> (CanThrow 'TeamMemberNotFound :> (CanThrow 'TooManyTeamAdmins :> (CanThrow 'NotATeamMember :> (CanThrow OperationDenied :> (ReqBody '[JSON] NewTeamMember :> MultiVerb1 'PUT '[JSON] (RespondEmpty 200 "")))))))))))))) :<|> (Named "user-is-team-owner" ("is-team-owner" :> (Capture "uid" UserId :> (CanThrow 'AccessDenied :> (CanThrow 'TeamMemberNotFound :> (CanThrow 'NotATeamMember :> MultiVerb1 'GET '[JSON] (RespondEmpty 200 "User is team owner")))))) :<|> ("search-visibility" :> (Named "get-search-visibility-internal" (Get '[JSON] TeamSearchVisibilityView) :<|> Named "set-search-visibility-internal" (CanThrow 'TeamSearchVisibilityNotEnabled :> (CanThrow OperationDenied :> (CanThrow 'NotATeamMember :> (CanThrow 'TeamNotFound :> (ReqBody '[JSON] TeamSearchVisibilityView :> MultiVerb1 'PUT '[JSON] (RespondEmpty 204 "OK")))))))))))))) Source #

type FeatureNoConfigMultiGetBase featureName = Summary (AppendSymbol "Get team feature status in bulk for feature " (FeatureSymbol featureName)) :> ("features-multi-teams" :> (FeatureSymbol featureName :> (ReqBody '[JSON] TeamFeatureNoConfigMultiRequest :> Post '[JSON] (TeamFeatureNoConfigMultiResponse featureName)))) Source #

type IFederationAPI = Named "get-federation-status" (Summary "Get the federation status (only needed for integration/QA tests at the time of writing it)" :> (CanThrow UnreachableBackends :> (ZLocalUser :> ("federation-status" :> (ReqBody '[JSON] RemoteDomains :> Get '[JSON] FederationStatus))))) Source #

type IConversationAPI = Named "conversation-get-member" ("conversations" :> (Capture "cnv" ConvId :> ("members" :> (Capture "usr" UserId :> Get '[JSON] (Maybe Member))))) :<|> (Named "conversation-accept-v2" (CanThrow 'InvalidOperation :> (CanThrow 'ConvNotFound :> (ZLocalUser :> (ZOptConn :> ("conversations" :> (Capture "cnv" ConvId :> ("accept" :> ("v2" :> Put '[JSON] Conversation)))))))) :<|> (Named "conversation-block-unqualified" (CanThrow 'InvalidOperation :> (CanThrow 'ConvNotFound :> (ZUser :> ("conversations" :> (Capture "cnv" ConvId :> ("block" :> Put '[JSON] ())))))) :<|> (Named "conversation-block" (CanThrow 'InvalidOperation :> (CanThrow 'ConvNotFound :> (ZLocalUser :> ("conversations" :> (QualifiedCapture "cnv" ConvId :> ("block" :> Put '[JSON] ())))))) :<|> (Named "conversation-unblock-unqualified" (CanThrow 'InvalidOperation :> (CanThrow 'ConvNotFound :> (ZLocalUser :> (ZOptConn :> ("conversations" :> (Capture "cnv" ConvId :> ("unblock" :> Put '[JSON] Conversation))))))) :<|> (Named "conversation-unblock" (CanThrow 'InvalidOperation :> (CanThrow 'ConvNotFound :> (ZLocalUser :> (ZOptConn :> ("conversations" :> (QualifiedCapture "cnv" ConvId :> ("unblock" :> Put '[JSON] ()))))))) :<|> (Named "conversation-meta" (CanThrow 'ConvNotFound :> ("conversations" :> (Capture "cnv" ConvId :> ("meta" :> Get '[JSON] ConversationMetadata)))) :<|> (Named "conversation-mls-one-to-one" (CanThrow 'NotConnected :> (CanThrow 'MLSNotEnabled :> ("conversations" :> ("mls-one2one" :> (ZLocalUser :> (QualifiedCapture "user" UserId :> Get '[JSON] Conversation)))))) :<|> Named "conversation-mls-one-to-one-established" (CanThrow 'NotConnected :> (CanThrow 'MLSNotEnabled :> (ZLocalUser :> ("conversations" :> ("mls-one2one" :> (QualifiedCapture "user" UserId :> ("established" :> Get '[JSON] Bool)))))))))))))) Source #

type IMiscAPI = Named "get-team-members" (CanThrow 'NonBindingTeam :> (CanThrow 'TeamNotFound :> ("users" :> (Capture "uid" UserId :> ("team" :> ("members" :> Get '[JSON] TeamMemberList)))))) :<|> (Named "get-team-id" (CanThrow 'NonBindingTeam :> (CanThrow 'TeamNotFound :> ("users" :> (Capture "uid" UserId :> ("team" :> Get '[JSON] TeamId))))) :<|> (Named "test-get-clients" ("test" :> ("clients" :> (ZUser :> Get '[JSON] [ClientId]))) :<|> (Named "test-add-client" ("clients" :> (ZUser :> (Capture "cid" ClientId :> MultiVerb1 'POST '[JSON] (RespondEmpty 200 "OK")))) :<|> (Named "test-delete-client" ("clients" :> (ZUser :> (Capture "cid" ClientId :> MultiVerb1 'DELETE '[JSON] (RespondEmpty 200 "OK")))) :<|> (Named "add-service" ("services" :> (ReqBody '[JSON] Service :> MultiVerb1 'POST '[JSON] (RespondEmpty 200 "OK"))) :<|> (Named "delete-service" ("services" :> (ReqBody '[JSON] ServiceRef :> MultiVerb1 'DELETE '[JSON] (RespondEmpty 200 "OK"))) :<|> (Named "i-add-bot" (CanThrow ('ActionDenied 'AddConversationMember) :> (CanThrow 'ConvNotFound :> (CanThrow 'InvalidOperation :> (CanThrow 'TooManyMembers :> ("bots" :> (ZLocalUser :> (ZConn :> (ReqBody '[JSON] AddBot :> Post '[JSON] Event)))))))) :<|> (Named "delete-bot" (CanThrow 'ConvNotFound :> (CanThrow ('ActionDenied 'RemoveConversationMember) :> ("bots" :> (ZLocalUser :> (ZOptConn :> (ReqBody '[JSON] RemoveBot :> MultiVerb 'DELETE '[JSON] (UpdateResponses "Bot not found" "Bot deleted" Event) (UpdateResult Event))))))) :<|> (Named "put-custom-backend" ("custom-backend" :> ("by-domain" :> (Capture "domain" Domain :> (ReqBody '[JSON] CustomBackend :> MultiVerb1 'PUT '[JSON] (RespondEmpty 201 "OK"))))) :<|> Named "delete-custom-backend" ("custom-backend" :> ("by-domain" :> (Capture "domain" Domain :> MultiVerb1 'DELETE '[JSON] (RespondEmpty 200 "OK"))))))))))))) Source #

type IEJPDAPI = Named "get-conversations-by-user" (CanThrow 'NotConnected :> ("user" :> (Capture "user" UserId :> ("all-conversations" :> Get '[JSON] [EJPDConvInfo])))) Source #