firebase-admin.functions package

使用できます。

関数

関数 説明
getFunctions(アプリ) デフォルト アプリまたは特定のアプリの Functions サービスを取得します。引数なしで getFunctions() を呼び出してデフォルト アプリの Functions サービスにアクセスするか、getFunctions(app) として呼び出して、特定のアプリに関連付けられている Functions サービスにアクセスできます。

クラス

クラス 説明
関数 Firebase Functions サービス インターフェース。
タスクキュー TaskQueue インターフェース。

インターフェース

インターフェース 説明
AbsoluteDelivery 絶対配信によるタスク オプションを表すインターフェース。
遅延配信 遅延配信のタスク オプションを表すインターフェース。
TaskOptions(試験運用版) 試験運用版(ベータ版)のタスク オプションを表す型。

型エイリアス

タイプ エイリアス 説明
DeliverySchedule 配信スケジュールのオプションを表す型。DeliverySchedule は、DelayDeliveryAbsoluteDelivery タイプの union タイプです。
TaskOptions タスクのオプションを表す型。

getFunctions(アプリ)

デフォルト アプリまたは特定のアプリの Functions サービスを取得します。

デフォルト アプリの Functions サービスにアクセスするには、引数なしで getFunctions() を呼び出すか、getFunctions(app) として呼び出して特定のアプリに関連付けられている Functions サービスにアクセスします。

署名:

export declare function getFunctions(app?: App): Functions;

パラメータ

パラメータ 説明
app アプリ Functions サービスを返すオプションのアプリ。指定されていない場合は、デフォルトの Functions サービスが返されます。

戻り値:

関数

アプリが指定されていない場合は、デフォルトの Functions サービス、または指定されたアプリに関連付けられている Functions サービス。

例 1

// Get the `Functions` service for the default app
const defaultFunctions = getFunctions();

例 2

// Get the `Functions` service for a given app
const otherFunctions = getFunctions(otherApp);

配信スケジュール

配信スケジュールのオプションを表す型。DeliverySchedule は、DelayDeliveryAbsoluteDelivery タイプの union タイプです。

署名:

export type DeliverySchedule = DelayDelivery | AbsoluteDelivery;

TaskOptions

タスクのオプションを表す型。

署名:

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