firebase-admin.functions package

Firebase Functions service.

Functions

FunctionDescription
getFunctions(app)Gets theFunctions service for the default app or a given app.getFunctions() can be called with no arguments to access the default app'sFunctions service or asgetFunctions(app) to access theFunctions service associated with a specific app.

Classes

ClassDescription
FunctionsThe FirebaseFunctions service interface.
TaskQueueTheTaskQueue interface.

Interfaces

InterfaceDescription
AbsoluteDeliveryInterface representing task options with absolute delivery.
DelayDeliveryInterface representing task options with delayed delivery.
TaskOptionsExperimentalType representing experimental (beta) task options.

Type Aliases

Type AliasDescription
DeliveryScheduleType representing delivery schedule options.DeliverySchedule is a union type ofDelayDelivery andAbsoluteDelivery types.
TaskOptionsType representing task options.

getFunctions(app)

Gets theFunctions service for the default app or a given app.

getFunctions() can be called with no arguments to access the default app'sFunctions service or asgetFunctions(app) to access theFunctions service associated with a specific app.

Signature:

exportdeclarefunctiongetFunctions(app?:App):Functions;

Parameters

ParameterTypeDescription
appAppOptional app for which to return theFunctions service. If not provided, the defaultFunctions service is returned.

Returns:

Functions

The defaultFunctions service if no app is provided, or theFunctions service associated with the provided app.

Example 1

// Get the `Functions` service for the default appconstdefaultFunctions=getFunctions();

Example 2

// Get the `Functions` service for a given appconstotherFunctions=getFunctions(otherApp);

DeliverySchedule

Type representing delivery schedule options.DeliverySchedule is a union type ofDelayDelivery andAbsoluteDelivery types.

Signature:

exporttypeDeliverySchedule=DelayDelivery|AbsoluteDelivery;

TaskOptions

Type representing task options.

Signature:

exporttypeTaskOptions=DeliverySchedule &TaskOptionsExperimental &{dispatchDeadlineSeconds?:number;id?:string;headers?:Record<string,string>;};

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-04-16 UTC.