@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
@@ -763,6 +763,7 @@ declare class DatabaseInfo {
763
763
  readonly ssl: boolean;
764
764
  readonly forceLongPolling: boolean;
765
765
  readonly autoDetectLongPolling: boolean;
766
+ readonly longPollingOptions: ExperimentalLongPollingOptions;
766
767
  readonly useFetchStreams: boolean;
767
768
  /**
768
769
  * Constructs a DatabaseInfo using the provided host, databaseId and
@@ -778,10 +779,11 @@ declare class DatabaseInfo {
778
779
  * when using WebChannel as the network transport.
779
780
  * @param autoDetectLongPolling - Whether to use the detectBufferingProxy
780
781
  * option when using WebChannel as the network transport.
782
+ * @param longPollingOptions Options that configure long-polling.
781
783
  * @param useFetchStreams Whether to use the Fetch API instead of
782
784
  * XMLHTTPRequest
783
785
  */
784
- constructor(databaseId: DatabaseId, appId: string, persistenceKey: string, host: string, ssl: boolean, forceLongPolling: boolean, autoDetectLongPolling: boolean, useFetchStreams: boolean);
786
+ constructor(databaseId: DatabaseId, appId: string, persistenceKey: string, host: string, ssl: boolean, forceLongPolling: boolean, autoDetectLongPolling: boolean, longPollingOptions: ExperimentalLongPollingOptions, useFetchStreams: boolean);
785
787
  }
786
788
 
787
789
  /**
@@ -1308,6 +1310,53 @@ declare interface EventManager {
1308
1310
  onUnlisten?: (query: Query_2) => Promise<void>;
1309
1311
  }
1310
1312
 
1313
+ /**
1314
+ * @license
1315
+ * Copyright 2023 Google LLC
1316
+ *
1317
+ * Licensed under the Apache License, Version 2.0 (the "License");
1318
+ * you may not use this file except in compliance with the License.
1319
+ * You may obtain a copy of the License at
1320
+ *
1321
+ * http://www.apache.org/licenses/LICENSE-2.0
1322
+ *
1323
+ * Unless required by applicable law or agreed to in writing, software
1324
+ * distributed under the License is distributed on an "AS IS" BASIS,
1325
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1326
+ * See the License for the specific language governing permissions and
1327
+ * limitations under the License.
1328
+ */
1329
+ /**
1330
+ * Options that configure the SDK’s underlying network transport (WebChannel)
1331
+ * when long-polling is used.
1332
+ *
1333
+ * Note: This interface is "experimental" and is subject to change.
1334
+ *
1335
+ * See `FirestoreSettings.experimentalAutoDetectLongPolling`,
1336
+ * `FirestoreSettings.experimentalForceLongPolling`, and
1337
+ * `FirestoreSettings.experimentalLongPollingOptions`.
1338
+ */
1339
+ declare interface ExperimentalLongPollingOptions {
1340
+ /**
1341
+ * The desired maximum timeout interval, in seconds, to complete a
1342
+ * long-polling GET response. Valid values are between 5 and 30, inclusive.
1343
+ * Floating point values are allowed and will be rounded to the nearest
1344
+ * millisecond.
1345
+ *
1346
+ * By default, when long-polling is used the "hanging GET" request sent by
1347
+ * the client times out after 30 seconds. To request a different timeout
1348
+ * from the server, set this setting with the desired timeout.
1349
+ *
1350
+ * Changing the default timeout may be useful, for example, if the buffering
1351
+ * proxy that necessitated enabling long-polling in the first place has a
1352
+ * shorter timeout for hanging GET requests, in which case setting the
1353
+ * long-polling timeout to a shorter value, such as 25 seconds, may fix
1354
+ * prematurely-closed hanging GET requests.
1355
+ * For example, see https://github.com/firebase/firebase-js-sdk/issues/6987.
1356
+ */
1357
+ timeoutSeconds?: number;
1358
+ }
1359
+
1311
1360
  declare class FieldFilter extends Filter {
1312
1361
  readonly field: FieldPath_2;
1313
1362
  readonly op: Operator;
@@ -1703,6 +1752,7 @@ declare class FirestoreSettingsImpl {
1703
1752
  readonly cacheSizeBytes: number;
1704
1753
  readonly experimentalForceLongPolling: boolean;
1705
1754
  readonly experimentalAutoDetectLongPolling: boolean;
1755
+ readonly experimentalLongPollingOptions: ExperimentalLongPollingOptions;
1706
1756
  readonly ignoreUndefinedProperties: boolean;
1707
1757
  readonly useFetchStreams: boolean;
1708
1758
  readonly cache?: FirestoreLocalCache;
@@ -3715,6 +3765,7 @@ declare interface PrivateSettings extends Settings {
3715
3765
  cacheSizeBytes?: number;
3716
3766
  experimentalForceLongPolling?: boolean;
3717
3767
  experimentalAutoDetectLongPolling?: boolean;
3768
+ experimentalLongPollingOptions?: ExperimentalLongPollingOptions;
3718
3769
  useFetchStreams?: boolean;
3719
3770
  localCache?: FirestoreLocalCache;
3720
3771
  }