use serde::Serialize;
use crate::catalog::{ApiMethodSpec, Platform};
#[derive(Debug, Serialize)]
pub struct PlatformSummary {
pub platform: Platform,
pub api_base_path: &'static str,
pub method_count: usize,
pub has_cookie: bool,
}
#[derive(Debug, Serialize)]
pub struct RootResponse {
pub name: &'static str,
pub version: &'static str,
pub mode: &'static str,
pub status: &'static str,
pub bind: String,
pub base_url: String,
pub endpoints: Vec<&'static str>,
pub platforms: Vec<PlatformSummary>,
}
#[derive(Debug, Serialize)]
pub struct HealthResponse {
pub status: &'static str,
pub service: &'static str,
pub version: &'static str,
}
#[derive(Debug, Serialize)]
pub struct ApiCatalogResponse {
pub version: &'static str,
pub platforms: Vec<PlatformCatalogResponse>,
}
#[derive(Debug, Serialize)]
pub struct PlatformCatalogResponse {
pub platform: Platform,
pub api_base_path: &'static str,
pub method_count: usize,
pub methods: Vec<ApiMethodSpec>,
}
#[derive(Debug, Serialize)]
pub struct CatalogErrorResponse {
pub error: &'static str,
pub platform: String,
}
#[derive(Debug, Serialize)]
pub struct FetchErrorResponse {
pub error: &'static str,
pub detail: String,
}