@firebase/firestore 3.4.2-canary.044a8d7f9 → 3.4.2-canary.88d43ec00

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 (169) hide show
  1. package/dist/firestore/src/api/snapshot.d.ts +6 -6
  2. package/dist/firestore/src/lite-api/snapshot.d.ts +2 -2
  3. package/dist/firestore/test/integration/bootstrap.d.ts +0 -1
  4. package/dist/firestore/test/integration/util/events_accumulator.d.ts +2 -2
  5. package/dist/firestore/test/integration/util/firebase_export.d.ts +6 -14
  6. package/dist/firestore/test/integration/util/helpers.d.ts +18 -18
  7. package/dist/firestore/test/integration/util/internal_helpers.d.ts +3 -3
  8. package/dist/firestore/test/integration/util/settings.d.ts +2 -2
  9. package/dist/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
  10. package/dist/firestore/test/util/api_helpers.d.ts +1 -1
  11. package/dist/firestore/test/util/helpers.d.ts +4 -6
  12. package/dist/index.d.ts +6 -6
  13. package/dist/index.esm2017.js +869 -869
  14. package/dist/index.esm2017.js.map +1 -1
  15. package/dist/index.esm5.js +1257 -1257
  16. package/dist/index.esm5.js.map +1 -1
  17. package/dist/index.node.cjs.js +2674 -24
  18. package/dist/index.node.cjs.js.map +1 -1
  19. package/dist/index.node.mjs +2675 -25
  20. package/dist/index.node.mjs.map +1 -1
  21. package/dist/index.rn.js +1068 -1068
  22. package/dist/index.rn.js.map +1 -1
  23. package/dist/internal.d.ts +8 -8
  24. package/dist/lite/firestore/src/api/snapshot.d.ts +6 -6
  25. package/dist/lite/firestore/src/lite-api/snapshot.d.ts +2 -2
  26. package/dist/lite/firestore/test/integration/bootstrap.d.ts +0 -1
  27. package/dist/lite/firestore/test/integration/util/events_accumulator.d.ts +2 -2
  28. package/dist/lite/firestore/test/integration/util/firebase_export.d.ts +6 -14
  29. package/dist/lite/firestore/test/integration/util/helpers.d.ts +18 -18
  30. package/dist/lite/firestore/test/integration/util/internal_helpers.d.ts +3 -3
  31. package/dist/lite/firestore/test/integration/util/settings.d.ts +2 -2
  32. package/dist/lite/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
  33. package/dist/lite/firestore/test/util/api_helpers.d.ts +1 -1
  34. package/dist/lite/firestore/test/util/helpers.d.ts +4 -6
  35. package/dist/lite/index.browser.esm2017.js +124 -124
  36. package/dist/lite/index.browser.esm2017.js.map +1 -1
  37. package/dist/lite/index.browser.esm5.js +99 -99
  38. package/dist/lite/index.browser.esm5.js.map +1 -1
  39. package/dist/lite/index.d.ts +2 -2
  40. package/dist/lite/index.node.cjs.js +11 -12
  41. package/dist/lite/index.node.cjs.js.map +1 -1
  42. package/dist/lite/index.node.mjs +11 -12
  43. package/dist/lite/index.node.mjs.map +1 -1
  44. package/dist/lite/index.rn.esm2017.js +148 -148
  45. package/dist/lite/index.rn.esm2017.js.map +1 -1
  46. package/dist/lite/internal.d.ts +2 -2
  47. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +16 -16
  48. package/dist/lite/packages/firestore/src/api/snapshot.d.ts +6 -6
  49. package/dist/lite/packages/firestore/src/lite-api/snapshot.d.ts +2 -2
  50. package/dist/lite/packages/firestore/test/integration/bootstrap.d.ts +0 -1
  51. package/dist/lite/packages/firestore/test/integration/util/events_accumulator.d.ts +2 -2
  52. package/dist/lite/packages/firestore/test/integration/util/firebase_export.d.ts +6 -14
  53. package/dist/lite/packages/firestore/test/integration/util/helpers.d.ts +18 -18
  54. package/dist/lite/packages/firestore/test/integration/util/internal_helpers.d.ts +3 -3
  55. package/dist/lite/packages/firestore/test/integration/util/settings.d.ts +2 -2
  56. package/dist/lite/packages/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
  57. package/dist/lite/packages/firestore/test/util/api_helpers.d.ts +1 -1
  58. package/dist/lite/packages/firestore/test/util/helpers.d.ts +4 -6
  59. package/dist/lite/private.d.ts +2 -2
  60. package/dist/packages/firestore/dist/index.esm2017.d.ts +105 -105
  61. package/dist/packages/firestore/src/api/snapshot.d.ts +6 -6
  62. package/dist/packages/firestore/src/lite-api/snapshot.d.ts +2 -2
  63. package/dist/packages/firestore/test/integration/bootstrap.d.ts +0 -1
  64. package/dist/packages/firestore/test/integration/util/events_accumulator.d.ts +2 -2
  65. package/dist/packages/firestore/test/integration/util/firebase_export.d.ts +6 -14
  66. package/dist/packages/firestore/test/integration/util/helpers.d.ts +18 -18
  67. package/dist/packages/firestore/test/integration/util/internal_helpers.d.ts +3 -3
  68. package/dist/packages/firestore/test/integration/util/settings.d.ts +2 -2
  69. package/dist/packages/firestore/test/unit/api/{blob.test.d.ts → bytes.test.d.ts} +0 -0
  70. package/dist/packages/firestore/test/util/api_helpers.d.ts +1 -1
  71. package/dist/packages/firestore/test/util/helpers.d.ts +4 -6
  72. package/dist/private.d.ts +8 -8
  73. package/package.json +10 -13
  74. package/dist/firestore/compat/api/blob.d.ts +0 -29
  75. package/dist/firestore/compat/api/database.d.ts +0 -228
  76. package/dist/firestore/compat/api/field_path.d.ts +0 -36
  77. package/dist/firestore/compat/api/field_value.d.ts +0 -29
  78. package/dist/firestore/compat/api/geo_point.d.ts +0 -17
  79. package/dist/firestore/compat/api/observer.d.ts +0 -29
  80. package/dist/firestore/compat/api/timestamp.d.ts +0 -17
  81. package/dist/firestore/compat/config.d.ts +0 -28
  82. package/dist/firestore/compat/index.console.d.ts +0 -42
  83. package/dist/firestore/compat/index.d.ts +0 -49
  84. package/dist/firestore/compat/index.node.d.ts +0 -22
  85. package/dist/firestore/compat/index.rn.d.ts +0 -22
  86. package/dist/firestore/compat/register-module.d.ts +0 -42
  87. package/dist/firestore/compat/util/input_validation.d.ts +0 -18
  88. package/dist/lite/firestore/compat/api/blob.d.ts +0 -29
  89. package/dist/lite/firestore/compat/api/database.d.ts +0 -228
  90. package/dist/lite/firestore/compat/api/field_path.d.ts +0 -36
  91. package/dist/lite/firestore/compat/api/field_value.d.ts +0 -29
  92. package/dist/lite/firestore/compat/api/geo_point.d.ts +0 -17
  93. package/dist/lite/firestore/compat/api/observer.d.ts +0 -29
  94. package/dist/lite/firestore/compat/api/timestamp.d.ts +0 -17
  95. package/dist/lite/firestore/compat/config.d.ts +0 -28
  96. package/dist/lite/firestore/compat/index.console.d.ts +0 -42
  97. package/dist/lite/firestore/compat/index.d.ts +0 -49
  98. package/dist/lite/firestore/compat/index.node.d.ts +0 -22
  99. package/dist/lite/firestore/compat/index.rn.d.ts +0 -22
  100. package/dist/lite/firestore/compat/register-module.d.ts +0 -42
  101. package/dist/lite/firestore/compat/util/input_validation.d.ts +0 -18
  102. package/dist/lite/packages/firestore/compat/api/blob.d.ts +0 -29
  103. package/dist/lite/packages/firestore/compat/api/database.d.ts +0 -228
  104. package/dist/lite/packages/firestore/compat/api/field_path.d.ts +0 -36
  105. package/dist/lite/packages/firestore/compat/api/field_value.d.ts +0 -29
  106. package/dist/lite/packages/firestore/compat/api/geo_point.d.ts +0 -17
  107. package/dist/lite/packages/firestore/compat/api/observer.d.ts +0 -29
  108. package/dist/lite/packages/firestore/compat/api/timestamp.d.ts +0 -17
  109. package/dist/lite/packages/firestore/compat/config.d.ts +0 -28
  110. package/dist/lite/packages/firestore/compat/index.console.d.ts +0 -42
  111. package/dist/lite/packages/firestore/compat/index.d.ts +0 -49
  112. package/dist/lite/packages/firestore/compat/index.node.d.ts +0 -22
  113. package/dist/lite/packages/firestore/compat/index.rn.d.ts +0 -22
  114. package/dist/lite/packages/firestore/compat/register-module.d.ts +0 -42
  115. package/dist/lite/packages/firestore/compat/util/input_validation.d.ts +0 -18
  116. package/dist/lite/src/protos/README.md +0 -2
  117. package/dist/lite/src/protos/firestore/bundle.proto +0 -121
  118. package/dist/lite/src/protos/firestore_bundle_proto.ts +0 -93
  119. package/dist/lite/src/protos/firestore_proto_api.ts +0 -1259
  120. package/dist/lite/src/protos/google/api/annotations.proto +0 -31
  121. package/dist/lite/src/protos/google/api/http.proto +0 -370
  122. package/dist/lite/src/protos/google/firestore/v1/common.proto +0 -84
  123. package/dist/lite/src/protos/google/firestore/v1/document.proto +0 -151
  124. package/dist/lite/src/protos/google/firestore/v1/firestore.proto +0 -761
  125. package/dist/lite/src/protos/google/firestore/v1/query.proto +0 -302
  126. package/dist/lite/src/protos/google/firestore/v1/write.proto +0 -264
  127. package/dist/lite/src/protos/google/protobuf/any.proto +0 -155
  128. package/dist/lite/src/protos/google/protobuf/descriptor.proto +0 -882
  129. package/dist/lite/src/protos/google/protobuf/empty.proto +0 -52
  130. package/dist/lite/src/protos/google/protobuf/struct.proto +0 -96
  131. package/dist/lite/src/protos/google/protobuf/timestamp.proto +0 -137
  132. package/dist/lite/src/protos/google/protobuf/wrappers.proto +0 -123
  133. package/dist/lite/src/protos/google/rpc/status.proto +0 -92
  134. package/dist/lite/src/protos/google/type/latlng.proto +0 -71
  135. package/dist/lite/src/protos/update.sh +0 -61
  136. package/dist/packages/firestore/compat/api/blob.d.ts +0 -29
  137. package/dist/packages/firestore/compat/api/database.d.ts +0 -228
  138. package/dist/packages/firestore/compat/api/field_path.d.ts +0 -36
  139. package/dist/packages/firestore/compat/api/field_value.d.ts +0 -29
  140. package/dist/packages/firestore/compat/api/geo_point.d.ts +0 -17
  141. package/dist/packages/firestore/compat/api/observer.d.ts +0 -29
  142. package/dist/packages/firestore/compat/api/timestamp.d.ts +0 -17
  143. package/dist/packages/firestore/compat/config.d.ts +0 -28
  144. package/dist/packages/firestore/compat/index.console.d.ts +0 -42
  145. package/dist/packages/firestore/compat/index.d.ts +0 -49
  146. package/dist/packages/firestore/compat/index.node.d.ts +0 -22
  147. package/dist/packages/firestore/compat/index.rn.d.ts +0 -22
  148. package/dist/packages/firestore/compat/register-module.d.ts +0 -42
  149. package/dist/packages/firestore/compat/util/input_validation.d.ts +0 -18
  150. package/dist/src/protos/README.md +0 -2
  151. package/dist/src/protos/firestore/bundle.proto +0 -121
  152. package/dist/src/protos/firestore_bundle_proto.ts +0 -93
  153. package/dist/src/protos/firestore_proto_api.ts +0 -1259
  154. package/dist/src/protos/google/api/annotations.proto +0 -31
  155. package/dist/src/protos/google/api/http.proto +0 -370
  156. package/dist/src/protos/google/firestore/v1/common.proto +0 -84
  157. package/dist/src/protos/google/firestore/v1/document.proto +0 -151
  158. package/dist/src/protos/google/firestore/v1/firestore.proto +0 -761
  159. package/dist/src/protos/google/firestore/v1/query.proto +0 -302
  160. package/dist/src/protos/google/firestore/v1/write.proto +0 -264
  161. package/dist/src/protos/google/protobuf/any.proto +0 -155
  162. package/dist/src/protos/google/protobuf/descriptor.proto +0 -882
  163. package/dist/src/protos/google/protobuf/empty.proto +0 -52
  164. package/dist/src/protos/google/protobuf/struct.proto +0 -96
  165. package/dist/src/protos/google/protobuf/timestamp.proto +0 -137
  166. package/dist/src/protos/google/protobuf/wrappers.proto +0 -123
  167. package/dist/src/protos/google/rpc/status.proto +0 -92
  168. package/dist/src/protos/google/type/latlng.proto +0 -71
  169. package/dist/src/protos/update.sh +0 -61
