@firebase/firestore 3.4.14-canary.0361bf3d7 → 3.4.14-canary.04dcdbb0f

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 (36) hide show
  1. package/dist/firestore/src/api/database.d.ts +2 -0
  2. package/dist/firestore/src/lite-api/database.d.ts +15 -0
  3. package/dist/index.d.ts +2 -20
  4. package/dist/index.esm2017.js +5 -5
  5. package/dist/index.esm2017.js.map +1 -1
  6. package/dist/index.esm5.js +5 -5
  7. package/dist/index.esm5.js.map +1 -1
  8. package/dist/index.node.cjs.js +9 -4
  9. package/dist/index.node.cjs.js.map +1 -1
  10. package/dist/index.node.mjs +9 -4
  11. package/dist/index.node.mjs.map +1 -1
  12. package/dist/index.rn.js +5 -5
  13. package/dist/index.rn.js.map +1 -1
  14. package/dist/internal.d.ts +2 -0
  15. package/dist/lite/firestore/src/api/database.d.ts +2 -0
  16. package/dist/lite/firestore/src/lite-api/database.d.ts +15 -0
  17. package/dist/lite/index.browser.esm2017.js +5 -16
  18. package/dist/lite/index.browser.esm2017.js.map +1 -1
  19. package/dist/lite/index.browser.esm5.js +5 -18
  20. package/dist/lite/index.browser.esm5.js.map +1 -1
  21. package/dist/lite/index.d.ts +4 -22
  22. package/dist/lite/index.node.cjs.js +9 -16
  23. package/dist/lite/index.node.cjs.js.map +1 -1
  24. package/dist/lite/index.node.mjs +9 -16
  25. package/dist/lite/index.node.mjs.map +1 -1
  26. package/dist/lite/index.rn.esm2017.js +5 -16
  27. package/dist/lite/index.rn.esm2017.js.map +1 -1
  28. package/dist/lite/internal.d.ts +16 -0
  29. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +1 -12
  30. package/dist/lite/packages/firestore/src/api/database.d.ts +2 -0
  31. package/dist/lite/packages/firestore/src/lite-api/database.d.ts +15 -0
  32. package/dist/lite/private.d.ts +5 -22
  33. package/dist/packages/firestore/src/api/database.d.ts +2 -0
  34. package/dist/packages/firestore/src/lite-api/database.d.ts +15 -0
  35. package/dist/private.d.ts +2 -20
  36. package/package.json +10 -9
@@ -91,6 +91,7 @@ export declare function getFirestore(app: FirebaseApp): Firestore;
91
91
  *
92
92
  * @param databaseId - The name of database.
93
93
  * @returns The {@link Firestore} instance of the provided app.
94
+ * @internal
94
95
  */
95
96
  export declare function getFirestore(databaseId: string): Firestore;
96
97
  /**
@@ -102,6 +103,7 @@ export declare function getFirestore(databaseId: string): Firestore;
102
103
  * instance is associated with.
103
104
  * @param databaseId - The name of database.
104
105
  * @returns The {@link Firestore} instance of the provided app.
106
+ * @internal
105
107
  */
106
108
  export declare function getFirestore(app: FirebaseApp, databaseId: string): Firestore;
107
109
  /**
@@ -68,6 +68,18 @@ export declare class Firestore implements FirestoreService {
68
68
  */
69
69
  protected _terminate(): Promise<void>;
70
70
  }
71
+ /**
72
+ * Initializes a new instance of Cloud Firestore with the provided settings.
73
+ * Can only be called before any other functions, including
74
+ * {@link getFirestore}. If the custom settings are empty, this function is
75
+ * equivalent to calling {@link getFirestore}.
76
+ *
77
+ * @param app - The {@link @firebase/app#FirebaseApp} with which the `Firestore` instance will
78
+ * be associated.
79
+ * @param settings - A settings object to configure the `Firestore` instance.
80
+ * @returns A newly initialized `Firestore` instance.
81
+ */
82
+ export declare function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings): Firestore;
71
83
  /**
72
84
  * Initializes a new instance of Cloud Firestore with the provided settings.
73
85
  * Can only be called before any other functions, including
@@ -79,6 +91,7 @@ export declare class Firestore implements FirestoreService {
79
91
  * @param settings - A settings object to configure the `Firestore` instance.
80
92
  * @param databaseId - The name of database.
81
93
  * @returns A newly initialized `Firestore` instance.
94
+ * @internal
82
95
  */
83
96
  export declare function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings, databaseId?: string): Firestore;
84
97
  /**
@@ -106,6 +119,7 @@ export declare function getFirestore(app: FirebaseApp): Firestore;
106
119
  *
107
120
  * @param databaseId - The name of database.
108
121
  * @returns The {@link Firestore} instance of the provided app.
122
+ * @internal
109
123
  */
110
124
  export declare function getFirestore(databaseId: string): Firestore;
111
125
  /**
@@ -117,6 +131,7 @@ export declare function getFirestore(databaseId: string): Firestore;
117
131
  * instance is associated with.
118
132
  * @param databaseId - The name of database.
119
133
  * @returns The {@link Firestore} instance of the provided app.
134
+ * @internal
120
135
  */
121
136
  export declare function getFirestore(app: FirebaseApp, databaseId: string): Firestore;
122
137
  export { EmulatorMockTokenOptions } from '@firebase/util';
package/dist/index.d.ts CHANGED
@@ -917,26 +917,8 @@ export declare function getFirestore(): Firestore;
917
917
  * @returns The {@link Firestore} instance of the provided app.
918
918
  */
919
919
  export declare function getFirestore(app: FirebaseApp): Firestore;
