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 awards;
17pub mod budget;
18pub mod contract_appeal;
19pub mod ebuy;
20pub mod protest;
21pub mod resolve;
22pub mod validate;
23pub mod webhook;
24
25pub use agency::AgencyRecord;
26pub use awards::FiscalYearObligation;
27pub use budget::{
28    budget_data_through_period, BudgetSourceAnomaly, BudgetSourceAnomalyRow,
29    BudgetSourceAnomalySource,
30};
31pub use contract_appeal::ContractAppealRecord;
32pub use ebuy::EbuyAccess;
33pub use protest::ProtestRecord;
34pub use resolve::{ResolveCandidate, ResolveInput, ResolveResult, ResolveTargetType};
35pub use validate::{ValidateInput, ValidateInputType, ValidateResult};
36pub use webhook::{
37    WebhookAlert, WebhookAlertCreateInput, WebhookAlertUpdateInput, WebhookEndpoint,
38    WebhookEndpointCreateInput, WebhookEndpointUpdateInput, WebhookEventType,
39    WebhookEventTypesResponse, WebhookSampleDelivery, WebhookSamplePayloadResponse,
40    WebhookTestDeliveryResult,
41};