module Galley.API.Public.Servant (mkNamedAPI, servantSitemap) where
import Galley.API.Public.Bot
import Galley.API.Public.Conversation
import Galley.API.Public.CustomBackend
import Galley.API.Public.Feature
import Galley.API.Public.LegalHold
import Galley.API.Public.MLS
import Galley.API.Public.Messaging
import Galley.API.Public.Team
import Galley.API.Public.TeamConversation
import Galley.API.Public.TeamMember
import Galley.API.Public.TeamNotification
import Galley.App
import Wire.API.Routes.API
import Wire.API.Routes.Public.Galley
servantSitemap :: API GalleyAPI GalleyEffects
servantSitemap :: API GalleyAPI GalleyEffects
servantSitemap =
API ConversationAPI GalleyEffects
API
(Named
"get-unqualified-conversation"
(Summary "Get a conversation by ID"
:> (Until 'V3
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond 'V2 200 "Conversation" Conversation]
Conversation)))))))
:<|> (Named
"get-unqualified-conversation-legalhold-alias"
(Summary "Get a conversation by ID (Legalhold alias)"
:> (Until 'V2
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("legalhold"
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond 'V2 200 "Conversation" Conversation]
Conversation))))))))
:<|> (Named
"get-conversation@v2"
(Summary "Get a conversation by ID"
:> (Until 'V3
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture' '[] "cnv" (Id 'Conversation)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V2 200 "Conversation" Conversation]
Conversation)))))))
:<|> (Named
"get-conversation@v5"
(Summary "Get a conversation by ID"
:> (From 'V3
:> (Until 'V6
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture' '[] "cnv" (Id 'Conversation)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V5 200 "Conversation" Conversation]
Conversation))))))))
:<|> (Named
"get-conversation"
(Summary "Get a conversation by ID"
:> (From 'V6
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture' '[] "cnv" (Id 'Conversation)
:> Verb 'GET 200 '[JSON] Conversation)))))))
:<|> (Named
"get-conversation-roles"
(Summary
"Get existing roles available for the given conversation"
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> ("roles"
:> Verb
'GET
200
'[JSON]
ConversationRolesList)))))))
:<|> (Named
"get-group-info"
(Summary "Get MLS group information"
:> (From 'V5
:> (CanThrow 'ConvNotFound
:> (CanThrow 'MLSMissingGroupInfo
:> (CanThrow 'MLSNotEnabled
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture'
'[] "cnv" (Id 'Conversation)
:> ("groupinfo"
:> MultiVerb
'GET
'[MLS]
'[Respond
200
"The group information"
GroupInfoData]
GroupInfoData)))))))))
:<|> (Named
"list-conversation-ids-unqualified"
(Summary
"[deprecated] Get all local conversation IDs."
:> (Until 'V3
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> ("ids"
:> (QueryParam'
'[Optional, Strict,
Description
"Conversation ID to start from (exclusive)"]
"start"
(Id 'Conversation)
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum number of IDs to return"]
"size"
(Range 1 1000 Int32)
:> Verb
'GET
200
'[JSON]
(ConversationList
(Id
'Conversation)))))))))
:<|> (Named
"list-conversation-ids-v2"
(Summary "Get all conversation IDs."
:> (Until 'V3
:> (Description
"The IDs returned by this endpoint are paginated. To get the first page, make a call with the `paging_state` field set to `null` (or omitted). Whenever the `has_more` field of the response is set to `true`, more results are available, and they can be obtained by calling the endpoint again, but this time passing the value of `paging_state` returned by the previous call. One can continue in this fashion until all results are returned, which is indicated by `has_more` being `false`. Note that `paging_state` should be considered an opaque token. It should not be inspected, or stored, or reused across multiple unrelated invocations of the endpoint."
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("conversations"
:> ("list-ids"
:> (ReqBody'
'[Required, Strict]
'[JSON]
(GetMultiTablePageRequest
"ConversationIds"
LocalOrRemoteTable
1000
1000)
:> Verb
'POST
200
'[JSON]
(MultiTablePage
"ConversationIds"
"qualified_conversations"
LocalOrRemoteTable
(Qualified
(Id
'Conversation))))))))))
:<|> (Named
"list-conversation-ids"
(Summary "Get all conversation IDs."
:> (From 'V3
:> (Description
"The IDs returned by this endpoint are paginated. To get the first page, make a call with the `paging_state` field set to `null` (or omitted). Whenever the `has_more` field of the response is set to `true`, more results are available, and they can be obtained by calling the endpoint again, but this time passing the value of `paging_state` returned by the previous call. One can continue in this fashion until all results are returned, which is indicated by `has_more` being `false`. Note that `paging_state` should be considered an opaque token. It should not be inspected, or stored, or reused across multiple unrelated invocations of the endpoint."
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("conversations"
:> ("list-ids"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
(GetMultiTablePageRequest
"ConversationIds"
LocalOrRemoteTable
1000
1000)
:> Verb
'POST
200
'[JSON]
(MultiTablePage
"ConversationIds"
"qualified_conversations"
LocalOrRemoteTable
(Qualified
(Id
'Conversation))))))))))
:<|> (Named
"get-conversations"
(Summary
"Get all *local* conversations."
:> (Until 'V3
:> (Description
"Will not return remote conversations.\n\nUse `POST /conversations/list-ids` followed by `POST /conversations/list` instead."
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("conversations"
:> (QueryParam'
'[Optional,
Strict,
Description
"Mutually exclusive with 'start' (at most 32 IDs per request)"]
"ids"
(Range
1
32
(CommaSeparatedList
(Id
'Conversation)))
:> (QueryParam'
'[Optional,
Strict,
Description
"Conversation ID to start from (exclusive)"]
"start"
(Id
'Conversation)
:> (QueryParam'
'[Optional,
Strict,
Description
"Maximum number of conversations to return"]
"size"
(Range
1
500
Int32)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V2
200
"List of local conversations"
(ConversationList
Conversation)]
(ConversationList
Conversation)))))))))
:<|> (Named
"list-conversations@v1"
(Summary
"Get conversation metadata for a list of conversation ids"
:> (Until 'V2
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("list"
:> ("v2"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ListConversations
:> Verb
'POST
200
'[JSON]
ConversationsResponse)))))))
:<|> (Named
"list-conversations@v2"
(Summary
"Get conversation metadata for a list of conversation ids"
:> (From 'V2
:> (Until 'V3
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("list"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ListConversations
:> MultiVerb
'POST
'[JSON]
'[VersionedRespond
'V2
200
"Conversation page"
ConversationsResponse]
ConversationsResponse)))))))
:<|> (Named
"list-conversations@v5"
(Summary
"Get conversation metadata for a list of conversation ids"
:> (From 'V3
:> (Until
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("list"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ListConversations
:> MultiVerb
'POST
'[JSON]
'[VersionedRespond
'V5
200
"Conversation page"
ConversationsResponse]
ConversationsResponse)))))))
:<|> (Named
"list-conversations"
(Summary
"Get conversation metadata for a list of conversation ids"
:> (From
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("list"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ListConversations
:> Verb
'POST
200
'[JSON]
ConversationsResponse))))))
:<|> (Named
"get-conversation-by-reusable-code"
(Summary
"Get limited conversation information by key/code pair"
:> (CanThrow
'CodeNotFound
:> (CanThrow
'InvalidConversationPassword
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'GuestLinksDisabled
:> (CanThrow
'NotATeamMember
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("join"
:> (QueryParam'
'[Required,
Strict]
"key"
Key
:> (QueryParam'
'[Required,
Strict]
"code"
Value
:> Verb
'GET
200
'[JSON]
ConversationCoverView))))))))))))
:<|> (Named
"create-group-conversation@v2"
(Summary
"Create a new conversation"
:> (DescriptionOAuthScope
'WriteConversations
:> (Until
'V3
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSNonEmptyMemberList
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
UnreachableBackendsLegacy
:> (Description
"This returns 201 when a new conversation is created, and 200 when the conversation already existed"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (VersionedReqBody'
'V2
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation)))))))))))))))))
:<|> (Named
"create-group-conversation@v3"
(Summary
"Create a new conversation"
:> (DescriptionOAuthScope
'WriteConversations
:> (From
'V3
:> (Until
'V4
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSNonEmptyMemberList
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
UnreachableBackendsLegacy
:> (Description
"This returns 201 when a new conversation is created, and 200 when the conversation already existed"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V3
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V3
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation))))))))))))))))))
:<|> (Named
"create-group-conversation@v5"
(Summary
"Create a new conversation"
:> (From
'V4
:> (Until
'V6
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSNonEmptyMemberList
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> (Description
"This returns 201 when a new conversation is created, and 200 when the conversation already existed"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V5
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
CreateGroupConversation
(VersionedRespond
'V5
201
"Conversation created"
CreateGroupConversation)]
CreateGroupConversationResponse)))))))))))))))))
:<|> (Named
"create-group-conversation"
(Summary
"Create a new conversation"
:> (From
'V6
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSNonEmptyMemberList
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> (Description
"This returns 201 when a new conversation is created, and 200 when the conversation already existed"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V6
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
CreateGroupConversation
(VersionedRespond
'V6
201
"Conversation created"
CreateGroupConversation)]
CreateGroupConversationResponse))))))))))))))))
:<|> (Named
"create-self-conversation@v2"
(Summary
"Create a self-conversation"
:> (Until
'V3
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("self"
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation))))))
:<|> (Named
"create-self-conversation@v5"
(Summary
"Create a self-conversation"
:> (From
'V3
:> (Until
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("self"
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V5
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V5
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation)))))))
:<|> (Named
"create-self-conversation"
(Summary
"Create a self-conversation"
:> (From
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("self"
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V6
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V6
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation))))))
:<|> (Named
"get-mls-self-conversation@v5"
(Summary
"Get the user's MLS self-conversation"
:> (From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("mls-self"
:> (CanThrow
'MLSNotEnabled
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V5
200
"The MLS self-conversation"
Conversation]
Conversation)))))))
:<|> (Named
"get-mls-self-conversation"
(Summary
"Get the user's MLS self-conversation"
:> (From
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("mls-self"
:> (CanThrow
'MLSNotEnabled
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"The MLS self-conversation"
Conversation]
Conversation))))))
:<|> (Named
"get-subconversation"
(Summary
"Get information about an MLS subconversation"
:> (From
'V5
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSSubConvUnsupportedConvType
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id
'Conversation)
:> ("subconversations"
:> (Capture'
'[]
"subconv"
SubConvId
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Subconversation"
PublicSubConversation]
PublicSubConversation))))))))))
:<|> (Named
"leave-subconversation"
(Summary
"Leave an MLS subconversation"
:> (From
'V5
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSNotEnabled
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id
'Conversation)
:> ("subconversations"
:> (Capture'
'[]
"subconv"
SubConvId
:> ("self"
:> MultiVerb
'DELETE
'[JSON]
'[RespondAs
'()
200
"OK"
()]
()))))))))))))))
:<|> (Named
"delete-subconversation"
(Summary
"Delete an MLS subconversation"
:> (From
'V5
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSStaleMessage
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id
'Conversation)
:> ("subconversations"
:> (Capture'
'[]
"subconv"
SubConvId
:> (ReqBody'
'[Required,
Strict]
'[JSON]
DeleteSubConversationRequest
:> MultiVerb
'DELETE
'[JSON]
'[Respond
200
"Deletion successful"
()]
()))))))))))))
:<|> (Named
"get-subconversation-group-info"
(Summary
"Get MLS group information of subconversation"
:> (From
'V5
:> (CanThrow
'ConvNotFound
:> (CanThrow
'MLSMissingGroupInfo
:> (CanThrow
'MLSNotEnabled
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id
'Conversation)
:> ("subconversations"
:> (Capture'
'[]
"subconv"
SubConvId
:> ("groupinfo"
:> MultiVerb
'GET
'[MLS]
'[Respond
200
"The group information"
GroupInfoData]
GroupInfoData)))))))))))
:<|> (Named
"create-one-to-one-conversation@v2"
(Summary
"Create a 1:1 conversation"
:> (Until
'V3
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'InvalidOperation
:> (CanThrow
'NoBindingTeamMembers
:> (CanThrow
'NonBindingTeam
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
UnreachableBackendsLegacy
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> ("one2one"
:> (VersionedReqBody'
'V2
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation))))))))))))))))))
:<|> (Named
"create-one-to-one-conversation"
(Summary
"Create a 1:1 conversation"
:> (From
'V3
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'InvalidOperation
:> (CanThrow
'NoBindingTeamMembers
:> (CanThrow
'NonBindingTeam
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
UnreachableBackendsLegacy
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> ("one2one"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V3
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V3
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation))))))))))))))))))
:<|> (Named
"get-one-to-one-mls-conversation@v5"
(Summary
"Get an MLS 1:1 conversation"
:> (From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> (CanThrow
'MLSFederatedOne2OneNotSupported
:> ("conversations"
:> ("one2one"
:> (QualifiedCapture'
'[]
"usr"
(Id
'User)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V5
200
"MLS 1-1 conversation"
Conversation]
Conversation))))))))))
:<|> (Named
"get-one-to-one-mls-conversation@v6"
(Summary
"Get an MLS 1:1 conversation"
:> (From
'V6
:> (Until
'V7
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> ("conversations"
:> ("one2one"
:> (QualifiedCapture'
'[]
"usr"
(Id
'User)
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"MLS 1-1 conversation"
(MLSOne2OneConversation
MLSPublicKey)]
(MLSOne2OneConversation
MLSPublicKey))))))))))
:<|> (Named
"get-one-to-one-mls-conversation"
(Summary
"Get an MLS 1:1 conversation"
:> (From
'V7
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> ("conversations"
:> ("one2one"
:> (QualifiedCapture'
'[]
"usr"
(Id
'User)
:> (QueryParam'
'[Optional,
Strict]
"format"
MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"MLS 1-1 conversation"
(MLSOne2OneConversation
SomeKey)]
(MLSOne2OneConversation
SomeKey))))))))))
:<|> (Named
"add-members-to-conversation-unqualified"
(Summary
"Add members to an existing conversation (deprecated)"
:> (Until
'V2
:> (CanThrow
('ActionDenied
'AddConversationMember)
:> (CanThrow
('ActionDenied
'LeaveConversation)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'TooManyMembers
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[]
"cnv"
(Id
'Conversation)
:> ("members"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
Invite
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation updated"
Event]
(UpdateResult
Event))))))))))))))))))))
:<|> (Named
"add-members-to-conversation-unqualified2"
(Summary
"Add qualified members to an existing conversation."
:> (Until
'V2
:> (CanThrow
('ActionDenied
'AddConversationMember)
:> (CanThrow
('ActionDenied
'LeaveConversation)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'TooManyMembers
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[]
"cnv"
(Id
'Conversation)
:> ("members"
:> ("v2"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
InviteQualified
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation updated"
Event]
(UpdateResult
Event)))))))))))))))))))))
:<|> (Named
"add-members-to-conversation"
(Summary
"Add qualified members to an existing conversation."
:> (From
'V2
:> (CanThrow
('ActionDenied
'AddConversationMember)
:> (CanThrow
('ActionDenied
'LeaveConversation)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'TooManyMembers
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id
'Conversation)
:> ("members"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
InviteQualified
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation updated"
Event]
(UpdateResult
Event))))))))))))))))))))
:<|> (Named
"join-conversation-by-id-unqualified"
(Summary
"Join a conversation by its ID (if link access enabled) (deprecated)"
:> (Until
'V5
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TooManyMembers
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("join"
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation joined"
Event]
(UpdateResult
Event)))))))))))))
:<|> (Named
"join-conversation-by-code-unqualified"
(Summary
"Join a conversation using a reusable code"
:> (Description
"If the guest links team feature is disabled, this will fail with 409 GuestLinksDisabled.Note that this is currently inconsistent (for backwards compatibility reasons) with `POST /conversations/code-check` which responds with 404 CodeNotFound if guest links are disabled."
:> (CanThrow
'CodeNotFound
:> (CanThrow
'InvalidConversationPassword
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'GuestLinksDisabled
:> (CanThrow
'InvalidOperation
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TooManyMembers
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> ("join"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
JoinConversationByCode
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation joined"
Event]
(UpdateResult
Event))))))))))))))))
:<|> (Named
"code-check"
(Summary
"Check validity of a conversation code."
:> (Description
"If the guest links team feature is disabled, this will fail with 404 CodeNotFound.Note that this is currently inconsistent (for backwards compatibility reasons) with `POST /conversations/join` which responds with 409 GuestLinksDisabled if guest links are disabled."
:> (CanThrow
'CodeNotFound
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidConversationPassword
:> ("conversations"
:> ("code-check"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationCode
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
200
"Valid"
()]
()))))))))
:<|> (Named
"create-conversation-code-unqualified@v3"
(Summary
"Create or recreate a conversation code"
:> (Until
'V4
:> (DescriptionOAuthScope
'WriteConversationsCode
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'GuestLinksDisabled
:> (CanThrow
'CreateConversationCodeConflict
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (ZHostOpt
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("code"
:> MultiVerb
'POST
'[JSON]
'[Respond
200
"Conversation code already exists."
ConversationCodeInfo,
Respond
201
"Conversation code created."
Event]
AddCodeResult)))))))))))))
:<|> (Named
"create-conversation-code-unqualified"
(Summary
"Create or recreate a conversation code"
:> (From
'V4
:> (DescriptionOAuthScope
'WriteConversationsCode
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'GuestLinksDisabled
:> (CanThrow
'CreateConversationCodeConflict
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (ZHostOpt
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("code"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
CreateConversationCodeRequest
:> MultiVerb
'POST
'[JSON]
'[Respond
200
"Conversation code already exists."
ConversationCodeInfo,
Respond
201
"Conversation code created."
Event]
AddCodeResult))))))))))))))
:<|> (Named
"get-conversation-guest-links-status"
(Summary
"Get the status of the guest links feature for a conversation that potentially has been created by someone from another team."
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))
:<|> (Named
"remove-code-unqualified"
(Summary
"Delete conversation code"
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("code"
:> MultiVerb
'DELETE
'[JSON]
'[Respond
200
"Conversation code deleted."
Event]
Event))))))))
:<|> (Named
"get-code"
(Summary
"Get existing conversation code"
:> (CanThrow
'CodeNotFound
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'GuestLinksDisabled
:> (ZHostOpt
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("code"
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Conversation Code"
ConversationCodeInfo]
ConversationCodeInfo))))))))))
:<|> (Named
"member-typing-unqualified"
(Summary
"Sending typing notifications"
:> (Until
'V3
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("typing"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
TypingStatus
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
200
"Notification sent"
()]
())))))))))
:<|> (Named
"member-typing-qualified"
(Summary
"Sending typing notifications"
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("typing"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
TypingStatus
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
200
"Notification sent"
()]
()))))))))
:<|> (Named
"remove-member-unqualified"
(Summary
"Remove a member from a conversation (deprecated)"
:> (Until
'V2
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("members"
:> (Capture'
'[Description
"Target User ID"]
"usr"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
'[RespondAs
'()
204
"No change"
(),
Respond
200
"Member removed"
Event]
(Maybe
Event))))))))))))
:<|> (Named
"remove-member"
(Summary
"Remove a member from a conversation"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("members"
:> (QualifiedCapture'
'[Description
"Target User ID"]
"usr"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
'[RespondAs
'()
204
"No change"
(),
Respond
200
"Member removed"
Event]
(Maybe
Event)))))))))))
:<|> (Named
"update-other-member-unqualified"
(Summary
"Update membership of the specified user (deprecated)"
:> (Deprecated
:> (Description
"Use `PUT /conversations/:cnv_domain/:cnv/members/:usr_domain/:usr` instead"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvMemberNotFound
:> (CanThrow
('ActionDenied
'ModifyOtherConversationMember)
:> (CanThrow
'InvalidTarget
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("members"
:> (Capture'
'[Description
"Target User ID"]
"usr"
(Id
'User)
:> (ReqBody'
'[Required,
Strict]
'[JSON]
OtherMemberUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
200
"Membership updated"
()]
())))))))))))))))
:<|> (Named
"update-other-member"
(Summary
"Update membership of the specified user"
:> (Description
"**Note**: at least one field has to be provided."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvMemberNotFound
:> (CanThrow
('ActionDenied
'ModifyOtherConversationMember)
:> (CanThrow
'InvalidTarget
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("members"
:> (QualifiedCapture'
'[Description
"Target User ID"]
"usr"
(Id
'User)
:> (ReqBody'
'[Required,
Strict]
'[JSON]
OtherMemberUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
200
"Membership updated"
()]
()))))))))))))))
:<|> (Named
"update-conversation-name-deprecated"
(Summary
"Update conversation name (deprecated)"
:> (Deprecated
:> (Description
"Use `/conversations/:domain/:conv/name` instead."
:> (CanThrow
('ActionDenied
'ModifyConversationName)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationRename
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Name unchanged"
(),
Respond
200
"Name updated"
Event]
(UpdateResult
Event))))))))))))
:<|> (Named
"update-conversation-name-unqualified"
(Summary
"Update conversation name (deprecated)"
:> (Deprecated
:> (Description
"Use `/conversations/:domain/:conv/name` instead."
:> (CanThrow
('ActionDenied
'ModifyConversationName)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("name"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationRename
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Name unchanged"
(),
Respond
200
"Name updated"
Event]
(UpdateResult
Event)))))))))))))
:<|> (Named
"update-conversation-name"
(Summary
"Update conversation name"
:> (CanThrow
('ActionDenied
'ModifyConversationName)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("name"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationRename
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Name updated"
(),
Respond
200
"Name unchanged"
Event]
(UpdateResult
Event)))))))))))
:<|> (Named
"update-conversation-message-timer-unqualified"
(Summary
"Update the message timer for a conversation (deprecated)"
:> (Deprecated
:> (Description
"Use `/conversations/:domain/:cnv/message-timer` instead."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationMessageTimer)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("message-timer"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationMessageTimerUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Message timer unchanged"
(),
Respond
200
"Message timer updated"
Event]
(UpdateResult
Event))))))))))))))
:<|> (Named
"update-conversation-message-timer"
(Summary
"Update the message timer for a conversation"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationMessageTimer)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("message-timer"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationMessageTimerUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Message timer unchanged"
(),
Respond
200
"Message timer updated"
Event]
(UpdateResult
Event))))))))))))
:<|> (Named
"update-conversation-receipt-mode-unqualified"
(Summary
"Update receipt mode for a conversation (deprecated)"
:> (Deprecated
:> (Description
"Use `PUT /conversations/:domain/:cnv/receipt-mode` instead."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationReceiptMode)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("receipt-mode"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationReceiptModeUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Receipt mode unchanged"
(),
Respond
200
"Receipt mode updated"
Event]
(UpdateResult
Event))))))))))))))
:<|> (Named
"update-conversation-receipt-mode"
(Summary
"Update receipt mode for a conversation"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationReceiptMode)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("receipt-mode"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationReceiptModeUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Receipt mode unchanged"
(),
Respond
200
"Receipt mode updated"
Event]
(UpdateResult
Event))))))))))))
:<|> (Named
"update-conversation-access-unqualified"
(Summary
"Update access modes for a conversation (deprecated)"
:> (Until
'V3
:> (Description
"Use PUT `/conversations/:domain/:cnv/access` instead."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationAccess)
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'InvalidTargetAccess
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("access"
:> (VersionedReqBody'
'V2
'[Required,
Strict]
'[JSON]
ConversationAccessData
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Access unchanged"
(),
Respond
200
"Access updated"
Event]
(UpdateResult
Event))))))))))))))))
:<|> (Named
"update-conversation-access@v2"
(Summary
"Update access modes for a conversation"
:> (Until
'V3
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationAccess)
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'InvalidTargetAccess
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("access"
:> (VersionedReqBody'
'V2
'[Required,
Strict]
'[JSON]
ConversationAccessData
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Access unchanged"
(),
Respond
200
"Access updated"
Event]
(UpdateResult
Event)))))))))))))))
:<|> (Named
"update-conversation-access"
(Summary
"Update access modes for a conversation"
:> (From
'V3
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationAccess)
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'InvalidTargetAccess
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("access"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationAccessData
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Access unchanged"
(),
Respond
200
"Access updated"
Event]
(UpdateResult
Event)))))))))))))))
:<|> (Named
"get-conversation-self-unqualified"
(Summary
"Get self membership properties (deprecated)"
:> (Deprecated
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("self"
:> Verb
'GET
200
'[JSON]
(Maybe
Member)))))))
:<|> (Named
"update-conversation-self-unqualified"
(Summary
"Update self membership properties (deprecated)"
:> (Deprecated
:> (Description
"Use `/conversations/:domain/:conv/self` instead."
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("self"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
MemberUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
200
"Update successful"
()]
()))))))))))
:<|> (Named
"update-conversation-self"
(Summary
"Update self membership properties"
:> (Description
"**Note**: at least one field has to be provided."
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("self"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
MemberUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
200
"Update successful"
()]
())))))))))
:<|> Named
"update-conversation-protocol"
(Summary
"Update the protocol of the conversation"
:> (From
'V5
:> (Description
"**Note**: Only proteus->mixed upgrade is supported."
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvInvalidProtocolTransition
:> (CanThrow
('ActionDenied
'LeaveConversation)
:> (CanThrow
'InvalidOperation
:> (CanThrow
'MLSMigrationCriteriaNotSatisfied
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("protocol"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ProtocolUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation updated"
Event]
(UpdateResult
Event))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
conversationAPI
API
(Named
"get-unqualified-conversation"
(Summary "Get a conversation by ID"
:> (Until 'V3
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond 'V2 200 "Conversation" Conversation]
Conversation)))))))
:<|> (Named
"get-unqualified-conversation-legalhold-alias"
(Summary "Get a conversation by ID (Legalhold alias)"
:> (Until 'V2
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("legalhold"
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond 'V2 200 "Conversation" Conversation]
Conversation))))))))
:<|> (Named
"get-conversation@v2"
(Summary "Get a conversation by ID"
:> (Until 'V3
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture' '[] "cnv" (Id 'Conversation)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V2 200 "Conversation" Conversation]
Conversation)))))))
:<|> (Named
"get-conversation@v5"
(Summary "Get a conversation by ID"
:> (From 'V3
:> (Until 'V6
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture' '[] "cnv" (Id 'Conversation)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V5 200 "Conversation" Conversation]
Conversation))))))))
:<|> (Named
"get-conversation"
(Summary "Get a conversation by ID"
:> (From 'V6
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture' '[] "cnv" (Id 'Conversation)
:> Verb 'GET 200 '[JSON] Conversation)))))))
:<|> (Named
"get-conversation-roles"
(Summary
"Get existing roles available for the given conversation"
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> ("roles"
:> Verb
'GET
200
'[JSON]
ConversationRolesList)))))))
:<|> (Named
"get-group-info"
(Summary "Get MLS group information"
:> (From 'V5
:> (CanThrow 'ConvNotFound
:> (CanThrow 'MLSMissingGroupInfo
:> (CanThrow 'MLSNotEnabled
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture'
'[] "cnv" (Id 'Conversation)
:> ("groupinfo"
:> MultiVerb
'GET
'[MLS]
'[Respond
200
"The group information"
GroupInfoData]
GroupInfoData)))))))))
:<|> (Named
"list-conversation-ids-unqualified"
(Summary
"[deprecated] Get all local conversation IDs."
:> (Until 'V3
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> ("ids"
:> (QueryParam'
'[Optional, Strict,
Description
"Conversation ID to start from (exclusive)"]
"start"
(Id 'Conversation)
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum number of IDs to return"]
"size"
(Range 1 1000 Int32)
:> Verb
'GET
200
'[JSON]
(ConversationList
(Id
'Conversation)))))))))
:<|> (Named
"list-conversation-ids-v2"
(Summary "Get all conversation IDs."
:> (Until 'V3
:> (Description
"The IDs returned by this endpoint are paginated. To get the first page, make a call with the `paging_state` field set to `null` (or omitted). Whenever the `has_more` field of the response is set to `true`, more results are available, and they can be obtained by calling the endpoint again, but this time passing the value of `paging_state` returned by the previous call. One can continue in this fashion until all results are returned, which is indicated by `has_more` being `false`. Note that `paging_state` should be considered an opaque token. It should not be inspected, or stored, or reused across multiple unrelated invocations of the endpoint."
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("conversations"
:> ("list-ids"
:> (ReqBody'
'[Required, Strict]
'[JSON]
(GetMultiTablePageRequest
"ConversationIds"
LocalOrRemoteTable
1000
1000)
:> Verb
'POST
200
'[JSON]
(MultiTablePage
"ConversationIds"
"qualified_conversations"
LocalOrRemoteTable
(Qualified
(Id
'Conversation))))))))))
:<|> (Named
"list-conversation-ids"
(Summary "Get all conversation IDs."
:> (From 'V3
:> (Description
"The IDs returned by this endpoint are paginated. To get the first page, make a call with the `paging_state` field set to `null` (or omitted). Whenever the `has_more` field of the response is set to `true`, more results are available, and they can be obtained by calling the endpoint again, but this time passing the value of `paging_state` returned by the previous call. One can continue in this fashion until all results are returned, which is indicated by `has_more` being `false`. Note that `paging_state` should be considered an opaque token. It should not be inspected, or stored, or reused across multiple unrelated invocations of the endpoint."
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("conversations"
:> ("list-ids"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
(GetMultiTablePageRequest
"ConversationIds"
LocalOrRemoteTable
1000
1000)
:> Verb
'POST
200
'[JSON]
(MultiTablePage
"ConversationIds"
"qualified_conversations"
LocalOrRemoteTable
(Qualified
(Id
'Conversation))))))))))
:<|> (Named
"get-conversations"
(Summary
"Get all *local* conversations."
:> (Until 'V3
:> (Description
"Will not return remote conversations.\n\nUse `POST /conversations/list-ids` followed by `POST /conversations/list` instead."
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("conversations"
:> (QueryParam'
'[Optional,
Strict,
Description
"Mutually exclusive with 'start' (at most 32 IDs per request)"]
"ids"
(Range
1
32
(CommaSeparatedList
(Id
'Conversation)))
:> (QueryParam'
'[Optional,
Strict,
Description
"Conversation ID to start from (exclusive)"]
"start"
(Id
'Conversation)
:> (QueryParam'
'[Optional,
Strict,
Description
"Maximum number of conversations to return"]
"size"
(Range
1
500
Int32)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V2
200
"List of local conversations"
(ConversationList
Conversation)]
(ConversationList
Conversation)))))))))
:<|> (Named
"list-conversations@v1"
(Summary
"Get conversation metadata for a list of conversation ids"
:> (Until 'V2
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("list"
:> ("v2"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ListConversations
:> Verb
'POST
200
'[JSON]
ConversationsResponse)))))))
:<|> (Named
"list-conversations@v2"
(Summary
"Get conversation metadata for a list of conversation ids"
:> (From 'V2
:> (Until 'V3
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("list"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ListConversations
:> MultiVerb
'POST
'[JSON]
'[VersionedRespond
'V2
200
"Conversation page"
ConversationsResponse]
ConversationsResponse)))))))
:<|> (Named
"list-conversations@v5"
(Summary
"Get conversation metadata for a list of conversation ids"
:> (From 'V3
:> (Until
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("list"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ListConversations
:> MultiVerb
'POST
'[JSON]
'[VersionedRespond
'V5
200
"Conversation page"
ConversationsResponse]
ConversationsResponse)))))))
:<|> (Named
"list-conversations"
(Summary
"Get conversation metadata for a list of conversation ids"
:> (From
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("list"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ListConversations
:> Verb
'POST
200
'[JSON]
ConversationsResponse))))))
:<|> (Named
"get-conversation-by-reusable-code"
(Summary
"Get limited conversation information by key/code pair"
:> (CanThrow
'CodeNotFound
:> (CanThrow
'InvalidConversationPassword
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'GuestLinksDisabled
:> (CanThrow
'NotATeamMember
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("join"
:> (QueryParam'
'[Required,
Strict]
"key"
Key
:> (QueryParam'
'[Required,
Strict]
"code"
Value
:> Verb
'GET
200
'[JSON]
ConversationCoverView))))))))))))
:<|> (Named
"create-group-conversation@v2"
(Summary
"Create a new conversation"
:> (DescriptionOAuthScope
'WriteConversations
:> (Until
'V3
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSNonEmptyMemberList
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
UnreachableBackendsLegacy
:> (Description
"This returns 201 when a new conversation is created, and 200 when the conversation already existed"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (VersionedReqBody'
'V2
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation)))))))))))))))))
:<|> (Named
"create-group-conversation@v3"
(Summary
"Create a new conversation"
:> (DescriptionOAuthScope
'WriteConversations
:> (From
'V3
:> (Until
'V4
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSNonEmptyMemberList
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
UnreachableBackendsLegacy
:> (Description
"This returns 201 when a new conversation is created, and 200 when the conversation already existed"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V3
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V3
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation))))))))))))))))))
:<|> (Named
"create-group-conversation@v5"
(Summary
"Create a new conversation"
:> (From
'V4
:> (Until
'V6
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSNonEmptyMemberList
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> (Description
"This returns 201 when a new conversation is created, and 200 when the conversation already existed"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V5
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
CreateGroupConversation
(VersionedRespond
'V5
201
"Conversation created"
CreateGroupConversation)]
CreateGroupConversationResponse)))))))))))))))))
:<|> (Named
"create-group-conversation"
(Summary
"Create a new conversation"
:> (From
'V6
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSNonEmptyMemberList
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> (Description
"This returns 201 when a new conversation is created, and 200 when the conversation already existed"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V6
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
CreateGroupConversation
(VersionedRespond
'V6
201
"Conversation created"
CreateGroupConversation)]
CreateGroupConversationResponse))))))))))))))))
:<|> (Named
"create-self-conversation@v2"
(Summary
"Create a self-conversation"
:> (Until
'V3
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("self"
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation))))))
:<|> (Named
"create-self-conversation@v5"
(Summary
"Create a self-conversation"
:> (From
'V3
:> (Until
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("self"
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V5
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V5
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation)))))))
:<|> (Named
"create-self-conversation"
(Summary
"Create a self-conversation"
:> (From
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("self"
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V6
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V6
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation))))))
:<|> (Named
"get-mls-self-conversation@v5"
(Summary
"Get the user's MLS self-conversation"
:> (From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("mls-self"
:> (CanThrow
'MLSNotEnabled
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V5
200
"The MLS self-conversation"
Conversation]
Conversation)))))))
:<|> (Named
"get-mls-self-conversation"
(Summary
"Get the user's MLS self-conversation"
:> (From
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("mls-self"
:> (CanThrow
'MLSNotEnabled
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"The MLS self-conversation"
Conversation]
Conversation))))))
:<|> (Named
"get-subconversation"
(Summary
"Get information about an MLS subconversation"
:> (From
'V5
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSSubConvUnsupportedConvType
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id
'Conversation)
:> ("subconversations"
:> (Capture'
'[]
"subconv"
SubConvId
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Subconversation"
PublicSubConversation]
PublicSubConversation))))))))))
:<|> (Named
"leave-subconversation"
(Summary
"Leave an MLS subconversation"
:> (From
'V5
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSNotEnabled
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id
'Conversation)
:> ("subconversations"
:> (Capture'
'[]
"subconv"
SubConvId
:> ("self"
:> MultiVerb
'DELETE
'[JSON]
'[RespondAs
'()
200
"OK"
()]
()))))))))))))))
:<|> (Named
"delete-subconversation"
(Summary
"Delete an MLS subconversation"
:> (From
'V5
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSStaleMessage
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id
'Conversation)
:> ("subconversations"
:> (Capture'
'[]
"subconv"
SubConvId
:> (ReqBody'
'[Required,
Strict]
'[JSON]
DeleteSubConversationRequest
:> MultiVerb
'DELETE
'[JSON]
'[Respond
200
"Deletion successful"
()]
()))))))))))))
:<|> (Named
"get-subconversation-group-info"
(Summary
"Get MLS group information of subconversation"
:> (From
'V5
:> (CanThrow
'ConvNotFound
:> (CanThrow
'MLSMissingGroupInfo
:> (CanThrow
'MLSNotEnabled
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id
'Conversation)
:> ("subconversations"
:> (Capture'
'[]
"subconv"
SubConvId
:> ("groupinfo"
:> MultiVerb
'GET
'[MLS]
'[Respond
200
"The group information"
GroupInfoData]
GroupInfoData)))))))))))
:<|> (Named
"create-one-to-one-conversation@v2"
(Summary
"Create a 1:1 conversation"
:> (Until
'V3
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'InvalidOperation
:> (CanThrow
'NoBindingTeamMembers
:> (CanThrow
'NonBindingTeam
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
UnreachableBackendsLegacy
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> ("one2one"
:> (VersionedReqBody'
'V2
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation))))))))))))))))))
:<|> (Named
"create-one-to-one-conversation"
(Summary
"Create a 1:1 conversation"
:> (From
'V3
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'InvalidOperation
:> (CanThrow
'NoBindingTeamMembers
:> (CanThrow
'NonBindingTeam
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
UnreachableBackendsLegacy
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> ("one2one"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V3
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V3
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation))))))))))))))))))
:<|> (Named
"get-one-to-one-mls-conversation@v5"
(Summary
"Get an MLS 1:1 conversation"
:> (From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> (CanThrow
'MLSFederatedOne2OneNotSupported
:> ("conversations"
:> ("one2one"
:> (QualifiedCapture'
'[]
"usr"
(Id
'User)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V5
200
"MLS 1-1 conversation"
Conversation]
Conversation))))))))))
:<|> (Named
"get-one-to-one-mls-conversation@v6"
(Summary
"Get an MLS 1:1 conversation"
:> (From
'V6
:> (Until
'V7
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> ("conversations"
:> ("one2one"
:> (QualifiedCapture'
'[]
"usr"
(Id
'User)
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"MLS 1-1 conversation"
(MLSOne2OneConversation
MLSPublicKey)]
(MLSOne2OneConversation
MLSPublicKey))))))))))
:<|> (Named
"get-one-to-one-mls-conversation"
(Summary
"Get an MLS 1:1 conversation"
:> (From
'V7
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> ("conversations"
:> ("one2one"
:> (QualifiedCapture'
'[]
"usr"
(Id
'User)
:> (QueryParam'
'[Optional,
Strict]
"format"
MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"MLS 1-1 conversation"
(MLSOne2OneConversation
SomeKey)]
(MLSOne2OneConversation
SomeKey))))))))))
:<|> (Named
"add-members-to-conversation-unqualified"
(Summary
"Add members to an existing conversation (deprecated)"
:> (Until
'V2
:> (CanThrow
('ActionDenied
'AddConversationMember)
:> (CanThrow
('ActionDenied
'LeaveConversation)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'TooManyMembers
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[]
"cnv"
(Id
'Conversation)
:> ("members"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
Invite
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation updated"
Event]
(UpdateResult
Event))))))))))))))))))))
:<|> (Named
"add-members-to-conversation-unqualified2"
(Summary
"Add qualified members to an existing conversation."
:> (Until
'V2
:> (CanThrow
('ActionDenied
'AddConversationMember)
:> (CanThrow
('ActionDenied
'LeaveConversation)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'TooManyMembers
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[]
"cnv"
(Id
'Conversation)
:> ("members"
:> ("v2"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
InviteQualified
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation updated"
Event]
(UpdateResult
Event)))))))))))))))))))))
:<|> (Named
"add-members-to-conversation"
(Summary
"Add qualified members to an existing conversation."
:> (From
'V2
:> (CanThrow
('ActionDenied
'AddConversationMember)
:> (CanThrow
('ActionDenied
'LeaveConversation)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'TooManyMembers
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id
'Conversation)
:> ("members"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
InviteQualified
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation updated"
Event]
(UpdateResult
Event))))))))))))))))))))
:<|> (Named
"join-conversation-by-id-unqualified"
(Summary
"Join a conversation by its ID (if link access enabled) (deprecated)"
:> (Until
'V5
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TooManyMembers
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("join"
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation joined"
Event]
(UpdateResult
Event)))))))))))))
:<|> (Named
"join-conversation-by-code-unqualified"
(Summary
"Join a conversation using a reusable code"
:> (Description
"If the guest links team feature is disabled, this will fail with 409 GuestLinksDisabled.Note that this is currently inconsistent (for backwards compatibility reasons) with `POST /conversations/code-check` which responds with 404 CodeNotFound if guest links are disabled."
:> (CanThrow
'CodeNotFound
:> (CanThrow
'InvalidConversationPassword
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'GuestLinksDisabled
:> (CanThrow
'InvalidOperation
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TooManyMembers
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> ("join"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
JoinConversationByCode
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation joined"
Event]
(UpdateResult
Event))))))))))))))))
:<|> (Named
"code-check"
(Summary
"Check validity of a conversation code."
:> (Description
"If the guest links team feature is disabled, this will fail with 404 CodeNotFound.Note that this is currently inconsistent (for backwards compatibility reasons) with `POST /conversations/join` which responds with 409 GuestLinksDisabled if guest links are disabled."
:> (CanThrow
'CodeNotFound
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidConversationPassword
:> ("conversations"
:> ("code-check"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationCode
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
200
"Valid"
()]
()))))))))
:<|> (Named
"create-conversation-code-unqualified@v3"
(Summary
"Create or recreate a conversation code"
:> (Until
'V4
:> (DescriptionOAuthScope
'WriteConversationsCode
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'GuestLinksDisabled
:> (CanThrow
'CreateConversationCodeConflict
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (ZHostOpt
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("code"
:> MultiVerb
'POST
'[JSON]
'[Respond
200
"Conversation code already exists."
ConversationCodeInfo,
Respond
201
"Conversation code created."
Event]
AddCodeResult)))))))))))))
:<|> (Named
"create-conversation-code-unqualified"
(Summary
"Create or recreate a conversation code"
:> (From
'V4
:> (DescriptionOAuthScope
'WriteConversationsCode
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'GuestLinksDisabled
:> (CanThrow
'CreateConversationCodeConflict
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (ZHostOpt
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("code"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
CreateConversationCodeRequest
:> MultiVerb
'POST
'[JSON]
'[Respond
200
"Conversation code already exists."
ConversationCodeInfo,
Respond
201
"Conversation code created."
Event]
AddCodeResult))))))))))))))
:<|> (Named
"get-conversation-guest-links-status"
(Summary
"Get the status of the guest links feature for a conversation that potentially has been created by someone from another team."
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))
:<|> (Named
"remove-code-unqualified"
(Summary
"Delete conversation code"
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("code"
:> MultiVerb
'DELETE
'[JSON]
'[Respond
200
"Conversation code deleted."
Event]
Event))))))))
:<|> (Named
"get-code"
(Summary
"Get existing conversation code"
:> (CanThrow
'CodeNotFound
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'GuestLinksDisabled
:> (ZHostOpt
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("code"
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Conversation Code"
ConversationCodeInfo]
ConversationCodeInfo))))))))))
:<|> (Named
"member-typing-unqualified"
(Summary
"Sending typing notifications"
:> (Until
'V3
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("typing"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
TypingStatus
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
200
"Notification sent"
()]
())))))))))
:<|> (Named
"member-typing-qualified"
(Summary
"Sending typing notifications"
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("typing"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
TypingStatus
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
200
"Notification sent"
()]
()))))))))
:<|> (Named
"remove-member-unqualified"
(Summary
"Remove a member from a conversation (deprecated)"
:> (Until
'V2
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("members"
:> (Capture'
'[Description
"Target User ID"]
"usr"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
'[RespondAs
'()
204
"No change"
(),
Respond
200
"Member removed"
Event]
(Maybe
Event))))))))))))
:<|> (Named
"remove-member"
(Summary
"Remove a member from a conversation"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("members"
:> (QualifiedCapture'
'[Description
"Target User ID"]
"usr"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
'[RespondAs
'()
204
"No change"
(),
Respond
200
"Member removed"
Event]
(Maybe
Event)))))))))))
:<|> (Named
"update-other-member-unqualified"
(Summary
"Update membership of the specified user (deprecated)"
:> (Deprecated
:> (Description
"Use `PUT /conversations/:cnv_domain/:cnv/members/:usr_domain/:usr` instead"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvMemberNotFound
:> (CanThrow
('ActionDenied
'ModifyOtherConversationMember)
:> (CanThrow
'InvalidTarget
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("members"
:> (Capture'
'[Description
"Target User ID"]
"usr"
(Id
'User)
:> (ReqBody'
'[Required,
Strict]
'[JSON]
OtherMemberUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
200
"Membership updated"
()]
())))))))))))))))
:<|> (Named
"update-other-member"
(Summary
"Update membership of the specified user"
:> (Description
"**Note**: at least one field has to be provided."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvMemberNotFound
:> (CanThrow
('ActionDenied
'ModifyOtherConversationMember)
:> (CanThrow
'InvalidTarget
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("members"
:> (QualifiedCapture'
'[Description
"Target User ID"]
"usr"
(Id
'User)
:> (ReqBody'
'[Required,
Strict]
'[JSON]
OtherMemberUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
200
"Membership updated"
()]
()))))))))))))))
:<|> (Named
"update-conversation-name-deprecated"
(Summary
"Update conversation name (deprecated)"
:> (Deprecated
:> (Description
"Use `/conversations/:domain/:conv/name` instead."
:> (CanThrow
('ActionDenied
'ModifyConversationName)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationRename
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Name unchanged"
(),
Respond
200
"Name updated"
Event]
(UpdateResult
Event))))))))))))
:<|> (Named
"update-conversation-name-unqualified"
(Summary
"Update conversation name (deprecated)"
:> (Deprecated
:> (Description
"Use `/conversations/:domain/:conv/name` instead."
:> (CanThrow
('ActionDenied
'ModifyConversationName)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("name"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationRename
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Name unchanged"
(),
Respond
200
"Name updated"
Event]
(UpdateResult
Event)))))))))))))
:<|> (Named
"update-conversation-name"
(Summary
"Update conversation name"
:> (CanThrow
('ActionDenied
'ModifyConversationName)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("name"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationRename
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Name updated"
(),
Respond
200
"Name unchanged"
Event]
(UpdateResult
Event)))))))))))
:<|> (Named
"update-conversation-message-timer-unqualified"
(Summary
"Update the message timer for a conversation (deprecated)"
:> (Deprecated
:> (Description
"Use `/conversations/:domain/:cnv/message-timer` instead."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationMessageTimer)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("message-timer"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationMessageTimerUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Message timer unchanged"
(),
Respond
200
"Message timer updated"
Event]
(UpdateResult
Event))))))))))))))
:<|> (Named
"update-conversation-message-timer"
(Summary
"Update the message timer for a conversation"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationMessageTimer)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("message-timer"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationMessageTimerUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Message timer unchanged"
(),
Respond
200
"Message timer updated"
Event]
(UpdateResult
Event))))))))))))
:<|> (Named
"update-conversation-receipt-mode-unqualified"
(Summary
"Update receipt mode for a conversation (deprecated)"
:> (Deprecated
:> (Description
"Use `PUT /conversations/:domain/:cnv/receipt-mode` instead."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationReceiptMode)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("receipt-mode"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationReceiptModeUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Receipt mode unchanged"
(),
Respond
200
"Receipt mode updated"
Event]
(UpdateResult
Event))))))))))))))
:<|> (Named
"update-conversation-receipt-mode"
(Summary
"Update receipt mode for a conversation"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationReceiptMode)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("receipt-mode"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationReceiptModeUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Receipt mode unchanged"
(),
Respond
200
"Receipt mode updated"
Event]
(UpdateResult
Event))))))))))))
:<|> (Named
"update-conversation-access-unqualified"
(Summary
"Update access modes for a conversation (deprecated)"
:> (Until
'V3
:> (Description
"Use PUT `/conversations/:domain/:cnv/access` instead."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationAccess)
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'InvalidTargetAccess
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("access"
:> (VersionedReqBody'
'V2
'[Required,
Strict]
'[JSON]
ConversationAccessData
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Access unchanged"
(),
Respond
200
"Access updated"
Event]
(UpdateResult
Event))))))))))))))))
:<|> (Named
"update-conversation-access@v2"
(Summary
"Update access modes for a conversation"
:> (Until
'V3
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationAccess)
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'InvalidTargetAccess
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("access"
:> (VersionedReqBody'
'V2
'[Required,
Strict]
'[JSON]
ConversationAccessData
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Access unchanged"
(),
Respond
200
"Access updated"
Event]
(UpdateResult
Event)))))))))))))))
:<|> (Named
"update-conversation-access"
(Summary
"Update access modes for a conversation"
:> (From
'V3
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationAccess)
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'InvalidTargetAccess
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("access"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationAccessData
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Access unchanged"
(),
Respond
200
"Access updated"
Event]
(UpdateResult
Event)))))))))))))))
:<|> (Named
"get-conversation-self-unqualified"
(Summary
"Get self membership properties (deprecated)"
:> (Deprecated
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("self"
:> Verb
'GET
200
'[JSON]
(Maybe
Member)))))))
:<|> (Named
"update-conversation-self-unqualified"
(Summary
"Update self membership properties (deprecated)"
:> (Deprecated
:> (Description
"Use `/conversations/:domain/:conv/self` instead."
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("self"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
MemberUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
200
"Update successful"
()]
()))))))))))
:<|> (Named
"update-conversation-self"
(Summary
"Update self membership properties"
:> (Description
"**Note**: at least one field has to be provided."
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("self"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
MemberUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
200
"Update successful"
()]
())))))))))
:<|> Named
"update-conversation-protocol"
(Summary
"Update the protocol of the conversation"
:> (From
'V5
:> (Description
"**Note**: Only proteus->mixed upgrade is supported."
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvInvalidProtocolTransition
:> (CanThrow
('ActionDenied
'LeaveConversation)
:> (CanThrow
'InvalidOperation
:> (CanThrow
'MLSMigrationCriteriaNotSatisfied
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("protocol"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ProtocolUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation updated"
Event]
(UpdateResult
Event))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
(TeamConversationAPI
:<|> ((Named
"post-otr-message-unqualified"
(Summary
"Post an encrypted message to a conversation (accepts JSON or Protobuf)"
:> (Description PostOtrDescriptionUnqualified
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> ("otr"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON, Proto] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
ClientMismatch,
Respond
201 "Message sent" ClientMismatch]
(PostOtrResponse
ClientMismatch))))))))))))
:<|> (Named
"post-otr-broadcast-unqualified"
(Summary
"Broadcast an encrypted message to all team members and all contacts (accepts JSON or Protobuf)"
:> (Description PostOtrDescriptionUnqualified
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> (CanThrow 'TeamNotFound
:> (CanThrow 'BroadcastLimitExceeded
:> (CanThrow 'NonBindingTeam
:> ("broadcast"
:> ("otr"
:> ("messages"
:> (QueryParam
"ignore_missing" IgnoreMissing
:> (QueryParam
"report_missing" ReportMissing
:> (ReqBody
'[JSON, Proto] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse
'ConvNotFound,
ErrorResponse
'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
ClientMismatch,
Respond
201
"Message sent"
ClientMismatch]
(PostOtrResponse
ClientMismatch))))))))))))))
:<|> (Named
"post-proteus-message"
(Summary
"Post an encrypted message to a conversation (accepts only Protobuf)"
:> (Description PostOtrDescription
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture' '[] "cnv" (Id 'Conversation)
:> ("proteus"
:> ("messages"
:> (ReqBody
'[Proto]
(RawProto QualifiedNewOtrMessage)
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
MessageSendingStatus,
Respond
201
"Message sent"
MessageSendingStatus]
(Either
(MessageNotSent
MessageSendingStatus)
MessageSendingStatus))))))))))
:<|> Named
"post-proteus-broadcast"
(Summary
"Post an encrypted message to all team members and all contacts (accepts only Protobuf)"
:> (Description PostOtrDescription
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> (CanThrow 'TeamNotFound
:> (CanThrow 'BroadcastLimitExceeded
:> (CanThrow 'NonBindingTeam
:> ("broadcast"
:> ("proteus"
:> ("messages"
:> (ReqBody
'[Proto]
QualifiedNewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse
'ConvNotFound,
ErrorResponse
'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
MessageSendingStatus,
Respond
201
"Message sent"
MessageSendingStatus]
(Either
(MessageNotSent
MessageSendingStatus)
MessageSendingStatus)))))))))))))))
:<|> ((Named
"post-bot-message-unqualified"
(ZBot
:> (ZConversation
:> (CanThrow 'ConvNotFound
:> ("bot"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond
412 "Missing clients" ClientMismatch,
Respond 201 "Message sent" ClientMismatch]
(PostOtrResponse ClientMismatch)))))))))
:<|> Named
"get-bot-conversation"
(CanThrow 'AccessDenied
:> (CanThrow 'ConvNotFound
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("bot"
:> ("conversation"
:> (ZBot
:> (ZConversation
:> Get '[JSON] BotConvView))))))))))
:<|> (TeamAPI
:<|> ((Named
'("get", SSOConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for sso"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig)))))))))))
:<|> ((Named
'("get", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))
:<|> Named
'("put", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany
'[ 'ActionDenied
'RemoveConversationMember,
'CannotEnableLegalHoldServiceLargeTeam,
'LegalHoldNotEnabled,
'LegalHoldDisableUnimplemented,
'LegalHoldServiceNotRegistered,
'UserLegalHoldIllegalOperation,
'LegalHoldCouldNotBlockConnections]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> (ReqBody
'[JSON]
(Feature
LegalholdConfig)
:> Put
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))))))
:<|> ((Named
'("get", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))
:<|> Named
'("put", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary
"Put config for searchVisibility"
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany '[]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("features"
:> ("searchVisibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))))))
:<|> (SearchVisibilityGet
:<|> (SearchVisibilitySet
:<|> (Named
'("get", ValidateSAMLEmailsConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for validateSAMLemails"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig)))))))))))
:<|> (Named
'("get",
DigitalSignaturesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for digitalSignatures"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))
:<|> ((Named
'("get", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig)))))))))))
:<|> Named
'("put",
AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> (ReqBody
'[JSON]
(Feature
AppLockConfig)
:> Put
'[JSON]
(LockableFeature
AppLockConfig)))))))))))))))
:<|> ((Named
'("get",
FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))
:<|> Named
'("put",
FileSharingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> (ReqBody
'[JSON]
(Feature
FileSharingConfig)
:> Put
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))))))
:<|> (Named
'("get",
ClassifiedDomainsConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for classifiedDomains"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig)))))))))))
:<|> ((Named
'("get",
ConferenceCallingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))
:<|> Named
'("put",
ConferenceCallingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> (ReqBody
'[JSON]
(Feature
ConferenceCallingConfig)
:> Put
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))))))
:<|> ((Named
'("get",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))
:<|> Named
'("put",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> (ReqBody
'[JSON]
(Feature
SelfDeletingMessagesConfig)
:> Put
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))))))
:<|> ((Named
'("get",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))
:<|> Named
'("put",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> (ReqBody
'[JSON]
(Feature
GuestLinksConfig)
:> Put
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))))))
:<|> ((Named
'("get",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))
:<|> Named
'("put",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> (ReqBody
'[JSON]
(Feature
SndFactorPasswordChallengeConfig)
:> Put
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))))))
:<|> ((Named
'("get",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig))))))))))))
:<|> Named
'("put",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> (ReqBody
'[JSON]
(Feature
MLSConfig)
:> Put
'[JSON]
(LockableFeature
MLSConfig))))))))))))))))
:<|> ((Named
'("get",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> Get
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))
:<|> Named
'("put",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> (ReqBody
'[JSON]
(Feature
ExposeInvitationURLsToTeamAdminConfig)
:> Put
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))))))
:<|> ((Named
'("get",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))
:<|> Named
'("put",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityInboundConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))))))
:<|> ((Named
'("get",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> Get
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))
:<|> Named
'("put",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> (ReqBody
'[JSON]
(Feature
OutlookCalIntegrationConfig)
:> Put
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))))))
:<|> (Named
'("get",
MlsE2EIdConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> Get
'[JSON]
(LockableFeature
MlsE2EIdConfig))))))))))))
:<|> (Named
"put-MlsE2EIdConfig@v5"
(From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> (Named
'("put",
MlsE2EIdConfig)
(From
'V6
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> ((Named
'("get",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> Get
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))
:<|> Named
'("put",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> (ReqBody
'[JSON]
(Feature
MlsMigrationConfig)
:> Put
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))))))
:<|> ((Named
'("get",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> Get
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))
:<|> Named
'("put",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> (ReqBody
'[JSON]
(Feature
EnforceFileDownloadLocationConfig)
:> Put
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))))))
:<|> (Named
'("get",
LimitedEventFanoutConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for limitedEventFanout"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("limitedEventFanout"
:> Get
'[JSON]
(LockableFeature
LimitedEventFanoutConfig))))))))))))
:<|> (AllTeamFeaturesUserGet
:<|> (AllTeamFeaturesTeamGet
:<|> ((Named
'("get-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))
:<|> (Named
'("put-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `PUT /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))))
:<|> (Named
'("get-deprecated",
ValidateSAMLEmailsConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/validateSAMLemails` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validate-saml-emails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))))
:<|> Named
'("get-deprecated",
DigitalSignaturesConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/digitalSignatures` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digital-signatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))))))
:<|> (Named
'("get-config",
LegalholdConfig)
(Summary
"[deprecated] Get feature config for feature legalhold"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig))))))))))
:<|> (Named
'("get-config",
SSOConfig)
(Summary
"[deprecated] Get feature config for feature sso"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig))))))))))
:<|> (Named
'("get-config",
SearchVisibilityAvailableConfig)
(Summary
"[deprecated] Get feature config for feature searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))
:<|> (Named
'("get-config",
ValidateSAMLEmailsConfig)
(Summary
"[deprecated] Get feature config for feature validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))
:<|> (Named
'("get-config",
DigitalSignaturesConfig)
(Summary
"[deprecated] Get feature config for feature digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig))))))))))
:<|> (Named
'("get-config",
AppLockConfig)
(Summary
"[deprecated] Get feature config for feature appLock"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig))))))))))
:<|> (Named
'("get-config",
FileSharingConfig)
(Summary
"[deprecated] Get feature config for feature fileSharing"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig))))))))))
:<|> (Named
'("get-config",
ClassifiedDomainsConfig)
(Summary
"[deprecated] Get feature config for feature classifiedDomains"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig))))))))))
:<|> (Named
'("get-config",
ConferenceCallingConfig)
(Summary
"[deprecated] Get feature config for feature conferenceCalling"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig))))))))))
:<|> (Named
'("get-config",
SelfDeletingMessagesConfig)
(Summary
"[deprecated] Get feature config for feature selfDeletingMessages"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig))))))))))
:<|> (Named
'("get-config",
GuestLinksConfig)
(Summary
"[deprecated] Get feature config for feature conversationGuestLinks"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig))))))))))
:<|> (Named
'("get-config",
SndFactorPasswordChallengeConfig)
(Summary
"[deprecated] Get feature config for feature sndFactorPasswordChallenge"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig))))))))))
:<|> Named
'("get-config",
MLSConfig)
(Summary
"[deprecated] Get feature config for feature mls"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig)))))))))))))))))))))))))))))))))))))))))))))))))
:<|> ((Named
"mls-message"
("mls"
:> (Summary "Post an MLS message"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("messages"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
Message)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Message sent"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))
:<|> (Named
"mls-commit-bundle"
("mls"
:> (Summary "Post a MLS CommitBundle"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
'MLSWelcomeMismatch
:> (CanThrow
'MLSLegalholdIncompatible
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("commit-bundles"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
CommitBundle)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Commit accepted and forwarded"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))))
:<|> Named
"mls-public-keys"
("mls"
:> (Summary
"Get public keys used by the backend to sign external proposals"
:> (Description
"The format of the returned key is determined by the `format` query parameter:\n - raw (default): base64-encoded raw public keys\n - jwk: keys are nested objects in JWK format."
:> (From 'V5
:> (CanThrow 'MLSNotEnabled
:> ("public-keys"
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (QueryParam'
'[Optional, Strict]
"format"
MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Public keys"
(MLSKeysByPurpose
(MLSKeys
SomeKey))]
(MLSKeysByPurpose
(MLSKeys
SomeKey))))))))))))
:<|> (CustomBackendAPI
:<|> ((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow
'LegalHoldServiceInvalidKey
:> (CanThrow
'LegalHoldServiceBadResponse
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> Get
'[JSON]
ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary
"Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary
"Get legal hold status"
:> (CanThrow
'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> Get
'[JSON]
UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary
"Consent to legal hold"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'InvalidOperation
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'UserLegalHoldIllegalOperation
:> (CanThrow
'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary
"Request legal hold device"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary
"Disable legal hold for user"
:> (CanThrow
AuthenticationError
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary
"Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional,
Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (QueryParam'
'[Optional,
Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get
'[JSON]
TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> Get
'[JSON]
TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary
"Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow
'NotATeamMember
:> (CanThrow
'BulkGetMemberLimitExceeded
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional,
Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (ReqBody
'[JSON]
UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary
"Add a new team member"
:> (Until 'V4
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'NoAddToBinding
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TooManyTeamMembers
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary
"Remove an existing team member"
:> (CanThrow
AuthenticationError
:> (CanThrow
'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary
"Remove an existing team member"
:> (Until
'V4
:> (CanThrow
AuthenticationError
:> (CanThrow
'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary
"Update an existing team member"
:> (CanThrow
'AccessDenied
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow
'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI)))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
((Named
"get-unqualified-conversation"
(Summary "Get a conversation by ID"
:> (Until 'V3
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond 'V2 200 "Conversation" Conversation]
Conversation)))))))
:<|> (Named
"get-unqualified-conversation-legalhold-alias"
(Summary "Get a conversation by ID (Legalhold alias)"
:> (Until 'V2
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("legalhold"
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V2 200 "Conversation" Conversation]
Conversation))))))))
:<|> (Named
"get-conversation@v2"
(Summary "Get a conversation by ID"
:> (Until 'V3
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture' '[] "cnv" (Id 'Conversation)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V2 200 "Conversation" Conversation]
Conversation)))))))
:<|> (Named
"get-conversation@v5"
(Summary "Get a conversation by ID"
:> (From 'V3
:> (Until 'V6
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture'
'[] "cnv" (Id 'Conversation)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V5
200
"Conversation"
Conversation]
Conversation))))))))
:<|> (Named
"get-conversation"
(Summary "Get a conversation by ID"
:> (From 'V6
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture'
'[] "cnv" (Id 'Conversation)
:> Verb
'GET 200 '[JSON] Conversation)))))))
:<|> (Named
"get-conversation-roles"
(Summary
"Get existing roles available for the given conversation"
:> (CanThrow 'ConvNotFound
:> (CanThrow 'ConvAccessDenied
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> ("roles"
:> Verb
'GET
200
'[JSON]
ConversationRolesList)))))))
:<|> (Named
"get-group-info"
(Summary "Get MLS group information"
:> (From 'V5
:> (CanThrow 'ConvNotFound
:> (CanThrow 'MLSMissingGroupInfo
:> (CanThrow 'MLSNotEnabled
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id 'Conversation)
:> ("groupinfo"
:> MultiVerb
'GET
'[MLS]
'[Respond
200
"The group information"
GroupInfoData]
GroupInfoData)))))))))
:<|> (Named
"list-conversation-ids-unqualified"
(Summary
"[deprecated] Get all local conversation IDs."
:> (Until 'V3
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("conversations"
:> ("ids"
:> (QueryParam'
'[Optional, Strict,
Description
"Conversation ID to start from (exclusive)"]
"start"
(Id 'Conversation)
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum number of IDs to return"]
"size"
(Range 1 1000 Int32)
:> Verb
'GET
200
'[JSON]
(ConversationList
(Id
'Conversation)))))))))
:<|> (Named
"list-conversation-ids-v2"
(Summary "Get all conversation IDs."
:> (Until 'V3
:> (Description
"The IDs returned by this endpoint are paginated. To get the first page, make a call with the `paging_state` field set to `null` (or omitted). Whenever the `has_more` field of the response is set to `true`, more results are available, and they can be obtained by calling the endpoint again, but this time passing the value of `paging_state` returned by the previous call. One can continue in this fashion until all results are returned, which is indicated by `has_more` being `false`. Note that `paging_state` should be considered an opaque token. It should not be inspected, or stored, or reused across multiple unrelated invocations of the endpoint."
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("conversations"
:> ("list-ids"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
(GetMultiTablePageRequest
"ConversationIds"
LocalOrRemoteTable
1000
1000)
:> Verb
'POST
200
'[JSON]
(MultiTablePage
"ConversationIds"
"qualified_conversations"
LocalOrRemoteTable
(Qualified
(Id
'Conversation))))))))))
:<|> (Named
"list-conversation-ids"
(Summary "Get all conversation IDs."
:> (From 'V3
:> (Description
"The IDs returned by this endpoint are paginated. To get the first page, make a call with the `paging_state` field set to `null` (or omitted). Whenever the `has_more` field of the response is set to `true`, more results are available, and they can be obtained by calling the endpoint again, but this time passing the value of `paging_state` returned by the previous call. One can continue in this fashion until all results are returned, which is indicated by `has_more` being `false`. Note that `paging_state` should be considered an opaque token. It should not be inspected, or stored, or reused across multiple unrelated invocations of the endpoint."
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("conversations"
:> ("list-ids"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
(GetMultiTablePageRequest
"ConversationIds"
LocalOrRemoteTable
1000
1000)
:> Verb
'POST
200
'[JSON]
(MultiTablePage
"ConversationIds"
"qualified_conversations"
LocalOrRemoteTable
(Qualified
(Id
'Conversation))))))))))
:<|> (Named
"get-conversations"
(Summary
"Get all *local* conversations."
:> (Until 'V3
:> (Description
"Will not return remote conversations.\n\nUse `POST /conversations/list-ids` followed by `POST /conversations/list` instead."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (QueryParam'
'[Optional,
Strict,
Description
"Mutually exclusive with 'start' (at most 32 IDs per request)"]
"ids"
(Range
1
32
(CommaSeparatedList
(Id
'Conversation)))
:> (QueryParam'
'[Optional,
Strict,
Description
"Conversation ID to start from (exclusive)"]
"start"
(Id
'Conversation)
:> (QueryParam'
'[Optional,
Strict,
Description
"Maximum number of conversations to return"]
"size"
(Range
1
500
Int32)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V2
200
"List of local conversations"
(ConversationList
Conversation)]
(ConversationList
Conversation)))))))))
:<|> (Named
"list-conversations@v1"
(Summary
"Get conversation metadata for a list of conversation ids"
:> (Until 'V2
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("list"
:> ("v2"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ListConversations
:> Verb
'POST
200
'[JSON]
ConversationsResponse)))))))
:<|> (Named
"list-conversations@v2"
(Summary
"Get conversation metadata for a list of conversation ids"
:> (From 'V2
:> (Until 'V3
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("list"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ListConversations
:> MultiVerb
'POST
'[JSON]
'[VersionedRespond
'V2
200
"Conversation page"
ConversationsResponse]
ConversationsResponse)))))))
:<|> (Named
"list-conversations@v5"
(Summary
"Get conversation metadata for a list of conversation ids"
:> (From 'V3
:> (Until
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("list"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ListConversations
:> MultiVerb
'POST
'[JSON]
'[VersionedRespond
'V5
200
"Conversation page"
ConversationsResponse]
ConversationsResponse)))))))
:<|> (Named
"list-conversations"
(Summary
"Get conversation metadata for a list of conversation ids"
:> (From
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("list"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ListConversations
:> Verb
'POST
200
'[JSON]
ConversationsResponse))))))
:<|> (Named
"get-conversation-by-reusable-code"
(Summary
"Get limited conversation information by key/code pair"
:> (CanThrow
'CodeNotFound
:> (CanThrow
'InvalidConversationPassword
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'GuestLinksDisabled
:> (CanThrow
'NotATeamMember
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("join"
:> (QueryParam'
'[Required,
Strict]
"key"
Key
:> (QueryParam'
'[Required,
Strict]
"code"
Value
:> Verb
'GET
200
'[JSON]
ConversationCoverView))))))))))))
:<|> (Named
"create-group-conversation@v2"
(Summary
"Create a new conversation"
:> (DescriptionOAuthScope
'WriteConversations
:> (Until
'V3
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSNonEmptyMemberList
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
UnreachableBackendsLegacy
:> (Description
"This returns 201 when a new conversation is created, and 200 when the conversation already existed"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (VersionedReqBody'
'V2
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation)))))))))))))))))
:<|> (Named
"create-group-conversation@v3"
(Summary
"Create a new conversation"
:> (DescriptionOAuthScope
'WriteConversations
:> (From
'V3
:> (Until
'V4
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSNonEmptyMemberList
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
UnreachableBackendsLegacy
:> (Description
"This returns 201 when a new conversation is created, and 200 when the conversation already existed"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V3
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V3
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation))))))))))))))))))
:<|> (Named
"create-group-conversation@v5"
(Summary
"Create a new conversation"
:> (From
'V4
:> (Until
'V6
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSNonEmptyMemberList
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> (Description
"This returns 201 when a new conversation is created, and 200 when the conversation already existed"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V5
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
CreateGroupConversation
(VersionedRespond
'V5
201
"Conversation created"
CreateGroupConversation)]
CreateGroupConversationResponse)))))))))))))))))
:<|> (Named
"create-group-conversation"
(Summary
"Create a new conversation"
:> (From
'V6
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSNonEmptyMemberList
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> (Description
"This returns 201 when a new conversation is created, and 200 when the conversation already existed"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V6
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
CreateGroupConversation
(VersionedRespond
'V6
201
"Conversation created"
CreateGroupConversation)]
CreateGroupConversationResponse))))))))))))))))
:<|> (Named
"create-self-conversation@v2"
(Summary
"Create a self-conversation"
:> (Until
'V3
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("self"
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation))))))
:<|> (Named
"create-self-conversation@v5"
(Summary
"Create a self-conversation"
:> (From
'V3
:> (Until
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("self"
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V5
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V5
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation)))))))
:<|> (Named
"create-self-conversation"
(Summary
"Create a self-conversation"
:> (From
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("self"
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V6
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V6
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation))))))
:<|> (Named
"get-mls-self-conversation@v5"
(Summary
"Get the user's MLS self-conversation"
:> (From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("mls-self"
:> (CanThrow
'MLSNotEnabled
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V5
200
"The MLS self-conversation"
Conversation]
Conversation)))))))
:<|> (Named
"get-mls-self-conversation"
(Summary
"Get the user's MLS self-conversation"
:> (From
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> ("mls-self"
:> (CanThrow
'MLSNotEnabled
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"The MLS self-conversation"
Conversation]
Conversation))))))
:<|> (Named
"get-subconversation"
(Summary
"Get information about an MLS subconversation"
:> (From
'V5
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSSubConvUnsupportedConvType
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id
'Conversation)
:> ("subconversations"
:> (Capture'
'[]
"subconv"
SubConvId
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Subconversation"
PublicSubConversation]
PublicSubConversation))))))))))
:<|> (Named
"leave-subconversation"
(Summary
"Leave an MLS subconversation"
:> (From
'V5
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSNotEnabled
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id
'Conversation)
:> ("subconversations"
:> (Capture'
'[]
"subconv"
SubConvId
:> ("self"
:> MultiVerb
'DELETE
'[JSON]
'[RespondAs
'()
200
"OK"
()]
()))))))))))))))
:<|> (Named
"delete-subconversation"
(Summary
"Delete an MLS subconversation"
:> (From
'V5
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSStaleMessage
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id
'Conversation)
:> ("subconversations"
:> (Capture'
'[]
"subconv"
SubConvId
:> (ReqBody'
'[Required,
Strict]
'[JSON]
DeleteSubConversationRequest
:> MultiVerb
'DELETE
'[JSON]
'[Respond
200
"Deletion successful"
()]
()))))))))))))
:<|> (Named
"get-subconversation-group-info"
(Summary
"Get MLS group information of subconversation"
:> (From
'V5
:> (CanThrow
'ConvNotFound
:> (CanThrow
'MLSMissingGroupInfo
:> (CanThrow
'MLSNotEnabled
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id
'Conversation)
:> ("subconversations"
:> (Capture'
'[]
"subconv"
SubConvId
:> ("groupinfo"
:> MultiVerb
'GET
'[MLS]
'[Respond
200
"The group information"
GroupInfoData]
GroupInfoData)))))))))))
:<|> (Named
"create-one-to-one-conversation@v2"
(Summary
"Create a 1:1 conversation"
:> (Until
'V3
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'InvalidOperation
:> (CanThrow
'NoBindingTeamMembers
:> (CanThrow
'NonBindingTeam
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
UnreachableBackendsLegacy
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> ("one2one"
:> (VersionedReqBody'
'V2
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V2
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation))))))))))))))))))
:<|> (Named
"create-one-to-one-conversation"
(Summary
"Create a 1:1 conversation"
:> (From
'V3
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'InvalidOperation
:> (CanThrow
'NoBindingTeamMembers
:> (CanThrow
'NonBindingTeam
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
UnreachableBackendsLegacy
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> ("one2one"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
NewConv
:> MultiVerb
'POST
'[JSON]
'[WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V3
200
"Conversation existed"
Conversation),
WithHeaders
'[DescHeader
"Location"
"Conversation ID"
(Id
'Conversation)]
Conversation
(VersionedRespond
'V3
201
"Conversation created"
Conversation)]
(ResponseForExistedCreated
Conversation))))))))))))))))))
:<|> (Named
"get-one-to-one-mls-conversation@v5"
(Summary
"Get an MLS 1:1 conversation"
:> (From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> (CanThrow
'MLSFederatedOne2OneNotSupported
:> ("conversations"
:> ("one2one"
:> (QualifiedCapture'
'[]
"usr"
(Id
'User)
:> MultiVerb
'GET
'[JSON]
'[VersionedRespond
'V5
200
"MLS 1-1 conversation"
Conversation]
Conversation))))))))))
:<|> (Named
"get-one-to-one-mls-conversation@v6"
(Summary
"Get an MLS 1:1 conversation"
:> (From
'V6
:> (Until
'V7
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> ("conversations"
:> ("one2one"
:> (QualifiedCapture'
'[]
"usr"
(Id
'User)
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"MLS 1-1 conversation"
(MLSOne2OneConversation
MLSPublicKey)]
(MLSOne2OneConversation
MLSPublicKey))))))))))
:<|> (Named
"get-one-to-one-mls-conversation"
(Summary
"Get an MLS 1:1 conversation"
:> (From
'V7
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'NotConnected
:> ("conversations"
:> ("one2one"
:> (QualifiedCapture'
'[]
"usr"
(Id
'User)
:> (QueryParam'
'[Optional,
Strict]
"format"
MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"MLS 1-1 conversation"
(MLSOne2OneConversation
SomeKey)]
(MLSOne2OneConversation
SomeKey))))))))))
:<|> (Named
"add-members-to-conversation-unqualified"
(Summary
"Add members to an existing conversation (deprecated)"
:> (Until
'V2
:> (CanThrow
('ActionDenied
'AddConversationMember)
:> (CanThrow
('ActionDenied
'LeaveConversation)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'TooManyMembers
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[]
"cnv"
(Id
'Conversation)
:> ("members"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
Invite
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation updated"
Event]
(UpdateResult
Event))))))))))))))))))))
:<|> (Named
"add-members-to-conversation-unqualified2"
(Summary
"Add qualified members to an existing conversation."
:> (Until
'V2
:> (CanThrow
('ActionDenied
'AddConversationMember)
:> (CanThrow
('ActionDenied
'LeaveConversation)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'TooManyMembers
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[]
"cnv"
(Id
'Conversation)
:> ("members"
:> ("v2"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
InviteQualified
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation updated"
Event]
(UpdateResult
Event)))))))))))))))))))))
:<|> (Named
"add-members-to-conversation"
(Summary
"Add qualified members to an existing conversation."
:> (From
'V2
:> (CanThrow
('ActionDenied
'AddConversationMember)
:> (CanThrow
('ActionDenied
'LeaveConversation)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'TooManyMembers
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[]
"cnv"
(Id
'Conversation)
:> ("members"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
InviteQualified
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation updated"
Event]
(UpdateResult
Event))))))))))))))))))))
:<|> (Named
"join-conversation-by-id-unqualified"
(Summary
"Join a conversation by its ID (if link access enabled) (deprecated)"
:> (Until
'V5
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TooManyMembers
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("join"
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation joined"
Event]
(UpdateResult
Event)))))))))))))
:<|> (Named
"join-conversation-by-code-unqualified"
(Summary
"Join a conversation using a reusable code"
:> (Description
"If the guest links team feature is disabled, this will fail with 409 GuestLinksDisabled.Note that this is currently inconsistent (for backwards compatibility reasons) with `POST /conversations/code-check` which responds with 404 CodeNotFound if guest links are disabled."
:> (CanThrow
'CodeNotFound
:> (CanThrow
'InvalidConversationPassword
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'GuestLinksDisabled
:> (CanThrow
'InvalidOperation
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TooManyMembers
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> ("join"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
JoinConversationByCode
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation joined"
Event]
(UpdateResult
Event))))))))))))))))
:<|> (Named
"code-check"
(Summary
"Check validity of a conversation code."
:> (Description
"If the guest links team feature is disabled, this will fail with 404 CodeNotFound.Note that this is currently inconsistent (for backwards compatibility reasons) with `POST /conversations/join` which responds with 409 GuestLinksDisabled if guest links are disabled."
:> (CanThrow
'CodeNotFound
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidConversationPassword
:> ("conversations"
:> ("code-check"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationCode
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
200
"Valid"
()]
()))))))))
:<|> (Named
"create-conversation-code-unqualified@v3"
(Summary
"Create or recreate a conversation code"
:> (Until
'V4
:> (DescriptionOAuthScope
'WriteConversationsCode
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'GuestLinksDisabled
:> (CanThrow
'CreateConversationCodeConflict
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (ZHostOpt
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("code"
:> MultiVerb
'POST
'[JSON]
'[Respond
200
"Conversation code already exists."
ConversationCodeInfo,
Respond
201
"Conversation code created."
Event]
AddCodeResult)))))))))))))
:<|> (Named
"create-conversation-code-unqualified"
(Summary
"Create or recreate a conversation code"
:> (From
'V4
:> (DescriptionOAuthScope
'WriteConversationsCode
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'GuestLinksDisabled
:> (CanThrow
'CreateConversationCodeConflict
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (ZHostOpt
:> (ZAuthServant
'ZAuthConn
'[Optional,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("code"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
CreateConversationCodeRequest
:> MultiVerb
'POST
'[JSON]
'[Respond
200
"Conversation code already exists."
ConversationCodeInfo,
Respond
201
"Conversation code created."
Event]
AddCodeResult))))))))))))))
:<|> (Named
"get-conversation-guest-links-status"
(Summary
"Get the status of the guest links feature for a conversation that potentially has been created by someone from another team."
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))
:<|> (Named
"remove-code-unqualified"
(Summary
"Delete conversation code"
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("code"
:> MultiVerb
'DELETE
'[JSON]
'[Respond
200
"Conversation code deleted."
Event]
Event))))))))
:<|> (Named
"get-code"
(Summary
"Get existing conversation code"
:> (CanThrow
'CodeNotFound
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'GuestLinksDisabled
:> (ZHostOpt
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("code"
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Conversation Code"
ConversationCodeInfo]
ConversationCodeInfo))))))))))
:<|> (Named
"member-typing-unqualified"
(Summary
"Sending typing notifications"
:> (Until
'V3
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("typing"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
TypingStatus
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
200
"Notification sent"
()]
())))))))))
:<|> (Named
"member-typing-qualified"
(Summary
"Sending typing notifications"
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("typing"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
TypingStatus
:> MultiVerb
'POST
'[JSON]
'[RespondAs
'()
200
"Notification sent"
()]
()))))))))
:<|> (Named
"remove-member-unqualified"
(Summary
"Remove a member from a conversation (deprecated)"
:> (Until
'V2
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("members"
:> (Capture'
'[Description
"Target User ID"]
"usr"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
'[RespondAs
'()
204
"No change"
(),
Respond
200
"Member removed"
Event]
(Maybe
Event))))))))))))
:<|> (Named
"remove-member"
(Summary
"Remove a member from a conversation"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("members"
:> (QualifiedCapture'
'[Description
"Target User ID"]
"usr"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
'[RespondAs
'()
204
"No change"
(),
Respond
200
"Member removed"
Event]
(Maybe
Event)))))))))))
:<|> (Named
"update-other-member-unqualified"
(Summary
"Update membership of the specified user (deprecated)"
:> (Deprecated
:> (Description
"Use `PUT /conversations/:cnv_domain/:cnv/members/:usr_domain/:usr` instead"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvMemberNotFound
:> (CanThrow
('ActionDenied
'ModifyOtherConversationMember)
:> (CanThrow
'InvalidTarget
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("members"
:> (Capture'
'[Description
"Target User ID"]
"usr"
(Id
'User)
:> (ReqBody'
'[Required,
Strict]
'[JSON]
OtherMemberUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
200
"Membership updated"
()]
())))))))))))))))
:<|> (Named
"update-other-member"
(Summary
"Update membership of the specified user"
:> (Description
"**Note**: at least one field has to be provided."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvMemberNotFound
:> (CanThrow
('ActionDenied
'ModifyOtherConversationMember)
:> (CanThrow
'InvalidTarget
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("members"
:> (QualifiedCapture'
'[Description
"Target User ID"]
"usr"
(Id
'User)
:> (ReqBody'
'[Required,
Strict]
'[JSON]
OtherMemberUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
200
"Membership updated"
()]
()))))))))))))))
:<|> (Named
"update-conversation-name-deprecated"
(Summary
"Update conversation name (deprecated)"
:> (Deprecated
:> (Description
"Use `/conversations/:domain/:conv/name` instead."
:> (CanThrow
('ActionDenied
'ModifyConversationName)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationRename
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Name unchanged"
(),
Respond
200
"Name updated"
Event]
(UpdateResult
Event))))))))))))
:<|> (Named
"update-conversation-name-unqualified"
(Summary
"Update conversation name (deprecated)"
:> (Deprecated
:> (Description
"Use `/conversations/:domain/:conv/name` instead."
:> (CanThrow
('ActionDenied
'ModifyConversationName)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("name"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationRename
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Name unchanged"
(),
Respond
200
"Name updated"
Event]
(UpdateResult
Event)))))))))))))
:<|> (Named
"update-conversation-name"
(Summary
"Update conversation name"
:> (CanThrow
('ActionDenied
'ModifyConversationName)
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("name"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationRename
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Name updated"
(),
Respond
200
"Name unchanged"
Event]
(UpdateResult
Event)))))))))))
:<|> (Named
"update-conversation-message-timer-unqualified"
(Summary
"Update the message timer for a conversation (deprecated)"
:> (Deprecated
:> (Description
"Use `/conversations/:domain/:cnv/message-timer` instead."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationMessageTimer)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("message-timer"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationMessageTimerUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Message timer unchanged"
(),
Respond
200
"Message timer updated"
Event]
(UpdateResult
Event))))))))))))))
:<|> (Named
"update-conversation-message-timer"
(Summary
"Update the message timer for a conversation"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationMessageTimer)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("message-timer"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationMessageTimerUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Message timer unchanged"
(),
Respond
200
"Message timer updated"
Event]
(UpdateResult
Event))))))))))))
:<|> (Named
"update-conversation-receipt-mode-unqualified"
(Summary
"Update receipt mode for a conversation (deprecated)"
:> (Deprecated
:> (Description
"Use `PUT /conversations/:domain/:cnv/receipt-mode` instead."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationReceiptMode)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("receipt-mode"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationReceiptModeUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Receipt mode unchanged"
(),
Respond
200
"Receipt mode updated"
Event]
(UpdateResult
Event))))))))))))))
:<|> (Named
"update-conversation-receipt-mode"
(Summary
"Update receipt mode for a conversation"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationReceiptMode)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("receipt-mode"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationReceiptModeUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Receipt mode unchanged"
(),
Respond
200
"Receipt mode updated"
Event]
(UpdateResult
Event))))))))))))
:<|> (Named
"update-conversation-access-unqualified"
(Summary
"Update access modes for a conversation (deprecated)"
:> (Until
'V3
:> (Description
"Use PUT `/conversations/:domain/:cnv/access` instead."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationAccess)
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'InvalidTargetAccess
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("access"
:> (VersionedReqBody'
'V2
'[Required,
Strict]
'[JSON]
ConversationAccessData
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Access unchanged"
(),
Respond
200
"Access updated"
Event]
(UpdateResult
Event))))))))))))))))
:<|> (Named
"update-conversation-access@v2"
(Summary
"Update access modes for a conversation"
:> (Until
'V3
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationAccess)
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'InvalidTargetAccess
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("access"
:> (VersionedReqBody'
'V2
'[Required,
Strict]
'[JSON]
ConversationAccessData
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Access unchanged"
(),
Respond
200
"Access updated"
Event]
(UpdateResult
Event)))))))))))))))
:<|> (Named
"update-conversation-access"
(Summary
"Update access modes for a conversation"
:> (From
'V3
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (CanThrow
('ActionDenied
'ModifyConversationAccess)
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'ConvAccessDenied
:> (CanThrow
'ConvNotFound
:> (CanThrow
'InvalidOperation
:> (CanThrow
'InvalidTargetAccess
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("access"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ConversationAccessData
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Access unchanged"
(),
Respond
200
"Access updated"
Event]
(UpdateResult
Event)))))))))))))))
:<|> (Named
"get-conversation-self-unqualified"
(Summary
"Get self membership properties (deprecated)"
:> (Deprecated
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("self"
:> Verb
'GET
200
'[JSON]
(Maybe
Member)))))))
:<|> (Named
"update-conversation-self-unqualified"
(Summary
"Update self membership properties (deprecated)"
:> (Deprecated
:> (Description
"Use `/conversations/:domain/:conv/self` instead."
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (Capture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("self"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
MemberUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
200
"Update successful"
()]
()))))))))))
:<|> (Named
"update-conversation-self"
(Summary
"Update self membership properties"
:> (Description
"**Note**: at least one field has to be provided."
:> (CanThrow
'ConvNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("self"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
MemberUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
200
"Update successful"
()]
())))))))))
:<|> Named
"update-conversation-protocol"
(Summary
"Update the protocol of the conversation"
:> (From
'V5
:> (Description
"**Note**: Only proteus->mixed upgrade is supported."
:> (CanThrow
'ConvNotFound
:> (CanThrow
'ConvInvalidProtocolTransition
:> (CanThrow
('ActionDenied
'LeaveConversation)
:> (CanThrow
'InvalidOperation
:> (CanThrow
'MLSMigrationCriteriaNotSatisfied
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("conversations"
:> (QualifiedCapture'
'[Description
"Conversation ID"]
"cnv"
(Id
'Conversation)
:> ("protocol"
:> (ReqBody'
'[Required,
Strict]
'[JSON]
ProtocolUpdate
:> MultiVerb
'PUT
'[JSON]
'[RespondAs
'()
204
"Conversation unchanged"
(),
Respond
200
"Conversation updated"
Event]
(UpdateResult
Event))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
:<|> (TeamConversationAPI
:<|> ((Named
"post-otr-message-unqualified"
(Summary
"Post an encrypted message to a conversation (accepts JSON or Protobuf)"
:> (Description PostOtrDescriptionUnqualified
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> ("otr"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON, Proto] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
ClientMismatch,
Respond
201
"Message sent"
ClientMismatch]
(PostOtrResponse
ClientMismatch))))))))))))
:<|> (Named
"post-otr-broadcast-unqualified"
(Summary
"Broadcast an encrypted message to all team members and all contacts (accepts JSON or Protobuf)"
:> (Description PostOtrDescriptionUnqualified
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> (CanThrow 'TeamNotFound
:> (CanThrow 'BroadcastLimitExceeded
:> (CanThrow 'NonBindingTeam
:> ("broadcast"
:> ("otr"
:> ("messages"
:> (QueryParam
"ignore_missing" IgnoreMissing
:> (QueryParam
"report_missing"
ReportMissing
:> (ReqBody
'[JSON, Proto]
NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse
'ConvNotFound,
ErrorResponse
'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
ClientMismatch,
Respond
201
"Message sent"
ClientMismatch]
(PostOtrResponse
ClientMismatch))))))))))))))
:<|> (Named
"post-proteus-message"
(Summary
"Post an encrypted message to a conversation (accepts only Protobuf)"
:> (Description PostOtrDescription
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture' '[] "cnv" (Id 'Conversation)
:> ("proteus"
:> ("messages"
:> (ReqBody
'[Proto]
(RawProto
QualifiedNewOtrMessage)
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse
'ConvNotFound,
ErrorResponse
'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
MessageSendingStatus,
Respond
201
"Message sent"
MessageSendingStatus]
(Either
(MessageNotSent
MessageSendingStatus)
MessageSendingStatus))))))))))
:<|> Named
"post-proteus-broadcast"
(Summary
"Post an encrypted message to all team members and all contacts (accepts only Protobuf)"
:> (Description PostOtrDescription
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> (CanThrow 'TeamNotFound
:> (CanThrow 'BroadcastLimitExceeded
:> (CanThrow 'NonBindingTeam
:> ("broadcast"
:> ("proteus"
:> ("messages"
:> (ReqBody
'[Proto]
QualifiedNewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse
'ConvNotFound,
ErrorResponse
'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
MessageSendingStatus,
Respond
201
"Message sent"
MessageSendingStatus]
(Either
(MessageNotSent
MessageSendingStatus)
MessageSendingStatus)))))))))))))))
:<|> ((Named
"post-bot-message-unqualified"
(ZBot
:> (ZConversation
:> (CanThrow 'ConvNotFound
:> ("bot"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
ClientMismatch,
Respond
201 "Message sent" ClientMismatch]
(PostOtrResponse
ClientMismatch)))))))))
:<|> Named
"get-bot-conversation"
(CanThrow 'AccessDenied
:> (CanThrow 'ConvNotFound
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("bot"
:> ("conversation"
:> (ZBot
:> (ZConversation
:> Get
'[JSON] BotConvView))))))))))
:<|> (TeamAPI
:<|> ((Named
'("get", SSOConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for sso"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig)))))))))))
:<|> ((Named
'("get", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))
:<|> Named
'("put", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for legalhold"
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[ 'ActionDenied
'RemoveConversationMember,
'CannotEnableLegalHoldServiceLargeTeam,
'LegalHoldNotEnabled,
'LegalHoldDisableUnimplemented,
'LegalHoldServiceNotRegistered,
'UserLegalHoldIllegalOperation,
'LegalHoldCouldNotBlockConnections]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("features"
:> ("legalhold"
:> (ReqBody
'[JSON]
(Feature
LegalholdConfig)
:> Put
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))))))
:<|> ((Named
'("get", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for searchVisibility"
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))
:<|> Named
'("put", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Put config for searchVisibility"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))))))
:<|> (SearchVisibilityGet
:<|> (SearchVisibilitySet
:<|> (Named
'("get",
ValidateSAMLEmailsConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for validateSAMLemails"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig)))))))))))
:<|> (Named
'("get",
DigitalSignaturesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for digitalSignatures"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))
:<|> ((Named
'("get",
AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig)))))))))))
:<|> Named
'("put",
AppLockConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> (ReqBody
'[JSON]
(Feature
AppLockConfig)
:> Put
'[JSON]
(LockableFeature
AppLockConfig)))))))))))))))
:<|> ((Named
'("get",
FileSharingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))
:<|> Named
'("put",
FileSharingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> (ReqBody
'[JSON]
(Feature
FileSharingConfig)
:> Put
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))))))
:<|> (Named
'("get",
ClassifiedDomainsConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for classifiedDomains"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig)))))))))))
:<|> ((Named
'("get",
ConferenceCallingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))
:<|> Named
'("put",
ConferenceCallingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> (ReqBody
'[JSON]
(Feature
ConferenceCallingConfig)
:> Put
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))))))
:<|> ((Named
'("get",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))
:<|> Named
'("put",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> (ReqBody
'[JSON]
(Feature
SelfDeletingMessagesConfig)
:> Put
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))))))
:<|> ((Named
'("get",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))
:<|> Named
'("put",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> (ReqBody
'[JSON]
(Feature
GuestLinksConfig)
:> Put
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))))))
:<|> ((Named
'("get",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))
:<|> Named
'("put",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> (ReqBody
'[JSON]
(Feature
SndFactorPasswordChallengeConfig)
:> Put
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))))))
:<|> ((Named
'("get",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig))))))))))))
:<|> Named
'("put",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> (ReqBody
'[JSON]
(Feature
MLSConfig)
:> Put
'[JSON]
(LockableFeature
MLSConfig))))))))))))))))
:<|> ((Named
'("get",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> Get
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))
:<|> Named
'("put",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> (ReqBody
'[JSON]
(Feature
ExposeInvitationURLsToTeamAdminConfig)
:> Put
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))))))
:<|> ((Named
'("get",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))
:<|> Named
'("put",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityInboundConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))))))
:<|> ((Named
'("get",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> Get
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))
:<|> Named
'("put",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> (ReqBody
'[JSON]
(Feature
OutlookCalIntegrationConfig)
:> Put
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))))))
:<|> (Named
'("get",
MlsE2EIdConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> Get
'[JSON]
(LockableFeature
MlsE2EIdConfig))))))))))))
:<|> (Named
"put-MlsE2EIdConfig@v5"
(From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> (Named
'("put",
MlsE2EIdConfig)
(From
'V6
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> ((Named
'("get",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> Get
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))
:<|> Named
'("put",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> (ReqBody
'[JSON]
(Feature
MlsMigrationConfig)
:> Put
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))))))
:<|> ((Named
'("get",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> Get
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))
:<|> Named
'("put",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> (ReqBody
'[JSON]
(Feature
EnforceFileDownloadLocationConfig)
:> Put
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))))))
:<|> (Named
'("get",
LimitedEventFanoutConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for limitedEventFanout"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("limitedEventFanout"
:> Get
'[JSON]
(LockableFeature
LimitedEventFanoutConfig))))))))))))
:<|> (AllTeamFeaturesUserGet
:<|> (AllTeamFeaturesTeamGet
:<|> ((Named
'("get-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))
:<|> (Named
'("put-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `PUT /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))))
:<|> (Named
'("get-deprecated",
ValidateSAMLEmailsConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/validateSAMLemails` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validate-saml-emails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))))
:<|> Named
'("get-deprecated",
DigitalSignaturesConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/digitalSignatures` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digital-signatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))))))
:<|> (Named
'("get-config",
LegalholdConfig)
(Summary
"[deprecated] Get feature config for feature legalhold"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig))))))))))
:<|> (Named
'("get-config",
SSOConfig)
(Summary
"[deprecated] Get feature config for feature sso"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig))))))))))
:<|> (Named
'("get-config",
SearchVisibilityAvailableConfig)
(Summary
"[deprecated] Get feature config for feature searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))
:<|> (Named
'("get-config",
ValidateSAMLEmailsConfig)
(Summary
"[deprecated] Get feature config for feature validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))
:<|> (Named
'("get-config",
DigitalSignaturesConfig)
(Summary
"[deprecated] Get feature config for feature digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig))))))))))
:<|> (Named
'("get-config",
AppLockConfig)
(Summary
"[deprecated] Get feature config for feature appLock"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig))))))))))
:<|> (Named
'("get-config",
FileSharingConfig)
(Summary
"[deprecated] Get feature config for feature fileSharing"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig))))))))))
:<|> (Named
'("get-config",
ClassifiedDomainsConfig)
(Summary
"[deprecated] Get feature config for feature classifiedDomains"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig))))))))))
:<|> (Named
'("get-config",
ConferenceCallingConfig)
(Summary
"[deprecated] Get feature config for feature conferenceCalling"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig))))))))))
:<|> (Named
'("get-config",
SelfDeletingMessagesConfig)
(Summary
"[deprecated] Get feature config for feature selfDeletingMessages"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig))))))))))
:<|> (Named
'("get-config",
GuestLinksConfig)
(Summary
"[deprecated] Get feature config for feature conversationGuestLinks"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig))))))))))
:<|> (Named
'("get-config",
SndFactorPasswordChallengeConfig)
(Summary
"[deprecated] Get feature config for feature sndFactorPasswordChallenge"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig))))))))))
:<|> Named
'("get-config",
MLSConfig)
(Summary
"[deprecated] Get feature config for feature mls"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig)))))))))))))))))))))))))))))))))))))))))))))))))
:<|> ((Named
"mls-message"
("mls"
:> (Summary "Post an MLS message"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("messages"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
Message)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Message sent"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))
:<|> (Named
"mls-commit-bundle"
("mls"
:> (Summary "Post a MLS CommitBundle"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow
'LegalHoldNotEnabled
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
'MLSWelcomeMismatch
:> (CanThrow
'MLSLegalholdIncompatible
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("commit-bundles"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
CommitBundle)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Commit accepted and forwarded"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))))
:<|> Named
"mls-public-keys"
("mls"
:> (Summary
"Get public keys used by the backend to sign external proposals"
:> (Description
"The format of the returned key is determined by the `format` query parameter:\n - raw (default): base64-encoded raw public keys\n - jwk: keys are nested objects in JWK format."
:> (From 'V5
:> (CanThrow 'MLSNotEnabled
:> ("public-keys"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (QueryParam'
'[Optional,
Strict]
"format"
MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Public keys"
(MLSKeysByPurpose
(MLSKeys
SomeKey))]
(MLSKeysByPurpose
(MLSKeys
SomeKey))))))))))))
:<|> (CustomBackendAPI
:<|> ((Named
"create-legal-hold-settings"
(Summary
"Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow
'LegalHoldServiceInvalidKey
:> (CanThrow
'LegalHoldServiceBadResponse
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary
"Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("legalhold"
:> ("settings"
:> Get
'[JSON]
ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary
"Delete legal hold service settings"
:> (CanThrow
AuthenticationError
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary
"Get legal hold status"
:> (CanThrow
'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> Get
'[JSON]
UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary
"Consent to legal hold"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'InvalidOperation
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'UserLegalHoldIllegalOperation
:> (CanThrow
'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary
"Request legal hold device"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary
"Disable legal hold for user"
:> (CanThrow
AuthenticationError
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary
"Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional,
Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (QueryParam'
'[Optional,
Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get
'[JSON]
TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary
"Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow
'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> Get
'[JSON]
TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary
"Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow
'NotATeamMember
:> (CanThrow
'BulkGetMemberLimitExceeded
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional,
Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (ReqBody
'[JSON]
UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary
"Add a new team member"
:> (Until 'V4
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'NoAddToBinding
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TooManyTeamMembers
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary
"Remove an existing team member"
:> (CanThrow
AuthenticationError
:> (CanThrow
'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary
"Remove an existing team member"
:> (Until
'V4
:> (CanThrow
AuthenticationError
:> (CanThrow
'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary
"Update an existing team member"
:> (CanThrow
'AccessDenied
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow
'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI))))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
forall api1 (r :: EffectRow) api2.
API api1 r -> API api2 r -> API (api1 :<|> api2) r
<@> API
TeamConversationAPI
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
API TeamConversationAPI GalleyEffects
teamConversationAPI
API
TeamConversationAPI
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
((Named
"post-otr-message-unqualified"
(Summary
"Post an encrypted message to a conversation (accepts JSON or Protobuf)"
:> (Description PostOtrDescriptionUnqualified
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> ("otr"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON, Proto] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond
412 "Missing clients" ClientMismatch,
Respond 201 "Message sent" ClientMismatch]
(PostOtrResponse ClientMismatch))))))))))))
:<|> (Named
"post-otr-broadcast-unqualified"
(Summary
"Broadcast an encrypted message to all team members and all contacts (accepts JSON or Protobuf)"
:> (Description PostOtrDescriptionUnqualified
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> (CanThrow 'TeamNotFound
:> (CanThrow 'BroadcastLimitExceeded
:> (CanThrow 'NonBindingTeam
:> ("broadcast"
:> ("otr"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam
"report_missing" ReportMissing
:> (ReqBody '[JSON, Proto] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
ClientMismatch,
Respond
201
"Message sent"
ClientMismatch]
(PostOtrResponse
ClientMismatch))))))))))))))
:<|> (Named
"post-proteus-message"
(Summary
"Post an encrypted message to a conversation (accepts only Protobuf)"
:> (Description PostOtrDescription
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture' '[] "cnv" (Id 'Conversation)
:> ("proteus"
:> ("messages"
:> (ReqBody
'[Proto] (RawProto QualifiedNewOtrMessage)
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond
412
"Missing clients"
MessageSendingStatus,
Respond
201
"Message sent"
MessageSendingStatus]
(Either
(MessageNotSent MessageSendingStatus)
MessageSendingStatus))))))))))
:<|> Named
"post-proteus-broadcast"
(Summary
"Post an encrypted message to all team members and all contacts (accepts only Protobuf)"
:> (Description PostOtrDescription
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> (CanThrow 'TeamNotFound
:> (CanThrow 'BroadcastLimitExceeded
:> (CanThrow 'NonBindingTeam
:> ("broadcast"
:> ("proteus"
:> ("messages"
:> (ReqBody
'[Proto] QualifiedNewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse
'ConvNotFound,
ErrorResponse
'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
MessageSendingStatus,
Respond
201
"Message sent"
MessageSendingStatus]
(Either
(MessageNotSent
MessageSendingStatus)
MessageSendingStatus)))))))))))))))
:<|> ((Named
"post-bot-message-unqualified"
(ZBot
:> (ZConversation
:> (CanThrow 'ConvNotFound
:> ("bot"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse 'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond 412 "Missing clients" ClientMismatch,
Respond 201 "Message sent" ClientMismatch]
(PostOtrResponse ClientMismatch)))))))))
:<|> Named
"get-bot-conversation"
(CanThrow 'AccessDenied
:> (CanThrow 'ConvNotFound
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("bot"
:> ("conversation"
:> (ZBot
:> (ZConversation
:> Get '[JSON] BotConvView))))))))))
:<|> (TeamAPI
:<|> ((Named
'("get", SSOConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for sso"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig)))))))))))
:<|> ((Named
'("get", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))
:<|> Named
'("put", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany
'[ 'ActionDenied
'RemoveConversationMember,
'CannotEnableLegalHoldServiceLargeTeam,
'LegalHoldNotEnabled,
'LegalHoldDisableUnimplemented,
'LegalHoldServiceNotRegistered,
'UserLegalHoldIllegalOperation,
'LegalHoldCouldNotBlockConnections]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> (ReqBody
'[JSON]
(Feature
LegalholdConfig)
:> Put
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))))))
:<|> ((Named
'("get", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))
:<|> Named
'("put", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany '[]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))))))
:<|> (SearchVisibilityGet
:<|> (SearchVisibilitySet
:<|> (Named
'("get", ValidateSAMLEmailsConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for validateSAMLemails"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("features"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig)))))))))))
:<|> (Named
'("get", DigitalSignaturesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for digitalSignatures"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))
:<|> ((Named
'("get", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig)))))))))))
:<|> Named
'("put", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> (ReqBody
'[JSON]
(Feature
AppLockConfig)
:> Put
'[JSON]
(LockableFeature
AppLockConfig)))))))))))))))
:<|> ((Named
'("get",
FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))
:<|> Named
'("put",
FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> (ReqBody
'[JSON]
(Feature
FileSharingConfig)
:> Put
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))))))
:<|> (Named
'("get",
ClassifiedDomainsConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for classifiedDomains"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig)))))))))))
:<|> ((Named
'("get",
ConferenceCallingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))
:<|> Named
'("put",
ConferenceCallingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> (ReqBody
'[JSON]
(Feature
ConferenceCallingConfig)
:> Put
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))))))
:<|> ((Named
'("get",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))
:<|> Named
'("put",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> (ReqBody
'[JSON]
(Feature
SelfDeletingMessagesConfig)
:> Put
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))))))
:<|> ((Named
'("get",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))
:<|> Named
'("put",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> (ReqBody
'[JSON]
(Feature
GuestLinksConfig)
:> Put
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))))))
:<|> ((Named
'("get",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))
:<|> Named
'("put",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> (ReqBody
'[JSON]
(Feature
SndFactorPasswordChallengeConfig)
:> Put
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))))))
:<|> ((Named
'("get",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig))))))))))))
:<|> Named
'("put",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> (ReqBody
'[JSON]
(Feature
MLSConfig)
:> Put
'[JSON]
(LockableFeature
MLSConfig))))))))))))))))
:<|> ((Named
'("get",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> Get
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))
:<|> Named
'("put",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> (ReqBody
'[JSON]
(Feature
ExposeInvitationURLsToTeamAdminConfig)
:> Put
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))))))
:<|> ((Named
'("get",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))
:<|> Named
'("put",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityInboundConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))))))
:<|> ((Named
'("get",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> Get
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))
:<|> Named
'("put",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> (ReqBody
'[JSON]
(Feature
OutlookCalIntegrationConfig)
:> Put
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))))))
:<|> (Named
'("get",
MlsE2EIdConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> Get
'[JSON]
(LockableFeature
MlsE2EIdConfig))))))))))))
:<|> (Named
"put-MlsE2EIdConfig@v5"
(From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> (Named
'("put",
MlsE2EIdConfig)
(From
'V6
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> ((Named
'("get",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> Get
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))
:<|> Named
'("put",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> (ReqBody
'[JSON]
(Feature
MlsMigrationConfig)
:> Put
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))))))
:<|> ((Named
'("get",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> Get
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))
:<|> Named
'("put",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> (ReqBody
'[JSON]
(Feature
EnforceFileDownloadLocationConfig)
:> Put
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))))))
:<|> (Named
'("get",
LimitedEventFanoutConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for limitedEventFanout"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("limitedEventFanout"
:> Get
'[JSON]
(LockableFeature
LimitedEventFanoutConfig))))))))))))
:<|> (AllTeamFeaturesUserGet
:<|> (AllTeamFeaturesTeamGet
:<|> ((Named
'("get-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))
:<|> (Named
'("put-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `PUT /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))))
:<|> (Named
'("get-deprecated",
ValidateSAMLEmailsConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/validateSAMLemails` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validate-saml-emails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))))
:<|> Named
'("get-deprecated",
DigitalSignaturesConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/digitalSignatures` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digital-signatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))))))
:<|> (Named
'("get-config",
LegalholdConfig)
(Summary
"[deprecated] Get feature config for feature legalhold"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig))))))))))
:<|> (Named
'("get-config",
SSOConfig)
(Summary
"[deprecated] Get feature config for feature sso"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig))))))))))
:<|> (Named
'("get-config",
SearchVisibilityAvailableConfig)
(Summary
"[deprecated] Get feature config for feature searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))
:<|> (Named
'("get-config",
ValidateSAMLEmailsConfig)
(Summary
"[deprecated] Get feature config for feature validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))
:<|> (Named
'("get-config",
DigitalSignaturesConfig)
(Summary
"[deprecated] Get feature config for feature digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig))))))))))
:<|> (Named
'("get-config",
AppLockConfig)
(Summary
"[deprecated] Get feature config for feature appLock"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig))))))))))
:<|> (Named
'("get-config",
FileSharingConfig)
(Summary
"[deprecated] Get feature config for feature fileSharing"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig))))))))))
:<|> (Named
'("get-config",
ClassifiedDomainsConfig)
(Summary
"[deprecated] Get feature config for feature classifiedDomains"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig))))))))))
:<|> (Named
'("get-config",
ConferenceCallingConfig)
(Summary
"[deprecated] Get feature config for feature conferenceCalling"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig))))))))))
:<|> (Named
'("get-config",
SelfDeletingMessagesConfig)
(Summary
"[deprecated] Get feature config for feature selfDeletingMessages"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig))))))))))
:<|> (Named
'("get-config",
GuestLinksConfig)
(Summary
"[deprecated] Get feature config for feature conversationGuestLinks"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig))))))))))
:<|> (Named
'("get-config",
SndFactorPasswordChallengeConfig)
(Summary
"[deprecated] Get feature config for feature sndFactorPasswordChallenge"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig))))))))))
:<|> Named
'("get-config",
MLSConfig)
(Summary
"[deprecated] Get feature config for feature mls"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig)))))))))))))))))))))))))))))))))))))))))))))))))
:<|> ((Named
"mls-message"
("mls"
:> (Summary "Post an MLS message"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("messages"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
Message)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Message sent"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))
:<|> (Named
"mls-commit-bundle"
("mls"
:> (Summary "Post a MLS CommitBundle"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
'MLSWelcomeMismatch
:> (CanThrow
'MLSLegalholdIncompatible
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("commit-bundles"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
CommitBundle)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Commit accepted and forwarded"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))))
:<|> Named
"mls-public-keys"
("mls"
:> (Summary
"Get public keys used by the backend to sign external proposals"
:> (Description
"The format of the returned key is determined by the `format` query parameter:\n - raw (default): base64-encoded raw public keys\n - jwk: keys are nested objects in JWK format."
:> (From 'V5
:> (CanThrow 'MLSNotEnabled
:> ("public-keys"
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (QueryParam'
'[Optional, Strict]
"format"
MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Public keys"
(MLSKeysByPurpose
(MLSKeys
SomeKey))]
(MLSKeysByPurpose
(MLSKeys
SomeKey))))))))))))
:<|> (CustomBackendAPI
:<|> ((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow
'LegalHoldServiceBadResponse
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> Get
'[JSON]
ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary
"Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow
('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id 'User)
:> Get
'[JSON]
UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary
"Consent to legal hold"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'InvalidOperation
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'UserLegalHoldIllegalOperation
:> (CanThrow
'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary
"Request legal hold device"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary
"Disable legal hold for user"
:> (CanThrow
AuthenticationError
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary
"Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (QueryParam'
'[Optional,
Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get
'[JSON]
TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("members"
:> (Capture
"uid"
(Id 'User)
:> Get
'[JSON]
TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary
"Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow
'BulkGetMemberLimitExceeded
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional,
Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (ReqBody
'[JSON]
UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary
"Add a new team member"
:> (Until 'V4
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'NoAddToBinding
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TooManyTeamMembers
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary
"Remove an existing team member"
:> (CanThrow
AuthenticationError
:> (CanThrow
'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary
"Remove an existing team member"
:> (Until 'V4
:> (CanThrow
AuthenticationError
:> (CanThrow
'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary
"Update an existing team member"
:> (CanThrow
'AccessDenied
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow
'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
(TeamConversationAPI
:<|> ((Named
"post-otr-message-unqualified"
(Summary
"Post an encrypted message to a conversation (accepts JSON or Protobuf)"
:> (Description PostOtrDescriptionUnqualified
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> ("otr"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON, Proto] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
ClientMismatch,
Respond
201 "Message sent" ClientMismatch]
(PostOtrResponse
ClientMismatch))))))))))))
:<|> (Named
"post-otr-broadcast-unqualified"
(Summary
"Broadcast an encrypted message to all team members and all contacts (accepts JSON or Protobuf)"
:> (Description PostOtrDescriptionUnqualified
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> (CanThrow 'TeamNotFound
:> (CanThrow 'BroadcastLimitExceeded
:> (CanThrow 'NonBindingTeam
:> ("broadcast"
:> ("otr"
:> ("messages"
:> (QueryParam
"ignore_missing" IgnoreMissing
:> (QueryParam
"report_missing" ReportMissing
:> (ReqBody
'[JSON, Proto] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse
'ConvNotFound,
ErrorResponse
'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
ClientMismatch,
Respond
201
"Message sent"
ClientMismatch]
(PostOtrResponse
ClientMismatch))))))))))))))
:<|> (Named
"post-proteus-message"
(Summary
"Post an encrypted message to a conversation (accepts only Protobuf)"
:> (Description PostOtrDescription
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture' '[] "cnv" (Id 'Conversation)
:> ("proteus"
:> ("messages"
:> (ReqBody
'[Proto]
(RawProto QualifiedNewOtrMessage)
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
MessageSendingStatus,
Respond
201
"Message sent"
MessageSendingStatus]
(Either
(MessageNotSent
MessageSendingStatus)
MessageSendingStatus))))))))))
:<|> Named
"post-proteus-broadcast"
(Summary
"Post an encrypted message to all team members and all contacts (accepts only Protobuf)"
:> (Description PostOtrDescription
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> (CanThrow 'TeamNotFound
:> (CanThrow 'BroadcastLimitExceeded
:> (CanThrow 'NonBindingTeam
:> ("broadcast"
:> ("proteus"
:> ("messages"
:> (ReqBody
'[Proto]
QualifiedNewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse
'ConvNotFound,
ErrorResponse
'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
MessageSendingStatus,
Respond
201
"Message sent"
MessageSendingStatus]
(Either
(MessageNotSent
MessageSendingStatus)
MessageSendingStatus)))))))))))))))
:<|> ((Named
"post-bot-message-unqualified"
(ZBot
:> (ZConversation
:> (CanThrow 'ConvNotFound
:> ("bot"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond
412 "Missing clients" ClientMismatch,
Respond 201 "Message sent" ClientMismatch]
(PostOtrResponse ClientMismatch)))))))))
:<|> Named
"get-bot-conversation"
(CanThrow 'AccessDenied
:> (CanThrow 'ConvNotFound
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("bot"
:> ("conversation"
:> (ZBot
:> (ZConversation
:> Get '[JSON] BotConvView))))))))))
:<|> (TeamAPI
:<|> ((Named
'("get", SSOConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for sso"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig)))))))))))
:<|> ((Named
'("get", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))
:<|> Named
'("put", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany
'[ 'ActionDenied
'RemoveConversationMember,
'CannotEnableLegalHoldServiceLargeTeam,
'LegalHoldNotEnabled,
'LegalHoldDisableUnimplemented,
'LegalHoldServiceNotRegistered,
'UserLegalHoldIllegalOperation,
'LegalHoldCouldNotBlockConnections]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> (ReqBody
'[JSON]
(Feature
LegalholdConfig)
:> Put
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))))))
:<|> ((Named
'("get", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))
:<|> Named
'("put", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary
"Put config for searchVisibility"
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany '[]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("features"
:> ("searchVisibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))))))
:<|> (SearchVisibilityGet
:<|> (SearchVisibilitySet
:<|> (Named
'("get", ValidateSAMLEmailsConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for validateSAMLemails"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig)))))))))))
:<|> (Named
'("get",
DigitalSignaturesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for digitalSignatures"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))
:<|> ((Named
'("get", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig)))))))))))
:<|> Named
'("put",
AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> (ReqBody
'[JSON]
(Feature
AppLockConfig)
:> Put
'[JSON]
(LockableFeature
AppLockConfig)))))))))))))))
:<|> ((Named
'("get",
FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))
:<|> Named
'("put",
FileSharingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> (ReqBody
'[JSON]
(Feature
FileSharingConfig)
:> Put
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))))))
:<|> (Named
'("get",
ClassifiedDomainsConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for classifiedDomains"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig)))))))))))
:<|> ((Named
'("get",
ConferenceCallingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))
:<|> Named
'("put",
ConferenceCallingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> (ReqBody
'[JSON]
(Feature
ConferenceCallingConfig)
:> Put
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))))))
:<|> ((Named
'("get",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))
:<|> Named
'("put",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> (ReqBody
'[JSON]
(Feature
SelfDeletingMessagesConfig)
:> Put
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))))))
:<|> ((Named
'("get",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))
:<|> Named
'("put",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> (ReqBody
'[JSON]
(Feature
GuestLinksConfig)
:> Put
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))))))
:<|> ((Named
'("get",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))
:<|> Named
'("put",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> (ReqBody
'[JSON]
(Feature
SndFactorPasswordChallengeConfig)
:> Put
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))))))
:<|> ((Named
'("get",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig))))))))))))
:<|> Named
'("put",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> (ReqBody
'[JSON]
(Feature
MLSConfig)
:> Put
'[JSON]
(LockableFeature
MLSConfig))))))))))))))))
:<|> ((Named
'("get",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> Get
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))
:<|> Named
'("put",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> (ReqBody
'[JSON]
(Feature
ExposeInvitationURLsToTeamAdminConfig)
:> Put
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))))))
:<|> ((Named
'("get",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))
:<|> Named
'("put",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityInboundConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))))))
:<|> ((Named
'("get",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> Get
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))
:<|> Named
'("put",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> (ReqBody
'[JSON]
(Feature
OutlookCalIntegrationConfig)
:> Put
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))))))
:<|> (Named
'("get",
MlsE2EIdConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> Get
'[JSON]
(LockableFeature
MlsE2EIdConfig))))))))))))
:<|> (Named
"put-MlsE2EIdConfig@v5"
(From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> (Named
'("put",
MlsE2EIdConfig)
(From
'V6
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> ((Named
'("get",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> Get
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))
:<|> Named
'("put",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> (ReqBody
'[JSON]
(Feature
MlsMigrationConfig)
:> Put
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))))))
:<|> ((Named
'("get",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> Get
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))
:<|> Named
'("put",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> (ReqBody
'[JSON]
(Feature
EnforceFileDownloadLocationConfig)
:> Put
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))))))
:<|> (Named
'("get",
LimitedEventFanoutConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for limitedEventFanout"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("limitedEventFanout"
:> Get
'[JSON]
(LockableFeature
LimitedEventFanoutConfig))))))))))))
:<|> (AllTeamFeaturesUserGet
:<|> (AllTeamFeaturesTeamGet
:<|> ((Named
'("get-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))
:<|> (Named
'("put-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `PUT /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))))
:<|> (Named
'("get-deprecated",
ValidateSAMLEmailsConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/validateSAMLemails` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validate-saml-emails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))))
:<|> Named
'("get-deprecated",
DigitalSignaturesConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/digitalSignatures` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digital-signatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))))))
:<|> (Named
'("get-config",
LegalholdConfig)
(Summary
"[deprecated] Get feature config for feature legalhold"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig))))))))))
:<|> (Named
'("get-config",
SSOConfig)
(Summary
"[deprecated] Get feature config for feature sso"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig))))))))))
:<|> (Named
'("get-config",
SearchVisibilityAvailableConfig)
(Summary
"[deprecated] Get feature config for feature searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))
:<|> (Named
'("get-config",
ValidateSAMLEmailsConfig)
(Summary
"[deprecated] Get feature config for feature validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))
:<|> (Named
'("get-config",
DigitalSignaturesConfig)
(Summary
"[deprecated] Get feature config for feature digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig))))))))))
:<|> (Named
'("get-config",
AppLockConfig)
(Summary
"[deprecated] Get feature config for feature appLock"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig))))))))))
:<|> (Named
'("get-config",
FileSharingConfig)
(Summary
"[deprecated] Get feature config for feature fileSharing"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig))))))))))
:<|> (Named
'("get-config",
ClassifiedDomainsConfig)
(Summary
"[deprecated] Get feature config for feature classifiedDomains"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig))))))))))
:<|> (Named
'("get-config",
ConferenceCallingConfig)
(Summary
"[deprecated] Get feature config for feature conferenceCalling"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig))))))))))
:<|> (Named
'("get-config",
SelfDeletingMessagesConfig)
(Summary
"[deprecated] Get feature config for feature selfDeletingMessages"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig))))))))))
:<|> (Named
'("get-config",
GuestLinksConfig)
(Summary
"[deprecated] Get feature config for feature conversationGuestLinks"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig))))))))))
:<|> (Named
'("get-config",
SndFactorPasswordChallengeConfig)
(Summary
"[deprecated] Get feature config for feature sndFactorPasswordChallenge"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig))))))))))
:<|> Named
'("get-config",
MLSConfig)
(Summary
"[deprecated] Get feature config for feature mls"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig)))))))))))))))))))))))))))))))))))))))))))))))))
:<|> ((Named
"mls-message"
("mls"
:> (Summary "Post an MLS message"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("messages"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
Message)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Message sent"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))
:<|> (Named
"mls-commit-bundle"
("mls"
:> (Summary "Post a MLS CommitBundle"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow
'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
'MLSWelcomeMismatch
:> (CanThrow
'MLSLegalholdIncompatible
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("commit-bundles"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
CommitBundle)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Commit accepted and forwarded"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))))
:<|> Named
"mls-public-keys"
("mls"
:> (Summary
"Get public keys used by the backend to sign external proposals"
:> (Description
"The format of the returned key is determined by the `format` query parameter:\n - raw (default): base64-encoded raw public keys\n - jwk: keys are nested objects in JWK format."
:> (From 'V5
:> (CanThrow 'MLSNotEnabled
:> ("public-keys"
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (QueryParam'
'[Optional, Strict]
"format"
MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Public keys"
(MLSKeysByPurpose
(MLSKeys
SomeKey))]
(MLSKeysByPurpose
(MLSKeys
SomeKey))))))))))))
:<|> (CustomBackendAPI
:<|> ((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow
'LegalHoldServiceInvalidKey
:> (CanThrow
'LegalHoldServiceBadResponse
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> Get
'[JSON]
ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary
"Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary
"Get legal hold status"
:> (CanThrow
'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> Get
'[JSON]
UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary
"Consent to legal hold"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'InvalidOperation
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'UserLegalHoldIllegalOperation
:> (CanThrow
'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary
"Request legal hold device"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary
"Disable legal hold for user"
:> (CanThrow
AuthenticationError
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary
"Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional,
Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (QueryParam'
'[Optional,
Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get
'[JSON]
TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> Get
'[JSON]
TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary
"Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow
'NotATeamMember
:> (CanThrow
'BulkGetMemberLimitExceeded
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional,
Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (ReqBody
'[JSON]
UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary
"Add a new team member"
:> (Until 'V4
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'NoAddToBinding
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TooManyTeamMembers
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary
"Remove an existing team member"
:> (CanThrow
AuthenticationError
:> (CanThrow
'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary
"Remove an existing team member"
:> (Until
'V4
:> (CanThrow
AuthenticationError
:> (CanThrow
'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary
"Update an existing team member"
:> (CanThrow
'AccessDenied
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow
'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI)))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
forall api1 (r :: EffectRow) api2.
API api1 r -> API api2 r -> API (api1 :<|> api2) r
<@> API
(Named
"post-otr-message-unqualified"
(Summary
"Post an encrypted message to a conversation (accepts JSON or Protobuf)"
:> (Description PostOtrDescriptionUnqualified
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> ("otr"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON, Proto] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond 412 "Missing clients" ClientMismatch,
Respond 201 "Message sent" ClientMismatch]
(PostOtrResponse ClientMismatch))))))))))))
:<|> (Named
"post-otr-broadcast-unqualified"
(Summary
"Broadcast an encrypted message to all team members and all contacts (accepts JSON or Protobuf)"
:> (Description PostOtrDescriptionUnqualified
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> (CanThrow 'TeamNotFound
:> (CanThrow 'BroadcastLimitExceeded
:> (CanThrow 'NonBindingTeam
:> ("broadcast"
:> ("otr"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON, Proto] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
ClientMismatch,
Respond
201
"Message sent"
ClientMismatch]
(PostOtrResponse
ClientMismatch))))))))))))))
:<|> (Named
"post-proteus-message"
(Summary
"Post an encrypted message to a conversation (accepts only Protobuf)"
:> (Description PostOtrDescription
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture' '[] "cnv" (Id 'Conversation)
:> ("proteus"
:> ("messages"
:> (ReqBody '[Proto] (RawProto QualifiedNewOtrMessage)
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond
412
"Missing clients"
MessageSendingStatus,
Respond
201 "Message sent" MessageSendingStatus]
(Either
(MessageNotSent MessageSendingStatus)
MessageSendingStatus))))))))))
:<|> Named
"post-proteus-broadcast"
(Summary
"Post an encrypted message to all team members and all contacts (accepts only Protobuf)"
:> (Description PostOtrDescription
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> (CanThrow 'TeamNotFound
:> (CanThrow 'BroadcastLimitExceeded
:> (CanThrow 'NonBindingTeam
:> ("broadcast"
:> ("proteus"
:> ("messages"
:> (ReqBody
'[Proto] QualifiedNewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
MessageSendingStatus,
Respond
201
"Message sent"
MessageSendingStatus]
(Either
(MessageNotSent
MessageSendingStatus)
MessageSendingStatus)))))))))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
API MessagingAPI GalleyEffects
messagingAPI
API
(Named
"post-otr-message-unqualified"
(Summary
"Post an encrypted message to a conversation (accepts JSON or Protobuf)"
:> (Description PostOtrDescriptionUnqualified
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> ("otr"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON, Proto] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond 412 "Missing clients" ClientMismatch,
Respond 201 "Message sent" ClientMismatch]
(PostOtrResponse ClientMismatch))))))))))))
:<|> (Named
"post-otr-broadcast-unqualified"
(Summary
"Broadcast an encrypted message to all team members and all contacts (accepts JSON or Protobuf)"
:> (Description PostOtrDescriptionUnqualified
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> (CanThrow 'TeamNotFound
:> (CanThrow 'BroadcastLimitExceeded
:> (CanThrow 'NonBindingTeam
:> ("broadcast"
:> ("otr"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON, Proto] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
ClientMismatch,
Respond
201
"Message sent"
ClientMismatch]
(PostOtrResponse
ClientMismatch))))))))))))))
:<|> (Named
"post-proteus-message"
(Summary
"Post an encrypted message to a conversation (accepts only Protobuf)"
:> (Description PostOtrDescription
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture' '[] "cnv" (Id 'Conversation)
:> ("proteus"
:> ("messages"
:> (ReqBody '[Proto] (RawProto QualifiedNewOtrMessage)
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond
412
"Missing clients"
MessageSendingStatus,
Respond
201 "Message sent" MessageSendingStatus]
(Either
(MessageNotSent MessageSendingStatus)
MessageSendingStatus))))))))))
:<|> Named
"post-proteus-broadcast"
(Summary
"Post an encrypted message to all team members and all contacts (accepts only Protobuf)"
:> (Description PostOtrDescription
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> (CanThrow 'TeamNotFound
:> (CanThrow 'BroadcastLimitExceeded
:> (CanThrow 'NonBindingTeam
:> ("broadcast"
:> ("proteus"
:> ("messages"
:> (ReqBody
'[Proto] QualifiedNewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
MessageSendingStatus,
Respond
201
"Message sent"
MessageSendingStatus]
(Either
(MessageNotSent
MessageSendingStatus)
MessageSendingStatus)))))))))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
((Named
"post-bot-message-unqualified"
(ZBot
:> (ZConversation
:> (CanThrow 'ConvNotFound
:> ("bot"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse 'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond 412 "Missing clients" ClientMismatch,
Respond 201 "Message sent" ClientMismatch]
(PostOtrResponse ClientMismatch)))))))))
:<|> Named
"get-bot-conversation"
(CanThrow 'AccessDenied
:> (CanThrow 'ConvNotFound
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("bot"
:> ("conversation"
:> (ZBot
:> (ZConversation :> Get '[JSON] BotConvView))))))))))
:<|> (TeamAPI
:<|> ((Named
'("get", SSOConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for sso"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("sso"
:> Get
'[JSON]
(LockableFeature SSOConfig)))))))))))
:<|> ((Named
'("get", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))
:<|> Named
'("put", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany
'[ 'ActionDenied
'RemoveConversationMember,
'CannotEnableLegalHoldServiceLargeTeam,
'LegalHoldNotEnabled,
'LegalHoldDisableUnimplemented,
'LegalHoldServiceNotRegistered,
'UserLegalHoldIllegalOperation,
'LegalHoldCouldNotBlockConnections]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> (ReqBody
'[JSON]
(Feature
LegalholdConfig)
:> Put
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))))))
:<|> ((Named
'("get", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))
:<|> Named
'("put", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany '[]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))))))
:<|> (SearchVisibilityGet
:<|> (SearchVisibilitySet
:<|> (Named
'("get", ValidateSAMLEmailsConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for validateSAMLemails"
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("features"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig)))))))))))
:<|> (Named
'("get", DigitalSignaturesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for digitalSignatures"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("features"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))
:<|> ((Named
'("get", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig)))))))))))
:<|> Named
'("put", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Put config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> (ReqBody
'[JSON]
(Feature
AppLockConfig)
:> Put
'[JSON]
(LockableFeature
AppLockConfig)))))))))))))))
:<|> ((Named
'("get", FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))
:<|> Named
'("put",
FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> (ReqBody
'[JSON]
(Feature
FileSharingConfig)
:> Put
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))))))
:<|> (Named
'("get",
ClassifiedDomainsConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for classifiedDomains"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig)))))))))))
:<|> ((Named
'("get",
ConferenceCallingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))
:<|> Named
'("put",
ConferenceCallingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> (ReqBody
'[JSON]
(Feature
ConferenceCallingConfig)
:> Put
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))))))
:<|> ((Named
'("get",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))
:<|> Named
'("put",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> (ReqBody
'[JSON]
(Feature
SelfDeletingMessagesConfig)
:> Put
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))))))
:<|> ((Named
'("get",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))
:<|> Named
'("put",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> (ReqBody
'[JSON]
(Feature
GuestLinksConfig)
:> Put
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))))))
:<|> ((Named
'("get",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))
:<|> Named
'("put",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> (ReqBody
'[JSON]
(Feature
SndFactorPasswordChallengeConfig)
:> Put
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))))))
:<|> ((Named
'("get",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig))))))))))))
:<|> Named
'("put",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> (ReqBody
'[JSON]
(Feature
MLSConfig)
:> Put
'[JSON]
(LockableFeature
MLSConfig))))))))))))))))
:<|> ((Named
'("get",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> Get
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))
:<|> Named
'("put",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> (ReqBody
'[JSON]
(Feature
ExposeInvitationURLsToTeamAdminConfig)
:> Put
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))))))
:<|> ((Named
'("get",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))
:<|> Named
'("put",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityInboundConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))))))
:<|> ((Named
'("get",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> Get
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))
:<|> Named
'("put",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> (ReqBody
'[JSON]
(Feature
OutlookCalIntegrationConfig)
:> Put
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))))))
:<|> (Named
'("get",
MlsE2EIdConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> Get
'[JSON]
(LockableFeature
MlsE2EIdConfig))))))))))))
:<|> (Named
"put-MlsE2EIdConfig@v5"
(From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> (Named
'("put",
MlsE2EIdConfig)
(From
'V6
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> ((Named
'("get",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> Get
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))
:<|> Named
'("put",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> (ReqBody
'[JSON]
(Feature
MlsMigrationConfig)
:> Put
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))))))
:<|> ((Named
'("get",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> Get
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))
:<|> Named
'("put",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> (ReqBody
'[JSON]
(Feature
EnforceFileDownloadLocationConfig)
:> Put
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))))))
:<|> (Named
'("get",
LimitedEventFanoutConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for limitedEventFanout"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("limitedEventFanout"
:> Get
'[JSON]
(LockableFeature
LimitedEventFanoutConfig))))))))))))
:<|> (AllTeamFeaturesUserGet
:<|> (AllTeamFeaturesTeamGet
:<|> ((Named
'("get-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))
:<|> (Named
'("put-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `PUT /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))))
:<|> (Named
'("get-deprecated",
ValidateSAMLEmailsConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/validateSAMLemails` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validate-saml-emails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))))
:<|> Named
'("get-deprecated",
DigitalSignaturesConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/digitalSignatures` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digital-signatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))))))
:<|> (Named
'("get-config",
LegalholdConfig)
(Summary
"[deprecated] Get feature config for feature legalhold"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig))))))))))
:<|> (Named
'("get-config",
SSOConfig)
(Summary
"[deprecated] Get feature config for feature sso"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig))))))))))
:<|> (Named
'("get-config",
SearchVisibilityAvailableConfig)
(Summary
"[deprecated] Get feature config for feature searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))
:<|> (Named
'("get-config",
ValidateSAMLEmailsConfig)
(Summary
"[deprecated] Get feature config for feature validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))
:<|> (Named
'("get-config",
DigitalSignaturesConfig)
(Summary
"[deprecated] Get feature config for feature digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig))))))))))
:<|> (Named
'("get-config",
AppLockConfig)
(Summary
"[deprecated] Get feature config for feature appLock"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig))))))))))
:<|> (Named
'("get-config",
FileSharingConfig)
(Summary
"[deprecated] Get feature config for feature fileSharing"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig))))))))))
:<|> (Named
'("get-config",
ClassifiedDomainsConfig)
(Summary
"[deprecated] Get feature config for feature classifiedDomains"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig))))))))))
:<|> (Named
'("get-config",
ConferenceCallingConfig)
(Summary
"[deprecated] Get feature config for feature conferenceCalling"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig))))))))))
:<|> (Named
'("get-config",
SelfDeletingMessagesConfig)
(Summary
"[deprecated] Get feature config for feature selfDeletingMessages"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig))))))))))
:<|> (Named
'("get-config",
GuestLinksConfig)
(Summary
"[deprecated] Get feature config for feature conversationGuestLinks"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig))))))))))
:<|> (Named
'("get-config",
SndFactorPasswordChallengeConfig)
(Summary
"[deprecated] Get feature config for feature sndFactorPasswordChallenge"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig))))))))))
:<|> Named
'("get-config",
MLSConfig)
(Summary
"[deprecated] Get feature config for feature mls"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig)))))))))))))))))))))))))))))))))))))))))))))))))
:<|> ((Named
"mls-message"
("mls"
:> (Summary "Post an MLS message"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("messages"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
Message)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Message sent"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))
:<|> (Named
"mls-commit-bundle"
("mls"
:> (Summary "Post a MLS CommitBundle"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
'MLSWelcomeMismatch
:> (CanThrow
'MLSLegalholdIncompatible
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("commit-bundles"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
CommitBundle)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Commit accepted and forwarded"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))))
:<|> Named
"mls-public-keys"
("mls"
:> (Summary
"Get public keys used by the backend to sign external proposals"
:> (Description
"The format of the returned key is determined by the `format` query parameter:\n - raw (default): base64-encoded raw public keys\n - jwk: keys are nested objects in JWK format."
:> (From 'V5
:> (CanThrow 'MLSNotEnabled
:> ("public-keys"
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> (QueryParam'
'[Optional, Strict]
"format"
MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Public keys"
(MLSKeysByPurpose
(MLSKeys SomeKey))]
(MLSKeysByPurpose
(MLSKeys
SomeKey))))))))))))
:<|> (CustomBackendAPI
:<|> ((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow 'LegalHoldServiceBadResponse
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> Get
'[JSON]
ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary "Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> (Capture
"uid" (Id 'User)
:> Get
'[JSON]
UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary "Consent to legal hold"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow 'InvalidOperation
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'UserLegalHoldIllegalOperation
:> (CanThrow
'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary
"Request legal hold device"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary
"Disable legal hold for user"
:> (CanThrow
AuthenticationError
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary
"Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get
'[JSON]
TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture
"uid" (Id 'User)
:> Get
'[JSON]
TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow
'BulkGetMemberLimitExceeded
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional,
Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (ReqBody
'[JSON]
UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TooManyTeamMembers
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary
"Remove an existing team member"
:> (CanThrow
AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary
"Remove an existing team member"
:> (Until 'V4
:> (CanThrow
AuthenticationError
:> (CanThrow
'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary
"Update an existing team member"
:> (CanThrow
'AccessDenied
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow
'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI)))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
((Named
"post-otr-message-unqualified"
(Summary
"Post an encrypted message to a conversation (accepts JSON or Protobuf)"
:> (Description PostOtrDescriptionUnqualified
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> ("conversations"
:> (Capture' '[] "cnv" (Id 'Conversation)
:> ("otr"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON, Proto] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond
412 "Missing clients" ClientMismatch,
Respond 201 "Message sent" ClientMismatch]
(PostOtrResponse ClientMismatch))))))))))))
:<|> (Named
"post-otr-broadcast-unqualified"
(Summary
"Broadcast an encrypted message to all team members and all contacts (accepts JSON or Protobuf)"
:> (Description PostOtrDescriptionUnqualified
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> (CanThrow 'TeamNotFound
:> (CanThrow 'BroadcastLimitExceeded
:> (CanThrow 'NonBindingTeam
:> ("broadcast"
:> ("otr"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam
"report_missing" ReportMissing
:> (ReqBody '[JSON, Proto] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
ClientMismatch,
Respond
201
"Message sent"
ClientMismatch]
(PostOtrResponse
ClientMismatch))))))))))))))
:<|> (Named
"post-proteus-message"
(Summary
"Post an encrypted message to a conversation (accepts only Protobuf)"
:> (Description PostOtrDescription
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> ("conversations"
:> (QualifiedCapture' '[] "cnv" (Id 'Conversation)
:> ("proteus"
:> ("messages"
:> (ReqBody
'[Proto] (RawProto QualifiedNewOtrMessage)
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond
412
"Missing clients"
MessageSendingStatus,
Respond
201
"Message sent"
MessageSendingStatus]
(Either
(MessageNotSent MessageSendingStatus)
MessageSendingStatus))))))))))
:<|> Named
"post-proteus-broadcast"
(Summary
"Post an encrypted message to all team members and all contacts (accepts only Protobuf)"
:> (Description PostOtrDescription
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant 'ZAuthConn '[Required, Strict]
:> (CanThrow 'TeamNotFound
:> (CanThrow 'BroadcastLimitExceeded
:> (CanThrow 'NonBindingTeam
:> ("broadcast"
:> ("proteus"
:> ("messages"
:> (ReqBody
'[Proto] QualifiedNewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse
'ConvNotFound,
ErrorResponse
'UnknownClient,
ErrorResponse
'MissingLegalholdConsentOldClients,
ErrorResponse
'MissingLegalholdConsent,
Respond
412
"Missing clients"
MessageSendingStatus,
Respond
201
"Message sent"
MessageSendingStatus]
(Either
(MessageNotSent
MessageSendingStatus)
MessageSendingStatus)))))))))))))))
:<|> ((Named
"post-bot-message-unqualified"
(ZBot
:> (ZConversation
:> (CanThrow 'ConvNotFound
:> ("bot"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse 'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond 412 "Missing clients" ClientMismatch,
Respond 201 "Message sent" ClientMismatch]
(PostOtrResponse ClientMismatch)))))))))
:<|> Named
"get-bot-conversation"
(CanThrow 'AccessDenied
:> (CanThrow 'ConvNotFound
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("bot"
:> ("conversation"
:> (ZBot
:> (ZConversation
:> Get '[JSON] BotConvView))))))))))
:<|> (TeamAPI
:<|> ((Named
'("get", SSOConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for sso"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig)))))))))))
:<|> ((Named
'("get", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))
:<|> Named
'("put", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany
'[ 'ActionDenied
'RemoveConversationMember,
'CannotEnableLegalHoldServiceLargeTeam,
'LegalHoldNotEnabled,
'LegalHoldDisableUnimplemented,
'LegalHoldServiceNotRegistered,
'UserLegalHoldIllegalOperation,
'LegalHoldCouldNotBlockConnections]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> (ReqBody
'[JSON]
(Feature
LegalholdConfig)
:> Put
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))))))
:<|> ((Named
'("get", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))
:<|> Named
'("put", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany '[]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))))))
:<|> (SearchVisibilityGet
:<|> (SearchVisibilitySet
:<|> (Named
'("get", ValidateSAMLEmailsConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for validateSAMLemails"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("features"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig)))))))))))
:<|> (Named
'("get", DigitalSignaturesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for digitalSignatures"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))
:<|> ((Named
'("get", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig)))))))))))
:<|> Named
'("put", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> (ReqBody
'[JSON]
(Feature
AppLockConfig)
:> Put
'[JSON]
(LockableFeature
AppLockConfig)))))))))))))))
:<|> ((Named
'("get",
FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))
:<|> Named
'("put",
FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> (ReqBody
'[JSON]
(Feature
FileSharingConfig)
:> Put
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))))))
:<|> (Named
'("get",
ClassifiedDomainsConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for classifiedDomains"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig)))))))))))
:<|> ((Named
'("get",
ConferenceCallingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))
:<|> Named
'("put",
ConferenceCallingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> (ReqBody
'[JSON]
(Feature
ConferenceCallingConfig)
:> Put
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))))))
:<|> ((Named
'("get",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))
:<|> Named
'("put",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> (ReqBody
'[JSON]
(Feature
SelfDeletingMessagesConfig)
:> Put
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))))))
:<|> ((Named
'("get",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))
:<|> Named
'("put",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> (ReqBody
'[JSON]
(Feature
GuestLinksConfig)
:> Put
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))))))
:<|> ((Named
'("get",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))
:<|> Named
'("put",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> (ReqBody
'[JSON]
(Feature
SndFactorPasswordChallengeConfig)
:> Put
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))))))
:<|> ((Named
'("get",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig))))))))))))
:<|> Named
'("put",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> (ReqBody
'[JSON]
(Feature
MLSConfig)
:> Put
'[JSON]
(LockableFeature
MLSConfig))))))))))))))))
:<|> ((Named
'("get",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> Get
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))
:<|> Named
'("put",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> (ReqBody
'[JSON]
(Feature
ExposeInvitationURLsToTeamAdminConfig)
:> Put
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))))))
:<|> ((Named
'("get",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))
:<|> Named
'("put",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityInboundConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))))))
:<|> ((Named
'("get",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> Get
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))
:<|> Named
'("put",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> (ReqBody
'[JSON]
(Feature
OutlookCalIntegrationConfig)
:> Put
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))))))
:<|> (Named
'("get",
MlsE2EIdConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> Get
'[JSON]
(LockableFeature
MlsE2EIdConfig))))))))))))
:<|> (Named
"put-MlsE2EIdConfig@v5"
(From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> (Named
'("put",
MlsE2EIdConfig)
(From
'V6
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> ((Named
'("get",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> Get
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))
:<|> Named
'("put",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> (ReqBody
'[JSON]
(Feature
MlsMigrationConfig)
:> Put
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))))))
:<|> ((Named
'("get",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> Get
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))
:<|> Named
'("put",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> (ReqBody
'[JSON]
(Feature
EnforceFileDownloadLocationConfig)
:> Put
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))))))
:<|> (Named
'("get",
LimitedEventFanoutConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for limitedEventFanout"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("limitedEventFanout"
:> Get
'[JSON]
(LockableFeature
LimitedEventFanoutConfig))))))))))))
:<|> (AllTeamFeaturesUserGet
:<|> (AllTeamFeaturesTeamGet
:<|> ((Named
'("get-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))
:<|> (Named
'("put-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `PUT /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))))
:<|> (Named
'("get-deprecated",
ValidateSAMLEmailsConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/validateSAMLemails` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validate-saml-emails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))))
:<|> Named
'("get-deprecated",
DigitalSignaturesConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/digitalSignatures` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digital-signatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))))))
:<|> (Named
'("get-config",
LegalholdConfig)
(Summary
"[deprecated] Get feature config for feature legalhold"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig))))))))))
:<|> (Named
'("get-config",
SSOConfig)
(Summary
"[deprecated] Get feature config for feature sso"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig))))))))))
:<|> (Named
'("get-config",
SearchVisibilityAvailableConfig)
(Summary
"[deprecated] Get feature config for feature searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))
:<|> (Named
'("get-config",
ValidateSAMLEmailsConfig)
(Summary
"[deprecated] Get feature config for feature validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))
:<|> (Named
'("get-config",
DigitalSignaturesConfig)
(Summary
"[deprecated] Get feature config for feature digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig))))))))))
:<|> (Named
'("get-config",
AppLockConfig)
(Summary
"[deprecated] Get feature config for feature appLock"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig))))))))))
:<|> (Named
'("get-config",
FileSharingConfig)
(Summary
"[deprecated] Get feature config for feature fileSharing"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig))))))))))
:<|> (Named
'("get-config",
ClassifiedDomainsConfig)
(Summary
"[deprecated] Get feature config for feature classifiedDomains"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig))))))))))
:<|> (Named
'("get-config",
ConferenceCallingConfig)
(Summary
"[deprecated] Get feature config for feature conferenceCalling"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig))))))))))
:<|> (Named
'("get-config",
SelfDeletingMessagesConfig)
(Summary
"[deprecated] Get feature config for feature selfDeletingMessages"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig))))))))))
:<|> (Named
'("get-config",
GuestLinksConfig)
(Summary
"[deprecated] Get feature config for feature conversationGuestLinks"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig))))))))))
:<|> (Named
'("get-config",
SndFactorPasswordChallengeConfig)
(Summary
"[deprecated] Get feature config for feature sndFactorPasswordChallenge"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig))))))))))
:<|> Named
'("get-config",
MLSConfig)
(Summary
"[deprecated] Get feature config for feature mls"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig)))))))))))))))))))))))))))))))))))))))))))))))))
:<|> ((Named
"mls-message"
("mls"
:> (Summary "Post an MLS message"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("messages"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
Message)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Message sent"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))
:<|> (Named
"mls-commit-bundle"
("mls"
:> (Summary "Post a MLS CommitBundle"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow
'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
'MLSWelcomeMismatch
:> (CanThrow
'MLSLegalholdIncompatible
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("commit-bundles"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
CommitBundle)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Commit accepted and forwarded"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))))
:<|> Named
"mls-public-keys"
("mls"
:> (Summary
"Get public keys used by the backend to sign external proposals"
:> (Description
"The format of the returned key is determined by the `format` query parameter:\n - raw (default): base64-encoded raw public keys\n - jwk: keys are nested objects in JWK format."
:> (From 'V5
:> (CanThrow 'MLSNotEnabled
:> ("public-keys"
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (QueryParam'
'[Optional, Strict]
"format"
MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Public keys"
(MLSKeysByPurpose
(MLSKeys
SomeKey))]
(MLSKeysByPurpose
(MLSKeys
SomeKey))))))))))))
:<|> (CustomBackendAPI
:<|> ((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow
'LegalHoldServiceBadResponse
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> Get
'[JSON]
ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary
"Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow
('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id 'User)
:> Get
'[JSON]
UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary
"Consent to legal hold"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'InvalidOperation
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'UserLegalHoldIllegalOperation
:> (CanThrow
'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary
"Request legal hold device"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary
"Disable legal hold for user"
:> (CanThrow
AuthenticationError
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary
"Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (QueryParam'
'[Optional,
Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get
'[JSON]
TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("members"
:> (Capture
"uid"
(Id 'User)
:> Get
'[JSON]
TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary
"Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow
'BulkGetMemberLimitExceeded
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional,
Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (ReqBody
'[JSON]
UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary
"Add a new team member"
:> (Until 'V4
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'NoAddToBinding
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TooManyTeamMembers
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary
"Remove an existing team member"
:> (CanThrow
AuthenticationError
:> (CanThrow
'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary
"Remove an existing team member"
:> (Until 'V4
:> (CanThrow
AuthenticationError
:> (CanThrow
'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary
"Update an existing team member"
:> (CanThrow
'AccessDenied
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow
'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
forall api1 (r :: EffectRow) api2.
API api1 r -> API api2 r -> API (api1 :<|> api2) r
<@> API
(Named
"post-bot-message-unqualified"
(ZBot
:> (ZConversation
:> (CanThrow 'ConvNotFound
:> ("bot"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound, ErrorResponse 'UnknownClient,
ErrorResponse 'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond 412 "Missing clients" ClientMismatch,
Respond 201 "Message sent" ClientMismatch]
(PostOtrResponse ClientMismatch)))))))))
:<|> Named
"get-bot-conversation"
(CanThrow 'AccessDenied
:> (CanThrow 'ConvNotFound
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("bot"
:> ("conversation"
:> (ZBot :> (ZConversation :> Get '[JSON] BotConvView))))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
API BotAPI GalleyEffects
botAPI
API
(Named
"post-bot-message-unqualified"
(ZBot
:> (ZConversation
:> (CanThrow 'ConvNotFound
:> ("bot"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound, ErrorResponse 'UnknownClient,
ErrorResponse 'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond 412 "Missing clients" ClientMismatch,
Respond 201 "Message sent" ClientMismatch]
(PostOtrResponse ClientMismatch)))))))))
:<|> Named
"get-bot-conversation"
(CanThrow 'AccessDenied
:> (CanThrow 'ConvNotFound
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("bot"
:> ("conversation"
:> (ZBot :> (ZConversation :> Get '[JSON] BotConvView))))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
(TeamAPI
:<|> ((Named
'("get", SSOConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for sso"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("sso"
:> Get
'[JSON]
(LockableFeature SSOConfig)))))))))))
:<|> ((Named
'("get", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))
:<|> Named
'("put", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany
'[ 'ActionDenied
'RemoveConversationMember,
'CannotEnableLegalHoldServiceLargeTeam,
'LegalHoldNotEnabled,
'LegalHoldDisableUnimplemented,
'LegalHoldServiceNotRegistered,
'UserLegalHoldIllegalOperation,
'LegalHoldCouldNotBlockConnections]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> (ReqBody
'[JSON]
(Feature
LegalholdConfig)
:> Put
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))))))
:<|> ((Named
'("get", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))
:<|> Named
'("put", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany '[]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))))))
:<|> (SearchVisibilityGet
:<|> (SearchVisibilitySet
:<|> (Named
'("get", ValidateSAMLEmailsConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for validateSAMLemails"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig)))))))))))
:<|> (Named
'("get", DigitalSignaturesConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for digitalSignatures"
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("features"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))
:<|> ((Named
'("get", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary "Get config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("features"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig)))))))))))
:<|> Named
'("put", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Put config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> (ReqBody
'[JSON]
(Feature
AppLockConfig)
:> Put
'[JSON]
(LockableFeature
AppLockConfig)))))))))))))))
:<|> ((Named
'("get", FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))
:<|> Named
'("put", FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Put config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> (ReqBody
'[JSON]
(Feature
FileSharingConfig)
:> Put
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))))))
:<|> (Named
'("get",
ClassifiedDomainsConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for classifiedDomains"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig)))))))))))
:<|> ((Named
'("get",
ConferenceCallingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))
:<|> Named
'("put",
ConferenceCallingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> (ReqBody
'[JSON]
(Feature
ConferenceCallingConfig)
:> Put
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))))))
:<|> ((Named
'("get",
SelfDeletingMessagesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))
:<|> Named
'("put",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> (ReqBody
'[JSON]
(Feature
SelfDeletingMessagesConfig)
:> Put
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))))))
:<|> ((Named
'("get",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))
:<|> Named
'("put",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> (ReqBody
'[JSON]
(Feature
GuestLinksConfig)
:> Put
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))))))
:<|> ((Named
'("get",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))
:<|> Named
'("put",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> (ReqBody
'[JSON]
(Feature
SndFactorPasswordChallengeConfig)
:> Put
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))))))
:<|> ((Named
'("get",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig))))))))))))
:<|> Named
'("put",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> (ReqBody
'[JSON]
(Feature
MLSConfig)
:> Put
'[JSON]
(LockableFeature
MLSConfig))))))))))))))))
:<|> ((Named
'("get",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> Get
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))
:<|> Named
'("put",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> (ReqBody
'[JSON]
(Feature
ExposeInvitationURLsToTeamAdminConfig)
:> Put
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))))))
:<|> ((Named
'("get",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))
:<|> Named
'("put",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityInboundConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))))))
:<|> ((Named
'("get",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> Get
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))
:<|> Named
'("put",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> (ReqBody
'[JSON]
(Feature
OutlookCalIntegrationConfig)
:> Put
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))))))
:<|> (Named
'("get",
MlsE2EIdConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> Get
'[JSON]
(LockableFeature
MlsE2EIdConfig))))))))))))
:<|> (Named
"put-MlsE2EIdConfig@v5"
(From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> (Named
'("put",
MlsE2EIdConfig)
(From
'V6
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> ((Named
'("get",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> Get
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))
:<|> Named
'("put",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> (ReqBody
'[JSON]
(Feature
MlsMigrationConfig)
:> Put
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))))))
:<|> ((Named
'("get",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> Get
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))
:<|> Named
'("put",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> (ReqBody
'[JSON]
(Feature
EnforceFileDownloadLocationConfig)
:> Put
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))))))
:<|> (Named
'("get",
LimitedEventFanoutConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for limitedEventFanout"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("limitedEventFanout"
:> Get
'[JSON]
(LockableFeature
LimitedEventFanoutConfig))))))))))))
:<|> (AllTeamFeaturesUserGet
:<|> (AllTeamFeaturesTeamGet
:<|> ((Named
'("get-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))
:<|> (Named
'("put-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `PUT /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))))
:<|> (Named
'("get-deprecated",
ValidateSAMLEmailsConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/validateSAMLemails` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validate-saml-emails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))))
:<|> Named
'("get-deprecated",
DigitalSignaturesConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/digitalSignatures` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digital-signatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))))))
:<|> (Named
'("get-config",
LegalholdConfig)
(Summary
"[deprecated] Get feature config for feature legalhold"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig))))))))))
:<|> (Named
'("get-config",
SSOConfig)
(Summary
"[deprecated] Get feature config for feature sso"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig))))))))))
:<|> (Named
'("get-config",
SearchVisibilityAvailableConfig)
(Summary
"[deprecated] Get feature config for feature searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))
:<|> (Named
'("get-config",
ValidateSAMLEmailsConfig)
(Summary
"[deprecated] Get feature config for feature validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))
:<|> (Named
'("get-config",
DigitalSignaturesConfig)
(Summary
"[deprecated] Get feature config for feature digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig))))))))))
:<|> (Named
'("get-config",
AppLockConfig)
(Summary
"[deprecated] Get feature config for feature appLock"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig))))))))))
:<|> (Named
'("get-config",
FileSharingConfig)
(Summary
"[deprecated] Get feature config for feature fileSharing"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig))))))))))
:<|> (Named
'("get-config",
ClassifiedDomainsConfig)
(Summary
"[deprecated] Get feature config for feature classifiedDomains"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig))))))))))
:<|> (Named
'("get-config",
ConferenceCallingConfig)
(Summary
"[deprecated] Get feature config for feature conferenceCalling"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig))))))))))
:<|> (Named
'("get-config",
SelfDeletingMessagesConfig)
(Summary
"[deprecated] Get feature config for feature selfDeletingMessages"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig))))))))))
:<|> (Named
'("get-config",
GuestLinksConfig)
(Summary
"[deprecated] Get feature config for feature conversationGuestLinks"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig))))))))))
:<|> (Named
'("get-config",
SndFactorPasswordChallengeConfig)
(Summary
"[deprecated] Get feature config for feature sndFactorPasswordChallenge"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig))))))))))
:<|> Named
'("get-config",
MLSConfig)
(Summary
"[deprecated] Get feature config for feature mls"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig)))))))))))))))))))))))))))))))))))))))))))))))))
:<|> ((Named
"mls-message"
("mls"
:> (Summary "Post an MLS message"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow 'MLSClientSenderUserMismatch
:> (CanThrow 'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow 'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("messages"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
Message)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Message sent"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))
:<|> (Named
"mls-commit-bundle"
("mls"
:> (Summary "Post a MLS CommitBundle"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
'MLSWelcomeMismatch
:> (CanThrow
'MLSLegalholdIncompatible
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("commit-bundles"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
CommitBundle)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Commit accepted and forwarded"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))))
:<|> Named
"mls-public-keys"
("mls"
:> (Summary
"Get public keys used by the backend to sign external proposals"
:> (Description
"The format of the returned key is determined by the `format` query parameter:\n - raw (default): base64-encoded raw public keys\n - jwk: keys are nested objects in JWK format."
:> (From 'V5
:> (CanThrow 'MLSNotEnabled
:> ("public-keys"
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> (QueryParam'
'[Optional, Strict]
"format"
MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Public keys"
(MLSKeysByPurpose
(MLSKeys SomeKey))]
(MLSKeysByPurpose
(MLSKeys SomeKey))))))))))))
:<|> (CustomBackendAPI
:<|> ((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow 'LegalHoldServiceBadResponse
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> Get
'[JSON]
ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary "Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON]
UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary "Consent to legal hold"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow 'InvalidOperation
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow
'UserLegalHoldIllegalOperation
:> (CanThrow
'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary "Request legal hold device"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary
"Disable legal hold for user"
:> (CanThrow
AuthenticationError
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary
"Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1 HardTruncationLimit Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get
'[JSON]
TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON]
TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow 'BulkGetMemberLimitExceeded
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional,
Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (ReqBody
'[JSON]
UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow 'NotATeamMember
:> (CanThrow 'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TooManyTeamMembers
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary
"Remove an existing team member"
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary
"Remove an existing team member"
:> (Until 'V4
:> (CanThrow
AuthenticationError
:> (CanThrow
'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary
"Update an existing team member"
:> (CanThrow
'AccessDenied
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow
'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
((Named
"post-bot-message-unqualified"
(ZBot
:> (ZConversation
:> (CanThrow 'ConvNotFound
:> ("bot"
:> ("messages"
:> (QueryParam "ignore_missing" IgnoreMissing
:> (QueryParam "report_missing" ReportMissing
:> (ReqBody '[JSON] NewOtrMessage
:> MultiVerb
'POST
'[JSON]
'[ErrorResponse 'ConvNotFound,
ErrorResponse 'UnknownClient,
ErrorResponse 'MissingLegalholdConsentOldClients,
ErrorResponse 'MissingLegalholdConsent,
Respond 412 "Missing clients" ClientMismatch,
Respond 201 "Message sent" ClientMismatch]
(PostOtrResponse ClientMismatch)))))))))
:<|> Named
"get-bot-conversation"
(CanThrow 'AccessDenied
:> (CanThrow 'ConvNotFound
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("bot"
:> ("conversation"
:> (ZBot
:> (ZConversation :> Get '[JSON] BotConvView))))))))))
:<|> (TeamAPI
:<|> ((Named
'("get", SSOConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for sso"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("sso"
:> Get
'[JSON]
(LockableFeature SSOConfig)))))))))))
:<|> ((Named
'("get", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))
:<|> Named
'("put", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany
'[ 'ActionDenied
'RemoveConversationMember,
'CannotEnableLegalHoldServiceLargeTeam,
'LegalHoldNotEnabled,
'LegalHoldDisableUnimplemented,
'LegalHoldServiceNotRegistered,
'UserLegalHoldIllegalOperation,
'LegalHoldCouldNotBlockConnections]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> (ReqBody
'[JSON]
(Feature
LegalholdConfig)
:> Put
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))))))
:<|> ((Named
'("get", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))
:<|> Named
'("put", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany '[]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))))))
:<|> (SearchVisibilityGet
:<|> (SearchVisibilitySet
:<|> (Named
'("get", ValidateSAMLEmailsConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for validateSAMLemails"
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("features"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig)))))))))))
:<|> (Named
'("get", DigitalSignaturesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for digitalSignatures"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("features"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))
:<|> ((Named
'("get", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig)))))))))))
:<|> Named
'("put", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Put config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> (ReqBody
'[JSON]
(Feature
AppLockConfig)
:> Put
'[JSON]
(LockableFeature
AppLockConfig)))))))))))))))
:<|> ((Named
'("get", FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))
:<|> Named
'("put",
FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> (ReqBody
'[JSON]
(Feature
FileSharingConfig)
:> Put
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))))))
:<|> (Named
'("get",
ClassifiedDomainsConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for classifiedDomains"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig)))))))))))
:<|> ((Named
'("get",
ConferenceCallingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))
:<|> Named
'("put",
ConferenceCallingConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> (ReqBody
'[JSON]
(Feature
ConferenceCallingConfig)
:> Put
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))))))
:<|> ((Named
'("get",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))
:<|> Named
'("put",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> (ReqBody
'[JSON]
(Feature
SelfDeletingMessagesConfig)
:> Put
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))))))
:<|> ((Named
'("get",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))
:<|> Named
'("put",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> (ReqBody
'[JSON]
(Feature
GuestLinksConfig)
:> Put
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))))))
:<|> ((Named
'("get",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))
:<|> Named
'("put",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> (ReqBody
'[JSON]
(Feature
SndFactorPasswordChallengeConfig)
:> Put
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))))))
:<|> ((Named
'("get",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig))))))))))))
:<|> Named
'("put",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> (ReqBody
'[JSON]
(Feature
MLSConfig)
:> Put
'[JSON]
(LockableFeature
MLSConfig))))))))))))))))
:<|> ((Named
'("get",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> Get
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))
:<|> Named
'("put",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> (ReqBody
'[JSON]
(Feature
ExposeInvitationURLsToTeamAdminConfig)
:> Put
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))))))
:<|> ((Named
'("get",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))
:<|> Named
'("put",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityInboundConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))))))
:<|> ((Named
'("get",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> Get
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))
:<|> Named
'("put",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> (ReqBody
'[JSON]
(Feature
OutlookCalIntegrationConfig)
:> Put
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))))))
:<|> (Named
'("get",
MlsE2EIdConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> Get
'[JSON]
(LockableFeature
MlsE2EIdConfig))))))))))))
:<|> (Named
"put-MlsE2EIdConfig@v5"
(From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> (Named
'("put",
MlsE2EIdConfig)
(From
'V6
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> ((Named
'("get",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> Get
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))
:<|> Named
'("put",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> (ReqBody
'[JSON]
(Feature
MlsMigrationConfig)
:> Put
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))))))
:<|> ((Named
'("get",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> Get
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))
:<|> Named
'("put",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> (ReqBody
'[JSON]
(Feature
EnforceFileDownloadLocationConfig)
:> Put
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))))))
:<|> (Named
'("get",
LimitedEventFanoutConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for limitedEventFanout"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("limitedEventFanout"
:> Get
'[JSON]
(LockableFeature
LimitedEventFanoutConfig))))))))))))
:<|> (AllTeamFeaturesUserGet
:<|> (AllTeamFeaturesTeamGet
:<|> ((Named
'("get-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))
:<|> (Named
'("put-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `PUT /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))))
:<|> (Named
'("get-deprecated",
ValidateSAMLEmailsConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/validateSAMLemails` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validate-saml-emails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))))
:<|> Named
'("get-deprecated",
DigitalSignaturesConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/digitalSignatures` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digital-signatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))))))
:<|> (Named
'("get-config",
LegalholdConfig)
(Summary
"[deprecated] Get feature config for feature legalhold"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig))))))))))
:<|> (Named
'("get-config",
SSOConfig)
(Summary
"[deprecated] Get feature config for feature sso"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig))))))))))
:<|> (Named
'("get-config",
SearchVisibilityAvailableConfig)
(Summary
"[deprecated] Get feature config for feature searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))
:<|> (Named
'("get-config",
ValidateSAMLEmailsConfig)
(Summary
"[deprecated] Get feature config for feature validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))
:<|> (Named
'("get-config",
DigitalSignaturesConfig)
(Summary
"[deprecated] Get feature config for feature digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig))))))))))
:<|> (Named
'("get-config",
AppLockConfig)
(Summary
"[deprecated] Get feature config for feature appLock"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig))))))))))
:<|> (Named
'("get-config",
FileSharingConfig)
(Summary
"[deprecated] Get feature config for feature fileSharing"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig))))))))))
:<|> (Named
'("get-config",
ClassifiedDomainsConfig)
(Summary
"[deprecated] Get feature config for feature classifiedDomains"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig))))))))))
:<|> (Named
'("get-config",
ConferenceCallingConfig)
(Summary
"[deprecated] Get feature config for feature conferenceCalling"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig))))))))))
:<|> (Named
'("get-config",
SelfDeletingMessagesConfig)
(Summary
"[deprecated] Get feature config for feature selfDeletingMessages"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig))))))))))
:<|> (Named
'("get-config",
GuestLinksConfig)
(Summary
"[deprecated] Get feature config for feature conversationGuestLinks"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig))))))))))
:<|> (Named
'("get-config",
SndFactorPasswordChallengeConfig)
(Summary
"[deprecated] Get feature config for feature sndFactorPasswordChallenge"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig))))))))))
:<|> Named
'("get-config",
MLSConfig)
(Summary
"[deprecated] Get feature config for feature mls"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig)))))))))))))))))))))))))))))))))))))))))))))))))
:<|> ((Named
"mls-message"
("mls"
:> (Summary "Post an MLS message"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("messages"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
Message)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Message sent"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))
:<|> (Named
"mls-commit-bundle"
("mls"
:> (Summary "Post a MLS CommitBundle"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
'MLSWelcomeMismatch
:> (CanThrow
'MLSLegalholdIncompatible
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("commit-bundles"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
CommitBundle)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Commit accepted and forwarded"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))))
:<|> Named
"mls-public-keys"
("mls"
:> (Summary
"Get public keys used by the backend to sign external proposals"
:> (Description
"The format of the returned key is determined by the `format` query parameter:\n - raw (default): base64-encoded raw public keys\n - jwk: keys are nested objects in JWK format."
:> (From 'V5
:> (CanThrow 'MLSNotEnabled
:> ("public-keys"
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> (QueryParam'
'[Optional, Strict]
"format"
MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Public keys"
(MLSKeysByPurpose
(MLSKeys SomeKey))]
(MLSKeysByPurpose
(MLSKeys
SomeKey))))))))))))
:<|> (CustomBackendAPI
:<|> ((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow 'LegalHoldServiceBadResponse
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> Get
'[JSON]
ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary "Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> (Capture
"uid" (Id 'User)
:> Get
'[JSON]
UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary "Consent to legal hold"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow 'InvalidOperation
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'UserLegalHoldIllegalOperation
:> (CanThrow
'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary
"Request legal hold device"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary
"Disable legal hold for user"
:> (CanThrow
AuthenticationError
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary
"Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get
'[JSON]
TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture
"uid" (Id 'User)
:> Get
'[JSON]
TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow
'BulkGetMemberLimitExceeded
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional,
Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (ReqBody
'[JSON]
UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow
'NotATeamMember
:> (CanThrow
'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TooManyTeamMembers
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary
"Remove an existing team member"
:> (CanThrow
AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary
"Remove an existing team member"
:> (Until 'V4
:> (CanThrow
AuthenticationError
:> (CanThrow
'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary
"Update an existing team member"
:> (CanThrow
'AccessDenied
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow
'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI)))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
forall api1 (r :: EffectRow) api2.
API api1 r -> API api2 r -> API (api1 :<|> api2) r
<@> API
TeamAPI
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
API TeamAPI GalleyEffects
teamAPI
API
TeamAPI
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
((Named
'("get", SSOConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for sso"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("sso"
:> Get '[JSON] (LockableFeature SSOConfig)))))))))))
:<|> ((Named
'("get", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))
:<|> Named
'("put", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany
'[ 'ActionDenied 'RemoveConversationMember,
'CannotEnableLegalHoldServiceLargeTeam,
'LegalHoldNotEnabled,
'LegalHoldDisableUnimplemented,
'LegalHoldServiceNotRegistered,
'UserLegalHoldIllegalOperation,
'LegalHoldCouldNotBlockConnections]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> (ReqBody
'[JSON]
(Feature LegalholdConfig)
:> Put
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))))))
:<|> ((Named
'("get", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))
:<|> Named
'("put", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany '[]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))))))
:<|> (SearchVisibilityGet
:<|> (SearchVisibilitySet
:<|> (Named
'("get", ValidateSAMLEmailsConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for validateSAMLemails"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig)))))))))))
:<|> (Named
'("get", DigitalSignaturesConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for digitalSignatures"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))
:<|> ((Named
'("get", AppLockConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for appLock"
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("features"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig)))))))))))
:<|> Named
'("put", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary "Put config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> (ReqBody
'[JSON]
(Feature
AppLockConfig)
:> Put
'[JSON]
(LockableFeature
AppLockConfig)))))))))))))))
:<|> ((Named
'("get", FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("features"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))
:<|> Named
'("put", FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Put config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> (ReqBody
'[JSON]
(Feature
FileSharingConfig)
:> Put
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))))))
:<|> (Named
'("get", ClassifiedDomainsConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for classifiedDomains"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig)))))))))))
:<|> ((Named
'("get",
ConferenceCallingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))
:<|> Named
'("put",
ConferenceCallingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> (ReqBody
'[JSON]
(Feature
ConferenceCallingConfig)
:> Put
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))))))
:<|> ((Named
'("get",
SelfDeletingMessagesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))
:<|> Named
'("put",
SelfDeletingMessagesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> (ReqBody
'[JSON]
(Feature
SelfDeletingMessagesConfig)
:> Put
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))))))
:<|> ((Named
'("get",
GuestLinksConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))
:<|> Named
'("put",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> (ReqBody
'[JSON]
(Feature
GuestLinksConfig)
:> Put
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))))))
:<|> ((Named
'("get",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))
:<|> Named
'("put",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> (ReqBody
'[JSON]
(Feature
SndFactorPasswordChallengeConfig)
:> Put
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))))))
:<|> ((Named
'("get",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig))))))))))))
:<|> Named
'("put",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> (ReqBody
'[JSON]
(Feature
MLSConfig)
:> Put
'[JSON]
(LockableFeature
MLSConfig))))))))))))))))
:<|> ((Named
'("get",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> Get
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))
:<|> Named
'("put",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> (ReqBody
'[JSON]
(Feature
ExposeInvitationURLsToTeamAdminConfig)
:> Put
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))))))
:<|> ((Named
'("get",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))
:<|> Named
'("put",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityInboundConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))))))
:<|> ((Named
'("get",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> Get
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))
:<|> Named
'("put",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> (ReqBody
'[JSON]
(Feature
OutlookCalIntegrationConfig)
:> Put
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))))))
:<|> (Named
'("get",
MlsE2EIdConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> Get
'[JSON]
(LockableFeature
MlsE2EIdConfig))))))))))))
:<|> (Named
"put-MlsE2EIdConfig@v5"
(From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> (Named
'("put",
MlsE2EIdConfig)
(From
'V6
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> ((Named
'("get",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> Get
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))
:<|> Named
'("put",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> (ReqBody
'[JSON]
(Feature
MlsMigrationConfig)
:> Put
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))))))
:<|> ((Named
'("get",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> Get
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))
:<|> Named
'("put",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> (ReqBody
'[JSON]
(Feature
EnforceFileDownloadLocationConfig)
:> Put
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))))))
:<|> (Named
'("get",
LimitedEventFanoutConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for limitedEventFanout"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("limitedEventFanout"
:> Get
'[JSON]
(LockableFeature
LimitedEventFanoutConfig))))))))))))
:<|> (AllTeamFeaturesUserGet
:<|> (AllTeamFeaturesTeamGet
:<|> ((Named
'("get-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))
:<|> (Named
'("put-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `PUT /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))))
:<|> (Named
'("get-deprecated",
ValidateSAMLEmailsConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/validateSAMLemails` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validate-saml-emails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))))
:<|> Named
'("get-deprecated",
DigitalSignaturesConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/digitalSignatures` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digital-signatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))))))
:<|> (Named
'("get-config",
LegalholdConfig)
(Summary
"[deprecated] Get feature config for feature legalhold"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig))))))))))
:<|> (Named
'("get-config",
SSOConfig)
(Summary
"[deprecated] Get feature config for feature sso"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig))))))))))
:<|> (Named
'("get-config",
SearchVisibilityAvailableConfig)
(Summary
"[deprecated] Get feature config for feature searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))
:<|> (Named
'("get-config",
ValidateSAMLEmailsConfig)
(Summary
"[deprecated] Get feature config for feature validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))
:<|> (Named
'("get-config",
DigitalSignaturesConfig)
(Summary
"[deprecated] Get feature config for feature digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig))))))))))
:<|> (Named
'("get-config",
AppLockConfig)
(Summary
"[deprecated] Get feature config for feature appLock"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig))))))))))
:<|> (Named
'("get-config",
FileSharingConfig)
(Summary
"[deprecated] Get feature config for feature fileSharing"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig))))))))))
:<|> (Named
'("get-config",
ClassifiedDomainsConfig)
(Summary
"[deprecated] Get feature config for feature classifiedDomains"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig))))))))))
:<|> (Named
'("get-config",
ConferenceCallingConfig)
(Summary
"[deprecated] Get feature config for feature conferenceCalling"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig))))))))))
:<|> (Named
'("get-config",
SelfDeletingMessagesConfig)
(Summary
"[deprecated] Get feature config for feature selfDeletingMessages"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig))))))))))
:<|> (Named
'("get-config",
GuestLinksConfig)
(Summary
"[deprecated] Get feature config for feature conversationGuestLinks"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig))))))))))
:<|> (Named
'("get-config",
SndFactorPasswordChallengeConfig)
(Summary
"[deprecated] Get feature config for feature sndFactorPasswordChallenge"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig))))))))))
:<|> Named
'("get-config",
MLSConfig)
(Summary
"[deprecated] Get feature config for feature mls"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig)))))))))))))))))))))))))))))))))))))))))))))))))
:<|> ((Named
"mls-message"
("mls"
:> (Summary "Post an MLS message"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow 'MLSClientSenderUserMismatch
:> (CanThrow 'MLSCommitMissingReferences
:> (CanThrow 'MLSGroupConversationMismatch
:> (CanThrow 'MLSInvalidLeafNodeIndex
:> (CanThrow 'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("messages"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
Message)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Message sent"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))
:<|> (Named
"mls-commit-bundle"
("mls"
:> (Summary "Post a MLS CommitBundle"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow 'MLSClientSenderUserMismatch
:> (CanThrow 'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow 'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
'MLSWelcomeMismatch
:> (CanThrow
'MLSLegalholdIncompatible
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("commit-bundles"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
CommitBundle)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Commit accepted and forwarded"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))))
:<|> Named
"mls-public-keys"
("mls"
:> (Summary
"Get public keys used by the backend to sign external proposals"
:> (Description
"The format of the returned key is determined by the `format` query parameter:\n - raw (default): base64-encoded raw public keys\n - jwk: keys are nested objects in JWK format."
:> (From 'V5
:> (CanThrow 'MLSNotEnabled
:> ("public-keys"
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (QueryParam'
'[Optional, Strict]
"format"
MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Public keys"
(MLSKeysByPurpose
(MLSKeys SomeKey))]
(MLSKeysByPurpose
(MLSKeys SomeKey))))))))))))
:<|> (CustomBackendAPI
:<|> ((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow 'LegalHoldServiceBadResponse
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> Get
'[JSON]
ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary "Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON]
UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary "Consent to legal hold"
:> (CanThrow
('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'InvalidOperation
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow
'UserLegalHoldIllegalOperation
:> (CanThrow
'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary "Request legal hold device"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary
"Disable legal hold for user"
:> (CanThrow AuthenticationError
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary
"Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get '[JSON] TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON]
TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow 'BulkGetMemberLimitExceeded
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (ReqBody
'[JSON]
UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow 'NotATeamMember
:> (CanThrow 'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TooManyTeamMembers
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary "Remove an existing team member"
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary
"Remove an existing team member"
:> (Until 'V4
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary
"Update an existing team member"
:> (CanThrow 'AccessDenied
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow
'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI)))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
(TeamAPI
:<|> ((Named
'("get", SSOConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for sso"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("sso"
:> Get
'[JSON]
(LockableFeature SSOConfig)))))))))))
:<|> ((Named
'("get", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))
:<|> Named
'("put", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany
'[ 'ActionDenied
'RemoveConversationMember,
'CannotEnableLegalHoldServiceLargeTeam,
'LegalHoldNotEnabled,
'LegalHoldDisableUnimplemented,
'LegalHoldServiceNotRegistered,
'UserLegalHoldIllegalOperation,
'LegalHoldCouldNotBlockConnections]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> (ReqBody
'[JSON]
(Feature
LegalholdConfig)
:> Put
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))))))
:<|> ((Named
'("get", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))
:<|> Named
'("put", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany '[]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))))))
:<|> (SearchVisibilityGet
:<|> (SearchVisibilitySet
:<|> (Named
'("get", ValidateSAMLEmailsConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for validateSAMLemails"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig)))))))))))
:<|> (Named
'("get", DigitalSignaturesConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for digitalSignatures"
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("features"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))
:<|> ((Named
'("get", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary "Get config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("features"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig)))))))))))
:<|> Named
'("put", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Put config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> (ReqBody
'[JSON]
(Feature
AppLockConfig)
:> Put
'[JSON]
(LockableFeature
AppLockConfig)))))))))))))))
:<|> ((Named
'("get", FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))
:<|> Named
'("put", FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Put config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> (ReqBody
'[JSON]
(Feature
FileSharingConfig)
:> Put
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))))))
:<|> (Named
'("get",
ClassifiedDomainsConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for classifiedDomains"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig)))))))))))
:<|> ((Named
'("get",
ConferenceCallingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))
:<|> Named
'("put",
ConferenceCallingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> (ReqBody
'[JSON]
(Feature
ConferenceCallingConfig)
:> Put
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))))))
:<|> ((Named
'("get",
SelfDeletingMessagesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))
:<|> Named
'("put",
SelfDeletingMessagesConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> (ReqBody
'[JSON]
(Feature
SelfDeletingMessagesConfig)
:> Put
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))))))
:<|> ((Named
'("get",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))
:<|> Named
'("put",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> (ReqBody
'[JSON]
(Feature
GuestLinksConfig)
:> Put
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))))))
:<|> ((Named
'("get",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))
:<|> Named
'("put",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> (ReqBody
'[JSON]
(Feature
SndFactorPasswordChallengeConfig)
:> Put
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))))))
:<|> ((Named
'("get",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig))))))))))))
:<|> Named
'("put",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> (ReqBody
'[JSON]
(Feature
MLSConfig)
:> Put
'[JSON]
(LockableFeature
MLSConfig))))))))))))))))
:<|> ((Named
'("get",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> Get
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))
:<|> Named
'("put",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> (ReqBody
'[JSON]
(Feature
ExposeInvitationURLsToTeamAdminConfig)
:> Put
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))))))
:<|> ((Named
'("get",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))
:<|> Named
'("put",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityInboundConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))))))
:<|> ((Named
'("get",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> Get
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))
:<|> Named
'("put",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> (ReqBody
'[JSON]
(Feature
OutlookCalIntegrationConfig)
:> Put
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))))))
:<|> (Named
'("get",
MlsE2EIdConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> Get
'[JSON]
(LockableFeature
MlsE2EIdConfig))))))))))))
:<|> (Named
"put-MlsE2EIdConfig@v5"
(From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> (Named
'("put",
MlsE2EIdConfig)
(From
'V6
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> ((Named
'("get",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> Get
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))
:<|> Named
'("put",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> (ReqBody
'[JSON]
(Feature
MlsMigrationConfig)
:> Put
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))))))
:<|> ((Named
'("get",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> Get
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))
:<|> Named
'("put",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> (ReqBody
'[JSON]
(Feature
EnforceFileDownloadLocationConfig)
:> Put
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))))))
:<|> (Named
'("get",
LimitedEventFanoutConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for limitedEventFanout"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("limitedEventFanout"
:> Get
'[JSON]
(LockableFeature
LimitedEventFanoutConfig))))))))))))
:<|> (AllTeamFeaturesUserGet
:<|> (AllTeamFeaturesTeamGet
:<|> ((Named
'("get-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))
:<|> (Named
'("put-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `PUT /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))))
:<|> (Named
'("get-deprecated",
ValidateSAMLEmailsConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/validateSAMLemails` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validate-saml-emails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))))
:<|> Named
'("get-deprecated",
DigitalSignaturesConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/digitalSignatures` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digital-signatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))))))
:<|> (Named
'("get-config",
LegalholdConfig)
(Summary
"[deprecated] Get feature config for feature legalhold"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig))))))))))
:<|> (Named
'("get-config",
SSOConfig)
(Summary
"[deprecated] Get feature config for feature sso"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig))))))))))
:<|> (Named
'("get-config",
SearchVisibilityAvailableConfig)
(Summary
"[deprecated] Get feature config for feature searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))
:<|> (Named
'("get-config",
ValidateSAMLEmailsConfig)
(Summary
"[deprecated] Get feature config for feature validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))
:<|> (Named
'("get-config",
DigitalSignaturesConfig)
(Summary
"[deprecated] Get feature config for feature digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig))))))))))
:<|> (Named
'("get-config",
AppLockConfig)
(Summary
"[deprecated] Get feature config for feature appLock"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig))))))))))
:<|> (Named
'("get-config",
FileSharingConfig)
(Summary
"[deprecated] Get feature config for feature fileSharing"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig))))))))))
:<|> (Named
'("get-config",
ClassifiedDomainsConfig)
(Summary
"[deprecated] Get feature config for feature classifiedDomains"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig))))))))))
:<|> (Named
'("get-config",
ConferenceCallingConfig)
(Summary
"[deprecated] Get feature config for feature conferenceCalling"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig))))))))))
:<|> (Named
'("get-config",
SelfDeletingMessagesConfig)
(Summary
"[deprecated] Get feature config for feature selfDeletingMessages"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig))))))))))
:<|> (Named
'("get-config",
GuestLinksConfig)
(Summary
"[deprecated] Get feature config for feature conversationGuestLinks"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig))))))))))
:<|> (Named
'("get-config",
SndFactorPasswordChallengeConfig)
(Summary
"[deprecated] Get feature config for feature sndFactorPasswordChallenge"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig))))))))))
:<|> Named
'("get-config",
MLSConfig)
(Summary
"[deprecated] Get feature config for feature mls"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig)))))))))))))))))))))))))))))))))))))))))))))))))
:<|> ((Named
"mls-message"
("mls"
:> (Summary "Post an MLS message"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow 'MLSClientSenderUserMismatch
:> (CanThrow 'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow 'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("messages"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
Message)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Message sent"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))
:<|> (Named
"mls-commit-bundle"
("mls"
:> (Summary "Post a MLS CommitBundle"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow
'MLSClientSenderUserMismatch
:> (CanThrow
'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow
'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
'MLSWelcomeMismatch
:> (CanThrow
'MLSLegalholdIncompatible
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("commit-bundles"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
CommitBundle)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Commit accepted and forwarded"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))))
:<|> Named
"mls-public-keys"
("mls"
:> (Summary
"Get public keys used by the backend to sign external proposals"
:> (Description
"The format of the returned key is determined by the `format` query parameter:\n - raw (default): base64-encoded raw public keys\n - jwk: keys are nested objects in JWK format."
:> (From 'V5
:> (CanThrow 'MLSNotEnabled
:> ("public-keys"
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> (QueryParam'
'[Optional, Strict]
"format"
MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Public keys"
(MLSKeysByPurpose
(MLSKeys SomeKey))]
(MLSKeysByPurpose
(MLSKeys SomeKey))))))))))))
:<|> (CustomBackendAPI
:<|> ((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow 'LegalHoldServiceBadResponse
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> Get
'[JSON]
ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary "Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON]
UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary "Consent to legal hold"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow 'InvalidOperation
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow
'UserLegalHoldIllegalOperation
:> (CanThrow
'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary "Request legal hold device"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary
"Disable legal hold for user"
:> (CanThrow
AuthenticationError
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary
"Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1 HardTruncationLimit Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get
'[JSON]
TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON]
TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow 'BulkGetMemberLimitExceeded
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional,
Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (ReqBody
'[JSON]
UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow 'NotATeamMember
:> (CanThrow 'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TooManyTeamMembers
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary
"Remove an existing team member"
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary
"Remove an existing team member"
:> (Until 'V4
:> (CanThrow
AuthenticationError
:> (CanThrow
'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary
"Update an existing team member"
:> (CanThrow
'AccessDenied
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow
'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
forall api1 (r :: EffectRow) api2.
API api1 r -> API api2 r -> API (api1 :<|> api2) r
<@> API
(Named
'("get", SSOConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for sso"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("sso" :> Get '[JSON] (LockableFeature SSOConfig)))))))))))
:<|> ((Named
'("get", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature LegalholdConfig)))))))))))
:<|> Named
'("put", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany
'[ 'ActionDenied 'RemoveConversationMember,
'CannotEnableLegalHoldServiceLargeTeam,
'LegalHoldNotEnabled,
'LegalHoldDisableUnimplemented,
'LegalHoldServiceNotRegistered,
'UserLegalHoldIllegalOperation,
'LegalHoldCouldNotBlockConnections]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> (ReqBody
'[JSON]
(Feature LegalholdConfig)
:> Put
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))))))
:<|> ((Named
'("get", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))
:<|> Named
'("put", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany '[]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))))))
:<|> (SearchVisibilityGet
:<|> (SearchVisibilitySet
:<|> (Named
'("get", ValidateSAMLEmailsConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for validateSAMLemails"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig)))))))))))
:<|> (Named
'("get", DigitalSignaturesConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for digitalSignatures"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))
:<|> ((Named
'("get", AppLockConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for appLock"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("features"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig)))))))))))
:<|> Named
'("put", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary "Put config for appLock"
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany '[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> (ReqBody
'[JSON]
(Feature
AppLockConfig)
:> Put
'[JSON]
(LockableFeature
AppLockConfig)))))))))))))))
:<|> ((Named
'("get", FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary "Get config for fileSharing"
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("features"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))
:<|> Named
'("put", FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Put config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> (ReqBody
'[JSON]
(Feature
FileSharingConfig)
:> Put
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))))))
:<|> (Named
'("get", ClassifiedDomainsConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for classifiedDomains"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("features"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig)))))))))))
:<|> ((Named
'("get", ConferenceCallingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))
:<|> Named
'("put",
ConferenceCallingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Put config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> (ReqBody
'[JSON]
(Feature
ConferenceCallingConfig)
:> Put
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))))))
:<|> ((Named
'("get",
SelfDeletingMessagesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))
:<|> Named
'("put",
SelfDeletingMessagesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> (ReqBody
'[JSON]
(Feature
SelfDeletingMessagesConfig)
:> Put
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))))))
:<|> ((Named
'("get",
GuestLinksConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))
:<|> Named
'("put",
GuestLinksConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> (ReqBody
'[JSON]
(Feature
GuestLinksConfig)
:> Put
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))))))
:<|> ((Named
'("get",
SndFactorPasswordChallengeConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))
:<|> Named
'("put",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> (ReqBody
'[JSON]
(Feature
SndFactorPasswordChallengeConfig)
:> Put
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))))))
:<|> ((Named
'("get",
MLSConfig)
(From 'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig))))))))))))
:<|> Named
'("put",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> (ReqBody
'[JSON]
(Feature
MLSConfig)
:> Put
'[JSON]
(LockableFeature
MLSConfig))))))))))))))))
:<|> ((Named
'("get",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> Get
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))
:<|> Named
'("put",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> (ReqBody
'[JSON]
(Feature
ExposeInvitationURLsToTeamAdminConfig)
:> Put
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))))))
:<|> ((Named
'("get",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))
:<|> Named
'("put",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityInboundConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))))))
:<|> ((Named
'("get",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> Get
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))
:<|> Named
'("put",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> (ReqBody
'[JSON]
(Feature
OutlookCalIntegrationConfig)
:> Put
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))))))
:<|> (Named
'("get",
MlsE2EIdConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> Get
'[JSON]
(LockableFeature
MlsE2EIdConfig))))))))))))
:<|> (Named
"put-MlsE2EIdConfig@v5"
(From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> (Named
'("put",
MlsE2EIdConfig)
(From
'V6
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> ((Named
'("get",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> Get
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))
:<|> Named
'("put",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> (ReqBody
'[JSON]
(Feature
MlsMigrationConfig)
:> Put
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))))))
:<|> ((Named
'("get",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> Get
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))
:<|> Named
'("put",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> (ReqBody
'[JSON]
(Feature
EnforceFileDownloadLocationConfig)
:> Put
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))))))
:<|> (Named
'("get",
LimitedEventFanoutConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for limitedEventFanout"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("limitedEventFanout"
:> Get
'[JSON]
(LockableFeature
LimitedEventFanoutConfig))))))))))))
:<|> (AllTeamFeaturesUserGet
:<|> (AllTeamFeaturesTeamGet
:<|> ((Named
'("get-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))
:<|> (Named
'("put-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `PUT /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))))
:<|> (Named
'("get-deprecated",
ValidateSAMLEmailsConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/validateSAMLemails` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validate-saml-emails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))))
:<|> Named
'("get-deprecated",
DigitalSignaturesConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/digitalSignatures` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digital-signatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))))))
:<|> (Named
'("get-config",
LegalholdConfig)
(Summary
"[deprecated] Get feature config for feature legalhold"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig))))))))))
:<|> (Named
'("get-config",
SSOConfig)
(Summary
"[deprecated] Get feature config for feature sso"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig))))))))))
:<|> (Named
'("get-config",
SearchVisibilityAvailableConfig)
(Summary
"[deprecated] Get feature config for feature searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))
:<|> (Named
'("get-config",
ValidateSAMLEmailsConfig)
(Summary
"[deprecated] Get feature config for feature validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))
:<|> (Named
'("get-config",
DigitalSignaturesConfig)
(Summary
"[deprecated] Get feature config for feature digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig))))))))))
:<|> (Named
'("get-config",
AppLockConfig)
(Summary
"[deprecated] Get feature config for feature appLock"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig))))))))))
:<|> (Named
'("get-config",
FileSharingConfig)
(Summary
"[deprecated] Get feature config for feature fileSharing"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig))))))))))
:<|> (Named
'("get-config",
ClassifiedDomainsConfig)
(Summary
"[deprecated] Get feature config for feature classifiedDomains"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig))))))))))
:<|> (Named
'("get-config",
ConferenceCallingConfig)
(Summary
"[deprecated] Get feature config for feature conferenceCalling"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig))))))))))
:<|> (Named
'("get-config",
SelfDeletingMessagesConfig)
(Summary
"[deprecated] Get feature config for feature selfDeletingMessages"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig))))))))))
:<|> (Named
'("get-config",
GuestLinksConfig)
(Summary
"[deprecated] Get feature config for feature conversationGuestLinks"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig))))))))))
:<|> (Named
'("get-config",
SndFactorPasswordChallengeConfig)
(Summary
"[deprecated] Get feature config for feature sndFactorPasswordChallenge"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig))))))))))
:<|> Named
'("get-config",
MLSConfig)
(Summary
"[deprecated] Get feature config for feature mls"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig)))))))))))))))))))))))))))))))))))))))))))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
API FeatureAPI GalleyEffects
featureAPI
API
(Named
'("get", SSOConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for sso"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("sso" :> Get '[JSON] (LockableFeature SSOConfig)))))))))))
:<|> ((Named
'("get", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature LegalholdConfig)))))))))))
:<|> Named
'("put", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany
'[ 'ActionDenied 'RemoveConversationMember,
'CannotEnableLegalHoldServiceLargeTeam,
'LegalHoldNotEnabled,
'LegalHoldDisableUnimplemented,
'LegalHoldServiceNotRegistered,
'UserLegalHoldIllegalOperation,
'LegalHoldCouldNotBlockConnections]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> (ReqBody
'[JSON]
(Feature LegalholdConfig)
:> Put
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))))))
:<|> ((Named
'("get", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))
:<|> Named
'("put", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany '[]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))))))
:<|> (SearchVisibilityGet
:<|> (SearchVisibilitySet
:<|> (Named
'("get", ValidateSAMLEmailsConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for validateSAMLemails"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig)))))))))))
:<|> (Named
'("get", DigitalSignaturesConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for digitalSignatures"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))
:<|> ((Named
'("get", AppLockConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for appLock"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("features"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig)))))))))))
:<|> Named
'("put", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary "Put config for appLock"
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany '[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> (ReqBody
'[JSON]
(Feature
AppLockConfig)
:> Put
'[JSON]
(LockableFeature
AppLockConfig)))))))))))))))
:<|> ((Named
'("get", FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary "Get config for fileSharing"
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("features"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))
:<|> Named
'("put", FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Put config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> (ReqBody
'[JSON]
(Feature
FileSharingConfig)
:> Put
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))))))
:<|> (Named
'("get", ClassifiedDomainsConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for classifiedDomains"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("features"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig)))))))))))
:<|> ((Named
'("get", ConferenceCallingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))
:<|> Named
'("put",
ConferenceCallingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Put config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> (ReqBody
'[JSON]
(Feature
ConferenceCallingConfig)
:> Put
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))))))
:<|> ((Named
'("get",
SelfDeletingMessagesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))
:<|> Named
'("put",
SelfDeletingMessagesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> (ReqBody
'[JSON]
(Feature
SelfDeletingMessagesConfig)
:> Put
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))))))
:<|> ((Named
'("get",
GuestLinksConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))
:<|> Named
'("put",
GuestLinksConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> (ReqBody
'[JSON]
(Feature
GuestLinksConfig)
:> Put
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))))))
:<|> ((Named
'("get",
SndFactorPasswordChallengeConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))
:<|> Named
'("put",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> (ReqBody
'[JSON]
(Feature
SndFactorPasswordChallengeConfig)
:> Put
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))))))
:<|> ((Named
'("get",
MLSConfig)
(From 'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig))))))))))))
:<|> Named
'("put",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> (ReqBody
'[JSON]
(Feature
MLSConfig)
:> Put
'[JSON]
(LockableFeature
MLSConfig))))))))))))))))
:<|> ((Named
'("get",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> Get
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))
:<|> Named
'("put",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> (ReqBody
'[JSON]
(Feature
ExposeInvitationURLsToTeamAdminConfig)
:> Put
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))))))
:<|> ((Named
'("get",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))
:<|> Named
'("put",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityInboundConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))))))
:<|> ((Named
'("get",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> Get
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))
:<|> Named
'("put",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> (ReqBody
'[JSON]
(Feature
OutlookCalIntegrationConfig)
:> Put
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))))))
:<|> (Named
'("get",
MlsE2EIdConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> Get
'[JSON]
(LockableFeature
MlsE2EIdConfig))))))))))))
:<|> (Named
"put-MlsE2EIdConfig@v5"
(From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> (Named
'("put",
MlsE2EIdConfig)
(From
'V6
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> ((Named
'("get",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> Get
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))
:<|> Named
'("put",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> (ReqBody
'[JSON]
(Feature
MlsMigrationConfig)
:> Put
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))))))
:<|> ((Named
'("get",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> Get
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))
:<|> Named
'("put",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> (ReqBody
'[JSON]
(Feature
EnforceFileDownloadLocationConfig)
:> Put
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))))))
:<|> (Named
'("get",
LimitedEventFanoutConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for limitedEventFanout"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("limitedEventFanout"
:> Get
'[JSON]
(LockableFeature
LimitedEventFanoutConfig))))))))))))
:<|> (AllTeamFeaturesUserGet
:<|> (AllTeamFeaturesTeamGet
:<|> ((Named
'("get-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))
:<|> (Named
'("put-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `PUT /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))))
:<|> (Named
'("get-deprecated",
ValidateSAMLEmailsConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/validateSAMLemails` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validate-saml-emails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))))
:<|> Named
'("get-deprecated",
DigitalSignaturesConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/digitalSignatures` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digital-signatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))))))
:<|> (Named
'("get-config",
LegalholdConfig)
(Summary
"[deprecated] Get feature config for feature legalhold"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig))))))))))
:<|> (Named
'("get-config",
SSOConfig)
(Summary
"[deprecated] Get feature config for feature sso"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig))))))))))
:<|> (Named
'("get-config",
SearchVisibilityAvailableConfig)
(Summary
"[deprecated] Get feature config for feature searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))
:<|> (Named
'("get-config",
ValidateSAMLEmailsConfig)
(Summary
"[deprecated] Get feature config for feature validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))
:<|> (Named
'("get-config",
DigitalSignaturesConfig)
(Summary
"[deprecated] Get feature config for feature digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig))))))))))
:<|> (Named
'("get-config",
AppLockConfig)
(Summary
"[deprecated] Get feature config for feature appLock"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig))))))))))
:<|> (Named
'("get-config",
FileSharingConfig)
(Summary
"[deprecated] Get feature config for feature fileSharing"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig))))))))))
:<|> (Named
'("get-config",
ClassifiedDomainsConfig)
(Summary
"[deprecated] Get feature config for feature classifiedDomains"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig))))))))))
:<|> (Named
'("get-config",
ConferenceCallingConfig)
(Summary
"[deprecated] Get feature config for feature conferenceCalling"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig))))))))))
:<|> (Named
'("get-config",
SelfDeletingMessagesConfig)
(Summary
"[deprecated] Get feature config for feature selfDeletingMessages"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig))))))))))
:<|> (Named
'("get-config",
GuestLinksConfig)
(Summary
"[deprecated] Get feature config for feature conversationGuestLinks"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig))))))))))
:<|> (Named
'("get-config",
SndFactorPasswordChallengeConfig)
(Summary
"[deprecated] Get feature config for feature sndFactorPasswordChallenge"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig))))))))))
:<|> Named
'("get-config",
MLSConfig)
(Summary
"[deprecated] Get feature config for feature mls"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig)))))))))))))))))))))))))))))))))))))))))))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
((Named
"mls-message"
("mls"
:> (Summary "Post an MLS message"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow 'MLSClientSenderUserMismatch
:> (CanThrow 'MLSCommitMissingReferences
:> (CanThrow 'MLSGroupConversationMismatch
:> (CanThrow 'MLSInvalidLeafNodeIndex
:> (CanThrow 'MLSNotEnabled
:> (CanThrow 'MLSProposalNotFound
:> (CanThrow 'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("messages"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
Message)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Message sent"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))
:<|> (Named
"mls-commit-bundle"
("mls"
:> (Summary "Post a MLS CommitBundle"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow 'MLSClientSenderUserMismatch
:> (CanThrow 'MLSCommitMissingReferences
:> (CanThrow 'MLSGroupConversationMismatch
:> (CanThrow 'MLSInvalidLeafNodeIndex
:> (CanThrow 'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
'MLSWelcomeMismatch
:> (CanThrow
'MLSLegalholdIncompatible
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("commit-bundles"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
CommitBundle)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Commit accepted and forwarded"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))))
:<|> Named
"mls-public-keys"
("mls"
:> (Summary
"Get public keys used by the backend to sign external proposals"
:> (Description
"The format of the returned key is determined by the `format` query parameter:\n - raw (default): base64-encoded raw public keys\n - jwk: keys are nested objects in JWK format."
:> (From 'V5
:> (CanThrow 'MLSNotEnabled
:> ("public-keys"
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (QueryParam'
'[Optional, Strict] "format" MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Public keys"
(MLSKeysByPurpose (MLSKeys SomeKey))]
(MLSKeysByPurpose (MLSKeys SomeKey))))))))))))
:<|> (CustomBackendAPI
:<|> ((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow 'LegalHoldServiceBadResponse
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON] NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> Get '[JSON] ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary "Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON]
UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary "Consent to legal hold"
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'InvalidOperation
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow
'UserLegalHoldIllegalOperation
:> (CanThrow
'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary "Request legal hold device"
:> (CanThrow
('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary "Disable legal hold for user"
:> (CanThrow AuthenticationError
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary "Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get '[JSON] TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON]
TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow 'BulkGetMemberLimitExceeded
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (ReqBody
'[JSON] UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow 'NotATeamMember
:> (CanThrow 'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'TeamNotFound
:> (CanThrow
'TooManyTeamMembers
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary "Remove an existing team member"
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary "Remove an existing team member"
:> (Until 'V4
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary
"Update an existing team member"
:> (CanThrow 'AccessDenied
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'TeamNotFound
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow 'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
((Named
'("get", SSOConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for sso"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("sso"
:> Get '[JSON] (LockableFeature SSOConfig)))))))))))
:<|> ((Named
'("get", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))
:<|> Named
'("put", LegalholdConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for legalhold"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany
'[ 'ActionDenied 'RemoveConversationMember,
'CannotEnableLegalHoldServiceLargeTeam,
'LegalHoldNotEnabled,
'LegalHoldDisableUnimplemented,
'LegalHoldServiceNotRegistered,
'UserLegalHoldIllegalOperation,
'LegalHoldCouldNotBlockConnections]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("legalhold"
:> (ReqBody
'[JSON]
(Feature LegalholdConfig)
:> Put
'[JSON]
(LockableFeature
LegalholdConfig)))))))))))))))
:<|> ((Named
'("get", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))
:<|> Named
'("put", SearchVisibilityAvailableConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Put config for searchVisibility"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow TeamFeatureError
:> (CanThrowMany '[]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("searchVisibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig)))))))))))))))
:<|> (SearchVisibilityGet
:<|> (SearchVisibilitySet
:<|> (Named
'("get", ValidateSAMLEmailsConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for validateSAMLemails"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig)))))))))))
:<|> (Named
'("get", DigitalSignaturesConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for digitalSignatures"
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("features"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))
:<|> ((Named
'("get", AppLockConfig)
(Description ""
:> (ZAuthServant 'ZAuthUser '[Required, Strict]
:> (Summary "Get config for appLock"
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("features"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig)))))))))))
:<|> Named
'("put", AppLockConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary "Put config for appLock"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("appLock"
:> (ReqBody
'[JSON]
(Feature
AppLockConfig)
:> Put
'[JSON]
(LockableFeature
AppLockConfig)))))))))))))))
:<|> ((Named
'("get", FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("features"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))
:<|> Named
'("put", FileSharingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Put config for fileSharing"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("fileSharing"
:> (ReqBody
'[JSON]
(Feature
FileSharingConfig)
:> Put
'[JSON]
(LockableFeature
FileSharingConfig)))))))))))))))
:<|> (Named
'("get", ClassifiedDomainsConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser '[Required, Strict]
:> (Summary
"Get config for classifiedDomains"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig)))))))))))
:<|> ((Named
'("get",
ConferenceCallingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required, Strict]
:> (Summary
"Get config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))
:<|> Named
'("put",
ConferenceCallingConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conferenceCalling"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conferenceCalling"
:> (ReqBody
'[JSON]
(Feature
ConferenceCallingConfig)
:> Put
'[JSON]
(LockableFeature
ConferenceCallingConfig)))))))))))))))
:<|> ((Named
'("get",
SelfDeletingMessagesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))
:<|> Named
'("put",
SelfDeletingMessagesConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for selfDeletingMessages"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("selfDeletingMessages"
:> (ReqBody
'[JSON]
(Feature
SelfDeletingMessagesConfig)
:> Put
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig)))))))))))))))
:<|> ((Named
'("get",
GuestLinksConfig)
(Description ""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))
:<|> Named
'("put",
GuestLinksConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for conversationGuestLinks"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("conversationGuestLinks"
:> (ReqBody
'[JSON]
(Feature
GuestLinksConfig)
:> Put
'[JSON]
(LockableFeature
GuestLinksConfig)))))))))))))))
:<|> ((Named
'("get",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))
:<|> Named
'("put",
SndFactorPasswordChallengeConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for sndFactorPasswordChallenge"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("sndFactorPasswordChallenge"
:> (ReqBody
'[JSON]
(Feature
SndFactorPasswordChallengeConfig)
:> Put
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig)))))))))))))))
:<|> ((Named
'("get",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig))))))))))))
:<|> Named
'("put",
MLSConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mls"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mls"
:> (ReqBody
'[JSON]
(Feature
MLSConfig)
:> Put
'[JSON]
(LockableFeature
MLSConfig))))))))))))))))
:<|> ((Named
'("get",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> Get
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))
:<|> Named
'("put",
ExposeInvitationURLsToTeamAdminConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for exposeInvitationURLsToTeamAdmin"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("exposeInvitationURLsToTeamAdmin"
:> (ReqBody
'[JSON]
(Feature
ExposeInvitationURLsToTeamAdminConfig)
:> Put
'[JSON]
(LockableFeature
ExposeInvitationURLsToTeamAdminConfig)))))))))))))))
:<|> ((Named
'("get",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))
:<|> Named
'("put",
SearchVisibilityInboundConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for searchVisibilityInbound"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("searchVisibilityInbound"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityInboundConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityInboundConfig)))))))))))))))
:<|> ((Named
'("get",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> Get
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))
:<|> Named
'("put",
OutlookCalIntegrationConfig)
(Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for outlookCalIntegration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("outlookCalIntegration"
:> (ReqBody
'[JSON]
(Feature
OutlookCalIntegrationConfig)
:> Put
'[JSON]
(LockableFeature
OutlookCalIntegrationConfig)))))))))))))))
:<|> (Named
'("get",
MlsE2EIdConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> Get
'[JSON]
(LockableFeature
MlsE2EIdConfig))))))))))))
:<|> (Named
"put-MlsE2EIdConfig@v5"
(From
'V5
:> (Until
'V6
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> (Named
'("put",
MlsE2EIdConfig)
(From
'V6
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsE2EId"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsE2EId"
:> (ReqBody
'[JSON]
(Feature
MlsE2EIdConfig)
:> Put
'[JSON]
(LockableFeature
MlsE2EIdConfig)))))))))))))))
:<|> ((Named
'("get",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> Get
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))
:<|> Named
'("put",
MlsMigrationConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for mlsMigration"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("mlsMigration"
:> (ReqBody
'[JSON]
(Feature
MlsMigrationConfig)
:> Put
'[JSON]
(LockableFeature
MlsMigrationConfig))))))))))))))))
:<|> ((Named
'("get",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> Get
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))
:<|> Named
'("put",
EnforceFileDownloadLocationConfig)
(From
'V5
:> (Description
"<p><b>Custom feature: only supported on some dedicated on-prem systems.</b></p>"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Put config for enforceFileDownloadLocation"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> (CanThrowMany
'[]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("enforceFileDownloadLocation"
:> (ReqBody
'[JSON]
(Feature
EnforceFileDownloadLocationConfig)
:> Put
'[JSON]
(LockableFeature
EnforceFileDownloadLocationConfig))))))))))))))))
:<|> (Named
'("get",
LimitedEventFanoutConfig)
(From
'V5
:> (Description
""
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"Get config for limitedEventFanout"
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'NotATeamMember
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("limitedEventFanout"
:> Get
'[JSON]
(LockableFeature
LimitedEventFanoutConfig))))))))))))
:<|> (AllTeamFeaturesUserGet
:<|> (AllTeamFeaturesTeamGet
:<|> ((Named
'("get-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))
:<|> (Named
'("put-deprecated",
SearchVisibilityAvailableConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `PUT /teams/:tid/features/searchVisibility` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
TeamFeatureError
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("search-visibility"
:> (ReqBody
'[JSON]
(Feature
SearchVisibilityAvailableConfig)
:> Put
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))))))
:<|> (Named
'("get-deprecated",
ValidateSAMLEmailsConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/validateSAMLemails` instead.\nThis endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("validate-saml-emails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))))
:<|> Named
'("get-deprecated",
DigitalSignaturesConfig)
(ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (Summary
"[deprecated] Get config for digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /teams/:tid/features/digitalSignatures` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("features"
:> ("digital-signatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig)))))))))))))))
:<|> (Named
'("get-config",
LegalholdConfig)
(Summary
"[deprecated] Get feature config for feature legalhold"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("legalhold"
:> Get
'[JSON]
(LockableFeature
LegalholdConfig))))))))))
:<|> (Named
'("get-config",
SSOConfig)
(Summary
"[deprecated] Get feature config for feature sso"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sso"
:> Get
'[JSON]
(LockableFeature
SSOConfig))))))))))
:<|> (Named
'("get-config",
SearchVisibilityAvailableConfig)
(Summary
"[deprecated] Get feature config for feature searchVisibility"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("searchVisibility"
:> Get
'[JSON]
(LockableFeature
SearchVisibilityAvailableConfig))))))))))
:<|> (Named
'("get-config",
ValidateSAMLEmailsConfig)
(Summary
"[deprecated] Get feature config for feature validateSAMLemails"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("validateSAMLemails"
:> Get
'[JSON]
(LockableFeature
ValidateSAMLEmailsConfig))))))))))
:<|> (Named
'("get-config",
DigitalSignaturesConfig)
(Summary
"[deprecated] Get feature config for feature digitalSignatures"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("digitalSignatures"
:> Get
'[JSON]
(LockableFeature
DigitalSignaturesConfig))))))))))
:<|> (Named
'("get-config",
AppLockConfig)
(Summary
"[deprecated] Get feature config for feature appLock"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("appLock"
:> Get
'[JSON]
(LockableFeature
AppLockConfig))))))))))
:<|> (Named
'("get-config",
FileSharingConfig)
(Summary
"[deprecated] Get feature config for feature fileSharing"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("fileSharing"
:> Get
'[JSON]
(LockableFeature
FileSharingConfig))))))))))
:<|> (Named
'("get-config",
ClassifiedDomainsConfig)
(Summary
"[deprecated] Get feature config for feature classifiedDomains"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("classifiedDomains"
:> Get
'[JSON]
(LockableFeature
ClassifiedDomainsConfig))))))))))
:<|> (Named
'("get-config",
ConferenceCallingConfig)
(Summary
"[deprecated] Get feature config for feature conferenceCalling"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conferenceCalling"
:> Get
'[JSON]
(LockableFeature
ConferenceCallingConfig))))))))))
:<|> (Named
'("get-config",
SelfDeletingMessagesConfig)
(Summary
"[deprecated] Get feature config for feature selfDeletingMessages"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("selfDeletingMessages"
:> Get
'[JSON]
(LockableFeature
SelfDeletingMessagesConfig))))))))))
:<|> (Named
'("get-config",
GuestLinksConfig)
(Summary
"[deprecated] Get feature config for feature conversationGuestLinks"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("conversationGuestLinks"
:> Verb
'GET
200
'[JSON]
(LockableFeature
GuestLinksConfig))))))))))
:<|> (Named
'("get-config",
SndFactorPasswordChallengeConfig)
(Summary
"[deprecated] Get feature config for feature sndFactorPasswordChallenge"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("sndFactorPasswordChallenge"
:> Get
'[JSON]
(LockableFeature
SndFactorPasswordChallengeConfig))))))))))
:<|> Named
'("get-config",
MLSConfig)
(Summary
"[deprecated] Get feature config for feature mls"
:> (Until
'V2
:> (Description
"Deprecated. Please use `GET /feature-configs` instead.\nThe usage of this endpoint was removed in iOS in version 3.101. It is not used by team management, or webapp, and is potentially used by the old Android client as of June 2022"
:> (ZAuthServant
'ZAuthUser
'[Required,
Strict]
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> ("feature-configs"
:> ("mls"
:> Get
'[JSON]
(LockableFeature
MLSConfig)))))))))))))))))))))))))))))))))))))))))))))))))
:<|> ((Named
"mls-message"
("mls"
:> (Summary "Post an MLS message"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow 'MLSClientSenderUserMismatch
:> (CanThrow 'MLSCommitMissingReferences
:> (CanThrow 'MLSGroupConversationMismatch
:> (CanThrow 'MLSInvalidLeafNodeIndex
:> (CanThrow 'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("messages"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
Message)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Message sent"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))
:<|> (Named
"mls-commit-bundle"
("mls"
:> (Summary "Post a MLS CommitBundle"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow 'MLSClientSenderUserMismatch
:> (CanThrow 'MLSCommitMissingReferences
:> (CanThrow
'MLSGroupConversationMismatch
:> (CanThrow
'MLSInvalidLeafNodeIndex
:> (CanThrow 'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
'MLSWelcomeMismatch
:> (CanThrow
'MLSLegalholdIncompatible
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("commit-bundles"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
CommitBundle)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Commit accepted and forwarded"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))))
:<|> Named
"mls-public-keys"
("mls"
:> (Summary
"Get public keys used by the backend to sign external proposals"
:> (Description
"The format of the returned key is determined by the `format` query parameter:\n - raw (default): base64-encoded raw public keys\n - jwk: keys are nested objects in JWK format."
:> (From 'V5
:> (CanThrow 'MLSNotEnabled
:> ("public-keys"
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (QueryParam'
'[Optional, Strict]
"format"
MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Public keys"
(MLSKeysByPurpose
(MLSKeys SomeKey))]
(MLSKeysByPurpose
(MLSKeys SomeKey))))))))))))
:<|> (CustomBackendAPI
:<|> ((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow 'LegalHoldServiceBadResponse
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> Get
'[JSON]
ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary "Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON]
UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary "Consent to legal hold"
:> (CanThrow
('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'InvalidOperation
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow
'UserLegalHoldIllegalOperation
:> (CanThrow
'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary "Request legal hold device"
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary
"Disable legal hold for user"
:> (CanThrow AuthenticationError
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary
"Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get '[JSON] TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON]
TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow 'BulkGetMemberLimitExceeded
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (ReqBody
'[JSON]
UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow 'NotATeamMember
:> (CanThrow 'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TooManyTeamMembers
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary "Remove an existing team member"
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary
"Remove an existing team member"
:> (Until 'V4
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary
"Update an existing team member"
:> (CanThrow 'AccessDenied
:> (CanThrow
'InvalidPermissions
:> (CanThrow
'TeamNotFound
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow
'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI)))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
forall api1 (r :: EffectRow) api2.
API api1 r -> API api2 r -> API (api1 :<|> api2) r
<@> API
(Named
"mls-message"
("mls"
:> (Summary "Post an MLS message"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow 'MLSClientSenderUserMismatch
:> (CanThrow 'MLSCommitMissingReferences
:> (CanThrow 'MLSGroupConversationMismatch
:> (CanThrow 'MLSInvalidLeafNodeIndex
:> (CanThrow 'MLSNotEnabled
:> (CanThrow 'MLSProposalNotFound
:> (CanThrow 'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow 'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("messages"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
Message)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Message sent"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))
:<|> (Named
"mls-commit-bundle"
("mls"
:> (Summary "Post a MLS CommitBundle"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow 'MLSClientSenderUserMismatch
:> (CanThrow 'MLSCommitMissingReferences
:> (CanThrow 'MLSGroupConversationMismatch
:> (CanThrow 'MLSInvalidLeafNodeIndex
:> (CanThrow 'MLSNotEnabled
:> (CanThrow 'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
'MLSWelcomeMismatch
:> (CanThrow
'MLSLegalholdIncompatible
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("commit-bundles"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
CommitBundle)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Commit accepted and forwarded"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))))
:<|> Named
"mls-public-keys"
("mls"
:> (Summary
"Get public keys used by the backend to sign external proposals"
:> (Description
"The format of the returned key is determined by the `format` query parameter:\n - raw (default): base64-encoded raw public keys\n - jwk: keys are nested objects in JWK format."
:> (From 'V5
:> (CanThrow 'MLSNotEnabled
:> ("public-keys"
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (QueryParam'
'[Optional, Strict] "format" MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Public keys"
(MLSKeysByPurpose (MLSKeys SomeKey))]
(MLSKeysByPurpose (MLSKeys SomeKey))))))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
API MLSAPI GalleyEffects
mlsAPI
API
(Named
"mls-message"
("mls"
:> (Summary "Post an MLS message"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow 'MLSClientSenderUserMismatch
:> (CanThrow 'MLSCommitMissingReferences
:> (CanThrow 'MLSGroupConversationMismatch
:> (CanThrow 'MLSInvalidLeafNodeIndex
:> (CanThrow 'MLSNotEnabled
:> (CanThrow 'MLSProposalNotFound
:> (CanThrow 'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow 'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("messages"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
Message)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Message sent"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))
:<|> (Named
"mls-commit-bundle"
("mls"
:> (Summary "Post a MLS CommitBundle"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow 'MLSClientSenderUserMismatch
:> (CanThrow 'MLSCommitMissingReferences
:> (CanThrow 'MLSGroupConversationMismatch
:> (CanThrow 'MLSInvalidLeafNodeIndex
:> (CanThrow 'MLSNotEnabled
:> (CanThrow 'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
'MLSWelcomeMismatch
:> (CanThrow
'MLSLegalholdIncompatible
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("commit-bundles"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
CommitBundle)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Commit accepted and forwarded"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))))
:<|> Named
"mls-public-keys"
("mls"
:> (Summary
"Get public keys used by the backend to sign external proposals"
:> (Description
"The format of the returned key is determined by the `format` query parameter:\n - raw (default): base64-encoded raw public keys\n - jwk: keys are nested objects in JWK format."
:> (From 'V5
:> (CanThrow 'MLSNotEnabled
:> ("public-keys"
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (QueryParam'
'[Optional, Strict] "format" MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Public keys"
(MLSKeysByPurpose (MLSKeys SomeKey))]
(MLSKeysByPurpose (MLSKeys SomeKey))))))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
(CustomBackendAPI
:<|> ((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow 'LegalHoldServiceBadResponse
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody '[JSON] NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> Get '[JSON] ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary "Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON]
UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary "Consent to legal hold"
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'InvalidOperation
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'UserLegalHoldIllegalOperation
:> (CanThrow
'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary "Request legal hold device"
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary "Disable legal hold for user"
:> (CanThrow AuthenticationError
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary "Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description "Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get '[JSON] TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture "uid" (Id 'User)
:> Get '[JSON] TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow 'BulkGetMemberLimitExceeded
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1 HardTruncationLimit Int32)
:> (ReqBody '[JSON] UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow 'NotATeamMember
:> (CanThrow 'NotConnected
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'TeamNotFound
:> (CanThrow 'TooManyTeamMembers
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary "Remove an existing team member"
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary "Remove an existing team member"
:> (Until 'V4
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary "Update an existing team member"
:> (CanThrow 'AccessDenied
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'TeamNotFound
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow 'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI)))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
((Named
"mls-message"
("mls"
:> (Summary "Post an MLS message"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow 'MLSClientSenderUserMismatch
:> (CanThrow 'MLSCommitMissingReferences
:> (CanThrow 'MLSGroupConversationMismatch
:> (CanThrow 'MLSInvalidLeafNodeIndex
:> (CanThrow 'MLSNotEnabled
:> (CanThrow 'MLSProposalNotFound
:> (CanThrow 'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("messages"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
Message)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Message sent"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))
:<|> (Named
"mls-commit-bundle"
("mls"
:> (Summary "Post a MLS CommitBundle"
:> (From 'V5
:> (CanThrow 'ConvAccessDenied
:> (CanThrow 'ConvMemberNotFound
:> (CanThrow 'ConvNotFound
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'MissingLegalholdConsent
:> (CanThrow 'MLSClientMismatch
:> (CanThrow 'MLSClientSenderUserMismatch
:> (CanThrow 'MLSCommitMissingReferences
:> (CanThrow 'MLSGroupConversationMismatch
:> (CanThrow 'MLSInvalidLeafNodeIndex
:> (CanThrow 'MLSNotEnabled
:> (CanThrow
'MLSProposalNotFound
:> (CanThrow
'MLSProtocolErrorTag
:> (CanThrow
'MLSSelfRemovalNotAllowed
:> (CanThrow
'MLSStaleMessage
:> (CanThrow
'MLSSubConvClientNotInParent
:> (CanThrow
'MLSUnsupportedMessage
:> (CanThrow
'MLSUnsupportedProposal
:> (CanThrow
'MLSWelcomeMismatch
:> (CanThrow
'MLSLegalholdIncompatible
:> (CanThrow
MLSProposalFailure
:> (CanThrow
NonFederatingBackends
:> (CanThrow
UnreachableBackends
:> ("commit-bundles"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthClient
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> (ReqBody
'[MLS]
(RawMLS
CommitBundle)
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Commit accepted and forwarded"
MLSMessageSendingStatus]
MLSMessageSendingStatus)))))))))))))))))))))))))))))))
:<|> Named
"mls-public-keys"
("mls"
:> (Summary
"Get public keys used by the backend to sign external proposals"
:> (Description
"The format of the returned key is determined by the `format` query parameter:\n - raw (default): base64-encoded raw public keys\n - jwk: keys are nested objects in JWK format."
:> (From 'V5
:> (CanThrow 'MLSNotEnabled
:> ("public-keys"
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> (QueryParam'
'[Optional, Strict] "format" MLSPublicKeyFormat
:> MultiVerb
'GET
'[JSON]
'[Respond
200
"Public keys"
(MLSKeysByPurpose (MLSKeys SomeKey))]
(MLSKeysByPurpose (MLSKeys SomeKey))))))))))))
:<|> (CustomBackendAPI
:<|> ((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow 'LegalHoldServiceBadResponse
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON] NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> Get '[JSON] ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary "Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON]
UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary "Consent to legal hold"
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'InvalidOperation
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow
'UserLegalHoldIllegalOperation
:> (CanThrow
'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary "Request legal hold device"
:> (CanThrow
('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary "Disable legal hold for user"
:> (CanThrow AuthenticationError
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary "Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get '[JSON] TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON]
TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow 'BulkGetMemberLimitExceeded
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1
HardTruncationLimit
Int32)
:> (ReqBody
'[JSON] UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow 'NotATeamMember
:> (CanThrow 'NotConnected
:> (CanThrow
('MissingPermission
'Nothing)
:> (CanThrow 'TeamNotFound
:> (CanThrow
'TooManyTeamMembers
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary "Remove an existing team member"
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary "Remove an existing team member"
:> (Until 'V4
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary
"Update an existing team member"
:> (CanThrow 'AccessDenied
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'TeamNotFound
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow 'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
forall api1 (r :: EffectRow) api2.
API api1 r -> API api2 r -> API (api1 :<|> api2) r
<@> API
CustomBackendAPI
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
API CustomBackendAPI GalleyEffects
customBackendAPI
API
CustomBackendAPI
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow 'LegalHoldServiceBadResponse
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody '[JSON] NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings" :> Get '[JSON] ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary "Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON] UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary "Consent to legal hold"
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'InvalidOperation
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'UserLegalHoldIllegalOperation
:> (CanThrow 'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary "Request legal hold device"
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary "Disable legal hold for user"
:> (CanThrow AuthenticationError
:> (CanThrow
('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary "Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description "Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get '[JSON] TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture "uid" (Id 'User)
:> Get '[JSON] TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow 'BulkGetMemberLimitExceeded
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (ReqBody '[JSON] UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow 'NotATeamMember
:> (CanThrow 'NotConnected
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'TeamNotFound
:> (CanThrow 'TooManyTeamMembers
:> (CanThrow 'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary "Remove an existing team member"
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("members"
:> (Capture
"uid"
(Id 'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary "Remove an existing team member"
:> (Until 'V4
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary "Update an existing team member"
:> (CanThrow 'AccessDenied
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'TeamNotFound
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TooManyTeamAdmins
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow 'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
(CustomBackendAPI
:<|> ((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow 'LegalHoldServiceBadResponse
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody '[JSON] NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> Get '[JSON] ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary "Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON]
UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary "Consent to legal hold"
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'InvalidOperation
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'UserLegalHoldIllegalOperation
:> (CanThrow
'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary "Request legal hold device"
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary "Disable legal hold for user"
:> (CanThrow AuthenticationError
:> (CanThrow
('ActionDenied
'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary "Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description "Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get '[JSON] TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture "uid" (Id 'User)
:> Get '[JSON] TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow 'BulkGetMemberLimitExceeded
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range
1 HardTruncationLimit Int32)
:> (ReqBody '[JSON] UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow 'NotATeamMember
:> (CanThrow 'NotConnected
:> (CanThrow
('MissingPermission 'Nothing)
:> (CanThrow 'TeamNotFound
:> (CanThrow 'TooManyTeamMembers
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary "Remove an existing team member"
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary "Remove an existing team member"
:> (Until 'V4
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary "Update an existing team member"
:> (CanThrow 'AccessDenied
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'TeamNotFound
:> (CanThrow
'TeamMemberNotFound
:> (CanThrow
'TooManyTeamAdmins
:> (CanThrow
'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow 'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI)))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
forall api1 (r :: EffectRow) api2.
API api1 r -> API api2 r -> API (api1 :<|> api2) r
<@> API LegalHoldAPI GalleyEffects
API
(Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow 'LegalHoldServiceBadResponse
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody '[JSON] NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings" :> Get '[JSON] ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary "Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> (Capture "uid" (Id 'User)
:> Get '[JSON] UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary "Consent to legal hold"
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'InvalidOperation
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'UserLegalHoldIllegalOperation
:> (CanThrow 'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary "Request legal hold device"
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary "Disable legal hold for user"
:> (CanThrow AuthenticationError
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary "Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
legalHoldAPI
API
(Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow 'LegalHoldServiceBadResponse
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody '[JSON] NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings" :> Get '[JSON] ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary "Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> (Capture "uid" (Id 'User)
:> Get '[JSON] UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary "Consent to legal hold"
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'InvalidOperation
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'UserLegalHoldIllegalOperation
:> (CanThrow 'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary "Request legal hold device"
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary "Disable legal hold for user"
:> (CanThrow AuthenticationError
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary "Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description "Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get '[JSON] TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture "uid" (Id 'User)
:> Get '[JSON] TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow 'BulkGetMemberLimitExceeded
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (ReqBody '[JSON] UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow 'NotATeamMember
:> (CanThrow 'NotConnected
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'TeamNotFound
:> (CanThrow 'TooManyTeamMembers
:> (CanThrow 'TooManyTeamAdmins
:> (CanThrow 'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary "Remove an existing team member"
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant
'ZAuthConn '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture
"uid" (Id 'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary "Remove an existing team member"
:> (Until 'V4
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary "Update an existing team member"
:> (CanThrow 'AccessDenied
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'TeamNotFound
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TooManyTeamAdmins
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow 'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI)
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
((Named
"create-legal-hold-settings"
(Summary "Create legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'LegalHoldNotEnabled
:> (CanThrow 'LegalHoldServiceInvalidKey
:> (CanThrow 'LegalHoldServiceBadResponse
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody '[JSON] NewLegalHoldService
:> MultiVerb
'POST
'[JSON]
'[Respond
201
"Legal hold service settings created"
ViewLegalHoldService]
ViewLegalHoldService))))))))))))
:<|> (Named
"get-legal-hold-settings"
(Summary "Get legal hold service settings"
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("settings" :> Get '[JSON] ViewLegalHoldService))))))))
:<|> (Named
"delete-legal-hold-settings"
(Summary "Delete legal hold service settings"
:> (CanThrow AuthenticationError
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("legalhold"
:> ("settings"
:> (ReqBody
'[JSON]
RemoveLegalHoldSettingsRequest
:> MultiVerb
'DELETE
'[JSON]
'[RespondEmpty
204
"Legal hold service settings deleted"]
()))))))))))))))))))
:<|> (Named
"get-legal-hold"
(Summary "Get legal hold status"
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> (Capture "uid" (Id 'User)
:> Get
'[JSON] UserLegalHoldStatusResponse)))))))
:<|> (Named
"consent-to-legal-hold"
(Summary "Consent to legal hold"
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'InvalidOperation
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'UserLegalHoldIllegalOperation
:> (CanThrow 'LegalHoldCouldNotBlockConnections
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("legalhold"
:> ("consent"
:> MultiVerb
'POST
'[JSON]
GrantConsentResultResponseTypes
GrantConsentResult)))))))))))
:<|> (Named
"request-legal-hold-device"
(Summary "Request legal hold device"
:> (CanThrow ('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'POST
'[JSON]
RequestDeviceResultResponseType
RequestDeviceResult)))))))))))))))))))
:<|> (Named
"disable-legal-hold-for-user"
(Summary "Disable legal hold for user"
:> (CanThrow AuthenticationError
:> (CanThrow
('ActionDenied 'RemoveConversationMember)
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> (ReqBody
'[JSON]
DisableLegalHoldForUserRequest
:> MultiVerb
'DELETE
'[JSON]
DisableLegalHoldForUserResponseType
DisableLegalHoldForUserResponse)))))))))))))))
:<|> Named
"approve-legal-hold-device"
(Summary "Approve legal hold device"
:> (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)"
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("legalhold"
:> (Capture
"uid"
(Id
'User)
:> ("approve"
:> (ReqBody
'[JSON]
ApproveLegalHoldForUserRequest
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
"Legal hold approved"]
()))))))))))))))))))))))))))))
:<|> ((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description "Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get '[JSON] TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture "uid" (Id 'User)
:> Get '[JSON] TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow 'BulkGetMemberLimitExceeded
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (ReqBody '[JSON] UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow 'NotATeamMember
:> (CanThrow 'NotConnected
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'TeamNotFound
:> (CanThrow 'TooManyTeamMembers
:> (CanThrow 'TooManyTeamAdmins
:> (CanThrow
'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary "Remove an existing team member"
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("members"
:> (Capture
"uid"
(Id 'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary "Remove an existing team member"
:> (Until 'V4
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary "Update an existing team member"
:> (CanThrow 'AccessDenied
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'TeamNotFound
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TooManyTeamAdmins
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required,
Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow 'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
forall api1 (r :: EffectRow) api2.
API api1 r -> API api2 r -> API (api1 :<|> api2) r
<@> API
(Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict, Description "Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get '[JSON] TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture "uid" (Id 'User)
:> Get '[JSON] TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow 'BulkGetMemberLimitExceeded
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional, Strict,
Description "Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (ReqBody '[JSON] UserIdList
:> Post
'[JSON] TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow 'NotATeamMember
:> (CanThrow 'NotConnected
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'TeamNotFound
:> (CanThrow 'TooManyTeamMembers
:> (CanThrow 'TooManyTeamAdmins
:> (CanThrow 'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary "Remove an existing team member"
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant
'ZAuthConn '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture
"uid" (Id 'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary "Remove an existing team member"
:> (Until 'V4
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("members"
:> (Capture
"uid"
(Id 'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary "Update an existing team member"
:> (CanThrow 'AccessDenied
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'TeamNotFound
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TooManyTeamAdmins
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary "Get all members of the team as a CSV file"
:> (CanThrow 'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
API TeamMemberAPI GalleyEffects
teamMemberAPI
API
(Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict, Description "Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get '[JSON] TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture "uid" (Id 'User)
:> Get '[JSON] TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow 'BulkGetMemberLimitExceeded
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional, Strict,
Description "Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (ReqBody '[JSON] UserIdList
:> Post
'[JSON] TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow 'NotATeamMember
:> (CanThrow 'NotConnected
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'TeamNotFound
:> (CanThrow 'TooManyTeamMembers
:> (CanThrow 'TooManyTeamAdmins
:> (CanThrow 'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary "Remove an existing team member"
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant
'ZAuthConn '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture
"uid" (Id 'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary "Remove an existing team member"
:> (Until 'V4
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required, Strict]
:> ("teams"
:> (Capture
"tid" (Id 'Team)
:> ("members"
:> (Capture
"uid"
(Id 'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary "Update an existing team member"
:> (CanThrow 'AccessDenied
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'TeamNotFound
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TooManyTeamAdmins
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary "Get all members of the team as a CSV file"
:> (CanThrow 'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
TeamNotificationAPI
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
-> API
((Named
"get-team-members"
(Summary "Get team members"
:> (CanThrow 'NotATeamMember
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (QueryParam'
'[Optional, Strict,
Description "Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (QueryParam'
'[Optional, Strict,
Description
"Optional, when not specified, the first page will be returned.Every returned page contains a `pagingState`, this should be supplied to retrieve the next page."]
"pagingState"
TeamMembersPagingState
:> Get '[JSON] TeamMembersPage))))))))
:<|> (Named
"get-team-member"
(Summary "Get single team member"
:> (CanThrow 'NotATeamMember
:> (CanThrow 'TeamMemberNotFound
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture "uid" (Id 'User)
:> Get '[JSON] TeamMemberOptPerms))))))))
:<|> (Named
"get-team-members-by-ids"
(Summary "Get team members by user id list"
:> (Description
"The `has_more` field in the response body is always `false`."
:> (CanThrow 'NotATeamMember
:> (CanThrow 'BulkGetMemberLimitExceeded
:> (ZAuthServant 'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("get-members-by-ids-using-post"
:> (QueryParam'
'[Optional, Strict,
Description
"Maximum results to be returned"]
"maxResults"
(Range 1 HardTruncationLimit Int32)
:> (ReqBody '[JSON] UserIdList
:> Post
'[JSON]
TeamMemberListOptPerms))))))))))
:<|> (Named
"add-team-member"
(Summary "Add a new team member"
:> (Until 'V4
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'NoAddToBinding
:> (CanThrow 'NotATeamMember
:> (CanThrow 'NotConnected
:> (CanThrow ('MissingPermission 'Nothing)
:> (CanThrow 'TeamNotFound
:> (CanThrow 'TooManyTeamMembers
:> (CanThrow 'TooManyTeamAdmins
:> (CanThrow 'UserBindingExists
:> (CanThrow
'TooManyTeamMembersOnTeamWithLegalhold
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'POST
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))))))
:<|> (Named
"delete-team-member"
(Summary "Remove an existing team member"
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow ('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> (ZAuthServant
'ZAuthConn '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> (Capture
"uid" (Id 'User)
:> (ReqBody
'[JSON]
TeamMemberDeleteData
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"delete-non-binding-team-member"
(Summary "Remove an existing team member"
:> (Until 'V4
:> (CanThrow AuthenticationError
:> (CanThrow 'AccessDenied
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TeamNotFound
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission 'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required, Strict]
:> ("teams"
:> (Capture
"tid"
(Id 'Team)
:> ("members"
:> (Capture
"uid"
(Id
'User)
:> MultiVerb
'DELETE
'[JSON]
TeamMemberDeleteResultResponseType
TeamMemberDeleteResult))))))))))))))
:<|> (Named
"update-team-member"
(Summary "Update an existing team member"
:> (CanThrow 'AccessDenied
:> (CanThrow 'InvalidPermissions
:> (CanThrow 'TeamNotFound
:> (CanThrow 'TeamMemberNotFound
:> (CanThrow 'TooManyTeamAdmins
:> (CanThrow 'NotATeamMember
:> (CanThrow
('MissingPermission
'Nothing)
:> (ZAuthServant
'ZLocalAuthUser
'[Required, Strict]
:> (ZAuthServant
'ZAuthConn
'[Required,
Strict]
:> ("teams"
:> (Capture
"tid"
(Id
'Team)
:> ("members"
:> (ReqBody
'[JSON]
NewTeamMember
:> MultiVerb
'PUT
'[JSON]
'[RespondEmpty
200
""]
()))))))))))))))
:<|> Named
"get-team-members-csv"
(Summary
"Get all members of the team as a CSV file"
:> (CanThrow 'AccessDenied
:> (Description
"The endpoint returns data in chunked transfer encoding. Internal server errors might result in a failed transfer instead of a 500 response."
:> (ZAuthServant
'ZLocalAuthUser '[Required, Strict]
:> ("teams"
:> (Capture "tid" (Id 'Team)
:> ("members"
:> ("csv"
:> LowLevelStream
'GET
200
'[ '("Content-Disposition",
"attachment; filename=\"wire_team_members.csv\"")]
"CSV of team members"
CSV)))))))))))))))
:<|> TeamNotificationAPI)
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
forall api1 (r :: EffectRow) api2.
API api1 r -> API api2 r -> API (api1 :<|> api2) r
<@> API
TeamNotificationAPI
'[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 (Id 'Conversation),
ListItems
CassandraPaging (QualifiedWithTag 'QRemote (Id 'Conversation)),
ListItems LegacyPaging (Id 'Conversation),
ListItems LegacyPaging (Id 'Team),
ListItems InternalPaging (Id 'Team),
Input (AllFeatures LockableFeature),
Input (Maybe [Id 'Team], FeatureDefaults LegalholdConfig),
Input (QualifiedWithTag 'QLocal ()), 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]
API TeamNotificationAPI GalleyEffects
teamNotificationAPI