@firebase/firestore 4.1.3-canary.74fc4cf9c → 4.1.3-canary.fbd8e0e2e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/firestore/src/api/index_configuration.d.ts +25 -0
- package/dist/firestore/src/api/persistent_cache_index_manager.d.ts +6 -19
- package/dist/firestore/src/global_index.d.ts +31 -19
- package/dist/index.cjs.js +11 -23
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +65 -5
- package/dist/index.esm2017.js +11 -23
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +11 -23
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +8 -21
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +8 -21
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +98 -110
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +31 -19
- package/dist/lite/firestore/src/api/index_configuration.d.ts +25 -0
- package/dist/lite/firestore/src/api/persistent_cache_index_manager.d.ts +6 -19
- package/dist/lite/index.browser.esm2017.js +2 -2
- package/dist/lite/index.browser.esm5.js +37 -37
- package/dist/lite/index.cjs.js +2 -2
- package/dist/lite/index.node.cjs.js +2 -2
- package/dist/lite/index.node.mjs +2 -2
- package/dist/lite/index.rn.esm2017.js +2 -2
- package/dist/lite/packages/firestore/src/api/index_configuration.d.ts +25 -0
- package/dist/lite/packages/firestore/src/api/persistent_cache_index_manager.d.ts +6 -19
- package/dist/packages/firestore/dist/index.esm2017.d.ts +6 -19
- package/dist/packages/firestore/src/api/index_configuration.d.ts +25 -0
- package/dist/packages/firestore/src/api/persistent_cache_index_manager.d.ts +6 -19
- package/dist/private.d.ts +67 -5
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -319,7 +319,13 @@ export declare class CollectionReference<AppModelType = DocumentData, DbModelTyp
|
|
|
319
319
|
export declare function connectFirestoreEmulator(firestore: Firestore, host: string, port: number, options?: {
|
|
320
320
|
mockUserToken?: EmulatorMockTokenOptions | string;
|
|
321
321
|
}): void;
|
|
322
|
-
|
|
322
|
+
/**
|
|
323
|
+
* Removes all persistent cache indexes.
|
|
324
|
+
*
|
|
325
|
+
* Please note this function will also deletes indexes generated by
|
|
326
|
+
* `setIndexConfiguration()`, which is deprecated.
|
|
327
|
+
*/
|
|
328
|
+
export declare function deleteAllPersistentCacheIndexes(indexManager: PersistentCacheIndexManager): void;
|
|
323
329
|
/**
|
|
324
330
|
* Deletes the document referred to by the specified `DocumentReference`.
|
|
325
331
|
*
|
|
@@ -342,7 +348,12 @@ export declare function deleteField(): FieldValue;
|
|
|
342
348
|
* @returns A `Promise` that is resolved once the network has been disabled.
|
|
343
349
|
*/
|
|
344
350
|
export declare function disableNetwork(firestore: Firestore): Promise<void>;
|
|
345
|
-
|
|
351
|
+
/**
|
|
352
|
+
* Stops creating persistent cache indexes automatically for local query
|
|
353
|
+
* execution. The indexes which have been created by calling
|
|
354
|
+
* `enablePersistentCacheIndexAutoCreation()` still take effect.
|
|
355
|
+
*/
|
|
356
|
+
export declare function disablePersistentCacheIndexAutoCreation(indexManager: PersistentCacheIndexManager): void;
|
|
346
357
|
/**
|
|
347
358
|
* Gets a `DocumentReference` instance that refers to the document at the
|
|
348
359
|
* specified absolute path.
|
|
@@ -604,7 +615,14 @@ export declare function enableMultiTabIndexedDbPersistence(firestore: Firestore)
|
|
|
604
615
|
* @returns A `Promise` that is resolved once the network has been enabled.
|
|
605
616
|
*/
|
|
606
617
|
export declare function enableNetwork(firestore: Firestore): Promise<void>;
|
|
607
|
-
|
|
618
|
+
/**
|
|
619
|
+
* Enables the SDK to create persistent cache indexes automatically for local
|
|
620
|
+
* query execution when the SDK believes cache indexes can help improve
|
|
621
|
+
* performance.
|
|
622
|
+
*
|
|
623
|
+
* This feature is disabled by default.
|
|
624
|
+
*/
|
|
625
|
+
export declare function enablePersistentCacheIndexAutoCreation(indexManager: PersistentCacheIndexManager): void;
|
|
608
626
|
/**
|
|
609
627
|
* Creates a {@link QueryEndAtConstraint} that modifies the result set to end at
|
|
610
628
|
* the provided document (inclusive). The end position is relative to the order
|
|
@@ -1151,7 +1169,14 @@ export declare function getFirestore(): Firestore;
|
|
|
1151
1169
|
* @beta
|
|
1152
1170
|
*/
|
|
1153
1171
|
export declare function getFirestore(app: FirebaseApp, databaseId: string): Firestore;
|
|
1154
|
-
|
|
1172
|
+
/**
|
|
1173
|
+
* Returns the PersistentCache Index Manager used by the given `Firestore`
|
|
1174
|
+
* object.
|
|
1175
|
+
*
|
|
1176
|
+
* @return The `PersistentCacheIndexManager` instance, or `null` if local
|
|
1177
|
+
* persistent storage is not in use.
|
|
1178
|
+
*/
|
|
1179
|
+
export declare function getPersistentCacheIndexManager(firestore: Firestore): PersistentCacheIndexManager | null;
|
|
1155
1180
|
/**
|
|
1156
1181
|
* Returns a special value that can be used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link
|
|
1157
1182
|
* @firebase/firestore/lite#(updateDoc:1)} that tells the server to increment the field's current value by
|
|
@@ -1174,6 +1199,11 @@ export declare function getFirestore(app: FirebaseApp, databaseId: string): Fire
|
|
|
1174
1199
|
export declare function increment(n: number): FieldValue;
|
|
1175
1200
|
/**
|
|
1176
1201
|
* The SDK definition of a Firestore index.
|
|
1202
|
+
*
|
|
1203
|
+
* @deprecated Instead of creating cache indexes manually, consider using
|
|
1204
|
+
* `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to
|
|
1205
|
+
* create cache indexes for queries running locally.
|
|
1206
|
+
*
|
|
1177
1207
|
* @beta
|
|
1178
1208
|
*/
|
|
1179
1209
|
export declare interface Index {
|
|
@@ -1188,6 +1218,11 @@ export declare interface Index {
|
|
|
1188
1218
|
*
|
|
1189
1219
|
* See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
|
|
1190
1220
|
* for a description of the format of the index definition.
|
|
1221
|
+
*
|
|
1222
|
+
* @deprecated Instead of creating cache indexes manually, consider using
|
|
1223
|
+
* `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to
|
|
1224
|
+
* create cache indexes for queries running locally.
|
|
1225
|
+
*
|
|
1191
1226
|
* @beta
|
|
1192
1227
|
*/
|
|
1193
1228
|
export declare interface IndexConfiguration {
|
|
@@ -1197,6 +1232,11 @@ export declare interface IndexConfiguration {
|
|
|
1197
1232
|
}
|
|
1198
1233
|
/**
|
|
1199
1234
|
* A single field element in an index configuration.
|
|
1235
|
+
*
|
|
1236
|
+
* @deprecated Instead of creating cache indexes manually, consider using
|
|
1237
|
+
* `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to
|
|
1238
|
+
* create cache indexes for queries running locally.
|
|
1239
|
+
*
|
|
1200
1240
|
* @beta
|
|
1201
1241
|
*/
|
|
1202
1242
|
export declare interface IndexField {
|
|
@@ -1648,7 +1688,17 @@ export declare interface PersistenceSettings {
|
|
|
1648
1688
|
*/
|
|
1649
1689
|
forceOwnership?: boolean;
|
|
1650
1690
|
}
|
|
1651
|
-
|
|
1691
|
+
/**
|
|
1692
|
+
* A `PersistentCacheIndexManager` for configuring persistent cache indexes used
|
|
1693
|
+
* for local query execution.
|
|
1694
|
+
*
|
|
1695
|
+
* To use, call `getPersistentCacheIndexManager()` to get an instance.
|
|
1696
|
+
*/
|
|
1697
|
+
export declare class PersistentCacheIndexManager {
|
|
1698
|
+
/** A type string to uniquely identify instances of this class. */
|
|
1699
|
+
readonly type: 'PersistentCacheIndexManager';
|
|
1700
|
+
private constructor();
|
|
1701
|
+
}
|
|
1652
1702
|
/**
|
|
1653
1703
|
* An settings object to configure an `PersistentLocalCache` instance.
|
|
1654
1704
|
*
|
|
@@ -2051,6 +2101,11 @@ export declare function setDoc<AppModelType, DbModelType extends DocumentData>(r
|
|
|
2051
2101
|
* @throws FirestoreError if the JSON format is invalid.
|
|
2052
2102
|
* @returns A `Promise` that resolves once all indices are successfully
|
|
2053
2103
|
* configured.
|
|
2104
|
+
*
|
|
2105
|
+
* @deprecated Instead of creating cache indexes manually, consider using
|
|
2106
|
+
* `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to
|
|
2107
|
+
* create cache indexes for queries running locally.
|
|
2108
|
+
*
|
|
2054
2109
|
* @beta
|
|
2055
2110
|
*/
|
|
2056
2111
|
export declare function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
|
|
@@ -2078,6 +2133,11 @@ export declare function setIndexConfiguration(firestore: Firestore, configuratio
|
|
|
2078
2133
|
* @throws FirestoreError if the JSON format is invalid.
|
|
2079
2134
|
* @returns A `Promise` that resolves once all indices are successfully
|
|
2080
2135
|
* configured.
|
|
2136
|
+
*
|
|
2137
|
+
* @deprecated Instead of creating cache indexes manually, consider using
|
|
2138
|
+
* `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to
|
|
2139
|
+
* create cache indexes for queries running locally.
|
|
2140
|
+
*
|
|
2081
2141
|
* @beta
|
|
2082
2142
|
*/
|
|
2083
2143
|
export declare function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
|
package/dist/index.esm2017.js
CHANGED
|
@@ -66,7 +66,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
66
66
|
* See the License for the specific language governing permissions and
|
|
67
67
|
* limitations under the License.
|
|
68
68
|
*/
|
|
69
|
-
let S = "10.3.1-canary.
|
|
69
|
+
let S = "10.3.1-canary.fbd8e0e2e";
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
@@ -21656,17 +21656,16 @@ function __PRIVATE_tryGetString(e, t) {
|
|
|
21656
21656
|
* limitations under the License.
|
|
21657
21657
|
*/
|
|
21658
21658
|
/**
|
|
21659
|
-
* A `PersistentCacheIndexManager`
|
|
21660
|
-
*
|
|
21659
|
+
* A `PersistentCacheIndexManager` for configuring persistent cache indexes used
|
|
21660
|
+
* for local query execution.
|
|
21661
21661
|
*
|
|
21662
21662
|
* To use, call `getPersistentCacheIndexManager()` to get an instance.
|
|
21663
|
-
*
|
|
21664
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
21665
|
-
* @internal
|
|
21666
21663
|
*/ class PersistentCacheIndexManager {
|
|
21667
21664
|
/** @hideconstructor */
|
|
21668
21665
|
constructor(e) {
|
|
21669
|
-
this._client = e,
|
|
21666
|
+
this._client = e,
|
|
21667
|
+
/** A type string to uniquely identify instances of this class. */
|
|
21668
|
+
this.type = "PersistentCacheIndexManager";
|
|
21670
21669
|
}
|
|
21671
21670
|
}
|
|
21672
21671
|
|
|
@@ -21676,9 +21675,6 @@ function __PRIVATE_tryGetString(e, t) {
|
|
|
21676
21675
|
*
|
|
21677
21676
|
* @return The `PersistentCacheIndexManager` instance, or `null` if local
|
|
21678
21677
|
* persistent storage is not in use.
|
|
21679
|
-
*
|
|
21680
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
21681
|
-
* @internal
|
|
21682
21678
|
*/ function getPersistentCacheIndexManager(e) {
|
|
21683
21679
|
var t;
|
|
21684
21680
|
e = __PRIVATE_cast(e, Firestore);
|
|
@@ -21691,13 +21687,11 @@ function __PRIVATE_tryGetString(e, t) {
|
|
|
21691
21687
|
}
|
|
21692
21688
|
|
|
21693
21689
|
/**
|
|
21694
|
-
* Enables SDK to create persistent cache indexes automatically for local
|
|
21695
|
-
* execution when SDK believes cache indexes can help
|
|
21690
|
+
* Enables the SDK to create persistent cache indexes automatically for local
|
|
21691
|
+
* query execution when the SDK believes cache indexes can help improve
|
|
21692
|
+
* performance.
|
|
21696
21693
|
*
|
|
21697
21694
|
* This feature is disabled by default.
|
|
21698
|
-
*
|
|
21699
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
21700
|
-
* @internal
|
|
21701
21695
|
*/ function enablePersistentCacheIndexAutoCreation(e) {
|
|
21702
21696
|
__PRIVATE_setPersistentCacheIndexAutoCreationEnabled(e, !0);
|
|
21703
21697
|
}
|
|
@@ -21706,9 +21700,6 @@ function __PRIVATE_tryGetString(e, t) {
|
|
|
21706
21700
|
* Stops creating persistent cache indexes automatically for local query
|
|
21707
21701
|
* execution. The indexes which have been created by calling
|
|
21708
21702
|
* `enablePersistentCacheIndexAutoCreation()` still take effect.
|
|
21709
|
-
*
|
|
21710
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
21711
|
-
* @internal
|
|
21712
21703
|
*/ function disablePersistentCacheIndexAutoCreation(e) {
|
|
21713
21704
|
__PRIVATE_setPersistentCacheIndexAutoCreationEnabled(e, !1);
|
|
21714
21705
|
}
|
|
@@ -21718,9 +21709,6 @@ function __PRIVATE_tryGetString(e, t) {
|
|
|
21718
21709
|
*
|
|
21719
21710
|
* Please note this function will also deletes indexes generated by
|
|
21720
21711
|
* `setIndexConfiguration()`, which is deprecated.
|
|
21721
|
-
*
|
|
21722
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
21723
|
-
* @internal
|
|
21724
21712
|
*/ function deleteAllPersistentCacheIndexes(e) {
|
|
21725
21713
|
e._client.verifyNotTerminated();
|
|
21726
21714
|
__PRIVATE_firestoreClientDeleteAllFieldIndexes(e._client).then((e => __PRIVATE_logDebug("deleting all persistent cache indexes succeeded"))).catch((e => __PRIVATE_logWarn("deleting all persistent cache indexes failed", e)));
|
|
@@ -21822,9 +21810,9 @@ let Se = null;
|
|
|
21822
21810
|
return r = Object.assign({
|
|
21823
21811
|
useFetchStreams: t
|
|
21824
21812
|
}, r), s._setSettings(r), s;
|
|
21825
|
-
}), "PUBLIC").setMultipleInstances(!0)), registerVersion(w, "4.1.3-canary.
|
|
21813
|
+
}), "PUBLIC").setMultipleInstances(!0)), registerVersion(w, "4.1.3-canary.fbd8e0e2e", e),
|
|
21826
21814
|
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
|
21827
|
-
registerVersion(w, "4.1.3-canary.
|
|
21815
|
+
registerVersion(w, "4.1.3-canary.fbd8e0e2e", "esm2017");
|
|
21828
21816
|
}();
|
|
21829
21817
|
|
|
21830
21818
|
export { AbstractUserDataWriter, AggregateField, AggregateQuerySnapshot, Bytes, fe as CACHE_SIZE_UNLIMITED, CollectionReference, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Firestore, FirestoreError, GeoPoint, LoadBundleTask, PersistentCacheIndexManager, Query, QueryCompositeFilterConstraint, QueryConstraint, QueryDocumentSnapshot, QueryEndAtConstraint, QueryFieldFilterConstraint, QueryLimitConstraint, QueryOrderByConstraint, QuerySnapshot, QueryStartAtConstraint, SnapshotMetadata, Timestamp, Transaction, WriteBatch, ByteString as _ByteString, DatabaseId as _DatabaseId, DocumentKey as _DocumentKey, __PRIVATE_EmptyAppCheckTokenProvider as _EmptyAppCheckTokenProvider, __PRIVATE_EmptyAuthCredentialsProvider as _EmptyAuthCredentialsProvider, FieldPath$1 as _FieldPath, TestingHooks as _TestingHooks, __PRIVATE_cast as _cast, __PRIVATE_debugAssert as _debugAssert, __PRIVATE_isBase64Available as _isBase64Available, __PRIVATE_logWarn as _logWarn, __PRIVATE_validateIsNotUsedTogether as _validateIsNotUsedTogether, addDoc, aggregateFieldEqual, aggregateQuerySnapshotEqual, and, arrayRemove, arrayUnion, average, clearIndexedDbPersistence, collection, collectionGroup, connectFirestoreEmulator, count, deleteAllPersistentCacheIndexes, deleteDoc, deleteField, disableNetwork, disablePersistentCacheIndexAutoCreation, doc, documentId, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, enableNetwork, enablePersistentCacheIndexAutoCreation, endAt, endBefore, ensureFirestoreConfigured, executeWrite, getAggregateFromServer, getCountFromServer, getDoc, getDocFromCache, getDocFromServer, getDocs, getDocsFromCache, getDocsFromServer, getFirestore, getPersistentCacheIndexManager, increment, initializeFirestore, limit, limitToLast, loadBundle, memoryEagerGarbageCollector, memoryLocalCache, memoryLruGarbageCollector, namedQuery, onSnapshot, onSnapshotsInSync, or, orderBy, persistentLocalCache, persistentMultipleTabManager, persistentSingleTabManager, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setIndexConfiguration, setLogLevel, snapshotEqual, startAfter, startAt, sum, terminate, updateDoc, waitForPendingWrites, where, writeBatch };
|