@algolia/client-search 5.55.1 → 5.56.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.
@@ -23,7 +23,7 @@ import {
23
23
  shuffle,
24
24
  validateRequired
25
25
  } from "@algolia/client-common";
26
- var apiClientVersion = "5.55.1";
26
+ var apiClientVersion = "5.56.0";
27
27
  function getDefaultHosts(appId) {
28
28
  return [
29
29
  {
@@ -590,6 +590,32 @@ function createSearchClient({
590
590
  };
591
591
  return transporter.request(request, requestOptions);
592
592
  },
593
+ /**
594
+ * Creates a new API key with specific permissions and restrictions.
595
+ *
596
+ * 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.
597
+ *
598
+ * Required API Key ACLs:
599
+ * - admin
600
+ * @param apiKey - The apiKey object.
601
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
602
+ * @see addApiKey for the plain version.
603
+ */
604
+ addApiKeyWithHTTPInfo(apiKey, requestOptions) {
605
+ validateRequired("apiKey", "addApiKeyWithHTTPInfo", apiKey);
606
+ validateRequired("apiKey.acl", "addApiKeyWithHTTPInfo", apiKey.acl);
607
+ const requestPath = "/1/keys";
608
+ const headers = {};
609
+ const queryParameters = {};
610
+ const request = {
611
+ method: "POST",
612
+ path: requestPath,
613
+ queryParameters,
614
+ headers,
615
+ data: apiKey
616
+ };
617
+ return transporter.requestWithHttpInfo(request, requestOptions);
618
+ },
593
619
  /**
594
620
  * 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
621
  *
@@ -617,6 +643,36 @@ function createSearchClient({
617
643
  };
618
644
  return transporter.request(request, requestOptions);
619
645
  },
646
+ /**
647
+ * 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).
648
+ *
649
+ * 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.
650
+ *
651
+ * Required API Key ACLs:
652
+ * - addObject
653
+ * @param addOrUpdateObject - The addOrUpdateObject object.
654
+ * @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
655
+ * @param addOrUpdateObject.objectID - Unique record identifier.
656
+ * @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
657
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
658
+ * @see addOrUpdateObject for the plain version.
659
+ */
660
+ addOrUpdateObjectWithHTTPInfo({ indexName, objectID, body }, requestOptions) {
661
+ validateRequired("indexName", "addOrUpdateObjectWithHTTPInfo", indexName);
662
+ validateRequired("objectID", "addOrUpdateObjectWithHTTPInfo", objectID);
663
+ validateRequired("body", "addOrUpdateObjectWithHTTPInfo", body);
664
+ const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
665
+ const headers = {};
666
+ const queryParameters = {};
667
+ const request = {
668
+ method: "PUT",
669
+ path: requestPath,
670
+ queryParameters,
671
+ headers,
672
+ data: body
673
+ };
674
+ return transporter.requestWithHttpInfo(request, requestOptions);
675
+ },
620
676
  /**
621
677
  * Adds a source to the list of allowed sources.
622
678
  *
@@ -640,6 +696,32 @@ function createSearchClient({
640
696
  };
641
697
  return transporter.request(request, requestOptions);
642
698
  },
699
+ /**
700
+ * Adds a source to the list of allowed sources.
701
+ *
702
+ * 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.
703
+ *
704
+ * Required API Key ACLs:
705
+ * - admin
706
+ * @param source - Source to add.
707
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
708
+ * @see appendSource for the plain version.
709
+ */
710
+ appendSourceWithHTTPInfo(source, requestOptions) {
711
+ validateRequired("source", "appendSourceWithHTTPInfo", source);
712
+ validateRequired("source.source", "appendSourceWithHTTPInfo", source.source);
713
+ const requestPath = "/1/security/sources/append";
714
+ const headers = {};
715
+ const queryParameters = {};
716
+ const request = {
717
+ method: "POST",
718
+ path: requestPath,
719
+ queryParameters,
720
+ headers,
721
+ data: source
722
+ };
723
+ return transporter.requestWithHttpInfo(request, requestOptions);
724
+ },
643
725
  /**
644
726
  * 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
727
  *
@@ -671,6 +753,40 @@ function createSearchClient({
671
753
  };
672
754
  return transporter.request(request, requestOptions);
673
755
  },
756
+ /**
757
+ * 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.
758
+ *
759
+ * 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.
760
+ *
761
+ * Required API Key ACLs:
762
+ * - admin
763
+ *
764
+ * @deprecated
765
+ * @param assignUserId - The assignUserId object.
766
+ * @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
767
+ * @param assignUserId.assignUserIdParams - The assignUserIdParams object.
768
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
769
+ * @see assignUserId for the plain version.
770
+ */
771
+ assignUserIdWithHTTPInfo({ xAlgoliaUserID, assignUserIdParams }, requestOptions) {
772
+ validateRequired("xAlgoliaUserID", "assignUserIdWithHTTPInfo", xAlgoliaUserID);
773
+ validateRequired("assignUserIdParams", "assignUserIdWithHTTPInfo", assignUserIdParams);
774
+ validateRequired("assignUserIdParams.cluster", "assignUserIdWithHTTPInfo", assignUserIdParams.cluster);
775
+ const requestPath = "/1/clusters/mapping";
776
+ const headers = {};
777
+ const queryParameters = {};
778
+ if (xAlgoliaUserID !== void 0) {
779
+ headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
780
+ }
781
+ const request = {
782
+ method: "POST",
783
+ path: requestPath,
784
+ queryParameters,
785
+ headers,
786
+ data: assignUserIdParams
787
+ };
788
+ return transporter.requestWithHttpInfo(request, requestOptions);
789
+ },
674
790
  /**
675
791
  * 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
792
  *
@@ -697,6 +813,35 @@ function createSearchClient({
697
813
  };
698
814
  return transporter.request(request, requestOptions);
699
815
  },
816
+ /**
817
+ * 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).
818
+ *
819
+ * 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.
820
+ *
821
+ * Required API Key ACLs:
822
+ * - addObject
823
+ * @param batch - The batch object.
824
+ * @param batch.indexName - Name of the index on which to perform the operation.
825
+ * @param batch.batchWriteParams - The batchWriteParams object.
826
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
827
+ * @see batch for the plain version.
828
+ */
829
+ batchWithHTTPInfo({ indexName, batchWriteParams }, requestOptions) {
830
+ validateRequired("indexName", "batchWithHTTPInfo", indexName);
831
+ validateRequired("batchWriteParams", "batchWithHTTPInfo", batchWriteParams);
832
+ validateRequired("batchWriteParams.requests", "batchWithHTTPInfo", batchWriteParams.requests);
833
+ const requestPath = "/1/indexes/{indexName}/batch".replace("{indexName}", encodeURIComponent(indexName));
834
+ const headers = {};
835
+ const queryParameters = {};
836
+ const request = {
837
+ method: "POST",
838
+ path: requestPath,
839
+ queryParameters,
840
+ headers,
841
+ data: batchWriteParams
842
+ };
843
+ return transporter.requestWithHttpInfo(request, requestOptions);
844
+ },
700
845
  /**
701
846
  * Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
702
847
  *
@@ -729,6 +874,49 @@ function createSearchClient({
729
874
  };
730
875
  return transporter.request(request, requestOptions);
731
876
  },
877
+ /**
878
+ * Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
879
+ *
880
+ * 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.
881
+ *
882
+ * Required API Key ACLs:
883
+ * - admin
884
+ *
885
+ * @deprecated
886
+ * @param batchAssignUserIds - The batchAssignUserIds object.
887
+ * @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
888
+ * @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
889
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
890
+ * @see batchAssignUserIds for the plain version.
891
+ */
892
+ batchAssignUserIdsWithHTTPInfo({ xAlgoliaUserID, batchAssignUserIdsParams }, requestOptions) {
893
+ validateRequired("xAlgoliaUserID", "batchAssignUserIdsWithHTTPInfo", xAlgoliaUserID);
894
+ validateRequired("batchAssignUserIdsParams", "batchAssignUserIdsWithHTTPInfo", batchAssignUserIdsParams);
895
+ validateRequired(
896
+ "batchAssignUserIdsParams.cluster",
897
+ "batchAssignUserIdsWithHTTPInfo",
898
+ batchAssignUserIdsParams.cluster
899
+ );
900
+ validateRequired(
901
+ "batchAssignUserIdsParams.users",
902
+ "batchAssignUserIdsWithHTTPInfo",
903
+ batchAssignUserIdsParams.users
904
+ );
905
+ const requestPath = "/1/clusters/mapping/batch";
906
+ const headers = {};
907
+ const queryParameters = {};
908
+ if (xAlgoliaUserID !== void 0) {
909
+ headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
910
+ }
911
+ const request = {
912
+ method: "POST",
913
+ path: requestPath,
914
+ queryParameters,
915
+ headers,
916
+ data: batchAssignUserIdsParams
917
+ };
918
+ return transporter.requestWithHttpInfo(request, requestOptions);
919
+ },
732
920
  /**
733
921
  * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
734
922
  *
@@ -762,6 +950,46 @@ function createSearchClient({
762
950
  };
763
951
  return transporter.request(request, requestOptions);
764
952
  },
953
+ /**
954
+ * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
955
+ *
956
+ * 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.
957
+ *
958
+ * Required API Key ACLs:
959
+ * - editSettings
960
+ * @param batchDictionaryEntries - The batchDictionaryEntries object.
961
+ * @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
962
+ * @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
963
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
964
+ * @see batchDictionaryEntries for the plain version.
965
+ */
966
+ batchDictionaryEntriesWithHTTPInfo({ dictionaryName, batchDictionaryEntriesParams }, requestOptions) {
967
+ validateRequired("dictionaryName", "batchDictionaryEntriesWithHTTPInfo", dictionaryName);
968
+ validateRequired(
969
+ "batchDictionaryEntriesParams",
970
+ "batchDictionaryEntriesWithHTTPInfo",
971
+ batchDictionaryEntriesParams
972
+ );
973
+ validateRequired(
974
+ "batchDictionaryEntriesParams.requests",
975
+ "batchDictionaryEntriesWithHTTPInfo",
976
+ batchDictionaryEntriesParams.requests
977
+ );
978
+ const requestPath = "/1/dictionaries/{dictionaryName}/batch".replace(
979
+ "{dictionaryName}",
980
+ encodeURIComponent(dictionaryName)
981
+ );
982
+ const headers = {};
983
+ const queryParameters = {};
984
+ const request = {
985
+ method: "POST",
986
+ path: requestPath,
987
+ queryParameters,
988
+ headers,
989
+ data: batchDictionaryEntriesParams
990
+ };
991
+ return transporter.requestWithHttpInfo(request, requestOptions);
992
+ },
765
993
  /**
766
994
  * 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
995
  *
@@ -787,6 +1015,34 @@ function createSearchClient({
787
1015
  };
788
1016
  return transporter.request(request, requestOptions);
789
1017
  },
1018
+ /**
1019
+ * 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.
1020
+ *
1021
+ * 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.
1022
+ *
1023
+ * Required API Key ACLs:
1024
+ * - browse
1025
+ * @param browse - The browse object.
1026
+ * @param browse.indexName - Name of the index on which to perform the operation.
1027
+ * @param browse.browseParams - The browseParams object.
1028
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1029
+ * @see browse for the plain version.
1030
+ */
1031
+ browseWithHTTPInfo({ indexName, browseParams }, requestOptions) {
1032
+ validateRequired("indexName", "browseWithHTTPInfo", indexName);
1033
+ const requestPath = "/1/indexes/{indexName}/browse".replace("{indexName}", encodeURIComponent(indexName));
1034
+ const headers = {};
1035
+ const queryParameters = {};
1036
+ const request = {
1037
+ method: "POST",
1038
+ path: requestPath,
1039
+ queryParameters,
1040
+ headers,
1041
+ data: browseParams ? browseParams : {},
1042
+ useReadTransporter: true
1043
+ };
1044
+ return transporter.requestWithHttpInfo(request, requestOptions);
1045
+ },
790
1046
  /**
791
1047
  * 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
1048
  *
@@ -809,6 +1065,31 @@ function createSearchClient({
809
1065
  };
810
1066
  return transporter.request(request, requestOptions);
811
1067
  },
1068
+ /**
1069
+ * 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).
1070
+ *
1071
+ * 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.
1072
+ *
1073
+ * Required API Key ACLs:
1074
+ * - deleteIndex
1075
+ * @param clearObjects - The clearObjects object.
1076
+ * @param clearObjects.indexName - Name of the index on which to perform the operation.
1077
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1078
+ * @see clearObjects for the plain version.
1079
+ */
1080
+ clearObjectsWithHTTPInfo({ indexName }, requestOptions) {
1081
+ validateRequired("indexName", "clearObjectsWithHTTPInfo", indexName);
1082
+ const requestPath = "/1/indexes/{indexName}/clear".replace("{indexName}", encodeURIComponent(indexName));
1083
+ const headers = {};
1084
+ const queryParameters = {};
1085
+ const request = {
1086
+ method: "POST",
1087
+ path: requestPath,
1088
+ queryParameters,
1089
+ headers
1090
+ };
1091
+ return transporter.requestWithHttpInfo(request, requestOptions);
1092
+ },
812
1093
  /**
813
1094
  * Deletes all rules from the index.
814
1095
  *
@@ -836,18 +1117,21 @@ function createSearchClient({
836
1117
  return transporter.request(request, requestOptions);
837
1118
  },
838
1119
  /**
839
- * Deletes all synonyms from the index.
1120
+ * Deletes all rules from the index.
1121
+ *
1122
+ * 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
1123
  *
841
1124
  * Required API Key ACLs:
842
1125
  * - 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.
1126
+ * @param clearRules - The clearRules object.
1127
+ * @param clearRules.indexName - Name of the index on which to perform the operation.
1128
+ * @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
846
1129
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1130
+ * @see clearRules for the plain version.
847
1131
  */
848
- clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
849
- validateRequired("indexName", "clearSynonyms", indexName);
850
- const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
1132
+ clearRulesWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
1133
+ validateRequired("indexName", "clearRulesWithHTTPInfo", indexName);
1134
+ const requestPath = "/1/indexes/{indexName}/rules/clear".replace("{indexName}", encodeURIComponent(indexName));
851
1135
  const headers = {};
852
1136
  const queryParameters = {};
853
1137
  if (forwardToReplicas !== void 0) {
@@ -859,22 +1143,28 @@ function createSearchClient({
859
1143
  queryParameters,
860
1144
  headers
861
1145
  };
862
- return transporter.request(request, requestOptions);
1146
+ return transporter.requestWithHttpInfo(request, requestOptions);
863
1147
  },
864
1148
  /**
865
- * This method lets you send requests to the Algolia REST API.
866
- * @param customDelete - The customDelete object.
867
- * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
868
- * @param customDelete.parameters - Query parameters to apply to the current query.
1149
+ * Deletes all synonyms from the index.
1150
+ *
1151
+ * Required API Key ACLs:
1152
+ * - editSettings
1153
+ * @param clearSynonyms - The clearSynonyms object.
1154
+ * @param clearSynonyms.indexName - Name of the index on which to perform the operation.
1155
+ * @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
869
1156
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
870
1157
  */
871
- customDelete({ path, parameters }, requestOptions) {
872
- validateRequired("path", "customDelete", path);
873
- const requestPath = "/{path}".replace("{path}", path);
1158
+ clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
1159
+ validateRequired("indexName", "clearSynonyms", indexName);
1160
+ const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
874
1161
  const headers = {};
875
- const queryParameters = parameters ? parameters : {};
1162
+ const queryParameters = {};
1163
+ if (forwardToReplicas !== void 0) {
1164
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
1165
+ }
876
1166
  const request = {
877
- method: "DELETE",
1167
+ method: "POST",
878
1168
  path: requestPath,
879
1169
  queryParameters,
880
1170
  headers
@@ -882,7 +1172,79 @@ function createSearchClient({
882
1172
  return transporter.request(request, requestOptions);
883
1173
  },
884
1174
  /**
885
- * This method lets you send requests to the Algolia REST API.
1175
+ * Deletes all synonyms from the index.
1176
+ *
1177
+ * 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.
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
+ * @see clearSynonyms for the plain version.
1186
+ */
1187
+ clearSynonymsWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
1188
+ validateRequired("indexName", "clearSynonymsWithHTTPInfo", indexName);
1189
+ const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
1190
+ const headers = {};
1191
+ const queryParameters = {};
1192
+ if (forwardToReplicas !== void 0) {
1193
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
1194
+ }
1195
+ const request = {
1196
+ method: "POST",
1197
+ path: requestPath,
1198
+ queryParameters,
1199
+ headers
1200
+ };
1201
+ return transporter.requestWithHttpInfo(request, requestOptions);
1202
+ },
1203
+ /**
1204
+ * This method lets you send requests to the Algolia REST API.
1205
+ * @param customDelete - The customDelete object.
1206
+ * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
1207
+ * @param customDelete.parameters - Query parameters to apply to the current query.
1208
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1209
+ */
1210
+ customDelete({ path, parameters }, requestOptions) {
1211
+ validateRequired("path", "customDelete", path);
1212
+ const requestPath = "/{path}".replace("{path}", path);
1213
+ const headers = {};
1214
+ const queryParameters = parameters ? parameters : {};
1215
+ const request = {
1216
+ method: "DELETE",
1217
+ path: requestPath,
1218
+ queryParameters,
1219
+ headers
1220
+ };
1221
+ return transporter.request(request, requestOptions);
1222
+ },
1223
+ /**
1224
+ * This method lets you send requests to the Algolia REST API.
1225
+ *
1226
+ * 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.
1227
+ * @param customDelete - The customDelete object.
1228
+ * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
1229
+ * @param customDelete.parameters - Query parameters to apply to the current query.
1230
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1231
+ * @see customDelete for the plain version.
1232
+ */
1233
+ customDeleteWithHTTPInfo({ path, parameters }, requestOptions) {
1234
+ validateRequired("path", "customDeleteWithHTTPInfo", path);
1235
+ const requestPath = "/{path}".replace("{path}", path);
1236
+ const headers = {};
1237
+ const queryParameters = parameters ? parameters : {};
1238
+ const request = {
1239
+ method: "DELETE",
1240
+ path: requestPath,
1241
+ queryParameters,
1242
+ headers
1243
+ };
1244
+ return transporter.requestWithHttpInfo(request, requestOptions);
1245
+ },
1246
+ /**
1247
+ * This method lets you send requests to the Algolia REST API.
886
1248
  * @param customGet - The customGet object.
887
1249
  * @param customGet.path - Path of the endpoint, for example `1/newFeature`.
888
1250
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -901,6 +1263,29 @@ function createSearchClient({
901
1263
  };
902
1264
  return transporter.request(request, requestOptions);
903
1265
  },
1266
+ /**
1267
+ * This method lets you send requests to the Algolia REST API.
1268
+ *
1269
+ * 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.
1270
+ * @param customGet - The customGet object.
1271
+ * @param customGet.path - Path of the endpoint, for example `1/newFeature`.
1272
+ * @param customGet.parameters - Query parameters to apply to the current query.
1273
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1274
+ * @see customGet for the plain version.
1275
+ */
1276
+ customGetWithHTTPInfo({ path, parameters }, requestOptions) {
1277
+ validateRequired("path", "customGetWithHTTPInfo", path);
1278
+ const requestPath = "/{path}".replace("{path}", path);
1279
+ const headers = {};
1280
+ const queryParameters = parameters ? parameters : {};
1281
+ const request = {
1282
+ method: "GET",
1283
+ path: requestPath,
1284
+ queryParameters,
1285
+ headers
1286
+ };
1287
+ return transporter.requestWithHttpInfo(request, requestOptions);
1288
+ },
904
1289
  /**
905
1290
  * This method lets you send requests to the Algolia REST API.
906
1291
  * @param customPost - The customPost object.
@@ -923,6 +1308,31 @@ function createSearchClient({
923
1308
  };
924
1309
  return transporter.request(request, requestOptions);
925
1310
  },
1311
+ /**
1312
+ * This method lets you send requests to the Algolia REST API.
1313
+ *
1314
+ * 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.
1315
+ * @param customPost - The customPost object.
1316
+ * @param customPost.path - Path of the endpoint, for example `1/newFeature`.
1317
+ * @param customPost.parameters - Query parameters to apply to the current query.
1318
+ * @param customPost.body - Parameters to send with the custom request.
1319
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1320
+ * @see customPost for the plain version.
1321
+ */
1322
+ customPostWithHTTPInfo({ path, parameters, body }, requestOptions) {
1323
+ validateRequired("path", "customPostWithHTTPInfo", path);
1324
+ const requestPath = "/{path}".replace("{path}", path);
1325
+ const headers = {};
1326
+ const queryParameters = parameters ? parameters : {};
1327
+ const request = {
1328
+ method: "POST",
1329
+ path: requestPath,
1330
+ queryParameters,
1331
+ headers,
1332
+ data: body ? body : {}
1333
+ };
1334
+ return transporter.requestWithHttpInfo(request, requestOptions);
1335
+ },
926
1336
  /**
927
1337
  * This method lets you send requests to the Algolia REST API.
928
1338
  * @param customPut - The customPut object.
@@ -945,6 +1355,31 @@ function createSearchClient({
945
1355
  };
946
1356
  return transporter.request(request, requestOptions);
947
1357
  },
1358
+ /**
1359
+ * This method lets you send requests to the Algolia REST API.
1360
+ *
1361
+ * 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.
1362
+ * @param customPut - The customPut object.
1363
+ * @param customPut.path - Path of the endpoint, for example `1/newFeature`.
1364
+ * @param customPut.parameters - Query parameters to apply to the current query.
1365
+ * @param customPut.body - Parameters to send with the custom request.
1366
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1367
+ * @see customPut for the plain version.
1368
+ */
1369
+ customPutWithHTTPInfo({ path, parameters, body }, requestOptions) {
1370
+ validateRequired("path", "customPutWithHTTPInfo", path);
1371
+ const requestPath = "/{path}".replace("{path}", path);
1372
+ const headers = {};
1373
+ const queryParameters = parameters ? parameters : {};
1374
+ const request = {
1375
+ method: "PUT",
1376
+ path: requestPath,
1377
+ queryParameters,
1378
+ headers,
1379
+ data: body ? body : {}
1380
+ };
1381
+ return transporter.requestWithHttpInfo(request, requestOptions);
1382
+ },
948
1383
  /**
949
1384
  * Deletes the API key.
950
1385
  *
@@ -967,6 +1402,31 @@ function createSearchClient({
967
1402
  };
968
1403
  return transporter.request(request, requestOptions);
969
1404
  },
1405
+ /**
1406
+ * Deletes the API key.
1407
+ *
1408
+ * 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
+ *
1410
+ * Required API Key ACLs:
1411
+ * - admin
1412
+ * @param deleteApiKey - The deleteApiKey object.
1413
+ * @param deleteApiKey.key - API key.
1414
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1415
+ * @see deleteApiKey for the plain version.
1416
+ */
1417
+ deleteApiKeyWithHTTPInfo({ key }, requestOptions) {
1418
+ validateRequired("key", "deleteApiKeyWithHTTPInfo", key);
1419
+ const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
1420
+ const headers = {};
1421
+ const queryParameters = {};
1422
+ const request = {
1423
+ method: "DELETE",
1424
+ path: requestPath,
1425
+ queryParameters,
1426
+ headers
1427
+ };
1428
+ return transporter.requestWithHttpInfo(request, requestOptions);
1429
+ },
970
1430
  /**
971
1431
  * 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
1432
  *
@@ -992,6 +1452,34 @@ function createSearchClient({
992
1452
  };
993
1453
  return transporter.request(request, requestOptions);
994
1454
  },
1455
+ /**
1456
+ * 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).
1457
+ *
1458
+ * 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.
1459
+ *
1460
+ * Required API Key ACLs:
1461
+ * - deleteIndex
1462
+ * @param deleteBy - The deleteBy object.
1463
+ * @param deleteBy.indexName - Name of the index on which to perform the operation.
1464
+ * @param deleteBy.deleteByParams - The deleteByParams object.
1465
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1466
+ * @see deleteBy for the plain version.
1467
+ */
1468
+ deleteByWithHTTPInfo({ indexName, deleteByParams }, requestOptions) {
1469
+ validateRequired("indexName", "deleteByWithHTTPInfo", indexName);
1470
+ validateRequired("deleteByParams", "deleteByWithHTTPInfo", deleteByParams);
1471
+ const requestPath = "/1/indexes/{indexName}/deleteByQuery".replace("{indexName}", encodeURIComponent(indexName));
1472
+ const headers = {};
1473
+ const queryParameters = {};
1474
+ const request = {
1475
+ method: "POST",
1476
+ path: requestPath,
1477
+ queryParameters,
1478
+ headers,
1479
+ data: deleteByParams
1480
+ };
1481
+ return transporter.requestWithHttpInfo(request, requestOptions);
1482
+ },
995
1483
  /**
996
1484
  * 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
1485
  *
@@ -1014,6 +1502,31 @@ function createSearchClient({
1014
1502
  };
1015
1503
  return transporter.request(request, requestOptions);
1016
1504
  },
1505
+ /**
1506
+ * 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).
1507
+ *
1508
+ * 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.
1509
+ *
1510
+ * Required API Key ACLs:
1511
+ * - deleteIndex
1512
+ * @param deleteIndex - The deleteIndex object.
1513
+ * @param deleteIndex.indexName - Name of the index on which to perform the operation.
1514
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1515
+ * @see deleteIndex for the plain version.
1516
+ */
1517
+ deleteIndexWithHTTPInfo({ indexName }, requestOptions) {
1518
+ validateRequired("indexName", "deleteIndexWithHTTPInfo", indexName);
1519
+ const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
1520
+ const headers = {};
1521
+ const queryParameters = {};
1522
+ const request = {
1523
+ method: "DELETE",
1524
+ path: requestPath,
1525
+ queryParameters,
1526
+ headers
1527
+ };
1528
+ return transporter.requestWithHttpInfo(request, requestOptions);
1529
+ },
1017
1530
  /**
1018
1531
  * 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
1532
  *
@@ -1038,6 +1551,33 @@ function createSearchClient({
1038
1551
  };
1039
1552
  return transporter.request(request, requestOptions);
1040
1553
  },
1554
+ /**
1555
+ * 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).
1556
+ *
1557
+ * 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.
1558
+ *
1559
+ * Required API Key ACLs:
1560
+ * - deleteObject
1561
+ * @param deleteObject - The deleteObject object.
1562
+ * @param deleteObject.indexName - Name of the index on which to perform the operation.
1563
+ * @param deleteObject.objectID - Unique record identifier.
1564
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1565
+ * @see deleteObject for the plain version.
1566
+ */
1567
+ deleteObjectWithHTTPInfo({ indexName, objectID }, requestOptions) {
1568
+ validateRequired("indexName", "deleteObjectWithHTTPInfo", indexName);
1569
+ validateRequired("objectID", "deleteObjectWithHTTPInfo", objectID);
1570
+ const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
1571
+ const headers = {};
1572
+ const queryParameters = {};
1573
+ const request = {
1574
+ method: "DELETE",
1575
+ path: requestPath,
1576
+ queryParameters,
1577
+ headers
1578
+ };
1579
+ return transporter.requestWithHttpInfo(request, requestOptions);
1580
+ },
1041
1581
  /**
1042
1582
  * 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
1583
  *
@@ -1066,6 +1606,37 @@ function createSearchClient({
1066
1606
  };
1067
1607
  return transporter.request(request, requestOptions);
1068
1608
  },
1609
+ /**
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).
1611
+ *
1612
+ * 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.
1613
+ *
1614
+ * Required API Key ACLs:
1615
+ * - editSettings
1616
+ * @param deleteRule - The deleteRule object.
1617
+ * @param deleteRule.indexName - Name of the index on which to perform the operation.
1618
+ * @param deleteRule.objectID - Unique identifier of a rule object.
1619
+ * @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
1620
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1621
+ * @see deleteRule for the plain version.
1622
+ */
1623
+ deleteRuleWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
1624
+ validateRequired("indexName", "deleteRuleWithHTTPInfo", indexName);
1625
+ validateRequired("objectID", "deleteRuleWithHTTPInfo", objectID);
1626
+ const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
1627
+ const headers = {};
1628
+ const queryParameters = {};
1629
+ if (forwardToReplicas !== void 0) {
1630
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
1631
+ }
1632
+ const request = {
1633
+ method: "DELETE",
1634
+ path: requestPath,
1635
+ queryParameters,
1636
+ headers
1637
+ };
1638
+ return transporter.requestWithHttpInfo(request, requestOptions);
1639
+ },
1069
1640
  /**
1070
1641
  * Deletes a source from the list of allowed sources.
1071
1642
  *
@@ -1088,6 +1659,31 @@ function createSearchClient({
1088
1659
  };
1089
1660
  return transporter.request(request, requestOptions);
1090
1661
  },
1662
+ /**
1663
+ * Deletes a source from the list of allowed sources.
1664
+ *
1665
+ * 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.
1666
+ *
1667
+ * Required API Key ACLs:
1668
+ * - admin
1669
+ * @param deleteSource - The deleteSource object.
1670
+ * @param deleteSource.source - IP address range of the source.
1671
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1672
+ * @see deleteSource for the plain version.
1673
+ */
1674
+ deleteSourceWithHTTPInfo({ source }, requestOptions) {
1675
+ validateRequired("source", "deleteSourceWithHTTPInfo", source);
1676
+ const requestPath = "/1/security/sources/{source}".replace("{source}", encodeURIComponent(source));
1677
+ const headers = {};
1678
+ const queryParameters = {};
1679
+ const request = {
1680
+ method: "DELETE",
1681
+ path: requestPath,
1682
+ queryParameters,
1683
+ headers
1684
+ };
1685
+ return transporter.requestWithHttpInfo(request, requestOptions);
1686
+ },
1091
1687
  /**
1092
1688
  * 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
1689
  *
@@ -1117,13 +1713,44 @@ function createSearchClient({
1117
1713
  return transporter.request(request, requestOptions);
1118
1714
  },
1119
1715
  /**
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>`.
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).
1717
+ *
1718
+ * 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.
1121
1719
  *
1122
1720
  * Required API Key ACLs:
1123
- * - search
1124
- * @param getApiKey - The getApiKey object.
1125
- * @param getApiKey.key - API key.
1126
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1721
+ * - editSettings
1722
+ * @param deleteSynonym - The deleteSynonym object.
1723
+ * @param deleteSynonym.indexName - Name of the index on which to perform the operation.
1724
+ * @param deleteSynonym.objectID - Unique identifier of a synonym object.
1725
+ * @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
1726
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1727
+ * @see deleteSynonym for the plain version.
1728
+ */
1729
+ deleteSynonymWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
1730
+ validateRequired("indexName", "deleteSynonymWithHTTPInfo", indexName);
1731
+ validateRequired("objectID", "deleteSynonymWithHTTPInfo", objectID);
1732
+ const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
1733
+ const headers = {};
1734
+ const queryParameters = {};
1735
+ if (forwardToReplicas !== void 0) {
1736
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
1737
+ }
1738
+ const request = {
1739
+ method: "DELETE",
1740
+ path: requestPath,
1741
+ queryParameters,
1742
+ headers
1743
+ };
1744
+ return transporter.requestWithHttpInfo(request, requestOptions);
1745
+ },
1746
+ /**
1747
+ * 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>`.
1748
+ *
1749
+ * Required API Key ACLs:
1750
+ * - search
1751
+ * @param getApiKey - The getApiKey object.
1752
+ * @param getApiKey.key - API key.
1753
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1127
1754
  */
1128
1755
  getApiKey({ key }, requestOptions) {
1129
1756
  validateRequired("key", "getApiKey", key);
@@ -1138,6 +1765,31 @@ function createSearchClient({
1138
1765
  };
1139
1766
  return transporter.request(request, requestOptions);
1140
1767
  },
1768
+ /**
1769
+ * 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>`.
1770
+ *
1771
+ * 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.
1772
+ *
1773
+ * Required API Key ACLs:
1774
+ * - search
1775
+ * @param getApiKey - The getApiKey object.
1776
+ * @param getApiKey.key - API key.
1777
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1778
+ * @see getApiKey for the plain version.
1779
+ */
1780
+ getApiKeyWithHTTPInfo({ key }, requestOptions) {
1781
+ validateRequired("key", "getApiKeyWithHTTPInfo", key);
1782
+ const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
1783
+ const headers = {};
1784
+ const queryParameters = {};
1785
+ const request = {
1786
+ method: "GET",
1787
+ path: requestPath,
1788
+ queryParameters,
1789
+ headers
1790
+ };
1791
+ return transporter.requestWithHttpInfo(request, requestOptions);
1792
+ },
1141
1793
  /**
1142
1794
  * Checks the status of a given application task.
1143
1795
  *
@@ -1160,6 +1812,31 @@ function createSearchClient({
1160
1812
  };
1161
1813
  return transporter.request(request, requestOptions);
1162
1814
  },
1815
+ /**
1816
+ * Checks the status of a given application task.
1817
+ *
1818
+ * 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.
1819
+ *
1820
+ * Required API Key ACLs:
1821
+ * - editSettings
1822
+ * @param getAppTask - The getAppTask object.
1823
+ * @param getAppTask.taskID - Unique task identifier.
1824
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1825
+ * @see getAppTask for the plain version.
1826
+ */
1827
+ getAppTaskWithHTTPInfo({ taskID }, requestOptions) {
1828
+ validateRequired("taskID", "getAppTaskWithHTTPInfo", taskID);
1829
+ const requestPath = "/1/task/{taskID}".replace("{taskID}", encodeURIComponent(taskID));
1830
+ const headers = {};
1831
+ const queryParameters = {};
1832
+ const request = {
1833
+ method: "GET",
1834
+ path: requestPath,
1835
+ queryParameters,
1836
+ headers
1837
+ };
1838
+ return transporter.requestWithHttpInfo(request, requestOptions);
1839
+ },
1163
1840
  /**
1164
1841
  * Lists supported languages with their supported dictionary types and number of custom entries.
1165
1842
  *
@@ -1179,6 +1856,28 @@ function createSearchClient({
1179
1856
  };
1180
1857
  return transporter.request(request, requestOptions);
1181
1858
  },
1859
+ /**
1860
+ * Lists supported languages with their supported dictionary types and number of custom entries.
1861
+ *
1862
+ * 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.
1863
+ *
1864
+ * Required API Key ACLs:
1865
+ * - settings
1866
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1867
+ * @see getDictionaryLanguages for the plain version.
1868
+ */
1869
+ getDictionaryLanguagesWithHTTPInfo(requestOptions) {
1870
+ const requestPath = "/1/dictionaries/*/languages";
1871
+ const headers = {};
1872
+ const queryParameters = {};
1873
+ const request = {
1874
+ method: "GET",
1875
+ path: requestPath,
1876
+ queryParameters,
1877
+ headers
1878
+ };
1879
+ return transporter.requestWithHttpInfo(request, requestOptions);
1880
+ },
1182
1881
  /**
1183
1882
  * Retrieves the languages for which standard dictionary entries are turned off.
1184
1883
  *
@@ -1198,6 +1897,28 @@ function createSearchClient({
1198
1897
  };
1199
1898
  return transporter.request(request, requestOptions);
1200
1899
  },
1900
+ /**
1901
+ * Retrieves the languages for which standard dictionary entries are turned off.
1902
+ *
1903
+ * 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.
1904
+ *
1905
+ * Required API Key ACLs:
1906
+ * - settings
1907
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1908
+ * @see getDictionarySettings for the plain version.
1909
+ */
1910
+ getDictionarySettingsWithHTTPInfo(requestOptions) {
1911
+ const requestPath = "/1/dictionaries/*/settings";
1912
+ const headers = {};
1913
+ const queryParameters = {};
1914
+ const request = {
1915
+ method: "GET",
1916
+ path: requestPath,
1917
+ queryParameters,
1918
+ headers
1919
+ };
1920
+ return transporter.requestWithHttpInfo(request, requestOptions);
1921
+ },
1201
1922
  /**
1202
1923
  * 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
1924
  *
@@ -1234,6 +1955,45 @@ function createSearchClient({
1234
1955
  };
1235
1956
  return transporter.request(request, requestOptions);
1236
1957
  },
1958
+ /**
1959
+ * 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.
1960
+ *
1961
+ * 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.
1962
+ *
1963
+ * Required API Key ACLs:
1964
+ * - logs
1965
+ * @param getLogs - The getLogs object.
1966
+ * @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
1967
+ * @param getLogs.length - Maximum number of entries to retrieve.
1968
+ * @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
1969
+ * @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
1970
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1971
+ * @see getLogs for the plain version.
1972
+ */
1973
+ getLogsWithHTTPInfo({ offset, length, indexName, type } = {}, requestOptions = void 0) {
1974
+ const requestPath = "/1/logs";
1975
+ const headers = {};
1976
+ const queryParameters = {};
1977
+ if (offset !== void 0) {
1978
+ queryParameters["offset"] = offset.toString();
1979
+ }
1980
+ if (length !== void 0) {
1981
+ queryParameters["length"] = length.toString();
1982
+ }
1983
+ if (indexName !== void 0) {
1984
+ queryParameters["indexName"] = indexName.toString();
1985
+ }
1986
+ if (type !== void 0) {
1987
+ queryParameters["type"] = type.toString();
1988
+ }
1989
+ const request = {
1990
+ method: "GET",
1991
+ path: requestPath,
1992
+ queryParameters,
1993
+ headers
1994
+ };
1995
+ return transporter.requestWithHttpInfo(request, requestOptions);
1996
+ },
1237
1997
  /**
1238
1998
  * 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
1999
  *
@@ -1262,6 +2022,37 @@ function createSearchClient({
1262
2022
  };
1263
2023
  return transporter.request(request, requestOptions);
1264
2024
  },
2025
+ /**
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).
2027
+ *
2028
+ * 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.
2029
+ *
2030
+ * Required API Key ACLs:
2031
+ * - search
2032
+ * @param getObject - The getObject object.
2033
+ * @param getObject.indexName - Name of the index on which to perform the operation.
2034
+ * @param getObject.objectID - Unique record identifier.
2035
+ * @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.
2036
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2037
+ * @see getObject for the plain version.
2038
+ */
2039
+ getObjectWithHTTPInfo({ indexName, objectID, attributesToRetrieve }, requestOptions) {
2040
+ validateRequired("indexName", "getObjectWithHTTPInfo", indexName);
2041
+ validateRequired("objectID", "getObjectWithHTTPInfo", objectID);
2042
+ const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
2043
+ const headers = {};
2044
+ const queryParameters = {};
2045
+ if (attributesToRetrieve !== void 0) {
2046
+ queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
2047
+ }
2048
+ const request = {
2049
+ method: "GET",
2050
+ path: requestPath,
2051
+ queryParameters,
2052
+ headers
2053
+ };
2054
+ return transporter.requestWithHttpInfo(request, requestOptions);
2055
+ },
1265
2056
  /**
1266
2057
  * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
1267
2058
  *
@@ -1287,20 +2078,246 @@ function createSearchClient({
1287
2078
  };
1288
2079
  return transporter.request(request, requestOptions);
1289
2080
  },
2081
+ /**
2082
+ * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
2083
+ *
2084
+ * 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.
2085
+ *
2086
+ * Required API Key ACLs:
2087
+ * - search
2088
+ * @param getObjectsParams - Request object.
2089
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2090
+ * @see getObjects for the plain version.
2091
+ */
2092
+ getObjectsWithHTTPInfo(getObjectsParams, requestOptions) {
2093
+ validateRequired("getObjectsParams", "getObjectsWithHTTPInfo", getObjectsParams);
2094
+ validateRequired("getObjectsParams.requests", "getObjectsWithHTTPInfo", getObjectsParams.requests);
2095
+ const requestPath = "/1/indexes/*/objects";
2096
+ const headers = {};
2097
+ const queryParameters = {};
2098
+ const request = {
2099
+ method: "POST",
2100
+ path: requestPath,
2101
+ queryParameters,
2102
+ headers,
2103
+ data: getObjectsParams,
2104
+ useReadTransporter: true,
2105
+ cacheable: true
2106
+ };
2107
+ return transporter.requestWithHttpInfo(request, requestOptions);
2108
+ },
2109
+ /**
2110
+ * 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).
2111
+ *
2112
+ * Required API Key ACLs:
2113
+ * - settings
2114
+ * @param getRule - The getRule object.
2115
+ * @param getRule.indexName - Name of the index on which to perform the operation.
2116
+ * @param getRule.objectID - Unique identifier of a rule object.
2117
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2118
+ */
2119
+ getRule({ indexName, objectID }, requestOptions) {
2120
+ validateRequired("indexName", "getRule", indexName);
2121
+ validateRequired("objectID", "getRule", objectID);
2122
+ const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
2123
+ const headers = {};
2124
+ const queryParameters = {};
2125
+ const request = {
2126
+ method: "GET",
2127
+ path: requestPath,
2128
+ queryParameters,
2129
+ headers
2130
+ };
2131
+ return transporter.request(request, requestOptions);
2132
+ },
1290
2133
  /**
1291
2134
  * 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
2135
  *
2136
+ * 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.
2137
+ *
1293
2138
  * Required API Key ACLs:
1294
2139
  * - settings
1295
2140
  * @param getRule - The getRule object.
1296
2141
  * @param getRule.indexName - Name of the index on which to perform the operation.
1297
2142
  * @param getRule.objectID - Unique identifier of a rule object.
1298
2143
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2144
+ * @see getRule for the plain version.
2145
+ */
2146
+ getRuleWithHTTPInfo({ indexName, objectID }, requestOptions) {
2147
+ validateRequired("indexName", "getRuleWithHTTPInfo", indexName);
2148
+ validateRequired("objectID", "getRuleWithHTTPInfo", objectID);
2149
+ const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
2150
+ const headers = {};
2151
+ const queryParameters = {};
2152
+ const request = {
2153
+ method: "GET",
2154
+ path: requestPath,
2155
+ queryParameters,
2156
+ headers
2157
+ };
2158
+ return transporter.requestWithHttpInfo(request, requestOptions);
2159
+ },
2160
+ /**
2161
+ * Retrieves an object with non-null index settings.
2162
+ *
2163
+ * Required API Key ACLs:
2164
+ * - settings
2165
+ * @param getSettings - The getSettings object.
2166
+ * @param getSettings.indexName - Name of the index on which to perform the operation.
2167
+ * @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
2168
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2169
+ */
2170
+ getSettings({ indexName, getVersion }, requestOptions) {
2171
+ validateRequired("indexName", "getSettings", indexName);
2172
+ const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
2173
+ const headers = {};
2174
+ const queryParameters = {};
2175
+ if (getVersion !== void 0) {
2176
+ queryParameters["getVersion"] = getVersion.toString();
2177
+ }
2178
+ const request = {
2179
+ method: "GET",
2180
+ path: requestPath,
2181
+ queryParameters,
2182
+ headers
2183
+ };
2184
+ return transporter.request(request, requestOptions);
2185
+ },
2186
+ /**
2187
+ * Retrieves an object with non-null index settings.
2188
+ *
2189
+ * 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.
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
+ * @see getSettings for the plain version.
2198
+ */
2199
+ getSettingsWithHTTPInfo({ indexName, getVersion }, requestOptions) {
2200
+ validateRequired("indexName", "getSettingsWithHTTPInfo", indexName);
2201
+ const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
2202
+ const headers = {};
2203
+ const queryParameters = {};
2204
+ if (getVersion !== void 0) {
2205
+ queryParameters["getVersion"] = getVersion.toString();
2206
+ }
2207
+ const request = {
2208
+ method: "GET",
2209
+ path: requestPath,
2210
+ queryParameters,
2211
+ headers
2212
+ };
2213
+ return transporter.requestWithHttpInfo(request, requestOptions);
2214
+ },
2215
+ /**
2216
+ * Retrieves all allowed IP addresses with access to your application.
2217
+ *
2218
+ * Required API Key ACLs:
2219
+ * - admin
2220
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2221
+ */
2222
+ getSources(requestOptions) {
2223
+ const requestPath = "/1/security/sources";
2224
+ const headers = {};
2225
+ const queryParameters = {};
2226
+ const request = {
2227
+ method: "GET",
2228
+ path: requestPath,
2229
+ queryParameters,
2230
+ headers
2231
+ };
2232
+ return transporter.request(request, requestOptions);
2233
+ },
2234
+ /**
2235
+ * Retrieves all allowed IP addresses with access to your application.
2236
+ *
2237
+ * 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.
2238
+ *
2239
+ * Required API Key ACLs:
2240
+ * - admin
2241
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2242
+ * @see getSources for the plain version.
2243
+ */
2244
+ getSourcesWithHTTPInfo(requestOptions) {
2245
+ const requestPath = "/1/security/sources";
2246
+ const headers = {};
2247
+ const queryParameters = {};
2248
+ const request = {
2249
+ method: "GET",
2250
+ path: requestPath,
2251
+ queryParameters,
2252
+ headers
2253
+ };
2254
+ return transporter.requestWithHttpInfo(request, requestOptions);
2255
+ },
2256
+ /**
2257
+ * 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).
2258
+ *
2259
+ * Required API Key ACLs:
2260
+ * - settings
2261
+ * @param getSynonym - The getSynonym object.
2262
+ * @param getSynonym.indexName - Name of the index on which to perform the operation.
2263
+ * @param getSynonym.objectID - Unique identifier of a synonym object.
2264
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2265
+ */
2266
+ getSynonym({ indexName, objectID }, requestOptions) {
2267
+ validateRequired("indexName", "getSynonym", indexName);
2268
+ validateRequired("objectID", "getSynonym", objectID);
2269
+ const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
2270
+ const headers = {};
2271
+ const queryParameters = {};
2272
+ const request = {
2273
+ method: "GET",
2274
+ path: requestPath,
2275
+ queryParameters,
2276
+ headers
2277
+ };
2278
+ return transporter.request(request, requestOptions);
2279
+ },
2280
+ /**
2281
+ * 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).
2282
+ *
2283
+ * 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.
2284
+ *
2285
+ * Required API Key ACLs:
2286
+ * - settings
2287
+ * @param getSynonym - The getSynonym object.
2288
+ * @param getSynonym.indexName - Name of the index on which to perform the operation.
2289
+ * @param getSynonym.objectID - Unique identifier of a synonym object.
2290
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2291
+ * @see getSynonym for the plain version.
2292
+ */
2293
+ getSynonymWithHTTPInfo({ indexName, objectID }, requestOptions) {
2294
+ validateRequired("indexName", "getSynonymWithHTTPInfo", indexName);
2295
+ validateRequired("objectID", "getSynonymWithHTTPInfo", objectID);
2296
+ const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
2297
+ const headers = {};
2298
+ const queryParameters = {};
2299
+ const request = {
2300
+ method: "GET",
2301
+ path: requestPath,
2302
+ queryParameters,
2303
+ headers
2304
+ };
2305
+ return transporter.requestWithHttpInfo(request, requestOptions);
2306
+ },
2307
+ /**
2308
+ * 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.
2309
+ *
2310
+ * Required API Key ACLs:
2311
+ * - addObject
2312
+ * @param getTask - The getTask object.
2313
+ * @param getTask.indexName - Name of the index on which to perform the operation.
2314
+ * @param getTask.taskID - Unique task identifier.
2315
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1299
2316
  */
1300
- getRule({ indexName, objectID }, requestOptions) {
1301
- validateRequired("indexName", "getRule", indexName);
1302
- validateRequired("objectID", "getRule", objectID);
1303
- const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
2317
+ getTask({ indexName, taskID }, requestOptions) {
2318
+ validateRequired("indexName", "getTask", indexName);
2319
+ validateRequired("taskID", "getTask", taskID);
2320
+ const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
1304
2321
  const headers = {};
1305
2322
  const queryParameters = {};
1306
2323
  const request = {
@@ -1312,40 +2329,43 @@ function createSearchClient({
1312
2329
  return transporter.request(request, requestOptions);
1313
2330
  },
1314
2331
  /**
1315
- * Retrieves an object with non-null index settings.
2332
+ * 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.
2333
+ *
2334
+ * 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
2335
  *
1317
2336
  * 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.
2337
+ * - addObject
2338
+ * @param getTask - The getTask object.
2339
+ * @param getTask.indexName - Name of the index on which to perform the operation.
2340
+ * @param getTask.taskID - Unique task identifier.
1322
2341
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2342
+ * @see getTask for the plain version.
1323
2343
  */
1324
- getSettings({ indexName, getVersion }, requestOptions) {
1325
- validateRequired("indexName", "getSettings", indexName);
1326
- const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
2344
+ getTaskWithHTTPInfo({ indexName, taskID }, requestOptions) {
2345
+ validateRequired("indexName", "getTaskWithHTTPInfo", indexName);
2346
+ validateRequired("taskID", "getTaskWithHTTPInfo", taskID);
2347
+ const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
1327
2348
  const headers = {};
1328
2349
  const queryParameters = {};
1329
- if (getVersion !== void 0) {
1330
- queryParameters["getVersion"] = getVersion.toString();
1331
- }
1332
2350
  const request = {
1333
2351
  method: "GET",
1334
2352
  path: requestPath,
1335
2353
  queryParameters,
1336
2354
  headers
1337
2355
  };
1338
- return transporter.request(request, requestOptions);
2356
+ return transporter.requestWithHttpInfo(request, requestOptions);
1339
2357
  },
1340
2358
  /**
1341
- * Retrieves all allowed IP addresses with access to your application.
2359
+ * 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
2360
  *
1343
2361
  * Required API Key ACLs:
1344
2362
  * - admin
2363
+ *
2364
+ * @deprecated
1345
2365
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1346
2366
  */
1347
- getSources(requestOptions) {
1348
- const requestPath = "/1/security/sources";
2367
+ getTopUserIds(requestOptions) {
2368
+ const requestPath = "/1/clusters/mapping/top";
1349
2369
  const headers = {};
1350
2370
  const queryParameters = {};
1351
2371
  const request = {
@@ -1357,19 +2377,19 @@ function createSearchClient({
1357
2377
  return transporter.request(request, requestOptions);
1358
2378
  },
1359
2379
  /**
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).
2380
+ * 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.
2381
+ *
2382
+ * 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
2383
  *
1362
2384
  * 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.
2385
+ * - admin
2386
+ *
2387
+ * @deprecated
1367
2388
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2389
+ * @see getTopUserIds for the plain version.
1368
2390
  */
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));
2391
+ getTopUserIdsWithHTTPInfo(requestOptions) {
2392
+ const requestPath = "/1/clusters/mapping/top";
1373
2393
  const headers = {};
1374
2394
  const queryParameters = {};
1375
2395
  const request = {
@@ -1378,22 +2398,22 @@ function createSearchClient({
1378
2398
  queryParameters,
1379
2399
  headers
1380
2400
  };
1381
- return transporter.request(request, requestOptions);
2401
+ return transporter.requestWithHttpInfo(request, requestOptions);
1382
2402
  },
1383
2403
  /**
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.
2404
+ * 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
2405
  *
1386
2406
  * 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.
2407
+ * - admin
2408
+ *
2409
+ * @deprecated
2410
+ * @param getUserId - The getUserId object.
2411
+ * @param getUserId.userID - Unique identifier of the user who makes the search request.
1391
2412
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1392
2413
  */
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));
2414
+ getUserId({ userID }, requestOptions) {
2415
+ validateRequired("userID", "getUserId", userID);
2416
+ const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
1397
2417
  const headers = {};
1398
2418
  const queryParameters = {};
1399
2419
  const request = {
@@ -1405,16 +2425,22 @@ function createSearchClient({
1405
2425
  return transporter.request(request, requestOptions);
1406
2426
  },
1407
2427
  /**
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.
2428
+ * 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.
2429
+ *
2430
+ * 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
2431
  *
1410
2432
  * Required API Key ACLs:
1411
2433
  * - admin
1412
2434
  *
1413
2435
  * @deprecated
2436
+ * @param getUserId - The getUserId object.
2437
+ * @param getUserId.userID - Unique identifier of the user who makes the search request.
1414
2438
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2439
+ * @see getUserId for the plain version.
1415
2440
  */
1416
- getTopUserIds(requestOptions) {
1417
- const requestPath = "/1/clusters/mapping/top";
2441
+ getUserIdWithHTTPInfo({ userID }, requestOptions) {
2442
+ validateRequired("userID", "getUserIdWithHTTPInfo", userID);
2443
+ const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
1418
2444
  const headers = {};
1419
2445
  const queryParameters = {};
1420
2446
  const request = {
@@ -1423,24 +2449,26 @@ function createSearchClient({
1423
2449
  queryParameters,
1424
2450
  headers
1425
2451
  };
1426
- return transporter.request(request, requestOptions);
2452
+ return transporter.requestWithHttpInfo(request, requestOptions);
1427
2453
  },
1428
2454
  /**
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.
2455
+ * 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
2456
  *
1431
2457
  * Required API Key ACLs:
1432
2458
  * - admin
1433
2459
  *
1434
2460
  * @deprecated
1435
- * @param getUserId - The getUserId object.
1436
- * @param getUserId.userID - Unique identifier of the user who makes the search request.
2461
+ * @param hasPendingMappings - The hasPendingMappings object.
2462
+ * @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
1437
2463
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1438
2464
  */
1439
- getUserId({ userID }, requestOptions) {
1440
- validateRequired("userID", "getUserId", userID);
1441
- const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
2465
+ hasPendingMappings({ getClusters } = {}, requestOptions = void 0) {
2466
+ const requestPath = "/1/clusters/mapping/pending";
1442
2467
  const headers = {};
1443
2468
  const queryParameters = {};
2469
+ if (getClusters !== void 0) {
2470
+ queryParameters["getClusters"] = getClusters.toString();
2471
+ }
1444
2472
  const request = {
1445
2473
  method: "GET",
1446
2474
  path: requestPath,
@@ -1452,6 +2480,8 @@ function createSearchClient({
1452
2480
  /**
1453
2481
  * 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
2482
  *
2483
+ * 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.
2484
+ *
1455
2485
  * Required API Key ACLs:
1456
2486
  * - admin
1457
2487
  *
@@ -1459,8 +2489,9 @@ function createSearchClient({
1459
2489
  * @param hasPendingMappings - The hasPendingMappings object.
1460
2490
  * @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
1461
2491
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2492
+ * @see hasPendingMappings for the plain version.
1462
2493
  */
1463
- hasPendingMappings({ getClusters } = {}, requestOptions = void 0) {
2494
+ hasPendingMappingsWithHTTPInfo({ getClusters } = {}, requestOptions = void 0) {
1464
2495
  const requestPath = "/1/clusters/mapping/pending";
1465
2496
  const headers = {};
1466
2497
  const queryParameters = {};
@@ -1473,7 +2504,7 @@ function createSearchClient({
1473
2504
  queryParameters,
1474
2505
  headers
1475
2506
  };
1476
- return transporter.request(request, requestOptions);
2507
+ return transporter.requestWithHttpInfo(request, requestOptions);
1477
2508
  },
1478
2509
  /**
1479
2510
  * Lists all API keys associated with your Algolia application, including their permissions and restrictions.
@@ -1494,6 +2525,28 @@ function createSearchClient({
1494
2525
  };
1495
2526
  return transporter.request(request, requestOptions);
1496
2527
  },
2528
+ /**
2529
+ * Lists all API keys associated with your Algolia application, including their permissions and restrictions.
2530
+ *
2531
+ * 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.
2532
+ *
2533
+ * Required API Key ACLs:
2534
+ * - admin
2535
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2536
+ * @see listApiKeys for the plain version.
2537
+ */
2538
+ listApiKeysWithHTTPInfo(requestOptions) {
2539
+ const requestPath = "/1/keys";
2540
+ const headers = {};
2541
+ const queryParameters = {};
2542
+ const request = {
2543
+ method: "GET",
2544
+ path: requestPath,
2545
+ queryParameters,
2546
+ headers
2547
+ };
2548
+ return transporter.requestWithHttpInfo(request, requestOptions);
2549
+ },
1497
2550
  /**
1498
2551
  * Lists the available clusters in a multi-cluster setup.
1499
2552
  *
@@ -1515,6 +2568,30 @@ function createSearchClient({
1515
2568
  };
1516
2569
  return transporter.request(request, requestOptions);
1517
2570
  },
2571
+ /**
2572
+ * Lists the available clusters in a multi-cluster setup.
2573
+ *
2574
+ * 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.
2575
+ *
2576
+ * Required API Key ACLs:
2577
+ * - admin
2578
+ *
2579
+ * @deprecated
2580
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2581
+ * @see listClusters for the plain version.
2582
+ */
2583
+ listClustersWithHTTPInfo(requestOptions) {
2584
+ const requestPath = "/1/clusters";
2585
+ const headers = {};
2586
+ const queryParameters = {};
2587
+ const request = {
2588
+ method: "GET",
2589
+ path: requestPath,
2590
+ queryParameters,
2591
+ headers
2592
+ };
2593
+ return transporter.requestWithHttpInfo(request, requestOptions);
2594
+ },
1518
2595
  /**
1519
2596
  * 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
2597
  *
@@ -1543,6 +2620,37 @@ function createSearchClient({
1543
2620
  };
1544
2621
  return transporter.request(request, requestOptions);
1545
2622
  },
2623
+ /**
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.
2625
+ *
2626
+ * 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.
2627
+ *
2628
+ * Required API Key ACLs:
2629
+ * - listIndexes
2630
+ * @param listIndices - The listIndices object.
2631
+ * @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
2632
+ * @param listIndices.hitsPerPage - Number of hits per page.
2633
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2634
+ * @see listIndices for the plain version.
2635
+ */
2636
+ listIndicesWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
2637
+ const requestPath = "/1/indexes";
2638
+ const headers = {};
2639
+ const queryParameters = {};
2640
+ if (page !== void 0) {
2641
+ queryParameters["page"] = page.toString();
2642
+ }
2643
+ if (hitsPerPage !== void 0) {
2644
+ queryParameters["hitsPerPage"] = hitsPerPage.toString();
2645
+ }
2646
+ const request = {
2647
+ method: "GET",
2648
+ path: requestPath,
2649
+ queryParameters,
2650
+ headers
2651
+ };
2652
+ return transporter.requestWithHttpInfo(request, requestOptions);
2653
+ },
1546
2654
  /**
1547
2655
  * 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
2656
  *
@@ -1573,6 +2681,39 @@ function createSearchClient({
1573
2681
  };
1574
2682
  return transporter.request(request, requestOptions);
1575
2683
  },
2684
+ /**
2685
+ * 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.
2686
+ *
2687
+ * 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.
2688
+ *
2689
+ * Required API Key ACLs:
2690
+ * - admin
2691
+ *
2692
+ * @deprecated
2693
+ * @param listUserIds - The listUserIds object.
2694
+ * @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
2695
+ * @param listUserIds.hitsPerPage - Number of hits per page.
2696
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2697
+ * @see listUserIds for the plain version.
2698
+ */
2699
+ listUserIdsWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
2700
+ const requestPath = "/1/clusters/mapping";
2701
+ const headers = {};
2702
+ const queryParameters = {};
2703
+ if (page !== void 0) {
2704
+ queryParameters["page"] = page.toString();
2705
+ }
2706
+ if (hitsPerPage !== void 0) {
2707
+ queryParameters["hitsPerPage"] = hitsPerPage.toString();
2708
+ }
2709
+ const request = {
2710
+ method: "GET",
2711
+ path: requestPath,
2712
+ queryParameters,
2713
+ headers
2714
+ };
2715
+ return transporter.requestWithHttpInfo(request, requestOptions);
2716
+ },
1576
2717
  /**
1577
2718
  * 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
2719
  *
@@ -1596,6 +2737,32 @@ function createSearchClient({
1596
2737
  };
1597
2738
  return transporter.request(request, requestOptions);
1598
2739
  },
2740
+ /**
2741
+ * 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).
2742
+ *
2743
+ * 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.
2744
+ *
2745
+ * Required API Key ACLs:
2746
+ * - addObject
2747
+ * @param batchParams - The batchParams object.
2748
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2749
+ * @see multipleBatch for the plain version.
2750
+ */
2751
+ multipleBatchWithHTTPInfo(batchParams, requestOptions) {
2752
+ validateRequired("batchParams", "multipleBatchWithHTTPInfo", batchParams);
2753
+ validateRequired("batchParams.requests", "multipleBatchWithHTTPInfo", batchParams.requests);
2754
+ const requestPath = "/1/indexes/*/batch";
2755
+ const headers = {};
2756
+ const queryParameters = {};
2757
+ const request = {
2758
+ method: "POST",
2759
+ path: requestPath,
2760
+ queryParameters,
2761
+ headers,
2762
+ data: batchParams
2763
+ };
2764
+ return transporter.requestWithHttpInfo(request, requestOptions);
2765
+ },
1599
2766
  /**
1600
2767
  * 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
2768
  *
@@ -1619,13 +2786,80 @@ function createSearchClient({
1619
2786
  path: requestPath,
1620
2787
  queryParameters,
1621
2788
  headers,
1622
- data: operationIndexParams
2789
+ data: operationIndexParams
2790
+ };
2791
+ return transporter.request(request, requestOptions);
2792
+ },
2793
+ /**
2794
+ * 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).
2795
+ *
2796
+ * 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.
2797
+ *
2798
+ * Required API Key ACLs:
2799
+ * - addObject
2800
+ * @param operationIndex - The operationIndex object.
2801
+ * @param operationIndex.indexName - Name of the index on which to perform the operation.
2802
+ * @param operationIndex.operationIndexParams - The operationIndexParams object.
2803
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2804
+ * @see operationIndex for the plain version.
2805
+ */
2806
+ operationIndexWithHTTPInfo({ indexName, operationIndexParams }, requestOptions) {
2807
+ validateRequired("indexName", "operationIndexWithHTTPInfo", indexName);
2808
+ validateRequired("operationIndexParams", "operationIndexWithHTTPInfo", operationIndexParams);
2809
+ validateRequired("operationIndexParams.operation", "operationIndexWithHTTPInfo", operationIndexParams.operation);
2810
+ validateRequired(
2811
+ "operationIndexParams.destination",
2812
+ "operationIndexWithHTTPInfo",
2813
+ operationIndexParams.destination
2814
+ );
2815
+ const requestPath = "/1/indexes/{indexName}/operation".replace("{indexName}", encodeURIComponent(indexName));
2816
+ const headers = {};
2817
+ const queryParameters = {};
2818
+ const request = {
2819
+ method: "POST",
2820
+ path: requestPath,
2821
+ queryParameters,
2822
+ headers,
2823
+ data: operationIndexParams
2824
+ };
2825
+ return transporter.requestWithHttpInfo(request, requestOptions);
2826
+ },
2827
+ /**
2828
+ * 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).
2829
+ *
2830
+ * Required API Key ACLs:
2831
+ * - addObject
2832
+ * @param partialUpdateObject - The partialUpdateObject object.
2833
+ * @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
2834
+ * @param partialUpdateObject.objectID - Unique record identifier.
2835
+ * @param partialUpdateObject.attributesToUpdate - Attributes with their values.
2836
+ * @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
2837
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2838
+ */
2839
+ partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
2840
+ validateRequired("indexName", "partialUpdateObject", indexName);
2841
+ validateRequired("objectID", "partialUpdateObject", objectID);
2842
+ validateRequired("attributesToUpdate", "partialUpdateObject", attributesToUpdate);
2843
+ const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
2844
+ const headers = {};
2845
+ const queryParameters = {};
2846
+ if (createIfNotExists !== void 0) {
2847
+ queryParameters["createIfNotExists"] = createIfNotExists.toString();
2848
+ }
2849
+ const request = {
2850
+ method: "POST",
2851
+ path: requestPath,
2852
+ queryParameters,
2853
+ headers,
2854
+ data: attributesToUpdate
1623
2855
  };
1624
2856
  return transporter.request(request, requestOptions);
1625
2857
  },
1626
2858
  /**
1627
2859
  * 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
2860
  *
2861
+ * 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.
2862
+ *
1629
2863
  * Required API Key ACLs:
1630
2864
  * - addObject
1631
2865
  * @param partialUpdateObject - The partialUpdateObject object.
@@ -1634,11 +2868,12 @@ function createSearchClient({
1634
2868
  * @param partialUpdateObject.attributesToUpdate - Attributes with their values.
1635
2869
  * @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
1636
2870
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2871
+ * @see partialUpdateObject for the plain version.
1637
2872
  */
1638
- partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
1639
- validateRequired("indexName", "partialUpdateObject", indexName);
1640
- validateRequired("objectID", "partialUpdateObject", objectID);
1641
- validateRequired("attributesToUpdate", "partialUpdateObject", attributesToUpdate);
2873
+ partialUpdateObjectWithHTTPInfo({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
2874
+ validateRequired("indexName", "partialUpdateObjectWithHTTPInfo", indexName);
2875
+ validateRequired("objectID", "partialUpdateObjectWithHTTPInfo", objectID);
2876
+ validateRequired("attributesToUpdate", "partialUpdateObjectWithHTTPInfo", attributesToUpdate);
1642
2877
  const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
1643
2878
  const headers = {};
1644
2879
  const queryParameters = {};
@@ -1652,7 +2887,7 @@ function createSearchClient({
1652
2887
  headers,
1653
2888
  data: attributesToUpdate
1654
2889
  };
1655
- return transporter.request(request, requestOptions);
2890
+ return transporter.requestWithHttpInfo(request, requestOptions);
1656
2891
  },
1657
2892
  /**
1658
2893
  * Deletes a user ID and its associated data from the clusters.
@@ -1678,6 +2913,33 @@ function createSearchClient({
1678
2913
  };
1679
2914
  return transporter.request(request, requestOptions);
1680
2915
  },
2916
+ /**
2917
+ * Deletes a user ID and its associated data from the clusters.
2918
+ *
2919
+ * 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.
2920
+ *
2921
+ * Required API Key ACLs:
2922
+ * - admin
2923
+ *
2924
+ * @deprecated
2925
+ * @param removeUserId - The removeUserId object.
2926
+ * @param removeUserId.userID - Unique identifier of the user who makes the search request.
2927
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2928
+ * @see removeUserId for the plain version.
2929
+ */
2930
+ removeUserIdWithHTTPInfo({ userID }, requestOptions) {
2931
+ validateRequired("userID", "removeUserIdWithHTTPInfo", userID);
2932
+ const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
2933
+ const headers = {};
2934
+ const queryParameters = {};
2935
+ const request = {
2936
+ method: "DELETE",
2937
+ path: requestPath,
2938
+ queryParameters,
2939
+ headers
2940
+ };
2941
+ return transporter.requestWithHttpInfo(request, requestOptions);
2942
+ },
1681
2943
  /**
1682
2944
  * Replaces the list of allowed sources.
1683
2945
  *
@@ -1701,6 +2963,32 @@ function createSearchClient({
1701
2963
  };
1702
2964
  return transporter.request(request, requestOptions);
1703
2965
  },
2966
+ /**
2967
+ * Replaces the list of allowed sources.
2968
+ *
2969
+ * 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.
2970
+ *
2971
+ * Required API Key ACLs:
2972
+ * - admin
2973
+ * @param replaceSources - The replaceSources object.
2974
+ * @param replaceSources.source - Allowed sources.
2975
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2976
+ * @see replaceSources for the plain version.
2977
+ */
2978
+ replaceSourcesWithHTTPInfo({ source }, requestOptions) {
2979
+ validateRequired("source", "replaceSourcesWithHTTPInfo", source);
2980
+ const requestPath = "/1/security/sources";
2981
+ const headers = {};
2982
+ const queryParameters = {};
2983
+ const request = {
2984
+ method: "PUT",
2985
+ path: requestPath,
2986
+ queryParameters,
2987
+ headers,
2988
+ data: source
2989
+ };
2990
+ return transporter.requestWithHttpInfo(request, requestOptions);
2991
+ },
1704
2992
  /**
1705
2993
  * 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
2994
  *
@@ -1723,6 +3011,31 @@ function createSearchClient({
1723
3011
  };
1724
3012
  return transporter.request(request, requestOptions);
1725
3013
  },
3014
+ /**
3015
+ * 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.
3016
+ *
3017
+ * 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.
3018
+ *
3019
+ * Required API Key ACLs:
3020
+ * - admin
3021
+ * @param restoreApiKey - The restoreApiKey object.
3022
+ * @param restoreApiKey.key - API key.
3023
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3024
+ * @see restoreApiKey for the plain version.
3025
+ */
3026
+ restoreApiKeyWithHTTPInfo({ key }, requestOptions) {
3027
+ validateRequired("key", "restoreApiKeyWithHTTPInfo", key);
3028
+ const requestPath = "/1/keys/{key}/restore".replace("{key}", encodeURIComponent(key));
3029
+ const headers = {};
3030
+ const queryParameters = {};
3031
+ const request = {
3032
+ method: "POST",
3033
+ path: requestPath,
3034
+ queryParameters,
3035
+ headers
3036
+ };
3037
+ return transporter.requestWithHttpInfo(request, requestOptions);
3038
+ },
1726
3039
  /**
1727
3040
  * 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
3041
  *
@@ -1748,6 +3061,34 @@ function createSearchClient({
1748
3061
  };
1749
3062
  return transporter.request(request, requestOptions);
1750
3063
  },
3064
+ /**
3065
+ * 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).
3066
+ *
3067
+ * 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.
3068
+ *
3069
+ * Required API Key ACLs:
3070
+ * - addObject
3071
+ * @param saveObject - The saveObject object.
3072
+ * @param saveObject.indexName - Name of the index on which to perform the operation.
3073
+ * @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
3074
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3075
+ * @see saveObject for the plain version.
3076
+ */
3077
+ saveObjectWithHTTPInfo({ indexName, body }, requestOptions) {
3078
+ validateRequired("indexName", "saveObjectWithHTTPInfo", indexName);
3079
+ validateRequired("body", "saveObjectWithHTTPInfo", body);
3080
+ const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
3081
+ const headers = {};
3082
+ const queryParameters = {};
3083
+ const request = {
3084
+ method: "POST",
3085
+ path: requestPath,
3086
+ queryParameters,
3087
+ headers,
3088
+ data: body
3089
+ };
3090
+ return transporter.requestWithHttpInfo(request, requestOptions);
3091
+ },
1751
3092
  /**
1752
3093
  * 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
3094
  *
@@ -1781,6 +3122,42 @@ function createSearchClient({
1781
3122
  };
1782
3123
  return transporter.request(request, requestOptions);
1783
3124
  },
3125
+ /**
3126
+ * 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).
3127
+ *
3128
+ * 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.
3129
+ *
3130
+ * Required API Key ACLs:
3131
+ * - editSettings
3132
+ * @param saveRule - The saveRule object.
3133
+ * @param saveRule.indexName - Name of the index on which to perform the operation.
3134
+ * @param saveRule.objectID - Unique identifier of a rule object.
3135
+ * @param saveRule.rule - The rule object.
3136
+ * @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
3137
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3138
+ * @see saveRule for the plain version.
3139
+ */
3140
+ saveRuleWithHTTPInfo({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
3141
+ validateRequired("indexName", "saveRuleWithHTTPInfo", indexName);
3142
+ validateRequired("objectID", "saveRuleWithHTTPInfo", objectID);
3143
+ validateRequired("rule", "saveRuleWithHTTPInfo", rule);
3144
+ validateRequired("rule.objectID", "saveRuleWithHTTPInfo", rule.objectID);
3145
+ validateRequired("rule.consequence", "saveRuleWithHTTPInfo", rule.consequence);
3146
+ const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
3147
+ const headers = {};
3148
+ const queryParameters = {};
3149
+ if (forwardToReplicas !== void 0) {
3150
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
3151
+ }
3152
+ const request = {
3153
+ method: "PUT",
3154
+ path: requestPath,
3155
+ queryParameters,
3156
+ headers,
3157
+ data: rule
3158
+ };
3159
+ return transporter.requestWithHttpInfo(request, requestOptions);
3160
+ },
1784
3161
  /**
1785
3162
  * 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
3163
  *
@@ -1814,6 +3191,42 @@ function createSearchClient({
1814
3191
  };
1815
3192
  return transporter.request(request, requestOptions);
1816
3193
  },
3194
+ /**
3195
+ * 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).
3196
+ *
3197
+ * 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.
3198
+ *
3199
+ * Required API Key ACLs:
3200
+ * - editSettings
3201
+ * @param saveRules - The saveRules object.
3202
+ * @param saveRules.indexName - Name of the index on which to perform the operation.
3203
+ * @param saveRules.rules - The rules object.
3204
+ * @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
3205
+ * @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
3206
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3207
+ * @see saveRules for the plain version.
3208
+ */
3209
+ saveRulesWithHTTPInfo({ indexName, rules, forwardToReplicas, clearExistingRules }, requestOptions) {
3210
+ validateRequired("indexName", "saveRulesWithHTTPInfo", indexName);
3211
+ validateRequired("rules", "saveRulesWithHTTPInfo", rules);
3212
+ const requestPath = "/1/indexes/{indexName}/rules/batch".replace("{indexName}", encodeURIComponent(indexName));
3213
+ const headers = {};
3214
+ const queryParameters = {};
3215
+ if (forwardToReplicas !== void 0) {
3216
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
3217
+ }
3218
+ if (clearExistingRules !== void 0) {
3219
+ queryParameters["clearExistingRules"] = clearExistingRules.toString();
3220
+ }
3221
+ const request = {
3222
+ method: "POST",
3223
+ path: requestPath,
3224
+ queryParameters,
3225
+ headers,
3226
+ data: rules
3227
+ };
3228
+ return transporter.requestWithHttpInfo(request, requestOptions);
3229
+ },
1817
3230
  /**
1818
3231
  * 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
3232
  *
@@ -1847,6 +3260,42 @@ function createSearchClient({
1847
3260
  };
1848
3261
  return transporter.request(request, requestOptions);
1849
3262
  },
3263
+ /**
3264
+ * 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).
3265
+ *
3266
+ * 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.
3267
+ *
3268
+ * Required API Key ACLs:
3269
+ * - editSettings
3270
+ * @param saveSynonym - The saveSynonym object.
3271
+ * @param saveSynonym.indexName - Name of the index on which to perform the operation.
3272
+ * @param saveSynonym.objectID - Unique identifier of a synonym object.
3273
+ * @param saveSynonym.synonymHit - The synonymHit object.
3274
+ * @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
3275
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3276
+ * @see saveSynonym for the plain version.
3277
+ */
3278
+ saveSynonymWithHTTPInfo({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
3279
+ validateRequired("indexName", "saveSynonymWithHTTPInfo", indexName);
3280
+ validateRequired("objectID", "saveSynonymWithHTTPInfo", objectID);
3281
+ validateRequired("synonymHit", "saveSynonymWithHTTPInfo", synonymHit);
3282
+ validateRequired("synonymHit.objectID", "saveSynonymWithHTTPInfo", synonymHit.objectID);
3283
+ validateRequired("synonymHit.type", "saveSynonymWithHTTPInfo", synonymHit.type);
3284
+ const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
3285
+ const headers = {};
3286
+ const queryParameters = {};
3287
+ if (forwardToReplicas !== void 0) {
3288
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
3289
+ }
3290
+ const request = {
3291
+ method: "PUT",
3292
+ path: requestPath,
3293
+ queryParameters,
3294
+ headers,
3295
+ data: synonymHit
3296
+ };
3297
+ return transporter.requestWithHttpInfo(request, requestOptions);
3298
+ },
1850
3299
  /**
1851
3300
  * 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
3301
  *
@@ -1865,30 +3314,115 @@ function createSearchClient({
1865
3314
  const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
1866
3315
  const headers = {};
1867
3316
  const queryParameters = {};
1868
- if (forwardToReplicas !== void 0) {
1869
- queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
1870
- }
1871
- if (replaceExistingSynonyms !== void 0) {
1872
- queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
1873
- }
3317
+ if (forwardToReplicas !== void 0) {
3318
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
3319
+ }
3320
+ if (replaceExistingSynonyms !== void 0) {
3321
+ queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
3322
+ }
3323
+ const request = {
3324
+ method: "POST",
3325
+ path: requestPath,
3326
+ queryParameters,
3327
+ headers,
3328
+ data: synonymHit
3329
+ };
3330
+ return transporter.request(request, requestOptions);
3331
+ },
3332
+ /**
3333
+ * 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).
3334
+ *
3335
+ * 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.
3336
+ *
3337
+ * Required API Key ACLs:
3338
+ * - editSettings
3339
+ * @param saveSynonyms - The saveSynonyms object.
3340
+ * @param saveSynonyms.indexName - Name of the index on which to perform the operation.
3341
+ * @param saveSynonyms.synonymHit - The synonymHit object.
3342
+ * @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
3343
+ * @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
3344
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3345
+ * @see saveSynonyms for the plain version.
3346
+ */
3347
+ saveSynonymsWithHTTPInfo({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }, requestOptions) {
3348
+ validateRequired("indexName", "saveSynonymsWithHTTPInfo", indexName);
3349
+ validateRequired("synonymHit", "saveSynonymsWithHTTPInfo", synonymHit);
3350
+ const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
3351
+ const headers = {};
3352
+ const queryParameters = {};
3353
+ if (forwardToReplicas !== void 0) {
3354
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
3355
+ }
3356
+ if (replaceExistingSynonyms !== void 0) {
3357
+ queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
3358
+ }
3359
+ const request = {
3360
+ method: "POST",
3361
+ path: requestPath,
3362
+ queryParameters,
3363
+ headers,
3364
+ data: synonymHit
3365
+ };
3366
+ return transporter.requestWithHttpInfo(request, requestOptions);
3367
+ },
3368
+ /**
3369
+ * 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.
3370
+ *
3371
+ * Required API Key ACLs:
3372
+ * - search
3373
+ * @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
3374
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3375
+ */
3376
+ search(searchMethodParams, requestOptions) {
3377
+ if (searchMethodParams && Array.isArray(searchMethodParams)) {
3378
+ const newSignatureRequest = {
3379
+ requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
3380
+ if (legacyRequest.type === "facet") {
3381
+ return {
3382
+ ...legacyRequest,
3383
+ ...params,
3384
+ type: "facet"
3385
+ };
3386
+ }
3387
+ return {
3388
+ ...legacyRequest,
3389
+ ...params,
3390
+ facet: void 0,
3391
+ maxFacetHits: void 0,
3392
+ facetQuery: void 0
3393
+ };
3394
+ })
3395
+ };
3396
+ searchMethodParams = newSignatureRequest;
3397
+ }
3398
+ validateRequired("searchMethodParams", "search", searchMethodParams);
3399
+ validateRequired("searchMethodParams.requests", "search", searchMethodParams.requests);
3400
+ const requestPath = "/1/indexes/*/queries";
3401
+ const headers = {};
3402
+ const queryParameters = {};
1874
3403
  const request = {
1875
3404
  method: "POST",
1876
3405
  path: requestPath,
1877
3406
  queryParameters,
1878
3407
  headers,
1879
- data: synonymHit
3408
+ data: searchMethodParams,
3409
+ useReadTransporter: true,
3410
+ cacheable: true
1880
3411
  };
1881
3412
  return transporter.request(request, requestOptions);
1882
3413
  },
1883
3414
  /**
1884
3415
  * 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
3416
  *
3417
+ * 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.
3418
+ *
1886
3419
  * Required API Key ACLs:
1887
3420
  * - search
1888
3421
  * @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
1889
3422
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3423
+ * @see search for the plain version.
1890
3424
  */
1891
- search(searchMethodParams, requestOptions) {
3425
+ searchWithHTTPInfo(searchMethodParams, requestOptions) {
1892
3426
  if (searchMethodParams && Array.isArray(searchMethodParams)) {
1893
3427
  const newSignatureRequest = {
1894
3428
  requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
@@ -1910,8 +3444,8 @@ function createSearchClient({
1910
3444
  };
1911
3445
  searchMethodParams = newSignatureRequest;
1912
3446
  }
1913
- validateRequired("searchMethodParams", "search", searchMethodParams);
1914
- validateRequired("searchMethodParams.requests", "search", searchMethodParams.requests);
3447
+ validateRequired("searchMethodParams", "searchWithHTTPInfo", searchMethodParams);
3448
+ validateRequired("searchMethodParams.requests", "searchWithHTTPInfo", searchMethodParams.requests);
1915
3449
  const requestPath = "/1/indexes/*/queries";
1916
3450
  const headers = {};
1917
3451
  const queryParameters = {};
@@ -1924,7 +3458,7 @@ function createSearchClient({
1924
3458
  useReadTransporter: true,
1925
3459
  cacheable: true
1926
3460
  };
1927
- return transporter.request(request, requestOptions);
3461
+ return transporter.requestWithHttpInfo(request, requestOptions);
1928
3462
  },
1929
3463
  /**
1930
3464
  * Searches for standard and custom dictionary entries.
@@ -1961,6 +3495,48 @@ function createSearchClient({
1961
3495
  };
1962
3496
  return transporter.request(request, requestOptions);
1963
3497
  },
3498
+ /**
3499
+ * Searches for standard and custom dictionary entries.
3500
+ *
3501
+ * 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.
3502
+ *
3503
+ * Required API Key ACLs:
3504
+ * - settings
3505
+ * @param searchDictionaryEntries - The searchDictionaryEntries object.
3506
+ * @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
3507
+ * @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
3508
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3509
+ * @see searchDictionaryEntries for the plain version.
3510
+ */
3511
+ searchDictionaryEntriesWithHTTPInfo({ dictionaryName, searchDictionaryEntriesParams }, requestOptions) {
3512
+ validateRequired("dictionaryName", "searchDictionaryEntriesWithHTTPInfo", dictionaryName);
3513
+ validateRequired(
3514
+ "searchDictionaryEntriesParams",
3515
+ "searchDictionaryEntriesWithHTTPInfo",
3516
+ searchDictionaryEntriesParams
3517
+ );
3518
+ validateRequired(
3519
+ "searchDictionaryEntriesParams.query",
3520
+ "searchDictionaryEntriesWithHTTPInfo",
3521
+ searchDictionaryEntriesParams.query
3522
+ );
3523
+ const requestPath = "/1/dictionaries/{dictionaryName}/search".replace(
3524
+ "{dictionaryName}",
3525
+ encodeURIComponent(dictionaryName)
3526
+ );
3527
+ const headers = {};
3528
+ const queryParameters = {};
3529
+ const request = {
3530
+ method: "POST",
3531
+ path: requestPath,
3532
+ queryParameters,
3533
+ headers,
3534
+ data: searchDictionaryEntriesParams,
3535
+ useReadTransporter: true,
3536
+ cacheable: true
3537
+ };
3538
+ return transporter.requestWithHttpInfo(request, requestOptions);
3539
+ },
1964
3540
  /**
1965
3541
  * 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
3542
  *
@@ -1989,6 +3565,37 @@ function createSearchClient({
1989
3565
  };
1990
3566
  return transporter.request(request, requestOptions);
1991
3567
  },
3568
+ /**
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**.
3570
+ *
3571
+ * 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.
3572
+ *
3573
+ * Required API Key ACLs:
3574
+ * - search
3575
+ * @param searchForFacetValues - The searchForFacetValues object.
3576
+ * @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
3577
+ * @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.
3578
+ * @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
3579
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3580
+ * @see searchForFacetValues for the plain version.
3581
+ */
3582
+ searchForFacetValuesWithHTTPInfo({ indexName, facetName, searchForFacetValuesRequest }, requestOptions) {
3583
+ validateRequired("indexName", "searchForFacetValuesWithHTTPInfo", indexName);
3584
+ validateRequired("facetName", "searchForFacetValuesWithHTTPInfo", facetName);
3585
+ const requestPath = "/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}", encodeURIComponent(indexName)).replace("{facetName}", encodeURIComponent(facetName));
3586
+ const headers = {};
3587
+ const queryParameters = {};
3588
+ const request = {
3589
+ method: "POST",
3590
+ path: requestPath,
3591
+ queryParameters,
3592
+ headers,
3593
+ data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},
3594
+ useReadTransporter: true,
3595
+ cacheable: true
3596
+ };
3597
+ return transporter.requestWithHttpInfo(request, requestOptions);
3598
+ },
1992
3599
  /**
1993
3600
  * Searches for rules in your index.
1994
3601
  *
@@ -2015,6 +3622,35 @@ function createSearchClient({
2015
3622
  };
2016
3623
  return transporter.request(request, requestOptions);
2017
3624
  },
3625
+ /**
3626
+ * Searches for rules in your index.
3627
+ *
3628
+ * 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.
3629
+ *
3630
+ * Required API Key ACLs:
3631
+ * - settings
3632
+ * @param searchRules - The searchRules object.
3633
+ * @param searchRules.indexName - Name of the index on which to perform the operation.
3634
+ * @param searchRules.searchRulesParams - The searchRulesParams object.
3635
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3636
+ * @see searchRules for the plain version.
3637
+ */
3638
+ searchRulesWithHTTPInfo({ indexName, searchRulesParams }, requestOptions) {
3639
+ validateRequired("indexName", "searchRulesWithHTTPInfo", indexName);
3640
+ const requestPath = "/1/indexes/{indexName}/rules/search".replace("{indexName}", encodeURIComponent(indexName));
3641
+ const headers = {};
3642
+ const queryParameters = {};
3643
+ const request = {
3644
+ method: "POST",
3645
+ path: requestPath,
3646
+ queryParameters,
3647
+ headers,
3648
+ data: searchRulesParams ? searchRulesParams : {},
3649
+ useReadTransporter: true,
3650
+ cacheable: true
3651
+ };
3652
+ return transporter.requestWithHttpInfo(request, requestOptions);
3653
+ },
2018
3654
  /**
2019
3655
  * 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
3656
  *
@@ -2041,6 +3677,35 @@ function createSearchClient({
2041
3677
  };
2042
3678
  return transporter.request(request, requestOptions);
2043
3679
  },
3680
+ /**
3681
+ * 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.
3682
+ *
3683
+ * 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.
3684
+ *
3685
+ * Required API Key ACLs:
3686
+ * - search
3687
+ * @param searchSingleIndex - The searchSingleIndex object.
3688
+ * @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
3689
+ * @param searchSingleIndex.searchParams - The searchParams object.
3690
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3691
+ * @see searchSingleIndex for the plain version.
3692
+ */
3693
+ searchSingleIndexWithHTTPInfo({ indexName, searchParams }, requestOptions) {
3694
+ validateRequired("indexName", "searchSingleIndexWithHTTPInfo", indexName);
3695
+ const requestPath = "/1/indexes/{indexName}/query".replace("{indexName}", encodeURIComponent(indexName));
3696
+ const headers = {};
3697
+ const queryParameters = {};
3698
+ const request = {
3699
+ method: "POST",
3700
+ path: requestPath,
3701
+ queryParameters,
3702
+ headers,
3703
+ data: searchParams ? searchParams : {},
3704
+ useReadTransporter: true,
3705
+ cacheable: true
3706
+ };
3707
+ return transporter.requestWithHttpInfo(request, requestOptions);
3708
+ },
2044
3709
  /**
2045
3710
  * Searches for synonyms in your index.
2046
3711
  *
@@ -2070,6 +3735,38 @@ function createSearchClient({
2070
3735
  };
2071
3736
  return transporter.request(request, requestOptions);
2072
3737
  },
3738
+ /**
3739
+ * Searches for synonyms in your index.
3740
+ *
3741
+ * 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.
3742
+ *
3743
+ * Required API Key ACLs:
3744
+ * - settings
3745
+ * @param searchSynonyms - The searchSynonyms object.
3746
+ * @param searchSynonyms.indexName - Name of the index on which to perform the operation.
3747
+ * @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
3748
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3749
+ * @see searchSynonyms for the plain version.
3750
+ */
3751
+ searchSynonymsWithHTTPInfo({ indexName, searchSynonymsParams }, requestOptions) {
3752
+ validateRequired("indexName", "searchSynonymsWithHTTPInfo", indexName);
3753
+ const requestPath = "/1/indexes/{indexName}/synonyms/search".replace(
3754
+ "{indexName}",
3755
+ encodeURIComponent(indexName)
3756
+ );
3757
+ const headers = {};
3758
+ const queryParameters = {};
3759
+ const request = {
3760
+ method: "POST",
3761
+ path: requestPath,
3762
+ queryParameters,
3763
+ headers,
3764
+ data: searchSynonymsParams ? searchSynonymsParams : {},
3765
+ useReadTransporter: true,
3766
+ cacheable: true
3767
+ };
3768
+ return transporter.requestWithHttpInfo(request, requestOptions);
3769
+ },
2073
3770
  /**
2074
3771
  * 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
3772
  *
@@ -2097,6 +3794,36 @@ function createSearchClient({
2097
3794
  };
2098
3795
  return transporter.request(request, requestOptions);
2099
3796
  },
3797
+ /**
3798
+ * 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).
3799
+ *
3800
+ * 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.
3801
+ *
3802
+ * Required API Key ACLs:
3803
+ * - admin
3804
+ *
3805
+ * @deprecated
3806
+ * @param searchUserIdsParams - The searchUserIdsParams object.
3807
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3808
+ * @see searchUserIds for the plain version.
3809
+ */
3810
+ searchUserIdsWithHTTPInfo(searchUserIdsParams, requestOptions) {
3811
+ validateRequired("searchUserIdsParams", "searchUserIdsWithHTTPInfo", searchUserIdsParams);
3812
+ validateRequired("searchUserIdsParams.query", "searchUserIdsWithHTTPInfo", searchUserIdsParams.query);
3813
+ const requestPath = "/1/clusters/mapping/search";
3814
+ const headers = {};
3815
+ const queryParameters = {};
3816
+ const request = {
3817
+ method: "POST",
3818
+ path: requestPath,
3819
+ queryParameters,
3820
+ headers,
3821
+ data: searchUserIdsParams,
3822
+ useReadTransporter: true,
3823
+ cacheable: true
3824
+ };
3825
+ return transporter.requestWithHttpInfo(request, requestOptions);
3826
+ },
2100
3827
  /**
2101
3828
  * Turns standard stop word dictionary entries on or off for a given language.
2102
3829
  *
@@ -2124,6 +3851,36 @@ function createSearchClient({
2124
3851
  };
2125
3852
  return transporter.request(request, requestOptions);
2126
3853
  },
3854
+ /**
3855
+ * Turns standard stop word dictionary entries on or off for a given language.
3856
+ *
3857
+ * 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.
3858
+ *
3859
+ * Required API Key ACLs:
3860
+ * - editSettings
3861
+ * @param dictionarySettingsParams - The dictionarySettingsParams object.
3862
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3863
+ * @see setDictionarySettings for the plain version.
3864
+ */
3865
+ setDictionarySettingsWithHTTPInfo(dictionarySettingsParams, requestOptions) {
3866
+ validateRequired("dictionarySettingsParams", "setDictionarySettingsWithHTTPInfo", dictionarySettingsParams);
3867
+ validateRequired(
3868
+ "dictionarySettingsParams.disableStandardEntries",
3869
+ "setDictionarySettingsWithHTTPInfo",
3870
+ dictionarySettingsParams.disableStandardEntries
3871
+ );
3872
+ const requestPath = "/1/dictionaries/*/settings";
3873
+ const headers = {};
3874
+ const queryParameters = {};
3875
+ const request = {
3876
+ method: "PUT",
3877
+ path: requestPath,
3878
+ queryParameters,
3879
+ headers,
3880
+ data: dictionarySettingsParams
3881
+ };
3882
+ return transporter.requestWithHttpInfo(request, requestOptions);
3883
+ },
2127
3884
  /**
2128
3885
  * 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
3886
  *
@@ -2153,6 +3910,38 @@ function createSearchClient({
2153
3910
  };
2154
3911
  return transporter.request(request, requestOptions);
2155
3912
  },
3913
+ /**
3914
+ * 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.
3915
+ *
3916
+ * 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.
3917
+ *
3918
+ * Required API Key ACLs:
3919
+ * - editSettings
3920
+ * @param setSettings - The setSettings object.
3921
+ * @param setSettings.indexName - Name of the index on which to perform the operation.
3922
+ * @param setSettings.indexSettings - The indexSettings object.
3923
+ * @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
3924
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3925
+ * @see setSettings for the plain version.
3926
+ */
3927
+ setSettingsWithHTTPInfo({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
3928
+ validateRequired("indexName", "setSettingsWithHTTPInfo", indexName);
3929
+ validateRequired("indexSettings", "setSettingsWithHTTPInfo", indexSettings);
3930
+ const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
3931
+ const headers = {};
3932
+ const queryParameters = {};
3933
+ if (forwardToReplicas !== void 0) {
3934
+ queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
3935
+ }
3936
+ const request = {
3937
+ method: "PUT",
3938
+ path: requestPath,
3939
+ queryParameters,
3940
+ headers,
3941
+ data: indexSettings
3942
+ };
3943
+ return transporter.requestWithHttpInfo(request, requestOptions);
3944
+ },
2156
3945
  /**
2157
3946
  * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
2158
3947
  *
@@ -2178,6 +3967,35 @@ function createSearchClient({
2178
3967
  data: apiKey
2179
3968
  };
2180
3969
  return transporter.request(request, requestOptions);
3970
+ },
3971
+ /**
3972
+ * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
3973
+ *
3974
+ * 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.
3975
+ *
3976
+ * Required API Key ACLs:
3977
+ * - admin
3978
+ * @param updateApiKey - The updateApiKey object.
3979
+ * @param updateApiKey.key - API key.
3980
+ * @param updateApiKey.apiKey - The apiKey object.
3981
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3982
+ * @see updateApiKey for the plain version.
3983
+ */
3984
+ updateApiKeyWithHTTPInfo({ key, apiKey }, requestOptions) {
3985
+ validateRequired("key", "updateApiKeyWithHTTPInfo", key);
3986
+ validateRequired("apiKey", "updateApiKeyWithHTTPInfo", apiKey);
3987
+ validateRequired("apiKey.acl", "updateApiKeyWithHTTPInfo", apiKey.acl);
3988
+ const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
3989
+ const headers = {};
3990
+ const queryParameters = {};
3991
+ const request = {
3992
+ method: "PUT",
3993
+ path: requestPath,
3994
+ queryParameters,
3995
+ headers,
3996
+ data: apiKey
3997
+ };
3998
+ return transporter.requestWithHttpInfo(request, requestOptions);
2181
3999
  }
2182
4000
  };
2183
4001
  }