@@ -1012,10 +1012,10 @@ export declare class Firestore implements FirestoreService {
1012
1012
  * }
1013
1013
  *
1014
1014
  * const postConverter = {
1015
- * toFirestore(post: WithFieldValue<Post>): firebase.firestore.DocumentData {
1015
+ * toFirestore(post: WithFieldValue<Post>): DocumentData {
1016
1016
  * return {title: post.title, author: post.author};
1017
1017
  * },
1018
- * fromFirestore(snapshot: firebase.firestore.QueryDocumentSnapshot): Post {
1018
+ * fromFirestore(snapshot: QueryDocumentSnapshot): Post {
1019
1019
  * const data = snapshot.data(options)!;
1020
1020
  * return new Post(data.title, data.author);
1021
1021
  * }
@@ -580,7 +580,7 @@ declare class kr {
580
580
  * provides methods for adding writes to the write batch. None of the writes
581
581
  * will be committed (or visible locally) until {@link WriteBatch.commit} is
582
582
  * called.
583
- */ declare class Fr {
583
+ */ declare class Sr {
584
584
  /** @hideconstructor */
585
585
  constructor(t: any, n: any);
586
586
  _firestore: any;
@@ -588,14 +588,14 @@ declare class kr {
588
588
  _mutations: any[];
589
589
  _committed: boolean;
590
590
  _dataReader: Ve;
591
- set(t: any, n: any, e: any): Fr;
592
- update(t: any, n: any, e: any, ...r: any[]): Fr;
591
+ set(t: any, n: any, e: any): Sr;
592
+ update(t: any, n: any, e: any, ...r: any[]): Sr;
593
593
  /**
594
594
  * Deletes the document referred to by the provided {@link DocumentReference}.
595
595
  *
596
596
  * @param documentRef - A reference to the document to be deleted.
597
597
  * @returns This `WriteBatch` instance. Used for chaining method calls.
598
- */ delete(t: any): Fr;
598
+ */ delete(t: any): Sr;
599
599
  /**
600
600
  * Commits all of the writes in this write batch as a single atomic unit.
601
601
  *
@@ -624,7 +624,7 @@ declare class kr {
624
624
  * @throws Error - If the provided input is not a valid Firestore document.
625
625
  * @returns A `Promise` resolved with a `DocumentReference` pointing to the
626
626
  * newly created document after it has been written to the backend.
627
- */ declare function Pr(t: any, n: any): Promise<he>;
627
+ */ declare function Rr(t: any, n: any): Promise<he>;
628
628
  /**
629
629
  * Returns a special value that can be used with {@link (setDoc:1)} or {@link
630
630
  * updateDoc:1} that tells the server to remove the given elements from any
@@ -704,7 +704,7 @@ declare function de(t: any, n: any, ...e: any[]): fe;
704
704
  /**
705
705
  * Returns a sentinel for use with {@link @firebase/firestore/lite#(updateDoc:1)} or
706
706
  * {@link @firebase/firestore/lite#(setDoc:1)} with `{merge: true}` to mark a field for deletion.
707
- */ declare function Rr(): $e;
707
+ */ declare function Pr(): $e;
708
708
  declare function me(t: any, n: any, ...e: any[]): he;
709
709
  /**
710
710
  * Returns a special sentinel `FieldPath` to refer to the ID of a document.
@@ -836,7 +836,7 @@ declare function oe(t: any, n: any): import("../../lite").Firestore;
836
836
  /**
837
837
  * Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to
838
838
  * include a server-generated timestamp in the written data.
839
- */ declare function Vr(): Se;
839
+ */ declare function Vr(): Fe;
840
840
  declare function Tr(t: any, n: any, e: any): Promise<void>;
841
841
  /**
842
842
  * Sets the verbosity of Cloud Firestore logs (debug, error, or silent).
@@ -904,7 +904,7 @@ declare function Ir(t: any, n: any, e: any, ...r: any[]): Promise<void>;
904
904
  *
905
905
  * @returns A `WriteBatch` that can be used to atomically execute multiple
906
906
  * writes.
907
- */ declare function xr(t: any): Fr;
907
+ */ declare function xr(t: any): Sr;
908
908
  /**
909
909
  * A dot-separated path for navigating sub-objects within a document.
910
910
  * @internal
@@ -976,7 +976,7 @@ import { FirebaseError as c } from "@firebase/util/dist/src/errors";
976
976
  databaseId: any;
977
977
  ignoreUndefinedProperties: any;
978
978
  q: any;
979
- /** Creates a new top-level parse context. */ ht(t: any, n: any, e: any, r?: boolean): Re;
979
+ /** Creates a new top-level parse context. */ ht(t: any, n: any, e: any, r?: boolean): Pe;
980
980
  }
981
981
  declare class qe extends be {
982
982
  constructor(t: any, n: any);
@@ -1021,7 +1021,7 @@ declare class sr extends tr {
1021
1021
  type: string;
1022
1022
  _apply(t: any): le;
1023
1023
  }
1024
- declare class Se extends be {
1024
+ declare class Fe extends be {
1025
1025
  _toFieldTransform(t: any): bn;
1026
1026
  isEqual(t: any): boolean;
1027
1027
  }
@@ -1080,7 +1080,7 @@ declare class J {
1080
1080
  forEach(t: any): void;
1081
1081
  toArray(): any;
1082
1082
  }
1083
- /** A "context" object passed around while parsing user data. */ declare class Re {
1083
+ /** A "context" object passed around while parsing user data. */ declare class Pe {
1084
1084
  /**
1085
1085
  * Initializes a ParseContext with the given source and path.
1086
1086
  *
@@ -1108,10 +1108,10 @@ declare class J {
1108
1108
  fieldMask: any;
1109
1109
  get path(): any;
1110
1110
  get tt(): any;
1111
- /** Returns a new context with the specified settings overwritten. */ nt(t: any): Re;
1112
- et(t: any): Re;
1113
- it(t: any): Re;
1114
- ot(t: any): Re;
1111
+ /** Returns a new context with the specified settings overwritten. */ nt(t: any): Pe;
1112
+ et(t: any): Pe;
1113
+ it(t: any): Pe;
1114
+ ot(t: any): Pe;
1115
1115
  ut(t: any): U;
1116
1116
  /** Returns 'true' if 'fieldPath' was traversed when creating this context. */ contains(t: any): boolean;
1117
1117
  Z(): void;
@@ -1138,4 +1138,4 @@ declare class J {
1138
1138
  field: any;
1139
1139
  transform: any;
1140
1140
  }
1141
- export { ve as Bytes, fe as CollectionReference, he as DocumentReference, He as DocumentSnapshot, _e as FieldPath, be as FieldValue, ie as Firestore, U as FirestoreError, Ee as GeoPoint, le as Query, tr as QueryConstraint, Ke as QueryDocumentSnapshot, Je as QuerySnapshot, gt as Timestamp, kr as Transaction, Fr as WriteBatch, Pr as addDoc, Nr as arrayRemove, Dr as arrayUnion, de as collection, we as collectionGroup, ce as connectFirestoreEmulator, Ar as deleteDoc, Rr as deleteField, me as doc, ge as documentId, wr as endAt, dr as endBefore, br as getDoc, Er as getDocs, ue as getFirestore, $r as increment, oe as initializeFirestore, ur as limit, cr as limitToLast, ir as orderBy, nr as query, ye as queryEqual, pe as refEqual, jr as runTransaction, Vr as serverTimestamp, Tr as setDoc, w as setLogLevel, Xe as snapshotEqual, lr as startAfter, hr as startAt, ae as terminate, Ir as updateDoc, rr as where, xr as writeBatch };
1141
+ export { ve as Bytes, fe as CollectionReference, he as DocumentReference, He as DocumentSnapshot, _e as FieldPath, be as FieldValue, ie as Firestore, U as FirestoreError, Ee as GeoPoint, le as Query, tr as QueryConstraint, Ke as QueryDocumentSnapshot, Je as QuerySnapshot, gt as Timestamp, kr as Transaction, Sr as WriteBatch, Rr as addDoc, Nr as arrayRemove, Dr as arrayUnion, de as collection, we as collectionGroup, ce as connectFirestoreEmulator, Ar as deleteDoc, Pr as deleteField, me as doc, ge as documentId, wr as endAt, dr as endBefore, br as getDoc, Er as getDocs, ue as getFirestore, $r as increment, oe as initializeFirestore, ur as limit, cr as limitToLast, ir as orderBy, nr as query, ye as queryEqual, pe as refEqual, jr as runTransaction, Vr as serverTimestamp, Tr as setDoc, w as setLogLevel, Xe as snapshotEqual, lr as startAfter, hr as startAt, ae as terminate, Ir as updateDoc, rr as where, xr as writeBatch };
@@ -42,12 +42,12 @@ import { SnapshotListenOptions } from './reference_impl';
42
42
  * }
43
43
  *
44
44
  * const postConverter = {
45
- * toFirestore(post: WithFieldValue<Post>): firebase.firestore.DocumentData {
45
+ * toFirestore(post: WithFieldValue<Post>): DocumentData {
46
46
  * return {title: post.title, author: post.author};
47
47
  * },
48
48
  * fromFirestore(
49
- * snapshot: firebase.firestore.QueryDocumentSnapshot,
50
- * options: firebase.firestore.SnapshotOptions
49
+ * snapshot: QueryDocumentSnapshot,
50
+ * options: SnapshotOptions
51
51
  * ): Post {
52
52
  * const data = snapshot.data(options)!;
53
53
  * return new Post(data.title, data.author);
@@ -206,7 +206,7 @@ export declare class DocumentSnapshot<T = DocumentData> extends LiteDocumentSnap
206
206
  * Retrieves all fields in the document as an `Object`. Returns `undefined` if
207
207
  * the document doesn't exist.
208
208
  *
209
- * By default, `FieldValue.serverTimestamp()` values that have not yet been
209
+ * By default, `serverTimestamp()` values that have not yet been
210
210
  * set to their final value will be returned as `null`. You can override
211
211
  * this by passing an options object.
212
212
  *
@@ -221,7 +221,7 @@ export declare class DocumentSnapshot<T = DocumentData> extends LiteDocumentSnap
221
221
  * Retrieves the field specified by `fieldPath`. Returns `undefined` if the
222
222
  * document or field doesn't exist.
223
223
  *
224
- * By default, a `FieldValue.serverTimestamp()` that has not yet been set to
224
+ * By default, a `serverTimestamp()` that has not yet been set to
225
225
  * its final value will be returned as `null`. You can override this by
226
226
  * passing an options object.
227
227
  *
@@ -250,7 +250,7 @@ export declare class QueryDocumentSnapshot<T = DocumentData> extends DocumentSna
250
250
  /**
251
251
  * Retrieves all fields in the document as an `Object`.
252
252
  *
253
- * By default, `FieldValue.serverTimestamp()` values that have not yet been
253
+ * By default, `serverTimestamp()` values that have not yet been
254
254
  * set to their final value will be returned as `null`. You can override
255
255
  * this by passing an options object.
256
256
  *
@@ -41,10 +41,10 @@ import { AbstractUserDataWriter } from './user_data_writer';
41
41
  * }
42
42
  *
43
43
  * const postConverter = {
44
- * toFirestore(post: WithFieldValue<Post>): firebase.firestore.DocumentData {
44
+ * toFirestore(post: WithFieldValue<Post>): DocumentData {
45
45
  * return {title: post.title, author: post.author};
46
46
  * },
47
- * fromFirestore(snapshot: firebase.firestore.QueryDocumentSnapshot): Post {
47
+ * fromFirestore(snapshot: QueryDocumentSnapshot): Post {
48
48
  * const data = snapshot.data(options)!;
49
49
  * return new Post(data.title, data.author);
50
50
  * }
@@ -15,4 +15,3 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  import '../../src/index';
18
- import '../../compat/index';
@@ -14,12 +14,12 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import * as firestore from '@firebase/firestore-types';
17
+ import { DocumentSnapshot, QuerySnapshot } from './firebase_export';
18
18
  /**
19
19
  * A helper object that can accumulate an arbitrary amount of events and resolve
20
20
  * a promise when expected number has been emitted.
21
21
  */
22
- export declare class EventsAccumulator<T extends firestore.DocumentSnapshot | firestore.QuerySnapshot> {
22
+ export declare class EventsAccumulator<T extends DocumentSnapshot | QuerySnapshot> {
23
23
  private events;
24
24
  private waitingFor;
25
25
  private deferred;
@@ -14,17 +14,9 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { FirebaseApp } from '@firebase/app-types';
18
- import * as firestore from '@firebase/firestore-types';
19
- import { Blob } from '../../../compat/api/blob';
20
- import { Firestore, DocumentReference, QueryDocumentSnapshot } from '../../../compat/api/database';
21
- import { FieldPath } from '../../../compat/api/field_path';
22
- import { FieldValue } from '../../../compat/api/field_value';
23
- import { GeoPoint } from '../../../compat/api/geo_point';
24
- import { Timestamp } from '../../../compat/api/timestamp';
25
- /**
26
- * Creates a new test instance of Firestore using either firebase.firestore()
27
- * or `initializeFirestore` from the modular API.
28
- */
29
- export declare function newTestFirestore(projectId: string, nameOrApp?: string | FirebaseApp, settings?: firestore.Settings): firestore.FirebaseFirestore;
30
- export { Firestore, FieldValue, FieldPath, Timestamp, Blob, GeoPoint, DocumentReference, QueryDocumentSnapshot };
17
+ import { FirebaseApp } from '@firebase/app';
18
+ import { Firestore } from '../../../src';
19
+ import { PrivateSettings } from '../../../src/lite-api/settings';
20
+ export declare function newTestFirestore(projectId: string, nameOrApp?: string | FirebaseApp, settings?: PrivateSettings): Firestore;
21
+ export * from '../../../src';
22
+ export { PrivateSettings };
@@ -14,7 +14,7 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import * as firestore from '@firebase/firestore-types';
17
+ import { DocumentReference, Firestore, CollectionReference, DocumentData, QuerySnapshot, PrivateSettings, SnapshotListenOptions } from './firebase_export';
18
18
  export declare function isPersistenceAvailable(): boolean;
19
19
  declare type ApiSuiteFunction = (message: string, testSuite: (persistence: boolean) => void) => void;
20
20
  interface ApiDescribe {
@@ -24,26 +24,26 @@ interface ApiDescribe {
24
24
  }
25
25
  export declare const apiDescribe: ApiDescribe;
26
26
  /** Converts the documents in a QuerySnapshot to an array with the data of each document. */
27
- export declare function toDataArray(docSet: firestore.QuerySnapshot): firestore.DocumentData[];
27
+ export declare function toDataArray(docSet: QuerySnapshot): DocumentData[];
28
28
  /** Converts the changes in a QuerySnapshot to an array with the data of each document. */
29
- export declare function toChangesArray(docSet: firestore.QuerySnapshot, options?: firestore.SnapshotListenOptions): firestore.DocumentData[];
30
- export declare function toDataMap(docSet: firestore.QuerySnapshot): {
31
- [field: string]: firestore.DocumentData;
29
+ export declare function toChangesArray(docSet: QuerySnapshot, options?: SnapshotListenOptions): DocumentData[];
30
+ export declare function toDataMap(docSet: QuerySnapshot): {
31
+ [field: string]: DocumentData;
32
32
  };
33
33
  /** Converts a DocumentSet to an array with the id of each document */
34
- export declare function toIds(docSet: firestore.QuerySnapshot): string[];
35
- export declare function withTestDb(persistence: boolean, fn: (db: firestore.FirebaseFirestore) => Promise<void>): Promise<void>;
34
+ export declare function toIds(docSet: QuerySnapshot): string[];
35
+ export declare function withTestDb(persistence: boolean, fn: (db: Firestore) => Promise<void>): Promise<void>;
36
36
  /** Runs provided fn with a db for an alternate project id. */
37
- export declare function withAlternateTestDb(persistence: boolean, fn: (db: firestore.FirebaseFirestore) => Promise<void>): Promise<void>;
38
- export declare function withTestDbs(persistence: boolean, numDbs: number, fn: (db: firestore.FirebaseFirestore[]) => Promise<void>): Promise<void>;
39
- export declare function withTestDbsSettings(persistence: boolean, projectId: string, settings: firestore.Settings, numDbs: number, fn: (db: firestore.FirebaseFirestore[]) => Promise<void>): Promise<void>;
40
- export declare function withTestDoc(persistence: boolean, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>;
41
- export declare function withTestDocAndSettings(persistence: boolean, settings: firestore.Settings, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>;
42
- export declare function withTestDocAndInitialData(persistence: boolean, initialData: firestore.DocumentData | null, fn: (doc: firestore.DocumentReference) => Promise<void>): Promise<void>;
37
+ export declare function withAlternateTestDb(persistence: boolean, fn: (db: Firestore) => Promise<void>): Promise<void>;
38
+ export declare function withTestDbs(persistence: boolean, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
39
+ export declare function withTestDbsSettings(persistence: boolean, projectId: string, settings: PrivateSettings, numDbs: number, fn: (db: Firestore[]) => Promise<void>): Promise<void>;
40
+ export declare function withTestDoc(persistence: boolean, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
41
+ export declare function withTestDocAndSettings(persistence: boolean, settings: PrivateSettings, fn: (doc: DocumentReference) => Promise<void>): Promise<void>;
42
+ export declare function withTestDocAndInitialData(persistence: boolean, initialData: DocumentData | null, fn: (doc: DocumentReference, db: Firestore) => Promise<void>): Promise<void>;
43
43
  export declare function withTestCollection(persistence: boolean, docs: {
44
- [key: string]: firestore.DocumentData;
45
- }, fn: (collection: firestore.CollectionReference) => Promise<void>): Promise<void>;
46
- export declare function withTestCollectionSettings(persistence: boolean, settings: firestore.Settings, docs: {
47
- [key: string]: firestore.DocumentData;
48
- }, fn: (collection: firestore.CollectionReference) => Promise<void>): Promise<void>;
44
+ [key: string]: DocumentData;
45
+ }, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
46
+ export declare function withTestCollectionSettings(persistence: boolean, settings: PrivateSettings, docs: {
47
+ [key: string]: DocumentData;
48
+ }, fn: (collection: CollectionReference, db: Firestore) => Promise<void>): Promise<void>;
49
49
  export {};
@@ -14,14 +14,14 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import * as firestore from '@firebase/firestore-types';
18
17
  import { CredentialChangeListener, CredentialsProvider, EmptyAuthCredentialsProvider } from '../../../src/api/credentials';
19
18
  import { User } from '../../../src/auth/user';
20
19
  import { DatabaseInfo } from '../../../src/core/database_info';
21
20
  import { Datastore } from '../../../src/remote/datastore';
22
21
  import { AsyncQueue } from '../../../src/util/async_queue';
23
22
  import { AsyncQueueImpl } from '../../../src/util/async_queue_impl';
24
- export declare function asyncQueue(db: firestore.FirebaseFirestore): AsyncQueueImpl;
23
+ import { Firestore } from './firebase_export';
24
+ export declare function asyncQueue(db: Firestore): AsyncQueueImpl;
25
25
  export declare function getDefaultDatabaseInfo(): DatabaseInfo;
26
26
  export declare function withTestDatastore(fn: (datastore: Datastore) => Promise<void>, authCredentialsProvider?: CredentialsProvider<User>, appCheckTokenProvider?: CredentialsProvider<string>): Promise<void>;
27
27
  export declare class MockAuthCredentialsProvider extends EmptyAuthCredentialsProvider {
@@ -30,4 +30,4 @@ export declare class MockAuthCredentialsProvider extends EmptyAuthCredentialsPro
30
30
  triggerUserChange(newUser: User): void;
31
31
  start(asyncQueue: AsyncQueue, listener: CredentialChangeListener<User>): void;
32
32
  }
33
- export declare function withMockCredentialProviderTestDb(persistence: boolean, fn: (db: firestore.FirebaseFirestore, mockCredential: MockAuthCredentialsProvider) => Promise<void>): Promise<void>;
33
+ export declare function withMockCredentialProviderTestDb(persistence: boolean, fn: (db: Firestore, mockCredential: MockAuthCredentialsProvider) => Promise<void>): Promise<void>;
@@ -14,8 +14,8 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import * as firestore from '@firebase/firestore-types';
17
+ import { PrivateSettings } from './firebase_export';
18
18
  export declare const USE_EMULATOR: boolean;
19
- export declare const DEFAULT_SETTINGS: firestore.Settings;
19
+ export declare const DEFAULT_SETTINGS: PrivateSettings;
20
20
  export declare const DEFAULT_PROJECT_ID: any;
21
21
  export declare const ALT_PROJECT_ID = "test-db2";
@@ -14,7 +14,7 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { CollectionReference, DocumentReference, DocumentSnapshot, Firestore, Query, QuerySnapshot } from '../../compat/api/database';
17
+ import { DocumentReference, Firestore, Query, CollectionReference, QuerySnapshot, DocumentSnapshot } from '../../src';
18
18
  import { DocumentKeySet } from '../../src/model/collections';
19
19
  import { JsonObject } from '../../src/model/object_value';
20
20
  /**
@@ -14,9 +14,7 @@
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import * as firestore from '@firebase/firestore-types';
18
- import { Blob } from '../../compat/api/blob';
19
- import { DocumentReference } from '../../compat/api/database';
17
+ import { Bytes, DocumentReference, OrderByDirection } from '../../src';
20
18
  import { BundledDocuments } from '../../src/core/bundle';
21
19
  import { DatabaseId } from '../../src/core/database_info';
22
20
  import { Query } from '../../src/core/query';
@@ -61,17 +59,17 @@ export declare function keys(...documents: Array<Document | string>): DocumentKe
61
59
  export declare function path(path: string, offset?: number): ResourcePath;
62
60
  export declare function field(path: string): FieldPath;
63
61
  export declare function mask(...paths: string[]): FieldMask;
64
- export declare function blob(...bytes: number[]): Blob;
62
+ export declare function blob(...bytes: number[]): Bytes;
65
63
  export declare function filter(path: string, op: string, value: unknown): FieldFilter;
66
64
  export declare function setMutation(keyStr: string, json: JsonObject<unknown>): SetMutation;
67
65
  export declare function patchMutation(keyStr: string, json: JsonObject<unknown>, precondition?: Precondition): PatchMutation;
68
66
  export declare function deleteMutation(keyStr: string): DeleteMutation;
69
67
  export declare function mutationResult(testVersion: TestSnapshotVersion): MutationResult;
70
- export declare function bound(values: Array<[string, {}, firestore.OrderByDirection]>, before: boolean): Bound;
68
+ export declare function bound(values: Array<[string, {}, OrderByDirection]>, before: boolean): Bound;
71
69
  export declare function query(resourcePath: string, ...constraints: Array<OrderBy | Filter>): Query;
72
70
  export declare function targetData(targetId: TargetId, queryPurpose: TargetPurpose, path: string): TargetData;
73
71
  export declare function noChangeEvent(targetId: number, snapshotVersion: number, resumeToken?: ByteString): RemoteEvent;
74
- export declare function existenceFilterEvent(targetId: number, count: number, snapshotVersion: number): RemoteEvent;
72
+ export declare function existenceFilterEvent(targetId: number, syncedKeys: DocumentKeySet, remoteCount: number, snapshotVersion: number): RemoteEvent;
75
73
  export declare function docAddedRemoteEvent(docOrDocs: MutableDocument | MutableDocument[], updatedInTargets?: TargetId[], removedFromTargets?: TargetId[], activeTargets?: TargetId[]): RemoteEvent;
76
74
  export declare function docUpdateRemoteEvent(doc: MutableDocument, updatedInTargets?: TargetId[], removedFromTargets?: TargetId[], limboTargets?: TargetId[]): RemoteEvent;
77
75
  export declare class TestBundledDocuments {
@@ -896,10 +896,10 @@ export declare class Firestore implements FirestoreService {
896
896
  * }
897
897
  *
898
898
  * const postConverter = {
899
- * toFirestore(post: WithFieldValue<Post>): firebase.firestore.DocumentData {
899
+ * toFirestore(post: WithFieldValue<Post>): DocumentData {
900
900
  * return {title: post.title, author: post.author};
901
901
  * },
902
- * fromFirestore(snapshot: firebase.firestore.QueryDocumentSnapshot): Post {
902
+ * fromFirestore(snapshot: QueryDocumentSnapshot): Post {
903
903
  * const data = snapshot.data(options)!;
904
904
  * return new Post(data.title, data.author);
905
905
  * }