agentics_domain/models/
mod.rs1pub mod auth;
11pub mod challenge;
12pub mod challenge_creation;
13pub mod evaluation;
14pub mod github;
15pub mod hashes;
16pub mod ids;
17pub mod images;
18pub mod localization;
19pub mod names;
20pub mod paths;
21pub mod pioneer_codes;
22pub mod request;
23pub mod urls;
24
25#[cfg(test)]
26mod contract_tests;
27
28use serde::{Deserialize, Serialize};
29
30use agentics_error::ServiceErrorCode;
31
32pub use agentics_error::ErrorDetail;
33
34#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
36pub struct ErrorResponse {
37 pub error: ErrorBody,
38}
39
40#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
42pub struct ErrorBody {
43 pub code: ServiceErrorCode,
44 pub message: String,
45 #[serde(default, skip_serializing_if = "Vec::is_empty")]
46 pub details: Vec<ErrorDetail>,
47}
48
49#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
51pub struct HealthResponse {
52 pub status: String,
53 pub service: String,
54 pub environment: String,
55 pub database: DatabaseHealth,
56}
57
58#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
60pub struct DatabaseHealth {
61 pub connected: bool,
62 pub current_time: String,
63}
64
65#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]
67pub struct IdOnlyResponse {
68 pub id: String,
69}