@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.
@@ -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';
@@ -795,22 +795,6 @@ declare function Yt(): boolean;
795
795
  /**
796
796
  * @internal
797
797
  */ declare function $(t: any, ...e: any[]): void;
798
- /**
799
- * @license
800
- * Copyright 2021 Google LLC
801
- *
802
- * Licensed under the Apache License, Version 2.0 (the "License");
803
- * you may not use this file except in compliance with the License.
804
- * You may obtain a copy of the License at
805
- *
806
- * http://www.apache.org/licenses/LICENSE-2.0
807
- *
808
- * Unless required by applicable law or agreed to in writing, software
809
- * distributed under the License is distributed on an "AS IS" BASIS,
810
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
811
- * See the License for the specific language governing permissions and
812
- * limitations under the License.
813
- */ declare function Ol(t: any, e: any): Promise<any>;
814
798
  /**
815
799
  * Validates that two boolean options are not set at the same time.
816
800
  * @internal
@@ -1188,6 +1172,22 @@ declare function bl(t: any, e: any): () => void;
1188
1172
  * include a server-generated timestamp in the written data.
1189
1173
  */ declare function Cl(): mh;
1190
1174
  declare function Il(t: any, e: any, n: any): Promise<any>;
1175
+ /**
1176
+ * @license
1177
+ * Copyright 2021 Google LLC
1178
+ *
1179
+ * Licensed under the Apache License, Version 2.0 (the "License");
1180
+ * you may not use this file except in compliance with the License.
1181
+ * You may obtain a copy of the License at
1182
+ *
1183
+ * http://www.apache.org/licenses/LICENSE-2.0
1184
+ *
1185
+ * Unless required by applicable law or agreed to in writing, software
1186
+ * distributed under the License is distributed on an "AS IS" BASIS,
1187
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1188
+ * See the License for the specific language governing permissions and
1189
+ * limitations under the License.
1190
+ */ declare function Ol(t: any, e: any): Promise<any>;
1191
1191
  /**
1192
1192
  * Sets the verbosity of Cloud Firestore logs (debug, error, or silent).
1193
1193
  *
@@ -1809,4 +1809,4 @@ declare class Lu {
1809
1809
  field: any;
1810
1810
  transform: any;
1811
1811
  }
1812
- 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, Ol as _setIndexConfiguration, 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, 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 };
1812
+ 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 };
@@ -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/private.d.ts CHANGED
@@ -2237,11 +2237,51 @@ export declare function getFirestore(app?: FirebaseApp): Firestore;
2237
2237
  */
2238
2238
  export declare function increment(n: number): FieldValue;
2239
2239
 
2240
- /* Excluded from this release type: Index */
2240
+ /**
2241
+ * The SDK definition of a Firestore index.
2242
+ */
2243
+ export declare interface Index {
2244
+ /** The ID of the collection to index. */
2245
+ readonly collectionGroup: string;
2246
+ /** A list of fields to index. */
2247
+ readonly fields?: IndexField[];
2248
+ [key: string]: unknown;
2249
+ }
2241
2250
 
2242
- /* Excluded from this release type: IndexConfiguration */
2251
+ /**
2252
+ * A list of Firestore indexes to speed up local query execution.
2253
+ *
2254
+ * See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
2255
+ * for a description of the format of the index definition.
2256
+ */
2257
+ export declare interface IndexConfiguration {
2258
+ /** A list of all Firestore indexes. */
2259
+ readonly indexes?: Index[];
2260
+ [key: string]: unknown;
2261
+ }
2243
2262
 
2244
- /* Excluded from this release type: IndexField */
2263
+ /**
2264
+ * A single field element in an index configuration.
2265
+ */
2266
+ export declare interface IndexField {
2267
+ /** The field path to index. */
2268
+ readonly fieldPath: string;
2269
+ /**
2270
+ * What type of array index to create. Set to `CONTAINS` for `array-contains`
2271
+ * and `array-contains-any` indexes.
2272
+ *
2273
+ * Only one of `arrayConfig` or `order` should be set;
2274
+ */
2275
+ readonly arrayConfig?: 'CONTAINS';
2276
+ /**
2277
+ * What type of array index to create. Set to `ASCENDING` or 'DESCENDING` for
2278
+ * `==`, `!=`, `<=`, `<=`, `in` and `not-in` filters.
2279
+ *
2280
+ * Only one of `arrayConfig` or `order` should be set.
2281
+ */
2282
+ readonly order?: 'ASCENDING' | 'DESCENDING';
2283
+ [key: string]: unknown;
2284
+ }
2245
2285
 
2246
2286
  declare type IndexFieldMode = 'MODE_UNSPECIFIED' | 'ASCENDING' | 'DESCENDING';
