So here are the available triggers for Firestore cloud functions:
https://firebase.google.com/docs/firestore/extend-with-functions
onCreate
functions.firestore
.document('my-collection/{doc-id}')
.onCreate((snap, context) => { /* ... */ });
onDelete
functions.firestore
.document('my-collection/{doc-id}')
.onDelete((snap, context) => { /* ... */ });
onUpdate
functions.firestore
.document('my-collection/{doc-id}')
.onUpdate((change, context) => { /* ... */ });
onWrite
functions.firestore
.document('my-collection/{doc-id}')
.onWrite((change, context) => { /* ... */ });
I'm converting my project to Typescript. What types should I use for the params change context and snap?