@firebase/firestore 3.5.0-canary.c6ba6fc0f → 3.5.0-canary.e33694638

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.
Files changed (37) hide show
  1. package/dist/firestore/src/api/database.d.ts +6 -6
  2. package/dist/firestore/src/lite-api/database.d.ts +6 -6
  3. package/dist/index.d.ts +102 -7
  4. package/dist/index.esm2017.js +10 -10
  5. package/dist/index.esm2017.js.map +1 -1
  6. package/dist/index.esm5.js +7 -7
  7. package/dist/index.esm5.js.map +1 -1
  8. package/dist/index.node.cjs.js +9 -9
  9. package/dist/index.node.cjs.js.map +1 -1
  10. package/dist/index.node.mjs +9 -9
  11. package/dist/index.node.mjs.map +1 -1
  12. package/dist/index.rn.js +10 -10
  13. package/dist/index.rn.js.map +1 -1
  14. package/dist/internal.d.ts +7 -7
  15. package/dist/lite/firestore/src/api/database.d.ts +6 -6
  16. package/dist/lite/firestore/src/lite-api/database.d.ts +6 -6
  17. package/dist/lite/index.browser.esm2017.js +4 -4
  18. package/dist/lite/index.browser.esm2017.js.map +1 -1
  19. package/dist/lite/index.browser.esm5.js +4 -4
  20. package/dist/lite/index.browser.esm5.js.map +1 -1
  21. package/dist/lite/index.d.ts +4 -4
  22. package/dist/lite/index.node.cjs.js +4 -4
  23. package/dist/lite/index.node.cjs.js.map +1 -1
  24. package/dist/lite/index.node.mjs +4 -4
  25. package/dist/lite/index.node.mjs.map +1 -1
  26. package/dist/lite/index.rn.esm2017.js +4 -4
  27. package/dist/lite/index.rn.esm2017.js.map +1 -1
  28. package/dist/lite/internal.d.ts +6 -6
  29. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +2 -2
  30. package/dist/lite/packages/firestore/src/api/database.d.ts +6 -6
  31. package/dist/lite/packages/firestore/src/lite-api/database.d.ts +6 -6
  32. package/dist/lite/private.d.ts +4 -4
  33. package/dist/packages/firestore/dist/index.esm2017.d.ts +6 -6
  34. package/dist/packages/firestore/src/api/database.d.ts +6 -6
  35. package/dist/packages/firestore/src/lite-api/database.d.ts +6 -6
  36. package/dist/private.d.ts +104 -11
  37. package/package.json +9 -9
@@ -39,7 +39,7 @@ export declare const CACHE_SIZE_UNLIMITED = -1;
39
39
  /**
40
40
  * The Cloud Firestore service interface.
41
41
  *
42
- * Do not call this constructor directly. Instead, use {@link getFirestore}.
42
+ * Do not call this constructor directly. Instead, use {@link (getFirestore:1)}.
43
43
  */
