Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Documentation
type family IFeatureAPI1 cfg where ... Source #
type IFeatureAPI1Full cfg = IFeatureStatusGet cfg :<|> (IFeatureStatusPut cfg :<|> IFeatureStatusPatch cfg) Source #
type family IAllFeaturesAPI cfgs where ... Source #
IAllFeaturesAPI '[cfg] = IFeatureAPI1 cfg | |
IAllFeaturesAPI (cfg : cfgs) = IFeatureAPI1 cfg :<|> IAllFeaturesAPI cfgs |
type IFeatureAPI = IAllFeaturesAPI Features :<|> (IFeatureStatusLockStatusPut FileSharingConfig :<|> (IFeatureStatusLockStatusPut ConferenceCallingConfig :<|> (IFeatureStatusLockStatusPut SelfDeletingMessagesConfig :<|> (IFeatureStatusLockStatusPut GuestLinksConfig :<|> (IFeatureStatusLockStatusPut SndFactorPasswordChallengeConfig :<|> (IFeatureStatusLockStatusPut MLSConfig :<|> (IFeatureStatusLockStatusPut OutlookCalIntegrationConfig :<|> (IFeatureStatusLockStatusPut MlsE2EIdConfig :<|> (IFeatureStatusLockStatusPut MlsMigrationConfig :<|> (IFeatureStatusLockStatusPut EnforceFileDownloadLocationConfig :<|> (IFeatureNoConfigMultiGet SearchVisibilityInboundConfig :<|> Named "feature-configs-internal" (Summary "Get all feature configs (for user/team; if n/a fall back to site config)." :> ("feature-configs" :> (CanThrow OperationDenied :> (CanThrow 'NotATeamMember :> (CanThrow 'TeamNotFound :> (QueryParam' [Optional, Strict, Description "Optional user id"] "user_id" UserId :> Get '[JSON] AllTeamFeatures))))))))))))))))) Source #
type InternalAPI = "i" :> InternalAPIBase Source #
type InternalAPIBase = Named "status" ("status" :> MultiVerb 'GET '[JSON] '[RespondEmpty 200 "OK"] ()) :<|> (Named "delete-user" (Summary "Remove a user from their teams and conversations and erase their clients" :> (ZLocalUser :> (ZOptConn :> ("user" :> MultiVerb 'DELETE '[JSON] '[RespondEmpty 200 "Remove a user from Galley"] ())))) :<|> (Named "connect" (Summary "Create a connect conversation (deprecated)" :> (CanThrow 'ConvNotFound :> (CanThrow 'InvalidOperation :> (CanThrow 'NotConnected :> (CanThrow UnreachableBackends :> (ZLocalUser :> (ZOptConn :> ("conversations" :> ("connect" :> (ReqBody '[JSON] Connect :> ConversationVerb 'V6 Conversation)))))))))) :<|> (Named "get-conversation-clients" (Summary "Get mls conversation client list" :> (CanThrow 'ConvNotFound :> ("group" :> (Capture "gid" GroupId :> MultiVerb1 'GET '[JSON] (Respond 200 "Clients" ClientList))))) :<|> (Named "guard-legalhold-policy-conflicts" ("guard-legalhold-policy-conflicts" :> (CanThrow 'MissingLegalholdConsent :> (CanThrow 'MissingLegalholdConsentOldClients :> (ReqBody '[JSON] GuardLegalholdPolicyConflicts :> MultiVerb1 'PUT '[JSON] (RespondEmpty 200 "Guard Legalhold Policy"))))) :<|> (ILegalholdWhitelistedTeamsAPI :<|> (ITeamsAPI :<|> (IMiscAPI :<|> (Named "upsert-one2one" (Summary "Create or Update a connect or one2one conversation." :> ("conversations" :> ("one2one" :> ("upsert" :> (ReqBody '[JSON] UpsertOne2OneConversationRequest :> MultiVerb1 'POST '[JSON] (RespondEmpty 200 "Upsert One2One Policy")))))) :<|> (IFeatureAPI :<|> (IFederationAPI :<|> (IConversationAPI :<|> IEJPDAPI))))))))))) Source #
type ILegalholdWhitelistedTeamsAPI = "legalhold" :> ("whitelisted-teams" :> (Capture "tid" TeamId :> ILegalholdWhitelistedTeamsAPIBase)) Source #
type ILegalholdWhitelistedTeamsAPIBase = Named "set-team-legalhold-whitelisted" (MultiVerb1 'PUT '[JSON] (RespondEmpty 200 "Team Legalhold Whitelisted")) :<|> (Named "unset-team-legalhold-whitelisted" (MultiVerb1 'DELETE '[JSON] (RespondEmpty 204 "Team Legalhold un-Whitelisted")) :<|> Named "get-team-legalhold-whitelisted" (MultiVerb 'GET '[JSON] '[RespondEmpty 404 "Team not Legalhold Whitelisted", RespondEmpty 200 "Team Legalhold Whitelisted"] Bool)) Source #
type ITeamsAPIBase = Named "get-team-internal" (CanThrow 'TeamNotFound :> Get '[JSON] TeamData) :<|> (Named "create-binding-team" (ZUser :> (ReqBody '[JSON] NewTeam :> MultiVerb1 'PUT '[JSON] (WithHeaders '[Header "Location" TeamId] TeamId (RespondEmpty 201 "OK")))) :<|> (Named "delete-binding-team" (CanThrow 'NoBindingTeam :> (CanThrow 'NotAOneMemberTeam :> (CanThrow 'DeleteQueueFull :> (CanThrow 'TeamNotFound :> (QueryFlag "force" :> MultiVerb1 'DELETE '[JSON] (RespondEmpty 202 "OK")))))) :<|> (Named "get-team-name" ("name" :> (CanThrow 'TeamNotFound :> Get '[JSON] TeamName)) :<|> (Named "update-team-status" ("status" :> (CanThrow 'TeamNotFound :> (CanThrow 'InvalidTeamStatusUpdate :> (ReqBody '[JSON] TeamStatusUpdate :> MultiVerb1 'PUT '[JSON] (RespondEmpty 200 "OK"))))) :<|> (("members" :> (Named "unchecked-add-team-member" (CanThrow 'TooManyTeamMembers :> (CanThrow 'TooManyTeamMembersOnTeamWithLegalhold :> (CanThrow 'TooManyTeamAdmins :> (ReqBody '[JSON] NewTeamMember :> MultiVerb1 'POST '[JSON] (RespondEmpty 200 "OK"))))) :<|> (Named "unchecked-get-team-members" (QueryParam' '[Strict] "maxResults" (Range 1 HardTruncationLimit Int32) :> Get '[JSON] TeamMemberList) :<|> (Named "unchecked-get-team-member" (Capture "uid" UserId :> (CanThrow 'TeamMemberNotFound :> Get '[JSON] TeamMember)) :<|> (Named "can-user-join-team" ("check" :> (CanThrow 'TooManyTeamMembersOnTeamWithLegalhold :> MultiVerb1 'GET '[JSON] (RespondEmpty 200 "User can join"))) :<|> Named "unchecked-update-team-member" (CanThrow 'AccessDenied :> (CanThrow 'InvalidPermissions :> (CanThrow 'TeamNotFound :> (CanThrow 'TeamMemberNotFound :> (CanThrow 'TooManyTeamAdmins :> (CanThrow 'NotATeamMember :> (CanThrow OperationDenied :> (ReqBody '[JSON] NewTeamMember :> MultiVerb1 'PUT '[JSON] (RespondEmpty 200 "")))))))))))))) :<|> (Named "user-is-team-owner" ("is-team-owner" :> (Capture "uid" UserId :> (CanThrow 'AccessDenied :> (CanThrow 'TeamMemberNotFound :> (CanThrow 'NotATeamMember :> MultiVerb1 'GET '[JSON] (RespondEmpty 200 "User is team owner")))))) :<|> ("search-visibility" :> (Named "get-search-visibility-internal" (Get '[JSON] TeamSearchVisibilityView) :<|> Named "set-search-visibility-internal" (CanThrow 'TeamSearchVisibilityNotEnabled :> (CanThrow OperationDenied :> (CanThrow 'NotATeamMember :> (CanThrow 'TeamNotFound :> (ReqBody '[JSON] TeamSearchVisibilityView :> MultiVerb1 'PUT '[JSON] (RespondEmpty 204 "OK")))))))))))))) Source #
type IFeatureStatusGet cfg = Named '("iget", cfg) (Description (FeatureAPIDesc cfg) :> FeatureStatusBaseGet cfg) Source #
type IFeatureStatusPut cfg = Named '("iput", cfg) (Description (FeatureAPIDesc cfg) :> FeatureStatusBasePutInternal cfg) Source #
type IFeatureStatusPatch cfg = Named '("ipatch", cfg) (Description (FeatureAPIDesc cfg) :> FeatureStatusBasePatchInternal cfg) Source #
type FeatureStatusBasePutInternal cfg = FeatureStatusBaseInternal (AppendSymbol "Put config for " (FeatureSymbol cfg)) cfg (ReqBody '[JSON] (Feature cfg) :> Put '[JSON] (LockableFeature cfg)) Source #
type FeatureStatusBasePatchInternal cfg = FeatureStatusBaseInternal (AppendSymbol "Patch config for " (FeatureSymbol cfg)) cfg (ReqBody '[JSON] (LockableFeaturePatch cfg) :> Patch '[JSON] (LockableFeature cfg)) Source #
type FeatureStatusBaseInternal desc cfg a = Summary desc :> (CanThrow OperationDenied :> (CanThrow 'NotATeamMember :> (CanThrow 'TeamNotFound :> (CanThrow TeamFeatureError :> (CanThrowMany (FeatureErrors cfg) :> ("teams" :> (Capture "tid" TeamId :> ("features" :> (FeatureSymbol cfg :> a))))))))) Source #
type IFeatureStatusLockStatusPut cfg = Named '("ilock", cfg) (Summary (AppendSymbol "(Un-)lock " (FeatureSymbol cfg)) :> (Description (FeatureAPIDesc cfg) :> (CanThrow 'NotATeamMember :> (CanThrow 'TeamNotFound :> ("teams" :> (Capture "tid" TeamId :> ("features" :> (FeatureSymbol cfg :> (Capture "lockStatus" LockStatus :> Put '[JSON] LockStatusResponse))))))))) Source #
type FeatureNoConfigMultiGetBase featureName = Summary (AppendSymbol "Get team feature status in bulk for feature " (FeatureSymbol featureName)) :> ("features-multi-teams" :> (FeatureSymbol featureName :> (ReqBody '[JSON] TeamFeatureNoConfigMultiRequest :> Post '[JSON] (TeamFeatureNoConfigMultiResponse featureName)))) Source #
type IFeatureNoConfigMultiGet f = Named '("igetmulti", f) (FeatureNoConfigMultiGetBase f) Source #
type IFederationAPI = Named "get-federation-status" (Summary "Get the federation status (only needed for integration/QA tests at the time of writing it)" :> (CanThrow UnreachableBackends :> (ZLocalUser :> ("federation-status" :> (ReqBody '[JSON] RemoteDomains :> Get '[JSON] FederationStatus))))) Source #
type IConversationAPI = Named "conversation-get-member" ("conversations" :> (Capture "cnv" ConvId :> ("members" :> (Capture "usr" UserId :> Get '[JSON] (Maybe Member))))) :<|> (Named "conversation-accept-v2" (CanThrow 'InvalidOperation :> (CanThrow 'ConvNotFound :> (ZLocalUser :> (ZOptConn :> ("conversations" :> (Capture "cnv" ConvId :> ("accept" :> ("v2" :> Put '[JSON] Conversation)))))))) :<|> (Named "conversation-block-unqualified" (CanThrow 'InvalidOperation :> (CanThrow 'ConvNotFound :> (ZUser :> ("conversations" :> (Capture "cnv" ConvId :> ("block" :> Put '[JSON] ())))))) :<|> (Named "conversation-block" (CanThrow 'InvalidOperation :> (CanThrow 'ConvNotFound :> (ZLocalUser :> ("conversations" :> (QualifiedCapture "cnv" ConvId :> ("block" :> Put '[JSON] ())))))) :<|> (Named "conversation-unblock-unqualified" (CanThrow 'InvalidOperation :> (CanThrow 'ConvNotFound :> (ZLocalUser :> (ZOptConn :> ("conversations" :> (Capture "cnv" ConvId :> ("unblock" :> Put '[JSON] Conversation))))))) :<|> (Named "conversation-unblock" (CanThrow 'InvalidOperation :> (CanThrow 'ConvNotFound :> (ZLocalUser :> (ZOptConn :> ("conversations" :> (QualifiedCapture "cnv" ConvId :> ("unblock" :> Put '[JSON] ()))))))) :<|> (Named "conversation-meta" (CanThrow 'ConvNotFound :> ("conversations" :> (Capture "cnv" ConvId :> ("meta" :> Get '[JSON] ConversationMetadata)))) :<|> (Named "conversation-mls-one-to-one" (CanThrow 'NotConnected :> (CanThrow 'MLSNotEnabled :> ("conversations" :> ("mls-one2one" :> (ZLocalUser :> (QualifiedCapture "user" UserId :> Get '[JSON] Conversation)))))) :<|> Named "conversation-mls-one-to-one-established" (CanThrow 'NotConnected :> (CanThrow 'MLSNotEnabled :> (ZLocalUser :> ("conversations" :> ("mls-one2one" :> (QualifiedCapture "user" UserId :> ("established" :> Get '[JSON] Bool)))))))))))))) Source #
type IMiscAPI = Named "get-team-members" (CanThrow 'NonBindingTeam :> (CanThrow 'TeamNotFound :> ("users" :> (Capture "uid" UserId :> ("team" :> ("members" :> Get '[JSON] TeamMemberList)))))) :<|> (Named "get-team-id" (CanThrow 'NonBindingTeam :> (CanThrow 'TeamNotFound :> ("users" :> (Capture "uid" UserId :> ("team" :> Get '[JSON] TeamId))))) :<|> (Named "test-get-clients" ("test" :> ("clients" :> (ZUser :> Get '[JSON] [ClientId]))) :<|> (Named "test-add-client" ("clients" :> (ZUser :> (Capture "cid" ClientId :> MultiVerb1 'POST '[JSON] (RespondEmpty 200 "OK")))) :<|> (Named "test-delete-client" ("clients" :> (ZUser :> (Capture "cid" ClientId :> MultiVerb1 'DELETE '[JSON] (RespondEmpty 200 "OK")))) :<|> (Named "add-service" ("services" :> (ReqBody '[JSON] Service :> MultiVerb1 'POST '[JSON] (RespondEmpty 200 "OK"))) :<|> (Named "delete-service" ("services" :> (ReqBody '[JSON] ServiceRef :> MultiVerb1 'DELETE '[JSON] (RespondEmpty 200 "OK"))) :<|> (Named "i-add-bot" (CanThrow ('ActionDenied 'AddConversationMember) :> (CanThrow 'ConvNotFound :> (CanThrow 'InvalidOperation :> (CanThrow 'TooManyMembers :> ("bots" :> (ZLocalUser :> (ZConn :> (ReqBody '[JSON] AddBot :> Post '[JSON] Event)))))))) :<|> (Named "delete-bot" (CanThrow 'ConvNotFound :> (CanThrow ('ActionDenied 'RemoveConversationMember) :> ("bots" :> (ZLocalUser :> (ZOptConn :> (ReqBody '[JSON] RemoveBot :> MultiVerb 'DELETE '[JSON] (UpdateResponses "Bot not found" "Bot deleted" Event) (UpdateResult Event))))))) :<|> (Named "put-custom-backend" ("custom-backend" :> ("by-domain" :> (Capture "domain" Domain :> (ReqBody '[JSON] CustomBackend :> MultiVerb1 'PUT '[JSON] (RespondEmpty 201 "OK"))))) :<|> Named "delete-custom-backend" ("custom-backend" :> ("by-domain" :> (Capture "domain" Domain :> MultiVerb1 'DELETE '[JSON] (RespondEmpty 200 "OK"))))))))))))) Source #
type IEJPDAPI = Named "get-conversations-by-user" (CanThrow 'NotConnected :> ("user" :> (Capture "user" UserId :> ("all-conversations" :> Get '[JSON] [EJPDConvInfo])))) Source #
swaggerDoc :: OpenApi Source #