2247
2287
 
@@ -4485,7 +4525,55 @@ export declare function setDoc<T>(reference: DocumentReference<T>, data: WithFie
4485
4525
  */
4486
4526
  export declare function setDoc<T>(reference: DocumentReference<T>, data: PartialWithFieldValue<T>, options: SetOptions): Promise<void>;
4487
4527
 
4488
- /* Excluded from this release type: _setIndexConfiguration */
4528
+ /**
4529
+ * Configures indexing for local query execution. Any previous index
4530
+ * configuration is overridden. The `Promise` resolves once the index
4531
+ * configuration has been persisted.
4532
+ *
4533
+ * The index entries themselves are created asynchronously. You can continue to
4534
+ * use queries that require indexing even if the indices are not yet available.
4535
+ * Query execution will automatically start using the index once the index
4536
+ * entries have been written.
4537
+ *
4538
+ * Indexes are only supported with IndexedDb persistence. Invoke either
4539
+ * `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
4540
+ * before setting an index configuration. If IndexedDb is not enabled, any
4541
+ * index configuration is ignored.
4542
+ *
4543
+ * @param firestore - The {@link Firestore} instance to configure indexes for.
4544
+ * @param configuration -The index definition.
4545
+ * @throws FirestoreError if the JSON format is invalid.
4546
+ * @returns A `Promise` that resolves once all indices are successfully
4547
+ * configured.
4548
+ */
4549
+ export declare function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
4550
+
4551
+ /**
4552
+ * Configures indexing for local query execution. Any previous index
4553
+ * configuration is overridden. The `Promise` resolves once the index
4554
+ * configuration has been persisted.
4555
+ *
4556
+ * The index entries themselves are created asynchronously. You can continue to
4557
+ * use queries that require indexing even if the indices are not yet available.
4558
+ * Query execution will automatically start using the index once the index
4559
+ * entries have been written.
4560
+ *
4561
+ * Indexes are only supported with IndexedDb persistence. Invoke either
4562
+ * `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
4563
+ * before setting an index configuration. If IndexedDb is not enabled, any
4564
+ * index configuration is ignored.
4565
+ *
4566
+ * The method accepts the JSON format exported by the Firebase CLI (`firebase
4567
+ * firestore:indexes`). If the JSON format is invalid, this method throws an
4568
+ * error.
4569
+ *
4570
+ * @param firestore - The {@link Firestore} instance to configure indexes for.
4571
+ * @param json -The JSON format exported by the Firebase CLI.
4572
+ * @throws FirestoreError if the JSON format is invalid.
4573
+ * @returns A `Promise` that resolves once all indices are successfully
4574
+ * configured.
4575
+ */
4576
+ export declare function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
4489
4577
 
4490
4578
  /**
4491
4579
  * Sets the verbosity of Cloud Firestore logs (debug, error, or silent).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firebase/firestore",
3
- "version": "3.4.13-canary.f5426a512",
3
+ "version": "3.4.14",
4
4
  "engines": {
5
5
  "node": ">=10.10.0"
6
6
  },
@@ -79,22 +79,22 @@
79
79
  "lite/package.json"
80
80
  ],
81
81
  "dependencies": {
82
- "@firebase/component": "0.5.17-canary.f5426a512",
83
- "@firebase/logger": "0.3.3-canary.f5426a512",
84
- "@firebase/util": "1.6.3-canary.f5426a512",
85
- "@firebase/webchannel-wrapper": "0.6.2-canary.f5426a512",
82
+ "@firebase/component": "0.5.17",
83
+ "@firebase/logger": "0.3.3",
84
+ "@firebase/util": "1.6.3",
85
+ "@firebase/webchannel-wrapper": "0.6.2",
86
86
  "@grpc/grpc-js": "^1.3.2",
87
87
  "@grpc/proto-loader": "^0.6.13",
88
88
  "node-fetch": "2.6.7",
89
89
  "tslib": "^2.1.0"
90
90
  },
91
91
  "peerDependencies": {
92
- "@firebase/app": "0.7.29-canary.f5426a512"
92
+ "@firebase/app": "0.x"
93
93
  },
94
94
  "devDependencies": {
95
- "@firebase/app": "0.7.29-canary.f5426a512",
96
- "@firebase/app-compat": "0.1.30-canary.f5426a512",
97
- "@firebase/auth": "0.20.5-canary.f5426a512",
95
+ "@firebase/app": "0.7.30",
96
+ "@firebase/app-compat": "0.1.31",
97
+ "@firebase/auth": "0.20.5",
98
98
  "@rollup/plugin-alias": "3.1.9",
99
99
  "@rollup/plugin-json": "4.1.0",
100
100
  "@types/eslint": "7.29.0",