Repository navigation
feat: Tango API 5.9.0 contract, Federal Register documents, attachment file and link counts - #25
Draft
makegov-mark[bot] wants to merge 1 commit into
Draft
makegov-mark[bot] wants to merge 1 commit into
makegov-mark[bot] wants to merge 1 commit into
Conversation
…t file and link counts Re-vendors the API contract from 5.1.0 to Tango API 5.9.0 and regenerates the shape overlay, so shapes accept every field the API added in between. Opportunities accept `meta(files_count,links_count)` and notices accept `file_count` and `link_count`, both new in 5.9.0; the types and docs say what they count and that null means not yet counted, not zero. Adds `listFederalRegisterDocuments` and `getFederalRegisterDocument` with all seventeen filters typed, a `FederalRegisterDocument` model, a shape schema and two default shapes, matching tango-python. Types the filters the API added on resources the SDK already wraps: `awarded` and `awardee_uei` on opportunities, `agency` on budget accounts, exclusions and IT Dashboard, `cycle_name` on SBIR topics, and the account category and `data_through_period` filters on budget accounts. Re-vendors the observed shape types from tango-python so the new fields carry the types the API returns. Both conformance gates pass against the new contract with no baseline growth; eBuy requests remain the one baselined resource without a method. 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
Brings the SDK from the Tango API 5.1.0 contract to Tango API 5.9.0 and closes every gap the two conformance gates report against it.
meta(files_count,links_count)besidemeta(attachments_count); notices acceptfile_countandlink_countbesideattachment_count.Opportunitygains a typedmeta(OpportunityMeta) andNoticegains the three counts.listFederalRegisterDocuments(options)andgetFederalRegisterDocument(uuid, options), all seventeen filters typed, aFederalRegisterDocumentmodel, a shape schema, andFEDERAL_REGISTER_MINIMAL/FEDERAL_REGISTER_COMPREHENSIVE. This mirrors tango-python'slist_federal_register_documents()/get_federal_register_document().awardedandawardee_ueion opportunities (5.5.0);agencyon budget accounts, exclusions and IT Dashboard (5.3.0);cycle_nameon SBIR topics (5.3.1);account_category,account_category__inand the fourdata_through_periodfilters on budget accounts (5.7.0, 5.8.0). Dunder names are sent verbatim.awards(...)expand on opportunities and notices, theorganization(...)expand on budget accounts, exclusions and SBIR,account_category/data_through_period/source_anomalieson budget accounts, andholder_count/order_winner_counton vehicles.What a caller needs to know about the counts
An attachment's
typeisfile(a document; only a file has extracted text) orlink(a URL the notice lists).The new fields count each, and the existing total still counts every attachment, links included.
An attachment of any other type counts only in the total, so files plus links need not equal it.
The new fields are
nulluntil a record has been counted, so readnullas unknown, not zero.The SDK's default shapes are unchanged, so the counts have to be named in
shape.Generated versus hand-written
contracts/filter_shape_contract.json(51 resources, up from 50;federal_registeris the new one).contracts/observed_shape_types.json. Without it the generator guesses types from field names and getsawards(a list),awarded(a boolean) anddata_through_period(an integer) wrong.npm run generate-shape-overlay:src/shapes/generatedOverlay.ts(385 fields across 28 containers, 76 nested schemas).FederalRegisterDocumentexplicit schema, which follows tango-python's field for field.Gates and tests
npm run check-conformance: 0 errors. The 13 warnings are the same onesmainreports (nested sub-resource routes that take filters through an index signature, and the baselinedebuy/requests,events,news).npm run check-shape-coverage: 15 gaps, 15 baselined, 0 new.npm run generate-shape-overlayreproduces the committed overlay with no diff.npx vitest run: 50 files, 475 tests pass.npm run lint,npm run typecheckandnpm run buildare clean.client.shape-parity.test.ts), which is the check that they exercise the change.Overlap with open drafts
#22 and #23 each re-vendor the contract to 5.8.0, regenerate the overlay and baseline
federal_register.This PR supersedes those three pieces, so both will conflict in
contracts/,src/shapes/generatedOverlay.tsand the changelog once this lands, and theirfederal_registerbaseline entries should be dropped on rebase.Their hand-written work is deliberately left to them: the
BudgetAccountanomaly types and budget docs (#22), and the vehicle model fields, default-shape change andawardee_countdeprecation (#23).The seven budget filter options added here are the same lines #22 adds.
#21 (eBuy) is untouched; it removes the last baselined resource.
Release
No version bump here.
CHANGELOG.mdis updated under[Unreleased].The additions are backward compatible, so the next release is a minor.
🤖 Generated with Claude Code