import { DEEPLINK_ACTIONS } from '../../data/referenceData'; const PUSH_PAYLOAD_EXAMPLE = { notification: { title: '{{ localized_title }}', body: '{{ localized_body }}', }, data: { action: 'confirm_booking', trip_id: '{{ trip._id }}', deeplink: 'yassir://booking/confirm?tripId={{ trip._id }}', }, }; const LOCALIZATION_KEYS = [ { action: 'confirm_booking', titleKey: 'booking.confirm.title', bodyKey: 'booking.confirm.body', description: 'Asks rider to confirm their scheduled ride' }, { action: 'booking_timeout', titleKey: 'booking.timeout.title', bodyKey: 'booking.timeout.body', description: 'Warns rider their confirmation window is closing' }, { action: 'booking_cancelled', titleKey: 'booking.cancelled.title', bodyKey: 'booking.cancelled.body', description: 'Informs rider booking was cancelled' }, { action: 'confirm_driver_booking', titleKey: 'driver.booking.confirm.title', bodyKey: 'driver.booking.confirm.body', description: 'Asks driver to confirm availability' }, { action: 'booking_driver_assigned', titleKey: 'driver.booking.assigned.title', bodyKey: 'driver.booking.assigned.body', description: 'Notifies driver of new assignment' }, { action: 'booking_driver_assigned_rider', titleKey: 'booking.driver_assigned.title', bodyKey: 'booking.driver_assigned.body', description: 'Notifies rider that driver is assigned' }, { action: 'booking_driver_confirmed_rider', titleKey: 'booking.driver_confirmed.title', bodyKey: 'booking.driver_confirmed.body', description: 'Notifies rider that driver confirmed' }, ]; export function NotificationLocalizationSection() { const riderActions = DEEPLINK_ACTIONS.filter((a) => a.target === 'rider'); const driverActions = DEEPLINK_ACTIONS.filter((a) => a.target === 'driver'); return (
All booking notifications use sendBookingNotificationWithConfig which
wraps the standard notification service. The payload follows this structure:
{JSON.stringify(PUSH_PAYLOAD_EXAMPLE, null, 2)}
| Action | Title Key | Body Key |
|---|---|---|
| {k.action} | {k.titleKey} | {k.bodyKey} |