basebot-util-fcm
Send notifications using FCM
Usage
Requires the following env vars:
FIREBASE
Your service account JSON (docs)
Example
const notification = userId: 'some-user-id' storage payload: text: 'Your report is ready' trigger: 'reportReady' click_action: 'NOTIFICATION_CLICK' // sending a notification immediately // scheduling a notification // any date object