Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/1-api-changes/pr-2492
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retire deprecated feature config API endpoints for API version V2
64 changes: 40 additions & 24 deletions libs/wire-api/src/Wire/API/Routes/Public/Galley.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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))
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
16 changes: 8 additions & 8 deletions services/galley/src/Galley/API/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down