Skip to content

feat: file and link counts on opportunities and notices (API 5.9.0) - #85

Merged
vdavez merged 1 commit into
mainfrom
chore/contract-5.9.0
Oct 6, 2026
Merged

vdavez merged 1 commit into
mainfrom
chore/contract-5.9.0

Conversation

@makegov-mark

@makegov-mark makegov-mark Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

What

Re-vendors contracts/filter_shape_contract.json at Tango API 5.9.0 and regenerates tango/shapes/generated_overlay.py.

Tango API 5.9.0 splits attachment counts by attachment type:

  • Opportunities: meta.files_count and meta.links_count, beside the existing meta.attachments_count.
  • Notices: file_count and link_count, beside the existing attachment_count.
  • Vehicles: the embedded opportunity accepts opportunity(meta(files_count,links_count)).

A file is a document attached to the notice, and only files have extracted text.
A link is a URL the notice lists.
The existing totals still count every attachment, links included, and an attachment of any other type counts only in the total, so files plus links need not equal it.
The new fields are None until a record has been counted, so None means unknown, not zero.

Contract changes, 5.8.0 to 5.9.0

  • notices: shape fields file_count, link_count added.
  • opportunities: shape fields meta.files_count, meta.links_count added.
  • vehicles: shape fields opportunity.meta.files_count, opportunity.meta.links_count added.
  • entities: the state and zip_code filter entries no longer carry a lookup annotation. The filters themselves, their names and their types are unchanged, and the SDK's gates do not read that annotation.
  • meta.api_version: 5.8.0 to 5.9.0.

No filter, ordering field, endpoint or resource was added or removed, so no client method changed.

Changes

  • Generated: the vendored contract and four new FieldSchema entries in the shape overlay (all int, optional); the opportunity embedded in a vehicle shares the opportunity meta schema, so it needed no entry of its own.
  • By hand: Notice gains attachment_count, file_count and link_count attributes; the Opportunity and Notice docstrings and docs/API_REFERENCE.md describe the counts and the None caveat; tests; changelog.
  • No default SDK shape changed.

Testing

  • uv run python scripts/check_filter_shape_conformance.py: 0 errors, 24 warnings (the same 24 as against the 5.8.0 contract).
  • uv run python scripts/check_shape_coverage.py: 14 gaps, 14 baselined, 0 new. Before regenerating it reported the 6 new fields above.
  • uv run pytest: 609 passed, 31 skipped.
  • uv run ruff format --check tango/, uv run ruff check tango/, uv run mypy tango/: clean.
  • The new tests fail against the previous overlay and pass against the regenerated one.
  • Cassettes are untouched: no existing integration test requests these fields.

Release

Not bumped here.
The changelog entry sits under [Unreleased] for the next release PR.

🤖 Generated with Claude Code

Re-vendors the API contract at Tango API 5.9.0 and regenerates the shape overlay, so the SDK's typed shapes accept the new count fields.

Opportunities gain `meta.files_count` and `meta.links_count` beside `meta.attachments_count`, and notices gain `file_count` and `link_count` beside `attachment_count`.
An attachment's `type` is `file` (a document attached to the notice) or `link` (a URL the notice lists), and the new fields count each.
The existing totals still count every attachment, so files plus links need not equal them.
The new fields are null until a record has been counted, which means unknown rather than zero.
The opportunity embedded in a vehicle accepts the same two `meta` fields.

No filters, ordering fields or resources changed between 5.8.0 and 5.9.0, so no client method changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vdavez
vdavez marked this pull request as ready for review October 6, 2026 22:16
@vdavez
vdavez merged commit faf29ad into main Oct 6, 2026
11 checks passed
@makegov-mark makegov-mark Bot mentioned this pull request Oct 6, 2026
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