Skip to content

feat: catch up to Tango API 5.11.0 (Federal Register, count_type and meta on Page, new filters) - #10

Merged
vdavez merged 9 commits into
mainfrom
feat/api-5.11.0-catchup
Oct 19, 2026
Merged

vdavez merged 9 commits into
mainfrom
feat/api-5.11.0-catchup

Conversation

@makegov-mark

@makegov-mark makegov-mark Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Brings makegov-tango up to Tango API 5.11.0, matching tango-python 1.18.1.

Stacked on #7, #8 and #9. This branch carries those three as merge commits so it builds and tests against them; once they land on main it gets rebased onto main and only the commits below remain.

Breaking (pre-1.0)

  • Page<T> is now #[non_exhaustive] and gains two fields. Reading a page is unaffected; building one with a struct literal, or destructuring it without .., no longer compiles.

Added

  • Page::count_type: "exact" or "approximate", from each list response's own X-Results-CountType header.
  • Page::meta: the response's meta object, which the SDK dropped before, so agency-filter diagnostics (including matched_by, Tango API 5.9.0) and upgrade hints are now reachable.
  • Federal Register documents (Tango API 5.3.0): list_federal_register_documents / iterate_federal_register_documents / get_federal_register_document (by uuid), all seventeen filters, and SHAPE_FEDERAL_REGISTER_MINIMAL / _COMPREHENSIVE.
  • agency on budget accounts, exclusions and IT Dashboard (Tango API 5.3.0); cycle_name on SBIR topics (Tango API 5.3.1).
  • awarded / awardee_uei on opportunities (Tango API 5.5.0).
  • commercial_item_acquisition_procedures on contracts and IDVs only (Tango API 5.10.0).
  • models::FiscalYearObligation for the obligations_by_fiscal_year(fiscal_year,obligated) expand (Tango API 5.11.0).
  • Filters tango-python already had: has_awards on PSC, search on vehicle awardees, ordering on vehicle orders.
  • Documentation for the shape leaves this SDK passes through untouched: the opportunity and notice award fields and awards(...), file and link counts, attachments(extraction_status), the organization(...) expand on budget, exclusions and SBIR, and the federal_register / ebuy_request alert query types.

Fixed

  • IT Dashboard tier docs: agency_name, agency and previous_uii are available at every plan.
  • SBIR topic agency is documented as organization-resolved.
  • Pipe-joined UEIs on the award lists are documented (Tango API 5.11.0).
  • API errors keep the server's reason when it is nested under detail (a plan gate's structured 403), matching tango-python 1.18.1. The reason is read from error, message and detail, then the same keys inside a detail object; the parsed body stays on response, and a non-JSON body keeps the bare status message.

Testing

  • cargo fmt --all -- --check on stable and 1.80.
  • cargo clippy --workspace --all-features -- -D warnings on stable and 1.80, plus --all-targets on stable.
  • cargo test --workspace --all-features on stable and 1.80, and --no-default-features.
  • New unit tests for every filter, plus wire tests (httpmock) for the Federal Register routes, count_type and meta on concurrent pages, the opportunity award and attachment leaves, and the obligations decode.
  • Unit tests for the API error reason: a JSON body with a reason (flat and nested under detail), a JSON body without one, and a non-JSON body.

Not included

  • joiner (the flat-key separator tango-python exposes on a few lists) has no field here; it only matters with flat = true and a non-default separator.
  • The budget numeric range filters stay on extra, as before; the endpoint rejects unknown names with a 400, so a typo still fails loudly.

🤖 Generated with Claude Code

vdavez and others added 9 commits October 19, 2026 14:56
Page gains count_type, read from each response's own X-Results-CountType header, and meta, the response's meta object passed through (agency-filter diagnostics including matched_by, upgrade hints).
Page is now #[non_exhaustive].

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
list_federal_register_documents / iterate_federal_register_documents and get_federal_register_document (by uuid), with ListFederalRegisterDocumentsOptions naming all seventeen of the API's filters plus ordering, GetFederalRegisterDocumentOptions, and SHAPE_FEDERAL_REGISTER_MINIMAL / _COMPREHENSIVE (Tango API 5.3.0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cycle_name on SBIR topics

agency takes a Tango agency name, abbreviation, code or organization key and matches the whole organization subtree (Tango API 5.3.0).
cycle_name filters SBIR topics by DSIP cycle (Tango API 5.3.1).
The IT Dashboard tier docs now match the API: agency_name, agency and previous_uii are available at every plan.
The SBIR topic agency docs now say the filter is organization-resolved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… attachment-count and extraction_status leaves

ListOpportunitiesOptions gains awarded (Option<bool>) and awardee_uei (Tango API 5.5.0).
get_opportunity / get_notice document the award leaves and awards(...) expand, the file and link counts (Tango API 5.9.0) and attachments(extraction_status) (Tango API 5.11.0); get_vehicle documents opportunity(meta(files_count,links_count)).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ations_by_fiscal_year decoding

ListContractsOptions and ListIDVsOptions gain commercial_item_acquisition_procedures (Tango API 5.10.0); the API does not offer it on OTAs or OT IDVs.
models::FiscalYearObligation decodes the obligations_by_fiscal_year(fiscal_year,obligated) expand (Tango API 5.11.0), which is always null on IDVs and OT IDVs.
The uei / recipient_uei docs on the contract, IDV, OTA and OT IDV lists say several UEIs joined by | match any of them (Tango API 5.11.0).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…izationsOptions does

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cle orders

Filters tango-python already exposes and the API accepts: ListPscOptions::has_awards, ListVehicleAwardeesOptions::search and ListVehicleOrdersOptions::ordering (award_date, obligated or total_contract_value).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tries

API reference sections for Federal Register, the new filters and shape leaves, count_type and meta on Page, the corrected IT Dashboard tiers and SBIR agency semantics; the federal_register and ebuy_request alert query types in WEBHOOKS.md; the two new shape constants in SHAPES.md; README pagination notes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…etail

A structured error body such as a plan gate's `{"detail": {"error": "...", "code": "tier_required"}}` left `Error::Api`'s message at the bare status line.
The reason is now read from the envelope keys `error`, `message` and `detail`, then the same keys inside a `detail` object, matching the Python SDK; the parsed body stays on `response`, and non-JSON bodies keep the old message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vdavez
vdavez force-pushed the feat/api-5.11.0-catchup branch from d747141 to 2c2fa45 Compare October 19, 2026 19:57
@vdavez
vdavez marked this pull request as ready for review October 19, 2026 19:57
@vdavez
vdavez merged commit 879fefc into main Oct 19, 2026
9 checks passed
@vdavez
vdavez deleted the feat/api-5.11.0-catchup branch October 19, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant