@firebase/firestore 3.4.8-canary.69baecadd → 3.4.8-canary.6ceff4db0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/firestore/lite/index.d.ts +1 -0
- package/dist/firestore/src/api/transaction.d.ts +2 -1
- package/dist/firestore/src/api/transaction_options.d.ts +17 -0
- package/dist/firestore/src/api.d.ts +1 -0
- package/dist/firestore/src/core/firestore_client.d.ts +2 -1
- package/dist/firestore/src/core/transaction_options.d.ts +25 -0
- package/dist/firestore/src/core/transaction_runner.d.ts +3 -2
- package/dist/firestore/src/lite-api/transaction.d.ts +2 -1
- package/dist/firestore/src/lite-api/transaction_options.d.ts +23 -0
- package/dist/index.d.ts +24 -1
- package/dist/index.esm2017.js +95 -71
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +105 -82
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +36 -9
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +36 -9
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +241 -217
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +25 -1
- package/dist/lite/firestore/lite/index.d.ts +1 -0
- package/dist/lite/firestore/src/api/transaction.d.ts +2 -1
- package/dist/lite/firestore/src/api/transaction_options.d.ts +17 -0
- package/dist/lite/firestore/src/api.d.ts +1 -0
- package/dist/lite/firestore/src/core/firestore_client.d.ts +2 -1
- package/dist/lite/firestore/src/core/transaction_options.d.ts +25 -0
- package/dist/lite/firestore/src/core/transaction_runner.d.ts +3 -2
- package/dist/lite/firestore/src/lite-api/transaction.d.ts +2 -1
- package/dist/lite/firestore/src/lite-api/transaction_options.d.ts +23 -0
- package/dist/lite/index.browser.esm2017.js +180 -157
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +112 -110
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.d.ts +24 -1
- package/dist/lite/index.node.cjs.js +34 -7
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +34 -7
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +204 -181
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +25 -1
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +13 -13
- package/dist/lite/packages/firestore/lite/index.d.ts +1 -0
- package/dist/lite/packages/firestore/src/api/transaction.d.ts +2 -1
- package/dist/lite/packages/firestore/src/api/transaction_options.d.ts +17 -0
- package/dist/lite/packages/firestore/src/api.d.ts +1 -0
- package/dist/lite/packages/firestore/src/core/firestore_client.d.ts +2 -1
- package/dist/lite/packages/firestore/src/core/transaction_options.d.ts +25 -0
- package/dist/lite/packages/firestore/src/core/transaction_runner.d.ts +3 -2
- package/dist/lite/packages/firestore/src/lite-api/transaction.d.ts +2 -1
- package/dist/lite/packages/firestore/src/lite-api/transaction_options.d.ts +23 -0
- package/dist/lite/private.d.ts +25 -1
- package/dist/packages/firestore/dist/index.esm2017.d.ts +30 -29
- package/dist/packages/firestore/lite/index.d.ts +1 -0
- package/dist/packages/firestore/src/api/transaction.d.ts +2 -1
- package/dist/packages/firestore/src/api/transaction_options.d.ts +17 -0
- package/dist/packages/firestore/src/api.d.ts +1 -0
- package/dist/packages/firestore/src/core/firestore_client.d.ts +2 -1
- package/dist/packages/firestore/src/core/transaction_options.d.ts +25 -0
- package/dist/packages/firestore/src/core/transaction_runner.d.ts +3 -2
- package/dist/packages/firestore/src/lite-api/transaction.d.ts +2 -1
- package/dist/packages/firestore/src/lite-api/transaction_options.d.ts +23 -0
- package/dist/private.d.ts +25 -1
- package/package.json +10 -10
package/dist/index.esm5.js
CHANGED
|
@@ -70,7 +70,7 @@ V.MOCK_USER = new V("mock-user");
|
|
|
70
70
|
* See the License for the specific language governing permissions and
|
|
71
71
|
* limitations under the License.
|
|
72
72
|
*/
|
|
73
|
-
var P = "9.7.0-canary.
|
|
73
|
+
var P = "9.7.0-canary.6ceff4db0", O = new l("@firebase/firestore");
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* @license
|
|
@@ -15748,9 +15748,9 @@ function Da(t, e) {
|
|
|
15748
15748
|
this.ensureCommitNotCalled(), this.mutations.push(t);
|
|
15749
15749
|
}, t.prototype.ensureCommitNotCalled = function() {}, t;
|
|
15750
15750
|
}(), ka = /** @class */ function() {
|
|
15751
|
-
function t(t, e, n, r) {
|
|
15752
|
-
this.asyncQueue = t, this.datastore = e, this.
|
|
15753
|
-
this.xa =
|
|
15751
|
+
function t(t, e, n, r, i) {
|
|
15752
|
+
this.asyncQueue = t, this.datastore = e, this.options = n, this.updateFunction = r,
|
|
15753
|
+
this.deferred = i, this.xa = n.maxAttempts, this.No = new Gu(this.asyncQueue, "transaction_retry" /* TransactionRetry */)
|
|
15754
15754
|
/** Runs the transaction and sets the result on deferred. */;
|
|
15755
15755
|
}
|
|
15756
15756
|
return t.prototype.run = function() {
|
|
@@ -18803,7 +18803,7 @@ function Ll(t, e, n) {
|
|
|
18803
18803
|
|
|
18804
18804
|
/**
|
|
18805
18805
|
* @license
|
|
18806
|
-
* Copyright
|
|
18806
|
+
* Copyright 2022 Google LLC
|
|
18807
18807
|
*
|
|
18808
18808
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
18809
18809
|
* you may not use this file except in compliance with the License.
|
|
@@ -18816,13 +18816,9 @@ function Ll(t, e, n) {
|
|
|
18816
18816
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18817
18817
|
* See the License for the specific language governing permissions and
|
|
18818
18818
|
* limitations under the License.
|
|
18819
|
-
*/
|
|
18820
|
-
|
|
18821
|
-
|
|
18822
|
-
* to the user.
|
|
18823
|
-
*
|
|
18824
|
-
* @internal
|
|
18825
|
-
*/ var Vl = /** @class */ function() {
|
|
18819
|
+
*/ var Vl = {
|
|
18820
|
+
maxAttempts: 5
|
|
18821
|
+
}, Pl = /** @class */ function() {
|
|
18826
18822
|
function t() {}
|
|
18827
18823
|
return t.prototype.convertValue = function(t, e) {
|
|
18828
18824
|
switch (void 0 === e && (e = "none"), qt(t)) {
|
|
@@ -18900,6 +18896,28 @@ function Ll(t, e, n) {
|
|
|
18900
18896
|
}, t;
|
|
18901
18897
|
}();
|
|
18902
18898
|
|
|
18899
|
+
/**
|
|
18900
|
+
* @license
|
|
18901
|
+
* Copyright 2020 Google LLC
|
|
18902
|
+
*
|
|
18903
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
18904
|
+
* you may not use this file except in compliance with the License.
|
|
18905
|
+
* You may obtain a copy of the License at
|
|
18906
|
+
*
|
|
18907
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
18908
|
+
*
|
|
18909
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
18910
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18911
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18912
|
+
* See the License for the specific language governing permissions and
|
|
18913
|
+
* limitations under the License.
|
|
18914
|
+
*/
|
|
18915
|
+
/**
|
|
18916
|
+
* Converts Firestore's internal types to the JavaScript types that we expose
|
|
18917
|
+
* to the user.
|
|
18918
|
+
*
|
|
18919
|
+
* @internal
|
|
18920
|
+
*/
|
|
18903
18921
|
/**
|
|
18904
18922
|
* @license
|
|
18905
18923
|
* Copyright 2020 Google LLC
|
|
@@ -18924,14 +18942,15 @@ function Ll(t, e, n) {
|
|
|
18924
18942
|
* because we want to provide the user with a more specific error message if
|
|
18925
18943
|
* their `set()` or fails due to invalid data originating from a `toFirestore()`
|
|
18926
18944
|
* call.
|
|
18927
|
-
*/
|
|
18945
|
+
*/
|
|
18946
|
+
function Ol(t, e, n) {
|
|
18928
18947
|
// Cast to `any` in order to satisfy the union type constraint on
|
|
18929
18948
|
// toFirestore().
|
|
18930
18949
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18931
18950
|
return t ? n && (n.merge || n.mergeFields) ? t.toFirestore(e, n) : t.toFirestore(e) : e;
|
|
18932
18951
|
}
|
|
18933
18952
|
|
|
18934
|
-
var
|
|
18953
|
+
var Fl = /** @class */ function(e) {
|
|
18935
18954
|
function n(t) {
|
|
18936
18955
|
var n = this;
|
|
18937
18956
|
return (n = e.call(this) || this).firestore = t, n;
|
|
@@ -18942,7 +18961,7 @@ var Ol = /** @class */ function(e) {
|
|
|
18942
18961
|
var e = this.convertDocumentKey(t, this.firestore._databaseId);
|
|
18943
18962
|
return new ec(this.firestore, /* converter= */ null, e);
|
|
18944
18963
|
}, n;
|
|
18945
|
-
}(
|
|
18964
|
+
}(Pl), ql = /** @class */ function() {
|
|
18946
18965
|
/** @hideconstructor */
|
|
18947
18966
|
function t(t, e) {
|
|
18948
18967
|
this._firestore = t, this._commitHandler = e, this._mutations = [], this._committed = !1,
|
|
@@ -18950,12 +18969,12 @@ var Ol = /** @class */ function(e) {
|
|
|
18950
18969
|
}
|
|
18951
18970
|
return t.prototype.set = function(t, e, n) {
|
|
18952
18971
|
this._verifyNotCommitted();
|
|
18953
|
-
var r =
|
|
18972
|
+
var r = Ul(t, this._firestore), i = Ol(r.converter, e, n), o = Bc(this._dataReader, "WriteBatch.set", r._key, i, null !== r.converter, n);
|
|
18954
18973
|
return this._mutations.push(o.toMutation(r._key, Sn.none())), this;
|
|
18955
18974
|
}, t.prototype.update = function(t, e, n) {
|
|
18956
18975
|
for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
|
|
18957
18976
|
this._verifyNotCommitted();
|
|
18958
|
-
var o, u =
|
|
18977
|
+
var o, u = Ul(t, this._firestore);
|
|
18959
18978
|
// For Compat types, we have to "extract" the underlying types before
|
|
18960
18979
|
// performing validation.
|
|
18961
18980
|
return o = "string" == typeof (e = I(e)) || e instanceof xc ? Yc(this._dataReader, "WriteBatch.update", u._key, e, n, r) : Hc(this._dataReader, "WriteBatch.update", u._key, e),
|
|
@@ -18969,7 +18988,7 @@ var Ol = /** @class */ function(e) {
|
|
|
18969
18988
|
*/
|
|
18970
18989
|
t.prototype.delete = function(t) {
|
|
18971
18990
|
this._verifyNotCommitted();
|
|
18972
|
-
var e =
|
|
18991
|
+
var e = Ul(t, this._firestore);
|
|
18973
18992
|
return this._mutations = this._mutations.concat(new qn(e._key, Sn.none())), this;
|
|
18974
18993
|
},
|
|
18975
18994
|
/**
|
|
@@ -19014,7 +19033,7 @@ var Ol = /** @class */ function(e) {
|
|
|
19014
19033
|
* provides methods for adding writes to the write batch. None of the writes
|
|
19015
19034
|
* will be committed (or visible locally) until {@link WriteBatch.commit} is
|
|
19016
19035
|
* called.
|
|
19017
|
-
*/ function
|
|
19036
|
+
*/ function Ul(t, e) {
|
|
19018
19037
|
if ((t = I(t)).firestore !== e) throw new Y(H.INVALID_ARGUMENT, "Provided document reference is from a different Firestore instance.");
|
|
19019
19038
|
return t;
|
|
19020
19039
|
}
|
|
@@ -19071,15 +19090,15 @@ var Ol = /** @class */ function(e) {
|
|
|
19071
19090
|
* @param reference - The reference of the document to fetch.
|
|
19072
19091
|
* @returns A Promise resolved with a `DocumentSnapshot` containing the
|
|
19073
19092
|
* current document contents.
|
|
19074
|
-
*/ function
|
|
19093
|
+
*/ function Bl(t) {
|
|
19075
19094
|
t = Xa(t, ec);
|
|
19076
19095
|
var e = Xa(t.firestore, dc);
|
|
19077
19096
|
return Ka(yc(e), t._key).then((function(n) {
|
|
19078
|
-
return
|
|
19097
|
+
return eh(e, t, n);
|
|
19079
19098
|
}));
|
|
19080
19099
|
}
|
|
19081
19100
|
|
|
19082
|
-
var
|
|
19101
|
+
var Kl = /** @class */ function(e) {
|
|
19083
19102
|
function n(t) {
|
|
19084
19103
|
var n = this;
|
|
19085
19104
|
return (n = e.call(this) || this).firestore = t, n;
|
|
@@ -19090,7 +19109,7 @@ var Bl = /** @class */ function(e) {
|
|
|
19090
19109
|
var e = this.convertDocumentKey(t, this.firestore._databaseId);
|
|
19091
19110
|
return new ec(this.firestore, /* converter= */ null, e);
|
|
19092
19111
|
}, n;
|
|
19093
|
-
}(
|
|
19112
|
+
}(Pl);
|
|
19094
19113
|
|
|
19095
19114
|
/**
|
|
19096
19115
|
* Reads the document referred to by this `DocumentReference` from cache.
|
|
@@ -19098,9 +19117,9 @@ var Bl = /** @class */ function(e) {
|
|
|
19098
19117
|
*
|
|
19099
19118
|
* @returns A `Promise` resolved with a `DocumentSnapshot` containing the
|
|
19100
19119
|
* current document contents.
|
|
19101
|
-
*/ function
|
|
19120
|
+
*/ function Gl(t) {
|
|
19102
19121
|
t = Xa(t, ec);
|
|
19103
|
-
var e = Xa(t.firestore, dc), i = yc(e), o = new
|
|
19122
|
+
var e = Xa(t.firestore, dc), i = yc(e), o = new Kl(e);
|
|
19104
19123
|
return function(t, e) {
|
|
19105
19124
|
var i = this, o = new X;
|
|
19106
19125
|
return t.asyncQueue.enqueueAndForget((function() {
|
|
@@ -19155,13 +19174,13 @@ var Bl = /** @class */ function(e) {
|
|
|
19155
19174
|
*
|
|
19156
19175
|
* @returns A `Promise` resolved with a `DocumentSnapshot` containing the
|
|
19157
19176
|
* current document contents.
|
|
19158
|
-
*/ function
|
|
19177
|
+
*/ function jl(t) {
|
|
19159
19178
|
t = Xa(t, ec);
|
|
19160
19179
|
var e = Xa(t.firestore, dc);
|
|
19161
19180
|
return Ka(yc(e), t._key, {
|
|
19162
19181
|
source: "server"
|
|
19163
19182
|
}).then((function(n) {
|
|
19164
|
-
return
|
|
19183
|
+
return eh(e, t, n);
|
|
19165
19184
|
}));
|
|
19166
19185
|
}
|
|
19167
19186
|
|
|
@@ -19174,9 +19193,9 @@ var Bl = /** @class */ function(e) {
|
|
|
19174
19193
|
* invoke {@link getDocsFromCache} or {@link getDocsFromServer}.
|
|
19175
19194
|
*
|
|
19176
19195
|
* @returns A `Promise` that will be resolved with the results of the query.
|
|
19177
|
-
*/ function
|
|
19196
|
+
*/ function zl(t) {
|
|
19178
19197
|
t = Xa(t, nc);
|
|
19179
|
-
var e = Xa(t.firestore, dc), n = yc(e), r = new
|
|
19198
|
+
var e = Xa(t.firestore, dc), n = yc(e), r = new Kl(e);
|
|
19180
19199
|
return vl(t._query), Ga(n, t._query).then((function(n) {
|
|
19181
19200
|
return new fl(e, r, t, n);
|
|
19182
19201
|
}))
|
|
@@ -19188,9 +19207,9 @@ var Bl = /** @class */ function(e) {
|
|
|
19188
19207
|
*/;
|
|
19189
19208
|
}
|
|
19190
19209
|
|
|
19191
|
-
function
|
|
19210
|
+
function Ql(t) {
|
|
19192
19211
|
t = Xa(t, nc);
|
|
19193
|
-
var e = Xa(t.firestore, dc), i = yc(e), o = new
|
|
19212
|
+
var e = Xa(t.firestore, dc), i = yc(e), o = new Kl(e);
|
|
19194
19213
|
return function(t, e) {
|
|
19195
19214
|
var i = this, o = new X;
|
|
19196
19215
|
return t.asyncQueue.enqueueAndForget((function() {
|
|
@@ -19239,9 +19258,9 @@ function zl(t) {
|
|
|
19239
19258
|
* server. Returns an error if the network is not available.
|
|
19240
19259
|
*
|
|
19241
19260
|
* @returns A `Promise` that will be resolved with the results of the query.
|
|
19242
|
-
*/ function
|
|
19261
|
+
*/ function Wl(t) {
|
|
19243
19262
|
t = Xa(t, nc);
|
|
19244
|
-
var e = Xa(t.firestore, dc), n = yc(e), r = new
|
|
19263
|
+
var e = Xa(t.firestore, dc), n = yc(e), r = new Kl(e);
|
|
19245
19264
|
return Ga(n, t._query, {
|
|
19246
19265
|
source: "server"
|
|
19247
19266
|
}).then((function(n) {
|
|
@@ -19249,17 +19268,17 @@ function zl(t) {
|
|
|
19249
19268
|
}));
|
|
19250
19269
|
}
|
|
19251
19270
|
|
|
19252
|
-
function
|
|
19271
|
+
function Hl(t, e, n) {
|
|
19253
19272
|
t = Xa(t, ec);
|
|
19254
|
-
var r = Xa(t.firestore, dc), i =
|
|
19255
|
-
return
|
|
19273
|
+
var r = Xa(t.firestore, dc), i = Ol(t.converter, e, n);
|
|
19274
|
+
return th(r, [ Bc(Uc(r), "setDoc", t._key, i, null !== t.converter, n).toMutation(t._key, Sn.none()) ]);
|
|
19256
19275
|
}
|
|
19257
19276
|
|
|
19258
|
-
function
|
|
19277
|
+
function Yl(t, e, n) {
|
|
19259
19278
|
for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
|
|
19260
19279
|
t = Xa(t, ec);
|
|
19261
19280
|
var o = Xa(t.firestore, dc), u = Uc(o);
|
|
19262
|
-
return
|
|
19281
|
+
return th(o, [ ("string" == typeof (
|
|
19263
19282
|
// For Compat types, we have to "extract" the underlying types before
|
|
19264
19283
|
// performing validation.
|
|
19265
19284
|
e = I(e)) || e instanceof xc ? Yc(u, "updateDoc", t._key, e, n, r) : Hc(u, "updateDoc", t._key, e)).toMutation(t._key, Sn.exists(!0)) ]);
|
|
@@ -19271,8 +19290,8 @@ function Hl(t, e, n) {
|
|
|
19271
19290
|
* @param reference - A reference to the document to delete.
|
|
19272
19291
|
* @returns A Promise resolved once the document has been successfully
|
|
19273
19292
|
* deleted from the backend (note that it won't resolve while you're offline).
|
|
19274
|
-
*/ function
|
|
19275
|
-
return
|
|
19293
|
+
*/ function Xl(t) {
|
|
19294
|
+
return th(Xa(t.firestore, dc), [ new qn(t._key, Sn.none()) ]);
|
|
19276
19295
|
}
|
|
19277
19296
|
|
|
19278
19297
|
/**
|
|
@@ -19284,14 +19303,14 @@ function Hl(t, e, n) {
|
|
|
19284
19303
|
* @returns A `Promise` resolved with a `DocumentReference` pointing to the
|
|
19285
19304
|
* newly created document after it has been written to the backend (Note that it
|
|
19286
19305
|
* won't resolve while you're offline).
|
|
19287
|
-
*/ function
|
|
19288
|
-
var n = Xa(t.firestore, dc), r = uc(t), i =
|
|
19289
|
-
return
|
|
19306
|
+
*/ function Jl(t, e) {
|
|
19307
|
+
var n = Xa(t.firestore, dc), r = uc(t), i = Ol(t.converter, e);
|
|
19308
|
+
return th(n, [ Bc(Uc(t.firestore), "addDoc", r._key, i, null !== t.converter, {}).toMutation(r._key, Sn.exists(!1)) ]).then((function() {
|
|
19290
19309
|
return r;
|
|
19291
19310
|
}));
|
|
19292
19311
|
}
|
|
19293
19312
|
|
|
19294
|
-
function
|
|
19313
|
+
function $l(t) {
|
|
19295
19314
|
for (var e, i, o, u = [], s = 1; s < arguments.length; s++) u[s - 1] = arguments[s];
|
|
19296
19315
|
t = I(t);
|
|
19297
19316
|
var a = {
|
|
@@ -19308,14 +19327,14 @@ function Jl(t) {
|
|
|
19308
19327
|
}
|
|
19309
19328
|
if (t instanceof ec) h = Xa(t.firestore, dc), f = Qe(t._key.path), l = {
|
|
19310
19329
|
next: function(e) {
|
|
19311
|
-
u[c] && u[c](
|
|
19330
|
+
u[c] && u[c](eh(h, t, e));
|
|
19312
19331
|
},
|
|
19313
19332
|
error: u[c + 1],
|
|
19314
19333
|
complete: u[c + 2]
|
|
19315
19334
|
}; else {
|
|
19316
19335
|
var v = Xa(t, nc);
|
|
19317
19336
|
h = Xa(v.firestore, dc), f = v._query;
|
|
19318
|
-
var y = new
|
|
19337
|
+
var y = new Kl(h);
|
|
19319
19338
|
l = {
|
|
19320
19339
|
next: function(t) {
|
|
19321
19340
|
u[c] && u[c](new fl(h, y, v, t));
|
|
@@ -19358,7 +19377,7 @@ function Jl(t) {
|
|
|
19358
19377
|
}(yc(h), f, d, l);
|
|
19359
19378
|
}
|
|
19360
19379
|
|
|
19361
|
-
function
|
|
19380
|
+
function Zl(t, e) {
|
|
19362
19381
|
return function(t, e) {
|
|
19363
19382
|
var i = this, o = new Aa(e);
|
|
19364
19383
|
return t.asyncQueue.enqueueAndForget((function() {
|
|
@@ -19420,7 +19439,7 @@ function $l(t, e) {
|
|
|
19420
19439
|
/**
|
|
19421
19440
|
* Locally writes `mutations` on the async queue.
|
|
19422
19441
|
* @internal
|
|
19423
|
-
*/ function
|
|
19442
|
+
*/ function th(t, e) {
|
|
19424
19443
|
return function(t, e) {
|
|
19425
19444
|
var i = this, o = new X;
|
|
19426
19445
|
return t.asyncQueue.enqueueAndForget((function() {
|
|
@@ -19443,8 +19462,8 @@ function $l(t, e) {
|
|
|
19443
19462
|
/**
|
|
19444
19463
|
* Converts a {@link ViewSnapshot} that contains the single document specified by `ref`
|
|
19445
19464
|
* to a {@link DocumentSnapshot}.
|
|
19446
|
-
*/ function
|
|
19447
|
-
var r = n.docs.get(e._key), i = new
|
|
19465
|
+
*/ function eh(t, e, n) {
|
|
19466
|
+
var r = n.docs.get(e._key), i = new Kl(t);
|
|
19448
19467
|
return new ll(t, i, e._key, r, new cl(n.hasPendingWrites, n.fromCache), e.converter);
|
|
19449
19468
|
}
|
|
19450
19469
|
|
|
@@ -19470,7 +19489,7 @@ function $l(t, e) {
|
|
|
19470
19489
|
* The `Transaction` object passed to a transaction's `updateFunction` provides
|
|
19471
19490
|
* the methods to read and write data within the transaction context. See
|
|
19472
19491
|
* {@link runTransaction}.
|
|
19473
|
-
*/ var
|
|
19492
|
+
*/ var nh, rh = /** @class */ function(e) {
|
|
19474
19493
|
// This class implements the same logic as the Transaction API in the Lite SDK
|
|
19475
19494
|
// but is subclassed in order to return its own DocumentSnapshot types.
|
|
19476
19495
|
/** @hideconstructor */
|
|
@@ -19484,7 +19503,7 @@ function $l(t, e) {
|
|
|
19484
19503
|
* @param documentRef - A reference to the document to be read.
|
|
19485
19504
|
* @returns A `DocumentSnapshot` with the read data.
|
|
19486
19505
|
*/ return t(n, e), n.prototype.get = function(t) {
|
|
19487
|
-
var n = this, r =
|
|
19506
|
+
var n = this, r = Ul(t, this._firestore), i = new Kl(this._firestore);
|
|
19488
19507
|
return e.prototype.get.call(this, t).then((function(t) {
|
|
19489
19508
|
return new ll(n._firestore, i, r._key, t._document, new cl(
|
|
19490
19509
|
/* hasPendingWrites= */ !1,
|
|
@@ -19503,7 +19522,7 @@ function $l(t, e) {
|
|
|
19503
19522
|
*/;
|
|
19504
19523
|
}
|
|
19505
19524
|
return t.prototype.get = function(t) {
|
|
19506
|
-
var e = this, n =
|
|
19525
|
+
var e = this, n = Ul(t, this._firestore), r = new Fl(this._firestore);
|
|
19507
19526
|
return this._transaction.lookup([ n._key ]).then((function(t) {
|
|
19508
19527
|
if (!t || 1 !== t.length) return j();
|
|
19509
19528
|
var i = t[0];
|
|
@@ -19512,11 +19531,11 @@ function $l(t, e) {
|
|
|
19512
19531
|
throw j();
|
|
19513
19532
|
}));
|
|
19514
19533
|
}, t.prototype.set = function(t, e, n) {
|
|
19515
|
-
var r =
|
|
19534
|
+
var r = Ul(t, this._firestore), i = Ol(r.converter, e, n), o = Bc(this._dataReader, "Transaction.set", r._key, i, null !== r.converter, n);
|
|
19516
19535
|
return this._transaction.set(r._key, o), this;
|
|
19517
19536
|
}, t.prototype.update = function(t, e, n) {
|
|
19518
19537
|
for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
|
|
19519
|
-
var o, u =
|
|
19538
|
+
var o, u = Ul(t, this._firestore);
|
|
19520
19539
|
// For Compat types, we have to "extract" the underlying types before
|
|
19521
19540
|
// performing validation.
|
|
19522
19541
|
return o = "string" == typeof (e = I(e)) || e instanceof xc ? Yc(this._dataReader, "Transaction.update", u._key, e, n, r) : Hc(this._dataReader, "Transaction.update", u._key, e),
|
|
@@ -19529,7 +19548,7 @@ function $l(t, e) {
|
|
|
19529
19548
|
* @returns This `Transaction` instance. Used for chaining method calls.
|
|
19530
19549
|
*/
|
|
19531
19550
|
t.prototype.delete = function(t) {
|
|
19532
|
-
var e =
|
|
19551
|
+
var e = Ul(t, this._firestore);
|
|
19533
19552
|
return this._transaction.delete(e._key), this;
|
|
19534
19553
|
}, t;
|
|
19535
19554
|
}());
|
|
@@ -19550,11 +19569,15 @@ function $l(t, e) {
|
|
|
19550
19569
|
* (the `updateFunction` returned a failed promise), the promise returned by the
|
|
19551
19570
|
* `updateFunction `is returned here. Otherwise, if the transaction failed, a
|
|
19552
19571
|
* rejected promise with the corresponding failure error is returned.
|
|
19553
|
-
*/ function
|
|
19554
|
-
|
|
19555
|
-
|
|
19572
|
+
*/ function ih(t, e, i) {
|
|
19573
|
+
t = Xa(t, dc);
|
|
19574
|
+
var o = Object.assign(Object.assign({}, Vl), i);
|
|
19575
|
+
return function(t) {
|
|
19576
|
+
if (t.maxAttempts < 1) throw new Y(H.INVALID_ARGUMENT, "Max attempts must be at least 1");
|
|
19577
|
+
}(o), function(t, e, i) {
|
|
19578
|
+
var o = this, u = new X;
|
|
19556
19579
|
return t.asyncQueue.enqueueAndForget((function() {
|
|
19557
|
-
return n(
|
|
19580
|
+
return n(o, void 0, void 0, (function() {
|
|
19558
19581
|
var n;
|
|
19559
19582
|
return r(this, (function(r) {
|
|
19560
19583
|
switch (r.label) {
|
|
@@ -19566,14 +19589,14 @@ function $l(t, e) {
|
|
|
19566
19589
|
}(t) ];
|
|
19567
19590
|
|
|
19568
19591
|
case 1:
|
|
19569
|
-
return n = r.sent(), new ka(t.asyncQueue, n, e,
|
|
19592
|
+
return n = r.sent(), new ka(t.asyncQueue, n, i, e, u).run(), [ 2 /*return*/ ];
|
|
19570
19593
|
}
|
|
19571
19594
|
}));
|
|
19572
19595
|
}));
|
|
19573
|
-
})),
|
|
19574
|
-
}(yc(t
|
|
19575
|
-
return e(new
|
|
19576
|
-
}));
|
|
19596
|
+
})), u.promise;
|
|
19597
|
+
}(yc(t), (function(n) {
|
|
19598
|
+
return e(new rh(t, n));
|
|
19599
|
+
}), o);
|
|
19577
19600
|
}
|
|
19578
19601
|
|
|
19579
19602
|
/**
|
|
@@ -19595,14 +19618,14 @@ function $l(t, e) {
|
|
|
19595
19618
|
/**
|
|
19596
19619
|
* Returns a sentinel for use with {@link @firebase/firestore/lite#(updateDoc:1)} or
|
|
19597
19620
|
* {@link @firebase/firestore/lite#(setDoc:1)} with `{merge: true}` to mark a field for deletion.
|
|
19598
|
-
*/ function
|
|
19621
|
+
*/ function oh() {
|
|
19599
19622
|
return new Kc("deleteField");
|
|
19600
19623
|
}
|
|
19601
19624
|
|
|
19602
19625
|
/**
|
|
19603
19626
|
* Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to
|
|
19604
19627
|
* include a server-generated timestamp in the written data.
|
|
19605
|
-
*/ function
|
|
19628
|
+
*/ function uh() {
|
|
19606
19629
|
return new jc("serverTimestamp");
|
|
19607
19630
|
}
|
|
19608
19631
|
|
|
@@ -19617,7 +19640,7 @@ function $l(t, e) {
|
|
|
19617
19640
|
* @param elements - The elements to union into the array.
|
|
19618
19641
|
* @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
|
|
19619
19642
|
* `updateDoc()`.
|
|
19620
|
-
*/ function
|
|
19643
|
+
*/ function sh() {
|
|
19621
19644
|
for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
|
|
19622
19645
|
// NOTE: We don't actually parse the data until it's used in set() or
|
|
19623
19646
|
// update() since we'd need the Firestore instance to do this.
|
|
@@ -19634,7 +19657,7 @@ function $l(t, e) {
|
|
|
19634
19657
|
* @param elements - The elements to remove from the array.
|
|
19635
19658
|
* @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
|
|
19636
19659
|
* `updateDoc()`
|
|
19637
|
-
*/ function
|
|
19660
|
+
*/ function ah() {
|
|
19638
19661
|
for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
|
|
19639
19662
|
// NOTE: We don't actually parse the data until it's used in set() or
|
|
19640
19663
|
// update() since we'd need the Firestore instance to do this.
|
|
@@ -19659,7 +19682,7 @@ function $l(t, e) {
|
|
|
19659
19682
|
* @param n - The value to increment by.
|
|
19660
19683
|
* @returns The `FieldValue` sentinel for use in a call to `setDoc()` or
|
|
19661
19684
|
* `updateDoc()`
|
|
19662
|
-
*/ function
|
|
19685
|
+
*/ function ch(t) {
|
|
19663
19686
|
return new Wc("increment", t);
|
|
19664
19687
|
}
|
|
19665
19688
|
|
|
@@ -19689,9 +19712,9 @@ function $l(t, e) {
|
|
|
19689
19712
|
*
|
|
19690
19713
|
* @returns A {@link WriteBatch} that can be used to atomically execute multiple
|
|
19691
19714
|
* writes.
|
|
19692
|
-
*/ function
|
|
19693
|
-
return yc(t = Xa(t, dc)), new
|
|
19694
|
-
return
|
|
19715
|
+
*/ function lh(t) {
|
|
19716
|
+
return yc(t = Xa(t, dc)), new ql(t, (function(e) {
|
|
19717
|
+
return th(t, e);
|
|
19695
19718
|
}))
|
|
19696
19719
|
/**
|
|
19697
19720
|
* @license
|
|
@@ -19711,7 +19734,7 @@ function $l(t, e) {
|
|
|
19711
19734
|
*/;
|
|
19712
19735
|
}
|
|
19713
19736
|
|
|
19714
|
-
function
|
|
19737
|
+
function hh(t, e) {
|
|
19715
19738
|
yc(t = Xa(t, dc));
|
|
19716
19739
|
var n = "string" == typeof e ? function(t) {
|
|
19717
19740
|
try {
|
|
@@ -19723,9 +19746,9 @@ function lh(t, e) {
|
|
|
19723
19746
|
// PORTING NOTE: We don't return an error if the user has not enabled
|
|
19724
19747
|
// persistence since `enableIndexeddbPersistence()` can fail on the Web.
|
|
19725
19748
|
if (Array.isArray(n.indexes)) for (var i = 0, o = n.indexes; i < o.length; i++) {
|
|
19726
|
-
var u = o[i], s =
|
|
19749
|
+
var u = o[i], s = fh(u, "collectionGroup"), a = [];
|
|
19727
19750
|
if (Array.isArray(u.fields)) for (var c = 0, l = u.fields; c < l.length; c++) {
|
|
19728
|
-
var h = l[c], f = rl("setIndexConfiguration",
|
|
19751
|
+
var h = l[c], f = rl("setIndexConfiguration", fh(h, "fieldPath"));
|
|
19729
19752
|
"CONTAINS" === h.arrayConfig ? a.push(new le(f, 2 /* CONTAINS */)) : "ASCENDING" === h.order ? a.push(new le(f, 0 /* ASCENDING */)) : "DESCENDING" === h.order && a.push(new le(f, 1 /* DESCENDING */));
|
|
19730
19753
|
}
|
|
19731
19754
|
r.push(new se(se.UNKNOWN_ID, s, a, he.empty()));
|
|
@@ -19734,7 +19757,7 @@ function lh(t, e) {
|
|
|
19734
19757
|
return Promise.resolve();
|
|
19735
19758
|
}
|
|
19736
19759
|
|
|
19737
|
-
function
|
|
19760
|
+
function fh(t, e) {
|
|
19738
19761
|
if ("string" != typeof t[e]) throw new Y(H.INVALID_ARGUMENT, "Missing string value for: " + e);
|
|
19739
19762
|
return t[e];
|
|
19740
19763
|
}
|
|
@@ -19743,14 +19766,14 @@ function hh(t, e) {
|
|
|
19743
19766
|
* Cloud Firestore
|
|
19744
19767
|
*
|
|
19745
19768
|
* @packageDocumentation
|
|
19746
|
-
*/ void 0 ===
|
|
19769
|
+
*/ void 0 === nh && (nh = !0), P = i, o(new c("firestore", (function(t, e) {
|
|
19747
19770
|
var n = e.options, r = t.getProvider("app").getImmediate(), i = new dc(r, new tt(t.getProvider("auth-internal")), new it(t.getProvider("app-check-internal")));
|
|
19748
19771
|
return n = Object.assign({
|
|
19749
|
-
useFetchStreams:
|
|
19772
|
+
useFetchStreams: nh
|
|
19750
19773
|
}, n), i._setSettings(n), i;
|
|
19751
|
-
}), "PUBLIC")), u(L, "3.4.8-canary.
|
|
19774
|
+
}), "PUBLIC")), u(L, "3.4.8-canary.6ceff4db0", void 0),
|
|
19752
19775
|
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
|
19753
|
-
u(L, "3.4.8-canary.
|
|
19776
|
+
u(L, "3.4.8-canary.6ceff4db0", "esm5");
|
|
19754
19777
|
|
|
19755
|
-
export {
|
|
19778
|
+
export { Pl as AbstractUserDataWriter, kc as Bytes, fc as CACHE_SIZE_UNLIMITED, rc as CollectionReference, ec as DocumentReference, ll as DocumentSnapshot, xc as FieldPath, Mc as FieldValue, dc as Firestore, Y as FirestoreError, Rc as GeoPoint, hc as LoadBundleTask, nc as Query, yl as QueryConstraint, hl as QueryDocumentSnapshot, fl as QuerySnapshot, cl as SnapshotMetadata, ft as Timestamp, rh as Transaction, ql as WriteBatch, Mt as _DatabaseId, Pt as _DocumentKey, ot as _EmptyAppCheckTokenProvider, $ as _EmptyAuthCredentialsProvider, bt as _FieldPath, Xa as _cast, Q as _debugAssert, Et as _isBase64Available, K as _logWarn, hh as _setIndexConfiguration, Qa as _validateIsNotUsedTogether, Jl as addDoc, ah as arrayRemove, sh as arrayUnion, Ic as clearIndexedDbPersistence, ic as collection, oc as collectionGroup, tc as connectFirestoreEmulator, Xl as deleteDoc, oh as deleteField, Sc as disableNetwork, uc as doc, Cc as documentId, gc as enableIndexedDbPersistence, wc as enableMultiTabIndexedDbPersistence, Tc as enableNetwork, Cl as endAt, xl as endBefore, yc as ensureFirestoreConfigured, th as executeWrite, Bl as getDoc, Gl as getDocFromCache, jl as getDocFromServer, zl as getDocs, Ql as getDocsFromCache, Wl as getDocsFromServer, vc as getFirestore, ch as increment, pc as initializeFirestore, Tl as limit, Sl as limitToLast, Nc as loadBundle, Dc as namedQuery, $l as onSnapshot, Zl as onSnapshotsInSync, Il as orderBy, ml as query, ac as queryEqual, sc as refEqual, ih as runTransaction, uh as serverTimestamp, Hl as setDoc, q as setLogLevel, pl as snapshotEqual, Dl as startAfter, Nl as startAt, _c as terminate, Yl as updateDoc, Ec as waitForPendingWrites, wl as where, lh as writeBatch };
|
|
19756
19779
|
//# sourceMappingURL=index.esm5.js.map
|