@firebase/firestore 3.13.0-canary.f2fb56fc0 → 3.13.0-canary.f3067f72d

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.
Files changed (46) hide show
  1. package/dist/firestore/src/global_index.d.ts +15 -1
  2. package/dist/firestore/src/lite-api/types.d.ts +1 -1
  3. package/dist/firestore/src/util/testing_hooks.d.ts +14 -0
  4. package/dist/firestore/test/integration/util/helpers.d.ts +63 -16
  5. package/dist/firestore/test/integration/util/internal_helpers.d.ts +2 -1
  6. package/dist/firestore/test/integration/util/testing_hooks_util.d.ts +1 -0
  7. package/dist/index.cjs.js +150 -136
  8. package/dist/index.cjs.js.map +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.esm2017.js +150 -136
  11. package/dist/index.esm2017.js.map +1 -1
  12. package/dist/index.esm5.js +147 -133
  13. package/dist/index.esm5.js.map +1 -1
  14. package/dist/index.node.cjs.js +27 -21
  15. package/dist/index.node.cjs.js.map +1 -1
  16. package/dist/index.node.mjs +27 -21
  17. package/dist/index.node.mjs.map +1 -1
  18. package/dist/index.rn.js +150 -136
  19. package/dist/index.rn.js.map +1 -1
  20. package/dist/internal.d.ts +15 -1
  21. package/dist/lite/firestore/src/lite-api/types.d.ts +1 -1
  22. package/dist/lite/firestore/src/util/testing_hooks.d.ts +14 -0
  23. package/dist/lite/firestore/test/integration/util/helpers.d.ts +63 -16
  24. package/dist/lite/firestore/test/integration/util/internal_helpers.d.ts +2 -1
  25. package/dist/lite/firestore/test/integration/util/testing_hooks_util.d.ts +1 -0
  26. package/dist/lite/index.browser.esm2017.js +2 -2
  27. package/dist/lite/index.browser.esm5.js +2 -2
  28. package/dist/lite/index.cjs.js +2 -2
  29. package/dist/lite/index.d.ts +1 -1
  30. package/dist/lite/index.node.cjs.js +2 -2
  31. package/dist/lite/index.node.mjs +2 -2
  32. package/dist/lite/index.rn.esm2017.js +2 -2
  33. package/dist/lite/internal.d.ts +1 -1
  34. package/dist/lite/packages/firestore/src/lite-api/types.d.ts +1 -1
  35. package/dist/lite/packages/firestore/src/util/testing_hooks.d.ts +14 -0
  36. package/dist/lite/packages/firestore/test/integration/util/helpers.d.ts +63 -16
  37. package/dist/lite/packages/firestore/test/integration/util/internal_helpers.d.ts +2 -1
  38. package/dist/lite/packages/firestore/test/integration/util/testing_hooks_util.d.ts +1 -0
  39. package/dist/lite/private.d.ts +1 -1
  40. package/dist/packages/firestore/src/lite-api/types.d.ts +1 -1
  41. package/dist/packages/firestore/src/util/testing_hooks.d.ts +14 -0
  42. package/dist/packages/firestore/test/integration/util/helpers.d.ts +63 -16
  43. package/dist/packages/firestore/test/integration/util/internal_helpers.d.ts +2 -1
  44. package/dist/packages/firestore/test/integration/util/testing_hooks_util.d.ts +1 -0
  45. package/dist/private.d.ts +15 -1
  46. package/package.json +9 -9
@@ -57,7 +57,7 @@ export declare function addDoc<AppModelType, DbModelType extends DocumentData>(r
57
57
  * to a dot.
58
58
  */
59
59
  export declare type AddPrefixToKeys<Prefix extends string, T extends Record<string, unknown>> = {
60
- [K in keyof T & string as `${Prefix}.${K}`]+?: T[K];
60
+ [K in keyof T & string as `${Prefix}.${K}`]+?: string extends K ? any : T[K];
61
61
  };
62
62
 
63
63
  /**
@@ -1586,6 +1586,20 @@ declare interface ExistenceFilterMismatchInfo {
1586
1586
  bitmapLength: number;
1587
1587
  /** The number of bits of padding in the last byte of the bloom filter. */
1588
1588
  padding: number;
1589
+ /**
1590
+ * Check if the given document path is contained in the bloom filter.
1591
+ *
1592
+ * The "path" of a document can be retrieved from the
1593
+ * `DocumentReference.path` property.
1594
+ *
1595
+ * Note that due to the probabilistic nature of a bloom filter, it is
1596
+ * possible that false positives may occur; that is, this function may
1597
+ * return `true` even though the given string is not in the bloom filter.
1598
+ *
1599
+ * This property is "optional"; if it is undefined then parsing the bloom
1600
+ * filter failed.
1601
+ */
1602
+ mightContain?(documentPath: string): boolean;
1589
1603
  };
1590
1604
  }
1591
1605
 
@@ -46,7 +46,7 @@ export declare type ChildUpdateFields<K extends string, V> = V extends Record<st
46
46
  * to a dot.
47
47
  */
48
48
  export declare type AddPrefixToKeys<Prefix extends string, T extends Record<string, unknown>> = {
49
- [K in keyof T & string as `${Prefix}.${K}`]+?: T[K];
49
+ [K in keyof T & string as `${Prefix}.${K}`]+?: string extends K ? any : T[K];
50
50
  };
51
51
  /**
52
52
  * Given a union type `U = T1 | T2 | ...`, returns an intersected type
@@ -94,6 +94,20 @@ export interface ExistenceFilterMismatchInfo {
94
94
  bitmapLength: number;
95
95
  /** The number of bits of padding in the last byte of the bloom filter. */
