Skip to content

Replace schedule operations with information block operations in ledger client#100

Merged
jfrench9 merged 2 commits intomainfrom
feature/information-block
Apr 23, 2026
Merged

Replace schedule operations with information block operations in ledger client#100
jfrench9 merged 2 commits intomainfrom
feature/information-block

Conversation

@jfrench9
Copy link
Copy Markdown
Member

Summary

Refactors the ledger client to replace the schedule-based domain model with a new Information Block abstraction. This is a significant domain shift that renames and restructures CRUD operations, request/response models, and GraphQL queries throughout the client library. Additionally, a new Evaluate Rules operation is introduced.

Key Accomplishments

Domain Model Replacement

  • Renamed all schedule operations (op_create_schedule, op_delete_schedule, op_update_schedule) to their information block equivalents (op_create_information_block, op_delete_information_block, op_update_information_block)
  • Removed schedule-specific models: CreateScheduleRequest, UpdateScheduleRequest, DeleteScheduleRequest, ScheduleMetadataRequest, EntryTemplateRequest, and EntryTemplateRequestEntryType
  • Added new information block models: CreateInformationBlockRequest, CreateInformationBlockRequestPayload, UpdateInformationBlockRequest, UpdateInformationBlockRequestPayload, DeleteInformationBlockRequest, DeleteInformationBlockRequestPayload

New Evaluate Rules Operation

  • Implemented op_evaluate_rules — a new operation (301 lines) for evaluating rules against the ledger
  • Added corresponding EvaluateRulesRequest model

Client & Query Layer Updates

  • Updated ledger_client.py to expose information block operations and the new evaluate rules operation
  • Updated GraphQL query definitions in the ledger module to align with the new information block schema
  • Updated model re-exports in models/__init__.py

Breaking Changes

⚠️ This is a breaking change. All consumers of the ledger client that reference schedule operations or schedule-related models will need to migrate:

  • create_schedulecreate_information_block
  • update_scheduleupdate_information_block
  • delete_scheduledelete_information_block
  • All *ScheduleRequest / *ScheduleMetadataRequest / EntryTemplateRequest* models are removed and replaced with *InformationBlock* equivalents
  • The request payload structure has been simplified (e.g., removal of EntryTemplateRequest and ScheduleMetadataRequest in favor of a flatter payload model)

Testing Notes

  • test_ledger_client.py has been substantially updated (124 lines changed) to cover the new information block operations and evaluate rules functionality
  • Tests reflect the new model structures and client method signatures
  • Verify that all downstream services and integrations are updated to use the new API surface before merging

Infrastructure Considerations

  • GraphQL schema changes are required on the server side to support information block mutations and the evaluate rules query/mutation
  • Ensure the backend ledger service has been updated or is being deployed in coordination with this client change
  • Any CI/CD pipelines that depend on the old schedule-based models or operations will need to be updated

🤖 Generated with Claude Code

Branch Info:

  • Source: feature/information-block
  • Target: main
  • Type: feature

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

- Added functionality to update and delete information blocks through new API endpoints.
- Introduced models for creating and updating information blocks, including payload structures.
- Enhanced LedgerClient with methods to fetch individual information blocks and list them with optional filters.
- Updated GraphQL queries and parsing functions to support new information block features.
- Added tests for the new information block functionalities, ensuring correct behavior and handling of edge cases.
…n block operations

- Updated imports in ledger_client.py to replace schedule-related operations with information block operations.
- Removed CreateScheduleRequest, DeleteScheduleRequest, UpdateScheduleRequest, and related models.
- Introduced CreateInformationBlockRequest, DeleteInformationBlockRequest, UpdateInformationBlockRequest, and their payloads.
- Modified methods in LedgerClient to handle information blocks instead of schedules.
- Updated unit tests to reflect changes in the operations and ensure correct functionality for information blocks.
@jfrench9 jfrench9 merged commit 1026269 into main Apr 23, 2026
1 check passed
@jfrench9 jfrench9 deleted the feature/information-block branch April 23, 2026 02:10
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