- Regenerate proto stubs from correct cqrs_services.proto file
- Update GrpcCqrsApiClient to use DynamicQueryService and CommandService
- Fix type conversions for deliveries, routes, and commands
- Convert proto Timestamp to ISO8601 strings for model compatibility
- Convert string amounts to doubles for delivery orders
- Use Int64 for delivery IDs in gRPC commands
Work in progress: Timestamp conversion extension needs finalization.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds gRPC command methods to GrpcCqrsApiClient for delivery operations:
- completeDelivery: Mark delivery as completed with optional timestamp
- markDeliveryAsUncompleted: Revert completed delivery to pending
- skipDelivery: Skip a delivery that cannot be completed
All methods follow the Result<T> pattern for consistent error handling,
check CommandResponse.success flag, and map error messages appropriately.
Co-Authored-By: Claude <noreply@anthropic.com>
Implements the foundational gRPC client class with:
- Lazy ClientChannel initialization with proper credentials
- DeliveryServiceClient lazy initialization
- Authentication via Bearer token in gRPC metadata
- CallOptions builder with token injection
- gRPC error to ApiError mapping (status codes -> HTTP equivalents)
- Token refresh on UNAUTHENTICATED errors (single retry)
- Proper channel shutdown/terminate methods
The core _executeWithAuth and _executeCommandWithAuth methods provide
the foundation for query and command methods in subsequent subtasks.
Co-Authored-By: Claude <noreply@anthropic.com>