diff --git a/changelog.d/1-api-changes/WPB-15030 b/changelog.d/1-api-changes/WPB-15030 new file mode 100644 index 00000000000..2e3fdfc8ab7 --- /dev/null +++ b/changelog.d/1-api-changes/WPB-15030 @@ -0,0 +1 @@ +Deprecated API endpoints were removed from API version V8. diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs b/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs index 763cb7afc73..ca49bd99679 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Brig.hs @@ -602,6 +602,7 @@ type AccountAPI = "post-password-reset-key-deprecated" ( Summary "Complete a password reset." :> Deprecated + :> Until 'V8 :> CanThrow 'PasswordResetInProgress :> CanThrow 'InvalidPasswordResetKey :> CanThrow 'InvalidPasswordResetCode @@ -616,6 +617,7 @@ type AccountAPI = "onboarding" ( Summary "Upload contacts and invoke matching." :> Deprecated + :> Until 'V8 :> Description "DEPRECATED: the feature has been turned off, the end-point does \ \nothing and always returns '{\"results\":[],\"auto-connects\":[]}'." @@ -1695,6 +1697,7 @@ type CallingAPI = "Retrieve TURN server addresses and credentials for \ \ IP addresses, scheme `turn` and transport `udp` only (deprecated)" :> Deprecated + :> Until 'V8 :> ZUser :> ZConn :> "calls" diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Galley/Conversation.hs b/libs/wire-api/src/Wire/API/Routes/Public/Galley/Conversation.hs index 60802b1c5bc..0a2368d0da0 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Galley/Conversation.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Galley/Conversation.hs @@ -1033,6 +1033,7 @@ type ConversationAPI = "update-conversation-name-deprecated" ( Summary "Update conversation name (deprecated)" :> Deprecated + :> Until 'V8 :> Description "Use `/conversations/:domain/:conv/name` instead." :> CanThrow ('ActionDenied 'ModifyConversationName) :> CanThrow 'ConvNotFound @@ -1052,6 +1053,7 @@ type ConversationAPI = "update-conversation-name-unqualified" ( Summary "Update conversation name (deprecated)" :> Deprecated + :> Until 'V8 :> Description "Use `/conversations/:domain/:conv/name` instead." :> CanThrow ('ActionDenied 'ModifyConversationName) :> CanThrow 'ConvNotFound @@ -1092,6 +1094,7 @@ type ConversationAPI = "update-conversation-message-timer-unqualified" ( Summary "Update the message timer for a conversation (deprecated)" :> Deprecated + :> Until 'V8 :> Description "Use `/conversations/:domain/:cnv/message-timer` instead." :> ZLocalUser :> ZConn @@ -1134,6 +1137,7 @@ type ConversationAPI = "update-conversation-receipt-mode-unqualified" ( Summary "Update receipt mode for a conversation (deprecated)" :> Deprecated + :> Until 'V8 :> Description "Use `PUT /conversations/:domain/:cnv/receipt-mode` instead." :> ZLocalUser :> ZConn @@ -1243,7 +1247,9 @@ type ConversationAPI = :<|> Named "get-conversation-self-unqualified" ( Summary "Get self membership properties (deprecated)" + :> Description "Use `/conversations/:domain/:conv` instead and get the self member from `response.members.self`." :> Deprecated + :> Until 'V8 :> ZLocalUser :> "conversations" :> Capture' '[Description "Conversation ID"] "cnv" ConvId @@ -1254,6 +1260,7 @@ type ConversationAPI = "update-conversation-self-unqualified" ( Summary "Update self membership properties (deprecated)" :> Deprecated + :> Until 'V8 :> Description "Use `/conversations/:domain/:conv/self` instead." :> CanThrow 'ConvNotFound :> ZLocalUser diff --git a/libs/wire-api/src/Wire/API/Routes/Public/Spar.hs b/libs/wire-api/src/Wire/API/Routes/Public/Spar.hs index 5e9de5a5111..bf651c8d5eb 100644 --- a/libs/wire-api/src/Wire/API/Routes/Public/Spar.hs +++ b/libs/wire-api/src/Wire/API/Routes/Public/Spar.hs @@ -60,7 +60,13 @@ type DeprecateSSOAPIV1 = \Details: https://docs.wire.com/understand/single-sign-on/trouble-shooting.html#can-i-use-the-same-sso-login-code-for-multiple-teams" type APISSO = - Named "sso-metadata" (DeprecateSSOAPIV1 :> Deprecated :> "metadata" :> SAML.APIMeta) + Named + "sso-metadata" + ( -- This deprecated endpoint should be removed at some point. However it does not make a lot of sense to apply our versioning mechanism to it, + -- as this is not a classic client API endpoint. It is used in the SAML IDP flow and should exist independently of the API version, + -- and requires a different process for decommissioning. See https://wearezeta.atlassian.net/browse/WPB-15319 + DeprecateSSOAPIV1 :> Deprecated :> "metadata" :> SAML.APIMeta + ) :<|> Named "sso-team-metadata" ("metadata" :> Capture "team" TeamId :> SAML.APIMeta) :<|> "initiate-login" :> APIAuthReqPrecheck :<|> "initiate-login" :> APIAuthReq @@ -89,6 +95,9 @@ type APIAuthReq = :> Get '[SAML.HTML] (SAML.FormRedirect SAML.AuthnRequest) ) +-- | This deprecated endpoint should be removed at some point. However it does not make a lot of sense to apply our versioning mechanism to it, +-- as this is not a classic client API endpoint. It is used in the SAML IDP flow and should exist independently of the API version, +-- and requires a different process for decommissioning. See https://wearezeta.atlassian.net/browse/WPB-15319 type APIAuthRespLegacy = Named "auth-resp-legacy" diff --git a/services/galley/test/integration/API.hs b/services/galley/test/integration/API.hs index fab0d096d8b..4a0fbfec952 100644 --- a/services/galley/test/integration/API.hs +++ b/services/galley/test/integration/API.hs @@ -2729,7 +2729,6 @@ putQualifiedConvRenameOk = do putConvDeprecatedRenameOk :: TestM () putConvDeprecatedRenameOk = do c <- view tsCannon - g <- viewGalley alice <- randomUser qbob <- randomQualifiedUser let bob = qUnqualified qbob @@ -2737,10 +2736,11 @@ putConvDeprecatedRenameOk = do conv <- decodeConvId <$> postO2OConv alice bob (Just "gossip") let qconv = Qualified conv (qDomain qbob) WS.bracketR2 c alice bob $ \(wsA, wsB) -> do + unversionedGalley <- view tsUnversionedGalley -- This endpoint is deprecated but clients still use it put - ( g - . paths ["conversations", toByteString' conv] + ( unversionedGalley + . paths ["v7", "conversations", toByteString' conv] . zUser bob . zConn "conn" . zType "access" diff --git a/services/galley/test/integration/API/Util.hs b/services/galley/test/integration/API/Util.hs index 4e10d03a738..83a63582ec1 100644 --- a/services/galley/test/integration/API/Util.hs +++ b/services/galley/test/integration/API/Util.hs @@ -637,10 +637,10 @@ createMLSTeamConv lusr c tid users name access role timer convRole = do updateTeamConv :: UserId -> ConvId -> ConversationRename -> TestM ResponseLBS updateTeamConv zusr convid upd = do - g <- viewGalley + g <- view tsUnversionedGalley put ( g - . paths ["/conversations", toByteString' convid] + . paths ["v7", "conversations", toByteString' convid] . zUser zusr . zConn "conn" . zType "access" @@ -1181,10 +1181,10 @@ deleteMemberQualified u1 (Qualified u2 u2Domain) (Qualified conv convDomain) = d getSelfMember :: UserId -> ConvId -> TestM ResponseLBS getSelfMember u c = do - g <- viewGalley + g <- view tsUnversionedGalley get $ g - . paths ["conversations", toByteString' c, "self"] + . paths ["v7", "conversations", toByteString' c, "self"] . zUser u . zConn "conn" . zType "access" @@ -1261,11 +1261,11 @@ putQualifiedConversationName u c n = do putConversationName :: UserId -> ConvId -> Text -> TestM ResponseLBS putConversationName u c n = do - g <- viewGalley + g <- view tsUnversionedGalley let update = ConversationRename n put ( g - . paths ["conversations", toByteString' c, "name"] + . paths ["v7", "conversations", toByteString' c, "name"] . zUser u . zConn "conn" . zType "access" @@ -1292,11 +1292,11 @@ putQualifiedReceiptMode u (Qualified c dom) r = do putReceiptMode :: UserId -> ConvId -> ReceiptMode -> TestM ResponseLBS putReceiptMode u c r = do - g <- viewGalley + g <- view tsUnversionedGalley let update = ConversationReceiptModeUpdate r put ( g - . paths ["conversations", toByteString' c, "receipt-mode"] + . paths ["v7", "conversations", toByteString' c, "receipt-mode"] . zUser u . zConn "conn" . zType "access" @@ -1379,10 +1379,10 @@ putMessageTimerUpdateQualified u c acc = do putMessageTimerUpdate :: UserId -> ConvId -> ConversationMessageTimerUpdate -> TestM ResponseLBS putMessageTimerUpdate u c acc = do - g <- viewGalley + g <- view tsUnversionedGalley put $ g - . paths ["/conversations", toByteString' c, "message-timer"] + . paths ["v7", "conversations", toByteString' c, "message-timer"] . zUser u . zConn "conn" . zType "access"