@firebase/firestore 3.11.0 → 3.12.0-20230511201449

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 (61) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/firestore/src/api/long_polling_options.d.ts +55 -0
  3. package/dist/firestore/src/api/settings.d.ts +16 -2
  4. package/dist/firestore/src/api.d.ts +1 -0
  5. package/dist/firestore/src/core/database_info.d.ts +4 -1
  6. package/dist/firestore/src/lite-api/settings.d.ts +3 -0
  7. package/dist/firestore/src/platform/browser/webchannel_connection.d.ts +1 -0
  8. package/dist/firestore/test/unit/api/long_polling_options.test.d.ts +17 -0
  9. package/dist/index.cjs.js +1222 -1181
  10. package/dist/index.cjs.js.map +1 -1
  11. package/dist/index.d.ts +61 -2
  12. package/dist/index.esm2017.js +1137 -1096
  13. package/dist/index.esm2017.js.map +1 -1
  14. package/dist/index.esm5.js +1041 -1021
  15. package/dist/index.esm5.js.map +1 -1
  16. package/dist/index.node.cjs.js +71 -6
  17. package/dist/index.node.cjs.js.map +1 -1
  18. package/dist/index.node.mjs +71 -6
  19. package/dist/index.node.mjs.map +1 -1
  20. package/dist/index.rn.js +868 -827
  21. package/dist/index.rn.js.map +1 -1
  22. package/dist/internal.d.ts +67 -3
  23. package/dist/lite/firestore/src/api/long_polling_options.d.ts +55 -0
  24. package/dist/lite/firestore/src/api/settings.d.ts +16 -2
  25. package/dist/lite/firestore/src/api.d.ts +1 -0
  26. package/dist/lite/firestore/src/core/database_info.d.ts +4 -1
  27. package/dist/lite/firestore/src/lite-api/settings.d.ts +3 -0
  28. package/dist/lite/firestore/src/platform/browser/webchannel_connection.d.ts +1 -0
  29. package/dist/lite/firestore/test/unit/api/long_polling_options.test.d.ts +17 -0
  30. package/dist/lite/index.browser.esm2017.js +756 -716
  31. package/dist/lite/index.browser.esm2017.js.map +1 -1
  32. package/dist/lite/index.browser.esm5.js +764 -745
  33. package/dist/lite/index.browser.esm5.js.map +1 -1
  34. package/dist/lite/index.cjs.js +756 -716
  35. package/dist/lite/index.cjs.js.map +1 -1
  36. package/dist/lite/index.node.cjs.js +71 -6
  37. package/dist/lite/index.node.cjs.js.map +1 -1
  38. package/dist/lite/index.node.mjs +71 -6
  39. package/dist/lite/index.node.mjs.map +1 -1
  40. package/dist/lite/index.rn.esm2017.js +763 -723
  41. package/dist/lite/index.rn.esm2017.js.map +1 -1
  42. package/dist/lite/internal.d.ts +52 -1
  43. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +127 -144
  44. package/dist/lite/packages/firestore/src/api/long_polling_options.d.ts +55 -0
  45. package/dist/lite/packages/firestore/src/api/settings.d.ts +16 -2
  46. package/dist/lite/packages/firestore/src/api.d.ts +1 -0
  47. package/dist/lite/packages/firestore/src/core/database_info.d.ts +4 -1
  48. package/dist/lite/packages/firestore/src/lite-api/settings.d.ts +3 -0
  49. package/dist/lite/packages/firestore/src/platform/browser/webchannel_connection.d.ts +1 -0
  50. package/dist/lite/packages/firestore/test/unit/api/long_polling_options.test.d.ts +17 -0
  51. package/dist/lite/private.d.ts +52 -1
  52. package/dist/packages/firestore/dist/index.esm2017.d.ts +275 -292
  53. package/dist/packages/firestore/src/api/long_polling_options.d.ts +55 -0
  54. package/dist/packages/firestore/src/api/settings.d.ts +16 -2
  55. package/dist/packages/firestore/src/api.d.ts +1 -0
  56. package/dist/packages/firestore/src/core/database_info.d.ts +4 -1
  57. package/dist/packages/firestore/src/lite-api/settings.d.ts +3 -0
  58. package/dist/packages/firestore/src/platform/browser/webchannel_connection.d.ts +1 -0
  59. package/dist/packages/firestore/test/unit/api/long_polling_options.test.d.ts +17 -0
  60. package/dist/private.d.ts +67 -3
  61. package/package.json +5 -5
