wire-api-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.API.Routes.Public.Galley.LegalHold

Documentation

type LegalHoldAPI = Named "create-legal-hold-settings" (Summary "Create legal hold service settings" :> (CanThrow 'NotATeamMember :> (CanThrow OperationDenied :> (CanThrow 'LegalHoldNotEnabled :> (CanThrow 'LegalHoldServiceInvalidKey :> (CanThrow 'LegalHoldServiceBadResponse :> (ZLocalUser :> ("teams" :> (Capture "tid" TeamId :> ("legalhold" :> ("settings" :> (ReqBody '[JSON] NewLegalHoldService :> MultiVerb1 'POST '[JSON] (Respond 201 "Legal hold service settings created" ViewLegalHoldService))))))))))))) :<|> (Named "get-legal-hold-settings" (Summary "Get legal hold service settings" :> (CanThrow 'NotATeamMember :> (CanThrow OperationDenied :> (ZLocalUser :> ("teams" :> (Capture "tid" TeamId :> ("legalhold" :> ("settings" :> Get '[JSON] ViewLegalHoldService)))))))) :<|> (Named "delete-legal-hold-settings" (Summary "Delete legal hold service settings" :> (MakesFederatedCall 'Galley "on-conversation-updated" :> (MakesFederatedCall 'Galley "on-mls-message-sent" :> (MakesFederatedCall 'Brig "get-users-by-ids" :> (CanThrow AuthenticationError :> (CanThrow OperationDenied :> (CanThrow 'NotATeamMember :> (CanThrow ('ActionDenied 'RemoveConversationMember) :> (CanThrow 'InvalidOperation :> (CanThrow 'LegalHoldNotEnabled :> (CanThrow 'LegalHoldDisableUnimplemented :> (CanThrow 'LegalHoldServiceNotRegistered :> (CanThrow 'UserLegalHoldIllegalOperation :> (CanThrow 'LegalHoldCouldNotBlockConnections :> (Description "This endpoint can lead to the following events being sent:\n- ClientRemoved event to members with a legalhold client (via brig)\n- UserLegalHoldDisabled event to contacts of members with a legalhold client (via brig)" :> (ZLocalUser :> ("teams" :> (Capture "tid" TeamId :> ("legalhold" :> ("settings" :> (ReqBody '[JSON] RemoveLegalHoldSettingsRequest :> MultiVerb1 'DELETE '[JSON] (RespondEmpty 204 "Legal hold service settings deleted")))))))))))))))))))))) :<|> (Named "get-legal-hold" (Summary "Get legal hold status" :> (CanThrow 'TeamMemberNotFound :> (ZLocalUser :> ("teams" :> (Capture "tid" TeamId :> ("legalhold" :> (Capture "uid" UserId :> Get '[JSON] UserLegalHoldStatusResponse))))))) :<|> (Named "consent-to-legal-hold" (Summary "Consent to legal hold" :> (MakesFederatedCall 'Galley "on-conversation-updated" :> (MakesFederatedCall 'Galley "on-mls-message-sent" :> (MakesFederatedCall 'Brig "get-users-by-ids" :> (CanThrow ('ActionDenied 'RemoveConversationMember) :> (CanThrow 'InvalidOperation :> (CanThrow 'TeamMemberNotFound :> (CanThrow 'UserLegalHoldIllegalOperation :> (CanThrow 'LegalHoldCouldNotBlockConnections :> (ZLocalUser :> ("teams" :> (Capture "tid" TeamId :> ("legalhold" :> ("consent" :> MultiVerb 'POST '[JSON] GrantConsentResultResponseTypes GrantConsentResult)))))))))))))) :<|> (Named "request-legal-hold-device" (Summary "Request legal hold device" :> (MakesFederatedCall 'Galley "on-conversation-updated" :> (MakesFederatedCall 'Galley "on-mls-message-sent" :> (MakesFederatedCall 'Brig "get-users-by-ids" :> (CanThrow ('ActionDenied 'RemoveConversationMember) :> (CanThrow 'NotATeamMember :> (CanThrow OperationDenied :> (CanThrow 'TeamMemberNotFound :> (CanThrow 'LegalHoldNotEnabled :> (CanThrow 'UserLegalHoldAlreadyEnabled :> (CanThrow 'NoUserLegalHoldConsent :> (CanThrow 'LegalHoldServiceBadResponse :> (CanThrow 'LegalHoldServiceNotRegistered :> (CanThrow 'LegalHoldCouldNotBlockConnections :> (CanThrow 'MLSLegalholdIncompatible :> (CanThrow 'UserLegalHoldIllegalOperation :> (Description "This endpoint can lead to the following events being sent:\n- LegalHoldClientRequested event to contacts of the user the device is requested for, if they didn't already have a legalhold client (via brig)" :> (ZLocalUser :> ("teams" :> (Capture "tid" TeamId :> ("legalhold" :> (Capture "uid" UserId :> MultiVerb 'POST '[JSON] RequestDeviceResultResponseType RequestDeviceResult)))))))))))))))))))))) :<|> (Named "disable-legal-hold-for-user" (Summary "Disable legal hold for user" :> (MakesFederatedCall 'Galley "on-conversation-updated" :> (MakesFederatedCall 'Galley "on-mls-message-sent" :> (MakesFederatedCall 'Brig "get-users-by-ids" :> (CanThrow AuthenticationError :> (CanThrow ('ActionDenied 'RemoveConversationMember) :> (CanThrow 'NotATeamMember :> (CanThrow OperationDenied :> (CanThrow 'LegalHoldServiceNotRegistered :> (CanThrow 'UserLegalHoldIllegalOperation :> (CanThrow 'LegalHoldCouldNotBlockConnections :> (Description "This endpoint can lead to the following events being sent:\n- ClientRemoved event to the user owning the client (via brig)\n- UserLegalHoldDisabled event to contacts of the user owning the client (via brig)" :> (ZLocalUser :> ("teams" :> (Capture "tid" TeamId :> ("legalhold" :> (Capture "uid" UserId :> (ReqBody '[JSON] DisableLegalHoldForUserRequest :> MultiVerb 'DELETE '[JSON] DisableLegalHoldForUserResponseType DisableLegalHoldForUserResponse)))))))))))))))))) :<|> Named "approve-legal-hold-device" (Summary "Approve legal hold device" :> (MakesFederatedCall 'Galley "on-conversation-updated" :> (MakesFederatedCall 'Galley "on-mls-message-sent" :> (MakesFederatedCall 'Brig "get-users-by-ids" :> (CanThrow AuthenticationError :> (CanThrow 'AccessDenied :> (CanThrow ('ActionDenied 'RemoveConversationMember) :> (CanThrow 'NotATeamMember :> (CanThrow 'LegalHoldNotEnabled :> (CanThrow 'UserLegalHoldNotPending :> (CanThrow 'NoLegalHoldDeviceAllocated :> (CanThrow 'LegalHoldServiceNotRegistered :> (CanThrow 'UserLegalHoldAlreadyEnabled :> (CanThrow 'UserLegalHoldIllegalOperation :> (CanThrow 'LegalHoldCouldNotBlockConnections :> (Description "This endpoint can lead to the following events being sent:\n- ClientAdded event to the user owning the client (via brig)\n- UserLegalHoldEnabled event to contacts of the user owning the client (via brig)\n- ClientRemoved event to the user, if removing old client due to max number (via brig)" :> (ZLocalUser :> (ZConn :> ("teams" :> (Capture "tid" TeamId :> ("legalhold" :> (Capture "uid" UserId :> ("approve" :> (ReqBody '[JSON] ApproveLegalHoldForUserRequest :> MultiVerb1 'PUT '[JSON] (RespondEmpty 200 "Legal hold approved"))))))))))))))))))))))))))))))) Source #

type RequestDeviceResultResponseType = '[RespondEmpty 201 "Request device successful", RespondEmpty 204 "Request device already pending"] Source #

data RequestDeviceResult Source #

Instances

Instances details
Generic RequestDeviceResult Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley.LegalHold

Associated Types

type Rep RequestDeviceResult :: Type -> Type #

Generic RequestDeviceResult Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley.LegalHold

Associated Types

type Code RequestDeviceResult :: [[Type]] Source #

AsUnion RequestDeviceResultResponseType RequestDeviceResult Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley.LegalHold

type Rep RequestDeviceResult Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley.LegalHold

type Rep RequestDeviceResult = D1 ('MetaData "RequestDeviceResult" "Wire.API.Routes.Public.Galley.LegalHold" "wire-api-0.1.0-3915FetN8WgFcCGrbk6Vve" 'False) (C1 ('MetaCons "RequestDeviceSuccess" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RequestDeviceAlreadyPending" 'PrefixI 'False) (U1 :: Type -> Type))
type Code RequestDeviceResult Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley.LegalHold

type DisableLegalHoldForUserResponseType = '[RespondEmpty 200 "Disable legal hold successful", RespondEmpty 204 "Legal hold was not enabled"] Source #

data DisableLegalHoldForUserResponse Source #

Instances

Instances details
Generic DisableLegalHoldForUserResponse Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley.LegalHold

Associated Types

type Rep DisableLegalHoldForUserResponse :: Type -> Type #

Generic DisableLegalHoldForUserResponse Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley.LegalHold

Associated Types

type Code DisableLegalHoldForUserResponse :: [[Type]] Source #

AsUnion DisableLegalHoldForUserResponseType DisableLegalHoldForUserResponse Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley.LegalHold

type Rep DisableLegalHoldForUserResponse Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley.LegalHold

type Rep DisableLegalHoldForUserResponse = D1 ('MetaData "DisableLegalHoldForUserResponse" "Wire.API.Routes.Public.Galley.LegalHold" "wire-api-0.1.0-3915FetN8WgFcCGrbk6Vve" 'False) (C1 ('MetaCons "DisableLegalHoldSuccess" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DisableLegalHoldWasNotEnabled" 'PrefixI 'False) (U1 :: Type -> Type))
type Code DisableLegalHoldForUserResponse Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley.LegalHold

type GrantConsentResultResponseTypes = '[RespondEmpty 201 "Grant consent successful", RespondEmpty 204 "Consent already granted"] Source #

data GrantConsentResult Source #

Instances

Instances details
Generic GrantConsentResult Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley.LegalHold

Associated Types

type Rep GrantConsentResult :: Type -> Type #

Generic GrantConsentResult Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley.LegalHold

Associated Types

type Code GrantConsentResult :: [[Type]] Source #

AsUnion GrantConsentResultResponseTypes GrantConsentResult Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley.LegalHold

type Rep GrantConsentResult Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley.LegalHold

type Rep GrantConsentResult = D1 ('MetaData "GrantConsentResult" "Wire.API.Routes.Public.Galley.LegalHold" "wire-api-0.1.0-3915FetN8WgFcCGrbk6Vve" 'False) (C1 ('MetaCons "GrantConsentSuccess" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GrantConsentAlreadyGranted" 'PrefixI 'False) (U1 :: Type -> Type))
type Code GrantConsentResult Source # 
Instance details

Defined in Wire.API.Routes.Public.Galley.LegalHold