Methods

onCreate

onCreate(handler) returns functions.CloudFunction

Event handler that fires every time new data is created in Cloud Firestore.

Parameter

handler

function(non-null functions.firestore.DocumentSnapshot, optional non-null functions.EventContext)

Event handler which is run every time new data is created in Cloud Firestore.

Value must not be null.

Returns

non-null functions.CloudFunction A Cloud Function which you can export and deploy.

onDelete

onDelete(handler) returns functions.CloudFunction

Event handler that fires every time data is deleted from Cloud Firestore.

Parameter

handler

function(non-null functions.firestore.DocumentSnapshot, optional non-null functions.EventContext)

Event handler which is run every time data is deleted from Cloud Firestore.

Value must not be null.

Returns

non-null functions.CloudFunction A Cloud Function which you can export.

onUpdate

onUpdate(handler) returns functions.CloudFunction

Event handler that fires every time data is updated in Cloud Firestore.

Parameter

handler

function(non-null functions.Change containing non-null functions.firestore.DocumentSnapshot, optional non-null functions.EventContext)

Event handler which is run every time data is updated in Cloud Firestore.

Value must not be null.

Returns

non-null functions.CloudFunction A Cloud Function which you can export and deploy.

onWrite

onWrite(handler) returns functions.CloudFunction

Event handler that fires every time a Cloud Firestore write of any kind (creation, update, or delete) occurs.

Parameter

handler

function(functions.Change containing non-null functions.firestore.DocumentSnapshot, optional non-null functions.EventContext)

Event handler which is run every time a Cloud Firestore write occurs.

Value must not be null.

Returns

non-null functions.CloudFunction A Cloud Function which you can export and deploy.