Skip to content

Commit

Permalink
Update UserGroup API type (#1479)
Browse files Browse the repository at this point in the history
This updates the response of the `phylum group list --json` command to
include all the latest fields of the corresponding API endpoint.
  • Loading branch information
cd-work authored Aug 6, 2024
1 parent 192060b commit 80217ff
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cli/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,16 @@ pub struct PurlWithOrigin {
pub struct UserGroup {
pub created_at: DateTime<Utc>,
pub last_modified: DateTime<Utc>,
pub group_id: Option<String>,
pub group_name: String,
#[serde(default)]
pub is_admin: bool,
pub role: GroupRole,
}

#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum GroupRole {
Member,
Admin,
}

#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Debug, Serialize, Deserialize)]
Expand Down

0 comments on commit 80217ff

Please sign in to comment.