Index

Constructors

constructor

Properties

Private options

Accessors

analytics

  • get analytics(): object
  • Returns object

    • event: function
      • Select analytics events to listen to for events.

        Parameters

        • analyticsEventType: string

          Name of the analytics event type.

        Returns AnalyticsEventBuilder

auth

  • get auth(): object
  • Returns object

    • user: function
      • Handle events related to Firebase authentication users.

        Returns UserBuilder

crashlytics

  • get crashlytics(): object
  • Returns object

    • issue: function
      • Handle events related to Crashlytics issues. An issue in Crashlytics is an aggregation of crashes which have a shared root cause.

        Returns IssueBuilder

database

  • get database(): object
  • Returns object

    • instance: function
      • Selects a database instance that will trigger the function. If omitted, will pick the default database for your project.

        The Realtime Database instance to use.

        Parameters

        • instance: string

        Returns InstanceBuilder

    • ref: function
      • Select Firebase Realtime Database Reference to listen to.

        Path of the database to listen to.

        Parameters

        • path: string

        Returns RefBuilder

firestore

  • get firestore(): object
  • Returns object

    • document: function
      • Select the Firestore document to listen to for events.

        Parameters

        • path: string

          Full database path to listen to. This includes the name of the collection that the document is a part of. For example, if the collection is named "users" and the document is named "Ada", then the path is "/users/Ada".

        Returns DocumentBuilder

https

  • get https(): object
  • Returns object

    • onCall: function
      • onCall(handler: function): TriggerAnnotated & function & Runnable<any>
      • Declares a callable method for clients to call using a Firebase SDK.

        Parameters

        • handler: function

          A method that takes a data and context and returns a value.

        Returns TriggerAnnotated & function & Runnable<any>

    • onRequest: function
      • onRequest(handler: function): TriggerAnnotated & function
      • Handle HTTP requests.

        Parameters

        • handler: function

          A function that takes a request and response object, same signature as an Express app.

            • (req: Request, resp: express.Response): void
            • Parameters

              • req: Request
              • resp: express.Response

              Returns void

        Returns TriggerAnnotated & function

pubsub

  • get pubsub(): object
  • Returns object

    • schedule: function
    • topic: function
      • Select Cloud Pub/Sub topic to listen to.

        Name of Pub/Sub topic, must belong to the same project as the function.

        Parameters

        • topic: string

        Returns TopicBuilder

remoteConfig

  • get remoteConfig(): object
  • Returns object

    • onUpdate: function
      • Handle all updates (including rollbacks) that affect a Remote Config project.

        Parameters

        • handler: function

          A function that takes the updated Remote Config template version metadata as an argument.

        Returns Runnable<TemplateVersion> & TriggerAnnotated & function

storage

  • get storage(): object
  • Returns object

    • bucket: function
      • The optional bucket function allows you to choose which buckets' events to handle. This step can be bypassed by calling object() directly, which will use the default Cloud Storage for Firebase bucket.

        Name of the Google Cloud Storage bucket to listen to.

        Parameters

        • Optional bucket: string

        Returns BucketBuilder

    • object: function
      • Handle events related to Cloud Storage objects.

        Returns ObjectBuilder

testLab

  • get testLab(): object

Methods

region

  • Configure the regions that the function is deployed to.

    example

    functions.region('us-east1')

    example

    functions.region('us-east1', 'us-central1')

    Parameters

    • Rest