1 | /*! firebase-admin v10.0.0 */
|
2 | /*!
|
3 | * Copyright 2020 Google Inc.
|
4 | *
|
5 | * Licensed under the Apache License, Version 2.0 (the "License");
|
6 | * you may not use this file except in compliance with the License.
|
7 | * You may obtain a copy of the License at
|
8 | *
|
9 | * http://www.apache.org/licenses/LICENSE-2.0
|
10 | *
|
11 | * Unless required by applicable law or agreed to in writing, software
|
12 | * distributed under the License is distributed on an "AS IS" BASIS,
|
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14 | * See the License for the specific language governing permissions and
|
15 | * limitations under the License.
|
16 | */
|
17 | /**
|
18 | * Cloud Firestore.
|
19 | *
|
20 | * @packageDocumentation
|
21 | */
|
22 | import { Firestore } from '@google-cloud/firestore';
|
23 | import { App } from '../app';
|
24 | export { BulkWriter, BulkWriterOptions, CollectionGroup, CollectionReference, DocumentChangeType, DocumentData, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Firestore, FirestoreDataConverter, GeoPoint, GrpcStatus, Precondition, Query, QueryDocumentSnapshot, QueryPartition, QuerySnapshot, ReadOptions, Settings, Timestamp, Transaction, UpdateData, WriteBatch, WriteResult, v1, setLogFunction, } from '@google-cloud/firestore';
|
25 | /**
|
26 | * Gets the {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
|
27 | * service for the default app or a given app.
|
28 | *
|
29 | * `getFirestore()` can be called with no arguments to access the default
|
30 | * app's `Firestore` service or as `getFirestore(app)` to access the
|
31 | * `Firestore` service associated with a specific app.
|
32 | *
|
33 | * @example
|
34 | * ```javascript
|
35 | * // Get the Firestore service for the default app
|
36 | * const defaultFirestore = getFirestore();
|
37 | * ```
|
38 | *
|
39 | * @example
|
40 | * ```javascript
|
41 | * // Get the Firestore service for a specific app
|
42 | * const otherFirestore = getFirestore(app);
|
43 | * ```
|
44 | *
|
45 | * @param App - whose `Firestore` service to
|
46 | * return. If not provided, the default `Firestore` service will be returned.
|
47 | *
|
48 | * @returns The default {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
|
49 | * service if no app is provided or the `Firestore` service associated with the
|
50 | * provided app.
|
51 | */
|
52 | export declare function getFirestore(app?: App): Firestore;
|