firestore namespace

機能

関数説明
onDocumentCreated(ドキュメント、ハンドラー) Firestore でドキュメントが作成されたときにトリガーされるイベント ハンドラー。
onDocumentCreated(opts, ハンドラー) Firestore でドキュメントが作成されたときにトリガーされるイベント ハンドラー。
onDocumentDeleted(ドキュメント、ハンドラー) Firestore でドキュメントが削除されたときにトリガーされるイベント ハンドラー。
onDocumentDeleted(opts, ハンドラー) Firestore でドキュメントが削除されたときにトリガーされるイベント ハンドラー。
onDocumentUpdated(ドキュメント、ハンドラー) Firestore でドキュメントが更新されたときにトリガーされるイベント ハンドラー。
onDocumentUpdated(opts, ハンドラー) Firestore でドキュメントが更新されたときにトリガーされるイベント ハンドラー。
onDocumentWritten(ドキュメント、ハンドラー) Firestore でドキュメントが作成、更新、または削除されたときにトリガーされるイベント ハンドラー。
onDocumentWritten(opts, ハンドラー) Firestore でドキュメントが作成、更新、または削除されたときにトリガーされるイベント ハンドラー。

クラス

クラス説明
変化Realtime Database や Cloud Firestore のonWriteイベントやonUpdateイベントなど、状態を変更するイベント用の Cloud Functions インターフェース。 Changeオブジェクトの構築に使用される形式の詳細については、以下を参照してください。

インターフェース

インターフェース説明
ドキュメントオプションDocumentOptions は、提供されたドキュメントとオプションのデータベースおよび名前空間を使用して EventHandlerOptions を拡張します。
ファイアストアイベントDocumentSnapshot または Change を含む CloudEvent

タイプエイリアス

タイプエイリアス説明
ドキュメントスナップショットFirestore DocumentSnapshot
クエリドキュメントスナップショットFirestore QueryDocumentSnapshot

firestore.onDocumentCreated()

Firestore でドキュメントが作成されたときにトリガーされるイベント ハンドラー。

サイン:

export declare function onDocumentCreated<Document extends string>(document: Document, handler: (event: FirestoreEvent<QueryDocumentSnapshot | undefined, ParamsOf<Document>>) => any | Promise<any>): CloudFunction<FirestoreEvent<QueryDocumentSnapshot | undefined, ParamsOf<Document>>>;

パラメーター

パラメータタイプ説明
書類書類トリガーする Firestore ドキュメント パス。
ハンドラ(イベント: FirestoreEvent <クエリドキュメントスナップショット|未定義、 ParamsOf <ドキュメント>>) => 任意 |約束<任意> Firestore の作成が発生するたびに実行されるイベント ハンドラー。

戻り値:

クラウドファンクション< Firestoreイベント<クエリドキュメントスナップショット|未定義、 ParamsOf <ドキュメント>>>

firestore.onDocumentCreated()

Firestore でドキュメントが作成されたときにトリガーされるイベント ハンドラー。

サイン:

export declare function onDocumentCreated<Document extends string>(opts: DocumentOptions<Document>, handler: (event: FirestoreEvent<QueryDocumentSnapshot | undefined, ParamsOf<Document>>) => any | Promise<any>): CloudFunction<FirestoreEvent<QueryDocumentSnapshot | undefined, ParamsOf<Document>>>;

パラメーター

パラメータタイプ説明
選択しますドキュメントオプション<文書>個々のイベント処理関数に設定できるオプション。
ハンドラ(イベント: FirestoreEvent <クエリドキュメントスナップショット|未定義、 ParamsOf <ドキュメント>>) => 任意 |約束<任意> Firestore の作成が発生するたびに実行されるイベント ハンドラー。

戻り値:

クラウドファンクション< Firestoreイベント<クエリドキュメントスナップショット|未定義、 ParamsOf <ドキュメント>>>

firestore.onDocumentDeleted()

Firestore でドキュメントが削除されたときにトリガーされるイベント ハンドラー。

サイン:

export declare function onDocumentDeleted<Document extends string>(document: Document, handler: (event: FirestoreEvent<QueryDocumentSnapshot | undefined, ParamsOf<Document>>) => any | Promise<any>): CloudFunction<FirestoreEvent<QueryDocumentSnapshot | undefined, ParamsOf<Document>>>;

パラメーター

パラメータタイプ説明
書類書類トリガーする Firestore ドキュメント パス。
ハンドラ(イベント: FirestoreEvent <クエリドキュメントスナップショット|未定義、 ParamsOf <ドキュメント>>) => 任意 |約束<任意> Firestore の削除が発生するたびに実行されるイベント ハンドラー。

戻り値:

クラウドファンクション< Firestoreイベント<クエリドキュメントスナップショット|未定義、 ParamsOf <ドキュメント>>>

firestore.onDocumentDeleted()

Firestore でドキュメントが削除されたときにトリガーされるイベント ハンドラー。

サイン:

