togglr_sdk/
types.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct EvaluateResponse {
5    pub feature_key: String,
6    pub enabled: bool,
7    pub value: String,
8}
9
10#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11pub struct HealthResponse {
12    pub status: String,
13    pub server_time: String,
14}
15
16#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
17pub struct FeatureHealth {
18    pub feature_key: String,
19    pub environment_key: String,
20    pub enabled: bool,
21    pub auto_disabled: bool,
22    pub error_rate: Option<f32>,
23    pub threshold: Option<f32>,
24    pub last_error_at: Option<String>,
25}
26
27#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
28pub struct FeatureErrorReport {
29    pub error_type: String,
30    pub error_message: String,
31    pub context: Option<std::collections::HashMap<String, serde_json::Value>>,
32}