## Functions

| Function | Description |
|---|---|
| [beforeSnapshotConstructor(event)](https://firebase.google.com/docs/reference/functions/firebase-functions.firestore#firestorebeforesnapshotconstructor) |   |
| [database(database)](https://firebase.google.com/docs/reference/functions/firebase-functions.firestore#firestoredatabase) |   |
| [document(path)](https://firebase.google.com/docs/reference/functions/firebase-functions.firestore#firestoredocument) | Select the Firestore document to listen to for events. |
| [namespace(namespace)](https://firebase.google.com/docs/reference/functions/firebase-functions.firestore#firestorenamespace) |   |
| [snapshotConstructor(event)](https://firebase.google.com/docs/reference/functions/firebase-functions.firestore#firestoresnapshotconstructor) |   |

## Classes

| Class | Description |
|---|---|
| [DatabaseBuilder](https://firebase.google.com/docs/reference/functions/firebase-functions.firestore.databasebuilder#firestoredatabasebuilder_class) |   |
| [DocumentBuilder](https://firebase.google.com/docs/reference/functions/firebase-functions.firestore.documentbuilder#firestoredocumentbuilder_class) |   |
| [NamespaceBuilder](https://firebase.google.com/docs/reference/functions/firebase-functions.firestore.namespacebuilder#firestorenamespacebuilder_class) |   |

## Type Aliases

| Type Alias | Description |
|---|---|
| [DocumentSnapshot](https://firebase.google.com/docs/reference/functions/firebase-functions.firestore#firestoredocumentsnapshot) |   |
| [QueryDocumentSnapshot](https://firebase.google.com/docs/reference/functions/firebase-functions.firestore#firestorequerydocumentsnapshot) |   |

## firestore.beforeSnapshotConstructor()

**Signature:**

    export declare function beforeSnapshotConstructor(event: LegacyEvent): DocumentSnapshot;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| event | [LegacyEvent](https://firebase.google.com/docs/reference/functions/firebase-functions.legacyevent#legacyevent_interface) |   |

**Returns:**

[DocumentSnapshot](https://firebase.google.com/docs/reference/functions/firebase-functions.firestore#firestoredocumentsnapshot)

## firestore.database()

**Signature:**

    export declare function database(database: string | Expression<string>): DatabaseBuilder;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| database | string \| [Expression](https://firebase.google.com/docs/reference/functions/firebase-functions.params.expression#paramsexpression_class)\<string\> |   |

**Returns:**

[DatabaseBuilder](https://firebase.google.com/docs/reference/functions/firebase-functions.firestore.databasebuilder#firestoredatabasebuilder_class)

## firestore.document()

Select the Firestore document to listen to for events.

**Signature:**

    export declare function document<Path extends string>(path: Path | Expression<string>): DocumentBuilder<Path>;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| path | Path \| [Expression](https://firebase.google.com/docs/reference/functions/firebase-functions.params.expression#paramsexpression_class)\<string\> | 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](https://firebase.google.com/docs/reference/functions/firebase-functions.firestore.documentbuilder#firestoredocumentbuilder_class)\<Path\>

## firestore.namespace()

**Signature:**

    export declare function namespace(namespace: string | Expression<string>): NamespaceBuilder;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| namespace | string \| [Expression](https://firebase.google.com/docs/reference/functions/firebase-functions.params.expression#paramsexpression_class)\<string\> |   |

**Returns:**

[NamespaceBuilder](https://firebase.google.com/docs/reference/functions/firebase-functions.firestore.namespacebuilder#firestorenamespacebuilder_class)

## firestore.snapshotConstructor()

**Signature:**

    export declare function snapshotConstructor(event: LegacyEvent): DocumentSnapshot;

### Parameters

| Parameter | Type | Description |
|---|---|---|
| event | [LegacyEvent](https://firebase.google.com/docs/reference/functions/firebase-functions.legacyevent#legacyevent_interface) |   |

**Returns:**

[DocumentSnapshot](https://firebase.google.com/docs/reference/functions/firebase-functions.firestore#firestoredocumentsnapshot)

## firestore.DocumentSnapshot

**Signature:**

    export type DocumentSnapshot = firestore.DocumentSnapshot;

## firestore.QueryDocumentSnapshot

**Signature:**

    export type QueryDocumentSnapshot = firestore.QueryDocumentSnapshot;