firebase-admin.functions package
Stay organized with collections
Save and categorize content based on your preferences.
Firebase Functions service.
Functions
Function |
Description |
getFunctions(app) |
Gets the Functions service for the default app or a given app.getFunctions() can be called with no arguments to access the default app's Functions service or as getFunctions(app) to access the Functions service associated with a specific app. |
Classes
Class |
Description |
Functions |
The Firebase Functions service interface. |
TaskQueue |
The TaskQueue interface. |
Interfaces
Type Aliases
getFunctions(app)
Gets the Functions service for the default app or a given app.
getFunctions()
can be called with no arguments to access the default app's Functions
service or as getFunctions(app)
to access the Functions
service associated with a specific app.
Signature:
export declare function getFunctions(app?: App): Functions;
Parameters
Parameter |
Type |
Description |
app |
App |
Optional app for which to return the Functions service. If not provided, the default Functions service is returned. |
Returns:
Functions
The default Functions
service if no app is provided, or the Functions
service associated with the provided app.
Example 1
// Get the `Functions` service for the default app
const defaultFunctions = getFunctions();
Example 2
// Get the `Functions` service for a given app
const otherFunctions = getFunctions(otherApp);
DeliverySchedule
Type representing delivery schedule options. DeliverySchedule
is a union type of DelayDelivery and AbsoluteDelivery types.
Signature:
export type DeliverySchedule = DelayDelivery | AbsoluteDelivery;
TaskOptions
Type representing task options.
Signature:
export type TaskOptions = DeliverySchedule & TaskOptionsExperimental & {
dispatchDeadlineSeconds?: number;
id?: string;
headers?: Record<string, string>;
};
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-16 UTC.
[null,null,["Last updated 2024-04-16 UTC."],[],[],null,["# firebase-admin.functions package\n\nFirebase Functions service.\n\nFunctions\n---------\n\n| Function | Description |\n|-------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [getFunctions(app)](./firebase-admin.functions.md#getfunctions_8a40afc) | Gets the [Functions](./firebase-admin.functions.functions.md#functions_class) service for the default app or a given app.`getFunctions()` can be called with no arguments to access the default app's `Functions` service or as `getFunctions(app)` to access the `Functions` service associated with a specific app. |\n\nClasses\n-------\n\n| Class | Description |\n|----------------------------------------------------------------------|---------------------------------------------|\n| [Functions](./firebase-admin.functions.functions.md#functions_class) | The Firebase `Functions` service interface. |\n| [TaskQueue](./firebase-admin.functions.taskqueue.md#taskqueue_class) | The `TaskQueue` interface. |\n\nInterfaces\n----------\n\n| Interface | Description |\n|--------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------|\n| [AbsoluteDelivery](./firebase-admin.functions.absolutedelivery.md#absolutedelivery_interface) | Interface representing task options with absolute delivery. |\n| [DelayDelivery](./firebase-admin.functions.delaydelivery.md#delaydelivery_interface) | Interface representing task options with delayed delivery. |\n| [TaskOptionsExperimental](./firebase-admin.functions.taskoptionsexperimental.md#taskoptionsexperimental_interface) | Type representing experimental (beta) task options. |\n\nType Aliases\n------------\n\n| Type Alias | Description |\n|--------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [DeliverySchedule](./firebase-admin.functions.md#deliveryschedule) | Type representing delivery schedule options. `DeliverySchedule` is a union type of [DelayDelivery](./firebase-admin.functions.delaydelivery.md#delaydelivery_interface) and [AbsoluteDelivery](./firebase-admin.functions.absolutedelivery.md#absolutedelivery_interface) types. |\n| [TaskOptions](./firebase-admin.functions.md#taskoptions) | Type representing task options. |\n\ngetFunctions(app)\n-----------------\n\nGets the [Functions](./firebase-admin.functions.functions.md#functions_class) service for the default app or a given app.\n\n`getFunctions()` can be called with no arguments to access the default app's `Functions` service or as `getFunctions(app)` to access the `Functions` service associated with a specific app.\n\n**Signature:** \n\n export declare function getFunctions(app?: App): Functions;\n\n### Parameters\n\n| Parameter | Type | Description |\n|-----------|------|-------------------------------------------------------------------------------------------------------------------------|\n| app | App | Optional app for which to return the `Functions` service. If not provided, the default `Functions` service is returned. |\n\n**Returns:**\n\n[Functions](./firebase-admin.functions.functions.md#functions_class)\n\nThe default `Functions` service if no app is provided, or the `Functions` service associated with the provided app.\n\n### Example 1\n\n // Get the `Functions` service for the default app\n const defaultFunctions = getFunctions();\n\n### Example 2\n\n // Get the `Functions` service for a given app\n const otherFunctions = getFunctions(otherApp);\n\nDeliverySchedule\n----------------\n\nType representing delivery schedule options. `DeliverySchedule` is a union type of [DelayDelivery](./firebase-admin.functions.delaydelivery.md#delaydelivery_interface) and [AbsoluteDelivery](./firebase-admin.functions.absolutedelivery.md#absolutedelivery_interface) types.\n\n**Signature:** \n\n export type DeliverySchedule = DelayDelivery | AbsoluteDelivery;\n\nTaskOptions\n-----------\n\nType representing task options.\n\n**Signature:** \n\n export type TaskOptions = DeliverySchedule & TaskOptionsExperimental & {\n dispatchDeadlineSeconds?: number;\n id?: string;\n headers?: Record\u003cstring, string\u003e;\n };"]]