My Push Notifications
The CRS app's push notifications (issue #216). Register the device's Firebase token after sign-in and switch it off on sign-out. Every push carries data.deliveryId: report it back when the push arrives (received) and when the agent taps it (clicked) — those two calls are the only source of the received and clicked numbers the PMS reads. The data also carries type (BROADCAST or the trigger, e.g. BOOKING_CONFIRMED), ctaText, ctaLink (an app route such as /pdp/{listingId} or /bookings/{bookingId}, or an https:// URL), imageUrl, and bookingId / broadcastId where there is one.
📄️ The homepage banner
The newest broadcast banner still showing that was sent to the caller. 204 when there is none.
📄️ Report a push clicked
Call when the agent taps the push or its CTA. Also records it received if that was not reported.
📄️ Report a push received
Call when the push arrives, with its `data.deliveryId`. Safe to repeat: each call counts as one more device receiving it.
📄️ Register this device for push
Idempotent: registering a token again refreshes it. A token another agent registered on this device moves to the caller, so a shared phone stops getting the previous agent's pushes. Equivalent to the PMS `POST /api/push/register`, which stays for older apps.
📄️ Switch off this device's push
Call on sign-out. Only the caller's own tokens are switched off.