Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- type API = "i" :> (IStatusAPI :<|> (EJPDRequest :<|> (AccountAPI :<|> (MLSAPI :<|> (GetVerificationCode :<|> (TeamsAPI :<|> (UserAPI :<|> (ClientAPI :<|> (AuthAPI :<|> (OAuthAPI :<|> (ISearchIndexAPI :<|> (FederationRemotesAPI :<|> ProviderAPI))))))))))))
- data BrigInternalClient a
- brigInternalClient :: forall (name :: Symbol) endpoint. (HasEndpoint API endpoint name, HasClient BrigInternalClient endpoint) => Client BrigInternalClient endpoint
- runBrigInternalClient :: Manager -> Endpoint -> BrigInternalClient a -> IO (Either ClientError a)
- type IStatusAPI = Named "get-status" (Summary "do nothing, just check liveness (NB: this works for both get, head)" :> ("status" :> Get '[JSON] NoContent))
- type AccountAPI = Named "get-account-conference-calling-config" GetAccountConferenceCallingConfig :<|> (PutAccountConferenceCallingConfig :<|> (DeleteAccountConferenceCallingConfig :<|> (GetAllConnectionsUnqualified :<|> (GetAllConnections :<|> (Named "createUserNoVerify" ("users" :> (ReqBody '[JSON] NewUser :> MultiVerb 'POST '[JSON] RegisterInternalResponses (Either RegisterError SelfProfile))) :<|> (Named "createUserNoVerifySpar" ("users" :> ("spar" :> (ReqBody '[JSON] NewUserSpar :> MultiVerb 'POST '[JSON] CreateUserSparInternalResponses (Either CreateUserSparError SelfProfile)))) :<|> (Named "putSelfEmail" (Summary "Internal email update and activation. Used in tests and in spar for validating emails obtained via scim or saml implicit user creation. If the `validate` query parameter is false or missing, only update the email and do not activate." :> (ZUser :> ("self" :> ("email" :> (ReqBody '[JSON] EmailUpdate :> (QueryParam' [Optional, Strict, Description "whether to send validation email, or activate"] "validate" Bool :> MultiVerb 'PUT '[JSON] '[Respond 202 "Update accepted and pending activation of the new email" (), Respond 204 "No update, current and new email address are the same" ()] ChangeEmailResponse)))))) :<|> (Named "iDeleteUser" (Summary "This endpoint will lead to the following events being sent: UserDeleted event to all of its contacts, MemberLeave event to members for all conversations the user was in (via galley)" :> (CanThrow 'UserNotFound :> ("users" :> (Capture "uid" UserId :> MultiVerb 'DELETE '[JSON] '[Respond 200 "UserResponseAccountAlreadyDeleted" (), Respond 202 "UserResponseAccountDeleted" ()] DeleteUserResponse)))) :<|> (Named "iPutUserStatus" ("users" :> (Capture "uid" UserId :> ("status" :> (ReqBody '[JSON] AccountStatusUpdate :> Put '[JSON] NoContent)))) :<|> (Named "iGetUserStatus" (CanThrow 'UserNotFound :> ("users" :> (Capture "uid" UserId :> ("status" :> Get '[JSON] AccountStatusResp)))) :<|> (Named "iGetUsersByVariousKeys" ("users" :> (QueryParam' [Optional, Strict] "ids" (CommaSeparatedList UserId) :> (QueryParam' [Optional, Strict] "handles" (CommaSeparatedList Handle) :> (QueryParam' [Optional, Strict] "email" (CommaSeparatedList EmailAddress) :> (QueryParam' [Optional, Strict, Description "Also return new accounts with team invitation pending"] "includePendingInvitations" Bool :> Get '[JSON] [User]))))) :<|> (Named "iGetUserContacts" ("users" :> (Capture "uid" UserId :> ("contacts" :> Get '[JSON] UserIds))) :<|> (Named "iGetUserActivationCode" ("users" :> ("activation-code" :> (QueryParam' [Required, Strict] "email" EmailAddress :> Get '[JSON] GetActivationCodeResp))) :<|> (Named "iGetUserPasswordResetCode" ("users" :> ("password-reset-code" :> (QueryParam' [Required, Strict] "email" EmailAddress :> Get '[JSON] GetPasswordResetCodeResp))) :<|> (Named "iRevokeIdentity" (Summary "This endpoint can lead to the following events being sent: UserIdentityRemoved event to target user" :> ("users" :> ("revoke-identity" :> (QueryParam' [Required, Strict] "email" EmailAddress :> Post '[JSON] NoContent)))) :<|> (Named "iHeadBlacklist" ("users" :> ("blacklist" :> (QueryParam' [Required, Strict] "email" EmailAddress :> MultiVerb 'GET '[JSON] '[Respond 404 "Not blacklisted" (), Respond 200 "Yes blacklisted" ()] CheckBlacklistResponse))) :<|> (Named "iDeleteBlacklist" ("users" :> ("blacklist" :> (QueryParam' [Required, Strict] "email" EmailAddress :> Delete '[JSON] NoContent))) :<|> (Named "iPostBlacklist" ("users" :> ("blacklist" :> (QueryParam' [Required, Strict] "email" EmailAddress :> Post '[JSON] NoContent))) :<|> (Named "iPutUserSsoId" ("users" :> (Capture "uid" UserId :> ("sso-id" :> (ReqBody '[JSON] UserSSOId :> MultiVerb 'PUT '[JSON] '[RespondEmpty 200 "UpdateSSOIdSuccess", RespondEmpty 404 "UpdateSSOIdNotFound"] UpdateSSOIdResponse)))) :<|> (Named "iDeleteUserSsoId" ("users" :> (Capture "uid" UserId :> ("sso-id" :> MultiVerb 'DELETE '[JSON] '[RespondEmpty 200 "UpdateSSOIdSuccess", RespondEmpty 404 "UpdateSSOIdNotFound"] UpdateSSOIdResponse))) :<|> (Named "iPutManagedBy" ("users" :> (Capture "uid" UserId :> ("managed-by" :> (ReqBody '[JSON] ManagedByUpdate :> Put '[JSON] NoContent)))) :<|> (Named "iPutRichInfo" ("users" :> (Capture "uid" UserId :> ("rich-info" :> (ReqBody '[JSON] RichInfoUpdate :> Put '[JSON] NoContent)))) :<|> (Named "iPutHandle" ("users" :> (Capture "uid" UserId :> ("handle" :> (ReqBody '[JSON] HandleUpdate :> Put '[JSON] NoContent)))) :<|> (Named "iPutUserName" ("users" :> (Capture "uid" UserId :> ("name" :> (ReqBody '[JSON] NameUpdate :> Put '[JSON] NoContent)))) :<|> (Named "iGetRichInfo" ("users" :> (Capture "uid" UserId :> ("rich-info" :> Get '[JSON] RichInfo))) :<|> (Named "iGetRichInfoMulti" ("users" :> ("rich-info" :> (QueryParam' '[Optional, Strict] "ids" (CommaSeparatedList UserId) :> Get '[JSON] [(UserId, RichInfo)]))) :<|> (Named "iHeadHandle" (CanThrow 'InvalidHandle :> ("users" :> ("handles" :> (Capture "handle" Handle :> MultiVerb 'HEAD '[JSON] '[RespondEmpty 200 "CheckHandleResponseFound", RespondEmpty 404 "CheckHandleResponseNotFound"] CheckHandleResponse)))) :<|> (Named "iConnectionUpdate" ("connections" :> ("connection-update" :> (ReqBody '[JSON] UpdateConnectionsInternal :> Put '[JSON] NoContent))) :<|> (Named "iListClients" ("clients" :> (ReqBody '[JSON] UserSet :> Post '[JSON] UserClients)) :<|> (Named "iListClientsFull" ("clients" :> ("full" :> (ReqBody '[JSON] UserSet :> Post '[JSON] UserClientsFull))) :<|> (Named "iAddClient" (Summary "This endpoint can lead to the following events being sent: ClientAdded event to the user; ClientRemoved event to the user, if removing old clients due to max number of clients; UserLegalHoldEnabled event to contacts of the user, if client type is legalhold." :> ("clients" :> (Capture "uid" UserId :> (QueryParam' [Optional, Strict] "skip_reauth" Bool :> (ReqBody '[JSON] NewClient :> (Header' [Optional, Strict] "Z-Connection" ConnId :> Verb 'POST 201 '[JSON] Client)))))) :<|> (Named "iLegalholdAddClient" (Summary "This endpoint can lead to the following events being sent: LegalHoldClientRequested event to contacts of the user" :> ("clients" :> ("legalhold" :> (Capture "uid" UserId :> ("request" :> (ReqBody '[JSON] LegalHoldClientRequest :> Post '[JSON] NoContent)))))) :<|> Named "iLegalholdDeleteClient" (Summary "This endpoint can lead to the following events being sent: ClientRemoved event to the user; UserLegalHoldDisabled event to contacts of the user" :> ("clients" :> ("legalhold" :> (Capture "uid" UserId :> Delete '[JSON] NoContent))))))))))))))))))))))))))))))))))))
- type MLSAPI = "mls" :> GetMLSClients
- type TeamsAPI = Named "updateSearchVisibilityInbound" ("teams" :> (ReqBody '[JSON] (TeamStatus SearchVisibilityInboundConfig) :> Post '[JSON] ())) :<|> (InvitationByEmail :<|> (InvitationCode :<|> (SuspendTeam :<|> (UnsuspendTeam :<|> (TeamSize :<|> TeamInvitations)))))
- type UserAPI = UpdateUserLocale :<|> (DeleteUserLocale :<|> (GetDefaultLocale :<|> Named "get-user-export-data" (Summary "Get user export data" :> ("users" :> (Capture "uid" UserId :> ("export-data" :> MultiVerb1 'GET '[JSON] (Respond 200 "User export data" (Maybe TeamExportUser))))))))
- type ClientAPI = Named "update-client-last-active" (Summary "Update last_active field of a client" :> ("clients" :> (Capture "uid" UserId :> (Capture "client" ClientId :> ("activity" :> MultiVerb1 'POST '[JSON] (RespondEmpty 200 "OK"))))))
- type AuthAPI = Named "legalhold-login" ("legalhold-login" :> (ReqBody '[JSON] LegalHoldLogin :> MultiVerb1 'POST '[JSON] TokenResponse)) :<|> (Named "sso-login" ("sso-login" :> (ReqBody '[JSON] SsoLogin :> (QueryParam' [Optional, Strict] "persist" Bool :> MultiVerb1 'POST '[JSON] TokenResponse))) :<|> (Named "login-code" ("users" :> ("login-code" :> (QueryParam' [Required, Strict] "phone" Phone :> MultiVerb1 'GET '[JSON] (Respond 200 "Login code" PendingLoginCode)))) :<|> Named "reauthenticate" ("users" :> (Capture "uid" UserId :> ("reauthenticate" :> (ReqBody '[JSON] ReAuthUser :> MultiVerb1 'GET '[JSON] (RespondEmpty 200 "OK")))))))
- type FederationRemotesAPI = Named "add-federation-remotes" (Description FederationRemotesAPIDescription :> ("federation" :> ("remotes" :> (ReqBody '[JSON] FederationDomainConfig :> Post '[JSON] ())))) :<|> (Named "get-federation-remotes" (Description FederationRemotesAPIDescription :> ("federation" :> ("remotes" :> Get '[JSON] FederationDomainConfigs))) :<|> (Named "update-federation-remotes" (Description FederationRemotesAPIDescription :> ("federation" :> ("remotes" :> (Capture "domain" Domain :> (ReqBody '[JSON] FederationDomainConfig :> Put '[JSON] ()))))) :<|> (Named "add-federation-remote-team" (Description "Add a remote team to the list of teams that are allowed to federate with our domain" :> ("federation" :> ("remotes" :> (Capture "domain" Domain :> ("teams" :> (ReqBody '[JSON] FederationRemoteTeam :> Post '[JSON] ())))))) :<|> (Named "get-federation-remote-teams" (Description "Get a list of teams from a remote domain that our backend is allowed to federate with." :> ("federation" :> ("remotes" :> (Capture "domain" Domain :> ("teams" :> Get '[JSON] [FederationRemoteTeam]))))) :<|> Named "delete-federation-remote-team" (Description "Remove a remote team from the list of teams that are allowed to federate with our domain" :> ("federation" :> ("remotes" :> (Capture "domain" Domain :> ("teams" :> (Capture "team" TeamId :> Delete '[JSON] ()))))))))))
- type EJPDRequest = Summary "Identify users for law enforcement. Wire has legal requirements to cooperate with the authorities. The wire backend operations team uses this to answer identification requests manually. It is our best-effort representation of the minimum required information we need to hand over about targets and (in some cases) their communication peers. For more information, consult ejpd.admin.ch." :> ("ejpd-request" :> (QueryParam' [Optional, Strict, Description "Also provide information about all contacts of the identified users"] "include_contacts" Bool :> (ReqBody '[JSON] EJPDRequestBody :> Post '[JSON] EJPDResponseBody)))
- type ISearchIndexAPI = Named "indexRefresh" (Summary "make index updates visible (e.g. for integration testing)" :> ("index" :> ("refresh" :> Post '[JSON] NoContent)))
- type ProviderAPI = Named "get-provider-activation-code" (Summary "Retrieve activation code via api instead of email (for testing only)" :> ("provider" :> ("activation-code" :> (QueryParam' '[Required, Strict] "email" EmailAddress :> MultiVerb1 'GET '[JSON] (Respond 200 "" KeyValuePair)))))
- type GetAccountConferenceCallingConfig = Summary "Read cassandra field 'brig.user.feature_conference_calling'" :> ("users" :> (Capture "uid" UserId :> ("features" :> ("conferenceCalling" :> Get '[JSON] (Feature ConferenceCallingConfig)))))
- type PutAccountConferenceCallingConfig = Summary "Write to cassandra field 'brig.user.feature_conference_calling'" :> ("users" :> (Capture "uid" UserId :> ("features" :> ("conferenceCalling" :> (ReqBody '[JSON] (Feature ConferenceCallingConfig) :> Put '[JSON] NoContent)))))
- type DeleteAccountConferenceCallingConfig = Summary "Reset cassandra field 'brig.user.feature_conference_calling' to 'null'" :> ("users" :> (Capture "uid" UserId :> ("features" :> ("conferenceCalling" :> Delete '[JSON] NoContent))))
- swaggerDoc :: OpenApi
- module Wire.API.Routes.Internal.Brig.EJPD
- newtype FoundInvitationCode = FoundInvitationCode {}
Documentation
type API = "i" :> (IStatusAPI :<|> (EJPDRequest :<|> (AccountAPI :<|> (MLSAPI :<|> (GetVerificationCode :<|> (TeamsAPI :<|> (UserAPI :<|> (ClientAPI :<|> (AuthAPI :<|> (OAuthAPI :<|> (ISearchIndexAPI :<|> (FederationRemotesAPI :<|> ProviderAPI)))))))))))) Source #
data BrigInternalClient a Source #
Instances
brigInternalClient :: forall (name :: Symbol) endpoint. (HasEndpoint API endpoint name, HasClient BrigInternalClient endpoint) => Client BrigInternalClient endpoint Source #
runBrigInternalClient :: Manager -> Endpoint -> BrigInternalClient a -> IO (Either ClientError a) Source #
type IStatusAPI = Named "get-status" (Summary "do nothing, just check liveness (NB: this works for both get, head)" :> ("status" :> Get '[JSON] NoContent)) Source #
type AccountAPI = Named "get-account-conference-calling-config" GetAccountConferenceCallingConfig :<|> (PutAccountConferenceCallingConfig :<|> (DeleteAccountConferenceCallingConfig :<|> (GetAllConnectionsUnqualified :<|> (GetAllConnections :<|> (Named "createUserNoVerify" ("users" :> (ReqBody '[JSON] NewUser :> MultiVerb 'POST '[JSON] RegisterInternalResponses (Either RegisterError SelfProfile))) :<|> (Named "createUserNoVerifySpar" ("users" :> ("spar" :> (ReqBody '[JSON] NewUserSpar :> MultiVerb 'POST '[JSON] CreateUserSparInternalResponses (Either CreateUserSparError SelfProfile)))) :<|> (Named "putSelfEmail" (Summary "Internal email update and activation. Used in tests and in spar for validating emails obtained via scim or saml implicit user creation. If the `validate` query parameter is false or missing, only update the email and do not activate." :> (ZUser :> ("self" :> ("email" :> (ReqBody '[JSON] EmailUpdate :> (QueryParam' [Optional, Strict, Description "whether to send validation email, or activate"] "validate" Bool :> MultiVerb 'PUT '[JSON] '[Respond 202 "Update accepted and pending activation of the new email" (), Respond 204 "No update, current and new email address are the same" ()] ChangeEmailResponse)))))) :<|> (Named "iDeleteUser" (Summary "This endpoint will lead to the following events being sent: UserDeleted event to all of its contacts, MemberLeave event to members for all conversations the user was in (via galley)" :> (CanThrow 'UserNotFound :> ("users" :> (Capture "uid" UserId :> MultiVerb 'DELETE '[JSON] '[Respond 200 "UserResponseAccountAlreadyDeleted" (), Respond 202 "UserResponseAccountDeleted" ()] DeleteUserResponse)))) :<|> (Named "iPutUserStatus" ("users" :> (Capture "uid" UserId :> ("status" :> (ReqBody '[JSON] AccountStatusUpdate :> Put '[JSON] NoContent)))) :<|> (Named "iGetUserStatus" (CanThrow 'UserNotFound :> ("users" :> (Capture "uid" UserId :> ("status" :> Get '[JSON] AccountStatusResp)))) :<|> (Named "iGetUsersByVariousKeys" ("users" :> (QueryParam' [Optional, Strict] "ids" (CommaSeparatedList UserId) :> (QueryParam' [Optional, Strict] "handles" (CommaSeparatedList Handle) :> (QueryParam' [Optional, Strict] "email" (CommaSeparatedList EmailAddress) :> (QueryParam' [Optional, Strict, Description "Also return new accounts with team invitation pending"] "includePendingInvitations" Bool :> Get '[JSON] [User]))))) :<|> (Named "iGetUserContacts" ("users" :> (Capture "uid" UserId :> ("contacts" :> Get '[JSON] UserIds))) :<|> (Named "iGetUserActivationCode" ("users" :> ("activation-code" :> (QueryParam' [Required, Strict] "email" EmailAddress :> Get '[JSON] GetActivationCodeResp))) :<|> (Named "iGetUserPasswordResetCode" ("users" :> ("password-reset-code" :> (QueryParam' [Required, Strict] "email" EmailAddress :> Get '[JSON] GetPasswordResetCodeResp))) :<|> (Named "iRevokeIdentity" (Summary "This endpoint can lead to the following events being sent: UserIdentityRemoved event to target user" :> ("users" :> ("revoke-identity" :> (QueryParam' [Required, Strict] "email" EmailAddress :> Post '[JSON] NoContent)))) :<|> (Named "iHeadBlacklist" ("users" :> ("blacklist" :> (QueryParam' [Required, Strict] "email" EmailAddress :> MultiVerb 'GET '[JSON] '[Respond 404 "Not blacklisted" (), Respond 200 "Yes blacklisted" ()] CheckBlacklistResponse))) :<|> (Named "iDeleteBlacklist" ("users" :> ("blacklist" :> (QueryParam' [Required, Strict] "email" EmailAddress :> Delete '[JSON] NoContent))) :<|> (Named "iPostBlacklist" ("users" :> ("blacklist" :> (QueryParam' [Required, Strict] "email" EmailAddress :> Post '[JSON] NoContent))) :<|> (Named "iPutUserSsoId" ("users" :> (Capture "uid" UserId :> ("sso-id" :> (ReqBody '[JSON] UserSSOId :> MultiVerb 'PUT '[JSON] '[RespondEmpty 200 "UpdateSSOIdSuccess", RespondEmpty 404 "UpdateSSOIdNotFound"] UpdateSSOIdResponse)))) :<|> (Named "iDeleteUserSsoId" ("users" :> (Capture "uid" UserId :> ("sso-id" :> MultiVerb 'DELETE '[JSON] '[RespondEmpty 200 "UpdateSSOIdSuccess", RespondEmpty 404 "UpdateSSOIdNotFound"] UpdateSSOIdResponse))) :<|> (Named "iPutManagedBy" ("users" :> (Capture "uid" UserId :> ("managed-by" :> (ReqBody '[JSON] ManagedByUpdate :> Put '[JSON] NoContent)))) :<|> (Named "iPutRichInfo" ("users" :> (Capture "uid" UserId :> ("rich-info" :> (ReqBody '[JSON] RichInfoUpdate :> Put '[JSON] NoContent)))) :<|> (Named "iPutHandle" ("users" :> (Capture "uid" UserId :> ("handle" :> (ReqBody '[JSON] HandleUpdate :> Put '[JSON] NoContent)))) :<|> (Named "iPutUserName" ("users" :> (Capture "uid" UserId :> ("name" :> (ReqBody '[JSON] NameUpdate :> Put '[JSON] NoContent)))) :<|> (Named "iGetRichInfo" ("users" :> (Capture "uid" UserId :> ("rich-info" :> Get '[JSON] RichInfo))) :<|> (Named "iGetRichInfoMulti" ("users" :> ("rich-info" :> (QueryParam' '[Optional, Strict] "ids" (CommaSeparatedList UserId) :> Get '[JSON] [(UserId, RichInfo)]))) :<|> (Named "iHeadHandle" (CanThrow 'InvalidHandle :> ("users" :> ("handles" :> (Capture "handle" Handle :> MultiVerb 'HEAD '[JSON] '[RespondEmpty 200 "CheckHandleResponseFound", RespondEmpty 404 "CheckHandleResponseNotFound"] CheckHandleResponse)))) :<|> (Named "iConnectionUpdate" ("connections" :> ("connection-update" :> (ReqBody '[JSON] UpdateConnectionsInternal :> Put '[JSON] NoContent))) :<|> (Named "iListClients" ("clients" :> (ReqBody '[JSON] UserSet :> Post '[JSON] UserClients)) :<|> (Named "iListClientsFull" ("clients" :> ("full" :> (ReqBody '[JSON] UserSet :> Post '[JSON] UserClientsFull))) :<|> (Named "iAddClient" (Summary "This endpoint can lead to the following events being sent: ClientAdded event to the user; ClientRemoved event to the user, if removing old clients due to max number of clients; UserLegalHoldEnabled event to contacts of the user, if client type is legalhold." :> ("clients" :> (Capture "uid" UserId :> (QueryParam' [Optional, Strict] "skip_reauth" Bool :> (ReqBody '[JSON] NewClient :> (Header' [Optional, Strict] "Z-Connection" ConnId :> Verb 'POST 201 '[JSON] Client)))))) :<|> (Named "iLegalholdAddClient" (Summary "This endpoint can lead to the following events being sent: LegalHoldClientRequested event to contacts of the user" :> ("clients" :> ("legalhold" :> (Capture "uid" UserId :> ("request" :> (ReqBody '[JSON] LegalHoldClientRequest :> Post '[JSON] NoContent)))))) :<|> Named "iLegalholdDeleteClient" (Summary "This endpoint can lead to the following events being sent: ClientRemoved event to the user; UserLegalHoldDisabled event to contacts of the user" :> ("clients" :> ("legalhold" :> (Capture "uid" UserId :> Delete '[JSON] NoContent)))))))))))))))))))))))))))))))))))) Source #
type TeamsAPI = Named "updateSearchVisibilityInbound" ("teams" :> (ReqBody '[JSON] (TeamStatus SearchVisibilityInboundConfig) :> Post '[JSON] ())) :<|> (InvitationByEmail :<|> (InvitationCode :<|> (SuspendTeam :<|> (UnsuspendTeam :<|> (TeamSize :<|> TeamInvitations))))) Source #
type UserAPI = UpdateUserLocale :<|> (DeleteUserLocale :<|> (GetDefaultLocale :<|> Named "get-user-export-data" (Summary "Get user export data" :> ("users" :> (Capture "uid" UserId :> ("export-data" :> MultiVerb1 'GET '[JSON] (Respond 200 "User export data" (Maybe TeamExportUser)))))))) Source #
type ClientAPI = Named "update-client-last-active" (Summary "Update last_active field of a client" :> ("clients" :> (Capture "uid" UserId :> (Capture "client" ClientId :> ("activity" :> MultiVerb1 'POST '[JSON] (RespondEmpty 200 "OK")))))) Source #
type AuthAPI = Named "legalhold-login" ("legalhold-login" :> (ReqBody '[JSON] LegalHoldLogin :> MultiVerb1 'POST '[JSON] TokenResponse)) :<|> (Named "sso-login" ("sso-login" :> (ReqBody '[JSON] SsoLogin :> (QueryParam' [Optional, Strict] "persist" Bool :> MultiVerb1 'POST '[JSON] TokenResponse))) :<|> (Named "login-code" ("users" :> ("login-code" :> (QueryParam' [Required, Strict] "phone" Phone :> MultiVerb1 'GET '[JSON] (Respond 200 "Login code" PendingLoginCode)))) :<|> Named "reauthenticate" ("users" :> (Capture "uid" UserId :> ("reauthenticate" :> (ReqBody '[JSON] ReAuthUser :> MultiVerb1 'GET '[JSON] (RespondEmpty 200 "OK"))))))) Source #
type FederationRemotesAPI = Named "add-federation-remotes" (Description FederationRemotesAPIDescription :> ("federation" :> ("remotes" :> (ReqBody '[JSON] FederationDomainConfig :> Post '[JSON] ())))) :<|> (Named "get-federation-remotes" (Description FederationRemotesAPIDescription :> ("federation" :> ("remotes" :> Get '[JSON] FederationDomainConfigs))) :<|> (Named "update-federation-remotes" (Description FederationRemotesAPIDescription :> ("federation" :> ("remotes" :> (Capture "domain" Domain :> (ReqBody '[JSON] FederationDomainConfig :> Put '[JSON] ()))))) :<|> (Named "add-federation-remote-team" (Description "Add a remote team to the list of teams that are allowed to federate with our domain" :> ("federation" :> ("remotes" :> (Capture "domain" Domain :> ("teams" :> (ReqBody '[JSON] FederationRemoteTeam :> Post '[JSON] ())))))) :<|> (Named "get-federation-remote-teams" (Description "Get a list of teams from a remote domain that our backend is allowed to federate with." :> ("federation" :> ("remotes" :> (Capture "domain" Domain :> ("teams" :> Get '[JSON] [FederationRemoteTeam]))))) :<|> Named "delete-federation-remote-team" (Description "Remove a remote team from the list of teams that are allowed to federate with our domain" :> ("federation" :> ("remotes" :> (Capture "domain" Domain :> ("teams" :> (Capture "team" TeamId :> Delete '[JSON] ())))))))))) Source #
This is located in brig, not in federator, because brig has a cassandra instance. This is not ideal, and other services could keep their local in-ram copy of this table up to date via rabbitmq, but FUTUREWORK.
type EJPDRequest = Summary "Identify users for law enforcement. Wire has legal requirements to cooperate with the authorities. The wire backend operations team uses this to answer identification requests manually. It is our best-effort representation of the minimum required information we need to hand over about targets and (in some cases) their communication peers. For more information, consult ejpd.admin.ch." :> ("ejpd-request" :> (QueryParam' [Optional, Strict, Description "Also provide information about all contacts of the identified users"] "include_contacts" Bool :> (ReqBody '[JSON] EJPDRequestBody :> Post '[JSON] EJPDResponseBody))) Source #
type ISearchIndexAPI = Named "indexRefresh" (Summary "make index updates visible (e.g. for integration testing)" :> ("index" :> ("refresh" :> Post '[JSON] NoContent))) Source #
type ProviderAPI = Named "get-provider-activation-code" (Summary "Retrieve activation code via api instead of email (for testing only)" :> ("provider" :> ("activation-code" :> (QueryParam' '[Required, Strict] "email" EmailAddress :> MultiVerb1 'GET '[JSON] (Respond 200 "" KeyValuePair))))) Source #
type GetAccountConferenceCallingConfig = Summary "Read cassandra field 'brig.user.feature_conference_calling'" :> ("users" :> (Capture "uid" UserId :> ("features" :> ("conferenceCalling" :> Get '[JSON] (Feature ConferenceCallingConfig))))) Source #
type PutAccountConferenceCallingConfig = Summary "Write to cassandra field 'brig.user.feature_conference_calling'" :> ("users" :> (Capture "uid" UserId :> ("features" :> ("conferenceCalling" :> (ReqBody '[JSON] (Feature ConferenceCallingConfig) :> Put '[JSON] NoContent))))) Source #
type DeleteAccountConferenceCallingConfig = Summary "Reset cassandra field 'brig.user.feature_conference_calling' to 'null'" :> ("users" :> (Capture "uid" UserId :> ("features" :> ("conferenceCalling" :> Delete '[JSON] NoContent)))) Source #
swaggerDoc :: OpenApi Source #
newtype FoundInvitationCode Source #