@algolia/client-search 5.55.2 → 5.57.0

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.
@@ -8,7 +8,8 @@ import {
8
8
  createMemoryCache,
9
9
  createNullCache,
10
10
  createNullLogger,
11
- serializeQueryParameters
11
+ serializeQueryParameters,
12
+ withRequestId as withRequestId2
12
13
  } from "@algolia/client-common";
13
14
  import { createHttpRequester } from "@algolia/requester-node-http";
14
15
 
@@ -20,10 +21,12 @@ import {
20
21
  createIterablePromise,
21
22
  createTransporter,
22
23
  getAlgoliaAgent,
24
+ logWarning,
23
25
  shuffle,
24
- validateRequired
26
+ validateRequired,
27
+ withRequestId
25
28
  } from "@algolia/client-common";
26
- var apiClientVersion = "5.55.2";
29
+ var apiClientVersion = "5.57.0";
27
30
  function getDefaultHosts(appId) {
28
31
  return [
29
32
  {
@@ -143,6 +146,7 @@ function createSearchClient({
143
146
  maxRetries = 100,
144
147
  timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
145
148
  }, requestOptions) {
149
+ requestOptions = withRequestId(transporter, requestOptions);
146
150
  let retryCount = 0;
147
151
  return createIterablePromise({
148
152
  func: () => this.getTask({ indexName, taskID }, requestOptions),
@@ -170,6 +174,7 @@ function createSearchClient({
170
174
  maxRetries = 100,
171
175
  timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
172
176
  }, requestOptions) {
177
+ requestOptions = withRequestId(transporter, requestOptions);
173
178
  let retryCount = 0;
174
179
  return createIterablePromise({
175
180
  func: () => this.getAppTask({ taskID }, requestOptions),
@@ -201,6 +206,7 @@ function createSearchClient({
201
206
  maxRetries = 100,
202
207
  timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
203
208
  }, requestOptions) {
209
+ requestOptions = withRequestId(transporter, requestOptions);
204
210
  let retryCount = 0;
205
211
  const baseIteratorOptions = {
206
212
  aggregator: () => retryCount += 1,
@@ -256,6 +262,7 @@ function createSearchClient({
256
262
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
257
263
  */
258
264
  browseObjects({ indexName, browseParams, ...browseObjectsOptions }, requestOptions) {
265
+ requestOptions = withRequestId(transporter, requestOptions);
259
266
  return createIterablePromise({
260
267
  func: (previousResponse) => {
261
268
  return this.browse(
@@ -286,6 +293,7 @@ function createSearchClient({
286
293
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
287
294
  */
288
295
  browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
296
+ requestOptions = withRequestId(transporter, requestOptions);
289
297
  const params = {
290
298
  ...searchRulesParams,
291
299
  hitsPerPage: (searchRulesParams == null ? void 0 : searchRulesParams.hitsPerPage) || 1e3
@@ -323,6 +331,7 @@ function createSearchClient({
323
331
  searchSynonymsParams,
324
332
  ...browseSynonymsOptions
325
333
  }, requestOptions) {
334
+ requestOptions = withRequestId(transporter, requestOptions);
326
335
  const params = {
327
336
  ...searchSynonymsParams,
328
337
  page: (searchSynonymsParams == null ? void 0 : searchSynonymsParams.page) || 0,
@@ -368,6 +377,7 @@ function createSearchClient({
368
377
  batchSize = 1e3,
369
378
  maxRetries = 100
370
379
  }, requestOptions) {
380
+ requestOptions = withRequestId(transporter, requestOptions);
371
381
  let requests = [];
372
382
  const responses = [];
373
383
  const objectEntries = objects.entries();
@@ -380,7 +390,7 @@ function createSearchClient({
380
390
  }
381
391
  if (waitForTasks) {
382
392
  for (const resp of responses) {
383
- await this.waitForTask({ indexName, taskID: resp.taskID, maxRetries });
393
+ await this.waitForTask({ indexName, taskID: resp.taskID, maxRetries }, requestOptions);
384
394
  }
385
395
  }
386
396
  return responses;
@@ -458,6 +468,8 @@ function createSearchClient({
458
468
  * Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
459
469
  * See https://api-clients-automation.netlify.app/docs/custom-helpers/#replaceallobjects for implementation details.
460
470
  *
471
+ * Warning: calling this method with an empty `objects` list replaces the index with an empty one, deleting all existing records.
472
+ *
461
473
  * @summary Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
462
474
  * @param replaceAllObjects - The `replaceAllObjects` object.
463
475
  * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
@@ -474,6 +486,13 @@ function createSearchClient({
474
486
  scopes,
475
487
  maxRetries = DEFAULT_REPLACE_ALL_OBJECTS_MAX_RETRIES
476
488
  }, requestOptions) {
489
+ requestOptions = withRequestId(transporter, requestOptions);
490
+ if (objects.length === 0) {
491
+ logWarning(
492
+ transporter.logger,
493
+ `replaceAllObjects was called with an empty list of objects, which will delete all records currently in the "${indexName}" index.`
494
+ );
495
+ }
477
496
  const randomSuffix = Math.floor(Math.random() * 1e6) + 1e5;
478
497
  const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
479
498
  if (scopes === void 0) {
@@ -495,11 +514,14 @@ function createSearchClient({
495
514
  { indexName: tmpIndexName, objects, waitForTasks: true, batchSize, maxRetries },
496
515
  requestOptions
497
516
  );
498
- await this.waitForTask({
499
- indexName: tmpIndexName,
500
- taskID: copyOperationResponse.taskID,
501
- maxRetries
502
- });
517
+ await this.waitForTask(
518
+ {
519
+ indexName: tmpIndexName,
520
+ taskID: copyOperationResponse.taskID,
521
+ maxRetries
522
+ },
523
+ requestOptions
524
+ );
503
525
  copyOperationResponse = await this.operationIndex(
504
526
  {
505
527
  indexName,
@@ -511,11 +533,14 @@ function createSearchClient({
511
533
  },
512
534
  requestOptions
513
535
  );
514
- await this.waitForTask({
515
- indexName: tmpIndexName,
516
- taskID: copyOperationResponse.taskID,
517
- maxRetries
518
- });
536
+ await this.waitForTask(
537
+ {
538
+ indexName: tmpIndexName,
539
+ taskID: copyOperationResponse.taskID,
540
+ maxRetries
541
+ },
542
+ requestOptions
543
+ );
519
544
  const moveOperationResponse = await this.operationIndex(
520
545
  {
521
546
  indexName: tmpIndexName,
@@ -523,20 +548,23 @@ function createSearchClient({
523
548
  },
524
549
  requestOptions
525
550
  );
526
- await this.waitForTask({
527
- indexName: tmpIndexName,
528
- taskID: moveOperationResponse.taskID,
529
- maxRetries
530
- });
551
+ await this.waitForTask(
552
+ {
553
+ indexName: tmpIndexName,
554
+ taskID: moveOperationResponse.taskID,
555
+ maxRetries
556
+ },
557
+ requestOptions
558
+ );
531
559
  return { copyOperationResponse, batchResponses, moveOperationResponse };
532
560
  } catch (error) {
533
- await this.deleteIndex({ indexName: tmpIndexName });
561
+ await this.deleteIndex({ indexName: tmpIndexName }, requestOptions);
534
562
  throw error;
535
563
  }
536
564
  },
537
- async indexExists({ indexName }) {
565
+ async indexExists({ indexName }, requestOptions) {
538
566
  try {
539
- await this.getSettings({ indexName });
567
+ await this.getSettings({ indexName }, requestOptions);
540
568
  } catch (error) {
541
569
  if (error instanceof ApiError && error.status === 404) {
542
570
  return false;
@@ -590,6 +618,32 @@ function createSearchClient({
590
618
  };
591
619
  return transporter.request(request, requestOptions);
592
620
  },
621
+ /**
622
+ * Creates a new API key with specific permissions and restrictions.
623
+ *
624
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
625
+ *
626
+ * Required API Key ACLs:
627
+ * - admin
628
+ * @param apiKey - The apiKey object.
629
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
630
+ * @see addApiKey for the plain version.
631
+ */
632
+ addApiKeyWithHTTPInfo(apiKey, requestOptions) {
633
+ validateRequired("apiKey", "addApiKeyWithHTTPInfo", apiKey);
634
+ validateRequired("apiKey.acl", "addApiKeyWithHTTPInfo", apiKey.acl);
635
+ const requestPath = "/1/keys";
636
+ const headers = {};
637
+ const queryParameters = {};
638
+ const request = {
639
+ method: "POST",
640
+ path: requestPath,
641
+ queryParameters,
642
+ headers,
643
+ data: apiKey
644
+ };
645
+ return transporter.requestWithHttpInfo(request, requestOptions);
646
+ },
593
647
  /**
594
648
  * If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. If you want to use auto-generated object IDs, use the [`saveObject` operation](https://www.algolia.com/doc/rest-api/search/save-object). To update _some_ attributes of an existing record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object) instead. To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch).
595
649
  *
@@ -617,6 +671,36 @@ function createSearchClient({
617
671
  };
618
672
  return transporter.request(request, requestOptions);
619
673
  },
674
+ /**
675
+ * If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. If you want to use auto-generated object IDs, use the [`saveObject` operation](https://www.algolia.com/doc/rest-api/search/save-object). To update _some_ attributes of an existing record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object) instead. To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch).
676
+ *
677
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
678
+ *
679
+ * Required API Key ACLs:
680
+ * - addObject
681
+ * @param addOrUpdateObject - The addOrUpdateObject object.
682
+ * @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
683
+ * @param addOrUpdateObject.objectID - Unique record identifier.
684
+ * @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
685
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
686
+ * @see addOrUpdateObject for the plain version.
687
+ */
688
+ addOrUpdateObjectWithHTTPInfo({ indexName, objectID, body }, requestOptions) {
689
+ validateRequired("indexName", "addOrUpdateObjectWithHTTPInfo", indexName);
690
+ validateRequired("objectID", "addOrUpdateObjectWithHTTPInfo", objectID);
691
+ validateRequired("body", "addOrUpdateObjectWithHTTPInfo", body);
692
+ const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
693
+ const headers = {};
694
+ const queryParameters = {};
695
+ const request = {
696
+ method: "PUT",
697
+ path: requestPath,
698
+ queryParameters,
699
+ headers,
700
+ data: body
701
+ };
702
+ return transporter.requestWithHttpInfo(request, requestOptions);
703
+ },
620
704
  /**
621
705
  * Adds a source to the list of allowed sources.
622
706
  *
@@ -640,6 +724,32 @@ function createSearchClient({
640
724
  };
641
725
  return transporter.request(request, requestOptions);
642
726
  },
727
+ /**
728
+ * Adds a source to the list of allowed sources.
729
+ *
730
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
731
+ *
732
+ * Required API Key ACLs:
733
+ * - admin
734
+ * @param source - Source to add.
735
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
736
+ * @see appendSource for the plain version.
737
+ */
738
+ appendSourceWithHTTPInfo(source, requestOptions) {
739
+ validateRequired("source", "appendSourceWithHTTPInfo", source);
740
+ validateRequired("source.source", "appendSourceWithHTTPInfo", source.source);
741
+ const requestPath = "/1/security/sources/append";
742
+ const headers = {};
743
+ const queryParameters = {};
744
+ const request = {
745
+ method: "POST",
746
+ path: requestPath,
747
+ queryParameters,
748
+ headers,
749
+ data: source
750
+ };
751
+ return transporter.requestWithHttpInfo(request, requestOptions);
752
+ },
643
753
  /**
644
754
  * Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
645
755
  *
@@ -671,6 +781,40 @@ function createSearchClient({
671
781
  };
672
782
  return transporter.request(request, requestOptions);
673
783
  },
784
+ /**
785
+ * Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
786
+ *
787
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
788
+ *
789
+ * Required API Key ACLs:
790
+ * - admin
791
+ *
792
+ * @deprecated
793
+ * @param assignUserId - The assignUserId object.
794
+ * @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
795
+ * @param assignUserId.assignUserIdParams - The assignUserIdParams object.
796
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
797
+ * @see assignUserId for the plain version.
798
+ */
799
+ assignUserIdWithHTTPInfo({ xAlgoliaUserID, assignUserIdParams }, requestOptions) {
800
+ validateRequired("xAlgoliaUserID", "assignUserIdWithHTTPInfo", xAlgoliaUserID);
801
+ validateRequired("assignUserIdParams", "assignUserIdWithHTTPInfo", assignUserIdParams);
802
+ validateRequired("assignUserIdParams.cluster", "assignUserIdWithHTTPInfo", assignUserIdParams.cluster);
803
+ const requestPath = "/1/clusters/mapping";
804
+ const headers = {};
805
+ const queryParameters = {};
806
+ if (xAlgoliaUserID !== void 0) {
807
+ headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
808
+ }
809
+ const request = {
810
+ method: "POST",
811
+ path: requestPath,
812
+ queryParameters,
813
+ headers,
814
+ data: assignUserIdParams
815
+ };
816
+ return transporter.requestWithHttpInfo(request, requestOptions);
817
+ },
674
818
  /**
675
819
  * Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\'re specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
676
820
  *
@@ -697,6 +841,35 @@ function createSearchClient({
697
841
  };
698
842
  return transporter.request(request, requestOptions);
699
843
  },
844
+ /**
845
+ * Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\'re specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
846
+ *
847
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
848
+ *
849
+ * Required API Key ACLs:
850
+ * - addObject
851
+ * @param batch - The batch object.
852
+ * @param batch.indexName - Name of the index on which to perform the operation.
853
+ * @param batch.batchWriteParams - The batchWriteParams object.
854
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
855
+ * @see batch for the plain version.
856
+ */
857
+ batchWithHTTPInfo({ indexName, batchWriteParams }, requestOptions) {
858
+ validateRequired("indexName", "batchWithHTTPInfo", indexName);
859
+ validateRequired("batchWriteParams", "batchWithHTTPInfo", batchWriteParams);
860
+ validateRequired("batchWriteParams.requests", "batchWithHTTPInfo", batchWriteParams.requests);
861
+ const requestPath = "/1/indexes/{indexName}/batch".replace("{indexName}", encodeURIComponent(indexName));
862
+ const headers = {};
863
+ const queryParameters = {};
864
+ const request = {
865
+ method: "POST",
866
+ path: requestPath,
867
+ queryParameters,
868
+ headers,
869
+ data: batchWriteParams
870
+ };
871
+ return transporter.requestWithHttpInfo(request, requestOptions);
872
+ },
700
873
  /**
701
874
  * Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
702
875
  *
@@ -729,6 +902,49 @@ function createSearchClient({
729
902
  };
730
903
  return transporter.request(request, requestOptions);
731
904
  },
905
+ /**
906
+ * Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
907
+ *
908
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
909
+ *
910
+ * Required API Key ACLs:
911
+ * - admin
912
+ *
913
+ * @deprecated
914
+ * @param batchAssignUserIds - The batchAssignUserIds object.
915
+ * @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
916
+ * @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
917
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
918
+ * @see batchAssignUserIds for the plain version.
919
+ */
920
+ batchAssignUserIdsWithHTTPInfo({ xAlgoliaUserID, batchAssignUserIdsParams }, requestOptions) {
921
+ validateRequired("xAlgoliaUserID", "batchAssignUserIdsWithHTTPInfo", xAlgoliaUserID);
922
+ validateRequired("batchAssignUserIdsParams", "batchAssignUserIdsWithHTTPInfo", batchAssignUserIdsParams);
923
+ validateRequired(
924
+ "batchAssignUserIdsParams.cluster",
925
+ "batchAssignUserIdsWithHTTPInfo",
926
+ batchAssignUserIdsParams.cluster
927
+ );
928
+ validateRequired(
929
+ "batchAssignUserIdsParams.users",
930
+ "batchAssignUserIdsWithHTTPInfo",
931
+ batchAssignUserIdsParams.users
932
+ );
933
+ const requestPath = "/1/clusters/mapping/batch";
934
+ const headers = {};
935
+ const queryParameters = {};
936
+ if (xAlgoliaUserID !== void 0) {
937
+ headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
938
+ }
939
+ const request = {
940
+ method: "POST",
941
+ path: requestPath,
942
+ queryParameters,
943
+ headers,
944
+ data: batchAssignUserIdsParams
945
+ };
946
+ return transporter.requestWithHttpInfo(request, requestOptions);
947
+ },
732
948
  /**
733
949
  * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
734
950
  *
@@ -762,6 +978,46 @@ function createSearchClient({
762
978
  };
763
979
  return transporter.request(request, requestOptions);
764
980
  },
981
+ /**
982
+ * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
983
+ *
984
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
985
+ *
986
+ * Required API Key ACLs:
987
+ * - editSettings
988
+ * @param batchDictionaryEntries - The batchDictionaryEntries object.
989
+ * @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
990
+ * @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
991
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
992
+ * @see batchDictionaryEntries for the plain version.
993
+ */
994
+ batchDictionaryEntriesWithHTTPInfo({ dictionaryName, batchDictionaryEntriesParams }, requestOptions) {
995
+ validateRequired("dictionaryName", "batchDictionaryEntriesWithHTTPInfo", dictionaryName);
996
+ validateRequired(
997
+ "batchDictionaryEntriesParams",
998
+ "batchDictionaryEntriesWithHTTPInfo",
999
+ batchDictionaryEntriesParams
1000
+ );
1001
+ validateRequired(
1002
+ "batchDictionaryEntriesParams.requests",
1003
+ "batchDictionaryEntriesWithHTTPInfo",
1004
+ batchDictionaryEntriesParams.requests
1005
+ );
1006
+ const requestPath = "/1/dictionaries/{dictionaryName}/batch".replace(
1007
+ "{dictionaryName}",
1008
+ encodeURIComponent(dictionaryName)
1009
+ );
1010
+ const headers = {};
1011
+ const queryParameters = {};
1012
+ const request = {
1013
+ method: "POST",
1014
+ path: requestPath,
1015
+ queryParameters,
1016
+ headers,
1017
+ data: batchDictionaryEntriesParams
1018
+ };
1019
+ return transporter.requestWithHttpInfo(request, requestOptions);
1020
+ },
765
1021
  /**
766
1022
  * Retrieves records from an index, up to 1,000 per request. Searching returns _hits_ (records augmented with highlighting and ranking details). Browsing returns matching records only. Use browse to export your indices. - The Analytics API doesn\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There\'s no ranking for typo tolerance, number of matched words, proximity, or geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` evaluate to `true`) If you send these parameters with your browse requests, they\'re ignored.
767
1023
  *
@@ -787,6 +1043,34 @@ function createSearchClient({
787
1043
  };
788
1044
  return transporter.request(request, requestOptions);
789
1045
  },
1046
+ /**
1047
+ * Retrieves records from an index, up to 1,000 per request. Searching returns _hits_ (records augmented with highlighting and ranking details). Browsing returns matching records only. Use browse to export your indices. - The Analytics API doesn\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There\'s no ranking for typo tolerance, number of matched words, proximity, or geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` evaluate to `true`) If you send these parameters with your browse requests, they\'re ignored.
1048
+ *
1049
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1050
+ *
1051
+ * Required API Key ACLs:
1052
+ * - browse
1053
+ * @param browse - The browse object.
1054
+ * @param browse.indexName - Name of the index on which to perform the operation.
1055
+ * @param browse.browseParams - The browseParams object.
1056
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1057
+ * @see browse for the plain version.
1058
+ */
1059
+ browseWithHTTPInfo({ indexName, browseParams }, requestOptions) {
1060
+ validateRequired("indexName", "browseWithHTTPInfo", indexName);
1061
+ const requestPath = "/1/indexes/{indexName}/browse".replace("{indexName}", encodeURIComponent(indexName));
1062
+ const headers = {};
1063
+ const queryParameters = {};
1064
+ const request = {
1065
+ method: "POST",
1066
+ path: requestPath,
1067
+ queryParameters,
1068
+ headers,
1069
+ data: browseParams ? browseParams : {},
1070
+ useReadTransporter: true
1071
+ };
1072
+ return transporter.requestWithHttpInfo(request, requestOptions);
1073
+ },
790
1074
  /**
791
1075
  * Deletes only the records from an index while keeping settings, synonyms, and rules. This operation is resource-intensive and subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
792
1076
  *
@@ -809,6 +1093,31 @@ function createSearchClient({
809
1093
  };
810
1094
  return transporter.request(request, requestOptions);
811
1095
  },
1096
+ /**
1097
+ * Deletes only the records from an index while keeping settings, synonyms, and rules. This operation is resource-intensive and subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
1098
+ *
1099
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1100
+ *
1101
+ * Required API Key ACLs:
1102
+ * - deleteIndex
1103
+ * @param clearObjects - The clearObjects object.
1104
+ * @param clearObjects.indexName - Name of the index on which to perform the operation.
1105
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1106
+ * @see clearObjects for the plain version.
1107
+ */
1108
+ clearObjectsWithHTTPInfo({ indexName }, requestOptions) {
1109
+ validateRequired("indexName", "clearObjectsWithHTTPInfo", indexName);
1110
+ const requestPath = "/1/indexes/{indexName}/clear".replace("{indexName}", encodeURIComponent(indexName));
1111
+ const headers = {};
1112
+ const queryParameters = {};
1113
+ const request = {
1114
+ method: "POST",
1115
+ path: requestPath,
1116
+ queryParameters,
1117
+ headers
1118
+ };
1119
+ return transporter.requestWithHttpInfo(request, requestOptions);
1120
+ },
812
1121
  /**
813
1122
  * Deletes all rules from the index.
814
1123
  *
@@ -836,18 +1145,21 @@ function createSearchClient({
836
1145
  return transporter.request(request, requestOptions);
837
1146
  },
838
1147
  /**
839
- * Deletes all synonyms from the index.
1148
+ * Deletes all rules from the index.
1149
+ *
1150
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
840
1151
  *
841
1152
  * Required API Key ACLs:
842
1153
  * - editSettings
843
- * @param clearSynonyms - The clearSynonyms object.
844
- * @param clearSynonyms.indexName - Name of the index on which to perform the operation.
845
- * @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
1154
+ * @param clearRules - The clearRules object.
1155
+ * @param clearRules.indexName - Name of the index on which to perform the operation.
1156
+ * @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
846
1157
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1158
+ * @see clearRules for the plain version.
847
1159
  */
848
- clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
849
- validateRequired("indexName", "clearSynonyms", indexName);
850
- const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
1160
+ clearRulesWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
1161
+ validateRequired("indexName", "clearRulesWithHTTPInfo", indexName);
1162
+ const requestPath = "/1/indexes/{indexName}/rules/clear".replace("{indexName}", encodeURIComponent(indexName));
851
1163
  const headers = {};
852
1164
  const queryParameters = {};
853
1165
  if (forwardToReplicas !== void 0) {
@@ -859,10 +1171,65 @@ function createSearchClient({
859
1171
  queryParameters,
860
1172
  headers
861
1173
  };
862
- return transporter.request(request, requestOptions);
1174
+ return transporter.requestWithHttpInfo(request, requestOptions);
863
1175
  },
864
1176
  /**
865
- * This method lets you send requests to the Algolia REST API.
1177
+ * Deletes all synonyms from the index.
1178
+ *
1179
+ * Required API Key ACLs:
1180
+ * - editSettings
1181
+ * @param clearSynonyms - The clearSynonyms object.
1182
+ * @param clearSynonyms.indexName - Name of the index on which to perform the operation.
1183
+ * @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
1184
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1185
+ */
1186
+ clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
1187
+ validateRequired("indexName", "clearSynonyms", indexName);
1188
+ const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
1189
+ const headers = {};
1190
+ const queryParameters = {};
1191
+ if (forwardToReplicas !== void 0) {
1192
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
1193
+ }
1194
+ const request = {
1195
+ method: "POST",
1196
+ path: requestPath,
1197
+ queryParameters,
1198
+ headers
1199
+ };
1200
+ return transporter.request(request, requestOptions);
1201
+ },
1202
+ /**
1203
+ * Deletes all synonyms from the index.
1204
+ *
1205
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1206
+ *
1207
+ * Required API Key ACLs:
1208
+ * - editSettings
1209
+ * @param clearSynonyms - The clearSynonyms object.
1210
+ * @param clearSynonyms.indexName - Name of the index on which to perform the operation.
1211
+ * @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
1212
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1213
+ * @see clearSynonyms for the plain version.
1214
+ */
1215
+ clearSynonymsWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
1216
+ validateRequired("indexName", "clearSynonymsWithHTTPInfo", indexName);
1217
+ const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
1218
+ const headers = {};
1219
+ const queryParameters = {};
1220
+ if (forwardToReplicas !== void 0) {
1221
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
1222
+ }
1223
+ const request = {
1224
+ method: "POST",
1225
+ path: requestPath,
1226
+ queryParameters,
1227
+ headers
1228
+ };
1229
+ return transporter.requestWithHttpInfo(request, requestOptions);
1230
+ },
1231
+ /**
1232
+ * This method lets you send requests to the Algolia REST API.
866
1233
  * @param customDelete - The customDelete object.
867
1234
  * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
868
1235
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -881,6 +1248,29 @@ function createSearchClient({
881
1248
  };
882
1249
  return transporter.request(request, requestOptions);
883
1250
  },
1251
+ /**
1252
+ * This method lets you send requests to the Algolia REST API.
1253
+ *
1254
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1255
+ * @param customDelete - The customDelete object.
1256
+ * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
1257
+ * @param customDelete.parameters - Query parameters to apply to the current query.
1258
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1259
+ * @see customDelete for the plain version.
1260
+ */
1261
+ customDeleteWithHTTPInfo({ path, parameters }, requestOptions) {
1262
+ validateRequired("path", "customDeleteWithHTTPInfo", path);
1263
+ const requestPath = "/{path}".replace("{path}", path);
1264
+ const headers = {};
1265
+ const queryParameters = parameters ? parameters : {};
1266
+ const request = {
1267
+ method: "DELETE",
1268
+ path: requestPath,
1269
+ queryParameters,
1270
+ headers
1271
+ };
1272
+ return transporter.requestWithHttpInfo(request, requestOptions);
1273
+ },
884
1274
  /**
885
1275
  * This method lets you send requests to the Algolia REST API.
886
1276
  * @param customGet - The customGet object.
@@ -901,6 +1291,29 @@ function createSearchClient({
901
1291
  };
902
1292
  return transporter.request(request, requestOptions);
903
1293
  },
1294
+ /**
1295
+ * This method lets you send requests to the Algolia REST API.
1296
+ *
1297
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1298
+ * @param customGet - The customGet object.
1299
+ * @param customGet.path - Path of the endpoint, for example `1/newFeature`.
1300
+ * @param customGet.parameters - Query parameters to apply to the current query.
1301
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1302
+ * @see customGet for the plain version.
1303
+ */
1304
+ customGetWithHTTPInfo({ path, parameters }, requestOptions) {
1305
+ validateRequired("path", "customGetWithHTTPInfo", path);
1306
+ const requestPath = "/{path}".replace("{path}", path);
1307
+ const headers = {};
1308
+ const queryParameters = parameters ? parameters : {};
1309
+ const request = {
1310
+ method: "GET",
1311
+ path: requestPath,
1312
+ queryParameters,
1313
+ headers
1314
+ };
1315
+ return transporter.requestWithHttpInfo(request, requestOptions);
1316
+ },
904
1317
  /**
905
1318
  * This method lets you send requests to the Algolia REST API.
906
1319
  * @param customPost - The customPost object.
@@ -923,6 +1336,31 @@ function createSearchClient({
923
1336
  };
924
1337
  return transporter.request(request, requestOptions);
925
1338
  },
1339
+ /**
1340
+ * This method lets you send requests to the Algolia REST API.
1341
+ *
1342
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1343
+ * @param customPost - The customPost object.
1344
+ * @param customPost.path - Path of the endpoint, for example `1/newFeature`.
1345
+ * @param customPost.parameters - Query parameters to apply to the current query.
1346
+ * @param customPost.body - Parameters to send with the custom request.
1347
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1348
+ * @see customPost for the plain version.
1349
+ */
1350
+ customPostWithHTTPInfo({ path, parameters, body }, requestOptions) {
1351
+ validateRequired("path", "customPostWithHTTPInfo", path);
1352
+ const requestPath = "/{path}".replace("{path}", path);
1353
+ const headers = {};
1354
+ const queryParameters = parameters ? parameters : {};
1355
+ const request = {
1356
+ method: "POST",
1357
+ path: requestPath,
1358
+ queryParameters,
1359
+ headers,
1360
+ data: body ? body : {}
1361
+ };
1362
+ return transporter.requestWithHttpInfo(request, requestOptions);
1363
+ },
926
1364
  /**
927
1365
  * This method lets you send requests to the Algolia REST API.
928
1366
  * @param customPut - The customPut object.
@@ -945,6 +1383,31 @@ function createSearchClient({
945
1383
  };
946
1384
  return transporter.request(request, requestOptions);
947
1385
  },
1386
+ /**
1387
+ * This method lets you send requests to the Algolia REST API.
1388
+ *
1389
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1390
+ * @param customPut - The customPut object.
1391
+ * @param customPut.path - Path of the endpoint, for example `1/newFeature`.
1392
+ * @param customPut.parameters - Query parameters to apply to the current query.
1393
+ * @param customPut.body - Parameters to send with the custom request.
1394
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1395
+ * @see customPut for the plain version.
1396
+ */
1397
+ customPutWithHTTPInfo({ path, parameters, body }, requestOptions) {
1398
+ validateRequired("path", "customPutWithHTTPInfo", path);
1399
+ const requestPath = "/{path}".replace("{path}", path);
1400
+ const headers = {};
1401
+ const queryParameters = parameters ? parameters : {};
1402
+ const request = {
1403
+ method: "PUT",
1404
+ path: requestPath,
1405
+ queryParameters,
1406
+ headers,
1407
+ data: body ? body : {}
1408
+ };
1409
+ return transporter.requestWithHttpInfo(request, requestOptions);
1410
+ },
948
1411
  /**
949
1412
  * Deletes the API key.
950
1413
  *
@@ -967,6 +1430,31 @@ function createSearchClient({
967
1430
  };
968
1431
  return transporter.request(request, requestOptions);
969
1432
  },
1433
+ /**
1434
+ * Deletes the API key.
1435
+ *
1436
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1437
+ *
1438
+ * Required API Key ACLs:
1439
+ * - admin
1440
+ * @param deleteApiKey - The deleteApiKey object.
1441
+ * @param deleteApiKey.key - API key.
1442
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1443
+ * @see deleteApiKey for the plain version.
1444
+ */
1445
+ deleteApiKeyWithHTTPInfo({ key }, requestOptions) {
1446
+ validateRequired("key", "deleteApiKeyWithHTTPInfo", key);
1447
+ const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
1448
+ const headers = {};
1449
+ const queryParameters = {};
1450
+ const request = {
1451
+ method: "DELETE",
1452
+ path: requestPath,
1453
+ queryParameters,
1454
+ headers
1455
+ };
1456
+ return transporter.requestWithHttpInfo(request, requestOptions);
1457
+ },
970
1458
  /**
971
1459
  * This operation doesn\'t accept empty filters. This operation is resource-intensive. Use it only if you can\'t get the object IDs of the records you want to delete. It\'s more efficient to get a list of object IDs with the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse), and then delete the records using the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
972
1460
  *
@@ -992,6 +1480,34 @@ function createSearchClient({
992
1480
  };
993
1481
  return transporter.request(request, requestOptions);
994
1482
  },
1483
+ /**
1484
+ * This operation doesn\'t accept empty filters. This operation is resource-intensive. Use it only if you can\'t get the object IDs of the records you want to delete. It\'s more efficient to get a list of object IDs with the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse), and then delete the records using the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
1485
+ *
1486
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1487
+ *
1488
+ * Required API Key ACLs:
1489
+ * - deleteIndex
1490
+ * @param deleteBy - The deleteBy object.
1491
+ * @param deleteBy.indexName - Name of the index on which to perform the operation.
1492
+ * @param deleteBy.deleteByParams - The deleteByParams object.
1493
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1494
+ * @see deleteBy for the plain version.
1495
+ */
1496
+ deleteByWithHTTPInfo({ indexName, deleteByParams }, requestOptions) {
1497
+ validateRequired("indexName", "deleteByWithHTTPInfo", indexName);
1498
+ validateRequired("deleteByParams", "deleteByWithHTTPInfo", deleteByParams);
1499
+ const requestPath = "/1/indexes/{indexName}/deleteByQuery".replace("{indexName}", encodeURIComponent(indexName));
1500
+ const headers = {};
1501
+ const queryParameters = {};
1502
+ const request = {
1503
+ method: "POST",
1504
+ path: requestPath,
1505
+ queryParameters,
1506
+ headers,
1507
+ data: deleteByParams
1508
+ };
1509
+ return transporter.requestWithHttpInfo(request, requestOptions);
1510
+ },
995
1511
  /**
996
1512
  * Deletes an index and all its settings. - Deleting an index doesn\'t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas).
997
1513
  *
@@ -1014,6 +1530,31 @@ function createSearchClient({
1014
1530
  };
1015
1531
  return transporter.request(request, requestOptions);
1016
1532
  },
1533
+ /**
1534
+ * Deletes an index and all its settings. - Deleting an index doesn\'t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas).
1535
+ *
1536
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1537
+ *
1538
+ * Required API Key ACLs:
1539
+ * - deleteIndex
1540
+ * @param deleteIndex - The deleteIndex object.
1541
+ * @param deleteIndex.indexName - Name of the index on which to perform the operation.
1542
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1543
+ * @see deleteIndex for the plain version.
1544
+ */
1545
+ deleteIndexWithHTTPInfo({ indexName }, requestOptions) {
1546
+ validateRequired("indexName", "deleteIndexWithHTTPInfo", indexName);
1547
+ const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
1548
+ const headers = {};
1549
+ const queryParameters = {};
1550
+ const request = {
1551
+ method: "DELETE",
1552
+ path: requestPath,
1553
+ queryParameters,
1554
+ headers
1555
+ };
1556
+ return transporter.requestWithHttpInfo(request, requestOptions);
1557
+ },
1017
1558
  /**
1018
1559
  * Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). To delete records matching a query, use the [`deleteBy` operation](https://www.algolia.com/doc/rest-api/search/delete-by).
1019
1560
  *
@@ -1038,6 +1579,33 @@ function createSearchClient({
1038
1579
  };
1039
1580
  return transporter.request(request, requestOptions);
1040
1581
  },
1582
+ /**
1583
+ * Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). To delete records matching a query, use the [`deleteBy` operation](https://www.algolia.com/doc/rest-api/search/delete-by).
1584
+ *
1585
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1586
+ *
1587
+ * Required API Key ACLs:
1588
+ * - deleteObject
1589
+ * @param deleteObject - The deleteObject object.
1590
+ * @param deleteObject.indexName - Name of the index on which to perform the operation.
1591
+ * @param deleteObject.objectID - Unique record identifier.
1592
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1593
+ * @see deleteObject for the plain version.
1594
+ */
1595
+ deleteObjectWithHTTPInfo({ indexName, objectID }, requestOptions) {
1596
+ validateRequired("indexName", "deleteObjectWithHTTPInfo", indexName);
1597
+ validateRequired("objectID", "deleteObjectWithHTTPInfo", objectID);
1598
+ const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
1599
+ const headers = {};
1600
+ const queryParameters = {};
1601
+ const request = {
1602
+ method: "DELETE",
1603
+ path: requestPath,
1604
+ queryParameters,
1605
+ headers
1606
+ };
1607
+ return transporter.requestWithHttpInfo(request, requestOptions);
1608
+ },
1041
1609
  /**
1042
1610
  * Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).
1043
1611
  *
@@ -1066,6 +1634,37 @@ function createSearchClient({
1066
1634
  };
1067
1635
  return transporter.request(request, requestOptions);
1068
1636
  },
1637
+ /**
1638
+ * Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).
1639
+ *
1640
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1641
+ *
1642
+ * Required API Key ACLs:
1643
+ * - editSettings
1644
+ * @param deleteRule - The deleteRule object.
1645
+ * @param deleteRule.indexName - Name of the index on which to perform the operation.
1646
+ * @param deleteRule.objectID - Unique identifier of a rule object.
1647
+ * @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
1648
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1649
+ * @see deleteRule for the plain version.
1650
+ */
1651
+ deleteRuleWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
1652
+ validateRequired("indexName", "deleteRuleWithHTTPInfo", indexName);
1653
+ validateRequired("objectID", "deleteRuleWithHTTPInfo", objectID);
1654
+ const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
1655
+ const headers = {};
1656
+ const queryParameters = {};
1657
+ if (forwardToReplicas !== void 0) {
1658
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
1659
+ }
1660
+ const request = {
1661
+ method: "DELETE",
1662
+ path: requestPath,
1663
+ queryParameters,
1664
+ headers
1665
+ };
1666
+ return transporter.requestWithHttpInfo(request, requestOptions);
1667
+ },
1069
1668
  /**
1070
1669
  * Deletes a source from the list of allowed sources.
1071
1670
  *
@@ -1088,6 +1687,31 @@ function createSearchClient({
1088
1687
  };
1089
1688
  return transporter.request(request, requestOptions);
1090
1689
  },
1690
+ /**
1691
+ * Deletes a source from the list of allowed sources.
1692
+ *
1693
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1694
+ *
1695
+ * Required API Key ACLs:
1696
+ * - admin
1697
+ * @param deleteSource - The deleteSource object.
1698
+ * @param deleteSource.source - IP address range of the source.
1699
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1700
+ * @see deleteSource for the plain version.
1701
+ */
1702
+ deleteSourceWithHTTPInfo({ source }, requestOptions) {
1703
+ validateRequired("source", "deleteSourceWithHTTPInfo", source);
1704
+ const requestPath = "/1/security/sources/{source}".replace("{source}", encodeURIComponent(source));
1705
+ const headers = {};
1706
+ const queryParameters = {};
1707
+ const request = {
1708
+ method: "DELETE",
1709
+ path: requestPath,
1710
+ queryParameters,
1711
+ headers
1712
+ };
1713
+ return transporter.requestWithHttpInfo(request, requestOptions);
1714
+ },
1091
1715
  /**
1092
1716
  * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).
1093
1717
  *
@@ -1117,7 +1741,38 @@ function createSearchClient({
1117
1741
  return transporter.request(request, requestOptions);
1118
1742
  },
1119
1743
  /**
1120
- * Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key, with the description replaced by `<redacted>`.
1744
+ * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).
1745
+ *
1746
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1747
+ *
1748
+ * Required API Key ACLs:
1749
+ * - editSettings
1750
+ * @param deleteSynonym - The deleteSynonym object.
1751
+ * @param deleteSynonym.indexName - Name of the index on which to perform the operation.
1752
+ * @param deleteSynonym.objectID - Unique identifier of a synonym object.
1753
+ * @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
1754
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1755
+ * @see deleteSynonym for the plain version.
1756
+ */
1757
+ deleteSynonymWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
1758
+ validateRequired("indexName", "deleteSynonymWithHTTPInfo", indexName);
1759
+ validateRequired("objectID", "deleteSynonymWithHTTPInfo", objectID);
1760
+ const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
1761
+ const headers = {};
1762
+ const queryParameters = {};
1763
+ if (forwardToReplicas !== void 0) {
1764
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
1765
+ }
1766
+ const request = {
1767
+ method: "DELETE",
1768
+ path: requestPath,
1769
+ queryParameters,
1770
+ headers
1771
+ };
1772
+ return transporter.requestWithHttpInfo(request, requestOptions);
1773
+ },
1774
+ /**
1775
+ * Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key, with the description replaced by `<redacted>`.
1121
1776
  *
1122
1777
  * Required API Key ACLs:
1123
1778
  * - search
@@ -1138,6 +1793,31 @@ function createSearchClient({
1138
1793
  };
1139
1794
  return transporter.request(request, requestOptions);
1140
1795
  },
1796
+ /**
1797
+ * Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key, with the description replaced by `<redacted>`.
1798
+ *
1799
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1800
+ *
1801
+ * Required API Key ACLs:
1802
+ * - search
1803
+ * @param getApiKey - The getApiKey object.
1804
+ * @param getApiKey.key - API key.
1805
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1806
+ * @see getApiKey for the plain version.
1807
+ */
1808
+ getApiKeyWithHTTPInfo({ key }, requestOptions) {
1809
+ validateRequired("key", "getApiKeyWithHTTPInfo", key);
1810
+ const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
1811
+ const headers = {};
1812
+ const queryParameters = {};
1813
+ const request = {
1814
+ method: "GET",
1815
+ path: requestPath,
1816
+ queryParameters,
1817
+ headers
1818
+ };
1819
+ return transporter.requestWithHttpInfo(request, requestOptions);
1820
+ },
1141
1821
  /**
1142
1822
  * Checks the status of a given application task.
1143
1823
  *
@@ -1160,6 +1840,31 @@ function createSearchClient({
1160
1840
  };
1161
1841
  return transporter.request(request, requestOptions);
1162
1842
  },
1843
+ /**
1844
+ * Checks the status of a given application task.
1845
+ *
1846
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1847
+ *
1848
+ * Required API Key ACLs:
1849
+ * - editSettings
1850
+ * @param getAppTask - The getAppTask object.
1851
+ * @param getAppTask.taskID - Unique task identifier.
1852
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1853
+ * @see getAppTask for the plain version.
1854
+ */
1855
+ getAppTaskWithHTTPInfo({ taskID }, requestOptions) {
1856
+ validateRequired("taskID", "getAppTaskWithHTTPInfo", taskID);
1857
+ const requestPath = "/1/task/{taskID}".replace("{taskID}", encodeURIComponent(taskID));
1858
+ const headers = {};
1859
+ const queryParameters = {};
1860
+ const request = {
1861
+ method: "GET",
1862
+ path: requestPath,
1863
+ queryParameters,
1864
+ headers
1865
+ };
1866
+ return transporter.requestWithHttpInfo(request, requestOptions);
1867
+ },
1163
1868
  /**
1164
1869
  * Lists supported languages with their supported dictionary types and number of custom entries.
1165
1870
  *
@@ -1179,6 +1884,28 @@ function createSearchClient({
1179
1884
  };
1180
1885
  return transporter.request(request, requestOptions);
1181
1886
  },
1887
+ /**
1888
+ * Lists supported languages with their supported dictionary types and number of custom entries.
1889
+ *
1890
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1891
+ *
1892
+ * Required API Key ACLs:
1893
+ * - settings
1894
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1895
+ * @see getDictionaryLanguages for the plain version.
1896
+ */
1897
+ getDictionaryLanguagesWithHTTPInfo(requestOptions) {
1898
+ const requestPath = "/1/dictionaries/*/languages";
1899
+ const headers = {};
1900
+ const queryParameters = {};
1901
+ const request = {
1902
+ method: "GET",
1903
+ path: requestPath,
1904
+ queryParameters,
1905
+ headers
1906
+ };
1907
+ return transporter.requestWithHttpInfo(request, requestOptions);
1908
+ },
1182
1909
  /**
1183
1910
  * Retrieves the languages for which standard dictionary entries are turned off.
1184
1911
  *
@@ -1198,6 +1925,28 @@ function createSearchClient({
1198
1925
  };
1199
1926
  return transporter.request(request, requestOptions);
1200
1927
  },
1928
+ /**
1929
+ * Retrieves the languages for which standard dictionary entries are turned off.
1930
+ *
1931
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1932
+ *
1933
+ * Required API Key ACLs:
1934
+ * - settings
1935
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1936
+ * @see getDictionarySettings for the plain version.
1937
+ */
1938
+ getDictionarySettingsWithHTTPInfo(requestOptions) {
1939
+ const requestPath = "/1/dictionaries/*/settings";
1940
+ const headers = {};
1941
+ const queryParameters = {};
1942
+ const request = {
1943
+ method: "GET",
1944
+ path: requestPath,
1945
+ queryParameters,
1946
+ headers
1947
+ };
1948
+ return transporter.requestWithHttpInfo(request, requestOptions);
1949
+ },
1201
1950
  /**
1202
1951
  * The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/articles/17245378392977-How-does-Algolia-count-records-and-operations) but doesn\'t appear in the logs itself.
1203
1952
  *
@@ -1234,6 +1983,45 @@ function createSearchClient({
1234
1983
  };
1235
1984
  return transporter.request(request, requestOptions);
1236
1985
  },
1986
+ /**
1987
+ * The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/articles/17245378392977-How-does-Algolia-count-records-and-operations) but doesn\'t appear in the logs itself.
1988
+ *
1989
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1990
+ *
1991
+ * Required API Key ACLs:
1992
+ * - logs
1993
+ * @param getLogs - The getLogs object.
1994
+ * @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
1995
+ * @param getLogs.length - Maximum number of entries to retrieve.
1996
+ * @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
1997
+ * @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
1998
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1999
+ * @see getLogs for the plain version.
2000
+ */
2001
+ getLogsWithHTTPInfo({ offset, length, indexName, type } = {}, requestOptions = void 0) {
2002
+ const requestPath = "/1/logs";
2003
+ const headers = {};
2004
+ const queryParameters = {};
2005
+ if (offset !== void 0) {
2006
+ queryParameters["offset"] = offset.toString();
2007
+ }
2008
+ if (length !== void 0) {
2009
+ queryParameters["length"] = length.toString();
2010
+ }
2011
+ if (indexName !== void 0) {
2012
+ queryParameters["indexName"] = indexName.toString();
2013
+ }
2014
+ if (type !== void 0) {
2015
+ queryParameters["type"] = type.toString();
2016
+ }
2017
+ const request = {
2018
+ method: "GET",
2019
+ path: requestPath,
2020
+ queryParameters,
2021
+ headers
2022
+ };
2023
+ return transporter.requestWithHttpInfo(request, requestOptions);
2024
+ },
1237
2025
  /**
1238
2026
  * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](https://www.algolia.com/doc/rest-api/search/get-objects).
1239
2027
  *
@@ -1262,6 +2050,37 @@ function createSearchClient({
1262
2050
  };
1263
2051
  return transporter.request(request, requestOptions);
1264
2052
  },
2053
+ /**
2054
+ * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](https://www.algolia.com/doc/rest-api/search/get-objects).
2055
+ *
2056
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2057
+ *
2058
+ * Required API Key ACLs:
2059
+ * - search
2060
+ * @param getObject - The getObject object.
2061
+ * @param getObject.indexName - Name of the index on which to perform the operation.
2062
+ * @param getObject.objectID - Unique record identifier.
2063
+ * @param getObject.attributesToRetrieve - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won\'t be retrieved unless the request is authenticated with the admin API key.
2064
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2065
+ * @see getObject for the plain version.
2066
+ */
2067
+ getObjectWithHTTPInfo({ indexName, objectID, attributesToRetrieve }, requestOptions) {
2068
+ validateRequired("indexName", "getObjectWithHTTPInfo", indexName);
2069
+ validateRequired("objectID", "getObjectWithHTTPInfo", objectID);
2070
+ const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
2071
+ const headers = {};
2072
+ const queryParameters = {};
2073
+ if (attributesToRetrieve !== void 0) {
2074
+ queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
2075
+ }
2076
+ const request = {
2077
+ method: "GET",
2078
+ path: requestPath,
2079
+ queryParameters,
2080
+ headers
2081
+ };
2082
+ return transporter.requestWithHttpInfo(request, requestOptions);
2083
+ },
1265
2084
  /**
1266
2085
  * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
1267
2086
  *
@@ -1287,6 +2106,34 @@ function createSearchClient({
1287
2106
  };
1288
2107
  return transporter.request(request, requestOptions);
1289
2108
  },
2109
+ /**
2110
+ * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
2111
+ *
2112
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2113
+ *
2114
+ * Required API Key ACLs:
2115
+ * - search
2116
+ * @param getObjectsParams - Request object.
2117
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2118
+ * @see getObjects for the plain version.
2119
+ */
2120
+ getObjectsWithHTTPInfo(getObjectsParams, requestOptions) {
2121
+ validateRequired("getObjectsParams", "getObjectsWithHTTPInfo", getObjectsParams);
2122
+ validateRequired("getObjectsParams.requests", "getObjectsWithHTTPInfo", getObjectsParams.requests);
2123
+ const requestPath = "/1/indexes/*/objects";
2124
+ const headers = {};
2125
+ const queryParameters = {};
2126
+ const request = {
2127
+ method: "POST",
2128
+ path: requestPath,
2129
+ queryParameters,
2130
+ headers,
2131
+ data: getObjectsParams,
2132
+ useReadTransporter: true,
2133
+ cacheable: true
2134
+ };
2135
+ return transporter.requestWithHttpInfo(request, requestOptions);
2136
+ },
1290
2137
  /**
1291
2138
  * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).
1292
2139
  *
@@ -1312,40 +2159,241 @@ function createSearchClient({
1312
2159
  return transporter.request(request, requestOptions);
1313
2160
  },
1314
2161
  /**
1315
- * Retrieves an object with non-null index settings.
2162
+ * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-rules).
2163
+ *
2164
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2165
+ *
2166
+ * Required API Key ACLs:
2167
+ * - settings
2168
+ * @param getRule - The getRule object.
2169
+ * @param getRule.indexName - Name of the index on which to perform the operation.
2170
+ * @param getRule.objectID - Unique identifier of a rule object.
2171
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2172
+ * @see getRule for the plain version.
2173
+ */
2174
+ getRuleWithHTTPInfo({ indexName, objectID }, requestOptions) {
2175
+ validateRequired("indexName", "getRuleWithHTTPInfo", indexName);
2176
+ validateRequired("objectID", "getRuleWithHTTPInfo", objectID);
2177
+ const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
2178
+ const headers = {};
2179
+ const queryParameters = {};
2180
+ const request = {
2181
+ method: "GET",
2182
+ path: requestPath,
2183
+ queryParameters,
2184
+ headers
2185
+ };
2186
+ return transporter.requestWithHttpInfo(request, requestOptions);
2187
+ },
2188
+ /**
2189
+ * Retrieves an object with non-null index settings.
2190
+ *
2191
+ * Required API Key ACLs:
2192
+ * - settings
2193
+ * @param getSettings - The getSettings object.
2194
+ * @param getSettings.indexName - Name of the index on which to perform the operation.
2195
+ * @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
2196
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2197
+ */
2198
+ getSettings({ indexName, getVersion }, requestOptions) {
2199
+ validateRequired("indexName", "getSettings", indexName);
2200
+ const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
2201
+ const headers = {};
2202
+ const queryParameters = {};
2203
+ if (getVersion !== void 0) {
2204
+ queryParameters["getVersion"] = getVersion.toString();
2205
+ }
2206
+ const request = {
2207
+ method: "GET",
2208
+ path: requestPath,
2209
+ queryParameters,
2210
+ headers
2211
+ };
2212
+ return transporter.request(request, requestOptions);
2213
+ },
2214
+ /**
2215
+ * Retrieves an object with non-null index settings.
2216
+ *
2217
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2218
+ *
2219
+ * Required API Key ACLs:
2220
+ * - settings
2221
+ * @param getSettings - The getSettings object.
2222
+ * @param getSettings.indexName - Name of the index on which to perform the operation.
2223
+ * @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
2224
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2225
+ * @see getSettings for the plain version.
2226
+ */
2227
+ getSettingsWithHTTPInfo({ indexName, getVersion }, requestOptions) {
2228
+ validateRequired("indexName", "getSettingsWithHTTPInfo", indexName);
2229
+ const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
2230
+ const headers = {};
2231
+ const queryParameters = {};
2232
+ if (getVersion !== void 0) {
2233
+ queryParameters["getVersion"] = getVersion.toString();
2234
+ }
2235
+ const request = {
2236
+ method: "GET",
2237
+ path: requestPath,
2238
+ queryParameters,
2239
+ headers
2240
+ };
2241
+ return transporter.requestWithHttpInfo(request, requestOptions);
2242
+ },
2243
+ /**
2244
+ * Retrieves all allowed IP addresses with access to your application.
2245
+ *
2246
+ * Required API Key ACLs:
2247
+ * - admin
2248
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2249
+ */
2250
+ getSources(requestOptions) {
2251
+ const requestPath = "/1/security/sources";
2252
+ const headers = {};
2253
+ const queryParameters = {};
2254
+ const request = {
2255
+ method: "GET",
2256
+ path: requestPath,
2257
+ queryParameters,
2258
+ headers
2259
+ };
2260
+ return transporter.request(request, requestOptions);
2261
+ },
2262
+ /**
2263
+ * Retrieves all allowed IP addresses with access to your application.
2264
+ *
2265
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2266
+ *
2267
+ * Required API Key ACLs:
2268
+ * - admin
2269
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2270
+ * @see getSources for the plain version.
2271
+ */
2272
+ getSourcesWithHTTPInfo(requestOptions) {
2273
+ const requestPath = "/1/security/sources";
2274
+ const headers = {};
2275
+ const queryParameters = {};
2276
+ const request = {
2277
+ method: "GET",
2278
+ path: requestPath,
2279
+ queryParameters,
2280
+ headers
2281
+ };
2282
+ return transporter.requestWithHttpInfo(request, requestOptions);
2283
+ },
2284
+ /**
2285
+ * Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).
2286
+ *
2287
+ * Required API Key ACLs:
2288
+ * - settings
2289
+ * @param getSynonym - The getSynonym object.
2290
+ * @param getSynonym.indexName - Name of the index on which to perform the operation.
2291
+ * @param getSynonym.objectID - Unique identifier of a synonym object.
2292
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2293
+ */
2294
+ getSynonym({ indexName, objectID }, requestOptions) {
2295
+ validateRequired("indexName", "getSynonym", indexName);
2296
+ validateRequired("objectID", "getSynonym", objectID);
2297
+ const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
2298
+ const headers = {};
2299
+ const queryParameters = {};
2300
+ const request = {
2301
+ method: "GET",
2302
+ path: requestPath,
2303
+ queryParameters,
2304
+ headers
2305
+ };
2306
+ return transporter.request(request, requestOptions);
2307
+ },
2308
+ /**
2309
+ * Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).
2310
+ *
2311
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2312
+ *
2313
+ * Required API Key ACLs:
2314
+ * - settings
2315
+ * @param getSynonym - The getSynonym object.
2316
+ * @param getSynonym.indexName - Name of the index on which to perform the operation.
2317
+ * @param getSynonym.objectID - Unique identifier of a synonym object.
2318
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2319
+ * @see getSynonym for the plain version.
2320
+ */
2321
+ getSynonymWithHTTPInfo({ indexName, objectID }, requestOptions) {
2322
+ validateRequired("indexName", "getSynonymWithHTTPInfo", indexName);
2323
+ validateRequired("objectID", "getSynonymWithHTTPInfo", objectID);
2324
+ const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
2325
+ const headers = {};
2326
+ const queryParameters = {};
2327
+ const request = {
2328
+ method: "GET",
2329
+ path: requestPath,
2330
+ queryParameters,
2331
+ headers
2332
+ };
2333
+ return transporter.requestWithHttpInfo(request, requestOptions);
2334
+ },
2335
+ /**
2336
+ * Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks\' responses include a task ID that you can use to check the status.
2337
+ *
2338
+ * Required API Key ACLs:
2339
+ * - addObject
2340
+ * @param getTask - The getTask object.
2341
+ * @param getTask.indexName - Name of the index on which to perform the operation.
2342
+ * @param getTask.taskID - Unique task identifier.
2343
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2344
+ */
2345
+ getTask({ indexName, taskID }, requestOptions) {
2346
+ validateRequired("indexName", "getTask", indexName);
2347
+ validateRequired("taskID", "getTask", taskID);
2348
+ const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
2349
+ const headers = {};
2350
+ const queryParameters = {};
2351
+ const request = {
2352
+ method: "GET",
2353
+ path: requestPath,
2354
+ queryParameters,
2355
+ headers
2356
+ };
2357
+ return transporter.request(request, requestOptions);
2358
+ },
2359
+ /**
2360
+ * Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks\' responses include a task ID that you can use to check the status.
2361
+ *
2362
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1316
2363
  *
1317
2364
  * Required API Key ACLs:
1318
- * - settings
1319
- * @param getSettings - The getSettings object.
1320
- * @param getSettings.indexName - Name of the index on which to perform the operation.
1321
- * @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
2365
+ * - addObject
2366
+ * @param getTask - The getTask object.
2367
+ * @param getTask.indexName - Name of the index on which to perform the operation.
2368
+ * @param getTask.taskID - Unique task identifier.
1322
2369
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2370
+ * @see getTask for the plain version.
1323
2371
  */
1324
- getSettings({ indexName, getVersion }, requestOptions) {
1325
- validateRequired("indexName", "getSettings", indexName);
1326
- const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
2372
+ getTaskWithHTTPInfo({ indexName, taskID }, requestOptions) {
2373
+ validateRequired("indexName", "getTaskWithHTTPInfo", indexName);
2374
+ validateRequired("taskID", "getTaskWithHTTPInfo", taskID);
2375
+ const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
1327
2376
  const headers = {};
1328
2377
  const queryParameters = {};
1329
- if (getVersion !== void 0) {
1330
- queryParameters["getVersion"] = getVersion.toString();
1331
- }
1332
2378
  const request = {
1333
2379
  method: "GET",
1334
2380
  path: requestPath,
1335
2381
  queryParameters,
1336
2382
  headers
1337
2383
  };
1338
- return transporter.request(request, requestOptions);
2384
+ return transporter.requestWithHttpInfo(request, requestOptions);
1339
2385
  },
1340
2386
  /**
1341
- * Retrieves all allowed IP addresses with access to your application.
2387
+ * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
1342
2388
  *
1343
2389
  * Required API Key ACLs:
1344
2390
  * - admin
2391
+ *
2392
+ * @deprecated
1345
2393
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1346
2394
  */
1347
- getSources(requestOptions) {
1348
- const requestPath = "/1/security/sources";
2395
+ getTopUserIds(requestOptions) {
2396
+ const requestPath = "/1/clusters/mapping/top";
1349
2397
  const headers = {};
1350
2398
  const queryParameters = {};
1351
2399
  const request = {
@@ -1357,19 +2405,19 @@ function createSearchClient({
1357
2405
  return transporter.request(request, requestOptions);
1358
2406
  },
1359
2407
  /**
1360
- * Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](https://www.algolia.com/doc/rest-api/search/search-synonyms).
2408
+ * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
2409
+ *
2410
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1361
2411
  *
1362
2412
  * Required API Key ACLs:
1363
- * - settings
1364
- * @param getSynonym - The getSynonym object.
1365
- * @param getSynonym.indexName - Name of the index on which to perform the operation.
1366
- * @param getSynonym.objectID - Unique identifier of a synonym object.
2413
+ * - admin
2414
+ *
2415
+ * @deprecated
1367
2416
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2417
+ * @see getTopUserIds for the plain version.
1368
2418
  */
1369
- getSynonym({ indexName, objectID }, requestOptions) {
1370
- validateRequired("indexName", "getSynonym", indexName);
1371
- validateRequired("objectID", "getSynonym", objectID);
1372
- const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
2419
+ getTopUserIdsWithHTTPInfo(requestOptions) {
2420
+ const requestPath = "/1/clusters/mapping/top";
1373
2421
  const headers = {};
1374
2422
  const queryParameters = {};
1375
2423
  const request = {
@@ -1378,22 +2426,22 @@ function createSearchClient({
1378
2426
  queryParameters,
1379
2427
  headers
1380
2428
  };
1381
- return transporter.request(request, requestOptions);
2429
+ return transporter.requestWithHttpInfo(request, requestOptions);
1382
2430
  },
1383
2431
  /**
1384
- * Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks\' responses include a task ID that you can use to check the status.
2432
+ * Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
1385
2433
  *
1386
2434
  * Required API Key ACLs:
1387
- * - addObject
1388
- * @param getTask - The getTask object.
1389
- * @param getTask.indexName - Name of the index on which to perform the operation.
1390
- * @param getTask.taskID - Unique task identifier.
2435
+ * - admin
2436
+ *
2437
+ * @deprecated
2438
+ * @param getUserId - The getUserId object.
2439
+ * @param getUserId.userID - Unique identifier of the user who makes the search request.
1391
2440
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1392
2441
  */
1393
- getTask({ indexName, taskID }, requestOptions) {
1394
- validateRequired("indexName", "getTask", indexName);
1395
- validateRequired("taskID", "getTask", taskID);
1396
- const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
2442
+ getUserId({ userID }, requestOptions) {
2443
+ validateRequired("userID", "getUserId", userID);
2444
+ const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
1397
2445
  const headers = {};
1398
2446
  const queryParameters = {};
1399
2447
  const request = {
@@ -1405,16 +2453,22 @@ function createSearchClient({
1405
2453
  return transporter.request(request, requestOptions);
1406
2454
  },
1407
2455
  /**
1408
- * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
2456
+ * Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
2457
+ *
2458
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
1409
2459
  *
1410
2460
  * Required API Key ACLs:
1411
2461
  * - admin
1412
2462
  *
1413
2463
  * @deprecated
2464
+ * @param getUserId - The getUserId object.
2465
+ * @param getUserId.userID - Unique identifier of the user who makes the search request.
1414
2466
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2467
+ * @see getUserId for the plain version.
1415
2468
  */
1416
- getTopUserIds(requestOptions) {
1417
- const requestPath = "/1/clusters/mapping/top";
2469
+ getUserIdWithHTTPInfo({ userID }, requestOptions) {
2470
+ validateRequired("userID", "getUserIdWithHTTPInfo", userID);
2471
+ const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
1418
2472
  const headers = {};
1419
2473
  const queryParameters = {};
1420
2474
  const request = {
@@ -1423,24 +2477,26 @@ function createSearchClient({
1423
2477
  queryParameters,
1424
2478
  headers
1425
2479
  };
1426
- return transporter.request(request, requestOptions);
2480
+ return transporter.requestWithHttpInfo(request, requestOptions);
1427
2481
  },
1428
2482
  /**
1429
- * Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
2483
+ * To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.
1430
2484
  *
1431
2485
  * Required API Key ACLs:
1432
2486
  * - admin
1433
2487
  *
1434
2488
  * @deprecated
1435
- * @param getUserId - The getUserId object.
1436
- * @param getUserId.userID - Unique identifier of the user who makes the search request.
2489
+ * @param hasPendingMappings - The hasPendingMappings object.
2490
+ * @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
1437
2491
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1438
2492
  */
1439
- getUserId({ userID }, requestOptions) {
1440
- validateRequired("userID", "getUserId", userID);
1441
- const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
2493
+ hasPendingMappings({ getClusters } = {}, requestOptions = void 0) {
2494
+ const requestPath = "/1/clusters/mapping/pending";
1442
2495
  const headers = {};
1443
2496
  const queryParameters = {};
2497
+ if (getClusters !== void 0) {
2498
+ queryParameters["getClusters"] = getClusters.toString();
2499
+ }
1444
2500
  const request = {
1445
2501
  method: "GET",
1446
2502
  path: requestPath,
@@ -1452,6 +2508,8 @@ function createSearchClient({
1452
2508
  /**
1453
2509
  * To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.
1454
2510
  *
2511
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2512
+ *
1455
2513
  * Required API Key ACLs:
1456
2514
  * - admin
1457
2515
  *
@@ -1459,8 +2517,9 @@ function createSearchClient({
1459
2517
  * @param hasPendingMappings - The hasPendingMappings object.
1460
2518
  * @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
1461
2519
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2520
+ * @see hasPendingMappings for the plain version.
1462
2521
  */
1463
- hasPendingMappings({ getClusters } = {}, requestOptions = void 0) {
2522
+ hasPendingMappingsWithHTTPInfo({ getClusters } = {}, requestOptions = void 0) {
1464
2523
  const requestPath = "/1/clusters/mapping/pending";
1465
2524
  const headers = {};
1466
2525
  const queryParameters = {};
@@ -1473,7 +2532,7 @@ function createSearchClient({
1473
2532
  queryParameters,
1474
2533
  headers
1475
2534
  };
1476
- return transporter.request(request, requestOptions);
2535
+ return transporter.requestWithHttpInfo(request, requestOptions);
1477
2536
  },
1478
2537
  /**
1479
2538
  * Lists all API keys associated with your Algolia application, including their permissions and restrictions.
@@ -1494,6 +2553,28 @@ function createSearchClient({
1494
2553
  };
1495
2554
  return transporter.request(request, requestOptions);
1496
2555
  },
2556
+ /**
2557
+ * Lists all API keys associated with your Algolia application, including their permissions and restrictions.
2558
+ *
2559
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2560
+ *
2561
+ * Required API Key ACLs:
2562
+ * - admin
2563
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2564
+ * @see listApiKeys for the plain version.
2565
+ */
2566
+ listApiKeysWithHTTPInfo(requestOptions) {
2567
+ const requestPath = "/1/keys";
2568
+ const headers = {};
2569
+ const queryParameters = {};
2570
+ const request = {
2571
+ method: "GET",
2572
+ path: requestPath,
2573
+ queryParameters,
2574
+ headers
2575
+ };
2576
+ return transporter.requestWithHttpInfo(request, requestOptions);
2577
+ },
1497
2578
  /**
1498
2579
  * Lists the available clusters in a multi-cluster setup.
1499
2580
  *
@@ -1515,6 +2596,30 @@ function createSearchClient({
1515
2596
  };
1516
2597
  return transporter.request(request, requestOptions);
1517
2598
  },
2599
+ /**
2600
+ * Lists the available clusters in a multi-cluster setup.
2601
+ *
2602
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2603
+ *
2604
+ * Required API Key ACLs:
2605
+ * - admin
2606
+ *
2607
+ * @deprecated
2608
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2609
+ * @see listClusters for the plain version.
2610
+ */
2611
+ listClustersWithHTTPInfo(requestOptions) {
2612
+ const requestPath = "/1/clusters";
2613
+ const headers = {};
2614
+ const queryParameters = {};
2615
+ const request = {
2616
+ method: "GET",
2617
+ path: requestPath,
2618
+ queryParameters,
2619
+ headers
2620
+ };
2621
+ return transporter.requestWithHttpInfo(request, requestOptions);
2622
+ },
1518
2623
  /**
1519
2624
  * Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
1520
2625
  *
@@ -1543,6 +2648,37 @@ function createSearchClient({
1543
2648
  };
1544
2649
  return transporter.request(request, requestOptions);
1545
2650
  },
2651
+ /**
2652
+ * Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
2653
+ *
2654
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2655
+ *
2656
+ * Required API Key ACLs:
2657
+ * - listIndexes
2658
+ * @param listIndices - The listIndices object.
2659
+ * @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
2660
+ * @param listIndices.hitsPerPage - Number of hits per page.
2661
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2662
+ * @see listIndices for the plain version.
2663
+ */
2664
+ listIndicesWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
2665
+ const requestPath = "/1/indexes";
2666
+ const headers = {};
2667
+ const queryParameters = {};
2668
+ if (page !== void 0) {
2669
+ queryParameters["page"] = page.toString();
2670
+ }
2671
+ if (hitsPerPage !== void 0) {
2672
+ queryParameters["hitsPerPage"] = hitsPerPage.toString();
2673
+ }
2674
+ const request = {
2675
+ method: "GET",
2676
+ path: requestPath,
2677
+ queryParameters,
2678
+ headers
2679
+ };
2680
+ return transporter.requestWithHttpInfo(request, requestOptions);
2681
+ },
1546
2682
  /**
1547
2683
  * Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
1548
2684
  *
@@ -1573,6 +2709,39 @@ function createSearchClient({
1573
2709
  };
1574
2710
  return transporter.request(request, requestOptions);
1575
2711
  },
2712
+ /**
2713
+ * Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
2714
+ *
2715
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2716
+ *
2717
+ * Required API Key ACLs:
2718
+ * - admin
2719
+ *
2720
+ * @deprecated
2721
+ * @param listUserIds - The listUserIds object.
2722
+ * @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
2723
+ * @param listUserIds.hitsPerPage - Number of hits per page.
2724
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2725
+ * @see listUserIds for the plain version.
2726
+ */
2727
+ listUserIdsWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
2728
+ const requestPath = "/1/clusters/mapping";
2729
+ const headers = {};
2730
+ const queryParameters = {};
2731
+ if (page !== void 0) {
2732
+ queryParameters["page"] = page.toString();
2733
+ }
2734
+ if (hitsPerPage !== void 0) {
2735
+ queryParameters["hitsPerPage"] = hitsPerPage.toString();
2736
+ }
2737
+ const request = {
2738
+ method: "GET",
2739
+ path: requestPath,
2740
+ queryParameters,
2741
+ headers
2742
+ };
2743
+ return transporter.requestWithHttpInfo(request, requestOptions);
2744
+ },
1576
2745
  /**
1577
2746
  * Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
1578
2747
  *
@@ -1596,6 +2765,32 @@ function createSearchClient({
1596
2765
  };
1597
2766
  return transporter.request(request, requestOptions);
1598
2767
  },
2768
+ /**
2769
+ * Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
2770
+ *
2771
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2772
+ *
2773
+ * Required API Key ACLs:
2774
+ * - addObject
2775
+ * @param batchParams - The batchParams object.
2776
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2777
+ * @see multipleBatch for the plain version.
2778
+ */
2779
+ multipleBatchWithHTTPInfo(batchParams, requestOptions) {
2780
+ validateRequired("batchParams", "multipleBatchWithHTTPInfo", batchParams);
2781
+ validateRequired("batchParams.requests", "multipleBatchWithHTTPInfo", batchParams.requests);
2782
+ const requestPath = "/1/indexes/*/batch";
2783
+ const headers = {};
2784
+ const queryParameters = {};
2785
+ const request = {
2786
+ method: "POST",
2787
+ path: requestPath,
2788
+ queryParameters,
2789
+ headers,
2790
+ data: batchParams
2791
+ };
2792
+ return transporter.requestWithHttpInfo(request, requestOptions);
2793
+ },
1599
2794
  /**
1600
2795
  * Copies or moves (renames) an index within the same Algolia application. Notes: - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'s created. - This operation is resource-intensive. **Copy** - If the source index doesn\'t exist, copying creates a new index with 0 records and default settings. - API keys from the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - For more information, see [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices). **Move** - If the source index doesn\'t exist, moving is ignored without returning an error. - When moving an index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - For more information, see [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
1601
2796
  *
@@ -1619,13 +2814,80 @@ function createSearchClient({
1619
2814
  path: requestPath,
1620
2815
  queryParameters,
1621
2816
  headers,
1622
- data: operationIndexParams
2817
+ data: operationIndexParams
2818
+ };
2819
+ return transporter.request(request, requestOptions);
2820
+ },
2821
+ /**
2822
+ * Copies or moves (renames) an index within the same Algolia application. Notes: - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'s created. - This operation is resource-intensive. **Copy** - If the source index doesn\'t exist, copying creates a new index with 0 records and default settings. - API keys from the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - For more information, see [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices). **Move** - If the source index doesn\'t exist, moving is ignored without returning an error. - When moving an index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - For more information, see [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
2823
+ *
2824
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2825
+ *
2826
+ * Required API Key ACLs:
2827
+ * - addObject
2828
+ * @param operationIndex - The operationIndex object.
2829
+ * @param operationIndex.indexName - Name of the index on which to perform the operation.
2830
+ * @param operationIndex.operationIndexParams - The operationIndexParams object.
2831
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2832
+ * @see operationIndex for the plain version.
2833
+ */
2834
+ operationIndexWithHTTPInfo({ indexName, operationIndexParams }, requestOptions) {
2835
+ validateRequired("indexName", "operationIndexWithHTTPInfo", indexName);
2836
+ validateRequired("operationIndexParams", "operationIndexWithHTTPInfo", operationIndexParams);
2837
+ validateRequired("operationIndexParams.operation", "operationIndexWithHTTPInfo", operationIndexParams.operation);
2838
+ validateRequired(
2839
+ "operationIndexParams.destination",
2840
+ "operationIndexWithHTTPInfo",
2841
+ operationIndexParams.destination
2842
+ );
2843
+ const requestPath = "/1/indexes/{indexName}/operation".replace("{indexName}", encodeURIComponent(indexName));
2844
+ const headers = {};
2845
+ const queryParameters = {};
2846
+ const request = {
2847
+ method: "POST",
2848
+ path: requestPath,
2849
+ queryParameters,
2850
+ headers,
2851
+ data: operationIndexParams
2852
+ };
2853
+ return transporter.requestWithHttpInfo(request, requestOptions);
2854
+ },
2855
+ /**
2856
+ * Adds new attributes to a record, or updates existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - Use first-level attributes only. Nested attributes aren\'t supported. If you specify a nested attribute, this operation replaces its first-level ancestor. To update attributes without replacing the full record, use these built-in operations. These operations are useful when the initial data isn\'t available. - `Increment`: increment a numeric attribute. - `Decrement`: decrement a numeric attribute. - `Add`: append a number or string element to an array attribute. - `Remove`: remove all matching number or string elements from an array attribute made of numbers or strings. - `AddUnique`: add a number or string element to an array attribute made of numbers or strings only if it\'s not already present. - `IncrementFrom`: increment a numeric integer attribute only if the provided value matches the current value. Otherwise, the update is ignored. Example: If you pass an `IncrementFrom` value of 2 for the `version` attribute but the current value is 1, the API ignores the update. If the object doesn\'t exist, the API only creates it if you pass an `IncrementFrom` value of 0. - `IncrementSet`: increment a numeric integer attribute only if the provided value is greater than the current value. Otherwise, the update is ignored. Example: If you pass an `IncrementSet` value of 2 for the `version` attribute and the current value is 1, the API updates the object. If the object doesn\'t exist yet, the API only creates it if you pass an `IncrementSet` value greater than 0. Specify an operation by providing an object with the attribute to update as the key and its value as an object with these properties: - `_operation`: the operation to apply on the attribute. - `value`: the right-hand side argument to the operation, for example, increment or decrement step, or a value to add or remove. When updating multiple attributes or using multiple operations targeting the same record, use a single partial update for faster processing. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
2857
+ *
2858
+ * Required API Key ACLs:
2859
+ * - addObject
2860
+ * @param partialUpdateObject - The partialUpdateObject object.
2861
+ * @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
2862
+ * @param partialUpdateObject.objectID - Unique record identifier.
2863
+ * @param partialUpdateObject.attributesToUpdate - Attributes with their values.
2864
+ * @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
2865
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2866
+ */
2867
+ partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
2868
+ validateRequired("indexName", "partialUpdateObject", indexName);
2869
+ validateRequired("objectID", "partialUpdateObject", objectID);
2870
+ validateRequired("attributesToUpdate", "partialUpdateObject", attributesToUpdate);
2871
+ const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
2872
+ const headers = {};
2873
+ const queryParameters = {};
2874
+ if (createIfNotExists !== void 0) {
2875
+ queryParameters["createIfNotExists"] = createIfNotExists.toString();
2876
+ }
2877
+ const request = {
2878
+ method: "POST",
2879
+ path: requestPath,
2880
+ queryParameters,
2881
+ headers,
2882
+ data: attributesToUpdate
1623
2883
  };
1624
2884
  return transporter.request(request, requestOptions);
1625
2885
  },
1626
2886
  /**
1627
2887
  * Adds new attributes to a record, or updates existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - Use first-level attributes only. Nested attributes aren\'t supported. If you specify a nested attribute, this operation replaces its first-level ancestor. To update attributes without replacing the full record, use these built-in operations. These operations are useful when the initial data isn\'t available. - `Increment`: increment a numeric attribute. - `Decrement`: decrement a numeric attribute. - `Add`: append a number or string element to an array attribute. - `Remove`: remove all matching number or string elements from an array attribute made of numbers or strings. - `AddUnique`: add a number or string element to an array attribute made of numbers or strings only if it\'s not already present. - `IncrementFrom`: increment a numeric integer attribute only if the provided value matches the current value. Otherwise, the update is ignored. Example: If you pass an `IncrementFrom` value of 2 for the `version` attribute but the current value is 1, the API ignores the update. If the object doesn\'t exist, the API only creates it if you pass an `IncrementFrom` value of 0. - `IncrementSet`: increment a numeric integer attribute only if the provided value is greater than the current value. Otherwise, the update is ignored. Example: If you pass an `IncrementSet` value of 2 for the `version` attribute and the current value is 1, the API updates the object. If the object doesn\'t exist yet, the API only creates it if you pass an `IncrementSet` value greater than 0. Specify an operation by providing an object with the attribute to update as the key and its value as an object with these properties: - `_operation`: the operation to apply on the attribute. - `value`: the right-hand side argument to the operation, for example, increment or decrement step, or a value to add or remove. When updating multiple attributes or using multiple operations targeting the same record, use a single partial update for faster processing. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
1628
2888
  *
2889
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2890
+ *
1629
2891
  * Required API Key ACLs:
1630
2892
  * - addObject
1631
2893
  * @param partialUpdateObject - The partialUpdateObject object.
@@ -1634,11 +2896,12 @@ function createSearchClient({
1634
2896
  * @param partialUpdateObject.attributesToUpdate - Attributes with their values.
1635
2897
  * @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
1636
2898
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2899
+ * @see partialUpdateObject for the plain version.
1637
2900
  */
1638
- partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
1639
- validateRequired("indexName", "partialUpdateObject", indexName);
1640
- validateRequired("objectID", "partialUpdateObject", objectID);
1641
- validateRequired("attributesToUpdate", "partialUpdateObject", attributesToUpdate);
2901
+ partialUpdateObjectWithHTTPInfo({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
2902
+ validateRequired("indexName", "partialUpdateObjectWithHTTPInfo", indexName);
2903
+ validateRequired("objectID", "partialUpdateObjectWithHTTPInfo", objectID);
2904
+ validateRequired("attributesToUpdate", "partialUpdateObjectWithHTTPInfo", attributesToUpdate);
1642
2905
  const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
1643
2906
  const headers = {};
1644
2907
  const queryParameters = {};
@@ -1652,7 +2915,7 @@ function createSearchClient({
1652
2915
  headers,
1653
2916
  data: attributesToUpdate
1654
2917
  };
1655
- return transporter.request(request, requestOptions);
2918
+ return transporter.requestWithHttpInfo(request, requestOptions);
1656
2919
  },
1657
2920
  /**
1658
2921
  * Deletes a user ID and its associated data from the clusters.
@@ -1678,6 +2941,33 @@ function createSearchClient({
1678
2941
  };
1679
2942
  return transporter.request(request, requestOptions);
1680
2943
  },
2944
+ /**
2945
+ * Deletes a user ID and its associated data from the clusters.
2946
+ *
2947
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2948
+ *
2949
+ * Required API Key ACLs:
2950
+ * - admin
2951
+ *
2952
+ * @deprecated
2953
+ * @param removeUserId - The removeUserId object.
2954
+ * @param removeUserId.userID - Unique identifier of the user who makes the search request.
2955
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2956
+ * @see removeUserId for the plain version.
2957
+ */
2958
+ removeUserIdWithHTTPInfo({ userID }, requestOptions) {
2959
+ validateRequired("userID", "removeUserIdWithHTTPInfo", userID);
2960
+ const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
2961
+ const headers = {};
2962
+ const queryParameters = {};
2963
+ const request = {
2964
+ method: "DELETE",
2965
+ path: requestPath,
2966
+ queryParameters,
2967
+ headers
2968
+ };
2969
+ return transporter.requestWithHttpInfo(request, requestOptions);
2970
+ },
1681
2971
  /**
1682
2972
  * Replaces the list of allowed sources.
1683
2973
  *
@@ -1701,6 +2991,32 @@ function createSearchClient({
1701
2991
  };
1702
2992
  return transporter.request(request, requestOptions);
1703
2993
  },
2994
+ /**
2995
+ * Replaces the list of allowed sources.
2996
+ *
2997
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
2998
+ *
2999
+ * Required API Key ACLs:
3000
+ * - admin
3001
+ * @param replaceSources - The replaceSources object.
3002
+ * @param replaceSources.source - Allowed sources.
3003
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3004
+ * @see replaceSources for the plain version.
3005
+ */
3006
+ replaceSourcesWithHTTPInfo({ source }, requestOptions) {
3007
+ validateRequired("source", "replaceSourcesWithHTTPInfo", source);
3008
+ const requestPath = "/1/security/sources";
3009
+ const headers = {};
3010
+ const queryParameters = {};
3011
+ const request = {
3012
+ method: "PUT",
3013
+ path: requestPath,
3014
+ queryParameters,
3015
+ headers,
3016
+ data: source
3017
+ };
3018
+ return transporter.requestWithHttpInfo(request, requestOptions);
3019
+ },
1704
3020
  /**
1705
3021
  * Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can\'t be restored.
1706
3022
  *
@@ -1723,6 +3039,31 @@ function createSearchClient({
1723
3039
  };
1724
3040
  return transporter.request(request, requestOptions);
1725
3041
  },
3042
+ /**
3043
+ * Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can\'t be restored.
3044
+ *
3045
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
3046
+ *
3047
+ * Required API Key ACLs:
3048
+ * - admin
3049
+ * @param restoreApiKey - The restoreApiKey object.
3050
+ * @param restoreApiKey.key - API key.
3051
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3052
+ * @see restoreApiKey for the plain version.
3053
+ */
3054
+ restoreApiKeyWithHTTPInfo({ key }, requestOptions) {
3055
+ validateRequired("key", "restoreApiKeyWithHTTPInfo", key);
3056
+ const requestPath = "/1/keys/{key}/restore".replace("{key}", encodeURIComponent(key));
3057
+ const headers = {};
3058
+ const queryParameters = {};
3059
+ const request = {
3060
+ method: "POST",
3061
+ path: requestPath,
3062
+ queryParameters,
3063
+ headers
3064
+ };
3065
+ return transporter.requestWithHttpInfo(request, requestOptions);
3066
+ },
1726
3067
  /**
1727
3068
  * Adds a record to an index or replaces it. - If the record doesn\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\'t exist, a new record is added to your index. - If you add a record to an index that doesn\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object). To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
1728
3069
  *
@@ -1748,6 +3089,34 @@ function createSearchClient({
1748
3089
  };
1749
3090
  return transporter.request(request, requestOptions);
1750
3091
  },
3092
+ /**
3093
+ * Adds a record to an index or replaces it. - If the record doesn\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\'t exist, a new record is added to your index. - If you add a record to an index that doesn\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](https://www.algolia.com/doc/rest-api/search/partial-update-object). To add, update, or replace multiple records, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/batch). This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
3094
+ *
3095
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
3096
+ *
3097
+ * Required API Key ACLs:
3098
+ * - addObject
3099
+ * @param saveObject - The saveObject object.
3100
+ * @param saveObject.indexName - Name of the index on which to perform the operation.
3101
+ * @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
3102
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3103
+ * @see saveObject for the plain version.
3104
+ */
3105
+ saveObjectWithHTTPInfo({ indexName, body }, requestOptions) {
3106
+ validateRequired("indexName", "saveObjectWithHTTPInfo", indexName);
3107
+ validateRequired("body", "saveObjectWithHTTPInfo", body);
3108
+ const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
3109
+ const headers = {};
3110
+ const queryParameters = {};
3111
+ const request = {
3112
+ method: "POST",
3113
+ path: requestPath,
3114
+ queryParameters,
3115
+ headers,
3116
+ data: body
3117
+ };
3118
+ return transporter.requestWithHttpInfo(request, requestOptions);
3119
+ },
1751
3120
  /**
1752
3121
  * If a rule with the specified object ID doesn\'t exist, it\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/save-rules).
1753
3122
  *
@@ -1781,6 +3150,42 @@ function createSearchClient({
1781
3150
  };
1782
3151
  return transporter.request(request, requestOptions);
1783
3152
  },
3153
+ /**
3154
+ * If a rule with the specified object ID doesn\'t exist, it\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/save-rules).
3155
+ *
3156
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
3157
+ *
3158
+ * Required API Key ACLs:
3159
+ * - editSettings
3160
+ * @param saveRule - The saveRule object.
3161
+ * @param saveRule.indexName - Name of the index on which to perform the operation.
3162
+ * @param saveRule.objectID - Unique identifier of a rule object.
3163
+ * @param saveRule.rule - The rule object.
3164
+ * @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
3165
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3166
+ * @see saveRule for the plain version.
3167
+ */
3168
+ saveRuleWithHTTPInfo({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
3169
+ validateRequired("indexName", "saveRuleWithHTTPInfo", indexName);
3170
+ validateRequired("objectID", "saveRuleWithHTTPInfo", objectID);
3171
+ validateRequired("rule", "saveRuleWithHTTPInfo", rule);
3172
+ validateRequired("rule.objectID", "saveRuleWithHTTPInfo", rule.objectID);
3173
+ validateRequired("rule.consequence", "saveRuleWithHTTPInfo", rule.consequence);
3174
+ const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
3175
+ const headers = {};
3176
+ const queryParameters = {};
3177
+ if (forwardToReplicas !== void 0) {
3178
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
3179
+ }
3180
+ const request = {
3181
+ method: "PUT",
3182
+ path: requestPath,
3183
+ queryParameters,
3184
+ headers,
3185
+ data: rule
3186
+ };
3187
+ return transporter.requestWithHttpInfo(request, requestOptions);
3188
+ },
1784
3189
  /**
1785
3190
  * Create or update multiple rules. If a rule with the specified object ID doesn\'t exist, Algolia creates a new one. Otherwise, existing rules are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
1786
3191
  *
@@ -1814,6 +3219,42 @@ function createSearchClient({
1814
3219
  };
1815
3220
  return transporter.request(request, requestOptions);
1816
3221
  },
3222
+ /**
3223
+ * Create or update multiple rules. If a rule with the specified object ID doesn\'t exist, Algolia creates a new one. Otherwise, existing rules are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
3224
+ *
3225
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
3226
+ *
3227
+ * Required API Key ACLs:
3228
+ * - editSettings
3229
+ * @param saveRules - The saveRules object.
3230
+ * @param saveRules.indexName - Name of the index on which to perform the operation.
3231
+ * @param saveRules.rules - The rules object.
3232
+ * @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
3233
+ * @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
3234
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3235
+ * @see saveRules for the plain version.
3236
+ */
3237
+ saveRulesWithHTTPInfo({ indexName, rules, forwardToReplicas, clearExistingRules }, requestOptions) {
3238
+ validateRequired("indexName", "saveRulesWithHTTPInfo", indexName);
3239
+ validateRequired("rules", "saveRulesWithHTTPInfo", rules);
3240
+ const requestPath = "/1/indexes/{indexName}/rules/batch".replace("{indexName}", encodeURIComponent(indexName));
3241
+ const headers = {};
3242
+ const queryParameters = {};
3243
+ if (forwardToReplicas !== void 0) {
3244
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
3245
+ }
3246
+ if (clearExistingRules !== void 0) {
3247
+ queryParameters["clearExistingRules"] = clearExistingRules.toString();
3248
+ }
3249
+ const request = {
3250
+ method: "POST",
3251
+ path: requestPath,
3252
+ queryParameters,
3253
+ headers,
3254
+ data: rules
3255
+ };
3256
+ return transporter.requestWithHttpInfo(request, requestOptions);
3257
+ },
1817
3258
  /**
1818
3259
  * If a synonym with the specified object ID doesn\'t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/save-synonyms).
1819
3260
  *
@@ -1847,6 +3288,42 @@ function createSearchClient({
1847
3288
  };
1848
3289
  return transporter.request(request, requestOptions);
1849
3290
  },
3291
+ /**
3292
+ * If a synonym with the specified object ID doesn\'t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](https://www.algolia.com/doc/rest-api/search/save-synonyms).
3293
+ *
3294
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
3295
+ *
3296
+ * Required API Key ACLs:
3297
+ * - editSettings
3298
+ * @param saveSynonym - The saveSynonym object.
3299
+ * @param saveSynonym.indexName - Name of the index on which to perform the operation.
3300
+ * @param saveSynonym.objectID - Unique identifier of a synonym object.
3301
+ * @param saveSynonym.synonymHit - The synonymHit object.
3302
+ * @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
3303
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3304
+ * @see saveSynonym for the plain version.
3305
+ */
3306
+ saveSynonymWithHTTPInfo({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
3307
+ validateRequired("indexName", "saveSynonymWithHTTPInfo", indexName);
3308
+ validateRequired("objectID", "saveSynonymWithHTTPInfo", objectID);
3309
+ validateRequired("synonymHit", "saveSynonymWithHTTPInfo", synonymHit);
3310
+ validateRequired("synonymHit.objectID", "saveSynonymWithHTTPInfo", synonymHit.objectID);
3311
+ validateRequired("synonymHit.type", "saveSynonymWithHTTPInfo", synonymHit.type);
3312
+ const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
3313
+ const headers = {};
3314
+ const queryParameters = {};
3315
+ if (forwardToReplicas !== void 0) {
3316
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
3317
+ }
3318
+ const request = {
3319
+ method: "PUT",
3320
+ path: requestPath,
3321
+ queryParameters,
3322
+ headers,
3323
+ data: synonymHit
3324
+ };
3325
+ return transporter.requestWithHttpInfo(request, requestOptions);
3326
+ },
1850
3327
  /**
1851
3328
  * If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
1852
3329
  *
@@ -1880,6 +3357,42 @@ function createSearchClient({
1880
3357
  };
1881
3358
  return transporter.request(request, requestOptions);
1882
3359
  },
3360
+ /**
3361
+ * If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced. This operation is subject to [indexing rate limits](https://support.algolia.com/hc/articles/4406975251089-Is-there-a-rate-limit-for-indexing-on-Algolia).
3362
+ *
3363
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
3364
+ *
3365
+ * Required API Key ACLs:
3366
+ * - editSettings
3367
+ * @param saveSynonyms - The saveSynonyms object.
3368
+ * @param saveSynonyms.indexName - Name of the index on which to perform the operation.
3369
+ * @param saveSynonyms.synonymHit - The synonymHit object.
3370
+ * @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
3371
+ * @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
3372
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3373
+ * @see saveSynonyms for the plain version.
3374
+ */
3375
+ saveSynonymsWithHTTPInfo({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }, requestOptions) {
3376
+ validateRequired("indexName", "saveSynonymsWithHTTPInfo", indexName);
3377
+ validateRequired("synonymHit", "saveSynonymsWithHTTPInfo", synonymHit);
3378
+ const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
3379
+ const headers = {};
3380
+ const queryParameters = {};
3381
+ if (forwardToReplicas !== void 0) {
3382
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
3383
+ }
3384
+ if (replaceExistingSynonyms !== void 0) {
3385
+ queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
3386
+ }
3387
+ const request = {
3388
+ method: "POST",
3389
+ path: requestPath,
3390
+ queryParameters,
3391
+ headers,
3392
+ data: synonymHit
3393
+ };
3394
+ return transporter.requestWithHttpInfo(request, requestOptions);
3395
+ },
1883
3396
  /**
1884
3397
  * Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.
1885
3398
  *
@@ -1924,7 +3437,56 @@ function createSearchClient({
1924
3437
  useReadTransporter: true,
1925
3438
  cacheable: true
1926
3439
  };
1927
- return transporter.request(request, requestOptions);
3440
+ return transporter.request(request, requestOptions);
3441
+ },
3442
+ /**
3443
+ * Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.
3444
+ *
3445
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
3446
+ *
3447
+ * Required API Key ACLs:
3448
+ * - search
3449
+ * @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
3450
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3451
+ * @see search for the plain version.
3452
+ */
3453
+ searchWithHTTPInfo(searchMethodParams, requestOptions) {
3454
+ if (searchMethodParams && Array.isArray(searchMethodParams)) {
3455
+ const newSignatureRequest = {
3456
+ requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
3457
+ if (legacyRequest.type === "facet") {
3458
+ return {
3459
+ ...legacyRequest,
3460
+ ...params,
3461
+ type: "facet"
3462
+ };
3463
+ }
3464
+ return {
3465
+ ...legacyRequest,
3466
+ ...params,
3467
+ facet: void 0,
3468
+ maxFacetHits: void 0,
3469
+ facetQuery: void 0
3470
+ };
3471
+ })
3472
+ };
3473
+ searchMethodParams = newSignatureRequest;
3474
+ }
3475
+ validateRequired("searchMethodParams", "searchWithHTTPInfo", searchMethodParams);
3476
+ validateRequired("searchMethodParams.requests", "searchWithHTTPInfo", searchMethodParams.requests);
3477
+ const requestPath = "/1/indexes/*/queries";
3478
+ const headers = {};
3479
+ const queryParameters = {};
3480
+ const request = {
3481
+ method: "POST",
3482
+ path: requestPath,
3483
+ queryParameters,
3484
+ headers,
3485
+ data: searchMethodParams,
3486
+ useReadTransporter: true,
3487
+ cacheable: true
3488
+ };
3489
+ return transporter.requestWithHttpInfo(request, requestOptions);
1928
3490
  },
1929
3491
  /**
1930
3492
  * Searches for standard and custom dictionary entries.
@@ -1961,6 +3523,48 @@ function createSearchClient({
1961
3523
  };
1962
3524
  return transporter.request(request, requestOptions);
1963
3525
  },
3526
+ /**
3527
+ * Searches for standard and custom dictionary entries.
3528
+ *
3529
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
3530
+ *
3531
+ * Required API Key ACLs:
3532
+ * - settings
3533
+ * @param searchDictionaryEntries - The searchDictionaryEntries object.
3534
+ * @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
3535
+ * @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
3536
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3537
+ * @see searchDictionaryEntries for the plain version.
3538
+ */
3539
+ searchDictionaryEntriesWithHTTPInfo({ dictionaryName, searchDictionaryEntriesParams }, requestOptions) {
3540
+ validateRequired("dictionaryName", "searchDictionaryEntriesWithHTTPInfo", dictionaryName);
3541
+ validateRequired(
3542
+ "searchDictionaryEntriesParams",
3543
+ "searchDictionaryEntriesWithHTTPInfo",
3544
+ searchDictionaryEntriesParams
3545
+ );
3546
+ validateRequired(
3547
+ "searchDictionaryEntriesParams.query",
3548
+ "searchDictionaryEntriesWithHTTPInfo",
3549
+ searchDictionaryEntriesParams.query
3550
+ );
3551
+ const requestPath = "/1/dictionaries/{dictionaryName}/search".replace(
3552
+ "{dictionaryName}",
3553
+ encodeURIComponent(dictionaryName)
3554
+ );
3555
+ const headers = {};
3556
+ const queryParameters = {};
3557
+ const request = {
3558
+ method: "POST",
3559
+ path: requestPath,
3560
+ queryParameters,
3561
+ headers,
3562
+ data: searchDictionaryEntriesParams,
3563
+ useReadTransporter: true,
3564
+ cacheable: true
3565
+ };
3566
+ return transporter.requestWithHttpInfo(request, requestOptions);
3567
+ },
1964
3568
  /**
1965
3569
  * Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\'t work if you have **more than 65 searchable facets and searchable attributes combined**.
1966
3570
  *
@@ -1989,6 +3593,37 @@ function createSearchClient({
1989
3593
  };
1990
3594
  return transporter.request(request, requestOptions);
1991
3595
  },
3596
+ /**
3597
+ * Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\'t work if you have **more than 65 searchable facets and searchable attributes combined**.
3598
+ *
3599
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
3600
+ *
3601
+ * Required API Key ACLs:
3602
+ * - search
3603
+ * @param searchForFacetValues - The searchForFacetValues object.
3604
+ * @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
3605
+ * @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
3606
+ * @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
3607
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3608
+ * @see searchForFacetValues for the plain version.
3609
+ */
3610
+ searchForFacetValuesWithHTTPInfo({ indexName, facetName, searchForFacetValuesRequest }, requestOptions) {
3611
+ validateRequired("indexName", "searchForFacetValuesWithHTTPInfo", indexName);
3612
+ validateRequired("facetName", "searchForFacetValuesWithHTTPInfo", facetName);
3613
+ const requestPath = "/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}", encodeURIComponent(indexName)).replace("{facetName}", encodeURIComponent(facetName));
3614
+ const headers = {};
3615
+ const queryParameters = {};
3616
+ const request = {
3617
+ method: "POST",
3618
+ path: requestPath,
3619
+ queryParameters,
3620
+ headers,
3621
+ data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},
3622
+ useReadTransporter: true,
3623
+ cacheable: true
3624
+ };
3625
+ return transporter.requestWithHttpInfo(request, requestOptions);
3626
+ },
1992
3627
  /**
1993
3628
  * Searches for rules in your index.
1994
3629
  *
@@ -2015,6 +3650,35 @@ function createSearchClient({
2015
3650
  };
2016
3651
  return transporter.request(request, requestOptions);
2017
3652
  },
3653
+ /**
3654
+ * Searches for rules in your index.
3655
+ *
3656
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
3657
+ *
3658
+ * Required API Key ACLs:
3659
+ * - settings
3660
+ * @param searchRules - The searchRules object.
3661
+ * @param searchRules.indexName - Name of the index on which to perform the operation.
3662
+ * @param searchRules.searchRulesParams - The searchRulesParams object.
3663
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3664
+ * @see searchRules for the plain version.
3665
+ */
3666
+ searchRulesWithHTTPInfo({ indexName, searchRulesParams }, requestOptions) {
3667
+ validateRequired("indexName", "searchRulesWithHTTPInfo", indexName);
3668
+ const requestPath = "/1/indexes/{indexName}/rules/search".replace("{indexName}", encodeURIComponent(indexName));
3669
+ const headers = {};
3670
+ const queryParameters = {};
3671
+ const request = {
3672
+ method: "POST",
3673
+ path: requestPath,
3674
+ queryParameters,
3675
+ headers,
3676
+ data: searchRulesParams ? searchRulesParams : {},
3677
+ useReadTransporter: true,
3678
+ cacheable: true
3679
+ };
3680
+ return transporter.requestWithHttpInfo(request, requestOptions);
3681
+ },
2018
3682
  /**
2019
3683
  * Searches a single index and returns matching search results as hits. This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse) or increase the `paginatedLimitedTo` index setting.
2020
3684
  *
@@ -2041,6 +3705,35 @@ function createSearchClient({
2041
3705
  };
2042
3706
  return transporter.request(request, requestOptions);
2043
3707
  },
3708
+ /**
3709
+ * Searches a single index and returns matching search results as hits. This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](https://www.algolia.com/doc/rest-api/search/browse) or increase the `paginatedLimitedTo` index setting.
3710
+ *
3711
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
3712
+ *
3713
+ * Required API Key ACLs:
3714
+ * - search
3715
+ * @param searchSingleIndex - The searchSingleIndex object.
3716
+ * @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
3717
+ * @param searchSingleIndex.searchParams - The searchParams object.
3718
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3719
+ * @see searchSingleIndex for the plain version.
3720
+ */
3721
+ searchSingleIndexWithHTTPInfo({ indexName, searchParams }, requestOptions) {
3722
+ validateRequired("indexName", "searchSingleIndexWithHTTPInfo", indexName);
3723
+ const requestPath = "/1/indexes/{indexName}/query".replace("{indexName}", encodeURIComponent(indexName));
3724
+ const headers = {};
3725
+ const queryParameters = {};
3726
+ const request = {
3727
+ method: "POST",
3728
+ path: requestPath,
3729
+ queryParameters,
3730
+ headers,
3731
+ data: searchParams ? searchParams : {},
3732
+ useReadTransporter: true,
3733
+ cacheable: true
3734
+ };
3735
+ return transporter.requestWithHttpInfo(request, requestOptions);
3736
+ },
2044
3737
  /**
2045
3738
  * Searches for synonyms in your index.
2046
3739
  *
@@ -2070,6 +3763,38 @@ function createSearchClient({
2070
3763
  };
2071
3764
  return transporter.request(request, requestOptions);
2072
3765
  },
3766
+ /**
3767
+ * Searches for synonyms in your index.
3768
+ *
3769
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
3770
+ *
3771
+ * Required API Key ACLs:
3772
+ * - settings
3773
+ * @param searchSynonyms - The searchSynonyms object.
3774
+ * @param searchSynonyms.indexName - Name of the index on which to perform the operation.
3775
+ * @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
3776
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3777
+ * @see searchSynonyms for the plain version.
3778
+ */
3779
+ searchSynonymsWithHTTPInfo({ indexName, searchSynonymsParams }, requestOptions) {
3780
+ validateRequired("indexName", "searchSynonymsWithHTTPInfo", indexName);
3781
+ const requestPath = "/1/indexes/{indexName}/synonyms/search".replace(
3782
+ "{indexName}",
3783
+ encodeURIComponent(indexName)
3784
+ );
3785
+ const headers = {};
3786
+ const queryParameters = {};
3787
+ const request = {
3788
+ method: "POST",
3789
+ path: requestPath,
3790
+ queryParameters,
3791
+ headers,
3792
+ data: searchSynonymsParams ? searchSynonymsParams : {},
3793
+ useReadTransporter: true,
3794
+ cacheable: true
3795
+ };
3796
+ return transporter.requestWithHttpInfo(request, requestOptions);
3797
+ },
2073
3798
  /**
2074
3799
  * Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. To ensure rapid updates, the user IDs index isn\'t built at the same time as the mapping. Instead, it\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
2075
3800
  *
@@ -2097,6 +3822,36 @@ function createSearchClient({
2097
3822
  };
2098
3823
  return transporter.request(request, requestOptions);
2099
3824
  },
3825
+ /**
3826
+ * Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. To ensure rapid updates, the user IDs index isn\'t built at the same time as the mapping. Instead, it\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
3827
+ *
3828
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
3829
+ *
3830
+ * Required API Key ACLs:
3831
+ * - admin
3832
+ *
3833
+ * @deprecated
3834
+ * @param searchUserIdsParams - The searchUserIdsParams object.
3835
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3836
+ * @see searchUserIds for the plain version.
3837
+ */
3838
+ searchUserIdsWithHTTPInfo(searchUserIdsParams, requestOptions) {
3839
+ validateRequired("searchUserIdsParams", "searchUserIdsWithHTTPInfo", searchUserIdsParams);
3840
+ validateRequired("searchUserIdsParams.query", "searchUserIdsWithHTTPInfo", searchUserIdsParams.query);
3841
+ const requestPath = "/1/clusters/mapping/search";
3842
+ const headers = {};
3843
+ const queryParameters = {};
3844
+ const request = {
3845
+ method: "POST",
3846
+ path: requestPath,
3847
+ queryParameters,
3848
+ headers,
3849
+ data: searchUserIdsParams,
3850
+ useReadTransporter: true,
3851
+ cacheable: true
3852
+ };
3853
+ return transporter.requestWithHttpInfo(request, requestOptions);
3854
+ },
2100
3855
  /**
2101
3856
  * Turns standard stop word dictionary entries on or off for a given language.
2102
3857
  *
@@ -2124,6 +3879,36 @@ function createSearchClient({
2124
3879
  };
2125
3880
  return transporter.request(request, requestOptions);
2126
3881
  },
3882
+ /**
3883
+ * Turns standard stop word dictionary entries on or off for a given language.
3884
+ *
3885
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
3886
+ *
3887
+ * Required API Key ACLs:
3888
+ * - editSettings
3889
+ * @param dictionarySettingsParams - The dictionarySettingsParams object.
3890
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3891
+ * @see setDictionarySettings for the plain version.
3892
+ */
3893
+ setDictionarySettingsWithHTTPInfo(dictionarySettingsParams, requestOptions) {
3894
+ validateRequired("dictionarySettingsParams", "setDictionarySettingsWithHTTPInfo", dictionarySettingsParams);
3895
+ validateRequired(
3896
+ "dictionarySettingsParams.disableStandardEntries",
3897
+ "setDictionarySettingsWithHTTPInfo",
3898
+ dictionarySettingsParams.disableStandardEntries
3899
+ );
3900
+ const requestPath = "/1/dictionaries/*/settings";
3901
+ const headers = {};
3902
+ const queryParameters = {};
3903
+ const request = {
3904
+ method: "PUT",
3905
+ path: requestPath,
3906
+ queryParameters,
3907
+ headers,
3908
+ data: dictionarySettingsParams
3909
+ };
3910
+ return transporter.requestWithHttpInfo(request, requestOptions);
3911
+ },
2127
3912
  /**
2128
3913
  * Update the specified index settings. Index settings that you don\'t specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index.
2129
3914
  *
@@ -2153,6 +3938,38 @@ function createSearchClient({
2153
3938
  };
2154
3939
  return transporter.request(request, requestOptions);
2155
3940
  },
3941
+ /**
3942
+ * Update the specified index settings. Index settings that you don\'t specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index.
3943
+ *
3944
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
3945
+ *
3946
+ * Required API Key ACLs:
3947
+ * - editSettings
3948
+ * @param setSettings - The setSettings object.
3949
+ * @param setSettings.indexName - Name of the index on which to perform the operation.
3950
+ * @param setSettings.indexSettings - The indexSettings object.
3951
+ * @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
3952
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3953
+ * @see setSettings for the plain version.
3954
+ */
3955
+ setSettingsWithHTTPInfo({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
3956
+ validateRequired("indexName", "setSettingsWithHTTPInfo", indexName);
3957
+ validateRequired("indexSettings", "setSettingsWithHTTPInfo", indexSettings);
3958
+ const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
3959
+ const headers = {};
3960
+ const queryParameters = {};
3961
+ if (forwardToReplicas !== void 0) {
3962
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
3963
+ }
3964
+ const request = {
3965
+ method: "PUT",
3966
+ path: requestPath,
3967
+ queryParameters,
3968
+ headers,
3969
+ data: indexSettings
3970
+ };
3971
+ return transporter.requestWithHttpInfo(request, requestOptions);
3972
+ },
2156
3973
  /**
2157
3974
  * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
2158
3975
  *
@@ -2178,6 +3995,35 @@ function createSearchClient({
2178
3995
  data: apiKey
2179
3996
  };
2180
3997
  return transporter.request(request, requestOptions);
3998
+ },
3999
+ /**
4000
+ * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
4001
+ *
4002
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
4003
+ *
4004
+ * Required API Key ACLs:
4005
+ * - admin
4006
+ * @param updateApiKey - The updateApiKey object.
4007
+ * @param updateApiKey.key - API key.
4008
+ * @param updateApiKey.apiKey - The apiKey object.
4009
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
4010
+ * @see updateApiKey for the plain version.
4011
+ */
4012
+ updateApiKeyWithHTTPInfo({ key, apiKey }, requestOptions) {
4013
+ validateRequired("key", "updateApiKeyWithHTTPInfo", key);
4014
+ validateRequired("apiKey", "updateApiKeyWithHTTPInfo", apiKey);
4015
+ validateRequired("apiKey.acl", "updateApiKeyWithHTTPInfo", apiKey.acl);
4016
+ const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
4017
+ const headers = {};
4018
+ const queryParameters = {};
4019
+ const request = {
4020
+ method: "PUT",
4021
+ path: requestPath,
4022
+ queryParameters,
4023
+ headers,
4024
+ data: apiKey
4025
+ };
4026
+ return transporter.requestWithHttpInfo(request, requestOptions);
2181
4027
  }
2182
4028
  };
2183
4029
  }
@@ -2202,6 +4048,7 @@ function searchClient(appId, apiKey, options) {
2202
4048
  logger: createNullLogger(),
2203
4049
  requester: createHttpRequester(),
2204
4050
  algoliaAgents: [{ segment: "Node.js", version: process.versions.node }],
4051
+ requestIdChannel: "headers",
2205
4052
  responsesCache: createNullCache(),
2206
4053
  requestsCache: createNullCache(),
2207
4054
  hostsCache: createMemoryCache(),
@@ -2259,11 +4106,12 @@ function searchClient(appId, apiKey, options) {
2259
4106
  batchSize,
2260
4107
  maxRetries = 100
2261
4108
  }, requestOptions) {
4109
+ requestOptions = withRequestId2(this.transporter, requestOptions);
2262
4110
  const responses = [];
2263
4111
  if (this.appId === destinationAppID) {
2264
4112
  throw new IndicesInSameAppError();
2265
4113
  }
2266
- if (!await this.indexExists({ indexName: sourceIndexName })) {
4114
+ if (!await this.indexExists({ indexName: sourceIndexName }, requestOptions)) {
2267
4115
  throw new IndexNotFoundError(sourceIndexName);
2268
4116
  }
2269
4117
  const destinationClient = createSearchClient({
@@ -2282,54 +4130,66 @@ function searchClient(appId, apiKey, options) {
2282
4130
  hostsCache: createMemoryCache(),
2283
4131
  ...options
2284
4132
  });
2285
- if (await destinationClient.indexExists({ indexName: destinationIndexName })) {
4133
+ if (await destinationClient.indexExists({ indexName: destinationIndexName }, requestOptions)) {
2286
4134
  throw new IndexAlreadyExistsError(destinationIndexName);
2287
4135
  }
2288
4136
  responses.push(
2289
4137
  await destinationClient.setSettings(
2290
4138
  {
2291
4139
  indexName: destinationIndexName,
2292
- indexSettings: await this.getSettings({ indexName: sourceIndexName })
4140
+ indexSettings: await this.getSettings({ indexName: sourceIndexName }, requestOptions)
2293
4141
  },
2294
4142
  requestOptions
2295
4143
  )
2296
4144
  );
2297
- await this.browseRules({
2298
- indexName: sourceIndexName,
2299
- async aggregator(response) {
2300
- responses.push(
2301
- await destinationClient.saveRules(
2302
- { indexName: destinationIndexName, rules: response.hits },
2303
- requestOptions
2304
- )
2305
- );
2306
- }
2307
- });
2308
- await this.browseSynonyms({
2309
- indexName: sourceIndexName,
2310
- async aggregator(response) {
2311
- responses.push(
2312
- await destinationClient.saveSynonyms(
2313
- { indexName: destinationIndexName, synonymHit: response.hits },
2314
- requestOptions
2315
- )
2316
- );
2317
- }
2318
- });
2319
- await this.browseObjects({
2320
- indexName: sourceIndexName,
2321
- browseParams: batchSize ? { hitsPerPage: batchSize } : void 0,
2322
- async aggregator(response) {
2323
- responses.push(
2324
- ...await destinationClient.saveObjects(
2325
- { indexName: destinationIndexName, objects: response.hits, batchSize },
2326
- requestOptions
2327
- )
2328
- );
2329
- }
2330
- });
4145
+ await this.browseRules(
4146
+ {
4147
+ indexName: sourceIndexName,
4148
+ async aggregator(response) {
4149
+ responses.push(
4150
+ await destinationClient.saveRules(
4151
+ { indexName: destinationIndexName, rules: response.hits },
4152
+ requestOptions
4153
+ )
4154
+ );
4155
+ }
4156
+ },
4157
+ requestOptions
4158
+ );
4159
+ await this.browseSynonyms(
4160
+ {
4161
+ indexName: sourceIndexName,
4162
+ async aggregator(response) {
4163
+ responses.push(
4164
+ await destinationClient.saveSynonyms(
4165
+ { indexName: destinationIndexName, synonymHit: response.hits },
4166
+ requestOptions
4167
+ )
4168
+ );
4169
+ }
4170
+ },
4171
+ requestOptions
4172
+ );
4173
+ await this.browseObjects(
4174
+ {
4175
+ indexName: sourceIndexName,
4176
+ browseParams: batchSize ? { hitsPerPage: batchSize } : void 0,
4177
+ async aggregator(response) {
4178
+ responses.push(
4179
+ ...await destinationClient.saveObjects(
4180
+ { indexName: destinationIndexName, objects: response.hits, batchSize },
4181
+ requestOptions
4182
+ )
4183
+ );
4184
+ }
4185
+ },
4186
+ requestOptions
4187
+ );
2331
4188
  for (const response of responses) {
2332
- await destinationClient.waitForTask({ indexName: destinationIndexName, taskID: response.taskID, maxRetries });
4189
+ await destinationClient.waitForTask(
4190
+ { indexName: destinationIndexName, taskID: response.taskID, maxRetries },
4191
+ requestOptions
4192
+ );
2333
4193
  }
2334
4194
  },
2335
4195
  /**