Repository navigation
feat: add GSA eBuy requests, attachment URL and access check - #7
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
Adds the GSA eBuy endpoints from Tango API 5.1.0: `list_ebuy_requests` / `iterate_ebuy_requests`, `get_ebuy_request`, `get_ebuy_attachment_url` and `get_ebuy_access`, with `ListEbuyRequestsOptions`, `GetEbuyRequestOptions`, the typed `EbuyAccess` model and `SHAPE_EBUY_REQUESTS_MINIMAL`.
`get_ebuy_attachment_url` reads the download route's redirect with redirects disabled and returns the presigned URL instead of following it, on a dedicated no-redirect client (overridable via the new `no_redirect_http_client` builder option).
An attachment that is an outbound link surfaces as the new `Error::ExternalLink { url, .. }` variant.
The retry loop is factored so the redirect-reading call shares the same retry policy.
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 the GSA eBuy endpoints from Tango API 5.1.0.
list_ebuy_requests(opts)/iterate_ebuy_requests(opts)GET /api/ebuy/requests/Page<Record>/PageStream<Record>get_ebuy_request(rfq_id, opts)GET /api/ebuy/requests/{rfq_id}/Recordget_ebuy_attachment_url(rfq_id, doc_seq_num)GET /api/ebuy/requests/{rfq_id}/attachments/{doc_seq_num}/download/Stringget_ebuy_access()GET /api/ebuy/access/EbuyAccess(typed)ListEbuyRequestsOptionsnames every filter the endpoint accepts (search,rfq_id,reference_number,request_type,status,sin,schedule,buyer_agency,agency,contract_number, issue/close date bounds) plusordering.SHAPE_EBUY_REQUESTS_MINIMALmirrors the API's default list shape.get_ebuy_attachment_urlreads the 302 with redirects disabled and returns theLocation(resolved against the request URL) instead of following it. Following it would download the document and send the API key to the download host.url) surfaces as the newError::ExternalLink { url, .. }variant;Erroris#[non_exhaustive], so this is additive.no_redirect_http_clientoverrides the dedicated no-redirect client, for callers whose proxy/TLS setup must apply to that call too.Behavior documented in rustdoc,
docs/API_REFERENCE.mdand the CHANGELOG: Pro plan required; the list is scoped to the caller's linked schedule contracts and is empty (not an error) without one, whichget_ebuy_accessdisambiguates;statusis frozen at last-seen state.Testing
cargo fmt --all -- --check,cargo clippy --workspace --all-features --all-targets -- -D warnings,cargo test --workspaceall green.EbuyAccessdecoding.Locationresolution; the link-entry 400 maps toExternalLinkwith itsurl; an uncaptured document maps toNotFound.🤖 Generated with Claude Code