@firebase/firestore 3.4.2 → 3.4.3
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 +8 -0
- package/dist/firestore/src/api/snapshot.d.ts +6 -6
- package/dist/firestore/src/lite-api/snapshot.d.ts +2 -2
- package/dist/firestore/test/integration/bootstrap.d.ts +0 -1
- package/dist/firestore/test/integration/util/events_accumulator.d.ts +2 -2
- package/dist/firestore/test/integration/util/firebase_export.d.ts +6 -14
- package/dist/firestore/test/integration/util/helpers.d.ts +18 -18
- package/dist/firestore/test/integration/util/internal_helpers.d.ts +3 -3
- package/dist/firestore/test/integration/util/settings.d.ts +2 -2
- package/dist/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
- package/dist/firestore/test/util/api_helpers.d.ts +1 -1
- package/dist/firestore/test/util/helpers.d.ts +4 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.esm2017.js +869 -869
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +1257 -1257
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +2674 -24
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +2675 -25
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +1068 -1068
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +8 -8
- package/dist/lite/firestore/src/api/snapshot.d.ts +6 -6
- package/dist/lite/firestore/src/lite-api/snapshot.d.ts +2 -2
- package/dist/lite/firestore/test/integration/bootstrap.d.ts +0 -1
- package/dist/lite/firestore/test/integration/util/events_accumulator.d.ts +2 -2
- package/dist/lite/firestore/test/integration/util/firebase_export.d.ts +6 -14
- package/dist/lite/firestore/test/integration/util/helpers.d.ts +18 -18
- package/dist/lite/firestore/test/integration/util/internal_helpers.d.ts +3 -3
- package/dist/lite/firestore/test/integration/util/settings.d.ts +2 -2
- package/dist/lite/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
- package/dist/lite/firestore/test/util/api_helpers.d.ts +1 -1
- package/dist/lite/firestore/test/util/helpers.d.ts +4 -6
- package/dist/lite/index.browser.esm2017.js +1136 -1136
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +105 -105
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.d.ts +2 -2
- package/dist/lite/index.node.cjs.js +11 -12
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +11 -12
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +148 -148
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +2 -2
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +107 -107
- package/dist/lite/packages/firestore/src/api/snapshot.d.ts +6 -6
- package/dist/lite/packages/firestore/src/lite-api/snapshot.d.ts +2 -2
- package/dist/lite/packages/firestore/test/integration/bootstrap.d.ts +0 -1
- package/dist/lite/packages/firestore/test/integration/util/events_accumulator.d.ts +2 -2
- package/dist/lite/packages/firestore/test/integration/util/firebase_export.d.ts +6 -14
- package/dist/lite/packages/firestore/test/integration/util/helpers.d.ts +18 -18
- package/dist/lite/packages/firestore/test/integration/util/internal_helpers.d.ts +3 -3
- package/dist/lite/packages/firestore/test/integration/util/settings.d.ts +2 -2
- package/dist/lite/packages/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
- package/dist/lite/packages/firestore/test/util/api_helpers.d.ts +1 -1
- package/dist/lite/packages/firestore/test/util/helpers.d.ts +4 -6
- package/dist/lite/private.d.ts +2 -2
- package/dist/packages/firestore/dist/index.esm2017.d.ts +105 -105
- package/dist/packages/firestore/src/api/snapshot.d.ts +6 -6
- package/dist/packages/firestore/src/lite-api/snapshot.d.ts +2 -2
- package/dist/packages/firestore/test/integration/bootstrap.d.ts +0 -1
- package/dist/packages/firestore/test/integration/util/events_accumulator.d.ts +2 -2
- package/dist/packages/firestore/test/integration/util/firebase_export.d.ts +6 -14
- package/dist/packages/firestore/test/integration/util/helpers.d.ts +18 -18
- package/dist/packages/firestore/test/integration/util/internal_helpers.d.ts +3 -3
- package/dist/packages/firestore/test/integration/util/settings.d.ts +2 -2
- package/dist/packages/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
- package/dist/packages/firestore/test/util/api_helpers.d.ts +1 -1
- package/dist/packages/firestore/test/util/helpers.d.ts +4 -6
- package/dist/private.d.ts +8 -8
- package/package.json +4 -7
- package/dist/firestore/compat/api/blob.d.ts +0 -29
- package/dist/firestore/compat/api/database.d.ts +0 -228
- package/dist/firestore/compat/api/field_path.d.ts +0 -36
- package/dist/firestore/compat/api/field_value.d.ts +0 -29
- package/dist/firestore/compat/api/geo_point.d.ts +0 -17
- package/dist/firestore/compat/api/observer.d.ts +0 -29
- package/dist/firestore/compat/api/timestamp.d.ts +0 -17
- package/dist/firestore/compat/config.d.ts +0 -28
- package/dist/firestore/compat/index.console.d.ts +0 -42
- package/dist/firestore/compat/index.d.ts +0 -49
- package/dist/firestore/compat/index.node.d.ts +0 -22
- package/dist/firestore/compat/index.rn.d.ts +0 -22
- package/dist/firestore/compat/register-module.d.ts +0 -42
- package/dist/firestore/compat/util/input_validation.d.ts +0 -18
- package/dist/lite/firestore/compat/api/blob.d.ts +0 -29
- package/dist/lite/firestore/compat/api/database.d.ts +0 -228
- package/dist/lite/firestore/compat/api/field_path.d.ts +0 -36
- package/dist/lite/firestore/compat/api/field_value.d.ts +0 -29
- package/dist/lite/firestore/compat/api/geo_point.d.ts +0 -17
- package/dist/lite/firestore/compat/api/observer.d.ts +0 -29
- package/dist/lite/firestore/compat/api/timestamp.d.ts +0 -17
- package/dist/lite/firestore/compat/config.d.ts +0 -28
- package/dist/lite/firestore/compat/index.console.d.ts +0 -42
- package/dist/lite/firestore/compat/index.d.ts +0 -49
- package/dist/lite/firestore/compat/index.node.d.ts +0 -22
- package/dist/lite/firestore/compat/index.rn.d.ts +0 -22
- package/dist/lite/firestore/compat/register-module.d.ts +0 -42
- package/dist/lite/firestore/compat/util/input_validation.d.ts +0 -18
- package/dist/lite/packages/firestore/compat/api/blob.d.ts +0 -29
- package/dist/lite/packages/firestore/compat/api/database.d.ts +0 -228
- package/dist/lite/packages/firestore/compat/api/field_path.d.ts +0 -36
- package/dist/lite/packages/firestore/compat/api/field_value.d.ts +0 -29
- package/dist/lite/packages/firestore/compat/api/geo_point.d.ts +0 -17
- package/dist/lite/packages/firestore/compat/api/observer.d.ts +0 -29
- package/dist/lite/packages/firestore/compat/api/timestamp.d.ts +0 -17
- package/dist/lite/packages/firestore/compat/config.d.ts +0 -28
- package/dist/lite/packages/firestore/compat/index.console.d.ts +0 -42
- package/dist/lite/packages/firestore/compat/index.d.ts +0 -49
- package/dist/lite/packages/firestore/compat/index.node.d.ts +0 -22
- package/dist/lite/packages/firestore/compat/index.rn.d.ts +0 -22
- package/dist/lite/packages/firestore/compat/register-module.d.ts +0 -42
- package/dist/lite/packages/firestore/compat/util/input_validation.d.ts +0 -18
- package/dist/lite/src/protos/README.md +0 -2
- package/dist/lite/src/protos/firestore/bundle.proto +0 -121
- package/dist/lite/src/protos/firestore_bundle_proto.ts +0 -93
- package/dist/lite/src/protos/firestore_proto_api.ts +0 -1259
- package/dist/lite/src/protos/google/api/annotations.proto +0 -31
- package/dist/lite/src/protos/google/api/http.proto +0 -370
- package/dist/lite/src/protos/google/firestore/v1/common.proto +0 -84
- package/dist/lite/src/protos/google/firestore/v1/document.proto +0 -151
- package/dist/lite/src/protos/google/firestore/v1/firestore.proto +0 -761
- package/dist/lite/src/protos/google/firestore/v1/query.proto +0 -302
- package/dist/lite/src/protos/google/firestore/v1/write.proto +0 -264
- package/dist/lite/src/protos/google/protobuf/any.proto +0 -155
- package/dist/lite/src/protos/google/protobuf/descriptor.proto +0 -882
- package/dist/lite/src/protos/google/protobuf/empty.proto +0 -52
- package/dist/lite/src/protos/google/protobuf/struct.proto +0 -96
- package/dist/lite/src/protos/google/protobuf/timestamp.proto +0 -137
- package/dist/lite/src/protos/google/protobuf/wrappers.proto +0 -123
- package/dist/lite/src/protos/google/rpc/status.proto +0 -92
- package/dist/lite/src/protos/google/type/latlng.proto +0 -71
- package/dist/lite/src/protos/update.sh +0 -61
- package/dist/packages/firestore/compat/api/blob.d.ts +0 -29
- package/dist/packages/firestore/compat/api/database.d.ts +0 -228
- package/dist/packages/firestore/compat/api/field_path.d.ts +0 -36
- package/dist/packages/firestore/compat/api/field_value.d.ts +0 -29
- package/dist/packages/firestore/compat/api/geo_point.d.ts +0 -17
- package/dist/packages/firestore/compat/api/observer.d.ts +0 -29
- package/dist/packages/firestore/compat/api/timestamp.d.ts +0 -17
- package/dist/packages/firestore/compat/config.d.ts +0 -28
- package/dist/packages/firestore/compat/index.console.d.ts +0 -42
- package/dist/packages/firestore/compat/index.d.ts +0 -49
- package/dist/packages/firestore/compat/index.node.d.ts +0 -22
- package/dist/packages/firestore/compat/index.rn.d.ts +0 -22
- package/dist/packages/firestore/compat/register-module.d.ts +0 -42
- package/dist/packages/firestore/compat/util/input_validation.d.ts +0 -18
- package/dist/src/protos/README.md +0 -2
- package/dist/src/protos/firestore/bundle.proto +0 -121
- package/dist/src/protos/firestore_bundle_proto.ts +0 -93
- package/dist/src/protos/firestore_proto_api.ts +0 -1259
- package/dist/src/protos/google/api/annotations.proto +0 -31
- package/dist/src/protos/google/api/http.proto +0 -370
- package/dist/src/protos/google/firestore/v1/common.proto +0 -84
- package/dist/src/protos/google/firestore/v1/document.proto +0 -151
- package/dist/src/protos/google/firestore/v1/firestore.proto +0 -761
- package/dist/src/protos/google/firestore/v1/query.proto +0 -302
- package/dist/src/protos/google/firestore/v1/write.proto +0 -264
- package/dist/src/protos/google/protobuf/any.proto +0 -155
- package/dist/src/protos/google/protobuf/descriptor.proto +0 -882
- package/dist/src/protos/google/protobuf/empty.proto +0 -52
- package/dist/src/protos/google/protobuf/struct.proto +0 -96
- package/dist/src/protos/google/protobuf/timestamp.proto +0 -137
- package/dist/src/protos/google/protobuf/wrappers.proto +0 -123
- package/dist/src/protos/google/rpc/status.proto +0 -92
- package/dist/src/protos/google/type/latlng.proto +0 -71
- package/dist/src/protos/update.sh +0 -61
package/dist/lite/index.d.ts
CHANGED
|
@@ -500,10 +500,10 @@ export declare class Firestore {
|
|
|
500
500
|
* }
|
|
501
501
|
*
|
|
502
502
|
* const postConverter = {
|
|
503
|
-
* toFirestore(post: WithFieldValue<Post>):
|
|
503
|
+
* toFirestore(post: WithFieldValue<Post>): DocumentData {
|
|
504
504
|
* return {title: post.title, author: post.author};
|
|
505
505
|
* },
|
|
506
|
-
* fromFirestore(snapshot:
|
|
506
|
+
* fromFirestore(snapshot: QueryDocumentSnapshot): Post {
|
|
507
507
|
* const data = snapshot.data(options)!;
|
|
508
508
|
* return new Post(data.title, data.author);
|
|
509
509
|
* }
|
|
@@ -14,7 +14,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
|
|
15
15
|
var nodeFetch__default = /*#__PURE__*/_interopDefaultLegacy(nodeFetch);
|
|
16
16
|
|
|
17
|
-
const version$1 = "3.4.
|
|
17
|
+
const version$1 = "3.4.3";
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
@@ -67,7 +67,7 @@ User.GOOGLE_CREDENTIALS = new User('google-credentials-uid');
|
|
|
67
67
|
User.FIRST_PARTY = new User('first-party-uid');
|
|
68
68
|
User.MOCK_USER = new User('mock-user');
|
|
69
69
|
|
|
70
|
-
const version = "9.6.
|
|
70
|
+
const version = "9.6.3";
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* @license
|
|
@@ -5551,7 +5551,7 @@ function parseData(input, context) {
|
|
|
5551
5551
|
return parseObject(input, context);
|
|
5552
5552
|
}
|
|
5553
5553
|
else if (input instanceof FieldValue) {
|
|
5554
|
-
// FieldValues usually parse into transforms (except
|
|
5554
|
+
// FieldValues usually parse into transforms (except deleteField())
|
|
5555
5555
|
// in which case we do not want to include this field in our parsed data
|
|
5556
5556
|
// (as doing so will overwrite the field directly prior to the transform
|
|
5557
5557
|
// trying to transform it). So we don't add this location to
|
|
@@ -5745,7 +5745,7 @@ function fieldPathFromArgument$1(methodName, path, targetDoc) {
|
|
|
5745
5745
|
return fieldPathFromDotSeparatedString(methodName, path);
|
|
5746
5746
|
}
|
|
5747
5747
|
else {
|
|
5748
|
-
const message = 'Field path arguments must be of type string or
|
|
5748
|
+
const message = 'Field path arguments must be of type string or ';
|
|
5749
5749
|
throw createError(message, methodName,
|
|
5750
5750
|
/* hasConverter= */ false,
|
|
5751
5751
|
/* path= */ undefined, targetDoc);
|
|
@@ -6192,8 +6192,7 @@ function newQueryFilter(query, methodName, dataReader, databaseId, fieldPath, op
|
|
|
6192
6192
|
let fieldValue;
|
|
6193
6193
|
if (fieldPath.isKeyField()) {
|
|
6194
6194
|
if (op === "array-contains" /* ARRAY_CONTAINS */ || op === "array-contains-any" /* ARRAY_CONTAINS_ANY */) {
|
|
6195
|
-
throw new FirestoreError(Code.INVALID_ARGUMENT, `Invalid Query. You can't perform '${op}'
|
|
6196
|
-
'queries on FieldPath.documentId().');
|
|
6195
|
+
throw new FirestoreError(Code.INVALID_ARGUMENT, `Invalid Query. You can't perform '${op}' queries on documentId().`);
|
|
6197
6196
|
}
|
|
6198
6197
|
else if (op === "in" /* IN */ || op === "not-in" /* NOT_IN */) {
|
|
6199
6198
|
validateDisjunctiveFilterElements(value, op);
|
|
@@ -6304,14 +6303,14 @@ function newQueryBoundFromFields(query, databaseId, dataReader, methodName, valu
|
|
|
6304
6303
|
`${methodName}(), but got a ${typeof rawValue}`);
|
|
6305
6304
|
}
|
|
6306
6305
|
if (!isCollectionGroupQuery(query) && rawValue.indexOf('/') !== -1) {
|
|
6307
|
-
throw new FirestoreError(Code.INVALID_ARGUMENT, `Invalid query. When querying a collection and ordering by
|
|
6306
|
+
throw new FirestoreError(Code.INVALID_ARGUMENT, `Invalid query. When querying a collection and ordering by documentId(), ` +
|
|
6308
6307
|
`the value passed to ${methodName}() must be a plain document ID, but ` +
|
|
6309
6308
|
`'${rawValue}' contains a slash.`);
|
|
6310
6309
|
}
|
|
6311
6310
|
const path = query.path.child(ResourcePath.fromString(rawValue));
|
|
6312
6311
|
if (!DocumentKey.isDocumentKey(path)) {
|
|
6313
6312
|
throw new FirestoreError(Code.INVALID_ARGUMENT, `Invalid query. When querying a collection group and ordering by ` +
|
|
6314
|
-
`
|
|
6313
|
+
`documentId(), the value passed to ${methodName}() must result in a ` +
|
|
6315
6314
|
`valid document path, but '${path}' is not because it contains an odd number ` +
|
|
6316
6315
|
`of segments.`);
|
|
6317
6316
|
}
|
|
@@ -6334,18 +6333,18 @@ function parseDocumentIdValue(databaseId, query, documentIdValue) {
|
|
|
6334
6333
|
documentIdValue = util.getModularInstance(documentIdValue);
|
|
6335
6334
|
if (typeof documentIdValue === 'string') {
|
|
6336
6335
|
if (documentIdValue === '') {
|
|
6337
|
-
throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid query. When querying with
|
|
6336
|
+
throw new FirestoreError(Code.INVALID_ARGUMENT, 'Invalid query. When querying with documentId(), you ' +
|
|
6338
6337
|
'must provide a valid document ID, but it was an empty string.');
|
|
6339
6338
|
}
|
|
6340
6339
|
if (!isCollectionGroupQuery(query) && documentIdValue.indexOf('/') !== -1) {
|
|
6341
6340
|
throw new FirestoreError(Code.INVALID_ARGUMENT, `Invalid query. When querying a collection by ` +
|
|
6342
|
-
`
|
|
6341
|
+
`documentId(), you must provide a plain document ID, but ` +
|
|
6343
6342
|
`'${documentIdValue}' contains a '/' character.`);
|
|
6344
6343
|
}
|
|
6345
6344
|
const path = query.path.child(ResourcePath.fromString(documentIdValue));
|
|
6346
6345
|
if (!DocumentKey.isDocumentKey(path)) {
|
|
6347
6346
|
throw new FirestoreError(Code.INVALID_ARGUMENT, `Invalid query. When querying a collection group by ` +
|
|
6348
|
-
`
|
|
6347
|
+
`documentId(), the value provided must result in a valid document path, ` +
|
|
6349
6348
|
`but '${path}' is not because it has an odd number of segments (${path.length}).`);
|
|
6350
6349
|
}
|
|
6351
6350
|
return refValue(databaseId, new DocumentKey(path));
|
|
@@ -6354,7 +6353,7 @@ function parseDocumentIdValue(databaseId, query, documentIdValue) {
|
|
|
6354
6353
|
return refValue(databaseId, documentIdValue._key);
|
|
6355
6354
|
}
|
|
6356
6355
|
else {
|
|
6357
|
-
throw new FirestoreError(Code.INVALID_ARGUMENT, `Invalid query. When querying with
|
|
6356
|
+
throw new FirestoreError(Code.INVALID_ARGUMENT, `Invalid query. When querying with documentId(), you must provide a valid ` +
|
|
6358
6357
|
`string or a DocumentReference, but it was: ` +
|
|
6359
6358
|
`${valueDescription(documentIdValue)}.`);
|
|
6360
6359
|
}
|