@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
|
@@ -19,6 +19,11 @@ import { Firestore } from './database';
|
|
|
19
19
|
export { connectFirestoreEmulator, EmulatorMockTokenOptions } from '../lite-api/database';
|
|
20
20
|
/**
|
|
21
21
|
* A single field element in an index configuration.
|
|
22
|
+
*
|
|
23
|
+
* @deprecated Instead of creating cache indexes manually, consider using
|
|
24
|
+
* `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to
|
|
25
|
+
* create cache indexes for queries running locally.
|
|
26
|
+
*
|
|
22
27
|
* @beta
|
|
23
28
|
*/
|
|
24
29
|
export interface IndexField {
|
|
@@ -42,6 +47,11 @@ export interface IndexField {
|
|
|
42
47
|
}
|
|
43
48
|
/**
|
|
44
49
|
* The SDK definition of a Firestore index.
|
|
50
|
+
*
|
|
51
|
+
* @deprecated Instead of creating cache indexes manually, consider using
|
|
52
|
+
* `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to
|
|
53
|
+
* create cache indexes for queries running locally.
|
|
54
|
+
*
|
|
45
55
|
* @beta
|
|
46
56
|
*/
|
|
47
57
|
export interface Index {
|
|
@@ -56,6 +66,11 @@ export interface Index {
|
|
|
56
66
|
*
|
|
57
67
|
* See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
|
|
58
68
|
* for a description of the format of the index definition.
|
|
69
|
+
*
|
|
70
|
+
* @deprecated Instead of creating cache indexes manually, consider using
|
|
71
|
+
* `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to
|
|
72
|
+
* create cache indexes for queries running locally.
|
|
73
|
+
*
|
|
59
74
|
* @beta
|
|
60
75
|
*/
|
|
61
76
|
export interface IndexConfiguration {
|
|
@@ -81,6 +96,11 @@ export interface IndexConfiguration {
|
|
|
81
96
|
* @throws FirestoreError if the JSON format is invalid.
|
|
82
97
|
* @returns A `Promise` that resolves once all indices are successfully
|
|
83
98
|
* configured.
|
|
99
|
+
*
|
|
100
|
+
* @deprecated Instead of creating cache indexes manually, consider using
|
|
101
|
+
* `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to
|
|
102
|
+
* create cache indexes for queries running locally.
|
|
103
|
+
*
|
|
84
104
|
* @beta
|
|
85
105
|
*/
|
|
86
106
|
export declare function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
|
|
@@ -108,6 +128,11 @@ export declare function setIndexConfiguration(firestore: Firestore, configuratio
|
|
|
108
128
|
* @throws FirestoreError if the JSON format is invalid.
|
|
109
129
|
* @returns A `Promise` that resolves once all indices are successfully
|
|
110
130
|
* configured.
|
|
131
|
+
*
|
|
132
|
+
* @deprecated Instead of creating cache indexes manually, consider using
|
|
133
|
+
* `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to
|
|
134
|
+
* create cache indexes for queries running locally.
|
|
135
|
+
*
|
|
111
136
|
* @beta
|
|
112
137
|
*/
|
|
113
138
|
export declare function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
|
|
@@ -17,16 +17,14 @@
|
|
|
17
17
|
import { FirestoreClient } from '../core/firestore_client';
|
|
18
18
|
import { Firestore } from './database';
|
|
19
19
|
/**
|
|
20
|
-
* A `PersistentCacheIndexManager`
|
|
21
|
-
*
|
|
20
|
+
* A `PersistentCacheIndexManager` for configuring persistent cache indexes used
|
|
21
|
+
* for local query execution.
|
|
22
22
|
*
|
|
23
23
|
* To use, call `getPersistentCacheIndexManager()` to get an instance.
|
|
24
|
-
*
|
|
25
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
26
|
-
* @internal
|
|
27
24
|
*/
|
|
28
25
|
export declare class PersistentCacheIndexManager {
|
|
29
26
|
readonly _client: FirestoreClient;
|
|
27
|
+
/** A type string to uniquely identify instances of this class. */
|
|
30
28
|
readonly type: 'PersistentCacheIndexManager';
|
|
31
29
|
/** @hideconstructor */
|
|
32
30
|
constructor(_client: FirestoreClient);
|
|
@@ -37,28 +35,20 @@ export declare class PersistentCacheIndexManager {
|
|
|
37
35
|
*
|
|
38
36
|
* @return The `PersistentCacheIndexManager` instance, or `null` if local
|
|
39
37
|
* persistent storage is not in use.
|
|
40
|
-
*
|
|
41
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
42
|
-
* @internal
|
|
43
38
|
*/
|
|
44
39
|
export declare function getPersistentCacheIndexManager(firestore: Firestore): PersistentCacheIndexManager | null;
|
|
45
40
|
/**
|
|
46
|
-
* Enables SDK to create persistent cache indexes automatically for local
|
|
47
|
-
* execution when SDK believes cache indexes can help
|
|
41
|
+
* Enables the SDK to create persistent cache indexes automatically for local
|
|
42
|
+
* query execution when the SDK believes cache indexes can help improve
|
|
43
|
+
* performance.
|
|
48
44
|
*
|
|
49
45
|
* This feature is disabled by default.
|
|
50
|
-
*
|
|
51
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
52
|
-
* @internal
|
|
53
46
|
*/
|
|
54
47
|
export declare function enablePersistentCacheIndexAutoCreation(indexManager: PersistentCacheIndexManager): void;
|
|
55
48
|
/**
|
|
56
49
|
* Stops creating persistent cache indexes automatically for local query
|
|
57
50
|
* execution. The indexes which have been created by calling
|
|
58
51
|
* `enablePersistentCacheIndexAutoCreation()` still take effect.
|
|
59
|
-
*
|
|
60
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
61
|
-
* @internal
|
|
62
52
|
*/
|
|
63
53
|
export declare function disablePersistentCacheIndexAutoCreation(indexManager: PersistentCacheIndexManager): void;
|
|
64
54
|
/**
|
|
@@ -66,8 +56,5 @@ export declare function disablePersistentCacheIndexAutoCreation(indexManager: Pe
|
|
|
66
56
|
*
|
|
67
57
|
* Please note this function will also deletes indexes generated by
|
|
68
58
|
* `setIndexConfiguration()`, which is deprecated.
|
|
69
|
-
*
|
|
70
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
71
|
-
* @internal
|
|
72
59
|
*/
|
|
73
60
|
export declare function deleteAllPersistentCacheIndexes(indexManager: PersistentCacheIndexManager): void;
|
|
@@ -8976,6 +8976,11 @@ declare class GeoPoint {
|
|
|
8976
8976
|
|
|
8977
8977
|
/**
|
|
8978
8978
|
* A single field element in an index configuration.
|
|
8979
|
+
*
|
|
8980
|
+
* @deprecated Instead of creating cache indexes manually, consider using
|
|
8981
|
+
* `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to
|
|
8982
|
+
* create cache indexes for queries running locally.
|
|
8983
|
+
*
|
|
8979
8984
|
* @beta
|
|
8980
8985
|
*/
|
|
8981
8986
|
interface IndexField {
|
|
@@ -8999,6 +9004,11 @@ interface IndexField {
|
|
|
8999
9004
|
}
|
|
9000
9005
|
/**
|
|
9001
9006
|
* The SDK definition of a Firestore index.
|
|
9007
|
+
*
|
|
9008
|
+
* @deprecated Instead of creating cache indexes manually, consider using
|
|
9009
|
+
* `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to
|
|
9010
|
+
* create cache indexes for queries running locally.
|
|
9011
|
+
*
|
|
9002
9012
|
* @beta
|
|
9003
9013
|
*/
|
|
9004
9014
|
interface Index {
|
|
@@ -9013,6 +9023,11 @@ interface Index {
|
|
|
9013
9023
|
*
|
|
9014
9024
|
* See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
|
|
9015
9025
|
* for a description of the format of the index definition.
|
|
9026
|
+
*
|
|
9027
|
+
* @deprecated Instead of creating cache indexes manually, consider using
|
|
9028
|
+
* `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to
|
|
9029
|
+
* create cache indexes for queries running locally.
|
|
9030
|
+
*
|
|
9016
9031
|
* @beta
|
|
9017
9032
|
*/
|
|
9018
9033
|
interface IndexConfiguration {
|
|
@@ -9038,6 +9053,11 @@ interface IndexConfiguration {
|
|
|
9038
9053
|
* @throws FirestoreError if the JSON format is invalid.
|
|
9039
9054
|
* @returns A `Promise` that resolves once all indices are successfully
|
|
9040
9055
|
* configured.
|
|
9056
|
+
*
|
|
9057
|
+
* @deprecated Instead of creating cache indexes manually, consider using
|
|
9058
|
+
* `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to
|
|
9059
|
+
* create cache indexes for queries running locally.
|
|
9060
|
+
*
|
|
9041
9061
|
* @beta
|
|
9042
9062
|
*/
|
|
9043
9063
|
declare function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
|
|
@@ -9065,6 +9085,11 @@ declare function setIndexConfiguration(firestore: Firestore, configuration: Inde
|
|
|
9065
9085
|
* @throws FirestoreError if the JSON format is invalid.
|
|
9066
9086
|
* @returns A `Promise` that resolves once all indices are successfully
|
|
9067
9087
|
* configured.
|
|
9088
|
+
*
|
|
9089
|
+
* @deprecated Instead of creating cache indexes manually, consider using
|
|
9090
|
+
* `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to
|
|
9091
|
+
* create cache indexes for queries running locally.
|
|
9092
|
+
*
|
|
9068
9093
|
* @beta
|
|
9069
9094
|
*/
|
|
9070
9095
|
declare function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
|
|
@@ -9087,16 +9112,14 @@ declare function setIndexConfiguration(firestore: Firestore, json: string): Prom
|
|
|
9087
9112
|
*/
|
|
9088
9113
|
|
|
9089
9114
|
/**
|
|
9090
|
-
* A `PersistentCacheIndexManager`
|
|
9091
|
-
*
|
|
9115
|
+
* A `PersistentCacheIndexManager` for configuring persistent cache indexes used
|
|
9116
|
+
* for local query execution.
|
|
9092
9117
|
*
|
|
9093
9118
|
* To use, call `getPersistentCacheIndexManager()` to get an instance.
|
|
9094
|
-
*
|
|
9095
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
9096
|
-
* @internal
|
|
9097
9119
|
*/
|
|
9098
9120
|
declare class PersistentCacheIndexManager {
|
|
9099
9121
|
readonly _client: FirestoreClient;
|
|
9122
|
+
/** A type string to uniquely identify instances of this class. */
|
|
9100
9123
|
readonly type: 'PersistentCacheIndexManager';
|
|
9101
9124
|
/** @hideconstructor */
|
|
9102
9125
|
constructor(_client: FirestoreClient);
|
|
@@ -9107,28 +9130,20 @@ declare class PersistentCacheIndexManager {
|
|
|
9107
9130
|
*
|
|
9108
9131
|
* @return The `PersistentCacheIndexManager` instance, or `null` if local
|
|
9109
9132
|
* persistent storage is not in use.
|
|
9110
|
-
*
|
|
9111
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
9112
|
-
* @internal
|
|
9113
9133
|
*/
|
|
9114
9134
|
declare function getPersistentCacheIndexManager(firestore: Firestore): PersistentCacheIndexManager | null;
|
|
9115
9135
|
/**
|
|
9116
|
-
* Enables SDK to create persistent cache indexes automatically for local
|
|
9117
|
-
* execution when SDK believes cache indexes can help
|
|
9136
|
+
* Enables the SDK to create persistent cache indexes automatically for local
|
|
9137
|
+
* query execution when the SDK believes cache indexes can help improve
|
|
9138
|
+
* performance.
|
|
9118
9139
|
*
|
|
9119
9140
|
* This feature is disabled by default.
|
|
9120
|
-
*
|
|
9121
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
9122
|
-
* @internal
|
|
9123
9141
|
*/
|
|
9124
9142
|
declare function enablePersistentCacheIndexAutoCreation(indexManager: PersistentCacheIndexManager): void;
|
|
9125
9143
|
/**
|
|
9126
9144
|
* Stops creating persistent cache indexes automatically for local query
|
|
9127
9145
|
* execution. The indexes which have been created by calling
|
|
9128
9146
|
* `enablePersistentCacheIndexAutoCreation()` still take effect.
|
|
9129
|
-
*
|
|
9130
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
9131
|
-
* @internal
|
|
9132
9147
|
*/
|
|
9133
9148
|
declare function disablePersistentCacheIndexAutoCreation(indexManager: PersistentCacheIndexManager): void;
|
|
9134
9149
|
/**
|
|
@@ -9136,9 +9151,6 @@ declare function disablePersistentCacheIndexAutoCreation(indexManager: Persisten
|
|
|
9136
9151
|
*
|
|
9137
9152
|
* Please note this function will also deletes indexes generated by
|
|
9138
9153
|
* `setIndexConfiguration()`, which is deprecated.
|
|
9139
|
-
*
|
|
9140
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
9141
|
-
* @internal
|
|
9142
9154
|
*/
|
|
9143
9155
|
declare function deleteAllPersistentCacheIndexes(indexManager: PersistentCacheIndexManager): void;
|
|
9144
9156
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -70,7 +70,7 @@ User.MOCK_USER = new User("mock-user");
|
|
|
70
70
|
* See the License for the specific language governing permissions and
|
|
71
71
|
* limitations under the License.
|
|
72
72
|
*/
|
|
73
|
-
let S = "10.3.1-canary.
|
|
73
|
+
let S = "10.3.1-canary.fbd8e0e2e";
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
* @license
|
|
@@ -21660,17 +21660,16 @@ function __PRIVATE_tryGetString(e, t) {
|
|
|
21660
21660
|
* limitations under the License.
|
|
21661
21661
|
*/
|
|
21662
21662
|
/**
|
|
21663
|
-
* A `PersistentCacheIndexManager`
|
|
21664
|
-
*
|
|
21663
|
+
* A `PersistentCacheIndexManager` for configuring persistent cache indexes used
|
|
21664
|
+
* for local query execution.
|
|
21665
21665
|
*
|
|
21666
21666
|
* To use, call `getPersistentCacheIndexManager()` to get an instance.
|
|
21667
|
-
*
|
|
21668
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
21669
|
-
* @internal
|
|
21670
21667
|
*/ class PersistentCacheIndexManager {
|
|
21671
21668
|
/** @hideconstructor */
|
|
21672
21669
|
constructor(e) {
|
|
21673
|
-
this._client = e,
|
|
21670
|
+
this._client = e,
|
|
21671
|
+
/** A type string to uniquely identify instances of this class. */
|
|
21672
|
+
this.type = "PersistentCacheIndexManager";
|
|
21674
21673
|
}
|
|
21675
21674
|
}
|
|
21676
21675
|
|
|
@@ -21680,9 +21679,6 @@ function __PRIVATE_tryGetString(e, t) {
|
|
|
21680
21679
|
*
|
|
21681
21680
|
* @return The `PersistentCacheIndexManager` instance, or `null` if local
|
|
21682
21681
|
* persistent storage is not in use.
|
|
21683
|
-
*
|
|
21684
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
21685
|
-
* @internal
|
|
21686
21682
|
*/ function getPersistentCacheIndexManager(e) {
|
|
21687
21683
|
var t;
|
|
21688
21684
|
e = __PRIVATE_cast(e, Firestore);
|
|
@@ -21695,13 +21691,11 @@ function __PRIVATE_tryGetString(e, t) {
|
|
|
21695
21691
|
}
|
|
21696
21692
|
|
|
21697
21693
|
/**
|
|
21698
|
-
* Enables SDK to create persistent cache indexes automatically for local
|
|
21699
|
-
* execution when SDK believes cache indexes can help
|
|
21694
|
+
* Enables the SDK to create persistent cache indexes automatically for local
|
|
21695
|
+
* query execution when the SDK believes cache indexes can help improve
|
|
21696
|
+
* performance.
|
|
21700
21697
|
*
|
|
21701
21698
|
* This feature is disabled by default.
|
|
21702
|
-
*
|
|
21703
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
21704
|
-
* @internal
|
|
21705
21699
|
*/ function enablePersistentCacheIndexAutoCreation(e) {
|
|
21706
21700
|
__PRIVATE_setPersistentCacheIndexAutoCreationEnabled(e, !0);
|
|
21707
21701
|
}
|
|
@@ -21710,9 +21704,6 @@ function __PRIVATE_tryGetString(e, t) {
|
|
|
21710
21704
|
* Stops creating persistent cache indexes automatically for local query
|
|
21711
21705
|
* execution. The indexes which have been created by calling
|
|
21712
21706
|
* `enablePersistentCacheIndexAutoCreation()` still take effect.
|
|
21713
|
-
*
|
|
21714
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
21715
|
-
* @internal
|
|
21716
21707
|
*/ function disablePersistentCacheIndexAutoCreation(e) {
|
|
21717
21708
|
__PRIVATE_setPersistentCacheIndexAutoCreationEnabled(e, !1);
|
|
21718
21709
|
}
|
|
@@ -21722,9 +21713,6 @@ function __PRIVATE_tryGetString(e, t) {
|
|
|
21722
21713
|
*
|
|
21723
21714
|
* Please note this function will also deletes indexes generated by
|
|
21724
21715
|
* `setIndexConfiguration()`, which is deprecated.
|
|
21725
|
-
*
|
|
21726
|
-
* TODO(CSI) Remove @internal to make the API publicly available.
|
|
21727
|
-
* @internal
|
|
21728
21716
|
*/ function deleteAllPersistentCacheIndexes(e) {
|
|
21729
21717
|
e._client.verifyNotTerminated();
|
|
21730
21718
|
__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)));
|
|
@@ -21826,9 +21814,9 @@ let Se = null;
|
|
|
21826
21814
|
return r = Object.assign({
|
|
21827
21815
|
useFetchStreams: t
|
|
21828
21816
|
}, r), s._setSettings(r), s;
|
|
21829
|
-
}), "PUBLIC").setMultipleInstances(!0)), app.registerVersion(w, "4.1.3-canary.
|
|
21817
|
+
}), "PUBLIC").setMultipleInstances(!0)), app.registerVersion(w, "4.1.3-canary.fbd8e0e2e", e),
|
|
21830
21818
|
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
|
21831
|
-
app.registerVersion(w, "4.1.3-canary.
|
|
21819
|
+
app.registerVersion(w, "4.1.3-canary.fbd8e0e2e", "cjs2017");
|
|
21832
21820
|
}();
|
|
21833
21821
|
|
|
21834
21822
|
exports.AbstractUserDataWriter = AbstractUserDataWriter;
|