alerts namespace

Functions

Function Description
onAlertPublished(alertType, handler) Declares a function that can handle Firebase Alerts from CloudEvents.
onAlertPublished(options, handler) Declares a function that can handle Firebase Alerts from CloudEvents.

Interfaces

Interface Description
AlertEvent A custom CloudEvent for Firebase Alerts (with custom extension attributes).
FirebaseAlertData The CloudEvent data emitted by Firebase Alerts.
FirebaseAlertOptions Configuration for Firebase Alert functions.

Namespaces

Namespace Description
appDistribution
billing
crashlytics
performance

Type Aliases

Type Alias Description
AlertType The underlying alert type of the Firebase Alerts provider.

alerts.onAlertPublished()

Declares a function that can handle Firebase Alerts from CloudEvents.

Signature:

export declare function onAlertPublished<T extends {
    ["@type"]: string;
} = any>(alertType: AlertType, handler: (event: AlertEvent<T>) => any | Promise<any>): CloudFunction<AlertEvent<T>>;

Parameters

Parameter Type Description
alertType AlertType the alert type or Firebase Alert function configuration.
handler (event: AlertEvent<T>) => any | Promise<any> a function that can handle the Firebase Alert inside a CloudEvent.

Returns:

CloudFunction<AlertEvent<T>>

A function that you can export and deploy.

alerts.onAlertPublished()

Declares a function that can handle Firebase Alerts from CloudEvents.

Signature:

export declare function onAlertPublished<T extends {
    ["@type"]: string;
} = any>(options: FirebaseAlertOptions, handler: (event: AlertEvent<T>) => any | Promise<any>): CloudFunction<AlertEvent<T>>;

Parameters

Parameter Type Description
options FirebaseAlertOptions the alert type and other options for this cloud function.
handler (event: AlertEvent<T>) => any | Promise<any> a function that can handle the Firebase Alert inside a CloudEvent.

Returns:

CloudFunction<AlertEvent<T>>

alerts.AlertType

The underlying alert type of the Firebase Alerts provider.

Signature:

export type AlertType = "crashlytics.newFatalIssue" | "crashlytics.newNonfatalIssue" | "crashlytics.regression" | "crashlytics.stabilityDigest" | "crashlytics.velocity" | "crashlytics.newAnrIssue" | "billing.planUpdate" | "billing.planAutomatedUpdate" | "appDistribution.newTesterIosDevice" | "appDistribution.inAppFeedback" | "performance.threshold" | string;