Add report bundle download URL endpoint to ledger client#125
Merged
Conversation
Pre-ship cleanup of the new ``download_report_bundle`` method and the regen output around it. * Export ``ReportBundleDownload`` from ``clients/__init__.py`` so external consumers can type-hint the return value or import the dataclass directly without spelunking ``ledger_client``. Adds the symbol to ``__all__``. * Document ``httpx.TimeoutException`` and ``httpx.RequestError`` in the method's Raises clause — both pass through unwrapped so callers with their own retry / backoff strategy can distinguish a timeout from a generic failure without parsing ``RuntimeError`` messages. * Pulls in the regen output for the new endpoint: ``api/extensions_robo_ledger/get_report_bundle_download_url.py`` (typed op for the JSON-LD flavor — the XBRL binary path still needs the hand-rolled ``download_report_bundle`` since OpenAPI multi-content-type responses don't auto-generate cleanly), plus the matching ``GetReportBundleDownloadUrlReportBundleDownloadResponse`` model under ``models/`` (auto-exported via the regen's ``__init__.py`` patch). All 88 ledger-client tests still pass; ruff + basedpyright clean.
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.
Summary
Adds support for downloading report bundles from the Robo Ledger service by introducing a new API endpoint, response model, and client method for retrieving report bundle download URLs.
Key Accomplishments
get_report_bundle_download_urlmodule underapi/extensions_robo_ledger/that handles HTTP requests to fetch presigned download URLs for report bundlesGetReportBundleDownloadUrlReportBundleDownloadResponsemodel to deserialize and validate the download URL response payloadLedgerClientwith a method to conveniently call the new report bundle download endpoint, providing a clean interface for consumersclients/__init__.pyandmodels/__init__.pyto properly export the new classes and make them accessible as part of the public APIChanges Breakdown
get_report_bundle_download_urlendpoint module with sync/async supportLedgerClientfor report bundle downloads__init__.pyfiles to expose new componentsBreaking Changes
None. This is a purely additive change that introduces new functionality without modifying existing interfaces.
Testing Notes
get_report_bundle_download_urlendpoint correctly constructs requests and parses responsesLedgerClientmethod properly delegates to the underlying API moduleInfrastructure Considerations
🤖 Generated with Claude Code
Branch Info:
feature/report-bundlemainCo-Authored-By: Claude noreply@anthropic.com