feat: Events command implementation
Summary
Add CLI support for the backend event subsystem so users can manage and resolve runtime events directly from the CLI.
This feature brings parity with the backend event APIs by exposing commands for CRUD operations and runtime event resolution through the CLI interface.
The implementation should support the same behavior and validation semantics currently available in the backend service.
Background
The backend already exposes event management and runtime event resolution through /api/v1/events endpoints.
Currently, interacting with these endpoints requires direct API usage. This issue tracks adding equivalent functionality to the CLI to improve developer workflows, operational tooling, debugging, and scripting support.
Expected Behavior
- Users can manage events directly from the CLI
- CLI requests map to the existing backend event APIs
- Runtime event resolution supports page-context lookups
- Filter payloads are serialized correctly before submission
- Backend validation and conflict behavior are surfaced clearly in CLI responses
Acceptance Criteria
- CLI supports all existing event CRUD endpoints
- CLI supports resolving the current active event by page route
-
X-Page-Routebehavior is correctly implemented for runtime event resolution - Event filter payloads support:
- enums
- UUIDs
- date values
- nested filter structures
- CLI properly handles:
- empty responses
- invalid IDs
- malformed payloads
- duplicate active event conflicts (
409)
- Help text and command documentation are added
- Tests are added for:
- CRUD operations
- current event resolution
- serialization behavior
- conflict/error handling
Notes
- Runtime event resolution should mirror backend behavior exactly
- If no matching active event exists, the CLI should return an empty/null response
- If multiple active events match the same page context, backend conflict responses should be surfaced without modification
- Event scheduling behavior remains fully backend-driven via
start_dateandend_date