@firebase/firestore 3.13.0-canary.675ec3a23 → 3.13.0-canary.684bb4e45

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.
@@ -59,6 +59,7 @@ export declare class IndexedDbPersistenceMode implements PersistenceMode {
59
59
  toLruGc(): IndexedDbPersistenceMode;
60
60
  asLocalCacheFirestoreSettings(): PersistentLocalCache;
61
61
  }
62
+ export declare const PERSISTENCE_MODE_UNSPECIFIED: unique symbol;
62
63
  export declare function isPersistenceAvailable(): boolean;
63
64
  declare type ApiSuiteFunction = (message: string, testSuite: (persistence: PersistenceMode) => void) => void;
64
65
  interface ApiDescribe {
@@ -76,20 +77,24 @@ export declare function toDataMap(docSet: QuerySnapshot): {
76
77
  };
77
78
  /** Converts a DocumentSet to an array with the id of each document */
78
79
  export declare function toIds(docSet: QuerySnapshot): string[];
79
- export declare function withTestDb(persistence: PersistenceMode, 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>;
80
81
  /** Runs provided fn with a db for an alternate project id. */
81
- export declare function withAlternateTestDb(persistence: PersistenceMode, fn: (db: Firestore) => Promise<void>): Promise<void>;
82
- export declare function withTestDbs(persistence: PersistenceMode, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
83
- export declare function withTestDbsSettings<T>(persistence: PersistenceMode, projectId: string, settings: PrivateSettings, numDbs: number, fn: (db: Firestore[]) => Promise<T>): Promise<T>;
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>;
84
85
  export declare function withNamedTestDbsOrSkipUnlessUsingEmulator(persistence: PersistenceMode, dbNames: string[], fn: (db: Firestore[]) => Promise<void>): Promise<void>;
85
- export declare function withTestDoc(persistence: PersistenceMode, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
86
- export declare function withTestDocAndSettings(persistence: PersistenceMode, settings: PrivateSettings, fn: (doc: DocumentReference) => Promise<void>): Promise<void>;
87
- export declare function withTestDocAndInitialData(persistence: PersistenceMode, initialData: DocumentData | null, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
88
- export declare function withTestCollection<T>(persistence: PersistenceMode, docs: {
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: {
89
94
  [key: string]: DocumentData;
90
95
  }, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
91
- export declare function withEmptyTestCollection(persistence: PersistenceMode, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
92
- export declare function withTestCollectionSettings<T>(persistence: PersistenceMode, 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: {
93
98
  [key: string]: DocumentData;
94
99
  }, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
95
100
  export {};
package/dist/index.cjs.js CHANGED
@@ -70,7 +70,7 @@ User.MOCK_USER = new User("mock-user");
70
70
  * See the License for the specific language governing permissions and
71
71
  * limitations under the License.
72
72
  */
73
- let b = "9.23.0-canary.675ec3a23";
73
+ let b = "9.23.0-canary.684bb4e45";
74
74
 
75
75
  /**
76
76
  * @license
@@ -21537,9 +21537,9 @@ function __PRIVATE_tryGetString(e, t) {
21537
21537
  return r = Object.assign({
21538
21538
  useFetchStreams: t
21539
21539
  }, r), s._setSettings(r), s;
21540
- }), "PUBLIC").setMultipleInstances(!0)), app.registerVersion(S, "3.13.0-canary.675ec3a23", e),
21540
+ }), "PUBLIC").setMultipleInstances(!0)), app.registerVersion(S, "3.13.0-canary.684bb4e45", e),
21541
21541
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
21542
- app.registerVersion(S, "3.13.0-canary.675ec3a23", "cjs2017");
21542
+ app.registerVersion(S, "3.13.0-canary.684bb4e45", "cjs2017");
21543
21543
  }();
21544
21544
 
21545
21545
  exports.AbstractUserDataWriter = AbstractUserDataWriter;
@@ -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 b = "9.23.0-canary.675ec3a23";
69
+ let b = "9.23.0-canary.684bb4e45";
70
70
 
71
71
  /**
72
72
  * @license
@@ -21533,9 +21533,9 @@ function __PRIVATE_tryGetString(e, t) {
21533
21533
  return r = Object.assign({
21534
21534
  useFetchStreams: t
21535
21535
  }, r), s._setSettings(r), s;
21536
- }), "PUBLIC").setMultipleInstances(!0)), registerVersion(S, "3.13.0-canary.675ec3a23", e),
21536
+ }), "PUBLIC").setMultipleInstances(!0)), registerVersion(S, "3.13.0-canary.684bb4e45", e),
21537
21537
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
21538
- registerVersion(S, "3.13.0-canary.675ec3a23", "esm2017");
21538
+ registerVersion(S, "3.13.0-canary.684bb4e45", "esm2017");
21539
21539
  }();
21540
21540
 
21541
21541
  export { AbstractUserDataWriter, AggregateField, AggregateQuerySnapshot, Bytes, ge as CACHE_SIZE_UNLIMITED, CollectionReference, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Firestore, FirestoreError, GeoPoint, LoadBundleTask, Query, QueryCompositeFilterConstraint, QueryConstraint, QueryDocumentSnapshot, QueryEndAtConstraint, QueryFieldFilterConstraint, QueryLimitConstraint, QueryOrderByConstraint, QuerySnapshot, QueryStartAtConstraint, SnapshotMetadata, Timestamp, Transaction, WriteBatch, DatabaseId as _DatabaseId, DocumentKey as _DocumentKey, __PRIVATE_EmptyAppCheckTokenProvider as _EmptyAppCheckTokenProvider, __PRIVATE_EmptyAuthCredentialsProvider as _EmptyAuthCredentialsProvider, FieldPath$1 as _FieldPath, __PRIVATE_TestingHooks as _TestingHooks, __PRIVATE_cast as _cast, __PRIVATE_debugAssert as _debugAssert, __PRIVATE_isBase64Available as _isBase64Available, __PRIVATE_logWarn as _logWarn, __PRIVATE_validateIsNotUsedTogether as _validateIsNotUsedTogether, addDoc, aggregateFieldEqual, aggregateQuerySnapshotEqual, and, arrayRemove, arrayUnion, average, clearIndexedDbPersistence, collection, collectionGroup, connectFirestoreEmulator, count, deleteDoc, deleteField, disableNetwork, doc, documentId, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, enableNetwork, endAt, endBefore, ensureFirestoreConfigured, executeWrite, getAggregateFromServer, getCountFromServer, getDoc, getDocFromCache, getDocFromServer, getDocs, getDocsFromCache, getDocsFromServer, getFirestore, increment, initializeFirestore, limit, limitToLast, loadBundle, memoryEagerGarbageCollector, memoryLocalCache, memoryLruGarbageCollector, namedQuery, onSnapshot, onSnapshotsInSync, or, orderBy, persistentLocalCache, persistentMultipleTabManager, persistentSingleTabManager, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setIndexConfiguration, setLogLevel, snapshotEqual, startAfter, startAt, sum, terminate, updateDoc, waitForPendingWrites, where, writeBatch };
@@ -70,7 +70,7 @@ P.MOCK_USER = new P("mock-user");
70
70
  * See the License for the specific language governing permissions and
71
71
  * limitations under the License.
72
72
  */
73
- var O = "9.23.0-canary.675ec3a23", R = new l("@firebase/firestore");
73
+ var O = "9.23.0-canary.684bb4e45", R = new l("@firebase/firestore");
74
74
 
75
75
  /**
76
76
  * @license
@@ -22197,9 +22197,9 @@ function qf(t, e) {
22197
22197
  return r = Object.assign({
22198
22198
  useFetchStreams: Nf
22199
22199
  }, r), o._setSettings(r), o;
22200
- }), "PUBLIC").setMultipleInstances(!0)), a(k, "3.13.0-canary.675ec3a23", xf),
22200
+ }), "PUBLIC").setMultipleInstances(!0)), a(k, "3.13.0-canary.684bb4e45", xf),
22201
22201
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
22202
- a(k, "3.13.0-canary.675ec3a23", "esm5");
22202
+ a(k, "3.13.0-canary.684bb4e45", "esm5");
22203
22203
 
22204
22204
  export { Mh as AbstractUserDataWriter, Cl as AggregateField, xl as AggregateQuerySnapshot, Nl as Bytes, ll as CACHE_SIZE_UNLIMITED, el as CollectionReference, tl as DocumentReference, Kh as DocumentSnapshot, Al as FieldPath, Pl as FieldValue, hl as Firestore, Q as FirestoreError, Ol as GeoPoint, cl as LoadBundleTask, $c as Query, vh as QueryCompositeFilterConstraint, hh as QueryConstraint, jh as QueryDocumentSnapshot, Dh as QueryEndAtConstraint, dh as QueryFieldFilterConstraint, bh as QueryLimitConstraint, gh as QueryOrderByConstraint, Qh as QuerySnapshot, Th as QueryStartAtConstraint, Gh as SnapshotMetadata, st as Timestamp, Af as Transaction, Df as WriteBatch, Be as _DatabaseId, pt as _DocumentKey, nt as _EmptyAppCheckTokenProvider, Y as _EmptyAuthCredentialsProvider, dt as _FieldPath, hi as _TestingHooks, Hc as _cast, G as _debugAssert, ke as _isBase64Available, q as _logWarn, Kc as _validateIsNotUsedTogether, af as addDoc, Bh as aggregateFieldEqual, zh as aggregateQuerySnapshotEqual, yh as and, Mf as arrayRemove, Rf as arrayUnion, qh as average, wl as clearIndexedDbPersistence, nl as collection, rl as collectionGroup, Zc as connectFirestoreEmulator, Uh as count, of as deleteDoc, Pf as deleteField, _l as disableNetwork, il as doc, kl as documentId, ml as enableIndexedDbPersistence, yl as enableMultiTabIndexedDbPersistence, Il as enableNetwork, xh as endAt, Ch as endBefore, pl as ensureFirestoreConfigured, cf as executeWrite, ff as getAggregateFromServer, hf as getCountFromServer, Yh as getDoc, Xh as getDocFromCache, Zh as getDocFromServer, $h as getDocs, tf as getDocsFromCache, ef as getDocsFromServer, dl as getFirestore, Ff as increment, fl as initializeFirestore, Ih as limit, _h as limitToLast, El as loadBundle, yf as memoryEagerGarbageCollector, wf as memoryLocalCache, gf as memoryLruGarbageCollector, Sl as namedQuery, uf as onSnapshot, sf as onSnapshotsInSync, mh as or, wh as orderBy, bf as persistentLocalCache, Ef as persistentMultipleTabManager, Tf as persistentSingleTabManager, fh as query, al as queryEqual, ol as refEqual, kf as runTransaction, Of as serverTimestamp, nf as setDoc, Vf as setIndexConfiguration, F as setLogLevel, Hh as snapshotEqual, Sh as startAfter, Eh as startAt, Vh as sum, Tl as terminate, rf as updateDoc, bl as waitForPendingWrites, ph as where, Lf as writeBatch };
22205
22205
  //# sourceMappingURL=index.esm5.js.map
@@ -34,7 +34,7 @@ var grpc__namespace = /*#__PURE__*/_interopNamespace(grpc);
34
34
  var protoLoader__namespace = /*#__PURE__*/_interopNamespace(protoLoader);
35
35
 
36
36
  const name = "@firebase/firestore";
37
- const version$1 = "3.13.0-canary.675ec3a23";
37
+ const version$1 = "3.13.0-canary.684bb4e45";
38
38
 
39
39
  /**
40
40
  * @license
@@ -87,7 +87,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
87
87
  User.FIRST_PARTY = new User('first-party-uid');
88
88
  User.MOCK_USER = new User('mock-user');
89
89
 
90
- const version = "9.23.0-canary.675ec3a23";
90
+ const version = "9.23.0-canary.684bb4e45";
91
91
 
92
92
  /**
93
93
  * @license
@@ -9,7 +9,7 @@ import * as grpc from '@grpc/grpc-js';
9
9
  import * as protoLoader from '@grpc/proto-loader';
10
10
 
11
11
  const name = "@firebase/firestore";
12
- const version$1 = "3.13.0-canary.675ec3a23";
12
+ const version$1 = "3.13.0-canary.684bb4e45";
13
13
 
14
14
  /**
15
15
  * @license
@@ -62,7 +62,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
62
62
  User.FIRST_PARTY = new User('first-party-uid');
63
63
  User.MOCK_USER = new User('mock-user');
64
64
 
65
- const version = "9.23.0-canary.675ec3a23";
65
+ const version = "9.23.0-canary.684bb4e45";
66
66
 
67
67
  /**
68
68
  * @license
package/dist/index.rn.js CHANGED
@@ -70,7 +70,7 @@ User.MOCK_USER = new User("mock-user");
70
70
  * See the License for the specific language governing permissions and
71
71
  * limitations under the License.
72
72
  */
73
- let v = "9.23.0-canary.675ec3a23";
73
+ let v = "9.23.0-canary.684bb4e45";
74
74
 
75
75
  /**
76
76
  * @license
@@ -21555,9 +21555,9 @@ function __PRIVATE_tryGetString(e, t) {
21555
21555
  return r = Object.assign({
21556
21556
  useFetchStreams: t
21557
21557
  }, r), s._setSettings(r), s;
21558
- }), "PUBLIC").setMultipleInstances(!0)), r(D, "3.13.0-canary.675ec3a23", e),
21558
+ }), "PUBLIC").setMultipleInstances(!0)), r(D, "3.13.0-canary.684bb4e45", e),
21559
21559
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
21560
- r(D, "3.13.0-canary.675ec3a23", "esm2017");
21560
+ r(D, "3.13.0-canary.684bb4e45", "esm2017");
21561
21561
  }("rn", /* useFetchStreams= */ !1);
21562
21562
 
21563
21563
  export { AbstractUserDataWriter, AggregateField, AggregateQuerySnapshot, Bytes, ye as CACHE_SIZE_UNLIMITED, CollectionReference, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Firestore, FirestoreError, GeoPoint, LoadBundleTask, Query, QueryCompositeFilterConstraint, QueryConstraint, QueryDocumentSnapshot, QueryEndAtConstraint, QueryFieldFilterConstraint, QueryLimitConstraint, QueryOrderByConstraint, QuerySnapshot, QueryStartAtConstraint, SnapshotMetadata, Timestamp, Transaction, WriteBatch, DatabaseId as _DatabaseId, DocumentKey as _DocumentKey, __PRIVATE_EmptyAppCheckTokenProvider as _EmptyAppCheckTokenProvider, __PRIVATE_EmptyAuthCredentialsProvider as _EmptyAuthCredentialsProvider, FieldPath$1 as _FieldPath, __PRIVATE_TestingHooks as _TestingHooks, __PRIVATE_cast as _cast, __PRIVATE_debugAssert as _debugAssert, __PRIVATE_isBase64Available as _isBase64Available, __PRIVATE_logWarn as _logWarn, __PRIVATE_validateIsNotUsedTogether as _validateIsNotUsedTogether, addDoc, aggregateFieldEqual, aggregateQuerySnapshotEqual, and, arrayRemove, arrayUnion, average, clearIndexedDbPersistence, collection, collectionGroup, connectFirestoreEmulator, count, deleteDoc, deleteField, disableNetwork, doc, documentId, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, enableNetwork, endAt, endBefore, ensureFirestoreConfigured, executeWrite, getAggregateFromServer, getCountFromServer, getDoc, getDocFromCache, getDocFromServer, getDocs, getDocsFromCache, getDocsFromServer, getFirestore, increment, initializeFirestore, limit, limitToLast, loadBundle, memoryEagerGarbageCollector, memoryLocalCache, memoryLruGarbageCollector, namedQuery, onSnapshot, onSnapshotsInSync, or, orderBy, persistentLocalCache, persistentMultipleTabManager, persistentSingleTabManager, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setIndexConfiguration, setLogLevel, snapshotEqual, startAfter, startAt, sum, terminate, updateDoc, waitForPendingWrites, where, writeBatch };
@@ -59,6 +59,7 @@ export declare class IndexedDbPersistenceMode implements PersistenceMode {
59
59
  toLruGc(): IndexedDbPersistenceMode;
60
60
  asLocalCacheFirestoreSettings(): PersistentLocalCache;
61
61
  }
62
+ export declare const PERSISTENCE_MODE_UNSPECIFIED: unique symbol;
62
63
  export declare function isPersistenceAvailable(): boolean;
63
64
  declare type ApiSuiteFunction = (message: string, testSuite: (persistence: PersistenceMode) => void) => void;
64
65
  interface ApiDescribe {
@@ -76,20 +77,24 @@ export declare function toDataMap(docSet: QuerySnapshot): {
76
77
  };
77
78
  /** Converts a DocumentSet to an array with the id of each document */
78
79
  export declare function toIds(docSet: QuerySnapshot): string[];
79
- export declare function withTestDb(persistence: PersistenceMode, 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>;
80
81
  /** Runs provided fn with a db for an alternate project id. */
81
- export declare function withAlternateTestDb(persistence: PersistenceMode, fn: (db: Firestore) => Promise<void>): Promise<void>;
82
- export declare function withTestDbs(persistence: PersistenceMode, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
83
- export declare function withTestDbsSettings<T>(persistence: PersistenceMode, projectId: string, settings: PrivateSettings, numDbs: number, fn: (db: Firestore[]) => Promise<T>): Promise<T>;
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>;
84
85
  export declare function withNamedTestDbsOrSkipUnlessUsingEmulator(persistence: PersistenceMode, dbNames: string[], fn: (db: Firestore[]) => Promise<void>): Promise<void>;
85
- export declare function withTestDoc(persistence: PersistenceMode, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
86
- export declare function withTestDocAndSettings(persistence: PersistenceMode, settings: PrivateSettings, fn: (doc: DocumentReference) => Promise<void>): Promise<void>;
87
- export declare function withTestDocAndInitialData(persistence: PersistenceMode, initialData: DocumentData | null, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
88
- export declare function withTestCollection<T>(persistence: PersistenceMode, docs: {
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: {
89
94
  [key: string]: DocumentData;
90
95
  }, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
91
- export declare function withEmptyTestCollection(persistence: PersistenceMode, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
92
- export declare function withTestCollectionSettings<T>(persistence: PersistenceMode, 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: {
93
98
  [key: string]: DocumentData;
94
99
  }, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
95
100
  export {};
@@ -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.675ec3a23";
66
+ let d = "9.23.0-canary.684bb4e45";
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.675ec3a23", ""), registerVersion("firestore-lite", "3.13.0-canary.675ec3a23", "esm2017");
7205
+ registerVersion("firestore-lite", "3.13.0-canary.684bb4e45", ""), registerVersion("firestore-lite", "3.13.0-canary.684bb4e45", "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.675ec3a23", w = new l("@firebase/firestore");
70
+ var g = "9.23.0-canary.684bb4e45", 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.675ec3a23", ""), a("firestore-lite", "3.13.0-canary.675ec3a23", "esm5");
6702
+ a("firestore-lite", "3.13.0-canary.684bb4e45", ""), a("firestore-lite", "3.13.0-canary.684bb4e45", "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.675ec3a23";
66
+ let d = "9.23.0-canary.684bb4e45";
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.675ec3a23", ""), registerVersion("firestore-lite", "3.13.0-canary.675ec3a23", "cjs2017");
7205
+ registerVersion("firestore-lite", "3.13.0-canary.684bb4e45", ""), registerVersion("firestore-lite", "3.13.0-canary.684bb4e45", "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 };
@@ -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.675ec3a23";
17
+ const version$1 = "3.13.0-canary.684bb4e45";
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.675ec3a23";
70
+ const version = "9.23.0-canary.684bb4e45";
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.675ec3a23";
9
+ const version$1 = "3.13.0-canary.684bb4e45";
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.675ec3a23";
62
+ const version = "9.23.0-canary.684bb4e45";
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.675ec3a23";
69
+ let E = "9.23.0-canary.684bb4e45";
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.675ec3a23", "rn"), n("firestore-lite", "3.13.0-canary.675ec3a23", "esm2017");
7215
+ n("firestore-lite", "3.13.0-canary.684bb4e45", "rn"), n("firestore-lite", "3.13.0-canary.684bb4e45", "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 };
@@ -59,6 +59,7 @@ export declare class IndexedDbPersistenceMode implements PersistenceMode {
59
59
  toLruGc(): IndexedDbPersistenceMode;
60
60
  asLocalCacheFirestoreSettings(): PersistentLocalCache;
61
61
  }
62
+ export declare const PERSISTENCE_MODE_UNSPECIFIED: unique symbol;
62
63
  export declare function isPersistenceAvailable(): boolean;
63
64
  declare type ApiSuiteFunction = (message: string, testSuite: (persistence: PersistenceMode) => void) => void;
64
65
  interface ApiDescribe {
@@ -76,20 +77,24 @@ export declare function toDataMap(docSet: QuerySnapshot): {
76
77
  };
77
78
  /** Converts a DocumentSet to an array with the id of each document */
78
79
  export declare function toIds(docSet: QuerySnapshot): string[];
79
- export declare function withTestDb(persistence: PersistenceMode, 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>;
80
81
  /** Runs provided fn with a db for an alternate project id. */
81
- export declare function withAlternateTestDb(persistence: PersistenceMode, fn: (db: Firestore) => Promise<void>): Promise<void>;
82
- export declare function withTestDbs(persistence: PersistenceMode, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
83
- export declare function withTestDbsSettings<T>(persistence: PersistenceMode, projectId: string, settings: PrivateSettings, numDbs: number, fn: (db: Firestore[]) => Promise<T>): Promise<T>;
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>;
84
85
  export declare function withNamedTestDbsOrSkipUnlessUsingEmulator(persistence: PersistenceMode, dbNames: string[], fn: (db: Firestore[]) => Promise<void>): Promise<void>;
85
- export declare function withTestDoc(persistence: PersistenceMode, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
86
- export declare function withTestDocAndSettings(persistence: PersistenceMode, settings: PrivateSettings, fn: (doc: DocumentReference) => Promise<void>): Promise<void>;
87
- export declare function withTestDocAndInitialData(persistence: PersistenceMode, initialData: DocumentData | null, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
88
- export declare function withTestCollection<T>(persistence: PersistenceMode, docs: {
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: {
89
94
  [key: string]: DocumentData;
90
95
  }, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
91
- export declare function withEmptyTestCollection(persistence: PersistenceMode, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
92
- export declare function withTestCollectionSettings<T>(persistence: PersistenceMode, 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: {
93
98
  [key: string]: DocumentData;
94
99
  }, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
95
100
  export {};
@@ -59,6 +59,7 @@ export declare class IndexedDbPersistenceMode implements PersistenceMode {
59
59
  toLruGc(): IndexedDbPersistenceMode;
60
60
  asLocalCacheFirestoreSettings(): PersistentLocalCache;
61
61
  }
62
+ export declare const PERSISTENCE_MODE_UNSPECIFIED: unique symbol;
62
63
  export declare function isPersistenceAvailable(): boolean;
63
64
  declare type ApiSuiteFunction = (message: string, testSuite: (persistence: PersistenceMode) => void) => void;
64
65
  interface ApiDescribe {
@@ -76,20 +77,24 @@ export declare function toDataMap(docSet: QuerySnapshot): {
76
77
  };
77
78
  /** Converts a DocumentSet to an array with the id of each document */
78
79
  export declare function toIds(docSet: QuerySnapshot): string[];
79
- export declare function withTestDb(persistence: PersistenceMode, 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>;
80
81
  /** Runs provided fn with a db for an alternate project id. */
81
- export declare function withAlternateTestDb(persistence: PersistenceMode, fn: (db: Firestore) => Promise<void>): Promise<void>;
82
- export declare function withTestDbs(persistence: PersistenceMode, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
83
- export declare function withTestDbsSettings<T>(persistence: PersistenceMode, projectId: string, settings: PrivateSettings, numDbs: number, fn: (db: Firestore[]) => Promise<T>): Promise<T>;
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>;
84
85
  export declare function withNamedTestDbsOrSkipUnlessUsingEmulator(persistence: PersistenceMode, dbNames: string[], fn: (db: Firestore[]) => Promise<void>): Promise<void>;
85
- export declare function withTestDoc(persistence: PersistenceMode, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
86
- export declare function withTestDocAndSettings(persistence: PersistenceMode, settings: PrivateSettings, fn: (doc: DocumentReference) => Promise<void>): Promise<void>;
87
- export declare function withTestDocAndInitialData(persistence: PersistenceMode, initialData: DocumentData | null, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
88
- export declare function withTestCollection<T>(persistence: PersistenceMode, docs: {
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: {
89
94
  [key: string]: DocumentData;
90
95
  }, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
91
- export declare function withEmptyTestCollection(persistence: PersistenceMode, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
92
- export declare function withTestCollectionSettings<T>(persistence: PersistenceMode, 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: {
93
98
  [key: string]: DocumentData;
94
99
  }, fn: (collection: CollectionReference, db: Firestore) => Promise<T>): Promise<T>;
95
100
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firebase/firestore",
3
- "version": "3.13.0-canary.675ec3a23",
3
+ "version": "3.13.0-canary.684bb4e45",
4
4
  "engines": {
5
5
  "node": ">=10.10.0"
6
6
  },
@@ -92,22 +92,22 @@
92
92
  "lite/package.json"
93
93
  ],
94
94
  "dependencies": {
95
- "@firebase/component": "0.6.4-canary.675ec3a23",
96
- "@firebase/logger": "0.4.0-canary.675ec3a23",
97
- "@firebase/util": "1.9.3-canary.675ec3a23",
98
- "@firebase/webchannel-wrapper": "0.10.1-canary.675ec3a23",
95
+ "@firebase/component": "0.6.4-canary.684bb4e45",
96
+ "@firebase/logger": "0.4.0-canary.684bb4e45",
97
+ "@firebase/util": "1.9.3-canary.684bb4e45",
98
+ "@firebase/webchannel-wrapper": "0.10.1-canary.684bb4e45",
99
99
  "@grpc/grpc-js": "~1.7.0",
100
100
  "@grpc/proto-loader": "^0.6.13",
101
101
  "node-fetch": "2.6.7",
102
102
  "tslib": "^2.1.0"
103
103
  },
104
104
  "peerDependencies": {
105
- "@firebase/app": "0.9.13-canary.675ec3a23"
105
+ "@firebase/app": "0.9.13-canary.684bb4e45"
106
106
  },
107
107
  "devDependencies": {
108
- "@firebase/app": "0.9.13-canary.675ec3a23",
109
- "@firebase/app-compat": "0.2.13-canary.675ec3a23",
110
- "@firebase/auth": "0.23.2-canary.675ec3a23",
108
+ "@firebase/app": "0.9.13-canary.684bb4e45",
109
+ "@firebase/app-compat": "0.2.13-canary.684bb4e45",
110
+ "@firebase/auth": "0.23.2-canary.684bb4e45",
111
111
  "@rollup/plugin-alias": "3.1.9",
112
112
  "@rollup/plugin-json": "4.1.0",
113
113
  "@types/eslint": "7.29.0",