920
- /**
921
- * Returns the existing {@link Firestore} instance that is associated with the
922
- * default {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
923
- * instance with default settings.
924
- *
925
- * @param databaseId - The name of database.
926
- * @returns The {@link Firestore} instance of the provided app.
927
- */
928
- export declare function getFirestore(databaseId: string): Firestore;
929
- /**
930
- * Returns the existing {@link Firestore} instance that is associated with the
931
- * provided {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
932
- * instance with default settings.
933
- *
934
- * @param app - The {@link @firebase/app#FirebaseApp} instance that the returned {@link Firestore}
935
- * instance is associated with.
936
- * @param databaseId - The name of database.
937
- * @returns The {@link Firestore} instance of the provided app.
938
- */
939
- export declare function getFirestore(app: FirebaseApp, databaseId: string): Firestore;
920
+ /* Excluded declaration from this release type: getFirestore */
921
+ /* Excluded declaration from this release type: getFirestore */
940
922
  /**
941
923
  * Returns a special value that can be used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link
942
924
  * @firebase/firestore/lite#(updateDoc:1)} that tells the server to increment the field's current value by
@@ -66,7 +66,7 @@ C.MOCK_USER = new C("mock-user");
66
66
  * See the License for the specific language governing permissions and
67
67
  * limitations under the License.
68
68
  */
69
- let x = "9.9.3-canary.0361bf3d7";
69
+ let x = "9.9.3-canary.04dcdbb0f";
70
70
 
71
71
  /**
72
72
  * @license
@@ -15915,7 +15915,7 @@ class zc {
15915
15915
  let e;
15916
15916
  if (t.isFoundDocument()) e = t.version; else {
15917
15917
  if (!t.isNoDocument()) throw L();
15918
- // For deleted docs, we must use baseVersion 0 when we overwrite them.
15918
+ // Represent a deleted doc using SnapshotVersion.min().
15919
15919
  e = ct.min();
15920
15920
  }
15921
15921
  const n = this.readVersions.get(t.key.toString());
@@ -15930,7 +15930,7 @@ class zc {
15930
15930
  * as a precondition, or no precondition if it was not read.
15931
15931
  */ precondition(t) {
15932
15932
  const e = this.readVersions.get(t.toString());
15933
- return !this.writtenDocs.has(t.toString()) && e ? Ln.updateTime(e) : Ln.none();
15933
+ return !this.writtenDocs.has(t.toString()) && e ? e.isEqual(ct.min()) ? Ln.exists(!1) : Ln.updateTime(e) : Ln.none();
15934
15934
  }
15935
15935
  /**
15936
15936
  * Returns the precondition for a document if the operation is an update.
@@ -19757,9 +19757,9 @@ function Fl(t, e) {
19757
19757
  return s = Object.assign({
19758
19758
  useFetchStreams: e
19759
19759
  }, s), r._setSettings(s), r;
19760
- }), "PUBLIC").setMultipleInstances(!0)), registerVersion(D, "3.4.14-canary.0361bf3d7", t),
19760
+ }), "PUBLIC").setMultipleInstances(!0)), registerVersion(D, "3.4.14-canary.04dcdbb0f", t),
19761
19761
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
19762
- registerVersion(D, "3.4.14-canary.0361bf3d7", "esm2017");
19762
+ registerVersion(D, "3.4.14-canary.04dcdbb0f", "esm2017");
19763
19763
  }();
19764
19764
 
19765
19765
  export { cl as AbstractUserDataWriter, sh as Bytes, $a as CACHE_SIZE_UNLIMITED, Sa as CollectionReference, va as DocumentReference, Oh as DocumentSnapshot, eh as FieldPath, ih as FieldValue, Ba as Firestore, Q as FirestoreError, rh as GeoPoint, Fa as LoadBundleTask, Va as Query, qh as QueryConstraint, Fh as QueryDocumentSnapshot, $h as QuerySnapshot, Mh as SnapshotMetadata, ut as Timestamp, Vl as Transaction, ll as WriteBatch, ue as _DatabaseId, dt as _DocumentKey, et as _EmptyAppCheckTokenProvider, z as _EmptyAuthCredentialsProvider, ft as _FieldPath, Ea as _cast, q as _debugAssert, Yt as _isBase64Available, $ as _logWarn, ya as _validateIsNotUsedTogether, Al as addDoc, Nl as arrayRemove, xl as arrayUnion, Wa as clearIndexedDbPersistence, Da as collection, Ca as collectionGroup, Pa as connectFirestoreEmulator, El as deleteDoc, Dl as deleteField, Ja as disableNetwork, xa as doc, nh as documentId, Ga as enableIndexedDbPersistence, Qa as enableMultiTabIndexedDbPersistence, Ha as enableNetwork, nl as endAt, el as endBefore, qa as ensureFirestoreConfigured, Pl as executeWrite, dl as getDoc, wl as getDocFromCache, ml as getDocFromServer, gl as getDocs, yl as getDocsFromCache, pl as getDocsFromServer, Ua as getFirestore, kl as increment, La as initializeFirestore, Hh as limit, Jh as limitToLast, Xa as loadBundle, Za as namedQuery, Rl as onSnapshot, bl as onSnapshotsInSync, Wh as orderBy, Kh as query, ka as queryEqual, Na as refEqual, Sl as runTransaction, Cl as serverTimestamp, Il as setDoc, Ol as setIndexConfiguration, M as setLogLevel, Lh as snapshotEqual, Zh as startAfter, Xh as startAt, Ya as terminate, Tl as updateDoc, za as waitForPendingWrites, Qh as where, Ml as writeBatch };