@firebase/firestore 3.4.13-canary.f5426a512 → 3.4.14
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/index_configuration.d.ts +0 -8
- package/dist/firestore/src/api.d.ts +1 -1
- package/dist/index.d.ts +91 -1
- package/dist/index.esm2017.js +4 -4
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +4 -4
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +3 -3
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +3 -3
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +4 -4
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +5 -13
- package/dist/lite/firestore/src/api/index_configuration.d.ts +0 -8
- package/dist/lite/firestore/src/api.d.ts +1 -1
- package/dist/lite/index.browser.esm2017.js +2 -2
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +2 -2
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.node.cjs.js +2 -2
- package/dist/lite/index.node.mjs +2 -2
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +2 -2
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/packages/firestore/src/api/index_configuration.d.ts +0 -8
- package/dist/lite/packages/firestore/src/api.d.ts +1 -1
- package/dist/packages/firestore/dist/index.esm2017.d.ts +17 -17
- package/dist/packages/firestore/src/api/index_configuration.d.ts +0 -8
- package/dist/packages/firestore/src/api.d.ts +1 -1
- package/dist/private.d.ts +92 -4
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @firebase/firestore
|
|
2
2
|
|
|
3
|
+
## 3.4.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f5426a512`](https://github.com/firebase/firebase-js-sdk/commit/f5426a51275bb611a5d9a6df3200d0fe5095afa2) [#6403](https://github.com/firebase/firebase-js-sdk/pull/6403) - Add internal implementation of setIndexConfiguration
|
|
8
|
+
|
|
9
|
+
* [`10765511f`](https://github.com/firebase/firebase-js-sdk/commit/10765511f7ba33293f7a15af1f98d69a261c019d) [#6496](https://github.com/firebase/firebase-js-sdk/pull/6496) - Expose client side indexing feature with `setIndexConfiguration`.
|
|
10
|
+
|
|
3
11
|
## 3.4.13
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -19,8 +19,6 @@ 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
|
-
* @internal
|
|
24
22
|
*/
|
|
25
23
|
export interface IndexField {
|
|
26
24
|
/** The field path to index. */
|
|
@@ -43,8 +41,6 @@ export interface IndexField {
|
|
|
43
41
|
}
|
|
44
42
|
/**
|
|
45
43
|
* The SDK definition of a Firestore index.
|
|
46
|
-
*
|
|
47
|
-
* @internal
|
|
48
44
|
*/
|
|
49
45
|
export interface Index {
|
|
50
46
|
/** The ID of the collection to index. */
|
|
@@ -58,8 +54,6 @@ export interface Index {
|
|
|
58
54
|
*
|
|
59
55
|
* See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
|
|
60
56
|
* for a description of the format of the index definition.
|
|
61
|
-
*
|
|
62
|
-
* @internal
|
|
63
57
|
*/
|
|
64
58
|
export interface IndexConfiguration {
|
|
65
59
|
/** A list of all Firestore indexes. */
|
|
@@ -81,7 +75,6 @@ export interface IndexConfiguration {
|
|
|
81
75
|
* before setting an index configuration. If IndexedDb is not enabled, any
|
|
82
76
|
* index configuration is ignored.
|
|
83
77
|
*
|
|
84
|
-
* @internal
|
|
85
78
|
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
86
79
|
* @param configuration -The index definition.
|
|
87
80
|
* @throws FirestoreError if the JSON format is invalid.
|
|
@@ -108,7 +101,6 @@ export declare function setIndexConfiguration(firestore: Firestore, configuratio
|
|
|
108
101
|
* firestore:indexes`). If the JSON format is invalid, this method throws an
|
|
109
102
|
* error.
|
|
110
103
|
*
|
|
111
|
-
* @internal
|
|
112
104
|
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
113
105
|
* @param json -The JSON format exported by the Firebase CLI.
|
|
114
106
|
* @throws FirestoreError if the JSON format is invalid.
|
|
@@ -36,6 +36,7 @@ export { CACHE_SIZE_UNLIMITED } from './api/database';
|
|
|
36
36
|
export { FirestoreErrorCode, FirestoreError } from './util/error';
|
|
37
37
|
export { AbstractUserDataWriter } from './lite-api/user_data_writer';
|
|
38
38
|
export { Primitive, NestedUpdateFields, ChildUpdateFields, AddPrefixToKeys, UnionToIntersection } from '../src/lite-api/types';
|
|
39
|
+
export { setIndexConfiguration, Index, IndexConfiguration, IndexField } from './api/index_configuration';
|
|
39
40
|
/**
|
|
40
41
|
* Internal exports
|
|
41
42
|
*/
|
|
@@ -50,4 +51,3 @@ export type { ByteString as _ByteString } from './util/byte_string';
|
|
|
50
51
|
export { logWarn as _logWarn } from './util/log';
|
|
51
52
|
export { EmptyAuthCredentialsProvider as _EmptyAuthCredentialsProvider } from './api/credentials';
|
|
52
53
|
export { EmptyAppCheckTokenProvider as _EmptyAppCheckTokenProvider } from './api/credentials';
|
|
53
|
-
export { setIndexConfiguration as _setIndexConfiguration } from './api/index_configuration';
|
package/dist/index.d.ts
CHANGED
|
@@ -929,6 +929,49 @@ export declare function getFirestore(app?: FirebaseApp): Firestore;
|
|
|
929
929
|
* `updateDoc()`
|
|
930
930
|
*/
|
|
931
931
|
export declare function increment(n: number): FieldValue;
|
|
932
|
+
/**
|
|
933
|
+
* The SDK definition of a Firestore index.
|
|
934
|
+
*/
|
|
935
|
+
export declare interface Index {
|
|
936
|
+
/** The ID of the collection to index. */
|
|
937
|
+
readonly collectionGroup: string;
|
|
938
|
+
/** A list of fields to index. */
|
|
939
|
+
readonly fields?: IndexField[];
|
|
940
|
+
[key: string]: unknown;
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* A list of Firestore indexes to speed up local query execution.
|
|
944
|
+
*
|
|
945
|
+
* See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
|
|
946
|
+
* for a description of the format of the index definition.
|
|
947
|
+
*/
|
|
948
|
+
export declare interface IndexConfiguration {
|
|
949
|
+
/** A list of all Firestore indexes. */
|
|
950
|
+
readonly indexes?: Index[];
|
|
951
|
+
[key: string]: unknown;
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* A single field element in an index configuration.
|
|
955
|
+
*/
|
|
956
|
+
export declare interface IndexField {
|
|
957
|
+
/** The field path to index. */
|
|
958
|
+
readonly fieldPath: string;
|
|
959
|
+
/**
|
|
960
|
+
* What type of array index to create. Set to `CONTAINS` for `array-contains`
|
|
961
|
+
* and `array-contains-any` indexes.
|
|
962
|
+
*
|
|
963
|
+
* Only one of `arrayConfig` or `order` should be set;
|
|
964
|
+
*/
|
|
965
|
+
readonly arrayConfig?: 'CONTAINS';
|
|
966
|
+
/**
|
|
967
|
+
* What type of array index to create. Set to `ASCENDING` or 'DESCENDING` for
|
|
968
|
+
* `==`, `!=`, `<=`, `<=`, `in` and `not-in` filters.
|
|
969
|
+
*
|
|
970
|
+
* Only one of `arrayConfig` or `order` should be set.
|
|
971
|
+
*/
|
|
972
|
+
readonly order?: 'ASCENDING' | 'DESCENDING';
|
|
973
|
+
[key: string]: unknown;
|
|
974
|
+
}
|
|
932
975
|
/**
|
|
933
976
|
* Initializes a new instance of {@link Firestore} with the provided settings.
|
|
934
977
|
* Can only be called before any other function, including
|
|
@@ -1471,7 +1514,54 @@ export declare function setDoc<T>(reference: DocumentReference<T>, data: WithFie
|
|
|
1471
1514
|
* to the backend (note that it won't resolve while you're offline).
|
|
1472
1515
|
*/
|
|
1473
1516
|
export declare function setDoc<T>(reference: DocumentReference<T>, data: PartialWithFieldValue<T>, options: SetOptions): Promise<void>;
|
|
1474
|
-
|
|
1517
|
+
/**
|
|
1518
|
+
* Configures indexing for local query execution. Any previous index
|
|
1519
|
+
* configuration is overridden. The `Promise` resolves once the index
|
|
1520
|
+
* configuration has been persisted.
|
|
1521
|
+
*
|
|
1522
|
+
* The index entries themselves are created asynchronously. You can continue to
|
|
1523
|
+
* use queries that require indexing even if the indices are not yet available.
|
|
1524
|
+
* Query execution will automatically start using the index once the index
|
|
1525
|
+
* entries have been written.
|
|
1526
|
+
*
|
|
1527
|
+
* Indexes are only supported with IndexedDb persistence. Invoke either
|
|
1528
|
+
* `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
|
|
1529
|
+
* before setting an index configuration. If IndexedDb is not enabled, any
|
|
1530
|
+
* index configuration is ignored.
|
|
1531
|
+
*
|
|
1532
|
+
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
1533
|
+
* @param configuration -The index definition.
|
|
1534
|
+
* @throws FirestoreError if the JSON format is invalid.
|
|
1535
|
+
* @returns A `Promise` that resolves once all indices are successfully
|
|
1536
|
+
* configured.
|
|
1537
|
+
*/
|
|
1538
|
+
export declare function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
|
|
1539
|
+
/**
|
|
1540
|
+
* Configures indexing for local query execution. Any previous index
|
|
1541
|
+
* configuration is overridden. The `Promise` resolves once the index
|
|
1542
|
+
* configuration has been persisted.
|
|
1543
|
+
*
|
|
1544
|
+
* The index entries themselves are created asynchronously. You can continue to
|
|
1545
|
+
* use queries that require indexing even if the indices are not yet available.
|
|
1546
|
+
* Query execution will automatically start using the index once the index
|
|
1547
|
+
* entries have been written.
|
|
1548
|
+
*
|
|
1549
|
+
* Indexes are only supported with IndexedDb persistence. Invoke either
|
|
1550
|
+
* `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
|
|
1551
|
+
* before setting an index configuration. If IndexedDb is not enabled, any
|
|
1552
|
+
* index configuration is ignored.
|
|
1553
|
+
*
|
|
1554
|
+
* The method accepts the JSON format exported by the Firebase CLI (`firebase
|
|
1555
|
+
* firestore:indexes`). If the JSON format is invalid, this method throws an
|
|
1556
|
+
* error.
|
|
1557
|
+
*
|
|
1558
|
+
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
1559
|
+
* @param json -The JSON format exported by the Firebase CLI.
|
|
1560
|
+
* @throws FirestoreError if the JSON format is invalid.
|
|
1561
|
+
* @returns A `Promise` that resolves once all indices are successfully
|
|
1562
|
+
* configured.
|
|
1563
|
+
*/
|
|
1564
|
+
export declare function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
|
|
1475
1565
|
/**
|
|
1476
1566
|
* Sets the verbosity of Cloud Firestore logs (debug, error, or silent).
|
|
1477
1567
|
*
|
package/dist/index.esm2017.js
CHANGED
|
@@ -66,7 +66,7 @@ C.MOCK_USER = new C("mock-user");
|
|
|
66
66
|
* See the License for the specific language governing permissions and
|
|
67
67
|
* limitations under the License.
|
|
68
68
|
*/
|
|
69
|
-
let x = "9.9.
|
|
69
|
+
let x = "9.9.2";
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* @license
|
|
@@ -19748,10 +19748,10 @@ function Fl(t, e) {
|
|
|
19748
19748
|
return n = Object.assign({
|
|
19749
19749
|
useFetchStreams: e
|
|
19750
19750
|
}, n), i._setSettings(n), i;
|
|
19751
|
-
}), "PUBLIC")), registerVersion(D, "3.4.
|
|
19751
|
+
}), "PUBLIC")), registerVersion(D, "3.4.14", t),
|
|
19752
19752
|
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
|
|
19753
|
-
registerVersion(D, "3.4.
|
|
19753
|
+
registerVersion(D, "3.4.14", "esm2017");
|
|
19754
19754
|
}();
|
|
19755
19755
|
|
|
19756
|
-
export { cl as AbstractUserDataWriter, sh as Bytes, $a as CACHE_SIZE_UNLIMITED, Sa as CollectionReference, va as DocumentReference, Oh as DocumentSnapshot, eh as FieldPath, ih as FieldValue, Ba as Firestore, Q as FirestoreError, rh as GeoPoint, Fa as LoadBundleTask, Va as Query, qh as QueryConstraint, Fh as QueryDocumentSnapshot, $h as QuerySnapshot, Mh as SnapshotMetadata, ut as Timestamp, Vl as Transaction, ll as WriteBatch, ue as _DatabaseId, dt as _DocumentKey, et as _EmptyAppCheckTokenProvider, z as _EmptyAuthCredentialsProvider, ft as _FieldPath, Ea as _cast, q as _debugAssert, Yt as _isBase64Available, $ as _logWarn,
|
|
19756
|
+
export { cl as AbstractUserDataWriter, sh as Bytes, $a as CACHE_SIZE_UNLIMITED, Sa as CollectionReference, va as DocumentReference, Oh as DocumentSnapshot, eh as FieldPath, ih as FieldValue, Ba as Firestore, Q as FirestoreError, rh as GeoPoint, Fa as LoadBundleTask, Va as Query, qh as QueryConstraint, Fh as QueryDocumentSnapshot, $h as QuerySnapshot, Mh as SnapshotMetadata, ut as Timestamp, Vl as Transaction, ll as WriteBatch, ue as _DatabaseId, dt as _DocumentKey, et as _EmptyAppCheckTokenProvider, z as _EmptyAuthCredentialsProvider, ft as _FieldPath, Ea as _cast, q as _debugAssert, Yt as _isBase64Available, $ as _logWarn, ya as _validateIsNotUsedTogether, Al as addDoc, Nl as arrayRemove, xl as arrayUnion, Wa as clearIndexedDbPersistence, Da as collection, Ca as collectionGroup, Pa as connectFirestoreEmulator, El as deleteDoc, Dl as deleteField, Ja as disableNetwork, xa as doc, nh as documentId, Ga as enableIndexedDbPersistence, Qa as enableMultiTabIndexedDbPersistence, Ha as enableNetwork, nl as endAt, el as endBefore, qa as ensureFirestoreConfigured, Pl as executeWrite, dl as getDoc, wl as getDocFromCache, ml as getDocFromServer, gl as getDocs, yl as getDocsFromCache, pl as getDocsFromServer, Ua as getFirestore, kl as increment, La as initializeFirestore, Hh as limit, Jh as limitToLast, Xa as loadBundle, Za as namedQuery, Rl as onSnapshot, bl as onSnapshotsInSync, Wh as orderBy, Kh as query, ka as queryEqual, Na as refEqual, Sl as runTransaction, Cl as serverTimestamp, Il as setDoc, Ol as setIndexConfiguration, M as setLogLevel, Lh as snapshotEqual, Zh as startAfter, Xh as startAt, Ya as terminate, Tl as updateDoc, za as waitForPendingWrites, Qh as where, Ml as writeBatch };
|
|
19757
19757
|
//# sourceMappingURL=index.esm2017.js.map
|