firestore namespace Stay organized with collections Save and categorize content based on your preferences.
Functions
| Function | Description |
|---|---|
| beforeSnapshotConstructor(event) | |
| database(database) | |
| document(path) | Select the Firestore document to listen to for events. |
| namespace(namespace) | |
| snapshotConstructor(event) |
Classes
| Class | Description |
|---|---|
| DatabaseBuilder | |
| DocumentBuilder | |
| NamespaceBuilder |
Type Aliases
| Type Alias | Description |
|---|---|
| DocumentSnapshot | |
| QueryDocumentSnapshot |
firestore.beforeSnapshotConstructor()
Signature:
exportdeclarefunctionbeforeSnapshotConstructor(event:LegacyEvent):DocumentSnapshot;Parameters
| Parameter | Type | Description |
|---|---|---|
| event | LegacyEvent |
Returns:
firestore.database()
Signature:
exportdeclarefunctiondatabase(database:string):DatabaseBuilder;Parameters
| Parameter | Type | Description |
|---|---|---|
| database | string |
Returns:
firestore.document()
Select the Firestore document to listen to for events.
Signature:
exportdeclarefunctiondocument<Pathextendsstring>(path:Path):DocumentBuilder<Path>;Parameters
| Parameter | Type | Description |
|---|---|---|
| path | Path | Full database path to listen to. This includes the name of the collection that the document is a part of. For example, if the collection is named "users" and the document is named "Ada", then the path is "/users/Ada". |
Returns:
DocumentBuilder<Path>
firestore.namespace()
Signature:
exportdeclarefunctionnamespace(namespace:string):NamespaceBuilder;Parameters
| Parameter | Type | Description |
|---|---|---|
| namespace | string |
Returns:
firestore.snapshotConstructor()
Signature:
exportdeclarefunctionsnapshotConstructor(event:LegacyEvent):DocumentSnapshot;Parameters
| Parameter | Type | Description |
|---|---|---|
| event | LegacyEvent |
Returns:
firestore.DocumentSnapshot
Signature:
exporttypeDocumentSnapshot=firestore.DocumentSnapshot;firestore.QueryDocumentSnapshot
Signature:
exporttypeQueryDocumentSnapshot=firestore.QueryDocumentSnapshot;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 2025-11-10 UTC.