@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
|
@@ -67,7 +67,7 @@ m.MOCK_USER = new m("mock-user");
|
|
|
67
67
|
* See the License for the specific language governing permissions and
|
|
68
68
|
* limitations under the License.
|
|
69
69
|
*/
|
|
70
|
-
var y = "9.6.
|
|
70
|
+
var y = "9.6.5-canary.aaeab08ac", v = new l("@firebase/firestore");
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* @license
|
|
@@ -225,7 +225,7 @@ e) {
|
|
|
225
225
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
226
226
|
* See the License for the specific language governing permissions and
|
|
227
227
|
* limitations under the License.
|
|
228
|
-
*/ var A = "cancelled", k = "unknown", V = "invalid-argument", D = "deadline-exceeded",
|
|
228
|
+
*/ var A = "cancelled", k = "unknown", V = "invalid-argument", D = "deadline-exceeded", P = "not-found", N = "permission-denied", q = "unauthenticated", F = "resource-exhausted", O = "failed-precondition", C = "aborted", j = "out-of-range", L = "unimplemented", R = "internal", M = "unavailable", U = /** @class */ function(e) {
|
|
229
229
|
/** @hideconstructor */
|
|
230
230
|
function n(
|
|
231
231
|
/**
|
|
@@ -523,6 +523,8 @@ function(t, e, n, r, i, o, a, s) {
|
|
|
523
523
|
return new t(Z.fromString(e));
|
|
524
524
|
}, t.fromName = function(e) {
|
|
525
525
|
return new t(Z.fromString(e).popFirst(5));
|
|
526
|
+
}, t.empty = function() {
|
|
527
|
+
return new t(Z.emptyPath());
|
|
526
528
|
},
|
|
527
529
|
/** Returns true if the document is in the specified collectionId. */ t.prototype.hasCollectionId = function(t) {
|
|
528
530
|
return this.path.length >= 2 && this.path.get(this.path.length - 2) === t;
|
|
@@ -741,11 +743,11 @@ function dt(t) {
|
|
|
741
743
|
|
|
742
744
|
case 403:
|
|
743
745
|
// Forbidden
|
|
744
|
-
return
|
|
746
|
+
return N;
|
|
745
747
|
|
|
746
748
|
case 404:
|
|
747
749
|
// Not Found
|
|
748
|
-
return
|
|
750
|
+
return P;
|
|
749
751
|
|
|
750
752
|
case 409:
|
|
751
753
|
// Conflict
|
|
@@ -1418,7 +1420,7 @@ var At = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
|
1418
1420
|
* FieldValueOptions to value().
|
|
1419
1421
|
* - With respect to other ServerTimestampValues, they sort by their
|
|
1420
1422
|
* localWriteTime.
|
|
1421
|
-
*/ function
|
|
1423
|
+
*/ function Pt(t) {
|
|
1422
1424
|
var e, n;
|
|
1423
1425
|
return "server_timestamp" === (null === (n = ((null === (e = null == t ? void 0 : t.mapValue) || void 0 === e ? void 0 : e.fields) || {}).__type__) || void 0 === n ? void 0 : n.stringValue);
|
|
1424
1426
|
}
|
|
@@ -1428,9 +1430,9 @@ var At = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
|
1428
1430
|
*
|
|
1429
1431
|
* Preserving the previous values allows the user to display the last resoled
|
|
1430
1432
|
* value until the backend responds with the timestamp.
|
|
1431
|
-
*/ function
|
|
1433
|
+
*/ function Nt(t) {
|
|
1432
1434
|
var e = t.mapValue.fields.__previous_value__;
|
|
1433
|
-
return
|
|
1435
|
+
return Pt(e) ? Nt(e) : e;
|
|
1434
1436
|
}
|
|
1435
1437
|
|
|
1436
1438
|
/**
|
|
@@ -1457,7 +1459,7 @@ var At = new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);
|
|
|
1457
1459
|
* limitations under the License.
|
|
1458
1460
|
*/
|
|
1459
1461
|
/** Extracts the backend's type order for the provided value. */ function Ft(t) {
|
|
1460
|
-
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 ?
|
|
1462
|
+
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 ? Pt(t) ? 4 /* ServerTimestampValue */ : 10 /* ObjectValue */ : S();
|
|
1461
1463
|
}
|
|
1462
1464
|
|
|
1463
1465
|
/** Tests `left` and `right` for equality based on the backend semantics. */ function Ot(t, e) {
|
|
@@ -1780,25 +1782,26 @@ function Rt(t, e) {
|
|
|
1780
1782
|
return new t(Gt(this.value));
|
|
1781
1783
|
}, t;
|
|
1782
1784
|
}(), Qt = /** @class */ function() {
|
|
1783
|
-
function t(t, e, n, r, i) {
|
|
1784
|
-
this.key = t, this.documentType = e, this.version = n, this.
|
|
1785
|
+
function t(t, e, n, r, i, o) {
|
|
1786
|
+
this.key = t, this.documentType = e, this.version = n, this.readTime = r, this.data = i,
|
|
1787
|
+
this.documentState = o
|
|
1785
1788
|
/**
|
|
1786
1789
|
* Creates a document with no known version or data, but which can serve as
|
|
1787
1790
|
* base document for mutations.
|
|
1788
1791
|
*/;
|
|
1789
1792
|
}
|
|
1790
1793
|
return t.newInvalidDocument = function(e) {
|
|
1791
|
-
return new t(e, 0 /* INVALID */ , _t.min(), zt.empty(), 0 /* SYNCED */);
|
|
1794
|
+
return new t(e, 0 /* INVALID */ , _t.min(), _t.min(), zt.empty(), 0 /* SYNCED */);
|
|
1792
1795
|
},
|
|
1793
1796
|
/**
|
|
1794
1797
|
* Creates a new document that is known to exist with the given data at the
|
|
1795
1798
|
* given version.
|
|
1796
1799
|
*/
|
|
1797
1800
|
t.newFoundDocument = function(e, n, r) {
|
|
1798
|
-
return new t(e, 1 /* FOUND_DOCUMENT */ , n, r, 0 /* SYNCED */);
|
|
1801
|
+
return new t(e, 1 /* FOUND_DOCUMENT */ , n, _t.min(), r, 0 /* SYNCED */);
|
|
1799
1802
|
},
|
|
1800
1803
|
/** Creates a new document that is known to not exist at the given version. */ t.newNoDocument = function(e, n) {
|
|
1801
|
-
return new t(e, 2 /* NO_DOCUMENT */ , n, zt.empty(), 0 /* SYNCED */);
|
|
1804
|
+
return new t(e, 2 /* NO_DOCUMENT */ , n, _t.min(), zt.empty(), 0 /* SYNCED */);
|
|
1802
1805
|
},
|
|
1803
1806
|
/**
|
|
1804
1807
|
* Creates a new document that is known to exist at the given version but
|
|
@@ -1806,7 +1809,7 @@ function Rt(t, e) {
|
|
|
1806
1809
|
* base document).
|
|
1807
1810
|
*/
|
|
1808
1811
|
t.newUnknownDocument = function(e, n) {
|
|
1809
|
-
return new t(e, 3 /* UNKNOWN_DOCUMENT */ , n, zt.empty(), 2 /* HAS_COMMITTED_MUTATIONS */);
|
|
1812
|
+
return new t(e, 3 /* UNKNOWN_DOCUMENT */ , n, _t.min(), zt.empty(), 2 /* HAS_COMMITTED_MUTATIONS */);
|
|
1810
1813
|
},
|
|
1811
1814
|
/**
|
|
1812
1815
|
* Changes the document type to indicate that it exists and that its version
|
|
@@ -1836,6 +1839,8 @@ function Rt(t, e) {
|
|
|
1836
1839
|
return this.documentState = 2 /* HAS_COMMITTED_MUTATIONS */ , this;
|
|
1837
1840
|
}, t.prototype.setHasLocalMutations = function() {
|
|
1838
1841
|
return this.documentState = 1 /* HAS_LOCAL_MUTATIONS */ , this;
|
|
1842
|
+
}, t.prototype.setReadTime = function(t) {
|
|
1843
|
+
return this.readTime = t, this;
|
|
1839
1844
|
}, Object.defineProperty(t.prototype, "hasLocalMutations", {
|
|
1840
1845
|
get: function() {
|
|
1841
1846
|
return 1 /* HAS_LOCAL_MUTATIONS */ === this.documentState;
|
|
@@ -1865,7 +1870,7 @@ function Rt(t, e) {
|
|
|
1865
1870
|
}, t.prototype.isEqual = function(e) {
|
|
1866
1871
|
return e instanceof t && this.key.isEqual(e.key) && this.version.isEqual(e.version) && this.documentType === e.documentType && this.documentState === e.documentState && this.data.isEqual(e.data);
|
|
1867
1872
|
}, t.prototype.mutableCopy = function() {
|
|
1868
|
-
return new t(this.key, this.documentType, this.version, this.data.clone(), this.documentState);
|
|
1873
|
+
return new t(this.key, this.documentType, this.version, this.readTime, this.data.clone(), this.documentState);
|
|
1869
1874
|
}, t.prototype.toString = function() {
|
|
1870
1875
|
return "Document(" + this.key + ", " + this.version + ", " + JSON.stringify(this.data.value) + ", {documentType: " + this.documentType + "}), {documentState: " + this.documentState + "})";
|
|
1871
1876
|
}, t;
|
|
@@ -2347,7 +2352,7 @@ function de(t, e) {
|
|
|
2347
2352
|
/**
|
|
2348
2353
|
* Returns a value for a Date that's appropriate to put into a proto.
|
|
2349
2354
|
*/
|
|
2350
|
-
function
|
|
2355
|
+
function Pe(t, e) {
|
|
2351
2356
|
return t.F ? new Date(1e3 * e.seconds).toISOString().replace(/\.\d*/, "").replace("Z", "") + "." + ("000000000" + e.nanoseconds).slice(-9) + "Z" : {
|
|
2352
2357
|
seconds: "" + e.seconds,
|
|
2353
2358
|
nanos: e.nanoseconds
|
|
@@ -2358,12 +2363,12 @@ function Ne(t, e) {
|
|
|
2358
2363
|
* Returns a value for bytes that's appropriate to put in a proto.
|
|
2359
2364
|
*
|
|
2360
2365
|
* Visible for testing.
|
|
2361
|
-
*/ function
|
|
2366
|
+
*/ function Ne(t, e) {
|
|
2362
2367
|
return t.F ? e.toBase64() : e.toUint8Array();
|
|
2363
2368
|
}
|
|
2364
2369
|
|
|
2365
2370
|
function qe(t, e) {
|
|
2366
|
-
return
|
|
2371
|
+
return Pe(t, e.toTimestamp());
|
|
2367
2372
|
}
|
|
2368
2373
|
|
|
2369
2374
|
function Fe(t) {
|
|
@@ -3731,7 +3736,7 @@ var Vn = /** @class */ function(e) {
|
|
|
3731
3736
|
}, e.databaseId, e.q, e.ignoreUndefinedProperties);
|
|
3732
3737
|
}
|
|
3733
3738
|
|
|
3734
|
-
var
|
|
3739
|
+
var Pn = /** @class */ function(e) {
|
|
3735
3740
|
function n() {
|
|
3736
3741
|
return null !== e && e.apply(this, arguments) || this;
|
|
3737
3742
|
}
|
|
@@ -3740,7 +3745,7 @@ var Nn = /** @class */ function(e) {
|
|
|
3740
3745
|
}, n.prototype.isEqual = function(t) {
|
|
3741
3746
|
return t instanceof n;
|
|
3742
3747
|
}, n;
|
|
3743
|
-
}(gn),
|
|
3748
|
+
}(gn), Nn = /** @class */ function(e) {
|
|
3744
3749
|
function n(t, n) {
|
|
3745
3750
|
var r = this;
|
|
3746
3751
|
return (r = e.call(this, t) || this).lt = n, r;
|
|
@@ -3915,7 +3920,7 @@ var Nn = /** @class */ function(e) {
|
|
|
3915
3920
|
if (t instanceof Date) {
|
|
3916
3921
|
var n = bt.fromDate(t);
|
|
3917
3922
|
return {
|
|
3918
|
-
timestampValue:
|
|
3923
|
+
timestampValue: Pe(e.q, n)
|
|
3919
3924
|
};
|
|
3920
3925
|
}
|
|
3921
3926
|
if (t instanceof bt) {
|
|
@@ -3924,7 +3929,7 @@ var Nn = /** @class */ function(e) {
|
|
|
3924
3929
|
// truncation immediately without waiting for the backend to do that.
|
|
3925
3930
|
var r = new bt(t.seconds, 1e3 * Math.floor(t.nanoseconds / 1e3));
|
|
3926
3931
|
return {
|
|
3927
|
-
timestampValue:
|
|
3932
|
+
timestampValue: Pe(e.q, r)
|
|
3928
3933
|
};
|
|
3929
3934
|
}
|
|
3930
3935
|
if (t instanceof wn) return {
|
|
@@ -3934,7 +3939,7 @@ var Nn = /** @class */ function(e) {
|
|
|
3934
3939
|
}
|
|
3935
3940
|
};
|
|
3936
3941
|
if (t instanceof vn) return {
|
|
3937
|
-
bytesValue:
|
|
3942
|
+
bytesValue: Ne(e.q, t._byteString)
|
|
3938
3943
|
};
|
|
3939
3944
|
if (t instanceof sn) {
|
|
3940
3945
|
var i = e.databaseId, o = t.firestore._databaseId;
|
|
@@ -4388,12 +4393,12 @@ var er = /** @class */ function(e) {
|
|
|
4388
4393
|
var rr = /** @class */ function(e) {
|
|
4389
4394
|
function n(t, n, r) {
|
|
4390
4395
|
var i = this;
|
|
4391
|
-
return (i = e.call(this) || this).type = t, i.gt = n, i.
|
|
4396
|
+
return (i = e.call(this) || this).type = t, i.gt = n, i.bt = r, i;
|
|
4392
4397
|
}
|
|
4393
4398
|
return t(n, e), n.prototype._apply = function(t) {
|
|
4394
4399
|
return new un(t.firestore, t.converter, function(t, e, n) {
|
|
4395
4400
|
return new se(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), e, n, t.startAt, t.endAt);
|
|
4396
|
-
}(t._query, this.gt, this.
|
|
4401
|
+
}(t._query, this.gt, this.bt));
|
|
4397
4402
|
}, n;
|
|
4398
4403
|
}(Xn);
|
|
4399
4404
|
|
|
@@ -4422,10 +4427,10 @@ function or(t) {
|
|
|
4422
4427
|
var ar = /** @class */ function(e) {
|
|
4423
4428
|
function n(t, n, r) {
|
|
4424
4429
|
var i = this;
|
|
4425
|
-
return (i = e.call(this) || this).type = t, i.
|
|
4430
|
+
return (i = e.call(this) || this).type = t, i.vt = n, i.Et = r, i;
|
|
4426
4431
|
}
|
|
4427
4432
|
return t(n, e), n.prototype._apply = function(t) {
|
|
4428
|
-
var e = hr(t, this.type, this.
|
|
4433
|
+
var e = hr(t, this.type, this.vt, this.Et);
|
|
4429
4434
|
return new un(t.firestore, t.converter, function(t, e) {
|
|
4430
4435
|
return new se(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, e, t.endAt);
|
|
4431
4436
|
}(t._query, e));
|
|
@@ -4446,10 +4451,10 @@ function ur() {
|
|
|
4446
4451
|
var cr = /** @class */ function(e) {
|
|
4447
4452
|
function n(t, n, r) {
|
|
4448
4453
|
var i = this;
|
|
4449
|
-
return (i = e.call(this) || this).type = t, i.
|
|
4454
|
+
return (i = e.call(this) || this).type = t, i.vt = n, i.Et = r, i;
|
|
4450
4455
|
}
|
|
4451
4456
|
return t(n, e), n.prototype._apply = function(t) {
|
|
4452
|
-
var e = hr(t, this.type, this.
|
|
4457
|
+
var e = hr(t, this.type, this.vt, this.Et);
|
|
4453
4458
|
return new un(t.firestore, t.converter, function(t, e) {
|
|
4454
4459
|
return new se(t.path, t.collectionGroup, t.explicitOrderBy.slice(), t.filters.slice(), t.limit, t.limitType, t.startAt, e);
|
|
4455
4460
|
}(t._query, e));
|
|
@@ -4468,7 +4473,7 @@ function fr() {
|
|
|
4468
4473
|
|
|
4469
4474
|
/** Helper function to create a bound from a document or fields */ function hr(t, e, n, r) {
|
|
4470
4475
|
if (n[0] = p(n[0]), n[0] instanceof Kn) return function(t, e, n, r, i) {
|
|
4471
|
-
if (!r) throw new U(
|
|
4476
|
+
if (!r) throw new U(P, "Can't use a DocumentSnapshot that doesn't exist for " + n + "().");
|
|
4472
4477
|
// Because people expect to continue/end a query at the exact document
|
|
4473
4478
|
// provided, we need to use the implicit sort order rather than the explicit
|
|
4474
4479
|
// sort order, because it's guaranteed to contain the document key. That way
|
|
@@ -4480,7 +4485,7 @@ function fr() {
|
|
|
4480
4485
|
var u = s[a];
|
|
4481
4486
|
if (u.field.isKeyField()) o.push(Rt(e, r.key)); else {
|
|
4482
4487
|
var c = r.data.field(u.field);
|
|
4483
|
-
if (
|
|
4488
|
+
if (Pt(c)) throw new U(V, 'Invalid query. You are trying to start or end a query using a document for which the field "' + u.field + '" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');
|
|
4484
4489
|
if (null === c) {
|
|
4485
4490
|
var l = u.field.canonicalString();
|
|
4486
4491
|
throw new U(V, "Invalid query. You are trying to start or end a query using a document for which the field '" + l + "' (used as the orderBy) does not exist.");
|
|
@@ -4656,7 +4661,7 @@ var vr = /** @class */ function(e) {
|
|
|
4656
4661
|
}, t.prototype.convertServerTimestamp = function(t, e) {
|
|
4657
4662
|
switch (e) {
|
|
4658
4663
|
case "previous":
|
|
4659
|
-
var n =
|
|
4664
|
+
var n = Nt(t);
|
|
4660
4665
|
return null == n ? null : this.convertValue(n, e);
|
|
4661
4666
|
|
|
4662
4667
|
case "estimate":
|
|
@@ -4805,7 +4810,7 @@ function _r(t, e, n) {
|
|
|
4805
4810
|
* Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to
|
|
4806
4811
|
* include a server-generated timestamp in the written data.
|
|
4807
4812
|
*/ function Ir() {
|
|
4808
|
-
return new
|
|
4813
|
+
return new Pn("serverTimestamp");
|
|
4809
4814
|
}
|
|
4810
4815
|
|
|
4811
4816
|
/**
|
|
@@ -4823,7 +4828,7 @@ function _r(t, e, n) {
|
|
|
4823
4828
|
for (var t = [], e = 0; e < arguments.length; e++) t[e] = arguments[e];
|
|
4824
4829
|
// NOTE: We don't actually parse the data until it's used in set() or
|
|
4825
4830
|
// update() since we'd need the Firestore instance to do this.
|
|
4826
|
-
return new
|
|
4831
|
+
return new Nn("arrayUnion", t);
|
|
4827
4832
|
}
|
|
4828
4833
|
|
|
4829
4834
|
/**
|
|
@@ -4896,12 +4901,12 @@ function _r(t, e, n) {
|
|
|
4896
4901
|
}
|
|
4897
4902
|
return t.prototype.set = function(t, e, n) {
|
|
4898
4903
|
this._verifyNotCommitted();
|
|
4899
|
-
var r =
|
|
4904
|
+
var r = Pr(t, this._firestore), i = yr(r.converter, e, n), o = kn(this._dataReader, "WriteBatch.set", r._key, i, null !== r.converter, n);
|
|
4900
4905
|
return this._mutations.push(o.toMutation(r._key, _e.none())), this;
|
|
4901
4906
|
}, t.prototype.update = function(t, e, n) {
|
|
4902
4907
|
for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
|
|
4903
4908
|
this._verifyNotCommitted();
|
|
4904
|
-
var o, a =
|
|
4909
|
+
var o, a = Pr(t, this._firestore);
|
|
4905
4910
|
// For Compat types, we have to "extract" the underlying types before
|
|
4906
4911
|
// performing validation.
|
|
4907
4912
|
return o = "string" == typeof (e = p(e)) || e instanceof mn ? Cn(this._dataReader, "WriteBatch.update", a._key, e, n, r) : On(this._dataReader, "WriteBatch.update", a._key, e),
|
|
@@ -4915,7 +4920,7 @@ function _r(t, e, n) {
|
|
|
4915
4920
|
*/
|
|
4916
4921
|
t.prototype.delete = function(t) {
|
|
4917
4922
|
this._verifyNotCommitted();
|
|
4918
|
-
var e =
|
|
4923
|
+
var e = Pr(t, this._firestore);
|
|
4919
4924
|
return this._mutations = this._mutations.concat(new Ie(e._key, _e.none())), this;
|
|
4920
4925
|
},
|
|
4921
4926
|
/**
|
|
@@ -4937,7 +4942,7 @@ function _r(t, e, n) {
|
|
|
4937
4942
|
}, t;
|
|
4938
4943
|
}();
|
|
4939
4944
|
|
|
4940
|
-
function
|
|
4945
|
+
function Pr(t, e) {
|
|
4941
4946
|
if ((t = p(t)).firestore !== e) throw new U(V, "Provided document reference is from a different Firestore instance.");
|
|
4942
4947
|
return t;
|
|
4943
4948
|
}
|
|
@@ -4954,7 +4959,7 @@ function Nr(t, e) {
|
|
|
4954
4959
|
*
|
|
4955
4960
|
* @returns A `WriteBatch` that can be used to atomically execute multiple
|
|
4956
4961
|
* writes.
|
|
4957
|
-
*/ function
|
|
4962
|
+
*/ function Nr(t) {
|
|
4958
4963
|
var e = Ze(t = st(t, en));
|
|
4959
4964
|
return new Dr(t, (function(t) {
|
|
4960
4965
|
return Ye(e, t);
|
|
@@ -5171,9 +5176,9 @@ function Nr(t, e) {
|
|
|
5171
5176
|
return !1;
|
|
5172
5177
|
|
|
5173
5178
|
case V:
|
|
5174
|
-
case N:
|
|
5175
|
-
case "already-exists":
|
|
5176
5179
|
case P:
|
|
5180
|
+
case "already-exists":
|
|
5181
|
+
case N:
|
|
5177
5182
|
case O:
|
|
5178
5183
|
// Aborted might be retried in some scenarios, but that is dependant on
|
|
5179
5184
|
// the context and should handled individually by the calling code.
|
|
@@ -5563,7 +5568,7 @@ function Nr(t, e) {
|
|
|
5563
5568
|
*/;
|
|
5564
5569
|
}
|
|
5565
5570
|
return t.prototype.get = function(t) {
|
|
5566
|
-
var e = this, n =
|
|
5571
|
+
var e = this, n = Pr(t, this._firestore), r = new vr(this._firestore);
|
|
5567
5572
|
return this._transaction.lookup([ n._key ]).then((function(t) {
|
|
5568
5573
|
if (!t || 1 !== t.length) return S();
|
|
5569
5574
|
var i = t[0];
|
|
@@ -5572,11 +5577,11 @@ function Nr(t, e) {
|
|
|
5572
5577
|
throw S();
|
|
5573
5578
|
}));
|
|
5574
5579
|
}, t.prototype.set = function(t, e, n) {
|
|
5575
|
-
var r =
|
|
5580
|
+
var r = Pr(t, this._firestore), i = yr(r.converter, e, n), o = kn(this._dataReader, "Transaction.set", r._key, i, null !== r.converter, n);
|
|
5576
5581
|
return this._transaction.set(r._key, o), this;
|
|
5577
5582
|
}, t.prototype.update = function(t, e, n) {
|
|
5578
5583
|
for (var r = [], i = 3; i < arguments.length; i++) r[i - 3] = arguments[i];
|
|
5579
|
-
var o, a =
|
|
5584
|
+
var o, a = Pr(t, this._firestore);
|
|
5580
5585
|
// For Compat types, we have to "extract" the underlying types before
|
|
5581
5586
|
// performing validation.
|
|
5582
5587
|
return o = "string" == typeof (e = p(e)) || e instanceof mn ? Cn(this._dataReader, "Transaction.update", a._key, e, n, r) : On(this._dataReader, "Transaction.update", a._key, e),
|
|
@@ -5589,7 +5594,7 @@ function Nr(t, e) {
|
|
|
5589
5594
|
* @returns This `Transaction` instance. Used for chaining method calls.
|
|
5590
5595
|
*/
|
|
5591
5596
|
t.prototype.delete = function(t) {
|
|
5592
|
-
var e =
|
|
5597
|
+
var e = Pr(t, this._firestore);
|
|
5593
5598
|
return this._transaction.delete(e._key), this;
|
|
5594
5599
|
}, t;
|
|
5595
5600
|
}();
|
|
@@ -5647,7 +5652,7 @@ y = i + "_lite", o(new c("firestore/lite", (function(t, e) {
|
|
|
5647
5652
|
return n && i._setSettings(n), i;
|
|
5648
5653
|
}), "PUBLIC")),
|
|
5649
5654
|
// RUNTIME_ENV and BUILD_TARGET are replaced by real values during the compilation
|
|
5650
|
-
a("firestore-lite", "3.4.
|
|
5655
|
+
a("firestore-lite", "3.4.4-canary.aaeab08ac", ""), a("firestore-lite", "3.4.4-canary.aaeab08ac", "esm5");
|
|
5651
5656
|
|
|
5652
|
-
export { vn as Bytes, cn as CollectionReference, sn as DocumentReference, Kn as DocumentSnapshot, mn as FieldPath, gn as FieldValue, en as Firestore, U as FirestoreError, wn as GeoPoint, un as Query, Xn as QueryConstraint, Hn as QueryDocumentSnapshot, Wn as QuerySnapshot, bt as Timestamp, Lr as Transaction, Dr as WriteBatch, Sr as addDoc, kr as arrayRemove, Ar as arrayUnion, ln as collection, fn as collectionGroup, on as connectFirestoreEmulator, Tr as deleteDoc, Er as deleteField, hn as doc, yn as documentId, fr as endAt, lr as endBefore, gr as getDoc, wr as getDocs, rn as getFirestore, Vr as increment, nn as initializeFirestore, ir as limit, or as limitToLast, nr as orderBy, Jn as query, dn as queryEqual, pn as refEqual, Rr as runTransaction, Ir as serverTimestamp, br as setDoc, g as setLogLevel, Yn as snapshotEqual, ur as startAfter, sr as startAt, an as terminate, _r as updateDoc, tr as where,
|
|
5657
|
+
export { vn as Bytes, cn as CollectionReference, sn as DocumentReference, Kn as DocumentSnapshot, mn as FieldPath, gn as FieldValue, en as Firestore, U as FirestoreError, wn as GeoPoint, un as Query, Xn as QueryConstraint, Hn as QueryDocumentSnapshot, Wn as QuerySnapshot, bt as Timestamp, Lr as Transaction, Dr as WriteBatch, Sr as addDoc, kr as arrayRemove, Ar as arrayUnion, ln as collection, fn as collectionGroup, on as connectFirestoreEmulator, Tr as deleteDoc, Er as deleteField, hn as doc, yn as documentId, fr as endAt, lr as endBefore, gr as getDoc, wr as getDocs, rn as getFirestore, Vr as increment, nn as initializeFirestore, ir as limit, or as limitToLast, nr as orderBy, Jn as query, dn as queryEqual, pn as refEqual, Rr as runTransaction, Ir as serverTimestamp, br as setDoc, g as setLogLevel, Yn as snapshotEqual, ur as startAfter, sr as startAt, an as terminate, _r as updateDoc, tr as where, Nr as writeBatch };
|
|
5653
5658
|
//# sourceMappingURL=index.browser.esm5.js.map
|