mangadex_api_schema_rust/v5/
check_token_response.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
use mangadex_api_types::{ResultType, UserRole};
use serde::Deserialize;

#[derive(Debug, Deserialize, Clone)]
#[serde(rename_all = "camelCase")]
#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
#[cfg_attr(feature = "specta", derive(specta::Type))]
pub struct CheckTokenResponse {
    #[serde(default)]
    pub result: ResultType,
    pub is_authenticated: bool,
    pub roles: Vec<UserRole>,
    pub permissions: Vec<String>, // TODO: Deserialize the strings into `UserPermission` enum.
}