export declare function onDocumentDeleted<Document extends string>(opts: DocumentOptions<Document>, handler: (event: FirestoreEvent<QueryDocumentSnapshot | undefined, ParamsOf<Document>>) => any | Promise<any>): CloudFunction<FirestoreEvent<QueryDocumentSnapshot | undefined, ParamsOf<Document>>>;

パラメーター

パラメータタイプ説明
選択しますドキュメントオプション<文書>個々のイベント処理関数に設定できるオプション。
ハンドラ(イベント: FirestoreEvent <クエリドキュメントスナップショット|未定義、 ParamsOf <ドキュメント>>) => 任意 |約束<任意> Firestore の削除が発生するたびに実行されるイベント ハンドラー。

戻り値:

クラウドファンクション< Firestoreイベント<クエリドキュメントスナップショット|未定義、 ParamsOf <ドキュメント>>>

firestore.onDocumentUpdated()

Firestore でドキュメントが更新されたときにトリガーされるイベント ハンドラー。

サイン:

export declare function onDocumentUpdated<Document extends string>(document: Document, handler: (event: FirestoreEvent<Change<QueryDocumentSnapshot> | undefined, ParamsOf<Document>>) => any | Promise<any>): CloudFunction<FirestoreEvent<Change<QueryDocumentSnapshot> | undefined, ParamsOf<Document>>>;

パラメーター

パラメータタイプ説明
書類書類トリガーする Firestore ドキュメント パス。
ハンドラ(イベント: FirestoreEvent <変更<クエリドキュメントスナップショット> |未定義、 ParamsOf <ドキュメント>>) => 任意 |約束<任意> Firestore の更新が発生するたびに実行されるイベント ハンドラー。

戻り値:

クラウドファンクション< Firestoreイベント<変更<クエリドキュメントスナップショット> |未定義、 ParamsOf <ドキュメント>>>

firestore.onDocumentUpdated()

Firestore でドキュメントが更新されたときにトリガーされるイベント ハンドラー。

サイン:

export declare function onDocumentUpdated<Document extends string>(opts: DocumentOptions<Document>, handler: (event: FirestoreEvent<Change<QueryDocumentSnapshot> | undefined, ParamsOf<Document>>) => any | Promise<any>): CloudFunction<FirestoreEvent<Change<QueryDocumentSnapshot> | undefined, ParamsOf<Document>>>;

パラメーター

パラメータタイプ説明
選択しますドキュメントオプション<文書>個々のイベント処理関数に設定できるオプション。
ハンドラ(イベント: FirestoreEvent <変更<クエリドキュメントスナップショット> |未定義、 ParamsOf <ドキュメント>>) => 任意 |約束<任意> Firestore の更新が発生するたびに実行されるイベント ハンドラー。

戻り値:

クラウドファンクション< Firestoreイベント<変更<クエリドキュメントスナップショット> |未定義、 ParamsOf <ドキュメント>>>

firestore.onDocumentWritten()

Firestore でドキュメントが作成、更新、または削除されたときにトリガーされるイベント ハンドラー。

サイン:

export declare function onDocumentWritten<Document extends string>(document: Document, handler: (event: FirestoreEvent<Change<DocumentSnapshot> | undefined, ParamsOf<Document>>) => any | Promise<any>): CloudFunction<FirestoreEvent<Change<DocumentSnapshot> | undefined, ParamsOf<Document>>>;

パラメーター

パラメータタイプ説明
書類書類トリガーする Firestore ドキュメント パス。
ハンドラ(イベント: FirestoreEvent <変更<ドキュメントスナップショット> |未定義、 ParamsOf <ドキュメント>>) => 任意 |約束<任意> Firestore の作成、更新、または削除が発生するたびに実行されるイベント ハンドラー。

戻り値:

クラウドファンクション< Firestoreイベント<変更<ドキュメントスナップショット> |未定義、 ParamsOf <ドキュメント>>>

firestore.onDocumentWritten()

Firestore でドキュメントが作成、更新、または削除されたときにトリガーされるイベント ハンドラー。

サイン:

export declare function onDocumentWritten<Document extends string>(opts: DocumentOptions<Document>, handler: (event: FirestoreEvent<Change<DocumentSnapshot> | undefined, ParamsOf<Document>>) => any | Promise<any>): CloudFunction<FirestoreEvent<Change<DocumentSnapshot> | undefined, ParamsOf<Document>>>;

パラメーター

パラメータタイプ説明
選択しますドキュメントオプション<文書>個々のイベント処理関数に設定できるオプション。
ハンドラ(イベント: FirestoreEvent <変更<ドキュメントスナップショット> |未定義、 ParamsOf <ドキュメント>>) => 任意 |約束<任意> Firestore の作成、更新、または削除が発生するたびに実行されるイベント ハンドラー。

戻り値:

クラウドファンクション< Firestoreイベント<変更<ドキュメントスナップショット> |未定義、 ParamsOf <ドキュメント>>>

firestore.DocumentSnapshot

Firestore DocumentSnapshot

サイン:

export type DocumentSnapshot = firestore.DocumentSnapshot;

firestore.QueryDocumentSnapshot

Firestore QueryDocumentSnapshot

サイン:

export type QueryDocumentSnapshot = firestore.QueryDocumentSnapshot;