Skip to content

Latest commit

 

History

History

Examples

This directory contains several examples demonstrating how to use the firebase_functions package to write triggers for different Firebase and Google Cloud services.

Example Description Events Demonstrated
alerts Demonstrates handling Firebase Alerts (Crashlytics, App Distribution, Billing, Performance). AppDistributionNamespace.onNewTesterIosDevicePublished
AppDistributionNamespace.onInAppFeedbackPublished
CrashlyticsNamespace.onNewFatalIssuePublished
CrashlyticsNamespace.onNewAnrIssuePublished
CrashlyticsNamespace.onRegressionAlertPublished
CrashlyticsNamespace.onNewNonfatalIssuePublished
CrashlyticsNamespace.onStabilityDigestPublished
CrashlyticsNamespace.onVelocityAlertPublished
BillingNamespace.onPlanUpdatePublished
BillingNamespace.onPlanAutomatedUpdatePublished
PerformanceNamespace.onThresholdAlertPublished
auth Demonstrates handling Firebase Authentication blocking events. IdentityNamespace.beforeUserCreated
IdentityNamespace.beforeUserSignedIn
IdentityNamespace.beforeEmailSent
IdentityNamespace.beforeSmsSent
client_app A simple web client demonstrating how to call Firebase Functions using the Firebase JavaScript SDK. HttpsNamespace.onRequest
HttpsNamespace.onCall
database Demonstrates handling Firebase Realtime Database triggers. DatabaseNamespace.onValueCreated
DatabaseNamespace.onValueUpdated
DatabaseNamespace.onValueDeleted
DatabaseNamespace.onValueWritten
eventarc Demonstrates handling custom Eventarc events. EventarcNamespace.onCustomEventPublished
firestore Demonstrates handling Cloud Firestore document triggers (with and without auth context). FirestoreNamespace.onDocumentCreated
FirestoreNamespace.onDocumentUpdated
FirestoreNamespace.onDocumentDeleted
FirestoreNamespace.onDocumentWritten
FirestoreNamespace.onDocumentCreatedWithAuthContext
FirestoreNamespace.onDocumentUpdatedWithAuthContext
FirestoreNamespace.onDocumentDeletedWithAuthContext
FirestoreNamespace.onDocumentWrittenWithAuthContext
firestore_test Demonstrates testing techniques for Cloud Firestore functions. FirestoreNamespace.onDocumentCreated
https Demonstrates creating HTTP endpoints and callable functions. HttpsNamespace.onRequest
HttpsNamespace.onCall
HttpsNamespace.onCallWithData
pubsub Demonstrates handling Cloud Pub/Sub topic messages. PubSubNamespace.onMessagePublished
remoteconfig Demonstrates handling Firebase Remote Config update events. RemoteConfigNamespace.onConfigUpdated
scheduler Demonstrates creating scheduled functions (cron jobs) with custom configurations. SchedulerNamespace.onSchedule
storage Demonstrates handling Cloud Storage events. StorageNamespace.onObjectFinalized
StorageNamespace.onObjectArchived
StorageNamespace.onObjectDeleted
StorageNamespace.onObjectMetadataUpdated
tasks Demonstrates using Cloud Tasks for task queue functions. TasksNamespace.onTaskDispatched
testlab Demonstrates handling Firebase Test Lab matrix completion events. TestLabNamespace.onTestMatrixCompleted