tango/models/mod.rs
1//! Typed response and input models for fixed-schema Tango endpoints.
2//!
3//! For shape-driven list endpoints (contracts, IDVs, entities, …) the SDK
4//! returns [`crate::Record`] (a [`serde_json::Map`]) instead — shape selection
5//! changes the schema, so a fixed Rust struct can't capture every combination.
6//! See [`crate::shapes`] for the available presets.
7//!
8//! # Forward-compatible `extra` field
9//!
10//! Every typed model carries `#[serde(flatten)] pub extra: HashMap<String, Value>`
11//! so server-side schema additions surface as `extra["new_field"]` rather than
12//! being silently dropped during deserialization. Round-tripping a typed model
13//! through `serde_json::to_value` will re-emit those extras.
14
15pub mod agency;
16pub mod protest;
17pub mod resolve;
18pub mod validate;
19pub mod webhook;
20
21pub use agency::AgencyRecord;
22pub use protest::ProtestRecord;
23pub use resolve::{ResolveCandidate, ResolveInput, ResolveResult, ResolveTargetType};
24pub use validate::{ValidateInput, ValidateInputType, ValidateResult};
25pub use webhook::{
26 WebhookAlert, WebhookAlertCreateInput, WebhookAlertUpdateInput, WebhookEndpoint,
27 WebhookEndpointCreateInput, WebhookEndpointUpdateInput, WebhookEventType,
28 WebhookEventTypesResponse, WebhookSampleDelivery, WebhookSamplePayloadResponse,
29 WebhookTestDeliveryResult,
30};