//! Data Transfer Objects for the StemeDB HTTP API.
//!
//! These types define the JSON API contract. They use hex-encoded strings
//! for binary data (hashes, signatures, agent IDs) to be JSON-friendly.
//!
//! # Conversion Pattern
//!
//! DTOs convert to/from internal stemedb-core types:
//! - Request DTOs → internal types (decode hex to bytes)
//! - Internal types → Response DTOs (encode bytes to hex)

// Module declarations
pub mod admission;
pub mod advanced;
#[cfg(feature = "aphoria")]
pub mod aphoria;
pub mod api_keys;
pub mod audit;
pub mod circuit_breaker;
pub mod concepts;
pub mod create;
pub mod enums;
pub mod escalation;
pub mod gold_standard;
pub mod impact;
pub mod quarantine;
pub mod query_params;
pub mod responses;
pub mod skeptic;
pub mod source_registry;

// Re-export all public types for backward compatibility
// This allows existing code to use `use crate::dto::*;` without changes

// From enums module
pub use enums::{
    LensDto, LifecycleDto, ObjectValueDto, SignatureDto, SourceClassDto, SupersessionTypeDto,
};

// From create module
pub use create::{
    CreateAssertionRequest, CreateEpochRequest, CreateResponse, CreateVoteRequest,
    DecayTrustRanksRequest, DecayTrustRanksResponse, HlcTimestampDto, StoreSourceRequest,
    StoreSourceResponse, SupersedeRequest, SupersedeResponse,
};

// From query_params module
pub use query_params::QueryParams;

// From responses module
pub use responses::{
    AssertionResponse, ChangeEntryDto, ErrorResponse, HealthResponse, LayeredQueryResponse,
    ProvenanceResponse, QueryResponse, SourceWarningDto, TierResolutionDto,
};

// From audit module
pub use audit::{
    AuditQueryParams, ContributingAssertionDto, QueryAuditListResponse, QueryAuditResponse,
    QueryParamsAuditDto, TraceParams, TraceResponse,
};

// From skeptic module
pub use skeptic::{
    AgentSummaryDto, ClaimSummaryDto, ResolutionStatusDto, SkepticQueryParams, SkepticResponse,
    SourceSummaryDto,
};

// From advanced module
pub use advanced::{ConstraintEntryDto, ConstraintsQueryParams, ConstraintsResponse};

// From escalation module
pub use escalation::{EscalationEventDto, EscalationLevelDto, EscalationListResponse};

// From gold_standard module
pub use gold_standard::{
    CreateGoldStandardRequest, CreateGoldStandardResponse, GoldStandardDto,
    GoldStandardListResponse, VerificationResult, VerifyAgentRequest,
};

// From admission module
pub use admission::{AdmissionStatusResponse, TrustTierDto};

// From api_keys module
pub use api_keys::{
    ApiKeyInfo, CreateApiKeyRequest, CreateApiKeyResponse, ListApiKeysResponse,
    RevokeApiKeyResponse, RotateApiKeyResponse, UpdateApiKeyRequest, UpdateApiKeyResponse,
};

// From concepts module
pub use concepts::{
    AliasMapping, AliasOriginDto, AliasResponse, AliasSuggestion, ConceptPathInfo,
    CreateAliasRequest, DeleteAliasRequest, DeleteAliasResponse, ListAliasesParams,
    ListAliasesResponse, ResolveAliasParams, ResolveAliasResponse, SuggestAliasesResponse,
};

// From quarantine module
pub use quarantine::{
    ContentQualityDto, QuarantineApproveResponse, QuarantineEventDto, QuarantineGetResponse,
    QuarantineListParams, QuarantineListResponse, QuarantineReasonDto,
};

// From circuit_breaker module
pub use circuit_breaker::{
    CircuitBreakerStatusResponse, CircuitStateDto, FailureCountsDto, FailureEventDto,
    FailureTypeDto, ResetCircuitRequest, ResetCircuitResponse, TrippedCircuitsParams,
    TrippedCircuitsResponse,
};

// From source_registry module
pub use source_registry::{
    ListSourcesParams, ListSourcesResponse, RegisterSourceRequest, RegisterSourceResponse,
    SourceMetadataDto, SourceRecordDto, UpdateSourceStatusRequest, UpdateSourceStatusResponse,
};

// From impact module (P3.1, P3.2)
pub use impact::{
    ExportImpactParams, ImpactExportRow, QuarantineSourceRequest, QuarantineSourceResponse,
    RestoreSourceRequest, RestoreSourceResponse, SourceImpactResponse,
};

// From aphoria module (feature-gated)
#[cfg(feature = "aphoria")]
pub use aphoria::{
    AcknowledgmentDto, BlessRequest, BlessResponse, CommunityObservationDto, CommunityValueDto,
    ConflictTraceDto, ConflictingSourceDto, ExportPolicyRequest, ExportPolicyResponse, FindingDto,
    GetPatternsRequest, GetPatternsResponse, ImportPolicyRequest, ImportPolicyResponse,
    ObservationDto, ObservationSignatureDto, ObservationValueDto, PatternDto, PolicySourceDto,
    PushCommunityObservationsRequest, PushCommunityObservationsResponse, PushObservationsRequest,
    PushObservationsResponse, ScanRequest, ScanResponse, ScanSummaryDto,
};
