@algolia/client-search 5.54.1 → 5.55.1

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.
@@ -1,6 +1,7 @@
1
1
  // src/searchClient.ts
2
2
  import {
3
3
  ApiError,
4
+ DEFAULT_REPLACE_ALL_OBJECTS_MAX_RETRIES,
4
5
  createAuth,
5
6
  createIterablePromise,
6
7
  createTransporter,
@@ -8,7 +9,7 @@ import {
8
9
  shuffle,
9
10
  validateRequired
10
11
  } from "@algolia/client-common";
11
- var apiClientVersion = "5.54.1";
12
+ var apiClientVersion = "5.55.1";
12
13
  function getDefaultHosts(appId) {
13
14
  return [
14
15
  {
@@ -449,10 +450,16 @@ function createSearchClient({
449
450
  * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
450
451
  * @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.
451
452
  * @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].
452
- * @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion. 100 by default.
453
+ * @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion. 800 by default.
453
454
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch`, `operationIndex` and `getTask` method and merged with the transporter requestOptions.
454
455
  */
455
- async replaceAllObjects({ indexName, objects, batchSize, scopes, maxRetries = 100 }, requestOptions) {
456
+ async replaceAllObjects({
457
+ indexName,
458
+ objects,
459
+ batchSize,
460
+ scopes,
461
+ maxRetries = DEFAULT_REPLACE_ALL_OBJECTS_MAX_RETRIES
462
+ }, requestOptions) {
456
463
  const randomSuffix = Math.floor(Math.random() * 1e6) + 1e5;
457
464
  const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
458
465
  if (scopes === void 0) {