uptrakit_openapi_client/roles.rs
1use crate::Result;
2use crate::UptrakitClient;
3use crate::types_impl::roles::RoleResponse;
4use uuid::Uuid;
5
6impl UptrakitClient {
7 /// List all roles with their permissions.
8 pub async fn list_roles(&self) -> Result<Vec<RoleResponse>> {
9 self.get(crate::paths::roles::BASE).await
10 }
11
12 /// Get a single role by ID with its permissions.
13 pub async fn get_role(&self, id: &Uuid) -> Result<RoleResponse> {
14 self.get(&crate::paths::roles::by_id(id)).await
15 }
16}