Add event block and agent management operations to LedgerClient#102
Merged
Add event block and agent management operations to LedgerClient#102
Conversation
…ures - Introduced `TransactionTemplateItem` and `TransactionTemplateLeg` models to represent transaction items and legs. - Created `UpdateAgentRequest` model with comprehensive fields for agent updates, including address and metadata patching. - Added `UpdateAgentRequestAddressType0` and `UpdateAgentRequestMetadataPatch` for structured address and metadata handling. - Implemented `UpdateEventBlockRequest` and related models for event block updates, including transition handling and metadata patching. - Added `UpdateEventHandlerRequest` and associated models to manage event handler updates with metadata expressions. - Enhanced models with additional properties handling for flexibility in data representation.
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 a new event-driven domain model to the RoboSystems ledger client, replacing the previous journal entry, closing entry, transaction, and schedule-based operations with a unified event block, event handler, and agent management paradigm. This is a significant API redesign that modernizes how ledger operations are structured and executed.
Key Changes
New Domain Concepts
TransactionTemplate,TransactionTemplateEntry,TransactionTemplateItem,TransactionTemplateLeg) providing structured templates for transaction generationAPI Operations
op_create_agent,op_update_agentop_create_event_block,op_update_event_block,op_preview_event_blockop_create_event_handler,op_update_event_handlerop_create_transaction,op_dispose_schedule,op_create_closing_entry,op_create_manual_closing_entry,op_create_journal_entry,op_reverse_journal_entry,op_truncate_scheduleLedgerClient Updates
ledger_client.pyextensively (~470 lines changed) to expose the new event block and agent management methods__init__.pyto reflect the new entity landscapeBreaking Changes
CreateJournalEntryRequest,CreateTransactionRequest,CreateClosingEntryOperation,CreateManualClosingEntryRequestReverseJournalEntryRequest,DisposeScheduleRequest,TruncateScheduleOperationManualLineItemRequestand associated status/type enumsConsumers relying on journal entry creation, transaction creation, schedule disposal/truncation, or closing entry workflows must migrate to the new event block and event handler APIs.
Testing
test_ledger_client.py(~467 lines added) covering:op_update_journal_entrytests remain intactInfrastructure Considerations
LedgerClientwill need corresponding updates🤖 Generated with Claude Code
Branch Info:
feature/event-blockmainCo-Authored-By: Claude noreply@anthropic.com