feat(ebuy): add GSA eBuy requests, attachment URLs and access check - #21
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
`listEbuyRequests`, `getEbuyRequest`, `getEbuyAttachmentUrl` and `getEbuyAccess` cover `/api/ebuy/requests/` and `/api/ebuy/access/` (Tango API 5.1.0). Every filter the API accepts is a typed option on `ListEbuyRequestsOptions`, and `EbuyRequestRecord`, `EbuyAttachmentRecord` and `EbuyAccess` type the responses. Results are scoped to the caller's linked schedule contracts, so an account with none gets an empty list; `getEbuyAccess()` tells that apart from no matches. `getEbuyAttachmentUrl()` returns the presigned URL the download endpoint redirects to without following it, via a new `HttpClient.getRedirectLocation()`, and throws `TangoEbuyAttachmentLinkError` with the link's `url` for an external-link entry. `EbuyRequest` and `EbuyAttachment` shape schemas are registered, `ebuy/requests` is mapped in the conformance gate and dropped from both coverage baselines, and the overlay is regenerated. 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
Adds GSA eBuy support (Tango API 5.1.0), with the same four operations as the Python SDK:
listEbuyRequests(options)—/api/ebuy/requests/, every API filter as a typed option onListEbuyRequestsOptions(search,rfq_id,reference_number,request_type,status,sin,schedule,buyer_agency,agency,contract_number,issue_date_*/close_date_*bounds,ordering).getEbuyRequest(rfqId, options)— detail by request id, withshape/flat/flatLists/joiner.getEbuyAttachmentUrl(rfqId, docSeqNum)— returns the presigned URL the download endpoint redirects to, without following it. An external-link entry throws the newTangoEbuyAttachmentLinkError(aTangoValidationError) carrying the link'surl; an uncaptured document throwsTangoNotFoundError.getEbuyAccess()—{ enabled, reason, contracts }from/api/ebuy/access/.New types
EbuyRequestRecord,EbuyAttachmentRecord,EbuyAccess; registeredEbuyRequest/EbuyAttachmentshape schemas.HttpClientgainedgetRedirectLocation()(a GET withredirect: "manual"that resolves to theLocationheader).Why
eBuy requests were in the vendored contract without an SDK method, baselined as a tracked gap. This closes it:
ebuy/requestsis now mapped in the conformance gate and removed from both coverage baselines, and the shape overlay is regenerated.Behavior worth knowing (documented in
docs/API_REFERENCE.mdand the JSDoc)getEbuyAccess()tells the two apart.statusis frozen at the last-seen state, soOpenmeans "open the last time it was seen";last_seenis the staleness signal.agencyfilter needs Tango API 5.3.0.Testing
npm run lint,npm run typecheck,npm run build,npx vitest run(483 passed),check-filter-shape-conformance(0 errors),check-shape-coverage(no new drift), and the overlay regenerates without drift.tests/unit/client.ebuy.test.ts(47 tests) with a mocked transport: wire names for every filter, the detail route, the manual redirect, the link and not-captured error paths, the access payload, and the shape schema.fetchwith manual redirect, 404 for an unknown id).🤖 Generated with Claude Code