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