Repository navigation
feat: file and link counts on opportunities and notices (API 5.9.0) - #85
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Re-vendors
contracts/filter_shape_contract.jsonat Tango API 5.9.0 and regeneratestango/shapes/generated_overlay.py.Tango API 5.9.0 splits attachment counts by attachment
type:meta.files_countandmeta.links_count, beside the existingmeta.attachments_count.file_countandlink_count, beside the existingattachment_count.opportunity(meta(files_count,links_count)).A
fileis a document attached to the notice, and only files have extracted text.A
linkis 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
Noneuntil a record has been counted, soNonemeans unknown, not zero.Contract changes, 5.8.0 to 5.9.0
notices: shape fieldsfile_count,link_countadded.opportunities: shape fieldsmeta.files_count,meta.links_countadded.vehicles: shape fieldsopportunity.meta.files_count,opportunity.meta.links_countadded.entities: thestateandzip_codefilter entries no longer carry alookupannotation. 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.0to5.9.0.No filter, ordering field, endpoint or resource was added or removed, so no client method changed.
Changes
FieldSchemaentries in the shape overlay (allint, optional); the opportunity embedded in a vehicle shares the opportunitymetaschema, so it needed no entry of its own.Noticegainsattachment_count,file_countandlink_countattributes; theOpportunityandNoticedocstrings anddocs/API_REFERENCE.mddescribe the counts and theNonecaveat; tests; changelog.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.Release
Not bumped here.
The changelog entry sits under
[Unreleased]for the next release PR.🤖 Generated with Claude Code