@firebase/firestore 3.4.7-canary.e9e5f6b3c → 3.4.8
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/local/indexeddb_remote_document_cache.d.ts +9 -0
- package/dist/firestore/src/local/simple_db.d.ts +2 -0
- package/dist/firestore/test/unit/local/test_remote_document_cache.d.ts +0 -4
- package/dist/index.esm2017.js +153 -146
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +69 -65
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +26 -9
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +26 -9
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +14 -7
- package/dist/index.rn.js.map +1 -1
- package/dist/lite/firestore/src/local/indexeddb_remote_document_cache.d.ts +9 -0
- package/dist/lite/firestore/src/local/simple_db.d.ts +2 -0
- package/dist/lite/firestore/test/unit/local/test_remote_document_cache.d.ts +0 -4
- package/dist/lite/index.browser.esm2017.js +73 -73
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +8 -8
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.node.cjs.js +2 -2
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +2 -2
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +1112 -1112
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +18 -18
- package/dist/lite/packages/firestore/src/local/indexeddb_remote_document_cache.d.ts +9 -0
- package/dist/lite/packages/firestore/src/local/simple_db.d.ts +2 -0
- package/dist/lite/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +0 -4
- package/dist/packages/firestore/dist/index.esm2017.d.ts +8 -8
- package/dist/packages/firestore/src/local/indexeddb_remote_document_cache.d.ts +9 -0
- package/dist/packages/firestore/src/local/simple_db.d.ts +2 -0
- package/dist/packages/firestore/test/unit/local/test_remote_document_cache.d.ts +0 -4
- package/package.json +9 -9
|
@@ -243,7 +243,7 @@ declare class an {
|
|
|
243
243
|
/**
|
|
244
244
|
* Sentinel values that can be used when writing document fields with `set()`
|
|
245
245
|
* or `update()`.
|
|
246
|
-
*/ declare class
|
|
246
|
+
*/ declare class vn {
|
|
247
247
|
/**
|
|
248
248
|
* @param _methodName - The public API endpoint that returns this class.
|
|
249
249
|
* @hideconstructor
|
|
@@ -335,7 +335,7 @@ declare class an {
|
|
|
335
335
|
*
|
|
336
336
|
* Latitude values are in the range of [-90, 90].
|
|
337
337
|
* Longitude values are in the range of [-180, 180].
|
|
338
|
-
*/ declare class
|
|
338
|
+
*/ declare class bn {
|
|
339
339
|
/**
|
|
340
340
|
* Creates a new immutable `GeoPoint` object with the provided latitude and
|
|
341
341
|
* longitude values.
|
|
@@ -724,7 +724,7 @@ declare function fr(...t: any[]): lr;
|
|
|
724
724
|
* @param reference - The reference of the document to fetch.
|
|
725
725
|
* @returns A Promise resolved with a `DocumentSnapshot` containing the current
|
|
726
726
|
* document contents.
|
|
727
|
-
*/ declare function
|
|
727
|
+
*/ declare function vr(t: any): Promise<Yn>;
|
|
728
728
|
/**
|
|
729
729
|
* Executes the query and returns the results as a {@link QuerySnapshot}.
|
|
730
730
|
*
|
|
@@ -736,7 +736,7 @@ declare function fr(...t: any[]): lr;
|
|
|
736
736
|
*
|
|
737
737
|
* @param query - The `Query` to execute.
|
|
738
738
|
* @returns A Promise that will be resolved with the results of the query.
|
|
739
|
-
*/ declare function
|
|
739
|
+
*/ declare function br(t: any): Promise<Kn>;
|
|
740
740
|
/**
|
|
741
741
|
* Returns the existing `Firestore` instance that is associated with the
|
|
742
742
|
* provided {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new
|
|
@@ -979,40 +979,40 @@ import { FirebaseError as c } from "@firebase/util/dist/src/errors";
|
|
|
979
979
|
q: any;
|
|
980
980
|
/** Creates a new top-level parse context. */ ht(t: any, e: any, n: any, r?: boolean): Rn;
|
|
981
981
|
}
|
|
982
|
-
declare class xn extends
|
|
982
|
+
declare class xn extends vn {
|
|
983
983
|
constructor(t: any, e: any);
|
|
984
984
|
lt: any;
|
|
985
|
-
_toFieldTransform(t: any):
|
|
985
|
+
_toFieldTransform(t: any): ve;
|
|
986
986
|
isEqual(t: any): boolean;
|
|
987
987
|
}
|
|
988
|
-
declare class Fn extends
|
|
988
|
+
declare class Fn extends vn {
|
|
989
989
|
constructor(t: any, e: any);
|
|
990
990
|
lt: any;
|
|
991
|
-
_toFieldTransform(t: any):
|
|
991
|
+
_toFieldTransform(t: any): ve;
|
|
992
992
|
isEqual(t: any): boolean;
|
|
993
993
|
}
|
|
994
|
-
declare class Nn extends
|
|
994
|
+
declare class Nn extends vn {
|
|
995
995
|
_toFieldTransform(t: any): null;
|
|
996
996
|
isEqual(t: any): boolean;
|
|
997
997
|
}
|
|
998
998
|
declare class lr extends Zn {
|
|
999
999
|
constructor(t: any, e: any, n: any);
|
|
1000
1000
|
type: any;
|
|
1001
|
-
|
|
1001
|
+
bt: any;
|
|
1002
1002
|
Et: any;
|
|
1003
1003
|
_apply(t: any): hn;
|
|
1004
1004
|
}
|
|
1005
|
-
declare class qn extends
|
|
1005
|
+
declare class qn extends vn {
|
|
1006
1006
|
constructor(t: any, e: any);
|
|
1007
1007
|
ft: any;
|
|
1008
|
-
_toFieldTransform(t: any):
|
|
1008
|
+
_toFieldTransform(t: any): ve;
|
|
1009
1009
|
isEqual(t: any): boolean;
|
|
1010
1010
|
}
|
|
1011
1011
|
declare class ir extends Zn {
|
|
1012
1012
|
constructor(t: any, e: any, n: any);
|
|
1013
1013
|
type: any;
|
|
1014
1014
|
gt: any;
|
|
1015
|
-
|
|
1015
|
+
vt: any;
|
|
1016
1016
|
_apply(t: any): hn;
|
|
1017
1017
|
}
|
|
1018
1018
|
declare class rr extends Zn {
|
|
@@ -1022,14 +1022,14 @@ declare class rr extends Zn {
|
|
|
1022
1022
|
type: string;
|
|
1023
1023
|
_apply(t: any): hn;
|
|
1024
1024
|
}
|
|
1025
|
-
declare class Sn extends
|
|
1026
|
-
_toFieldTransform(t: any):
|
|
1025
|
+
declare class Sn extends vn {
|
|
1026
|
+
_toFieldTransform(t: any): ve;
|
|
1027
1027
|
isEqual(t: any): boolean;
|
|
1028
1028
|
}
|
|
1029
1029
|
declare class cr extends Zn {
|
|
1030
1030
|
constructor(t: any, e: any, n: any);
|
|
1031
1031
|
type: any;
|
|
1032
|
-
|
|
1032
|
+
bt: any;
|
|
1033
1033
|
Et: any;
|
|
1034
1034
|
_apply(t: any): hn;
|
|
1035
1035
|
}
|
|
@@ -1134,9 +1134,9 @@ declare class J {
|
|
|
1134
1134
|
* See the License for the specific language governing permissions and
|
|
1135
1135
|
* limitations under the License.
|
|
1136
1136
|
*/
|
|
1137
|
-
/** A field path and the TransformOperation to perform upon it. */ declare class
|
|
1137
|
+
/** A field path and the TransformOperation to perform upon it. */ declare class ve {
|
|
1138
1138
|
constructor(t: any, e: any);
|
|
1139
1139
|
field: any;
|
|
1140
1140
|
transform: any;
|
|
1141
1141
|
}
|
|
1142
|
-
export { gn as Bytes, ln as CollectionReference, an as DocumentReference, Yn as DocumentSnapshot, yn as FieldPath,
|
|
1142
|
+
export { gn as Bytes, ln as CollectionReference, an as DocumentReference, Yn as DocumentSnapshot, yn as FieldPath, vn as FieldValue, rn as Firestore, U as FirestoreError, bn as GeoPoint, hn as Query, Zn as QueryConstraint, Hn as QueryDocumentSnapshot, Kn as QuerySnapshot, gt as Timestamp, Ur as Transaction, $r as WriteBatch, Ar as addDoc, Dr as arrayRemove, Vr as arrayUnion, fn as collection, dn as collectionGroup, un as connectFirestoreEmulator, Ir as deleteDoc, Rr as deleteField, wn as doc, _n as documentId, dr as endAt, fr as endBefore, vr as getDoc, br as getDocs, on as getFirestore, Nr as increment, sn as initializeFirestore, or as limit, ur as limitToLast, sr as orderBy, tr as query, pn as queryEqual, mn as refEqual, kr as runTransaction, Pr as serverTimestamp, Er as setDoc, w as setLogLevel, Jn as snapshotEqual, hr as startAfter, ar as startAt, cn as terminate, Tr as updateDoc, nr as where, Fr as writeBatch };
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { MutableDocument } from '../model/document';
|
|
18
|
+
import { DocumentKey } from '../model/document_key';
|
|
18
19
|
import { LocalSerializer } from './local_serializer';
|
|
19
20
|
import { RemoteDocumentCache } from './remote_document_cache';
|
|
20
21
|
export interface DocumentSizeEntry {
|
|
@@ -25,3 +26,11 @@ export interface IndexedDbRemoteDocumentCache extends RemoteDocumentCache {
|
|
|
25
26
|
}
|
|
26
27
|
/** Creates a new IndexedDbRemoteDocumentCache. */
|
|
27
28
|
export declare function newIndexedDbRemoteDocumentCache(serializer: LocalSerializer): IndexedDbRemoteDocumentCache;
|
|
29
|
+
/**
|
|
30
|
+
* Comparator that compares document keys according to the primary key sorting
|
|
31
|
+
* used by the `DbRemoteDocumentDocument` store (by prefix path, collection id
|
|
32
|
+
* and then document ID).
|
|
33
|
+
*
|
|
34
|
+
* Visible for testing.
|
|
35
|
+
*/
|
|
36
|
+
export declare function dbKeyComparator(l: DocumentKey, r: DocumentKey): number;
|
|
@@ -186,6 +186,8 @@ export declare class SimpleDbStore<KeyType extends IDBValidKey, ValueType extend
|
|
|
186
186
|
loadAll(): PersistencePromise<ValueType[]>;
|
|
187
187
|
/** Loads all elements for the index range from the object store. */
|
|
188
188
|
loadAll(range: IDBKeyRange): PersistencePromise<ValueType[]>;
|
|
189
|
+
/** Loads all elements ordered by the given index. */
|
|
190
|
+
loadAll(index: string): PersistencePromise<ValueType[]>;
|
|
189
191
|
/**
|
|
190
192
|
* Loads all elements from the object store that fall into the provided in the
|
|
191
193
|
* index range for the given index.
|
|
@@ -47,10 +47,6 @@ export declare class TestRemoteDocumentCache {
|
|
|
47
47
|
getEntries(documentKeys: DocumentKeySet): Promise<MutableDocumentMap>;
|
|
48
48
|
getAllFromCollection(collection: ResourcePath, offset: IndexOffset): Promise<MutableDocumentMap>;
|
|
49
49
|
getAllFromCollectionGroup(collectionGroup: string, offset: IndexOffset, limit: number): Promise<MutableDocumentMap>;
|
|
50
|
-
getNewDocumentChanges(sinceReadTime: SnapshotVersion): Promise<{
|
|
51
|
-
changedDocs: MutableDocumentMap;
|
|
52
|
-
readTime: SnapshotVersion;
|
|
53
|
-
}>;
|
|
54
50
|
getSize(): Promise<number>;
|
|
55
51
|
newChangeBuffer(options?: {
|
|
56
52
|
trackRemovals: boolean;
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
* For a `DocumentSnapshot` that points to a non-existing document, any data
|
|
165
165
|
* access will return 'undefined'. You can use the `exists()` method to
|
|
166
166
|
* explicitly verify a document's existence.
|
|
167
|
-
*/ declare class
|
|
167
|
+
*/ declare class Ph extends Th {
|
|
168
168
|
/** @hideconstructor protected */
|
|
169
169
|
constructor(t: any, e: any, n: any, s: any, i: any, r: any);
|
|
170
170
|
_firestoreImpl: any;
|
|
@@ -318,7 +318,7 @@ declare class vc extends _c {
|
|
|
318
318
|
* with an underscore.
|
|
319
319
|
*/ _compareTo(t: any): 0 | 1 | -1;
|
|
320
320
|
}
|
|
321
|
-
declare class
|
|
321
|
+
declare class bc {
|
|
322
322
|
_progressObserver: {};
|
|
323
323
|
_taskCompletionResolver: j;
|
|
324
324
|
_lastProgress: {
|
|
@@ -399,7 +399,7 @@ declare class Pc {
|
|
|
399
399
|
* `DocumentSnapshot`. Since query results contain only existing documents, the
|
|
400
400
|
* `exists` property will always be true and `data()` will never return
|
|
401
401
|
* 'undefined'.
|
|
402
|
-
*/ declare class
|
|
402
|
+
*/ declare class bh extends Ph {
|
|
403
403
|
}
|
|
404
404
|
/**
|
|
405
405
|
* A `QuerySnapshot` contains zero or more `DocumentSnapshot` objects
|
|
@@ -1012,21 +1012,21 @@ declare function Gh(...t: any[]): Kh;
|
|
|
1012
1012
|
* @returns A Promise resolved with a `DocumentSnapshot` containing the
|
|
1013
1013
|
* current document contents.
|
|
1014
1014
|
*/
|
|
1015
|
-
declare function el(t: any): Promise<
|
|
1015
|
+
declare function el(t: any): Promise<Ph>;
|
|
1016
1016
|
/**
|
|
1017
1017
|
* Reads the document referred to by this `DocumentReference` from cache.
|
|
1018
1018
|
* Returns an error if the document is not currently cached.
|
|
1019
1019
|
*
|
|
1020
1020
|
* @returns A `Promise` resolved with a `DocumentSnapshot` containing the
|
|
1021
1021
|
* current document contents.
|
|
1022
|
-
*/ declare function sl(t: any): Promise<
|
|
1022
|
+
*/ declare function sl(t: any): Promise<Ph>;
|
|
1023
1023
|
/**
|
|
1024
1024
|
* Reads the document referred to by this `DocumentReference` from the server.
|
|
1025
1025
|
* Returns an error if the network is not available.
|
|
1026
1026
|
*
|
|
1027
1027
|
* @returns A `Promise` resolved with a `DocumentSnapshot` containing the
|
|
1028
1028
|
* current document contents.
|
|
1029
|
-
*/ declare function il(t: any): Promise<
|
|
1029
|
+
*/ declare function il(t: any): Promise<Ph>;
|
|
1030
1030
|
/**
|
|
1031
1031
|
* Executes the query and returns the results as a `QuerySnapshot`.
|
|
1032
1032
|
*
|
|
@@ -1113,7 +1113,7 @@ declare function el(t: any): Promise<bh>;
|
|
|
1113
1113
|
* @returns A `LoadBundleTask` object, which notifies callers with progress
|
|
1114
1114
|
* updates, and completion or error events. It can be used as a
|
|
1115
1115
|
* `Promise<LoadBundleTaskProgress>`.
|
|
1116
|
-
*/ declare function Uc(t: any, e: any):
|
|
1116
|
+
*/ declare function Uc(t: any, e: any): bc;
|
|
1117
1117
|
/**
|
|
1118
1118
|
* Reads a Firestore {@link Query} from local cache, identified by the given
|
|
1119
1119
|
* name.
|
|
@@ -1806,4 +1806,4 @@ declare class Su {
|
|
|
1806
1806
|
field: any;
|
|
1807
1807
|
transform: any;
|
|
1808
1808
|
}
|
|
1809
|
-
export { Jh as AbstractUserDataWriter, jc as Bytes, Vc as CACHE_SIZE_UNLIMITED, yc as CollectionReference, mc as DocumentReference,
|
|
1809
|
+
export { Jh as AbstractUserDataWriter, jc as Bytes, Vc as CACHE_SIZE_UNLIMITED, yc as CollectionReference, mc as DocumentReference, Ph as DocumentSnapshot, Gc as FieldPath, Wc as FieldValue, vc as Firestore, Q as FirestoreError, zc as GeoPoint, bc as LoadBundleTask, gc as Query, Ch as QueryConstraint, bh as QueryDocumentSnapshot, Vh as QuerySnapshot, Rh as SnapshotMetadata, at as Timestamp, ml as Transaction, Zh as WriteBatch, vt as _DatabaseId, xt as _DocumentKey, et as _EmptyAppCheckTokenProvider, z as _EmptyAuthCredentialsProvider, mt as _FieldPath, lc as _cast, q as _debugAssert, yt as _isBase64Available, $ as _logWarn, Rl as _setIndexConfiguration, uc as _validateIsNotUsedTogether, ll as addDoc, Tl as arrayRemove, Il as arrayUnion, Oc as clearIndexedDbPersistence, pc as collection, Ic as collectionGroup, wc as connectFirestoreEmulator, hl as deleteDoc, yl as deleteField, Bc as disableNetwork, Tc as doc, Qc as documentId, Nc as enableIndexedDbPersistence, kc as enableMultiTabIndexedDbPersistence, $c as enableNetwork, Qh as endAt, Gh as endBefore, Cc as ensureFirestoreConfigured, _l as executeWrite, el as getDoc, sl as getDocFromCache, il as getDocFromServer, rl as getDocs, ol as getDocsFromCache, ul as getDocsFromServer, Dc as getFirestore, El as increment, Sc as initializeFirestore, $h as limit, Bh as limitToLast, Uc as loadBundle, qc as namedQuery, fl as onSnapshot, dl as onSnapshotsInSync, Oh as orderBy, xh as query, Ac as queryEqual, Ec as refEqual, gl as runTransaction, pl as serverTimestamp, al as setDoc, M as setLogLevel, Sh as snapshotEqual, qh as startAfter, Uh as startAt, Lc as terminate, cl as updateDoc, Fc as waitForPendingWrites, kh as where, Al as writeBatch };
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { MutableDocument } from '../model/document';
|
|
18
|
+
import { DocumentKey } from '../model/document_key';
|
|
18
19
|
import { LocalSerializer } from './local_serializer';
|
|
19
20
|
import { RemoteDocumentCache } from './remote_document_cache';
|
|
20
21
|
export interface DocumentSizeEntry {
|
|
@@ -25,3 +26,11 @@ export interface IndexedDbRemoteDocumentCache extends RemoteDocumentCache {
|
|
|
25
26
|
}
|
|
26
27
|
/** Creates a new IndexedDbRemoteDocumentCache. */
|
|
27
28
|
export declare function newIndexedDbRemoteDocumentCache(serializer: LocalSerializer): IndexedDbRemoteDocumentCache;
|
|
29
|
+
/**
|
|
30
|
+
* Comparator that compares document keys according to the primary key sorting
|
|
31
|
+
* used by the `DbRemoteDocumentDocument` store (by prefix path, collection id
|
|
32
|
+
* and then document ID).
|
|
33
|
+
*
|
|
34
|
+
* Visible for testing.
|
|
35
|
+
*/
|
|
36
|
+
export declare function dbKeyComparator(l: DocumentKey, r: DocumentKey): number;
|
|
@@ -186,6 +186,8 @@ export declare class SimpleDbStore<KeyType extends IDBValidKey, ValueType extend
|
|
|
186
186
|
loadAll(): PersistencePromise<ValueType[]>;
|
|
187
187
|
/** Loads all elements for the index range from the object store. */
|
|
188
188
|
loadAll(range: IDBKeyRange): PersistencePromise<ValueType[]>;
|
|
189
|
+
/** Loads all elements ordered by the given index. */
|
|
190
|
+
loadAll(index: string): PersistencePromise<ValueType[]>;
|
|
189
191
|
/**
|
|
190
192
|
* Loads all elements from the object store that fall into the provided in the
|
|
191
193
|
* index range for the given index.
|
|
@@ -47,10 +47,6 @@ export declare class TestRemoteDocumentCache {
|
|
|
47
47
|
getEntries(documentKeys: DocumentKeySet): Promise<MutableDocumentMap>;
|
|
48
48
|
getAllFromCollection(collection: ResourcePath, offset: IndexOffset): Promise<MutableDocumentMap>;
|
|
49
49
|
getAllFromCollectionGroup(collectionGroup: string, offset: IndexOffset, limit: number): Promise<MutableDocumentMap>;
|
|
50
|
-
getNewDocumentChanges(sinceReadTime: SnapshotVersion): Promise<{
|
|
51
|
-
changedDocs: MutableDocumentMap;
|
|
52
|
-
readTime: SnapshotVersion;
|
|
53
|
-
}>;
|
|
54
50
|
getSize(): Promise<number>;
|
|
55
51
|
newChangeBuffer(options?: {
|
|
56
52
|
trackRemovals: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/firestore",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.8",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=10.10.0"
|
|
6
6
|
},
|
|
@@ -77,22 +77,22 @@
|
|
|
77
77
|
"lite/package.json"
|
|
78
78
|
],
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@firebase/component": "0.5.
|
|
81
|
-
"@firebase/logger": "0.3.2
|
|
82
|
-
"@firebase/util": "1.5.
|
|
83
|
-
"@firebase/webchannel-wrapper": "0.6.1
|
|
80
|
+
"@firebase/component": "0.5.13",
|
|
81
|
+
"@firebase/logger": "0.3.2",
|
|
82
|
+
"@firebase/util": "1.5.2",
|
|
83
|
+
"@firebase/webchannel-wrapper": "0.6.1",
|
|
84
84
|
"@grpc/grpc-js": "^1.3.2",
|
|
85
85
|
"@grpc/proto-loader": "^0.6.0",
|
|
86
86
|
"node-fetch": "2.6.7",
|
|
87
87
|
"tslib": "^2.1.0"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
|
-
"@firebase/app": "0.
|
|
90
|
+
"@firebase/app": "0.x"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
|
-
"@firebase/app": "0.7.
|
|
94
|
-
"@firebase/app-compat": "0.1.
|
|
95
|
-
"@firebase/auth": "0.19.
|
|
93
|
+
"@firebase/app": "0.7.21",
|
|
94
|
+
"@firebase/app-compat": "0.1.22",
|
|
95
|
+
"@firebase/auth": "0.19.12",
|
|
96
96
|
"@rollup/plugin-alias": "3.1.5",
|
|
97
97
|
"@rollup/plugin-json": "4.1.0",
|
|
98
98
|
"@types/eslint": "7.28.0",
|