RealtimeDB Trigger Functions

Equivalent of - https://firebase.google.com/docs/functions/database-events

onCreate trigger:

functions:
- name: myRealtimeDBOnCreateFunction
type: realtimeDB
trigger: onCreate
# NOTE: If you leave out the field 'createRef' the function will be loaded
# but won't automatically trigger on each run.
# The 'createRef' field creates a new specified reference
# that will trigger this realtimeDB function.
# Keep in mind that this reference will actually be
# create in the emulated RealtimeDB!
createRef:
ref: path/to/reference
data: '{}'
# You can also use a reference from your production
# RealtimeDB.
# This reference will be copied to the emulated RealtimeDB
# and will trigger this function.
createRef:
getFromProd:
ref: path/to/reference

onDelete trigger:

functions:
- name: myRealtimeDBOnDeleteFunction
type: realtimeDB
trigger: onDelete
# NOTE: If you leave out the field 'deleteRef' the function will be loaded
# but won't automatically trigger on each run.
# The 'deleteRef' field deletes a specified reference from
# the emulated RealtimeDB. The deletion will
# trigger this realtimeDB function.
# Keep in mind that this reference will actually be
# deleted from the emulated RealtimeDB. So it must
# exist first!
deleteRef:
# A reference on this path must exist in the
# emulated RealtimeDB
ref: path/to/reference

onUpdate trigger:

functions:
- name: myRealtimeDBOnUpdateFunction
type: realtimeDB
trigger: onUpdate
# NOTE: If you leave out the field 'updateRef' the function will be loaded
# but won't automatically trigger on each run.
# The 'updateRef' field updates a specified reference
# from the emulated RealtimeDB with a new
# data. The update will trigger this realtimeDB function.
# Keep in mind that this reference will actually be
# updated in the emulated RealtimeDB. So it must
# exist first!
updateRef:
ref: path/to/reference
# A JSON string specifying new document's data
data: '{}'

onWrite trigger:

functions:
- name: myRealtimeDBOnWriteFunction
type: realtimeDB
trigger: onWrite
# NOTE: If you omit the following fields the functionwill be loaded
# but won't automatically trigger on each run.
# Use one of 'createRef', 'updateRef', or 'deleteRef'
createRef:
# The same syntax as you would use with an onCreate function.
...
updateRef:
# The same syntax as you would use with an onUpdate function
...
deleteRef:
# The same syntax as you would use with an onDelete function
...