Skip to content

feat(filters): Add filter builder pattern for event querying#587

Closed
shelterfaithapps wants to merge 1 commit into
legend-esc:mainfrom
shelterfaithapps:feat/filter-builder-pattern
Closed

feat(filters): Add filter builder pattern for event querying#587
shelterfaithapps wants to merge 1 commit into
legend-esc:mainfrom
shelterfaithapps:feat/filter-builder-pattern

Conversation

@shelterfaithapps

Copy link
Copy Markdown
Contributor

Summary

Add type-safe filter builder pattern classes for querying and filtering Soroban events.

Changes

  • Create for date range filtering with convenient presets
  • Create with format validation
  • Create with common event type predicates
  • Create combining all filters with fluent API
  • Add example usage patterns demonstrating various filter combinations
  • Add comprehensive unit tests
  • Integrate with for backward compatibility

Features

  • Type-safe: All filters are strongly typed with TypeScript
  • Fluent API: Chain filters for readable queries
  • Validated: Contract ID format validation built-in
  • Composable: Combine multiple filters easily
  • Paginated: Built-in pagination support

Example Usage

Closes #744
Closes #743
Closes #741
Closes #740

- Create DateRangeFilter for date range filtering
- Create ContractIdFilter with validation
- Create EventTypePredicate with common predicates
- Create EventFilterBuilder combining all filters
- Add example usage patterns
- Add comprehensive unit tests
- Integrate with EventsService

Closes #744
Closes #743
Closes #741
Closes #740
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