import { Icon } from '../shared/Icon'; const ENDPOINTS = [ { method: 'PUT', path: '/b2c/driver/trips/:tripId/booking-status', body: '{ "booking_status": "BOOK_ACCEPTED" | "BOOK_DRIVER_CANCELED" }', description: 'Driver updates their booking status — accept or cancel the assigned ride.', }, ]; const TRANSITIONS = [ { from: 'TRIP_BOOK_PENDING', to: 'BOOK_ACCEPTED', action: 'Driver accepts the assignment' }, { from: 'TRIP_BOOK_PENDING', to: 'BOOK_DRIVER_CANCELED', action: 'Driver cancels the assignment' }, { from: 'TRIP_BOOK_OPERATION_DRIVER_CONFIRMED', to: 'BOOK_DRIVER_CANCELED', action: 'Driver cancels after confirming' }, ]; const DAC_CARDS = [ { action: 'confirm', description: 'Shown when driver is assigned and needs to confirm availability', triggers: 'BOOK_ACCEPTED on tap' }, { action: 'cancel', description: 'Shown alongside confirm — driver can decline', triggers: 'BOOK_DRIVER_CANCELED on tap' }, { action: 'view_ride', description: 'Shown after confirmation — ride details view', triggers: 'Opens ride detail screen' }, ]; const INTEGRATION_CHECKLIST = [ 'Handle push notification with action "confirm_driver_booking" — show confirmation DAC card', 'Handle push notification with action "driver_booking_timeout" — show timeout warning', 'Handle push notification with action "driver_booking_ops_cancelled" — remove DAC card', 'Handle push notification with action "booking_driver_assigned" — show new assignment card', 'Handle push notification with action "booking_canceled_by_rider" — remove DAC card', 'Implement DAC card rendering for confirm/cancel actions', 'Handle HTTP 409 responses (concurrent update / invalid transition)', 'Handle re-dispatch scenario: after driver cancel, ride goes back to dispatch queue', 'Handle the publishRideDispatchBookingMW side effect: new driver may be assigned', ]; export function DriverIntegrationSection() { return (
{ep.path}
{ep.description}
Request Body{ep.body}
| From | To | Action | |
|---|---|---|---|
| {t.from} | {t.to} | {t.action} |
{card.description}