Skip to content

Commit

Permalink
Merge pull request #312 from aiven/st3fan-account-team-delete-invite
Browse files Browse the repository at this point in the history
cli: add support for deleting pending invites
  • Loading branch information
Mario Apra authored Dec 9, 2022
2 parents ac522da + ac7797a commit 85c51ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions aiven/client/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,14 @@ def account__team__user_list_pending(self) -> None:
json=self.args.json,
)

@arg.json
@arg.account_id
@arg.team_id
@arg.email
def account__team__invite_delete(self) -> None:
"""Delete pending invite from a team"""
self.client.delete_team_invite(self.args.account_id, self.args.team_id, self.args.email)

@arg.json
@arg.account_id
@arg.team_id
Expand Down
3 changes: 3 additions & 0 deletions aiven/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2115,6 +2115,9 @@ def list_team_invites(self, account_id: str, team_id: str) -> Sequence[Dict[str,
result_key="account_invites",
)

def delete_team_invite(self, account_id: str, team_id: str, email: str) -> Mapping:
return self.verify(self.delete, self.build_path("account", account_id, "team", team_id, "invites", email))

def delete_team_member(self, account_id: str, team_id: str, user_id: str) -> Mapping:
return self.verify(
self.delete,
Expand Down

0 comments on commit 85c51ae

Please sign in to comment.