44
44
  export declare class Firestore extends LiteFirestore {
45
45
  /**
@@ -56,8 +56,8 @@ export declare class Firestore extends LiteFirestore {
56
56
  /**
57
57
  * Initializes a new instance of {@link Firestore} with the provided settings.
58
58
  * Can only be called before any other function, including
59
- * {@link getFirestore}. If the custom settings are empty, this function is
60
- * equivalent to calling {@link getFirestore}.
59
+ * {@link (getFirestore:1)}. If the custom settings are empty, this function is
60
+ * equivalent to calling {@link (getFirestore:1)}.
61
61
  *
62
62
  * @param app - The {@link @firebase/app#FirebaseApp} with which the {@link Firestore} instance will
63
63
  * be associated.
@@ -115,7 +115,7 @@ export declare function configureFirestore(firestore: Firestore): void;
115
115
  * Attempts to enable persistent storage, if possible.
116
116
  *
117
117
  * Must be called before any other functions (other than
118
- * {@link initializeFirestore}, {@link getFirestore} or
118
+ * {@link initializeFirestore}, {@link (getFirestore:1)} or
119
119
  * {@link clearIndexedDbPersistence}.
120
120
  *
121
121
  * If this fails, `enableIndexedDbPersistence()` will reject the promise it
@@ -165,7 +165,7 @@ export declare function enableMultiTabIndexedDbPersistence(firestore: Firestore)
165
165
  * Must be called while the {@link Firestore} instance is not started (after the app is
166
166
  * terminated or when the app is first initialized). On startup, this function
167
167
  * must be called before other functions (other than {@link
168
- * initializeFirestore} or {@link getFirestore})). If the {@link Firestore}
168
+ * initializeFirestore} or {@link (getFirestore:1)})). If the {@link Firestore}
169
169
  * instance is still running, the promise will be rejected with the error code
170
170
  * of `failed-precondition`.
171
171
  *
@@ -221,7 +221,7 @@ export declare function disableNetwork(firestore: Firestore): Promise<void>;
221
221
  * may be used. Any other function will throw a `FirestoreError`.
222
222
  *
223
223
  * To restart after termination, create a new instance of FirebaseFirestore with
224
- * {@link getFirestore}.
224
+ * {@link (getFirestore:1)}.
225
225
  *
226
226
  * Termination does not cancel any pending writes, and any promises that are
227
227
  * awaiting a response from the server will not be resolved. If you have
@@ -29,7 +29,7 @@ declare module '@firebase/component' {
29
29
  /**
30
30
  * The Cloud Firestore service interface.
31
31
  *
32
- * Do not call this constructor directly. Instead, use {@link getFirestore}.
32
+ * Do not call this constructor directly. Instead, use {@link (getFirestore:1)}.
33
33
  */
34
34
  export declare class Firestore implements FirestoreService {
35
35
  _authCredentials: CredentialsProvider<User>;
@@ -71,8 +71,8 @@ export declare class Firestore implements FirestoreService {
71
71
  /**
72
72
  * Initializes a new instance of Cloud Firestore with the provided settings.
73
73
  * Can only be called before any other functions, including
74
- * {@link getFirestore}. If the custom settings are empty, this function is
75
- * equivalent to calling {@link getFirestore}.
74
+ * {@link (getFirestore:1)}. If the custom settings are empty, this function is
75
+ * equivalent to calling {@link (getFirestore:1)}.
76
76
  *
77
77
  * @param app - The {@link @firebase/app#FirebaseApp} with which the `Firestore` instance will
78
78
  * be associated.
@@ -83,8 +83,8 @@ export declare function initializeFirestore(app: FirebaseApp, settings: Firestor
83
83
  /**
84
84
  * Initializes a new instance of Cloud Firestore with the provided settings.
85
85
  * Can only be called before any other functions, including
86
- * {@link getFirestore}. If the custom settings are empty, this function is
87
- * equivalent to calling {@link getFirestore}.
86
+ * {@link (getFirestore:1)}. If the custom settings are empty, this function is
87
+ * equivalent to calling {@link (getFirestore:1)}.
88
88
  *
89
89
  * @param app - The {@link @firebase/app#FirebaseApp} with which the `Firestore` instance will
90
90
  * be associated.
@@ -160,7 +160,7 @@ export declare function connectFirestoreEmulator(firestore: Firestore, host: str
160
160
  * response from the server will not be resolved.
161
161
  *
162
162
  * To restart after termination, create a new instance of `Firestore` with
163
- * {@link getFirestore}.
163
+ * {@link (getFirestore:1)}.
164
164
  *
165
165
  * Note: Under normal circumstances, calling `terminate()` is not required. This
166
166
  * function is useful only when you want to force this instance to release all of
package/dist/index.d.ts CHANGED
@@ -120,7 +120,7 @@ export declare type ChildUpdateFields<K extends string, V> = V extends Record<st
120
120
  * Must be called while the {@link Firestore} instance is not started (after the app is
121
121
  * terminated or when the app is first initialized). On startup, this function
122
122
  * must be called before other functions (other than {@link
123
- * initializeFirestore} or {@link getFirestore})). If the {@link Firestore}
123
+ * initializeFirestore} or {@link (getFirestore:1)})). If the {@link Firestore}
124
124
  * instance is still running, the promise will be rejected with the error code
125
125
  * of `failed-precondition`.
126
126
  *
@@ -464,7 +464,7 @@ export { EmulatorMockTokenOptions };
464
464
  * Attempts to enable persistent storage, if possible.
465
465
  *
466
466
  * Must be called before any other functions (other than
467
- * {@link initializeFirestore}, {@link getFirestore} or
467
+ * {@link initializeFirestore}, {@link (getFirestore:1)} or
468
468
  * {@link clearIndexedDbPersistence}.
469
469
  *
470
470
  * If this fails, `enableIndexedDbPersistence()` will reject the promise it
@@ -591,7 +591,7 @@ export declare abstract class FieldValue {
591
591
  /**
592
592
  * The Cloud Firestore service interface.
593
593
  *
594
- * Do not call this constructor directly. Instead, use {@link getFirestore}.
594
+ * Do not call this constructor directly. Instead, use {@link (getFirestore:1)}.
595
595
  */
596
596
  export declare class Firestore {
597
597
  /**
@@ -939,11 +939,57 @@ export declare function getFirestore(app: FirebaseApp): Firestore;
939
939
  * `updateDoc()`
940
940
  */
941
941
  export declare function increment(n: number): FieldValue;
942
+ /**
943
+ * The SDK definition of a Firestore index.
944
+ * @beta
945
+ */
946
+ export declare interface Index {
947
+ /** The ID of the collection to index. */
948
+ readonly collectionGroup: string;
949
+ /** A list of fields to index. */
950
+ readonly fields?: IndexField[];
951
+ [key: string]: unknown;
952
+ }
953
+ /**
954
+ * A list of Firestore indexes to speed up local query execution.
955
+ *
956
+ * See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
957
+ * for a description of the format of the index definition.
958
+ * @beta
959
+ */
960
+ export declare interface IndexConfiguration {
961
+ /** A list of all Firestore indexes. */
962
+ readonly indexes?: Index[];
963
+ [key: string]: unknown;
964
+ }
965
+ /**
966
+ * A single field element in an index configuration.
967
+ * @beta
968
+ */
969
+ export declare interface IndexField {
970
+ /** The field path to index. */
971
+ readonly fieldPath: string;
972
+ /**
973
+ * What type of array index to create. Set to `CONTAINS` for `array-contains`
974
+ * and `array-contains-any` indexes.
975
+ *
976
+ * Only one of `arrayConfig` or `order` should be set;
977
+ */
978
+ readonly arrayConfig?: 'CONTAINS';
979
+ /**
980
+ * What type of array index to create. Set to `ASCENDING` or 'DESCENDING` for
981
+ * `==`, `!=`, `<=`, `<=`, `in` and `not-in` filters.
982
+ *
983
+ * Only one of `arrayConfig` or `order` should be set.
984
+ */
985
+ readonly order?: 'ASCENDING' | 'DESCENDING';
986
+ [key: string]: unknown;
987
+ }
942
988
  /**
943
989
  * Initializes a new instance of {@link Firestore} with the provided settings.
944
990
  * Can only be called before any other function, including
945
- * {@link getFirestore}. If the custom settings are empty, this function is
946
- * equivalent to calling {@link getFirestore}.
991
+ * {@link (getFirestore:1)}. If the custom settings are empty, this function is
992
+ * equivalent to calling {@link (getFirestore:1)}.
947
993
  *
948
994
  * @param app - The {@link @firebase/app#FirebaseApp} with which the {@link Firestore} instance will
949
995
  * be associated.
@@ -1482,7 +1528,56 @@ export declare function setDoc<T>(reference: DocumentReference<T>, data: WithFie
1482
1528
  * to the backend (note that it won't resolve while you're offline).
1483
1529
  */
1484
1530
  export declare function setDoc<T>(reference: DocumentReference<T>, data: PartialWithFieldValue<T>, options: SetOptions): Promise<void>;
1485
- /* Excluded from this release type: setIndexConfiguration */
1531
+ /**
1532
+ * Configures indexing for local query execution. Any previous index
1533
+ * configuration is overridden. The `Promise` resolves once the index
1534
+ * configuration has been persisted.
1535
+ *
1536
+ * The index entries themselves are created asynchronously. You can continue to
1537
+ * use queries that require indexing even if the indices are not yet available.
1538
+ * Query execution will automatically start using the index once the index
1539
+ * entries have been written.
1540
+ *
1541
+ * Indexes are only supported with IndexedDb persistence. Invoke either
1542
+ * `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
1543
+ * before setting an index configuration. If IndexedDb is not enabled, any
1544
+ * index configuration is ignored.
1545
+ *
1546
+ * @param firestore - The {@link Firestore} instance to configure indexes for.
1547
+ * @param configuration -The index definition.
1548
+ * @throws FirestoreError if the JSON format is invalid.
1549
+ * @returns A `Promise` that resolves once all indices are successfully
1550
+ * configured.
1551
+ * @beta
1552
+ */
1553
+ export declare function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
1554
+ /**
1555
+ * Configures indexing for local query execution. Any previous index
1556
+ * configuration is overridden. The `Promise` resolves once the index
1557
+ * configuration has been persisted.
1558
+ *
1559
+ * The index entries themselves are created asynchronously. You can continue to
1560
+ * use queries that require indexing even if the indices are not yet available.
1561
+ * Query execution will automatically start using the index once the index
1562
+ * entries have been written.
1563
+ *
1564
+ * Indexes are only supported with IndexedDb persistence. Invoke either
1565
+ * `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
1566
+ * before setting an index configuration. If IndexedDb is not enabled, any
1567
+ * index configuration is ignored.
1568
+ *
1569
+ * The method accepts the JSON format exported by the Firebase CLI (`firebase
1570
+ * firestore:indexes`). If the JSON format is invalid, this method throws an
1571
+ * error.
1572
+ *
1573
+ * @param firestore - The {@link Firestore} instance to configure indexes for.
1574
+ * @param json -The JSON format exported by the Firebase CLI.
1575
+ * @throws FirestoreError if the JSON format is invalid.
1576
+ * @returns A `Promise` that resolves once all indices are successfully
1577
+ * configured.
1578
+ * @beta
1579
+ */
1580
+ export declare function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
1486
1581
  /**
1487
1582
  * Sets the verbosity of Cloud Firestore logs (debug, error, or silent).
1488
1583
  *
@@ -1643,7 +1738,7 @@ export declare type TaskState = 'Error' | 'Running' | 'Success';
1643
1738
  * may be used. Any other function will throw a `FirestoreError`.
1644
1739
  *
1645
1740
  * To restart after termination, create a new instance of FirebaseFirestore with
1646
- * {@link getFirestore}.
1741
+ * {@link (getFirestore:1)}.
1647
1742
  *
1648
1743
  * Termination does not cancel any pending writes, and any promises that are
1649
1744
  * awaiting a response from the server will not be resolved. If you have
@@ -66,7 +66,7 @@ b.MOCK_USER = new b("mock-user");
66
66
  * See the License for the specific language governing permissions and
67
67
  * limitations under the License.
68
68
  */
69
- let P = "9.10.0-canary.c6ba6fc0f";
69
+ let P = "9.10.0-canary.e33694638";
70
70
 
71
71
  /**
72
72
  * @license
@@ -15745,7 +15745,7 @@ class Wc {
15745
15745
  /**
15746
15746
  * The Cloud Firestore service interface.
15747
15747
  *
15748
- * Do not call this constructor directly. Instead, use {@link getFirestore}.
15748
+ * Do not call this constructor directly. Instead, use {@link (getFirestore:1)}.
15749
15749
  */ class zc {
15750
15750
  /** @hideconstructor */
15751
15751
  constructor(t, e, n, s) {
@@ -18459,7 +18459,7 @@ class kh {
18459
18459
  /**
18460
18460
  * The Cloud Firestore service interface.
18461
18461
  *
18462
- * Do not call this constructor directly. Instead, use {@link getFirestore}.
18462
+ * Do not call this constructor directly. Instead, use {@link (getFirestore:1)}.
18463
18463
  */
18464
18464
  class Oh extends zc {
18465
18465
  /** @hideconstructor */
@@ -18481,8 +18481,8 @@ class Oh extends zc {
18481
18481
  /**
18482
18482
  * Initializes a new instance of {@link Firestore} with the provided settings.
18483
18483
  * Can only be called before any other function, including
18484
- * {@link getFirestore}. If the custom settings are empty, this function is
18485
- * equivalent to calling {@link getFirestore}.
18484
+ * {@link (getFirestore:1)}. If the custom settings are empty, this function is
18485
+ * equivalent to calling {@link (getFirestore:1)}.
18486
18486
  *
18487
18487
  * @param app - The {@link @firebase/app#FirebaseApp} with which the {@link Firestore} instance will
18488
18488
  * be associated.
@@ -18549,7 +18549,7 @@ function Lh(t) {
18549
18549
  * Attempts to enable persistent storage, if possible.
18550
18550
  *
18551
18551
  * Must be called before any other functions (other than
18552
- * {@link initializeFirestore}, {@link getFirestore} or
18552
+ * {@link initializeFirestore}, {@link (getFirestore:1)} or
18553
18553
  * {@link clearIndexedDbPersistence}.
18554
18554
  *
18555
18555
  * If this fails, `enableIndexedDbPersistence()` will reject the promise it
@@ -18643,7 +18643,7 @@ function Lh(t) {
18643
18643
  * Must be called while the {@link Firestore} instance is not started (after the app is
18644
18644
  * terminated or when the app is first initialized). On startup, this function
18645
18645
  * must be called before other functions (other than {@link
18646
- * initializeFirestore} or {@link getFirestore})). If the {@link Firestore}
18646
+ * initializeFirestore} or {@link (getFirestore:1)})). If the {@link Firestore}
18647
18647
  * instance is still running, the promise will be rejected with the error code
18648
18648
  * of `failed-precondition`.
18649
18649
  *
@@ -18762,7 +18762,7 @@ function Gh(t) {
18762
18762
  * may be used. Any other function will throw a `FirestoreError`.
18763
18763
  *
18764
18764
  * To restart after termination, create a new instance of FirebaseFirestore with
18765
- * {@link getFirestore}.
18765
+ * {@link (getFirestore:1)}.
18766
18766
  *
18767
18767
  * Termination does not cancel any pending writes, and any promises that are
18768
18768
  * awaiting a response from the server will not be resolved. If you have
@@ -19757,9 +19757,9 @@ function Cl(t, e) {
19757
19757
  return s = Object.assign({
19758
19758
  useFetchStreams: e
19759
19759
  }, s), r._setSettings(s), r;
19760
- }), "PUBLIC").setMultipleInstances(!0)), registerVersion(R, "3.5.0-canary.c6ba6fc0f", t),
19760
+ }), "PUBLIC").setMultipleInstances(!0)), registerVersion(R, "3.5.0-canary.e33694638", t),
19761
19761
  // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
19762
- registerVersion(R, "3.5.0-canary.c6ba6fc0f", "esm2017");
19762
+ registerVersion(R, "3.5.0-canary.e33694638", "esm2017");
19763
19763
  }();
19764
19764
 
19765
19765
  export { ih as AbstractUserDataWriter, ia as Bytes, Mh as CACHE_SIZE_UNLIMITED, Xc as CollectionReference, Jc as DocumentReference, Zh as DocumentSnapshot, ra as FieldPath, ua as FieldValue, Oh as Firestore, B as FirestoreError, ca as GeoPoint, kh as LoadBundleTask, Yc as Query, Ba as QueryConstraint, tl as QueryDocumentSnapshot, el as QuerySnapshot, Xh as SnapshotMetadata, et as Timestamp, El as Transaction, rl as WriteBatch, ee as _DatabaseId, ut as _DocumentKey, H as _EmptyAppCheckTokenProvider, q as _EmptyAuthCredentialsProvider, ot as _FieldPath, Gc as _cast, O as _debugAssert, Qt as _isBase64Available, x as _logWarn, Lc as _validateIsNotUsedTogether, gl as addDoc, vl as arrayRemove, Pl as arrayUnion, Gh as clearIndexedDbPersistence, Zc as collection, ta as collectionGroup, Hc as connectFirestoreEmulator, ml as deleteDoc, Rl as deleteField, Wh as disableNetwork, ea as doc, oa as documentId, Uh as enableIndexedDbPersistence, qh as enableMultiTabIndexedDbPersistence, jh as enableNetwork, Za as endAt, Xa as endBefore, Bh as ensureFirestoreConfigured, Il as executeWrite, ul as getDoc, al as getDocFromCache, hl as getDocFromServer, ll as getDocs, fl as getDocsFromCache, dl as getDocsFromServer, $h as getFirestore, Vl as increment, Fh as initializeFirestore, ja as limit, Wa as limitToLast, Hh as loadBundle, Jh as namedQuery, yl as onSnapshot, pl as onSnapshotsInSync, Ga as orderBy, La as query, sa as queryEqual, na as refEqual, Al as runTransaction, bl as serverTimestamp, _l as setDoc, Dl as setIndexConfiguration, S as setLogLevel, sl as snapshotEqual, Ja as startAfter, Ha as startAt, zh as terminate, wl as updateDoc, Qh as waitForPendingWrites, qa as where, Sl as writeBatch };