//! Causal SDK-only DTOs.
//!
//! Most causal types are auto-generated from the OpenAPI spec — see
//! [`crate::api_spec`]. This file holds the few request/response types that
//! aren't yet exposed in the OpenAPI schema (validate-DID design check).
use serde::{Deserialize, Serialize};
/// Difference-in-differences design validation request.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ValidateDidRequest {
/// Treatment variable.
pub treatment: String,
/// Pre-treatment outcome variable.
pub outcome_pre: String,
/// Post-treatment outcome variable.
pub outcome_post: String,
/// Conditioning set (covariates).
#[serde(default)]
pub covariates: Vec<String>,
}
/// Result of validating a difference-in-differences design.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct ValidateDidResponse {
/// Whether the design is valid.
pub is_valid: bool,
/// Explanation of the result.
pub explanation: String,
/// Variables that would induce bias if conditioned on.
#[serde(default)]
pub bad_controls: Vec<String>,
/// Framework name returned by the backend.
pub framework: String,
}