@firebase/firestore 3.4.3 → 3.4.4-canary.aaeab08ac
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/firestore/src/api/database.d.ts +14 -9
- package/dist/firestore/src/api/index_configuration.d.ts +117 -0
- package/dist/firestore/src/api.d.ts +1 -0
- package/dist/firestore/src/core/firestore_client.d.ts +2 -0
- package/dist/firestore/src/local/local_serializer.d.ts +1 -1
- package/dist/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
- package/dist/firestore/src/model/document.d.ts +7 -0
- package/dist/firestore/src/model/document_key.d.ts +1 -0
- package/dist/firestore/src/model/field_index.d.ts +152 -0
- package/dist/firestore/test/integration/api/index_configuration.test.d.ts +17 -0
- package/dist/firestore/test/unit/local/test_remote_document_cache.d.ts +1 -1
- package/dist/firestore/test/unit/model/field_index.test.d.ts +17 -0
- package/dist/firestore/test/util/helpers.d.ts +6 -0
- package/dist/index.d.ts +15 -9
- package/dist/index.esm2017.js +1204 -1052
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +1862 -1720
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +308 -75
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +308 -76
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +1204 -1052
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +131 -21
- package/dist/lite/firestore/src/api/database.d.ts +14 -9
- package/dist/lite/firestore/src/api/index_configuration.d.ts +117 -0
- package/dist/lite/firestore/src/api.d.ts +1 -0
- package/dist/lite/firestore/src/core/firestore_client.d.ts +2 -0
- package/dist/lite/firestore/src/local/local_serializer.d.ts +1 -1
- package/dist/lite/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
- package/dist/lite/firestore/src/model/document.d.ts +7 -0
- package/dist/lite/firestore/src/model/document_key.d.ts +1 -0
- package/dist/lite/firestore/src/model/field_index.d.ts +152 -0
- package/dist/lite/firestore/test/integration/api/index_configuration.test.d.ts +17 -0
- package/dist/lite/firestore/test/unit/local/test_remote_document_cache.d.ts +1 -1
- package/dist/lite/firestore/test/unit/model/field_index.test.d.ts +17 -0
- package/dist/lite/firestore/test/util/helpers.d.ts +6 -0
- package/dist/lite/index.browser.esm2017.js +76 -69
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +52 -47
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.node.cjs.js +16 -8
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +16 -8
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +95 -88
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +8 -0
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +19 -19
- package/dist/lite/packages/firestore/src/api/database.d.ts +14 -9
- package/dist/lite/packages/firestore/src/api/index_configuration.d.ts +117 -0
- package/dist/lite/packages/firestore/src/api.d.ts +1 -0
- package/dist/lite/packages/firestore/src/core/firestore_client.d.ts +2 -0
- package/dist/lite/packages/firestore/src/local/local_serializer.d.ts +1 -1
- package/dist/lite/packages/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
- package/dist/lite/packages/firestore/src/model/document.d.ts +7 -0
- package/dist/lite/packages/firestore/src/model/document_key.d.ts +1 -0
- package/dist/lite/packages/firestore/src/model/field_index.d.ts +152 -0
- package/dist/lite/packages/firestore/test/integration/api/index_configuration.test.d.ts +17 -0
- package/dist/lite/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +1 -1
- package/dist/lite/packages/firestore/test/unit/model/field_index.test.d.ts +17 -0
- package/dist/lite/packages/firestore/test/util/helpers.d.ts +6 -0
- package/dist/lite/private.d.ts +7 -0
- package/dist/packages/firestore/dist/index.esm2017.d.ts +34 -12
- package/dist/packages/firestore/src/api/database.d.ts +14 -9
- package/dist/packages/firestore/src/api/index_configuration.d.ts +117 -0
- package/dist/packages/firestore/src/api.d.ts +1 -0
- package/dist/packages/firestore/src/core/firestore_client.d.ts +2 -0
- package/dist/packages/firestore/src/local/local_serializer.d.ts +1 -1
- package/dist/packages/firestore/src/local/remote_document_change_buffer.d.ts +3 -12
- package/dist/packages/firestore/src/model/document.d.ts +7 -0
- package/dist/packages/firestore/src/model/document_key.d.ts +1 -0
- package/dist/packages/firestore/src/model/field_index.d.ts +152 -0
- package/dist/packages/firestore/test/integration/api/index_configuration.test.d.ts +17 -0
- package/dist/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +1 -1
- package/dist/packages/firestore/test/unit/model/field_index.test.d.ts +17 -0
- package/dist/packages/firestore/test/util/helpers.d.ts +6 -0
- package/dist/private.d.ts +34 -21
- package/package.json +10 -10
|
@@ -66,7 +66,7 @@ f.MOCK_USER = new f("mock-user");
|
|
|
66
66
|
* See the License for the specific language governing permissions and
|
|
67
67
|
* limitations under the License.
|
|
68
68
|
*/
|
|
69
|
-
let d = "9.6.
|
|
69
|
+
let d = "9.6.5-canary.aaeab08ac";
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
@@ -178,7 +178,7 @@ function y(t, ...n) {
|
|
|
178
178
|
* Returns `never` and can be used in expressions:
|
|
179
179
|
* @example
|
|
180
180
|
* let futureVar = fail('not implemented yet');
|
|
181
|
-
*/ function
|
|
181
|
+
*/ function b(t = "Unexpected state") {
|
|
182
182
|
// Log the failure in addition to throw an exception, just in case the
|
|
183
183
|
// exception is swallowed.
|
|
184
184
|
const n = `FIRESTORE (${d}) INTERNAL ASSERTION FAILED: ` + t;
|
|
@@ -193,8 +193,8 @@ function y(t, ...n) {
|
|
|
193
193
|
* given message if it did.
|
|
194
194
|
*
|
|
195
195
|
* Messages are stripped in production builds.
|
|
196
|
-
*/ function
|
|
197
|
-
t ||
|
|
196
|
+
*/ function v(t, n) {
|
|
197
|
+
t || b();
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
/**
|
|
@@ -335,7 +335,7 @@ n) {
|
|
|
335
335
|
}));
|
|
336
336
|
}
|
|
337
337
|
getToken() {
|
|
338
|
-
return this.auth ? this.auth.getToken().then((t => t ? (
|
|
338
|
+
return this.auth ? this.auth.getToken().then((t => t ? (v("string" == typeof t.accessToken),
|
|
339
339
|
new M(t.accessToken, new f(this.auth.getUid()))) : null)) : Promise.resolve(null);
|
|
340
340
|
}
|
|
341
341
|
invalidateToken() {}
|
|
@@ -389,7 +389,7 @@ class Y {
|
|
|
389
389
|
}));
|
|
390
390
|
}
|
|
391
391
|
getToken() {
|
|
392
|
-
return this.appCheck ? this.appCheck.getToken().then((t => t ? (
|
|
392
|
+
return this.appCheck ? this.appCheck.getToken().then((t => t ? (v("string" == typeof t.token),
|
|
393
393
|
new Y(t.token)) : null)) : Promise.resolve(null);
|
|
394
394
|
}
|
|
395
395
|
invalidateToken() {}
|
|
@@ -479,7 +479,7 @@ class J {
|
|
|
479
479
|
*/
|
|
480
480
|
class X {
|
|
481
481
|
constructor(t, n, e) {
|
|
482
|
-
void 0 === n ? n = 0 : n > t.length &&
|
|
482
|
+
void 0 === n ? n = 0 : n > t.length && b(), void 0 === e ? e = t.length - n : e > t.length - n && b(),
|
|
483
483
|
this.segments = t, this.offset = n, this.len = e;
|
|
484
484
|
}
|
|
485
485
|
get length() {
|
|
@@ -675,6 +675,9 @@ const tt = /^[_a-zA-Z][_a-zA-Z0-9]*$/;
|
|
|
675
675
|
static fromName(t) {
|
|
676
676
|
return new et(Z.fromString(t).popFirst(5));
|
|
677
677
|
}
|
|
678
|
+
static empty() {
|
|
679
|
+
return new et(Z.emptyPath());
|
|
680
|
+
}
|
|
678
681
|
/** Returns true if the document is in the specified collectionId. */ hasCollectionId(t) {
|
|
679
682
|
return this.path.length >= 2 && this.path.get(this.path.length - 2) === t;
|
|
680
683
|
}
|
|
@@ -769,7 +772,7 @@ function ot(t) {
|
|
|
769
772
|
return n ? `a custom ${n} object` : "an object";
|
|
770
773
|
}
|
|
771
774
|
}
|
|
772
|
-
return "function" == typeof t ? "a function" :
|
|
775
|
+
return "function" == typeof t ? "a function" : b();
|
|
773
776
|
}
|
|
774
777
|
|
|
775
778
|
function ut(t,
|
|
@@ -1178,7 +1181,7 @@ function _t(t, n) {
|
|
|
1178
1181
|
* For examples and further specifications, refer to the
|
|
1179
1182
|
* {@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto | Timestamp definition}.
|
|
1180
1183
|
*/
|
|
1181
|
-
class
|
|
1184
|
+
class bt {
|
|
1182
1185
|
/**
|
|
1183
1186
|
* Creates a new timestamp.
|
|
1184
1187
|
*
|
|
@@ -1210,7 +1213,7 @@ class vt {
|
|
|
1210
1213
|
*
|
|
1211
1214
|
* @returns a new timestamp representing the current date.
|
|
1212
1215
|
*/ static now() {
|
|
1213
|
-
return
|
|
1216
|
+
return bt.fromMillis(Date.now());
|
|
1214
1217
|
}
|
|
1215
1218
|
/**
|
|
1216
1219
|
* Creates a new timestamp from the given date.
|
|
@@ -1219,7 +1222,7 @@ class vt {
|
|
|
1219
1222
|
* @returns A new `Timestamp` representing the same point in time as the given
|
|
1220
1223
|
* date.
|
|
1221
1224
|
*/ static fromDate(t) {
|
|
1222
|
-
return
|
|
1225
|
+
return bt.fromMillis(t.getTime());
|
|
1223
1226
|
}
|
|
1224
1227
|
/**
|
|
1225
1228
|
* Creates a new timestamp from the given number of milliseconds.
|
|
@@ -1230,7 +1233,7 @@ class vt {
|
|
|
1230
1233
|
* number of milliseconds.
|
|
1231
1234
|
*/ static fromMillis(t) {
|
|
1232
1235
|
const n = Math.floor(t / 1e3), e = Math.floor(1e6 * (t - 1e3 * n));
|
|
1233
|
-
return new
|
|
1236
|
+
return new bt(n, e);
|
|
1234
1237
|
}
|
|
1235
1238
|
/**
|
|
1236
1239
|
* Converts a `Timestamp` to a JavaScript `Date` object. This conversion
|
|
@@ -1308,15 +1311,15 @@ class vt {
|
|
|
1308
1311
|
/**
|
|
1309
1312
|
* A version of a document in Firestore. This corresponds to the version
|
|
1310
1313
|
* timestamp, such as update_time or read_time.
|
|
1311
|
-
*/ class
|
|
1314
|
+
*/ class vt {
|
|
1312
1315
|
constructor(t) {
|
|
1313
1316
|
this.timestamp = t;
|
|
1314
1317
|
}
|
|
1315
1318
|
static fromTimestamp(t) {
|
|
1316
|
-
return new
|
|
1319
|
+
return new vt(t);
|
|
1317
1320
|
}
|
|
1318
1321
|
static min() {
|
|
1319
|
-
return new
|
|
1322
|
+
return new vt(new bt(0, 0));
|
|
1320
1323
|
}
|
|
1321
1324
|
compareTo(t) {
|
|
1322
1325
|
return this.timestamp._compareTo(t.timestamp);
|
|
@@ -1550,13 +1553,13 @@ const Pt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
|
1550
1553
|
// The json interface (for the browser) will return an iso timestamp string,
|
|
1551
1554
|
// while the proto js library (for node) will return a
|
|
1552
1555
|
// google.protobuf.Timestamp instance.
|
|
1553
|
-
if (
|
|
1556
|
+
if (v(!!t), "string" == typeof t) {
|
|
1554
1557
|
// The date string can have higher precision (nanos) than the Date class
|
|
1555
1558
|
// (millis), so we do some custom parsing here.
|
|
1556
1559
|
// Parse the nanos right out of the string.
|
|
1557
1560
|
let n = 0;
|
|
1558
1561
|
const e = Pt.exec(t);
|
|
1559
|
-
if (
|
|
1562
|
+
if (v(!!e), e[1]) {
|
|
1560
1563
|
// Pad the fraction out to 9 digits (nanos).
|
|
1561
1564
|
let t = e[1];
|
|
1562
1565
|
t = (t + "000000000").substr(0, 9), n = Number(t);
|
|
@@ -1638,7 +1641,7 @@ const Pt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
|
1638
1641
|
* Returns the local time at which this timestamp was first set.
|
|
1639
1642
|
*/ function Ft(t) {
|
|
1640
1643
|
const n = Vt(t.mapValue.fields.__local_write_time__.timestampValue);
|
|
1641
|
-
return new
|
|
1644
|
+
return new bt(n.seconds, n.nanos);
|
|
1642
1645
|
}
|
|
1643
1646
|
|
|
1644
1647
|
/**
|
|
@@ -1658,7 +1661,7 @@ const Pt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
|
1658
1661
|
* limitations under the License.
|
|
1659
1662
|
*/
|
|
1660
1663
|
/** Extracts the backend's type order for the provided value. */ function xt(t) {
|
|
1661
|
-
return "nullValue" in t ? 0 /* NullValue */ : "booleanValue" in t ? 1 /* BooleanValue */ : "integerValue" in t || "doubleValue" in t ? 2 /* NumberValue */ : "timestampValue" in t ? 3 /* TimestampValue */ : "stringValue" in t ? 5 /* StringValue */ : "bytesValue" in t ? 6 /* BlobValue */ : "referenceValue" in t ? 7 /* RefValue */ : "geoPointValue" in t ? 8 /* GeoPointValue */ : "arrayValue" in t ? 9 /* ArrayValue */ : "mapValue" in t ? $t(t) ? 4 /* ServerTimestampValue */ : 10 /* ObjectValue */ :
|
|
1664
|
+
return "nullValue" in t ? 0 /* NullValue */ : "booleanValue" in t ? 1 /* BooleanValue */ : "integerValue" in t || "doubleValue" in t ? 2 /* NumberValue */ : "timestampValue" in t ? 3 /* TimestampValue */ : "stringValue" in t ? 5 /* StringValue */ : "bytesValue" in t ? 6 /* BlobValue */ : "referenceValue" in t ? 7 /* RefValue */ : "geoPointValue" in t ? 8 /* GeoPointValue */ : "arrayValue" in t ? 9 /* ArrayValue */ : "mapValue" in t ? $t(t) ? 4 /* ServerTimestampValue */ : 10 /* ObjectValue */ : b();
|
|
1662
1665
|
}
|
|
1663
1666
|
|
|
1664
1667
|
/** Tests `left` and `right` for equality based on the backend semantics. */ function qt(t, n) {
|
|
@@ -1723,7 +1726,7 @@ const Pt = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
|
1723
1726
|
/** Returns true if the ArrayValue contains the specified element. */ (t, n);
|
|
1724
1727
|
|
|
1725
1728
|
default:
|
|
1726
|
-
return
|
|
1729
|
+
return b();
|
|
1727
1730
|
}
|
|
1728
1731
|
}
|
|
1729
1732
|
|
|
@@ -1811,7 +1814,7 @@ function Ct(t, n) {
|
|
|
1811
1814
|
/** Returns a reference value for the provided database and key. */ (t.mapValue, n.mapValue);
|
|
1812
1815
|
|
|
1813
1816
|
default:
|
|
1814
|
-
throw
|
|
1817
|
+
throw b();
|
|
1815
1818
|
}
|
|
1816
1819
|
}
|
|
1817
1820
|
|
|
@@ -2005,30 +2008,31 @@ function kt(t, n) {
|
|
|
2005
2008
|
* applied, `isValidDocument()` returns false and the document should be removed
|
|
2006
2009
|
* from all views.
|
|
2007
2010
|
*/ class Gt {
|
|
2008
|
-
constructor(t, n, e, r, s) {
|
|
2009
|
-
this.key = t, this.documentType = n, this.version = e, this.
|
|
2011
|
+
constructor(t, n, e, r, s, i) {
|
|
2012
|
+
this.key = t, this.documentType = n, this.version = e, this.readTime = r, this.data = s,
|
|
2013
|
+
this.documentState = i;
|
|
2010
2014
|
}
|
|
2011
2015
|
/**
|
|
2012
2016
|
* Creates a document with no known version or data, but which can serve as
|
|
2013
2017
|
* base document for mutations.
|
|
2014
2018
|
*/ static newInvalidDocument(t) {
|
|
2015
|
-
return new Gt(t, 0 /* INVALID */ ,
|
|
2019
|
+
return new Gt(t, 0 /* INVALID */ , vt.min(), vt.min(), Qt.empty(), 0 /* SYNCED */);
|
|
2016
2020
|
}
|
|
2017
2021
|
/**
|
|
2018
2022
|
* Creates a new document that is known to exist with the given data at the
|
|
2019
2023
|
* given version.
|
|
2020
2024
|
*/ static newFoundDocument(t, n, e) {
|
|
2021
|
-
return new Gt(t, 1 /* FOUND_DOCUMENT */ , n, e, 0 /* SYNCED */);
|
|
2025
|
+
return new Gt(t, 1 /* FOUND_DOCUMENT */ , n, vt.min(), e, 0 /* SYNCED */);
|
|
2022
2026
|
}
|
|
2023
2027
|
/** Creates a new document that is known to not exist at the given version. */ static newNoDocument(t, n) {
|
|
2024
|
-
return new Gt(t, 2 /* NO_DOCUMENT */ , n, Qt.empty(), 0 /* SYNCED */);
|
|
2028
|
+
return new Gt(t, 2 /* NO_DOCUMENT */ , n, vt.min(), Qt.empty(), 0 /* SYNCED */);
|
|
2025
2029
|
}
|
|
2026
2030
|
/**
|
|
2027
2031
|
* Creates a new document that is known to exist at the given version but
|
|
2028
2032
|
* whose data is not known (e.g. a document that was updated without a known
|
|
2029
2033
|
* base document).
|
|
2030
2034
|
*/ static newUnknownDocument(t, n) {
|
|
2031
|
-
return new Gt(t, 3 /* UNKNOWN_DOCUMENT */ , n, Qt.empty(), 2 /* HAS_COMMITTED_MUTATIONS */);
|
|
2035
|
+
return new Gt(t, 3 /* UNKNOWN_DOCUMENT */ , n, vt.min(), Qt.empty(), 2 /* HAS_COMMITTED_MUTATIONS */);
|
|
2032
2036
|
}
|
|
2033
2037
|
/**
|
|
2034
2038
|
* Changes the document type to indicate that it exists and that its version
|
|
@@ -2058,6 +2062,9 @@ function kt(t, n) {
|
|
|
2058
2062
|
setHasLocalMutations() {
|
|
2059
2063
|
return this.documentState = 1 /* HAS_LOCAL_MUTATIONS */ , this;
|
|
2060
2064
|
}
|
|
2065
|
+
setReadTime(t) {
|
|
2066
|
+
return this.readTime = t, this;
|
|
2067
|
+
}
|
|
2061
2068
|
get hasLocalMutations() {
|
|
2062
2069
|
return 1 /* HAS_LOCAL_MUTATIONS */ === this.documentState;
|
|
2063
2070
|
}
|
|
@@ -2083,7 +2090,7 @@ function kt(t, n) {
|
|
|
2083
2090
|
return t instanceof Gt && this.key.isEqual(t.key) && this.version.isEqual(t.version) && this.documentType === t.documentType && this.documentState === t.documentState && this.data.isEqual(t.data);
|
|
2084
2091
|
}
|
|
2085
2092
|
mutableCopy() {
|
|
2086
|
-
return new Gt(this.key, this.documentType, this.version, this.data.clone(), this.documentState);
|
|
2093
|
+
return new Gt(this.key, this.documentType, this.version, this.readTime, this.data.clone(), this.documentState);
|
|
2087
2094
|
}
|
|
2088
2095
|
toString() {
|
|
2089
2096
|
return `Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`;
|
|
@@ -2164,7 +2171,7 @@ class Ht extends class {} {
|
|
|
2164
2171
|
return t >= 0;
|
|
2165
2172
|
|
|
2166
2173
|
default:
|
|
2167
|
-
return
|
|
2174
|
+
return b();
|
|
2168
2175
|
}
|
|
2169
2176
|
}
|
|
2170
2177
|
D() {
|
|
@@ -2489,13 +2496,13 @@ function yn(t, n) {
|
|
|
2489
2496
|
|
|
2490
2497
|
/** Transforms a value into a server-generated timestamp. */ class gn extends _n {}
|
|
2491
2498
|
|
|
2492
|
-
/** Transforms an array value via a union operation. */ class
|
|
2499
|
+
/** Transforms an array value via a union operation. */ class bn extends _n {
|
|
2493
2500
|
constructor(t) {
|
|
2494
2501
|
super(), this.elements = t;
|
|
2495
2502
|
}
|
|
2496
2503
|
}
|
|
2497
2504
|
|
|
2498
|
-
/** Transforms an array value via a remove operation. */ class
|
|
2505
|
+
/** Transforms an array value via a remove operation. */ class vn extends _n {
|
|
2499
2506
|
constructor(t) {
|
|
2500
2507
|
super(), this.elements = t;
|
|
2501
2508
|
}
|
|
@@ -2743,9 +2750,9 @@ function qn(t, n) {
|
|
|
2743
2750
|
}
|
|
2744
2751
|
|
|
2745
2752
|
function On(t) {
|
|
2746
|
-
return
|
|
2753
|
+
return v(!!t), vt.fromTimestamp(function(t) {
|
|
2747
2754
|
const n = Vt(t);
|
|
2748
|
-
return new
|
|
2755
|
+
return new bt(n.seconds, n.nanos);
|
|
2749
2756
|
}(t));
|
|
2750
2757
|
}
|
|
2751
2758
|
|
|
@@ -2762,11 +2769,11 @@ function Ln(t, n) {
|
|
|
2762
2769
|
function kn(t, n) {
|
|
2763
2770
|
const e = function(t) {
|
|
2764
2771
|
const n = Z.fromString(t);
|
|
2765
|
-
return
|
|
2772
|
+
return v(Jn(n)), n;
|
|
2766
2773
|
}(n);
|
|
2767
2774
|
if (e.get(1) !== t.databaseId.projectId) throw new U(R, "Tried to deserialize key from different project: " + e.get(1) + " vs " + t.databaseId.projectId);
|
|
2768
2775
|
if (e.get(3) !== t.databaseId.database) throw new U(R, "Tried to deserialize key from different database: " + e.get(3) + " vs " + t.databaseId.database);
|
|
2769
|
-
return new et((
|
|
2776
|
+
return new et((v((r = e).length > 4 && "documents" === r.get(4)), r.popFirst(5)));
|
|
2770
2777
|
var r;
|
|
2771
2778
|
/** Creates a Document proto from key and fields (but no create/update time) */}
|
|
2772
2779
|
|
|
@@ -2787,7 +2794,7 @@ function Mn(t, n, e) {
|
|
|
2787
2794
|
|
|
2788
2795
|
function Bn(t, n) {
|
|
2789
2796
|
return "found" in n ? function(t, n) {
|
|
2790
|
-
|
|
2797
|
+
v(!!n.found), n.found.name, n.found.updateTime;
|
|
2791
2798
|
const e = kn(t, n.found.name), r = On(n.found.updateTime), s = new Qt({
|
|
2792
2799
|
mapValue: {
|
|
2793
2800
|
fields: n.found.fields
|
|
@@ -2795,10 +2802,10 @@ function Bn(t, n) {
|
|
|
2795
2802
|
});
|
|
2796
2803
|
return Gt.newFoundDocument(e, r, s);
|
|
2797
2804
|
}(t, n) : "missing" in n ? function(t, n) {
|
|
2798
|
-
|
|
2805
|
+
v(!!n.missing), v(!!n.readTime);
|
|
2799
2806
|
const e = kn(t, n.missing), r = On(n.readTime);
|
|
2800
2807
|
return Gt.newNoDocument(e, r);
|
|
2801
|
-
}(t, n) :
|
|
2808
|
+
}(t, n) : b();
|
|
2802
2809
|
}
|
|
2803
2810
|
|
|
2804
2811
|
function zn(t, n) {
|
|
@@ -2811,7 +2818,7 @@ function zn(t, n) {
|
|
|
2811
2818
|
update: Mn(t, n.key, n.data),
|
|
2812
2819
|
updateMask: Kn(n.fieldMask)
|
|
2813
2820
|
}; else {
|
|
2814
|
-
if (!(n instanceof Nn)) return
|
|
2821
|
+
if (!(n instanceof Nn)) return b();
|
|
2815
2822
|
e = {
|
|
2816
2823
|
verify: Ln(t, n.key)
|
|
2817
2824
|
};
|
|
@@ -2822,13 +2829,13 @@ function zn(t, n) {
|
|
|
2822
2829
|
fieldPath: n.field.canonicalString(),
|
|
2823
2830
|
setToServerValue: "REQUEST_TIME"
|
|
2824
2831
|
};
|
|
2825
|
-
if (e instanceof
|
|
2832
|
+
if (e instanceof bn) return {
|
|
2826
2833
|
fieldPath: n.field.canonicalString(),
|
|
2827
2834
|
appendMissingElements: {
|
|
2828
2835
|
values: e.elements
|
|
2829
2836
|
}
|
|
2830
2837
|
};
|
|
2831
|
-
if (e instanceof
|
|
2838
|
+
if (e instanceof vn) return {
|
|
2832
2839
|
fieldPath: n.field.canonicalString(),
|
|
2833
2840
|
removeAllFromArray: {
|
|
2834
2841
|
values: e.elements
|
|
@@ -2838,13 +2845,13 @@ function zn(t, n) {
|
|
|
2838
2845
|
fieldPath: n.field.canonicalString(),
|
|
2839
2846
|
increment: e.O
|
|
2840
2847
|
};
|
|
2841
|
-
throw
|
|
2848
|
+
throw b();
|
|
2842
2849
|
}(0, t)))), n.precondition.isNone || (e.currentDocument = function(t, n) {
|
|
2843
2850
|
return void 0 !== n.updateTime ? {
|
|
2844
2851
|
updateTime: qn(t, n.updateTime)
|
|
2845
2852
|
} : void 0 !== n.exists ? {
|
|
2846
2853
|
exists: n.exists
|
|
2847
|
-
} :
|
|
2854
|
+
} : b();
|
|
2848
2855
|
}(t, n.precondition)), e;
|
|
2849
2856
|
}
|
|
2850
2857
|
|
|
@@ -3151,7 +3158,7 @@ async function ee(t, n) {
|
|
|
3151
3158
|
const u = [];
|
|
3152
3159
|
return n.forEach((t => {
|
|
3153
3160
|
const n = o.get(t.toString());
|
|
3154
|
-
|
|
3161
|
+
v(!!n), u.push(n);
|
|
3155
3162
|
})), u;
|
|
3156
3163
|
}
|
|
3157
3164
|
|
|
@@ -3323,7 +3330,7 @@ class oe {
|
|
|
3323
3330
|
case "gapi":
|
|
3324
3331
|
const n = t.client;
|
|
3325
3332
|
// Make sure this really is a Gapi client.
|
|
3326
|
-
return
|
|
3333
|
+
return v(!("object" != typeof n || null === n || !n.auth || !n.auth.getAuthHeaderValueForFirstParty)),
|
|
3327
3334
|
new W(n, t.sessionIndex || "0", t.iamToken || null);
|
|
3328
3335
|
|
|
3329
3336
|
case "provider":
|
|
@@ -3664,7 +3671,7 @@ function ye(t, n, ...e) {
|
|
|
3664
3671
|
*
|
|
3665
3672
|
* Create a `FieldPath` by providing field names. If more than one field
|
|
3666
3673
|
* name is provided, the path will point to a nested field in a document.
|
|
3667
|
-
*/ class
|
|
3674
|
+
*/ class be {
|
|
3668
3675
|
/**
|
|
3669
3676
|
* Creates a `FieldPath` from the provided field names. If more than one field
|
|
3670
3677
|
* name is provided, the path will point to a nested field in a document.
|
|
@@ -3688,8 +3695,8 @@ function ye(t, n, ...e) {
|
|
|
3688
3695
|
/**
|
|
3689
3696
|
* Returns a special sentinel `FieldPath` to refer to the ID of a document.
|
|
3690
3697
|
* It can be used in queries to sort or filter by the document ID.
|
|
3691
|
-
*/ function
|
|
3692
|
-
return new
|
|
3698
|
+
*/ function ve() {
|
|
3699
|
+
return new be("__name__");
|
|
3693
3700
|
}
|
|
3694
3701
|
|
|
3695
3702
|
/**
|
|
@@ -3911,7 +3918,7 @@ function Ve(t) {
|
|
|
3911
3918
|
return !1;
|
|
3912
3919
|
|
|
3913
3920
|
default:
|
|
3914
|
-
throw
|
|
3921
|
+
throw b();
|
|
3915
3922
|
}
|
|
3916
3923
|
}
|
|
3917
3924
|
|
|
@@ -4082,7 +4089,7 @@ class Oe extends Te {
|
|
|
4082
4089
|
}
|
|
4083
4090
|
_toFieldTransform(t) {
|
|
4084
4091
|
const n = xe(this, t,
|
|
4085
|
-
/*array=*/ !0), e = this.lt.map((t => Me(t, n))), r = new
|
|
4092
|
+
/*array=*/ !0), e = this.lt.map((t => Me(t, n))), r = new bn(e);
|
|
4086
4093
|
return new Tn(t.path, r);
|
|
4087
4094
|
}
|
|
4088
4095
|
isEqual(t) {
|
|
@@ -4097,7 +4104,7 @@ class Ce extends Te {
|
|
|
4097
4104
|
}
|
|
4098
4105
|
_toFieldTransform(t) {
|
|
4099
4106
|
const n = xe(this, t,
|
|
4100
|
-
/*array=*/ !0), e = this.lt.map((t => Me(t, n))), r = new
|
|
4107
|
+
/*array=*/ !0), e = this.lt.map((t => Me(t, n))), r = new vn(e);
|
|
4101
4108
|
return new Tn(t.path, r);
|
|
4102
4109
|
}
|
|
4103
4110
|
isEqual(t) {
|
|
@@ -4258,16 +4265,16 @@ class Le extends Te {
|
|
|
4258
4265
|
stringValue: t
|
|
4259
4266
|
};
|
|
4260
4267
|
if (t instanceof Date) {
|
|
4261
|
-
const e =
|
|
4268
|
+
const e = bt.fromDate(t);
|
|
4262
4269
|
return {
|
|
4263
4270
|
timestampValue: Fn(n.q, e)
|
|
4264
4271
|
};
|
|
4265
4272
|
}
|
|
4266
|
-
if (t instanceof
|
|
4273
|
+
if (t instanceof bt) {
|
|
4267
4274
|
// Firestore backend truncates precision down to microseconds. To ensure
|
|
4268
4275
|
// offline mode works the same with regards to truncation, perform the
|
|
4269
4276
|
// truncation immediately without waiting for the backend to do that.
|
|
4270
|
-
const e = new
|
|
4277
|
+
const e = new bt(t.seconds, 1e3 * Math.floor(t.nanoseconds / 1e3));
|
|
4271
4278
|
return {
|
|
4272
4279
|
timestampValue: Fn(n.q, e)
|
|
4273
4280
|
};
|
|
@@ -4318,7 +4325,7 @@ function Be(t, n) {
|
|
|
4318
4325
|
}
|
|
4319
4326
|
|
|
4320
4327
|
function ze(t) {
|
|
4321
|
-
return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof
|
|
4328
|
+
return !("object" != typeof t || null === t || t instanceof Array || t instanceof Date || t instanceof bt || t instanceof Ie || t instanceof Ee || t instanceof fe || t instanceof Te);
|
|
4322
4329
|
}
|
|
4323
4330
|
|
|
4324
4331
|
function Qe(t, n, e) {
|
|
@@ -4336,7 +4343,7 @@ function Qe(t, n, e) {
|
|
|
4336
4343
|
if ((
|
|
4337
4344
|
// If required, replace the FieldPath Compat class with with the firestore-exp
|
|
4338
4345
|
// FieldPath.
|
|
4339
|
-
n = l(n)) instanceof
|
|
4346
|
+
n = l(n)) instanceof be) return n._internalPath;
|
|
4340
4347
|
if ("string" == typeof n) return Ye(t, n);
|
|
4341
4348
|
throw He("Field path arguments must be of type string or ", t,
|
|
4342
4349
|
/* hasConverter= */ !1,
|
|
@@ -4360,7 +4367,7 @@ function Qe(t, n, e) {
|
|
|
4360
4367
|
/* hasConverter= */ !1,
|
|
4361
4368
|
/* path= */ void 0, e);
|
|
4362
4369
|
try {
|
|
4363
|
-
return new
|
|
4370
|
+
return new be(...n.split("."))._internalPath;
|
|
4364
4371
|
} catch (r) {
|
|
4365
4372
|
throw He(`Invalid field path (${n}). Paths must not be empty, begin with '.', end with '.', or contain '..'`, t,
|
|
4366
4373
|
/* hasConverter= */ !1,
|
|
@@ -4533,7 +4540,7 @@ function He(t, n, e, r, s) {
|
|
|
4533
4540
|
/**
|
|
4534
4541
|
* Helper that calls `fromDotSeparatedString()` but wraps any error thrown.
|
|
4535
4542
|
*/ function nr(t, n) {
|
|
4536
|
-
return "string" == typeof n ? Ye(t, n) : n instanceof
|
|
4543
|
+
return "string" == typeof n ? Ye(t, n) : n instanceof be ? n._internalPath : n._delegate._internalPath;
|
|
4537
4544
|
}
|
|
4538
4545
|
|
|
4539
4546
|
/**
|
|
@@ -4603,7 +4610,7 @@ class sr extends er {
|
|
|
4603
4610
|
const e = fn(t);
|
|
4604
4611
|
if (null !== e && !e.isEqual(n.field)) throw new U(R, `Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '${e.toString()}' and '${n.field.toString()}'`);
|
|
4605
4612
|
const r = ln(t);
|
|
4606
|
-
null !== r &&
|
|
4613
|
+
null !== r && br(t, n.field, r);
|
|
4607
4614
|
}
|
|
4608
4615
|
const e = function(t, n) {
|
|
4609
4616
|
for (const e of t.filters) if (n.indexOf(e.op) >= 0) return e.op;
|
|
@@ -4682,7 +4689,7 @@ class or extends er {
|
|
|
4682
4689
|
if (null === ln(t)) {
|
|
4683
4690
|
// This is the first order by. It must match any inequality.
|
|
4684
4691
|
const e = fn(t);
|
|
4685
|
-
null !== e &&
|
|
4692
|
+
null !== e && br(t, e, n.field);
|
|
4686
4693
|
}
|
|
4687
4694
|
}(t, r), r;
|
|
4688
4695
|
}
|
|
@@ -4720,12 +4727,12 @@ class or extends er {
|
|
|
4720
4727
|
|
|
4721
4728
|
class cr extends er {
|
|
4722
4729
|
constructor(t, n, e) {
|
|
4723
|
-
super(), this.type = t, this.gt = n, this.
|
|
4730
|
+
super(), this.type = t, this.gt = n, this.bt = e;
|
|
4724
4731
|
}
|
|
4725
4732
|
_apply(t) {
|
|
4726
4733
|
return new de(t.firestore, t.converter, function(t, n, e) {
|
|
4727
4734
|
return new an(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), n, e, t.startAt, t.endAt);
|
|
4728
|
-
}(t._query, this.gt, this.
|
|
4735
|
+
}(t._query, this.gt, this.bt));
|
|
4729
4736
|
}
|
|
4730
4737
|
}
|
|
4731
4738
|
|
|
@@ -4752,10 +4759,10 @@ class cr extends er {
|
|
|
4752
4759
|
|
|
4753
4760
|
class lr extends er {
|
|
4754
4761
|
constructor(t, n, e) {
|
|
4755
|
-
super(), this.type = t, this.
|
|
4762
|
+
super(), this.type = t, this.vt = n, this.Et = e;
|
|
4756
4763
|
}
|
|
4757
4764
|
_apply(t) {
|
|
4758
|
-
const n = yr(t, this.type, this.
|
|
4765
|
+
const n = yr(t, this.type, this.vt, this.Et);
|
|
4759
4766
|
return new de(t.firestore, t.converter, function(t, n) {
|
|
4760
4767
|
return new an(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, n, t.endAt);
|
|
4761
4768
|
}(t._query, n));
|
|
@@ -4773,10 +4780,10 @@ function dr(...t) {
|
|
|
4773
4780
|
|
|
4774
4781
|
class wr extends er {
|
|
4775
4782
|
constructor(t, n, e) {
|
|
4776
|
-
super(), this.type = t, this.
|
|
4783
|
+
super(), this.type = t, this.vt = n, this.Et = e;
|
|
4777
4784
|
}
|
|
4778
4785
|
_apply(t) {
|
|
4779
|
-
const n = yr(t, this.type, this.
|
|
4786
|
+
const n = yr(t, this.type, this.vt, this.Et);
|
|
4780
4787
|
return new de(t.firestore, t.converter, function(t, n) {
|
|
4781
4788
|
return new an(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, n);
|
|
4782
4789
|
}(t._query, n));
|
|
@@ -4867,7 +4874,7 @@ function _r(t, n, e) {
|
|
|
4867
4874
|
if (t.length > 10) throw new U(R, `Invalid Query. '${n.toString()}' filters support a maximum of 10 elements in the value array.`);
|
|
4868
4875
|
}
|
|
4869
4876
|
|
|
4870
|
-
function
|
|
4877
|
+
function br(t, n, e) {
|
|
4871
4878
|
if (!e.isEqual(n)) throw new U(R, `Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${n.toString()}' and so you must also use '${n.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${e.toString()}' instead.`);
|
|
4872
4879
|
}
|
|
4873
4880
|
|
|
@@ -4918,7 +4925,7 @@ function vr(t, n, e) {
|
|
|
4918
4925
|
* their `set()` or fails due to invalid data originating from a `toFirestore()`
|
|
4919
4926
|
* call.
|
|
4920
4927
|
*/
|
|
4921
|
-
function
|
|
4928
|
+
function vr(t, n, e) {
|
|
4922
4929
|
let r;
|
|
4923
4930
|
// Cast to `any` in order to satisfy the union type constraint on
|
|
4924
4931
|
// toFirestore().
|
|
@@ -4964,7 +4971,7 @@ class Er extends class {
|
|
|
4964
4971
|
return this.convertObject(t.mapValue, n);
|
|
4965
4972
|
|
|
4966
4973
|
default:
|
|
4967
|
-
throw
|
|
4974
|
+
throw b();
|
|
4968
4975
|
}
|
|
4969
4976
|
}
|
|
4970
4977
|
convertObject(t, n) {
|
|
@@ -4994,11 +5001,11 @@ class Er extends class {
|
|
|
4994
5001
|
}
|
|
4995
5002
|
convertTimestamp(t) {
|
|
4996
5003
|
const n = Vt(t);
|
|
4997
|
-
return new
|
|
5004
|
+
return new bt(n.seconds, n.nanos);
|
|
4998
5005
|
}
|
|
4999
5006
|
convertDocumentKey(t, n) {
|
|
5000
5007
|
const e = Z.fromString(t);
|
|
5001
|
-
|
|
5008
|
+
v(Jn(e));
|
|
5002
5009
|
const r = new J(e.get(1), e.get(3)), s = new et(e.popFirst(5));
|
|
5003
5010
|
return r.isEqual(n) ||
|
|
5004
5011
|
// TODO(b/64130202): Somehow support foreign references.
|
|
@@ -5033,7 +5040,7 @@ class Er extends class {
|
|
|
5033
5040
|
*/ function Tr(t) {
|
|
5034
5041
|
const n = ie((t = ut(t, fe)).firestore), e = new Er(t.firestore);
|
|
5035
5042
|
return ee(n, [ t._key ]).then((n => {
|
|
5036
|
-
|
|
5043
|
+
v(1 === n.length);
|
|
5037
5044
|
const r = n[0];
|
|
5038
5045
|
return new Je(t.firestore, e, t._key, r.isFoundDocument() ? r : null, t.converter);
|
|
5039
5046
|
}));
|
|
@@ -5066,7 +5073,7 @@ class Er extends class {
|
|
|
5066
5073
|
}
|
|
5067
5074
|
|
|
5068
5075
|
function Ar(t, n, e) {
|
|
5069
|
-
const r =
|
|
5076
|
+
const r = vr((t = ut(t, fe)).converter, n, e), s = Se($e(t.firestore), "setDoc", t._key, r, null !== t.converter, e);
|
|
5070
5077
|
return ne(ie(t.firestore), [ s.toMutation(t._key, In.none()) ]);
|
|
5071
5078
|
}
|
|
5072
5079
|
|
|
@@ -5075,7 +5082,7 @@ function Rr(t, n, e, ...r) {
|
|
|
5075
5082
|
// For Compat types, we have to "extract" the underlying types before
|
|
5076
5083
|
// performing validation.
|
|
5077
5084
|
let i;
|
|
5078
|
-
i = "string" == typeof (n = l(n)) || n instanceof
|
|
5085
|
+
i = "string" == typeof (n = l(n)) || n instanceof be ? Ue(s, "updateDoc", t._key, n, e, r) : ke(s, "updateDoc", t._key, n);
|
|
5079
5086
|
return ne(ie(t.firestore), [ i.toMutation(t._key, In.exists(!0)) ]);
|
|
5080
5087
|
}
|
|
5081
5088
|
|
|
@@ -5109,7 +5116,7 @@ function Rr(t, n, e, ...r) {
|
|
|
5109
5116
|
* @returns A `Promise` resolved with a `DocumentReference` pointing to the
|
|
5110
5117
|
* newly created document after it has been written to the backend.
|
|
5111
5118
|
*/ function Vr(t, n) {
|
|
5112
|
-
const e = ye(t = ut(t, we)), r =
|
|
5119
|
+
const e = ye(t = ut(t, we)), r = vr(t.converter, n), s = Se($e(t.firestore), "addDoc", e._key, r, null !== e.converter, {});
|
|
5113
5120
|
return ne(ie(t.firestore), [ s.toMutation(e._key, In.exists(!1)) ]).then((() => e));
|
|
5114
5121
|
}
|
|
5115
5122
|
|
|
@@ -5229,7 +5236,7 @@ function Rr(t, n, e, ...r) {
|
|
|
5229
5236
|
}
|
|
5230
5237
|
set(t, n, e) {
|
|
5231
5238
|
this._verifyNotCommitted();
|
|
5232
|
-
const r = qr(t, this._firestore), s =
|
|
5239
|
+
const r = qr(t, this._firestore), s = vr(r.converter, n, e), i = Se(this._dataReader, "WriteBatch.set", r._key, s, null !== r.converter, e);
|
|
5233
5240
|
return this._mutations.push(i.toMutation(r._key, In.none())), this;
|
|
5234
5241
|
}
|
|
5235
5242
|
update(t, n, e, ...r) {
|
|
@@ -5238,7 +5245,7 @@ function Rr(t, n, e, ...r) {
|
|
|
5238
5245
|
// For Compat types, we have to "extract" the underlying types before
|
|
5239
5246
|
// performing validation.
|
|
5240
5247
|
let i;
|
|
5241
|
-
return i = "string" == typeof (n = l(n)) || n instanceof
|
|
5248
|
+
return i = "string" == typeof (n = l(n)) || n instanceof be ? Ue(this._dataReader, "WriteBatch.update", s._key, n, e, r) : ke(this._dataReader, "WriteBatch.update", s._key, n),
|
|
5242
5249
|
this._mutations.push(i.toMutation(s._key, In.exists(!0))), this;
|
|
5243
5250
|
}
|
|
5244
5251
|
/**
|
|
@@ -5365,9 +5372,9 @@ function qr(t, n) {
|
|
|
5365
5372
|
recordVersion(t) {
|
|
5366
5373
|
let n;
|
|
5367
5374
|
if (t.isFoundDocument()) n = t.version; else {
|
|
5368
|
-
if (!t.isNoDocument()) throw
|
|
5375
|
+
if (!t.isNoDocument()) throw b();
|
|
5369
5376
|
// For deleted docs, we must use baseVersion 0 when we overwrite them.
|
|
5370
|
-
n =
|
|
5377
|
+
n = vt.min();
|
|
5371
5378
|
}
|
|
5372
5379
|
const e = this.readVersions.get(t.key.toString());
|
|
5373
5380
|
if (e) {
|
|
@@ -5390,7 +5397,7 @@ function qr(t, n) {
|
|
|
5390
5397
|
// The first time a document is written, we want to take into account the
|
|
5391
5398
|
// read time and existence
|
|
5392
5399
|
if (!this.writtenDocs.has(t.toString()) && n) {
|
|
5393
|
-
if (n.isEqual(
|
|
5400
|
+
if (n.isEqual(vt.min()))
|
|
5394
5401
|
// The document doesn't exist, so fail the transaction.
|
|
5395
5402
|
// This has to be validated locally because you can't send a
|
|
5396
5403
|
// precondition that a document does not exist without changing the
|
|
@@ -5485,7 +5492,7 @@ class Lr {
|
|
|
5485
5492
|
function(t) {
|
|
5486
5493
|
switch (t) {
|
|
5487
5494
|
default:
|
|
5488
|
-
return
|
|
5495
|
+
return b();
|
|
5489
5496
|
|
|
5490
5497
|
case I:
|
|
5491
5498
|
case A:
|
|
@@ -5826,7 +5833,7 @@ class Lr {
|
|
|
5826
5833
|
return this.St.push(r), r;
|
|
5827
5834
|
}
|
|
5828
5835
|
Lt() {
|
|
5829
|
-
this.Ft &&
|
|
5836
|
+
this.Ft && b();
|
|
5830
5837
|
}
|
|
5831
5838
|
verifyOperationInProgress() {}
|
|
5832
5839
|
/**
|
|
@@ -5889,15 +5896,15 @@ class Mr {
|
|
|
5889
5896
|
*/ get(t) {
|
|
5890
5897
|
const n = qr(t, this._firestore), e = new Er(this._firestore);
|
|
5891
5898
|
return this._transaction.lookup([ n._key ]).then((t => {
|
|
5892
|
-
if (!t || 1 !== t.length) return
|
|
5899
|
+
if (!t || 1 !== t.length) return b();
|
|
5893
5900
|
const r = t[0];
|
|
5894
5901
|
if (r.isFoundDocument()) return new Je(this._firestore, e, r.key, r, n.converter);
|
|
5895
5902
|
if (r.isNoDocument()) return new Je(this._firestore, e, n._key, null, n.converter);
|
|
5896
|
-
throw
|
|
5903
|
+
throw b();
|
|
5897
5904
|
}));
|
|
5898
5905
|
}
|
|
5899
5906
|
set(t, n, e) {
|
|
5900
|
-
const r = qr(t, this._firestore), s =
|
|
5907
|
+
const r = qr(t, this._firestore), s = vr(r.converter, n, e), i = Se(this._dataReader, "Transaction.set", r._key, s, null !== r.converter, e);
|
|
5901
5908
|
return this._transaction.set(r._key, i), this;
|
|
5902
5909
|
}
|
|
5903
5910
|
update(t, n, e, ...r) {
|
|
@@ -5905,7 +5912,7 @@ class Mr {
|
|
|
5905
5912
|
// For Compat types, we have to "extract" the underlying types before
|
|
5906
5913
|
// performing validation.
|
|
5907
5914
|
let i;
|
|
5908
|
-
return i = "string" == typeof (n = l(n)) || n instanceof
|
|
5915
|
+
return i = "string" == typeof (n = l(n)) || n instanceof be ? Ue(this._dataReader, "Transaction.update", s._key, n, e, r) : ke(this._dataReader, "Transaction.update", s._key, n),
|
|
5909
5916
|
this._transaction.update(s._key, i), this;
|
|
5910
5917
|
}
|
|
5911
5918
|
/**
|
|
@@ -5954,7 +5961,7 @@ class Mr {
|
|
|
5954
5961
|
return n && r._setSettings(n), r;
|
|
5955
5962
|
}), "PUBLIC")),
|
|
5956
5963
|
// RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
|
|
5957
|
-
r("firestore-lite", "3.4.
|
|
5964
|
+
r("firestore-lite", "3.4.4-canary.aaeab08ac", "rn"), r("firestore-lite", "3.4.4-canary.aaeab08ac", "esm2017");
|
|
5958
5965
|
|
|
5959
|
-
export { Ee as Bytes, we as CollectionReference, fe as DocumentReference, Je as DocumentSnapshot,
|
|
5966
|
+
export { Ee as Bytes, we as CollectionReference, fe as DocumentReference, Je as DocumentSnapshot, be as FieldPath, Te as FieldValue, ue as Firestore, U as FirestoreError, Ie as GeoPoint, de as Query, er as QueryConstraint, Xe as QueryDocumentSnapshot, Ze as QuerySnapshot, bt as Timestamp, Mr as Transaction, xr as WriteBatch, Vr as addDoc, Sr as arrayRemove, $r as arrayUnion, me as collection, pe as collectionGroup, he as connectFirestoreEmulator, Pr as deleteDoc, Nr as deleteField, ye as doc, ve as documentId, pr as endAt, mr as endBefore, Tr as getDoc, Ir as getDocs, ae as getFirestore, Fr as increment, ce as initializeFirestore, ar as limit, hr as limitToLast, ur as orderBy, rr as query, ge as queryEqual, _e as refEqual, Br as runTransaction, Dr as serverTimestamp, Ar as setDoc, m as setLogLevel, tr as snapshotEqual, dr as startAfter, fr as startAt, le as terminate, Rr as updateDoc, ir as where, Or as writeBatch };
|
|
5960
5967
|
//# sourceMappingURL=index.rn.esm2017.js.map
|