import { Icon } from '../shared/Icon'; const ENDPOINTS = [ { method: 'PUT', path: '/rider/trips/:tripId/booking-status', body: '{ "booking_status": "BOOK_CONFIRMED" | "BOOK_UNCONFIRMED" | "RIDER_CANCELED" }', description: 'Rider updates their booking status — confirm, decline, or cancel.', }, ]; const TRANSITIONS = [ { from: 'TRIP_BOOK_PENDING', to: 'BOOK_CONFIRMED', action: 'Rider confirms the booking' }, { from: 'TRIP_BOOK_PENDING', to: 'BOOK_UNCONFIRMED', action: 'Rider declines (maps to BOOK_RIDER_CANCELED)' }, { from: 'TRIP_BOOK_PENDING', to: 'RIDER_CANCELED', action: 'Rider cancels before confirmation' }, { from: 'TRIP_BOOK_RIDER_CONFIRMED', to: 'RIDER_CANCELED', action: 'Rider cancels after confirming' }, ]; const INTEGRATION_CHECKLIST = [ 'Handle push notification with action "confirm_booking" — deep link to booking confirmation screen', 'Handle push notification with action "booking_timeout" — show warning that confirmation window is closing', 'Handle push notification with action "booking_cancelled" — show cancellation screen', 'Handle push notification with action "booking_driver_assigned_rider" — show driver info', 'Handle push notification with action "booking_driver_confirmed_rider" — show confirmed status', 'Handle push notification with action "booking_canceled_by_driver" — show re-assignment pending', 'Implement booking status polling or WebSocket for real-time status updates', 'Handle HTTP 409 responses gracefully (concurrent update / invalid transition)', 'Handle HTTP 404 for non-booked trips (is_booked: false)', ]; export function RiderIntegrationSection() { return (
{ENDPOINTS.map((ep) => (
{ep.method} {ep.path}

{ep.description}

Request Body
{ep.body}
))}
Valid Rider Transitions
{TRANSITIONS.map((t, i) => ( ))}
From To Action
{t.from} {t.to} {t.action}

Integration Checklist

); }