firebase_functions.alerts.app_distribution_fn module

Cloud functions to handle Firebase App Distribution events from Firebase Alerts.

Classes

AppDistributionEvent

class firebase_functions.alerts.app_distribution_fn.AppDistributionEvent(specversion: str, id: str, source: str, type: str, time: datetime, data: T, subject: str | None, alert_type: str, app_id: str)

Bases: CloudEvent[FirebaseAlertData[T]]

A custom CloudEvent for billing Firebase Alerts.

alert_type: str

The type of the alerts that got triggered.

app_id: str

The Firebase App ID that's associated with the alert.

InAppFeedbackPayload

class firebase_functions.alerts.app_distribution_fn.InAppFeedbackPayload(feedback_report: str, feedback_console_uri: str, tester_email: str, app_version: str, text: str, tester_name: str | None = None, screenshot_uri: str | None = None)

Bases: object

The internal payload object for receiving in-app feedback from a tester. Payload is wrapped inside a FirebaseAlertData object.

app_version: str

Version consisting of versionName and versionCode for Android and CFBundleShortVersionString and CFBundleVersion for iOS.

feedback_console_uri: str

Deep link back to the Firebase console.

feedback_report: str

Resource name. Format: projects/{project_number}/apps/{app_id}/releases/{release_id}/feedbackReports/{feedback_id}

screenshot_uri: str | None = None

URI to download screenshot. This URI is fast expiring.

tester_email: str

Email of the tester.

tester_name: str | None = None

Name of the tester.

text: str

Text entered by the tester.

NewTesterDevicePayload

class firebase_functions.alerts.app_distribution_fn.NewTesterDevicePayload(tester_name: str, tester_email: str, tester_device_model_name: str, tester_device_identifier: str)

Bases: object

The internal payload object for adding a new tester device to app distribution. Payload is wrapped inside a FirebaseAlertData object.

tester_device_identifier: str

The device ID.

tester_device_model_name: str

The device model name.

tester_email: str

Email of the tester.

tester_name: str

Name of the tester.

Functions

on_in_app_feedback_published

firebase_functions.alerts.app_distribution_fn.on_in_app_feedback_published(**kwargs) Callable[[Callable[[AppDistributionEvent[InAppFeedbackPayload]], None]], Callable[[AppDistributionEvent[InAppFeedbackPayload]], None]]

Event handler which runs every time new feedback is received.

Example:

import firebase_functions.alerts.app_distribution_fn as app_distribution_fn

@app_distribution_fn.on_in_app_feedback_published()
def example(alert: app_distribution_fn.InAppFeedbackEvent) -> None:
    print(alert)
Parameters:

**kwargs (as firebase_functions.options.AppDistributionOptions) -- Options.

Return type:

typing.Callable [ [ firebase_functions.alerts.app_distribution_fn.InAppFeedbackEvent ], None ] A function that takes a NewTesterDeviceEvent and returns None.

on_new_tester_ios_device_published

firebase_functions.alerts.app_distribution_fn.on_new_tester_ios_device_published(**kwargs) Callable[[Callable[[AppDistributionEvent[NewTesterDevicePayload]], None]], Callable[[AppDistributionEvent[NewTesterDevicePayload]], None]]

Event handler which runs every time a new tester iOS device is added.

Example:

import firebase_functions.alerts.app_distribution_fn as app_distribution_fn

@app_distribution_fn.on_new_tester_ios_device_published()
def example(alert: app_distribution_fn.NewTesterDeviceEvent) -> None:
    print(alert)
Parameters:

**kwargs (as firebase_functions.options.AppDistributionOptions) -- Options.

Return type:

typing.Callable [ [ firebase_functions.alerts.app_distribution_fn.NewTesterDeviceEvent ], None ] A function that takes a NewTesterDeviceEvent and returns None.

Constants

InAppFeedbackEvent

firebase_functions.alerts.app_distribution_fn.InAppFeedbackEvent

The type of the event for 'on_in_app_feedback_published' functions.

alias of AppDistributionEvent[InAppFeedbackPayload]

NewTesterDeviceEvent

firebase_functions.alerts.app_distribution_fn.NewTesterDeviceEvent

The type of the event for 'on_new_tester_ios_device_published' functions.

alias of AppDistributionEvent[NewTesterDevicePayload]

OnInAppFeedbackPublishedCallable

firebase_functions.alerts.app_distribution_fn.OnInAppFeedbackPublishedCallable

The type of the callable for 'on_in_app_feedback_published' functions.

alias of Callable[[AppDistributionEvent[InAppFeedbackPayload]], None]

OnNewTesterIosDevicePublishedCallable

firebase_functions.alerts.app_distribution_fn.OnNewTesterIosDevicePublishedCallable

The type of the callable for 'on_new_tester_ios_device_published' functions.

alias of Callable[[AppDistributionEvent[NewTesterDevicePayload]], None]