96
96
  padding: number;
97
+ /**
98
+ * Check if the given document path is contained in the bloom filter.
99
+ *
100
+ * The "path" of a document can be retrieved from the
101
+ * `DocumentReference.path` property.
102
+ *
103
+ * Note that due to the probabilistic nature of a bloom filter, it is
104
+ * possible that false positives may occur; that is, this function may
105
+ * return `true` even though the given string is not in the bloom filter.
106
+ *
107
+ * This property is "optional"; if it is undefined then parsing the bloom
108
+ * filter failed.
109
+ */
110
+ mightContain?(documentPath: string): boolean;
97
111
  };
98
112
  }
99
113
  /**
@@ -14,11 +14,56 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { CollectionReference, DocumentData, DocumentReference, Firestore, PrivateSettings, QuerySnapshot, SnapshotListenOptions } from './firebase_export';
17
+ import { CollectionReference, DocumentData, DocumentReference, Firestore, MemoryLocalCache, PersistentLocalCache, PrivateSettings, QuerySnapshot, SnapshotListenOptions } from './firebase_export';
18
+ export interface PersistenceMode {
19
+ readonly name: string;
20
+ readonly storage: 'memory' | 'indexeddb';
21
+ readonly gc: 'eager' | 'lru';
22
+ /**
23
+ * Creates and returns a new `PersistenceMode` object that is the nearest
24
+ * equivalent to this persistence mode but uses eager garbage collection.
25
+ */
26
+ toEagerGc(): PersistenceMode;
27
+ /**
28
+ * Creates and returns a new `PersistenceMode` object that is the nearest
29
+ * equivalent to this persistence mode but uses LRU garbage collection.
30
+ */
31
+ toLruGc(): PersistenceMode;
32
+ /**
33
+ * Creates and returns a new "local cache" object corresponding to this
34
+ * persistence type.
35
+ */
36
+ asLocalCacheFirestoreSettings(): MemoryLocalCache | PersistentLocalCache;
37
+ }
38
+ export declare class MemoryEagerPersistenceMode implements PersistenceMode {
39
+ readonly name = "memory";
40
+ readonly storage = "memory";
41
+ readonly gc = "eager";
42
+ toEagerGc(): MemoryEagerPersistenceMode;
43
+ toLruGc(): MemoryLruPersistenceMode;
44
+ asLocalCacheFirestoreSettings(): MemoryLocalCache;
45
+ }
46
+ export declare class MemoryLruPersistenceMode implements PersistenceMode {
47
+ readonly name = "memory_lru_gc";
48
+ readonly storage = "memory";
49
+ readonly gc = "lru";
50
+ toEagerGc(): MemoryEagerPersistenceMode;
51
+ toLruGc(): MemoryLruPersistenceMode;
52
+ asLocalCacheFirestoreSettings(): MemoryLocalCache;
53
+ }
54
+ export declare class IndexedDbPersistenceMode implements PersistenceMode {
55
+ readonly name = "indexeddb";
56
+ readonly storage = "indexeddb";
57
+ readonly gc = "lru";
58
+ toEagerGc(): MemoryEagerPersistenceMode;
59
+ toLruGc(): IndexedDbPersistenceMode;
60
+ asLocalCacheFirestoreSettings(): PersistentLocalCache;
61
+ }
62
+ export declare const PERSISTENCE_MODE_UNSPECIFIED: unique symbol;
18
63
  export declare function isPersistenceAvailable(): boolean;
19
- declare type ApiSuiteFunction = (message: string, testSuite: (persistence: boolean) => void) => void;
64
+ declare type ApiSuiteFunction = (message: string, testSuite: (persistence: PersistenceMode) => void) => void;
20
65
  interface ApiDescribe {
21
- (message: string, testSuite: (persistence: boolean) => void): void;
66
+ (message: string, testSuite: (persistence: PersistenceMode) => void): void;
22
67
  skip: ApiSuiteFunction;
23
68
  only: ApiSuiteFunction;
24
69
  }
@@ -32,22 +77,24 @@ export declare function toDataMap(docSet: QuerySnapshot): {
32
77
  };
33
78
  /** Converts a DocumentSet to an array with the id of each document */
34
79
  export declare function toIds(docSet: QuerySnapshot): string[];
35
- export declare function withTestDb(persistence: boolean, fn: (db: Firestore) => Promise<void>): Promise<void>;
36
- export declare function withEnsuredEagerGcTestDb(fn: (db: Firestore) => Promise<void>): Promise<void>;
37
- export declare function withEnsuredLruGcTestDb(persistence: boolean, fn: (db: Firestore) => Promise<void>): Promise<void>;
80
+ export declare function withTestDb(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (db: Firestore) => Promise<void>): Promise<void>;
38
81
  /** Runs provided fn with a db for an alternate project id. */
