I’m developing an Android Cordova app that uses Firebase services (Auth, Firestore) on VS Code (Windows 11 Pro).
I use pure JS and the latest modular version of Firebase SDK (no plugins): in my Cordova project I’ve installed all the necessity Node modules for working in this way (I do not want to use CDN for accessing API). I also use Firebase emulators.
I want to use Firebase Functions v2, using ES6 syntax, modifying appropriately the functions/package.json file, adding "type": "module"
;
now, if you can modify the functions/package.json in that manner it means that you can use the ES6 syntax officially.
The problem is that I am not able to figure out how to use the triggers in ES6 syntax on the official docs neither using ai chatbots and VS Code intellisense does not give any clue. For example, the onCreate or onDelete triggers for Auth, suggested by all the ai chatbots and contemplated on the official documentation, seems that not exist in ES6 syntax or I was not able to find them.
In other words: how to use Functions v2 Auth and Firestore triggers in pure JS and ES6 syntax? Where are they? How are they called?