Skip to content

Add Report Builder API, models, and extension clients#74

Merged
jfrench9 merged 3 commits intomainfrom
feature/report-builder
Mar 30, 2026
Merged

Add Report Builder API, models, and extension clients#74
jfrench9 merged 3 commits intomainfrom
feature/report-builder

Conversation

@jfrench9
Copy link
Copy Markdown
Member

Summary

Introduces full report builder functionality to the robosystems_client SDK, 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:

  • create_report – Create new reports from a ledger
  • get_report – Retrieve a specific report by ID
  • list_reports – List all available reports
  • delete_report – Remove an existing report
  • regenerate_report – Trigger regeneration of a report
  • share_report – Share a report with other users/entities
  • get_statement – Retrieve financial statement data associated with a report

New Data Models (10)

Introduced strongly-typed request/response models to support the new API surface:

  • CreateReportRequest, RegenerateReportRequest, ShareReportRequest – request payloads
  • ReportResponse, ReportListResponse – report retrieval responses
  • ShareReportResponse, ShareResultItem – sharing workflow responses
  • StatementResponse, FactRowResponse – financial statement data models
  • StructureSummary, ValidationCheckResponse – supporting metadata models

Extension Clients (2)

  • LedgerClient – High-level client wrapping ledger API operations, including a new create_mapping_structure method for building report mapping structures
  • ReportClient – Dedicated client providing a clean interface for report CRUD, regeneration, sharing, and statement retrieval

Updated Module Exports

  • extensions/__init__.py and extensions/extensions.py updated to register and expose the new LedgerClient and ReportClient
  • models/__init__.py updated to export all new model classes

Breaking Changes

None. This is a purely additive feature with no modifications to existing APIs or models.

Testing Notes

  • Verify all new API endpoint modules handle both sync and async invocation patterns consistently with existing endpoints
  • Test the LedgerClient.create_mapping_structure method with various ledger configurations
  • Validate ReportClient operations end-to-end: create → get → list → regenerate → share → delete
  • Confirm StatementResponse and FactRowResponse correctly deserialize nested financial data structures
  • Ensure new model serialization/deserialization round-trips cleanly (especially ReportResponse at 330 lines, the largest new model)

Infrastructure Considerations

  • No new dependencies introduced; all new code builds on the existing client framework and patterns
  • The 10 new models and 7 new API modules add ~3,200 lines; ensure documentation generation pipelines pick up the new modules
  • Extension client registration should be validated in any integration or environment bootstrap tests

🤖 Generated with Claude Code

Branch Info:

  • Source: feature/report-builder
  • Target: main
  • Type: feature

Co-Authored-By: Claude noreply@anthropic.com

## 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.
@jfrench9 jfrench9 merged commit a722ea7 into main Mar 30, 2026
1 check passed
@jfrench9 jfrench9 deleted the feature/report-builder branch March 30, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant