Skip to main content

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 contract_appeal;
17pub mod protest;
18pub mod resolve;
19pub mod validate;
20pub mod webhook;
21
22pub use agency::AgencyRecord;
23pub use contract_appeal::ContractAppealRecord;
24pub use protest::ProtestRecord;
25pub use resolve::{ResolveCandidate, ResolveInput, ResolveResult, ResolveTargetType};
26pub use validate::{ValidateInput, ValidateInputType, ValidateResult};
27pub use webhook::{
28    WebhookAlert, WebhookAlertCreateInput, WebhookAlertUpdateInput, WebhookEndpoint,
29    WebhookEndpointCreateInput, WebhookEndpointUpdateInput, WebhookEventType,
30    WebhookEventTypesResponse, WebhookSampleDelivery, WebhookSamplePayloadResponse,
31    WebhookTestDeliveryResult,
32};