use serde::{Deserialize, Serialize};
#[derive(Deserialize, schemars::JsonSchema)]
pub struct GetCredentialRefParams {
pub credential_name: String,
}
#[derive(Deserialize, schemars::JsonSchema)]
pub struct ListCredentialsParams {}
#[derive(Deserialize, schemars::JsonSchema)]
pub struct CheckRateLimitParams {
pub credential_name: String,
}
#[derive(Serialize)]
pub struct GetCredentialRefResponse {
pub credential: String,
pub placeholder: String,
}
#[derive(Serialize)]
pub struct CredentialEntry {
pub name: String,
pub allowed_agents: Vec<String>,
pub allowed_domains: Vec<String>,
pub has_rate_limit: bool,
}
#[derive(Serialize)]
pub struct ListCredentialsResponse {
pub credentials: Vec<CredentialEntry>,
}
#[derive(Serialize)]
pub struct CheckRateLimitResponse {
pub credential: String,
pub remaining: u32,
pub limit: u32,
pub period: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub retry_after_seconds: Option<u64>,
}
#[derive(Serialize)]
pub struct ErrorResponse {
pub error: String,
}