@firebase/firestore 3.4.14 → 3.4.15-20220831174748
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/firestore/src/api/credentials.d.ts +13 -3
- package/dist/firestore/src/api/database.d.ts +34 -3
- package/dist/firestore/src/api/index_configuration.d.ts +5 -0
- package/dist/firestore/src/core/database_info.d.ts +4 -0
- package/dist/firestore/src/lite-api/database.d.ts +51 -7
- package/dist/firestore/test/integration/api/provider.test.d.ts +17 -0
- package/dist/firestore/test/integration/util/firebase_export.d.ts +2 -1
- package/dist/firestore/test/integration/util/helpers.d.ts +1 -0
- package/dist/index.d.ts +15 -94
- package/dist/index.esm2017.js +1713 -1704
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +2343 -2330
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +81 -58
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +81 -58
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +1713 -1704
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +48 -6
- package/dist/lite/firestore/src/api/credentials.d.ts +13 -3
- package/dist/lite/firestore/src/api/database.d.ts +34 -3
- package/dist/lite/firestore/src/api/index_configuration.d.ts +5 -0
- package/dist/lite/firestore/src/core/database_info.d.ts +4 -0
- package/dist/lite/firestore/src/lite-api/database.d.ts +51 -7
- package/dist/lite/firestore/test/integration/api/provider.test.d.ts +17 -0
- package/dist/lite/firestore/test/integration/util/firebase_export.d.ts +2 -1
- package/dist/lite/firestore/test/integration/util/helpers.d.ts +1 -0
- package/dist/lite/index.browser.esm2017.js +273 -277
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +621 -608
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.d.ts +15 -4
- package/dist/lite/index.node.cjs.js +71 -61
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +71 -61
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +273 -277
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +58 -7
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +29 -66
- package/dist/lite/packages/firestore/src/api/credentials.d.ts +13 -3
- package/dist/lite/packages/firestore/src/api/database.d.ts +34 -3
- package/dist/lite/packages/firestore/src/api/index_configuration.d.ts +5 -0
- package/dist/lite/packages/firestore/src/core/database_info.d.ts +4 -0
- package/dist/lite/packages/firestore/src/lite-api/database.d.ts +51 -7
- package/dist/lite/packages/firestore/test/integration/api/provider.test.d.ts +17 -0
- package/dist/lite/packages/firestore/test/integration/util/firebase_export.d.ts +2 -1
- package/dist/lite/packages/firestore/test/integration/util/helpers.d.ts +1 -0
- package/dist/lite/private.d.ts +25 -7
- package/dist/packages/firestore/dist/index.esm2017.d.ts +70 -65
- package/dist/packages/firestore/src/api/credentials.d.ts +13 -3
- package/dist/packages/firestore/src/api/database.d.ts +34 -3
- package/dist/packages/firestore/src/api/index_configuration.d.ts +5 -0
- package/dist/packages/firestore/src/core/database_info.d.ts +4 -0
- package/dist/packages/firestore/src/lite-api/database.d.ts +51 -7
- package/dist/packages/firestore/test/integration/api/provider.test.d.ts +17 -0
- package/dist/packages/firestore/test/integration/util/firebase_export.d.ts +2 -1
- package/dist/packages/firestore/test/integration/util/helpers.d.ts +1 -0
- package/dist/private.d.ts +28 -99
- package/package.json +5 -4
package/dist/private.d.ts
CHANGED
|
@@ -121,6 +121,8 @@ declare interface AsyncQueue {
|
|
|
121
121
|
verifyOperationInProgress(): void;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
declare type AuthTokenFactory = () => string;
|
|
125
|
+
|
|
124
126
|
/**
|
|
125
127
|
* Path represents an ordered sequence of string segments.
|
|
126
128
|
*/
|
|
@@ -1390,7 +1392,7 @@ export declare class Firestore extends Firestore_2 {
|
|
|
1390
1392
|
readonly _persistenceKey: string;
|
|
1391
1393
|
_firestoreClient: FirestoreClient | undefined;
|
|
1392
1394
|
/** @hideconstructor */
|
|
1393
|
-
constructor(
|
|
1395
|
+
constructor(authCredentialsProvider: CredentialsProvider<User>, appCheckCredentialsProvider: CredentialsProvider<string>, databaseId: _DatabaseId, app?: FirebaseApp);
|
|
1394
1396
|
_terminate(): Promise<void>;
|
|
1395
1397
|
}
|
|
1396
1398
|
|
|
@@ -1402,18 +1404,18 @@ export declare class Firestore extends Firestore_2 {
|
|
|
1402
1404
|
declare class Firestore_2 implements FirestoreService {
|
|
1403
1405
|
_authCredentials: CredentialsProvider<User>;
|
|
1404
1406
|
_appCheckCredentials: CredentialsProvider<string>;
|
|
1407
|
+
readonly _databaseId: _DatabaseId;
|
|
1408
|
+
readonly _app?: FirebaseApp | undefined;
|
|
1405
1409
|
/**
|
|
1406
1410
|
* Whether it's a Firestore or Firestore Lite instance.
|
|
1407
1411
|
*/
|
|
1408
1412
|
type: 'firestore-lite' | 'firestore';
|
|
1409
|
-
readonly _databaseId: _DatabaseId;
|
|
1410
1413
|
readonly _persistenceKey: string;
|
|
1411
1414
|
private _settings;
|
|
1412
1415
|
private _settingsFrozen;
|
|
1413
1416
|
private _terminateTask?;
|
|
1414
|
-
_app?: FirebaseApp;
|
|
1415
1417
|
/** @hideconstructor */
|
|
1416
|
-
constructor(
|
|
1418
|
+
constructor(_authCredentials: CredentialsProvider<User>, _appCheckCredentials: CredentialsProvider<string>, _databaseId: _DatabaseId, _app?: FirebaseApp | undefined);
|
|
1417
1419
|
/**
|
|
1418
1420
|
* The {@link @firebase/app#FirebaseApp} associated with this `Firestore` service
|
|
1419
1421
|
* instance.
|
|
@@ -2065,6 +2067,7 @@ declare interface FirstPartyCredentialsSettings {
|
|
|
2065
2067
|
['client']: unknown;
|
|
2066
2068
|
['sessionIndex']: string;
|
|
2067
2069
|
['iamToken']: string | null;
|
|
2070
|
+
['authTokenFactory']: AuthTokenFactory | null;
|
|
2068
2071
|
}
|
|
2069
2072
|
|
|
2070
2073
|
/**
|
|
@@ -2206,7 +2209,16 @@ export declare function getDocsFromCache<T>(query: Query<T>): Promise<QuerySnaps
|
|
|
2206
2209
|
export declare function getDocsFromServer<T>(query: Query<T>): Promise<QuerySnapshot<T>>;
|
|
2207
2210
|
|
|
2208
2211
|
/**
|
|
2209
|
-
* Returns the existing {@link Firestore} instance that is associated with the
|
|
2212
|
+
* Returns the existing default {@link Firestore} instance that is associated with the
|
|
2213
|
+
* default {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
2214
|
+
* instance with default settings.
|
|
2215
|
+
*
|
|
2216
|
+
* @returns The {@link Firestore} instance of the provided app.
|
|
2217
|
+
*/
|
|
2218
|
+
export declare function getFirestore(): Firestore;
|
|
2219
|
+
|
|
2220
|
+
/**
|
|
2221
|
+
* Returns the existing default {@link Firestore} instance that is associated with the
|
|
2210
2222
|
* provided {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
2211
2223
|
* instance with default settings.
|
|
2212
2224
|
*
|
|
@@ -2214,7 +2226,11 @@ export declare function getDocsFromServer<T>(query: Query<T>): Promise<QuerySnap
|
|
|
2214
2226
|
* instance is associated with.
|
|
2215
2227
|
* @returns The {@link Firestore} instance of the provided app.
|
|
2216
2228
|
*/
|
|
2217
|
-
export declare function getFirestore(app
|
|
2229
|
+
export declare function getFirestore(app: FirebaseApp): Firestore;
|
|
2230
|
+
|
|
2231
|
+
/* Excluded declaration from this release type: getFirestore */
|
|
2232
|
+
|
|
2233
|
+
/* Excluded declaration from this release type: getFirestore */
|
|
2218
2234
|
|
|
2219
2235
|
/**
|
|
2220
2236
|
* Returns a special value that can be used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link
|
|
@@ -2237,51 +2253,11 @@ export declare function getFirestore(app?: FirebaseApp): Firestore;
|
|
|
2237
2253
|
*/
|
|
2238
2254
|
export declare function increment(n: number): FieldValue;
|
|
2239
2255
|
|
|
2240
|
-
|
|
2241
|
-
* The SDK definition of a Firestore index.
|
|
2242
|
-
*/
|
|
2243
|
-
export declare interface Index {
|
|
2244
|
-
/** The ID of the collection to index. */
|
|
2245
|
-
readonly collectionGroup: string;
|
|
2246
|
-
/** A list of fields to index. */
|
|
2247
|
-
readonly fields?: IndexField[];
|
|
2248
|
-
[key: string]: unknown;
|
|
2249
|
-
}
|
|
2256
|
+
/* Excluded from this release type: Index */
|
|
2250
2257
|
|
|
2251
|
-
|
|
2252
|
-
* A list of Firestore indexes to speed up local query execution.
|
|
2253
|
-
*
|
|
2254
|
-
* See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
|
|
2255
|
-
* for a description of the format of the index definition.
|
|
2256
|
-
*/
|
|
2257
|
-
export declare interface IndexConfiguration {
|
|
2258
|
-
/** A list of all Firestore indexes. */
|
|
2259
|
-
readonly indexes?: Index[];
|
|
2260
|
-
[key: string]: unknown;
|
|
2261
|
-
}
|
|
2258
|
+
/* Excluded from this release type: IndexConfiguration */
|
|
2262
2259
|
|
|
2263
|
-
|
|
2264
|
-
* A single field element in an index configuration.
|
|
2265
|
-
*/
|
|
2266
|
-
export declare interface IndexField {
|
|
2267
|
-
/** The field path to index. */
|
|
2268
|
-
readonly fieldPath: string;
|
|
2269
|
-
/**
|
|
2270
|
-
* What type of array index to create. Set to `CONTAINS` for `array-contains`
|
|
2271
|
-
* and `array-contains-any` indexes.
|
|
2272
|
-
*
|
|
2273
|
-
* Only one of `arrayConfig` or `order` should be set;
|
|
2274
|
-
*/
|
|
2275
|
-
readonly arrayConfig?: 'CONTAINS';
|
|
2276
|
-
/**
|
|
2277
|
-
* What type of array index to create. Set to `ASCENDING` or 'DESCENDING` for
|
|
2278
|
-
* `==`, `!=`, `<=`, `<=`, `in` and `not-in` filters.
|
|
2279
|
-
*
|
|
2280
|
-
* Only one of `arrayConfig` or `order` should be set.
|
|
2281
|
-
*/
|
|
2282
|
-
readonly order?: 'ASCENDING' | 'DESCENDING';
|
|
2283
|
-
[key: string]: unknown;
|
|
2284
|
-
}
|
|
2260
|
+
/* Excluded from this release type: IndexField */
|
|
2285
2261
|
|
|
2286
2262
|
declare type IndexFieldMode = 'MODE_UNSPECIFIED' | 'ASCENDING' | 'DESCENDING';
|
|
2287
2263
|
|
|
@@ -2476,9 +2452,10 @@ declare const enum IndexType {
|
|
|
2476
2452
|
* @param app - The {@link @firebase/app#FirebaseApp} with which the {@link Firestore} instance will
|
|
2477
2453
|
* be associated.
|
|
2478
2454
|
* @param settings - A settings object to configure the {@link Firestore} instance.
|
|
2455
|
+
* @param databaseId - The name of database.
|
|
2479
2456
|
* @returns A newly initialized {@link Firestore} instance.
|
|
2480
2457
|
*/
|
|
2481
|
-
export declare function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings): Firestore;
|
|
2458
|
+
export declare function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings, databaseId?: string): Firestore;
|
|
2482
2459
|
|
|
2483
2460
|
/* Excluded from this release type: _isBase64Available */
|
|
2484
2461
|
|
|
@@ -4525,55 +4502,7 @@ export declare function setDoc<T>(reference: DocumentReference<T>, data: WithFie
|
|
|
4525
4502
|
*/
|
|
4526
4503
|
export declare function setDoc<T>(reference: DocumentReference<T>, data: PartialWithFieldValue<T>, options: SetOptions): Promise<void>;
|
|
4527
4504
|
|
|
4528
|
-
|
|
4529
|
-
* Configures indexing for local query execution. Any previous index
|
|
4530
|
-
* configuration is overridden. The `Promise` resolves once the index
|
|
4531
|
-
* configuration has been persisted.
|
|
4532
|
-
*
|
|
4533
|
-
* The index entries themselves are created asynchronously. You can continue to
|
|
4534
|
-
* use queries that require indexing even if the indices are not yet available.
|
|
4535
|
-
* Query execution will automatically start using the index once the index
|
|
4536
|
-
* entries have been written.
|
|
4537
|
-
*
|
|
4538
|
-
* Indexes are only supported with IndexedDb persistence. Invoke either
|
|
4539
|
-
* `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
|
|
4540
|
-
* before setting an index configuration. If IndexedDb is not enabled, any
|
|
4541
|
-
* index configuration is ignored.
|
|
4542
|
-
*
|
|
4543
|
-
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
4544
|
-
* @param configuration -The index definition.
|
|
4545
|
-
* @throws FirestoreError if the JSON format is invalid.
|
|
4546
|
-
* @returns A `Promise` that resolves once all indices are successfully
|
|
4547
|
-
* configured.
|
|
4548
|
-
*/
|
|
4549
|
-
export declare function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
|
|
4550
|
-
|
|
4551
|
-
/**
|
|
4552
|
-
* Configures indexing for local query execution. Any previous index
|
|
4553
|
-
* configuration is overridden. The `Promise` resolves once the index
|
|
4554
|
-
* configuration has been persisted.
|
|
4555
|
-
*
|
|
4556
|
-
* The index entries themselves are created asynchronously. You can continue to
|
|
4557
|
-
* use queries that require indexing even if the indices are not yet available.
|
|
4558
|
-
* Query execution will automatically start using the index once the index
|
|
4559
|
-
* entries have been written.
|
|
4560
|
-
*
|
|
4561
|
-
* Indexes are only supported with IndexedDb persistence. Invoke either
|
|
4562
|
-
* `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
|
|
4563
|
-
* before setting an index configuration. If IndexedDb is not enabled, any
|
|
4564
|
-
* index configuration is ignored.
|
|
4565
|
-
*
|
|
4566
|
-
* The method accepts the JSON format exported by the Firebase CLI (`firebase
|
|
4567
|
-
* firestore:indexes`). If the JSON format is invalid, this method throws an
|
|
4568
|
-
* error.
|
|
4569
|
-
*
|
|
4570
|
-
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
4571
|
-
* @param json -The JSON format exported by the Firebase CLI.
|
|
4572
|
-
* @throws FirestoreError if the JSON format is invalid.
|
|
4573
|
-
* @returns A `Promise` that resolves once all indices are successfully
|
|
4574
|
-
* configured.
|
|
4575
|
-
*/
|
|
4576
|
-
export declare function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
|
|
4505
|
+
/* Excluded from this release type: setIndexConfiguration */
|
|
4577
4506
|
|
|
4578
4507
|
/**
|
|
4579
4508
|
* Sets the verbosity of Cloud Firestore logs (debug, error, or silent).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/firestore",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.15-20220831174748",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=10.10.0"
|
|
6
6
|
},
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"test:all:ci": "run-p test:browser test:lite:browser test:travis",
|
|
31
31
|
"test:all": "run-p test:browser test:lite:browser test:travis test:minified",
|
|
32
32
|
"test:browser": "karma start --single-run",
|
|
33
|
+
"test:browser:unit": "karma start --single-run --unit",
|
|
33
34
|
"test:browser:debug": "karma start --browsers=Chrome --auto-watch",
|
|
34
35
|
"test:node": "node ./scripts/run-tests.js --main=test/register.ts --emulator 'test/{,!(browser|lite)/**/}*.test.ts'",
|
|
35
36
|
"test:node:prod": "node ./scripts/run-tests.js --main=test/register.ts 'test/{,!(browser|lite)/**/}*.test.ts'",
|
|
@@ -92,9 +93,9 @@
|
|
|
92
93
|
"@firebase/app": "0.x"
|
|
93
94
|
},
|
|
94
95
|
"devDependencies": {
|
|
95
|
-
"@firebase/app": "0.7.
|
|
96
|
-
"@firebase/app-compat": "0.1.
|
|
97
|
-
"@firebase/auth": "0.20.
|
|
96
|
+
"@firebase/app": "0.7.31",
|
|
97
|
+
"@firebase/app-compat": "0.1.32",
|
|
98
|
+
"@firebase/auth": "0.20.6-20220831174748",
|
|
98
99
|
"@rollup/plugin-alias": "3.1.9",
|
|
99
100
|
"@rollup/plugin-json": "4.1.0",
|
|
100
101
|
"@types/eslint": "7.29.0",
|