diff --git a/changelog.d/1-api-changes/pr-2492 b/changelog.d/1-api-changes/pr-2492 new file mode 100644 index 0000000000..8f7badb6df --- /dev/null +++ b/changelog.d/1-api-changes/pr-2492 @@ -0,0 +1 @@ +Retire deprecated feature config API endpoints for API version V2 diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Galley.hs b/libs/wire-api/src/Wire/API/Routes/Public/Galley.hs index d00e14bc00..3d09e303ba 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Galley.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Galley.hs @@ -1098,14 +1098,14 @@ type FeatureAPI = LegalholdConfig :<|> FeatureStatusGet SearchVisibilityAvailableConfig :<|> FeatureStatusPut '() SearchVisibilityAvailableConfig - :<|> FeatureStatusDeprecatedGet SearchVisibilityAvailableConfig - :<|> FeatureStatusDeprecatedPut SearchVisibilityAvailableConfig + :<|> FeatureStatusDeprecatedGet "This endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022" SearchVisibilityAvailableConfig + :<|> FeatureStatusDeprecatedPut "This endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022" SearchVisibilityAvailableConfig :<|> SearchVisibilityGet :<|> SearchVisibilitySet :<|> FeatureStatusGet ValidateSAMLEmailsConfig - :<|> FeatureStatusDeprecatedGet ValidateSAMLEmailsConfig + :<|> FeatureStatusDeprecatedGet "This endpoint is potentially used by the old Android client. It is not used by iOS, team management, or webapp as of June 2022" ValidateSAMLEmailsConfig :<|> FeatureStatusGet DigitalSignaturesConfig - :<|> FeatureStatusDeprecatedGet DigitalSignaturesConfig + :<|> FeatureStatusDeprecatedGet "The usage of this endpoint was removed in iOS in version 3.101. It is potentially used by the old Android client. It is not used by team management, or webapp as of June 2022" DigitalSignaturesConfig :<|> FeatureStatusGet AppLockConfig :<|> FeatureStatusPut '() AppLockConfig :<|> FeatureStatusGet FileSharingConfig @@ -1120,18 +1120,18 @@ type FeatureAPI = :<|> FeatureStatusPut '() SndFactorPasswordChallengeConfig :<|> AllFeatureConfigsUserGet :<|> AllFeatureConfigsTeamGet - :<|> FeatureConfigGet LegalholdConfig - :<|> FeatureConfigGet SSOConfig - :<|> FeatureConfigGet SearchVisibilityAvailableConfig - :<|> FeatureConfigGet ValidateSAMLEmailsConfig - :<|> FeatureConfigGet DigitalSignaturesConfig - :<|> FeatureConfigGet AppLockConfig - :<|> FeatureConfigGet FileSharingConfig - :<|> FeatureConfigGet ClassifiedDomainsConfig - :<|> FeatureConfigGet ConferenceCallingConfig - :<|> FeatureConfigGet SelfDeletingMessagesConfig - :<|> FeatureConfigGet GuestLinksConfig - :<|> FeatureConfigGet SndFactorPasswordChallengeConfig + :<|> FeatureConfigDeprecatedGet "The 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" LegalholdConfig + :<|> FeatureConfigDeprecatedGet "The usage of this endpoint was removed in iOS in version 3.101. It is used by team management, webapp, and potentially the old Android client as of June 2022" SSOConfig + :<|> FeatureConfigDeprecatedGet "The 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" SearchVisibilityAvailableConfig + :<|> FeatureConfigDeprecatedGet "The 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" ValidateSAMLEmailsConfig + :<|> FeatureConfigDeprecatedGet "The usage of this endpoint was removed in iOS in version 3.101. It is used by team management, webapp, and potentially the old Android client as of June 2022" DigitalSignaturesConfig + :<|> FeatureConfigDeprecatedGet "The usage of this endpoint was removed in iOS in version 3.101. It is used by team management, webapp, and potentially the old Android client as of June 2022" AppLockConfig + :<|> FeatureConfigDeprecatedGet "The usage of this endpoint was removed in iOS in version 3.101. It is used by team management, webapp, and potentially the old Android client as of June 2022" FileSharingConfig + :<|> FeatureConfigDeprecatedGet "The 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" ClassifiedDomainsConfig + :<|> FeatureConfigDeprecatedGet "The 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" ConferenceCallingConfig + :<|> FeatureConfigDeprecatedGet "The 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" SelfDeletingMessagesConfig + :<|> FeatureConfigDeprecatedGet "The usage of this endpoint was removed in iOS in version 3.101. It is used by team management, webapp, and potentially the old Android client as of June 2022" GuestLinksConfig + :<|> FeatureConfigDeprecatedGet "The usage of this endpoint was removed in iOS in version 3.101. It is used by team management, webapp, and potentially the old Android client as of June 2022" SndFactorPasswordChallengeConfig type FeatureStatusGet f = Named @@ -1143,15 +1143,15 @@ type FeatureStatusPut errs f = '("put", f) (ZUser :> FeatureStatusBasePutPublic errs f) -type FeatureStatusDeprecatedGet f = +type FeatureStatusDeprecatedGet d f = Named '("get-deprecated", f) - (ZUser :> FeatureStatusBaseDeprecatedGet f) + (ZUser :> FeatureStatusBaseDeprecatedGet d f) -type FeatureStatusDeprecatedPut f = +type FeatureStatusDeprecatedPut d f = Named '("put-deprecated", f) - (ZUser :> FeatureStatusBaseDeprecatedPut f) + (ZUser :> FeatureStatusBaseDeprecatedPut d f) type FeatureStatusBaseGet featureConfig = Summary (AppendSymbol "Get config for " (FeatureSymbol featureConfig)) @@ -1179,9 +1179,16 @@ type FeatureStatusBasePutPublic errs featureConfig = :> Put '[Servant.JSON] (WithStatus featureConfig) -- | A type for a GET endpoint for a feature with a deprecated path -type FeatureStatusBaseDeprecatedGet featureConfig = +type FeatureStatusBaseDeprecatedGet desc featureConfig = ( Summary (AppendSymbol "[deprecated] Get config for " (FeatureSymbol featureConfig)) + :> Until 'V2 + :> Description + ( "Deprecated. Please use `GET /teams/:tid/features/" + `AppendSymbol` FeatureSymbol featureConfig + `AppendSymbol` "` instead.\n" + `AppendSymbol` desc + ) :> CanThrow 'NotATeamMember :> CanThrow OperationDenied :> CanThrow 'TeamNotFound @@ -1193,9 +1200,16 @@ type FeatureStatusBaseDeprecatedGet featureConfig = ) -- | A type for a PUT endpoint for a feature with a deprecated path -type FeatureStatusBaseDeprecatedPut featureConfig = +type FeatureStatusBaseDeprecatedPut desc featureConfig = Summary (AppendSymbol "[deprecated] Get config for " (FeatureSymbol featureConfig)) + :> Until 'V2 + :> Description + ( "Deprecated. Please use `PUT /teams/:tid/features/" + `AppendSymbol` FeatureSymbol featureConfig + `AppendSymbol` "` instead.\n" + `AppendSymbol` desc + ) :> CanThrow 'NotATeamMember :> CanThrow OperationDenied :> CanThrow 'TeamNotFound @@ -1207,10 +1221,12 @@ type FeatureStatusBaseDeprecatedPut featureConfig = :> ReqBody '[Servant.JSON] (WithStatusNoLock featureConfig) :> Put '[Servant.JSON] (WithStatus featureConfig) -type FeatureConfigGet featureConfig = +type FeatureConfigDeprecatedGet desc featureConfig = Named '("get-config", featureConfig) - ( Summary (AppendSymbol "Get feature config for feature " (FeatureSymbol featureConfig)) + ( Summary (AppendSymbol "[deprecated] Get feature config for feature " (FeatureSymbol featureConfig)) + :> Until 'V2 + :> Description ("Deprecated. Please use `GET /feature-configs` instead.\n" `AppendSymbol` desc) :> ZUser :> CanThrow 'NotATeamMember :> CanThrow OperationDenied diff --git a/services/galley/src/Galley/API/Internal.hs b/services/galley/src/Galley/API/Internal.hs index 50ce662f2d..bcaac0873e 100644 --- a/services/galley/src/Galley/API/Internal.hs +++ b/services/galley/src/Galley/API/Internal.hs @@ -130,18 +130,18 @@ type IFeatureAPI = -- SearchVisibilityAvailableConfig :<|> IFeatureStatusGet SearchVisibilityAvailableConfig :<|> IFeatureStatusPut '() SearchVisibilityAvailableConfig - :<|> IFeatureStatusDeprecatedGet SearchVisibilityAvailableConfig - :<|> IFeatureStatusDeprecatedPut SearchVisibilityAvailableConfig + :<|> IFeatureStatusDeprecatedGet "" SearchVisibilityAvailableConfig + :<|> IFeatureStatusDeprecatedPut "" SearchVisibilityAvailableConfig -- ValidateSAMLEmailsConfig :<|> IFeatureStatusGet ValidateSAMLEmailsConfig :<|> IFeatureStatusPut '() ValidateSAMLEmailsConfig - :<|> IFeatureStatusDeprecatedGet ValidateSAMLEmailsConfig - :<|> IFeatureStatusDeprecatedPut ValidateSAMLEmailsConfig + :<|> IFeatureStatusDeprecatedGet "" ValidateSAMLEmailsConfig + :<|> IFeatureStatusDeprecatedPut "" ValidateSAMLEmailsConfig -- DigitalSignaturesConfig :<|> IFeatureStatusGet DigitalSignaturesConfig :<|> IFeatureStatusPut '() DigitalSignaturesConfig - :<|> IFeatureStatusDeprecatedGet DigitalSignaturesConfig - :<|> IFeatureStatusDeprecatedPut DigitalSignaturesConfig + :<|> IFeatureStatusDeprecatedGet "" DigitalSignaturesConfig + :<|> IFeatureStatusDeprecatedPut "" DigitalSignaturesConfig -- AppLockConfig :<|> IFeatureStatusGet AppLockConfig :<|> IFeatureStatusPut '() AppLockConfig @@ -364,9 +364,9 @@ type FeatureStatusBasePutInternal errs featureConfig = :> QueryParam "ttl" FeatureTTL :> Put '[Servant.JSON] (WithStatus featureConfig) -type IFeatureStatusDeprecatedGet f = Named '("iget-deprecated", f) (FeatureStatusBaseDeprecatedGet f) +type IFeatureStatusDeprecatedGet d f = Named '("iget-deprecated", f) (FeatureStatusBaseDeprecatedGet d f) -type IFeatureStatusDeprecatedPut f = Named '("iput-deprecated", f) (FeatureStatusBaseDeprecatedPut f) +type IFeatureStatusDeprecatedPut d f = Named '("iput-deprecated", f) (FeatureStatusBaseDeprecatedPut d f) type IFeatureStatusLockStatusPut featureName = Named