diff --git a/src/model/application/mod.rs b/src/model/application/mod.rs index 769af479018..4beb12a254d 100644 --- a/src/model/application/mod.rs +++ b/src/model/application/mod.rs @@ -156,11 +156,14 @@ pub struct TeamMember { /// The list of permissions of the member on the team. /// /// NOTE: Will always be "*" for now. + #[deprecated = "This field is not sent by the API anymore"] pub permissions: Vec, /// The ID of the team they are a member of. pub team_id: GenericId, /// The user type of the team member. pub user: User, + /// The [`TeamMemberRole`] of the team member. + pub role: TeamMemberRole, } enum_number! { @@ -175,6 +178,17 @@ enum_number! { } } +#[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(rename_all = "snake_case")] +#[non_exhaustive] +pub enum TeamMemberRole { + Admin, + Developer, + ReadOnly, + #[serde(untagged)] + Other(String), +} + bitflags! { /// The flags of the application. ///