Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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-3213
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Non-binding team endpoints are removed from API version V4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Non-binding team endpoints are removed from API version V4
Remove deprecated non-binding team endpoints from API version V4

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this appears in the changelog, it is already in the past. So I prefer past tense or even better "have been removed" (present perfect progressive). But I will not hold my opinion very strongly. :)

3 changes: 2 additions & 1 deletion libs/wire-api/src/Wire/API/Routes/Public/Galley/Team.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ import Wire.API.Error.Galley
import Wire.API.Routes.MultiVerb
import Wire.API.Routes.Named
import Wire.API.Routes.Public
import Wire.API.Routes.Version
import Wire.API.Team
import Wire.API.Team.Permission

type TeamAPI =
Named
"create-non-binding-team"
( Summary "Create a new non binding team"
-- FUTUREWORK: deprecated in https://github.com/wireapp/wire-server/pull/2607
:> Until 'V4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe still link the PR and/or ticket? not sure, maybe it's unnecessary noise.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer less noise.

:> ZUser
:> ZConn
:> CanThrow 'NotConnected
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import Wire.API.Routes.LowLevelStream
import Wire.API.Routes.MultiVerb
import Wire.API.Routes.Named
import Wire.API.Routes.Public
import Wire.API.Routes.Version
import Wire.API.Team.Member
import qualified Wire.API.User as User

Expand Down Expand Up @@ -96,7 +97,7 @@ type TeamMemberAPI =
:<|> Named
"add-team-member"
( Summary "Add a new team member"
-- FUTUREWORK: deprecated in https://github.com/wireapp/wire-server/pull/2607
:> Until 'V4
:> CanThrow 'InvalidPermissions
:> CanThrow 'NoAddToBinding
:> CanThrow 'NotATeamMember
Expand Down Expand Up @@ -142,7 +143,7 @@ type TeamMemberAPI =
:<|> Named
"delete-non-binding-team-member"
( Summary "Remove an existing team member"
-- FUTUREWORK: deprecated in https://github.com/wireapp/wire-server/pull/2607
:> Until 'V4
:> CanThrow AuthenticationError
:> CanThrow 'AccessDenied
:> CanThrow 'TeamMemberNotFound
Expand Down
7 changes: 5 additions & 2 deletions libs/wire-api/src/Wire/API/Team.hs
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,18 @@ newTeam tid uid nme ico tb = Team tid uid nme ico Nothing tb DefaultIcon

instance ToSchema Team where
schema =
object "Team" $
objectWithDocModifier "Team" desc $
Team
<$> _teamId .= field "id" schema
<*> _teamCreator .= field "creator" schema
<*> _teamName .= field "name" schema
<*> _teamIcon .= field "icon" schema
<*> _teamIconKey .= maybe_ (optField "icon_key" schema)
<*> _teamBinding .= (fromMaybe Binding <$> optField "binding" schema)
<*> _teamBinding .= (fromMaybe Binding <$> optFieldWithDocModifier "binding" bindingDesc schema)
<*> _teamSplashScreen .= (fromMaybe DefaultIcon <$> optField "splash_screen" schema)
where
desc = description ?~ "`binding` is deprecated, and should be ignored. The non-binding teams API is not used (and will not be supported from API version V4 onwards), and `binding` should always be `true`."
bindingDesc = description ?~ "Deprecated, please ignore."
Comment thread
battermann marked this conversation as resolved.
Outdated

-- | How a team "binds" its members (users)
--
Expand Down