39
- export declare function withAlternateTestDb(persistence: boolean, fn: (db: Firestore) => Promise<void>): Promise<void>;
40
- export declare function withTestDbs(persistence: boolean, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
41
- export declare function withTestDbsSettings<T>(persistence: boolean, projectId: string, settings: PrivateSettings, numDbs: number, fn: (db: Firestore[]) => Promise<T>): Promise<T>;
42
- export declare function withNamedTestDbsOrSkipUnlessUsingEmulator(persistence: boolean, dbNames: string[], fn: (db: Firestore[]) => Promise<void>): Promise<void>;
43
- export declare function withTestDoc(persistence: boolean, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
44
- export declare function withTestDocAndSettings(persistence: boolean, settings: PrivateSettings, fn: (doc: DocumentReference) => Promise<void>): Promise<void>;
45
- export declare function withTestDocAndInitialData(persistence: boolean, initialData: DocumentData | null, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
46
- export declare function withTestCollection<T>(persistence: boolean, docs: {
82
+ export declare function withAlternateTestDb(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (db: Firestore) => Promise<void>): Promise<void>;
83
+ export declare function withTestDbs(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
84
+ export declare function withTestDbsSettings<T>(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, projectId: string, settings: PrivateSettings, numDbs: number, fn: (db: Firestore[]) => Promise<T>): Promise<T>;
85
+ export declare function withNamedTestDbsOrSkipUnlessUsingEmulator(persistence: PersistenceMode, dbNames: string[], fn: (db: Firestore[]) => Promise<void>): Promise<void>;
86
+ export declare function withTestDoc(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
87
+ export declare function withTestDocAndSettings(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, settings: PrivateSettings, fn: (doc: DocumentReference) => Promise<void>): Promise<void>;
88
+ export declare function withTestDocAndInitialData(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, initialData: DocumentData | null, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
89
+ export declare class RetryError extends Error {
90
+ readonly name = "FirestoreIntegrationTestRetryError";
91
+ }
92
+ export declare function withRetry<T>(fn: (attemptNumber: number) => Promise<T>): Promise<T>;
93
+ export declare function withTestCollection<T>(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, docs: {
47
94
  [key: string]: DocumentData;
48
95
  }, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
49
- export declare function withEmptyTestCollection(persistence: boolean, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
50
- export declare function withTestCollectionSettings<T>(persistence: boolean, settings: PrivateSettings, docs: {
96
+ export declare function withEmptyTestCollection(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
97
+ export declare function withTestCollectionSettings<T>(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, settings: PrivateSettings, docs: {
51
98
  [key: string]: DocumentData;
52
99
  }, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
53
100
  export {};
@@ -21,6 +21,7 @@ import { Datastore } from '../../../src/remote/datastore';
21
21
  import { AsyncQueue } from '../../../src/util/async_queue';
22
22
  import { AsyncQueueImpl } from '../../../src/util/async_queue_impl';
23
23
  import { Firestore } from './firebase_export';
24
+ import { PersistenceMode } from './helpers';
24
25
  export declare function asyncQueue(db: Firestore): AsyncQueueImpl;
25
26
  export declare function getDefaultDatabaseInfo(): DatabaseInfo;
26
27
  export declare function withTestDatastore(fn: (datastore: Datastore) => Promise<void>, authCredentialsProvider?: CredentialsProvider<User>, appCheckTokenProvider?: CredentialsProvider<string>): Promise<void>;
@@ -30,4 +31,4 @@ export declare class MockAuthCredentialsProvider extends EmptyAuthCredentialsPro
30
31
  triggerUserChange(newUser: User): void;
31
32
  start(asyncQueue: AsyncQueue, listener: CredentialChangeListener<User>): void;
32
33
  }
33
- export declare function withMockCredentialProviderTestDb(persistence: boolean, fn: (db: Firestore, mockCredential: MockAuthCredentialsProvider) => Promise<void>): Promise<void>;
34
+ export declare function withMockCredentialProviderTestDb(persistence: PersistenceMode, fn: (db: Firestore, mockCredential: MockAuthCredentialsProvider) => Promise<void>): Promise<void>;
@@ -42,5 +42,6 @@ export interface ExistenceFilterMismatchInfo {
42
42
  hashCount: number;
43
43
  bitmapLength: number;
44
44
  padding: number;
45
+ mightContain?(documentPath: string): boolean;
45
46
  };
46
47
  }
@@ -63,7 +63,7 @@ User.MOCK_USER = new User("mock-user");
63
63
  * See the License for the specific language governing permissions and
64
64
  * limitations under the License.
65
65
  */
66
- let d = "9.23.0-canary.f2fb56fc0";
66
+ let d = "9.23.0-canary.f3067f72d";
67
67
 
68
68
  /**
69
69
  * @license
@@ -7202,7 +7202,7 @@ class Transaction {
7202
7202
  return r && i._setSettings(r), i;
7203
7203
  }), "PUBLIC").setMultipleInstances(!0)),
7204
7204
  // RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
7205
- registerVersion("firestore-lite", "3.13.0-canary.f2fb56fc0", ""), registerVersion("firestore-lite", "3.13.0-canary.f2fb56fc0", "esm2017");
7205
+ registerVersion("firestore-lite", "3.13.0-canary.f3067f72d", ""), registerVersion("firestore-lite", "3.13.0-canary.f3067f72d", "esm2017");
7206
7206
  }();
7207
7207
 
7208
7208
  export { AggregateField, AggregateQuerySnapshot, Bytes, CollectionReference, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Firestore, FirestoreError, GeoPoint, Query, QueryCompositeFilterConstraint, QueryConstraint, QueryDocumentSnapshot, QueryEndAtConstraint, QueryFieldFilterConstraint, QueryLimitConstraint, QueryOrderByConstraint, QuerySnapshot, QueryStartAtConstraint, Timestamp, Transaction, WriteBatch, addDoc, aggregateFieldEqual, aggregateQuerySnapshotEqual, and, arrayRemove, arrayUnion, average, collection, collectionGroup, connectFirestoreEmulator, count, deleteDoc, deleteField, doc, documentId, endAt, endBefore, getAggregate, getCount, getDoc, getDocs, getFirestore, increment, initializeFirestore, limit, limitToLast, or, orderBy, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setLogLevel, snapshotEqual, startAfter, startAt, sum, terminate, updateDoc, where, writeBatch };
@@ -67,7 +67,7 @@ v.MOCK_USER = new v("mock-user");
67
67
  * See the License for the specific language governing permissions and
68
68
  * limitations under the License.
69
69
  */
70
- var g = "9.23.0-canary.f2fb56fc0", w = new l("@firebase/firestore");
70
+ var g = "9.23.0-canary.f3067f72d", w = new l("@firebase/firestore");
71
71
 
72
72
  /**
73
73
  * @license
@@ -6699,7 +6699,7 @@ di = "".concat(i, "_lite"), g = di, o(new c("firestore/lite", (function(t, e) {
6699
6699
  return r && o._setSettings(r), o;
6700
6700
  }), "PUBLIC").setMultipleInstances(!0)),
6701
6701
  // RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
6702
- a("firestore-lite", "3.13.0-canary.f2fb56fc0", ""), a("firestore-lite", "3.13.0-canary.f2fb56fc0", "esm5");
6702
+ a("firestore-lite", "3.13.0-canary.f3067f72d", ""), a("firestore-lite", "3.13.0-canary.f3067f72d", "esm5");
6703
6703
 
6704
6704
  export { Sn as AggregateField, kn as AggregateQuerySnapshot, qn as Bytes, Pn as CollectionReference, An as DocumentReference, fr as DocumentSnapshot, Rn as FieldPath, Cn as FieldValue, wn as Firestore, B as FirestoreError, Ln as GeoPoint, In as Query, br as QueryCompositeFilterConstraint, vr as QueryConstraint, hr as QueryDocumentSnapshot, Nr as QueryEndAtConstraint, wr as QueryFieldFilterConstraint, Ir as QueryLimitConstraint, Sr as QueryOrderByConstraint, pr as QuerySnapshot, Fr as QueryStartAtConstraint, Dt as Timestamp, vi as Transaction, ui as WriteBatch, Yr as addDoc, ti as aggregateFieldEqual, ei as aggregateQuerySnapshotEqual, Er as and, oi as arrayRemove, ii as arrayUnion, Zr as average, Fn as collection, On as collectionGroup, Tn as connectFirestoreEmulator, $r as count, Wr as deleteDoc, ni as deleteField, Vn as doc, xn as documentId, qr as endAt, Dr as endBefore, Jr as getAggregate, Hr as getCount, zr as getDoc, Gr as getDocs, bn as getFirestore, ai as increment, _n as initializeFirestore, Ar as limit, Pr as limitToLast, Tr as or, kr as orderBy, gr as query, Dn as queryEqual, Nn as refEqual, gi as runTransaction, ri as serverTimestamp, Kr as setDoc, _ as setLogLevel, dr as snapshotEqual, Vr as startAfter, Or as startAt, Xr as sum, En as terminate, Qr as updateDoc, _r as where, ci as writeBatch };
6705
6705
  //# sourceMappingURL=index.browser.esm5.js.map
@@ -63,7 +63,7 @@ User.MOCK_USER = new User("mock-user");
63
63
  * See the License for the specific language governing permissions and
64
64
  * limitations under the License.
65
65
  */
66
- let d = "9.23.0-canary.f2fb56fc0";
66
+ let d = "9.23.0-canary.f3067f72d";
67
67
 
68
68
  /**
69
69
  * @license
@@ -7202,7 +7202,7 @@ class Transaction {
7202
7202
  return r && i._setSettings(r), i;
7203
7203
  }), "PUBLIC").setMultipleInstances(!0)),
7204
7204
  // RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
7205
- registerVersion("firestore-lite", "3.13.0-canary.f2fb56fc0", ""), registerVersion("firestore-lite", "3.13.0-canary.f2fb56fc0", "cjs2017");
7205
+ registerVersion("firestore-lite", "3.13.0-canary.f3067f72d", ""), registerVersion("firestore-lite", "3.13.0-canary.f3067f72d", "cjs2017");
7206
7206
  }();
7207
7207
 
7208
7208
  export { AggregateField, AggregateQuerySnapshot, Bytes, CollectionReference, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Firestore, FirestoreError, GeoPoint, Query, QueryCompositeFilterConstraint, QueryConstraint, QueryDocumentSnapshot, QueryEndAtConstraint, QueryFieldFilterConstraint, QueryLimitConstraint, QueryOrderByConstraint, QuerySnapshot, QueryStartAtConstraint, Timestamp, Transaction, WriteBatch, addDoc, aggregateFieldEqual, aggregateQuerySnapshotEqual, and, arrayRemove, arrayUnion, average, collection, collectionGroup, connectFirestoreEmulator, count, deleteDoc, deleteField, doc, documentId, endAt, endBefore, getAggregate, getCount, getDoc, getDocs, getFirestore, increment, initializeFirestore, limit, limitToLast, or, orderBy, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setLogLevel, snapshotEqual, startAfter, startAt, sum, terminate, updateDoc, where, writeBatch };
@@ -32,7 +32,7 @@ export declare function addDoc<AppModelType, DbModelType extends DocumentData>(r
32
32
  * to a dot.
33
33
  */
34
34
  export declare type AddPrefixToKeys<Prefix extends string, T extends Record<string, unknown>> = {
35
- [K in keyof T & string as `${Prefix}.${K}`]+?: T[K];
35
+ [K in keyof T & string as `${Prefix}.${K}`]+?: string extends K ? any : T[K];
36
36
  };
37
37
  /**
38
38
  * Represents an aggregation that can be performed by Firestore.
@@ -14,7 +14,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
14
14
 
15
15
  var nodeFetch__default = /*#__PURE__*/_interopDefaultLegacy(nodeFetch);
16
16
 
17
- const version$1 = "3.13.0-canary.f2fb56fc0";
17
+ const version$1 = "3.13.0-canary.f3067f72d";
18
18
 
19
19
  /**
20
20
  * @license
@@ -67,7 +67,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
67
67
  User.FIRST_PARTY = new User('first-party-uid');
68
68
  User.MOCK_USER = new User('mock-user');
69
69
 
70
- const version = "9.23.0-canary.f2fb56fc0";
70
+ const version = "9.23.0-canary.f3067f72d";
71
71
 
72
72
  /**
73
73
  * @license
@@ -6,7 +6,7 @@ import { FirebaseError, getDefaultEmulatorHostnameAndPort, createMockUserToken,
6
6
  import nodeFetch from 'node-fetch';
7
7
  import { randomBytes as randomBytes$1 } from 'crypto';
8
8
 
9
- const version$1 = "3.13.0-canary.f2fb56fc0";
9
+ const version$1 = "3.13.0-canary.f3067f72d";
10
10
 
11
11
  /**
12
12
  * @license
@@ -59,7 +59,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
59
59
  User.FIRST_PARTY = new User('first-party-uid');
60
60
  User.MOCK_USER = new User('mock-user');
61
61
 
62
- const version = "9.23.0-canary.f2fb56fc0";
62
+ const version = "9.23.0-canary.f3067f72d";
63
63
 
64
64
  /**
65
65
  * @license
@@ -66,7 +66,7 @@ User.MOCK_USER = new User("mock-user");
66
66
  * See the License for the specific language governing permissions and
67
67
  * limitations under the License.
68
68
  */
69
- let E = "9.23.0-canary.f2fb56fc0";
69
+ let E = "9.23.0-canary.f3067f72d";
70
70
 
71
71
  /**
72
72
  * @license
@@ -7212,7 +7212,7 @@ class Transaction {
7212
7212
  return r && i._setSettings(r), i;
7213
7213
  }), "PUBLIC").setMultipleInstances(!0)),
7214
7214
  // RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
7215
- n("firestore-lite", "3.13.0-canary.f2fb56fc0", "rn"), n("firestore-lite", "3.13.0-canary.f2fb56fc0", "esm2017");
7215
+ n("firestore-lite", "3.13.0-canary.f3067f72d", "rn"), n("firestore-lite", "3.13.0-canary.f3067f72d", "esm2017");
7216
7216
  }();
7217
7217
 
7218
7218
  export { AggregateField, AggregateQuerySnapshot, Bytes, CollectionReference, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Firestore, FirestoreError, GeoPoint, Query, QueryCompositeFilterConstraint, QueryConstraint, QueryDocumentSnapshot, QueryEndAtConstraint, QueryFieldFilterConstraint, QueryLimitConstraint, QueryOrderByConstraint, QuerySnapshot, QueryStartAtConstraint, Timestamp, Transaction, WriteBatch, addDoc, aggregateFieldEqual, aggregateQuerySnapshotEqual, and, arrayRemove, arrayUnion, average, collection, collectionGroup, connectFirestoreEmulator, count, deleteDoc, deleteField, doc, documentId, endAt, endBefore, getAggregate, getCount, getDoc, getDocs, getFirestore, increment, initializeFirestore, limit, limitToLast, or, orderBy, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setLogLevel, snapshotEqual, startAfter, startAt, sum, terminate, updateDoc, where, writeBatch };
@@ -65,7 +65,7 @@ export declare function addDoc<AppModelType, DbModelType extends DocumentData>(r
65
65
  * to a dot.
66
66
  */
67
67
  export declare type AddPrefixToKeys<Prefix extends string, T extends Record<string, unknown>> = {
68
- [K in keyof T & string as `${Prefix}.${K}`]+?: T[K];
68
+ [K in keyof T & string as `${Prefix}.${K}`]+?: string extends K ? any : T[K];
69
69
  };
70
70
 
71
71
  /**
@@ -46,7 +46,7 @@ export declare type ChildUpdateFields<K extends string, V> = V extends Record<st
46
46
  * to a dot.
47
47
  */
48
48
  export declare type AddPrefixToKeys<Prefix extends string, T extends Record<string, unknown>> = {
49
- [K in keyof T & string as `${Prefix}.${K}`]+?: T[K];
49
+ [K in keyof T & string as `${Prefix}.${K}`]+?: string extends K ? any : T[K];
50
50
  };
51
51
  /**
52
52
  * Given a union type `U = T1 | T2 | ...`, returns an intersected type
@@ -94,6 +94,20 @@ export interface ExistenceFilterMismatchInfo {
94
94
  bitmapLength: number;
95
95
  /** The number of bits of padding in the last byte of the bloom filter. */
96
96
  padding: number;
97
+ /**
98
+ * Check if the given document path is contained in the bloom filter.
99
+ *
100
+ * The "path" of a document can be retrieved from the
101
+ * `DocumentReference.path` property.
102
+ *
103
+ * Note that due to the probabilistic nature of a bloom filter, it is
104
+ * possible that false positives may occur; that is, this function may
105
+ * return `true` even though the given string is not in the bloom filter.
106
+ *
107
+ * This property is "optional"; if it is undefined then parsing the bloom
108
+ * filter failed.
109
+ */
110
+ mightContain?(documentPath: string): boolean;
97
111
  };
98
112
  }
99
113
  /**
@@ -14,11 +14,56 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { CollectionReference, DocumentData, DocumentReference, Firestore, PrivateSettings, QuerySnapshot, SnapshotListenOptions } from './firebase_export';
17
+ import { CollectionReference, DocumentData, DocumentReference, Firestore, MemoryLocalCache, PersistentLocalCache, PrivateSettings, QuerySnapshot, SnapshotListenOptions } from './firebase_export';
18
+ export interface PersistenceMode {
19
+ readonly name: string;
20
+ readonly storage: 'memory' | 'indexeddb';
21
+ readonly gc: 'eager' | 'lru';
22
+ /**
23
+ * Creates and returns a new `PersistenceMode` object that is the nearest
24
+ * equivalent to this persistence mode but uses eager garbage collection.
25
+ */
26
+ toEagerGc(): PersistenceMode;
27
+ /**
28
+ * Creates and returns a new `PersistenceMode` object that is the nearest
29
+ * equivalent to this persistence mode but uses LRU garbage collection.
30
+ */
31
+ toLruGc(): PersistenceMode;
32
+ /**
33
+ * Creates and returns a new "local cache" object corresponding to this
34
+ * persistence type.
35
+ */
36
+ asLocalCacheFirestoreSettings(): MemoryLocalCache | PersistentLocalCache;
37
+ }
38
+ export declare class MemoryEagerPersistenceMode implements PersistenceMode {
39
+ readonly name = "memory";
40
+ readonly storage = "memory";
41
+ readonly gc = "eager";
42
+ toEagerGc(): MemoryEagerPersistenceMode;
43
+ toLruGc(): MemoryLruPersistenceMode;
44
+ asLocalCacheFirestoreSettings(): MemoryLocalCache;
45
+ }
46
+ export declare class MemoryLruPersistenceMode implements PersistenceMode {
47
+ readonly name = "memory_lru_gc";
48
+ readonly storage = "memory";
49
+ readonly gc = "lru";
50
+ toEagerGc(): MemoryEagerPersistenceMode;
51
+ toLruGc(): MemoryLruPersistenceMode;
52
+ asLocalCacheFirestoreSettings(): MemoryLocalCache;
53
+ }
54
+ export declare class IndexedDbPersistenceMode implements PersistenceMode {
55
+ readonly name = "indexeddb";
56
+ readonly storage = "indexeddb";
57
+ readonly gc = "lru";
58
+ toEagerGc(): MemoryEagerPersistenceMode;
59
+ toLruGc(): IndexedDbPersistenceMode;
60
+ asLocalCacheFirestoreSettings(): PersistentLocalCache;
61
+ }
62
+ export declare const PERSISTENCE_MODE_UNSPECIFIED: unique symbol;
18
63
  export declare function isPersistenceAvailable(): boolean;
19
- declare type ApiSuiteFunction = (message: string, testSuite: (persistence: boolean) => void) => void;
64
+ declare type ApiSuiteFunction = (message: string, testSuite: (persistence: PersistenceMode) => void) => void;
20
65
  interface ApiDescribe {
21
- (message: string, testSuite: (persistence: boolean) => void): void;
66
+ (message: string, testSuite: (persistence: PersistenceMode) => void): void;
22
67
  skip: ApiSuiteFunction;
23
68
  only: ApiSuiteFunction;
24
69
  }
@@ -32,22 +77,24 @@ export declare function toDataMap(docSet: QuerySnapshot): {
32
77
  };
33
78
  /** Converts a DocumentSet to an array with the id of each document */
34
79
  export declare function toIds(docSet: QuerySnapshot): string[];
35
- export declare function withTestDb(persistence: boolean, fn: (db: Firestore) => Promise<void>): Promise<void>;
36
- export declare function withEnsuredEagerGcTestDb(fn: (db: Firestore) => Promise<void>): Promise<void>;
37
- export declare function withEnsuredLruGcTestDb(persistence: boolean, fn: (db: Firestore) => Promise<void>): Promise<void>;
80
+ export declare function withTestDb(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (db: Firestore) => Promise<void>): Promise<void>;
38
81
  /** Runs provided fn with a db for an alternate project id. */
39
- export declare function withAlternateTestDb(persistence: boolean, fn: (db: Firestore) => Promise<void>): Promise<void>;
40
- export declare function withTestDbs(persistence: boolean, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
41
- export declare function withTestDbsSettings<T>(persistence: boolean, projectId: string, settings: PrivateSettings, numDbs: number, fn: (db: Firestore[]) => Promise<T>): Promise<T>;
42
- export declare function withNamedTestDbsOrSkipUnlessUsingEmulator(persistence: boolean, dbNames: string[], fn: (db: Firestore[]) => Promise<void>): Promise<void>;
43
- export declare function withTestDoc(persistence: boolean, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
44
- export declare function withTestDocAndSettings(persistence: boolean, settings: PrivateSettings, fn: (doc: DocumentReference) => Promise<void>): Promise<void>;
45
- export declare function withTestDocAndInitialData(persistence: boolean, initialData: DocumentData | null, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
46
- export declare function withTestCollection<T>(persistence: boolean, docs: {
82
+ export declare function withAlternateTestDb(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (db: Firestore) => Promise<void>): Promise<void>;
83
+ export declare function withTestDbs(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
84
+ export declare function withTestDbsSettings<T>(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, projectId: string, settings: PrivateSettings, numDbs: number, fn: (db: Firestore[]) => Promise<T>): Promise<T>;
85
+ export declare function withNamedTestDbsOrSkipUnlessUsingEmulator(persistence: PersistenceMode, dbNames: string[], fn: (db: Firestore[]) => Promise<void>): Promise<void>;
86
+ export declare function withTestDoc(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
87
+ export declare function withTestDocAndSettings(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, settings: PrivateSettings, fn: (doc: DocumentReference) => Promise<void>): Promise<void>;
88
+ export declare function withTestDocAndInitialData(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, initialData: DocumentData | null, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
89
+ export declare class RetryError extends Error {
90
+ readonly name = "FirestoreIntegrationTestRetryError";
91
+ }
92
+ export declare function withRetry<T>(fn: (attemptNumber: number) => Promise<T>): Promise<T>;
93
+ export declare function withTestCollection<T>(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, docs: {
47
94
  [key: string]: DocumentData;
48
95
  }, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
49
- export declare function withEmptyTestCollection(persistence: boolean, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
50
- export declare function withTestCollectionSettings<T>(persistence: boolean, settings: PrivateSettings, docs: {
96
+ export declare function withEmptyTestCollection(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
97
+ export declare function withTestCollectionSettings<T>(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, settings: PrivateSettings, docs: {
51
98
  [key: string]: DocumentData;
52
99
  }, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
53
100
  export {};
@@ -21,6 +21,7 @@ import { Datastore } from '../../../src/remote/datastore';
21
21
  import { AsyncQueue } from '../../../src/util/async_queue';
22
22
  import { AsyncQueueImpl } from '../../../src/util/async_queue_impl';
23
23
  import { Firestore } from './firebase_export';
24
+ import { PersistenceMode } from './helpers';
24
25
  export declare function asyncQueue(db: Firestore): AsyncQueueImpl;
25
26
  export declare function getDefaultDatabaseInfo(): DatabaseInfo;
26
27
  export declare function withTestDatastore(fn: (datastore: Datastore) => Promise<void>, authCredentialsProvider?: CredentialsProvider<User>, appCheckTokenProvider?: CredentialsProvider<string>): Promise<void>;
@@ -30,4 +31,4 @@ export declare class MockAuthCredentialsProvider extends EmptyAuthCredentialsPro
30
31
  triggerUserChange(newUser: User): void;
31
32
  start(asyncQueue: AsyncQueue, listener: CredentialChangeListener<User>): void;
32
33
  }
33
- export declare function withMockCredentialProviderTestDb(persistence: boolean, fn: (db: Firestore, mockCredential: MockAuthCredentialsProvider) => Promise<void>): Promise<void>;
34
+ export declare function withMockCredentialProviderTestDb(persistence: PersistenceMode, fn: (db: Firestore, mockCredential: MockAuthCredentialsProvider) => Promise<void>): Promise<void>;
@@ -42,5 +42,6 @@ export interface ExistenceFilterMismatchInfo {
42
42
  hashCount: number;
43
43
  bitmapLength: number;
44
44
  padding: number;
45
+ mightContain?(documentPath: string): boolean;
45
46
  };
46
47
  }
@@ -44,7 +44,7 @@ export declare function addDoc<AppModelType, DbModelType extends DocumentData>(r
44
44
  * to a dot.
45
45
  */
46
46
  export declare type AddPrefixToKeys<Prefix extends string, T extends Record<string, unknown>> = {
47
- [K in keyof T & string as `${Prefix}.${K}`]+?: T[K];
47
+ [K in keyof T & string as `${Prefix}.${K}`]+?: string extends K ? any : T[K];
48
48
  };
49
49
 
50
50
  /**
@@ -46,7 +46,7 @@ export declare type ChildUpdateFields<K extends string, V> = V extends Record<st
46
46
  * to a dot.
47
47
  */
48
48
  export declare type AddPrefixToKeys<Prefix extends string, T extends Record<string, unknown>> = {
49
- [K in keyof T & string as `${Prefix}.${K}`]+?: T[K];
49
+ [K in keyof T & string as `${Prefix}.${K}`]+?: string extends K ? any : T[K];
50
50
  };
51
51
  /**
52
52
  * Given a union type `U = T1 | T2 | ...`, returns an intersected type
@@ -94,6 +94,20 @@ export interface ExistenceFilterMismatchInfo {
94
94
  bitmapLength: number;
95
95
  /** The number of bits of padding in the last byte of the bloom filter. */
96
96
  padding: number;
97
+ /**
98
+ * Check if the given document path is contained in the bloom filter.
99
+ *
100
+ * The "path" of a document can be retrieved from the
101
+ * `DocumentReference.path` property.
102
+ *
103
+ * Note that due to the probabilistic nature of a bloom filter, it is
104
+ * possible that false positives may occur; that is, this function may
105
+ * return `true` even though the given string is not in the bloom filter.
106
+ *
107
+ * This property is "optional"; if it is undefined then parsing the bloom
108
+ * filter failed.
109
+ */
110
+ mightContain?(documentPath: string): boolean;
97
111
  };
98
112
  }
99
113
  /**
@@ -14,11 +14,56 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { CollectionReference, DocumentData, DocumentReference, Firestore, PrivateSettings, QuerySnapshot, SnapshotListenOptions } from './firebase_export';
17
+ import { CollectionReference, DocumentData, DocumentReference, Firestore, MemoryLocalCache, PersistentLocalCache, PrivateSettings, QuerySnapshot, SnapshotListenOptions } from './firebase_export';
18
+ export interface PersistenceMode {
19
+ readonly name: string;
20
+ readonly storage: 'memory' | 'indexeddb';
21
+ readonly gc: 'eager' | 'lru';
22
+ /**
23
+ * Creates and returns a new `PersistenceMode` object that is the nearest
24
+ * equivalent to this persistence mode but uses eager garbage collection.
25
+ */
26
+ toEagerGc(): PersistenceMode;
27
+ /**
28
+ * Creates and returns a new `PersistenceMode` object that is the nearest
29
+ * equivalent to this persistence mode but uses LRU garbage collection.
30
+ */
31
+ toLruGc(): PersistenceMode;
32
+ /**
33
+ * Creates and returns a new "local cache" object corresponding to this
34
+ * persistence type.
35
+ */
36
+ asLocalCacheFirestoreSettings(): MemoryLocalCache | PersistentLocalCache;
37
+ }
38
+ export declare class MemoryEagerPersistenceMode implements PersistenceMode {
39
+ readonly name = "memory";
40
+ readonly storage = "memory";
41
+ readonly gc = "eager";
42
+ toEagerGc(): MemoryEagerPersistenceMode;
43
+ toLruGc(): MemoryLruPersistenceMode;
44
+ asLocalCacheFirestoreSettings(): MemoryLocalCache;
45
+ }
46
+ export declare class MemoryLruPersistenceMode implements PersistenceMode {
47
+ readonly name = "memory_lru_gc";
48
+ readonly storage = "memory";
49
+ readonly gc = "lru";
50
+ toEagerGc(): MemoryEagerPersistenceMode;
51
+ toLruGc(): MemoryLruPersistenceMode;
52
+ asLocalCacheFirestoreSettings(): MemoryLocalCache;
53
+ }
54
+ export declare class IndexedDbPersistenceMode implements PersistenceMode {
55
+ readonly name = "indexeddb";
56
+ readonly storage = "indexeddb";
57
+ readonly gc = "lru";
58
+ toEagerGc(): MemoryEagerPersistenceMode;
59
+ toLruGc(): IndexedDbPersistenceMode;
60
+ asLocalCacheFirestoreSettings(): PersistentLocalCache;
61
+ }
62
+ export declare const PERSISTENCE_MODE_UNSPECIFIED: unique symbol;
18
63
  export declare function isPersistenceAvailable(): boolean;
19
- declare type ApiSuiteFunction = (message: string, testSuite: (persistence: boolean) => void) => void;
64
+ declare type ApiSuiteFunction = (message: string, testSuite: (persistence: PersistenceMode) => void) => void;
20
65
  interface ApiDescribe {
21
- (message: string, testSuite: (persistence: boolean) => void): void;
66
+ (message: string, testSuite: (persistence: PersistenceMode) => void): void;
22
67
  skip: ApiSuiteFunction;
23
68
  only: ApiSuiteFunction;
24
69
  }
@@ -32,22 +77,24 @@ export declare function toDataMap(docSet: QuerySnapshot): {
32
77
  };
33
78
  /** Converts a DocumentSet to an array with the id of each document */
34
79
  export declare function toIds(docSet: QuerySnapshot): string[];
35
- export declare function withTestDb(persistence: boolean, fn: (db: Firestore) => Promise<void>): Promise<void>;
36
- export declare function withEnsuredEagerGcTestDb(fn: (db: Firestore) => Promise<void>): Promise<void>;
37
- export declare function withEnsuredLruGcTestDb(persistence: boolean, fn: (db: Firestore) => Promise<void>): Promise<void>;
80
+ export declare function withTestDb(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (db: Firestore) => Promise<void>): Promise<void>;
38
81
  /** Runs provided fn with a db for an alternate project id. */
39
- export declare function withAlternateTestDb(persistence: boolean, fn: (db: Firestore) => Promise<void>): Promise<void>;
40
- export declare function withTestDbs(persistence: boolean, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
41
- export declare function withTestDbsSettings<T>(persistence: boolean, projectId: string, settings: PrivateSettings, numDbs: number, fn: (db: Firestore[]) => Promise<T>): Promise<T>;
42
- export declare function withNamedTestDbsOrSkipUnlessUsingEmulator(persistence: boolean, dbNames: string[], fn: (db: Firestore[]) => Promise<void>): Promise<void>;
43
- export declare function withTestDoc(persistence: boolean, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
44
- export declare function withTestDocAndSettings(persistence: boolean, settings: PrivateSettings, fn: (doc: DocumentReference) => Promise<void>): Promise<void>;
45
- export declare function withTestDocAndInitialData(persistence: boolean, initialData: DocumentData | null, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
46
- export declare function withTestCollection<T>(persistence: boolean, docs: {
82
+ export declare function withAlternateTestDb(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (db: Firestore) => Promise<void>): Promise<void>;
83
+ export declare function withTestDbs(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
84
+ export declare function withTestDbsSettings<T>(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, projectId: string, settings: PrivateSettings, numDbs: number, fn: (db: Firestore[]) => Promise<T>): Promise<T>;
85
+ export declare function withNamedTestDbsOrSkipUnlessUsingEmulator(persistence: PersistenceMode, dbNames: string[], fn: (db: Firestore[]) => Promise<void>): Promise<void>;
86
+ export declare function withTestDoc(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
87
+ export declare function withTestDocAndSettings(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, settings: PrivateSettings, fn: (doc: DocumentReference) => Promise<void>): Promise<void>;
88
+ export declare function withTestDocAndInitialData(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, initialData: DocumentData | null, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
89
+ export declare class RetryError extends Error {
90
+ readonly name = "FirestoreIntegrationTestRetryError";
91
+ }
92
+ export declare function withRetry<T>(fn: (attemptNumber: number) => Promise<T>): Promise<T>;
93
+ export declare function withTestCollection<T>(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, docs: {
47
94
  [key: string]: DocumentData;
48
95
  }, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
49
- export declare function withEmptyTestCollection(persistence: boolean, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
50
- export declare function withTestCollectionSettings<T>(persistence: boolean, settings: PrivateSettings, docs: {
96
+ export declare function withEmptyTestCollection(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
97
+ export declare function withTestCollectionSettings<T>(persistence: PersistenceMode | typeof PERSISTENCE_MODE_UNSPECIFIED, settings: PrivateSettings, docs: {
51
98
  [key: string]: DocumentData;
52
99
  }, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
53
100
  export {};