Add Report Builder API, models, and extension clients#74
Merged
Conversation
## Summary This commit introduces several new models related to report functionality, enhancing the capabilities of the robosystems client. The `__init__.py` file has been updated to include these new models, ensuring they are accessible for import. ## Key Changes - Added new models: `CreateReportRequest`, `RegenerateReportRequest`, `ReportListResponse`, `ReportResponse`, `ShareReportRequest`, `ShareReportResponse`, `ShareResultItem`, and `StatementResponse`. - Updated the `__all__` list in `__init__.py` to include the new models for better organization and accessibility. ## Testing Notes - Verify that the new models are correctly integrated and accessible for use in the client. - Ensure that existing functionality remains intact and that no breaking changes are introduced. ## Infrastructure Considerations - No breaking changes introduced; existing functionality remains intact.
## Summary This commit enhances the `extensions` module by adding imports for `LedgerClient` and `ReportClient`, making them accessible for use within the robosystems client. The `__all__` list in `__init__.py` has been updated accordingly to include these new clients. ## Key Changes - Imported `LedgerClient` and `ReportClient` in `__init__.py` and `extensions.py`. - Updated the `__all__` list to include `LedgerClient` and `ReportClient` for better organization. ## Testing Notes - Ensure that the new clients are correctly integrated and accessible for use in the client. - Verify that existing functionality remains intact and that no breaking changes are introduced. ## Infrastructure Considerations - No breaking changes introduced; existing functionality remains intact.
## Summary This commit introduces a new method, `create_mapping_structure`, to the `LedgerClient` class, enabling the creation of a CoA to GAAP mapping structure. The method constructs a request body using the `CreateStructureRequest` model and handles the response, raising an error if the creation fails. ## Key Changes - Added `create_mapping_structure` method to facilitate the creation of mapping structures. - Integrated the `CreateStructureRequest` model for structured request handling. - Included error handling for unsuccessful creation attempts. ## Testing Notes - Verify that the new method correctly creates mapping structures and handles various response scenarios. ## Infrastructure Considerations - No breaking changes introduced; existing functionality remains intact.
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
Introduces full report builder functionality to the
robosystems_clientSDK, including new ledger API endpoints, data models, and high-level extension clients for report lifecycle management.Key Accomplishments
New API Endpoints (7)
Added seven new ledger API modules supporting the complete report lifecycle:
New Data Models (10)
Introduced strongly-typed request/response models to support the new API surface:
CreateReportRequest,RegenerateReportRequest,ShareReportRequest– request payloadsReportResponse,ReportListResponse– report retrieval responsesShareReportResponse,ShareResultItem– sharing workflow responsesStatementResponse,FactRowResponse– financial statement data modelsStructureSummary,ValidationCheckResponse– supporting metadata modelsExtension Clients (2)
create_mapping_structuremethod for building report mapping structuresUpdated Module Exports
extensions/__init__.pyandextensions/extensions.pyupdated to register and expose the newLedgerClientandReportClientmodels/__init__.pyupdated to export all new model classesBreaking Changes
None. This is a purely additive feature with no modifications to existing APIs or models.
Testing Notes
syncandasyncinvocation patterns consistently with existing endpointsLedgerClient.create_mapping_structuremethod with various ledger configurationsReportClientoperations end-to-end: create → get → list → regenerate → share → deleteStatementResponseandFactRowResponsecorrectly deserialize nested financial data structuresReportResponseat 330 lines, the largest new model)Infrastructure Considerations
🤖 Generated with Claude Code
Branch Info:
feature/report-buildermainCo-Authored-By: Claude noreply@anthropic.com