package/dist/index.d.ts CHANGED
@@ -638,6 +638,52 @@ export declare function endBefore(snapshot: DocumentSnapshot<unknown>): QueryEnd
638
638
  * @returns A {@link QueryEndAtConstraint} to pass to `query()`
639
639
  */
640
640
  export declare function endBefore(...fieldValues: unknown[]): QueryEndAtConstraint;
641
+ /**
642
+ * @license
643
+ * Copyright 2023 Google LLC
644
+ *
645
+ * Licensed under the Apache License, Version 2.0 (the "License");
646
+ * you may not use this file except in compliance with the License.
647
+ * You may obtain a copy of the License at
648
+ *
649
+ * http://www.apache.org/licenses/LICENSE-2.0
650
+ *
651
+ * Unless required by applicable law or agreed to in writing, software
652
+ * distributed under the License is distributed on an "AS IS" BASIS,
653
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
654
+ * See the License for the specific language governing permissions and
655
+ * limitations under the License.
656
+ */
657
+ /**
658
+ * Options that configure the SDK’s underlying network transport (WebChannel)
659
+ * when long-polling is used.
660
+ *
661
+ * Note: This interface is "experimental" and is subject to change.
662
+ *
663
+ * See `FirestoreSettings.experimentalAutoDetectLongPolling`,
664
+ * `FirestoreSettings.experimentalForceLongPolling`, and
665
+ * `FirestoreSettings.experimentalLongPollingOptions`.
666
+ */
667
+ export declare interface ExperimentalLongPollingOptions {
668
+ /**
669
+ * The desired maximum timeout interval, in seconds, to complete a
670
+ * long-polling GET response. Valid values are between 5 and 30, inclusive.
671
+ * Floating point values are allowed and will be rounded to the nearest
672
+ * millisecond.
673
+ *
674
+ * By default, when long-polling is used the "hanging GET" request sent by
675
+ * the client times out after 30 seconds. To request a different timeout
676
+ * from the server, set this setting with the desired timeout.
677
+ *
678
+ * Changing the default timeout may be useful, for example, if the buffering
679
+ * proxy that necessitated enabling long-polling in the first place has a
680
+ * shorter timeout for hanging GET requests, in which case setting the
681
+ * long-polling timeout to a shorter value, such as 25 seconds, may fix
682
+ * prematurely-closed hanging GET requests.
683
+ * For example, see https://github.com/firebase/firebase-js-sdk/issues/6987.
684
+ */
685
+ timeoutSeconds?: number;
686
+ }
641
687
  /**
642
688
  * A `FieldPath` refers to a field in a document. The path may consist of a
643
689
  * single field name (referring to a top-level field in the document), or a
@@ -875,10 +921,23 @@ export declare interface FirestoreSettings {
875
921
  * detect if long-polling should be used. This is very similar to
876
922
  * `experimentalForceLongPolling`, but only uses long-polling if required.
877
923
  *
878
- * This setting will likely be enabled by default in future releases and
879
- * cannot be combined with `experimentalForceLongPolling`.
924
+ * After having had a default value of `false` since its inception in 2019,
925
+ * the default value of this setting was changed in mid-2023 to `true`. That
926
+ * is, auto-detection of long polling is now enabled by default. To disable
927
+ * it, set this setting to `false`, and please open a GitHub issue to share
928
+ * the problems that motivated you disabling long-polling auto-detection.
880
929
  */
881
930
  experimentalAutoDetectLongPolling?: boolean;
931
+ /**
932
+ * Options that configure the SDK’s underlying network transport (WebChannel)
933
+ * when long-polling is used.
934
+ *
935
+ * These options are only used if `experimentalForceLongPolling` is true or if
936
+ * `experimentalAutoDetectLongPolling` is true and the auto-detection
937
+ * determined that long-polling was needed. Otherwise, these options have no
938
+ * effect.
939
+ */
940
+ experimentalLongPollingOptions?: ExperimentalLongPollingOptions;
882
941
  /**
883
942
  * The hostname to connect to.
884
943
  */