@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.
- package/README.md +4 -4
- package/dist/browser.d.ts +858 -5
- package/dist/builds/browser.js +1909 -91
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +4 -4
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +6 -6
- package/dist/builds/fetch.js +1909 -91
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +1909 -91
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +1909 -91
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +1909 -91
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +858 -5
- package/dist/node.d.cts +858 -5
- package/dist/node.d.ts +858 -5
- package/dist/src/searchClient.cjs +1909 -91
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +1911 -96
- package/dist/src/searchClient.js.map +1 -1
- package/dist/worker.d.ts +858 -5
- package/package.json +8 -8
package/dist/builds/worker.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
shuffle,
|
|
14
14
|
validateRequired
|
|
15
15
|
} from "@algolia/client-common";
|
|
16
|
-
var apiClientVersion = "5.
|
|
16
|
+
var apiClientVersion = "5.56.0";
|
|
17
17
|
function getDefaultHosts(appId) {
|
|
18
18
|
return [
|
|
19
19
|
{
|
|
@@ -580,6 +580,32 @@ function createSearchClient({
|
|
|
580
580
|
};
|
|
581
581
|
return transporter.request(request, requestOptions);
|
|
582
582
|
},
|
|
583
|
+
/**
|
|
584
|
+
* Creates a new API key with specific permissions and restrictions.
|
|
585
|
+
*
|
|
586
|
+
* 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.
|
|
587
|
+
*
|
|
588
|
+
* Required API Key ACLs:
|
|
589
|
+
* - admin
|
|
590
|
+
* @param apiKey - The apiKey object.
|
|
591
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
592
|
+
* @see addApiKey for the plain version.
|
|
593
|
+
*/
|
|
594
|
+
addApiKeyWithHTTPInfo(apiKey, requestOptions) {
|
|
595
|
+
validateRequired("apiKey", "addApiKeyWithHTTPInfo", apiKey);
|
|
596
|
+
validateRequired("apiKey.acl", "addApiKeyWithHTTPInfo", apiKey.acl);
|
|
597
|
+
const requestPath = "/1/keys";
|
|
598
|
+
const headers = {};
|
|
599
|
+
const queryParameters = {};
|
|
600
|
+
const request = {
|
|
601
|
+
method: "POST",
|
|
602
|
+
path: requestPath,
|
|
603
|
+
queryParameters,
|
|
604
|
+
headers,
|
|
605
|
+
data: apiKey
|
|
606
|
+
};
|
|
607
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
608
|
+
},
|
|
583
609
|
/**
|
|
584
610
|
* 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).
|
|
585
611
|
*
|
|
@@ -607,6 +633,36 @@ function createSearchClient({
|
|
|
607
633
|
};
|
|
608
634
|
return transporter.request(request, requestOptions);
|
|
609
635
|
},
|
|
636
|
+
/**
|
|
637
|
+
* 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).
|
|
638
|
+
*
|
|
639
|
+
* 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.
|
|
640
|
+
*
|
|
641
|
+
* Required API Key ACLs:
|
|
642
|
+
* - addObject
|
|
643
|
+
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
644
|
+
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
645
|
+
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
646
|
+
* @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
647
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
648
|
+
* @see addOrUpdateObject for the plain version.
|
|
649
|
+
*/
|
|
650
|
+
addOrUpdateObjectWithHTTPInfo({ indexName, objectID, body }, requestOptions) {
|
|
651
|
+
validateRequired("indexName", "addOrUpdateObjectWithHTTPInfo", indexName);
|
|
652
|
+
validateRequired("objectID", "addOrUpdateObjectWithHTTPInfo", objectID);
|
|
653
|
+
validateRequired("body", "addOrUpdateObjectWithHTTPInfo", body);
|
|
654
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
655
|
+
const headers = {};
|
|
656
|
+
const queryParameters = {};
|
|
657
|
+
const request = {
|
|
658
|
+
method: "PUT",
|
|
659
|
+
path: requestPath,
|
|
660
|
+
queryParameters,
|
|
661
|
+
headers,
|
|
662
|
+
data: body
|
|
663
|
+
};
|
|
664
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
665
|
+
},
|
|
610
666
|
/**
|
|
611
667
|
* Adds a source to the list of allowed sources.
|
|
612
668
|
*
|
|
@@ -630,6 +686,32 @@ function createSearchClient({
|
|
|
630
686
|
};
|
|
631
687
|
return transporter.request(request, requestOptions);
|
|
632
688
|
},
|
|
689
|
+
/**
|
|
690
|
+
* Adds a source to the list of allowed sources.
|
|
691
|
+
*
|
|
692
|
+
* 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.
|
|
693
|
+
*
|
|
694
|
+
* Required API Key ACLs:
|
|
695
|
+
* - admin
|
|
696
|
+
* @param source - Source to add.
|
|
697
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
698
|
+
* @see appendSource for the plain version.
|
|
699
|
+
*/
|
|
700
|
+
appendSourceWithHTTPInfo(source, requestOptions) {
|
|
701
|
+
validateRequired("source", "appendSourceWithHTTPInfo", source);
|
|
702
|
+
validateRequired("source.source", "appendSourceWithHTTPInfo", source.source);
|
|
703
|
+
const requestPath = "/1/security/sources/append";
|
|
704
|
+
const headers = {};
|
|
705
|
+
const queryParameters = {};
|
|
706
|
+
const request = {
|
|
707
|
+
method: "POST",
|
|
708
|
+
path: requestPath,
|
|
709
|
+
queryParameters,
|
|
710
|
+
headers,
|
|
711
|
+
data: source
|
|
712
|
+
};
|
|
713
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
714
|
+
},
|
|
633
715
|
/**
|
|
634
716
|
* 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.
|
|
635
717
|
*
|
|
@@ -661,6 +743,40 @@ function createSearchClient({
|
|
|
661
743
|
};
|
|
662
744
|
return transporter.request(request, requestOptions);
|
|
663
745
|
},
|
|
746
|
+
/**
|
|
747
|
+
* 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.
|
|
748
|
+
*
|
|
749
|
+
* 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.
|
|
750
|
+
*
|
|
751
|
+
* Required API Key ACLs:
|
|
752
|
+
* - admin
|
|
753
|
+
*
|
|
754
|
+
* @deprecated
|
|
755
|
+
* @param assignUserId - The assignUserId object.
|
|
756
|
+
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
757
|
+
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
758
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
759
|
+
* @see assignUserId for the plain version.
|
|
760
|
+
*/
|
|
761
|
+
assignUserIdWithHTTPInfo({ xAlgoliaUserID, assignUserIdParams }, requestOptions) {
|
|
762
|
+
validateRequired("xAlgoliaUserID", "assignUserIdWithHTTPInfo", xAlgoliaUserID);
|
|
763
|
+
validateRequired("assignUserIdParams", "assignUserIdWithHTTPInfo", assignUserIdParams);
|
|
764
|
+
validateRequired("assignUserIdParams.cluster", "assignUserIdWithHTTPInfo", assignUserIdParams.cluster);
|
|
765
|
+
const requestPath = "/1/clusters/mapping";
|
|
766
|
+
const headers = {};
|
|
767
|
+
const queryParameters = {};
|
|
768
|
+
if (xAlgoliaUserID !== void 0) {
|
|
769
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
770
|
+
}
|
|
771
|
+
const request = {
|
|
772
|
+
method: "POST",
|
|
773
|
+
path: requestPath,
|
|
774
|
+
queryParameters,
|
|
775
|
+
headers,
|
|
776
|
+
data: assignUserIdParams
|
|
777
|
+
};
|
|
778
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
779
|
+
},
|
|
664
780
|
/**
|
|
665
781
|
* 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).
|
|
666
782
|
*
|
|
@@ -687,6 +803,35 @@ function createSearchClient({
|
|
|
687
803
|
};
|
|
688
804
|
return transporter.request(request, requestOptions);
|
|
689
805
|
},
|
|
806
|
+
/**
|
|
807
|
+
* 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).
|
|
808
|
+
*
|
|
809
|
+
* 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.
|
|
810
|
+
*
|
|
811
|
+
* Required API Key ACLs:
|
|
812
|
+
* - addObject
|
|
813
|
+
* @param batch - The batch object.
|
|
814
|
+
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
815
|
+
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
816
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
817
|
+
* @see batch for the plain version.
|
|
818
|
+
*/
|
|
819
|
+
batchWithHTTPInfo({ indexName, batchWriteParams }, requestOptions) {
|
|
820
|
+
validateRequired("indexName", "batchWithHTTPInfo", indexName);
|
|
821
|
+
validateRequired("batchWriteParams", "batchWithHTTPInfo", batchWriteParams);
|
|
822
|
+
validateRequired("batchWriteParams.requests", "batchWithHTTPInfo", batchWriteParams.requests);
|
|
823
|
+
const requestPath = "/1/indexes/{indexName}/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
824
|
+
const headers = {};
|
|
825
|
+
const queryParameters = {};
|
|
826
|
+
const request = {
|
|
827
|
+
method: "POST",
|
|
828
|
+
path: requestPath,
|
|
829
|
+
queryParameters,
|
|
830
|
+
headers,
|
|
831
|
+
data: batchWriteParams
|
|
832
|
+
};
|
|
833
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
834
|
+
},
|
|
690
835
|
/**
|
|
691
836
|
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
692
837
|
*
|
|
@@ -719,6 +864,49 @@ function createSearchClient({
|
|
|
719
864
|
};
|
|
720
865
|
return transporter.request(request, requestOptions);
|
|
721
866
|
},
|
|
867
|
+
/**
|
|
868
|
+
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
869
|
+
*
|
|
870
|
+
* 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.
|
|
871
|
+
*
|
|
872
|
+
* Required API Key ACLs:
|
|
873
|
+
* - admin
|
|
874
|
+
*
|
|
875
|
+
* @deprecated
|
|
876
|
+
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
877
|
+
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
878
|
+
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
879
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
880
|
+
* @see batchAssignUserIds for the plain version.
|
|
881
|
+
*/
|
|
882
|
+
batchAssignUserIdsWithHTTPInfo({ xAlgoliaUserID, batchAssignUserIdsParams }, requestOptions) {
|
|
883
|
+
validateRequired("xAlgoliaUserID", "batchAssignUserIdsWithHTTPInfo", xAlgoliaUserID);
|
|
884
|
+
validateRequired("batchAssignUserIdsParams", "batchAssignUserIdsWithHTTPInfo", batchAssignUserIdsParams);
|
|
885
|
+
validateRequired(
|
|
886
|
+
"batchAssignUserIdsParams.cluster",
|
|
887
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
888
|
+
batchAssignUserIdsParams.cluster
|
|
889
|
+
);
|
|
890
|
+
validateRequired(
|
|
891
|
+
"batchAssignUserIdsParams.users",
|
|
892
|
+
"batchAssignUserIdsWithHTTPInfo",
|
|
893
|
+
batchAssignUserIdsParams.users
|
|
894
|
+
);
|
|
895
|
+
const requestPath = "/1/clusters/mapping/batch";
|
|
896
|
+
const headers = {};
|
|
897
|
+
const queryParameters = {};
|
|
898
|
+
if (xAlgoliaUserID !== void 0) {
|
|
899
|
+
headers["X-Algolia-User-ID"] = xAlgoliaUserID.toString();
|
|
900
|
+
}
|
|
901
|
+
const request = {
|
|
902
|
+
method: "POST",
|
|
903
|
+
path: requestPath,
|
|
904
|
+
queryParameters,
|
|
905
|
+
headers,
|
|
906
|
+
data: batchAssignUserIdsParams
|
|
907
|
+
};
|
|
908
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
909
|
+
},
|
|
722
910
|
/**
|
|
723
911
|
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
724
912
|
*
|
|
@@ -752,6 +940,46 @@ function createSearchClient({
|
|
|
752
940
|
};
|
|
753
941
|
return transporter.request(request, requestOptions);
|
|
754
942
|
},
|
|
943
|
+
/**
|
|
944
|
+
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
945
|
+
*
|
|
946
|
+
* 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.
|
|
947
|
+
*
|
|
948
|
+
* Required API Key ACLs:
|
|
949
|
+
* - editSettings
|
|
950
|
+
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
951
|
+
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
952
|
+
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
953
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
954
|
+
* @see batchDictionaryEntries for the plain version.
|
|
955
|
+
*/
|
|
956
|
+
batchDictionaryEntriesWithHTTPInfo({ dictionaryName, batchDictionaryEntriesParams }, requestOptions) {
|
|
957
|
+
validateRequired("dictionaryName", "batchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
958
|
+
validateRequired(
|
|
959
|
+
"batchDictionaryEntriesParams",
|
|
960
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
961
|
+
batchDictionaryEntriesParams
|
|
962
|
+
);
|
|
963
|
+
validateRequired(
|
|
964
|
+
"batchDictionaryEntriesParams.requests",
|
|
965
|
+
"batchDictionaryEntriesWithHTTPInfo",
|
|
966
|
+
batchDictionaryEntriesParams.requests
|
|
967
|
+
);
|
|
968
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/batch".replace(
|
|
969
|
+
"{dictionaryName}",
|
|
970
|
+
encodeURIComponent(dictionaryName)
|
|
971
|
+
);
|
|
972
|
+
const headers = {};
|
|
973
|
+
const queryParameters = {};
|
|
974
|
+
const request = {
|
|
975
|
+
method: "POST",
|
|
976
|
+
path: requestPath,
|
|
977
|
+
queryParameters,
|
|
978
|
+
headers,
|
|
979
|
+
data: batchDictionaryEntriesParams
|
|
980
|
+
};
|
|
981
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
982
|
+
},
|
|
755
983
|
/**
|
|
756
984
|
* 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.
|
|
757
985
|
*
|
|
@@ -777,6 +1005,34 @@ function createSearchClient({
|
|
|
777
1005
|
};
|
|
778
1006
|
return transporter.request(request, requestOptions);
|
|
779
1007
|
},
|
|
1008
|
+
/**
|
|
1009
|
+
* 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.
|
|
1010
|
+
*
|
|
1011
|
+
* 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.
|
|
1012
|
+
*
|
|
1013
|
+
* Required API Key ACLs:
|
|
1014
|
+
* - browse
|
|
1015
|
+
* @param browse - The browse object.
|
|
1016
|
+
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
1017
|
+
* @param browse.browseParams - The browseParams object.
|
|
1018
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1019
|
+
* @see browse for the plain version.
|
|
1020
|
+
*/
|
|
1021
|
+
browseWithHTTPInfo({ indexName, browseParams }, requestOptions) {
|
|
1022
|
+
validateRequired("indexName", "browseWithHTTPInfo", indexName);
|
|
1023
|
+
const requestPath = "/1/indexes/{indexName}/browse".replace("{indexName}", encodeURIComponent(indexName));
|
|
1024
|
+
const headers = {};
|
|
1025
|
+
const queryParameters = {};
|
|
1026
|
+
const request = {
|
|
1027
|
+
method: "POST",
|
|
1028
|
+
path: requestPath,
|
|
1029
|
+
queryParameters,
|
|
1030
|
+
headers,
|
|
1031
|
+
data: browseParams ? browseParams : {},
|
|
1032
|
+
useReadTransporter: true
|
|
1033
|
+
};
|
|
1034
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1035
|
+
},
|
|
780
1036
|
/**
|
|
781
1037
|
* 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).
|
|
782
1038
|
*
|
|
@@ -799,6 +1055,31 @@ function createSearchClient({
|
|
|
799
1055
|
};
|
|
800
1056
|
return transporter.request(request, requestOptions);
|
|
801
1057
|
},
|
|
1058
|
+
/**
|
|
1059
|
+
* 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).
|
|
1060
|
+
*
|
|
1061
|
+
* 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.
|
|
1062
|
+
*
|
|
1063
|
+
* Required API Key ACLs:
|
|
1064
|
+
* - deleteIndex
|
|
1065
|
+
* @param clearObjects - The clearObjects object.
|
|
1066
|
+
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
1067
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1068
|
+
* @see clearObjects for the plain version.
|
|
1069
|
+
*/
|
|
1070
|
+
clearObjectsWithHTTPInfo({ indexName }, requestOptions) {
|
|
1071
|
+
validateRequired("indexName", "clearObjectsWithHTTPInfo", indexName);
|
|
1072
|
+
const requestPath = "/1/indexes/{indexName}/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1073
|
+
const headers = {};
|
|
1074
|
+
const queryParameters = {};
|
|
1075
|
+
const request = {
|
|
1076
|
+
method: "POST",
|
|
1077
|
+
path: requestPath,
|
|
1078
|
+
queryParameters,
|
|
1079
|
+
headers
|
|
1080
|
+
};
|
|
1081
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1082
|
+
},
|
|
802
1083
|
/**
|
|
803
1084
|
* Deletes all rules from the index.
|
|
804
1085
|
*
|
|
@@ -826,18 +1107,21 @@ function createSearchClient({
|
|
|
826
1107
|
return transporter.request(request, requestOptions);
|
|
827
1108
|
},
|
|
828
1109
|
/**
|
|
829
|
-
* Deletes all
|
|
1110
|
+
* Deletes all rules from the index.
|
|
1111
|
+
*
|
|
1112
|
+
* 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.
|
|
830
1113
|
*
|
|
831
1114
|
* Required API Key ACLs:
|
|
832
1115
|
* - editSettings
|
|
833
|
-
* @param
|
|
834
|
-
* @param
|
|
835
|
-
* @param
|
|
1116
|
+
* @param clearRules - The clearRules object.
|
|
1117
|
+
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
1118
|
+
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
836
1119
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1120
|
+
* @see clearRules for the plain version.
|
|
837
1121
|
*/
|
|
838
|
-
|
|
839
|
-
validateRequired("indexName", "
|
|
840
|
-
const requestPath = "/1/indexes/{indexName}/
|
|
1122
|
+
clearRulesWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1123
|
+
validateRequired("indexName", "clearRulesWithHTTPInfo", indexName);
|
|
1124
|
+
const requestPath = "/1/indexes/{indexName}/rules/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
841
1125
|
const headers = {};
|
|
842
1126
|
const queryParameters = {};
|
|
843
1127
|
if (forwardToReplicas !== void 0) {
|
|
@@ -849,22 +1133,28 @@ function createSearchClient({
|
|
|
849
1133
|
queryParameters,
|
|
850
1134
|
headers
|
|
851
1135
|
};
|
|
852
|
-
return transporter.
|
|
1136
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
853
1137
|
},
|
|
854
1138
|
/**
|
|
855
|
-
*
|
|
856
|
-
*
|
|
857
|
-
*
|
|
858
|
-
*
|
|
1139
|
+
* Deletes all synonyms from the index.
|
|
1140
|
+
*
|
|
1141
|
+
* Required API Key ACLs:
|
|
1142
|
+
* - editSettings
|
|
1143
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1144
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1145
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
859
1146
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
860
1147
|
*/
|
|
861
|
-
|
|
862
|
-
validateRequired("
|
|
863
|
-
const requestPath = "/{
|
|
1148
|
+
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
1149
|
+
validateRequired("indexName", "clearSynonyms", indexName);
|
|
1150
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
864
1151
|
const headers = {};
|
|
865
|
-
const queryParameters =
|
|
1152
|
+
const queryParameters = {};
|
|
1153
|
+
if (forwardToReplicas !== void 0) {
|
|
1154
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1155
|
+
}
|
|
866
1156
|
const request = {
|
|
867
|
-
method: "
|
|
1157
|
+
method: "POST",
|
|
868
1158
|
path: requestPath,
|
|
869
1159
|
queryParameters,
|
|
870
1160
|
headers
|
|
@@ -872,7 +1162,79 @@ function createSearchClient({
|
|
|
872
1162
|
return transporter.request(request, requestOptions);
|
|
873
1163
|
},
|
|
874
1164
|
/**
|
|
875
|
-
*
|
|
1165
|
+
* Deletes all synonyms from the index.
|
|
1166
|
+
*
|
|
1167
|
+
* 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.
|
|
1168
|
+
*
|
|
1169
|
+
* Required API Key ACLs:
|
|
1170
|
+
* - editSettings
|
|
1171
|
+
* @param clearSynonyms - The clearSynonyms object.
|
|
1172
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1173
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1174
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1175
|
+
* @see clearSynonyms for the plain version.
|
|
1176
|
+
*/
|
|
1177
|
+
clearSynonymsWithHTTPInfo({ indexName, forwardToReplicas }, requestOptions) {
|
|
1178
|
+
validateRequired("indexName", "clearSynonymsWithHTTPInfo", indexName);
|
|
1179
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/clear".replace("{indexName}", encodeURIComponent(indexName));
|
|
1180
|
+
const headers = {};
|
|
1181
|
+
const queryParameters = {};
|
|
1182
|
+
if (forwardToReplicas !== void 0) {
|
|
1183
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1184
|
+
}
|
|
1185
|
+
const request = {
|
|
1186
|
+
method: "POST",
|
|
1187
|
+
path: requestPath,
|
|
1188
|
+
queryParameters,
|
|
1189
|
+
headers
|
|
1190
|
+
};
|
|
1191
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1192
|
+
},
|
|
1193
|
+
/**
|
|
1194
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1195
|
+
* @param customDelete - The customDelete object.
|
|
1196
|
+
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
1197
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
1198
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1199
|
+
*/
|
|
1200
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
1201
|
+
validateRequired("path", "customDelete", path);
|
|
1202
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1203
|
+
const headers = {};
|
|
1204
|
+
const queryParameters = parameters ? parameters : {};
|
|
1205
|
+
const request = {
|
|
1206
|
+
method: "DELETE",
|
|
1207
|
+
path: requestPath,
|
|
1208
|
+
queryParameters,
|
|
1209
|
+
headers
|
|
1210
|
+
};
|
|
1211
|
+
return transporter.request(request, requestOptions);
|
|
1212
|
+
},
|
|
1213
|
+
/**
|
|
1214
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1215
|
+
*
|
|
1216
|
+
* 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.
|
|
1217
|
+
* @param customDelete - The customDelete object.
|
|
1218
|
+
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
1219
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
1220
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1221
|
+
* @see customDelete for the plain version.
|
|
1222
|
+
*/
|
|
1223
|
+
customDeleteWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1224
|
+
validateRequired("path", "customDeleteWithHTTPInfo", path);
|
|
1225
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1226
|
+
const headers = {};
|
|
1227
|
+
const queryParameters = parameters ? parameters : {};
|
|
1228
|
+
const request = {
|
|
1229
|
+
method: "DELETE",
|
|
1230
|
+
path: requestPath,
|
|
1231
|
+
queryParameters,
|
|
1232
|
+
headers
|
|
1233
|
+
};
|
|
1234
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1235
|
+
},
|
|
1236
|
+
/**
|
|
1237
|
+
* This method lets you send requests to the Algolia REST API.
|
|
876
1238
|
* @param customGet - The customGet object.
|
|
877
1239
|
* @param customGet.path - Path of the endpoint, for example `1/newFeature`.
|
|
878
1240
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -891,6 +1253,29 @@ function createSearchClient({
|
|
|
891
1253
|
};
|
|
892
1254
|
return transporter.request(request, requestOptions);
|
|
893
1255
|
},
|
|
1256
|
+
/**
|
|
1257
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1258
|
+
*
|
|
1259
|
+
* 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.
|
|
1260
|
+
* @param customGet - The customGet object.
|
|
1261
|
+
* @param customGet.path - Path of the endpoint, for example `1/newFeature`.
|
|
1262
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
1263
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1264
|
+
* @see customGet for the plain version.
|
|
1265
|
+
*/
|
|
1266
|
+
customGetWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
1267
|
+
validateRequired("path", "customGetWithHTTPInfo", path);
|
|
1268
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1269
|
+
const headers = {};
|
|
1270
|
+
const queryParameters = parameters ? parameters : {};
|
|
1271
|
+
const request = {
|
|
1272
|
+
method: "GET",
|
|
1273
|
+
path: requestPath,
|
|
1274
|
+
queryParameters,
|
|
1275
|
+
headers
|
|
1276
|
+
};
|
|
1277
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1278
|
+
},
|
|
894
1279
|
/**
|
|
895
1280
|
* This method lets you send requests to the Algolia REST API.
|
|
896
1281
|
* @param customPost - The customPost object.
|
|
@@ -913,6 +1298,31 @@ function createSearchClient({
|
|
|
913
1298
|
};
|
|
914
1299
|
return transporter.request(request, requestOptions);
|
|
915
1300
|
},
|
|
1301
|
+
/**
|
|
1302
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1303
|
+
*
|
|
1304
|
+
* 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.
|
|
1305
|
+
* @param customPost - The customPost object.
|
|
1306
|
+
* @param customPost.path - Path of the endpoint, for example `1/newFeature`.
|
|
1307
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
1308
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
1309
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1310
|
+
* @see customPost for the plain version.
|
|
1311
|
+
*/
|
|
1312
|
+
customPostWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1313
|
+
validateRequired("path", "customPostWithHTTPInfo", path);
|
|
1314
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1315
|
+
const headers = {};
|
|
1316
|
+
const queryParameters = parameters ? parameters : {};
|
|
1317
|
+
const request = {
|
|
1318
|
+
method: "POST",
|
|
1319
|
+
path: requestPath,
|
|
1320
|
+
queryParameters,
|
|
1321
|
+
headers,
|
|
1322
|
+
data: body ? body : {}
|
|
1323
|
+
};
|
|
1324
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1325
|
+
},
|
|
916
1326
|
/**
|
|
917
1327
|
* This method lets you send requests to the Algolia REST API.
|
|
918
1328
|
* @param customPut - The customPut object.
|
|
@@ -935,6 +1345,31 @@ function createSearchClient({
|
|
|
935
1345
|
};
|
|
936
1346
|
return transporter.request(request, requestOptions);
|
|
937
1347
|
},
|
|
1348
|
+
/**
|
|
1349
|
+
* This method lets you send requests to the Algolia REST API.
|
|
1350
|
+
*
|
|
1351
|
+
* 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.
|
|
1352
|
+
* @param customPut - The customPut object.
|
|
1353
|
+
* @param customPut.path - Path of the endpoint, for example `1/newFeature`.
|
|
1354
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
1355
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
1356
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1357
|
+
* @see customPut for the plain version.
|
|
1358
|
+
*/
|
|
1359
|
+
customPutWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
1360
|
+
validateRequired("path", "customPutWithHTTPInfo", path);
|
|
1361
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
1362
|
+
const headers = {};
|
|
1363
|
+
const queryParameters = parameters ? parameters : {};
|
|
1364
|
+
const request = {
|
|
1365
|
+
method: "PUT",
|
|
1366
|
+
path: requestPath,
|
|
1367
|
+
queryParameters,
|
|
1368
|
+
headers,
|
|
1369
|
+
data: body ? body : {}
|
|
1370
|
+
};
|
|
1371
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1372
|
+
},
|
|
938
1373
|
/**
|
|
939
1374
|
* Deletes the API key.
|
|
940
1375
|
*
|
|
@@ -957,6 +1392,31 @@ function createSearchClient({
|
|
|
957
1392
|
};
|
|
958
1393
|
return transporter.request(request, requestOptions);
|
|
959
1394
|
},
|
|
1395
|
+
/**
|
|
1396
|
+
* Deletes the API key.
|
|
1397
|
+
*
|
|
1398
|
+
* 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.
|
|
1399
|
+
*
|
|
1400
|
+
* Required API Key ACLs:
|
|
1401
|
+
* - admin
|
|
1402
|
+
* @param deleteApiKey - The deleteApiKey object.
|
|
1403
|
+
* @param deleteApiKey.key - API key.
|
|
1404
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1405
|
+
* @see deleteApiKey for the plain version.
|
|
1406
|
+
*/
|
|
1407
|
+
deleteApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1408
|
+
validateRequired("key", "deleteApiKeyWithHTTPInfo", key);
|
|
1409
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1410
|
+
const headers = {};
|
|
1411
|
+
const queryParameters = {};
|
|
1412
|
+
const request = {
|
|
1413
|
+
method: "DELETE",
|
|
1414
|
+
path: requestPath,
|
|
1415
|
+
queryParameters,
|
|
1416
|
+
headers
|
|
1417
|
+
};
|
|
1418
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1419
|
+
},
|
|
960
1420
|
/**
|
|
961
1421
|
* 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).
|
|
962
1422
|
*
|
|
@@ -982,6 +1442,34 @@ function createSearchClient({
|
|
|
982
1442
|
};
|
|
983
1443
|
return transporter.request(request, requestOptions);
|
|
984
1444
|
},
|
|
1445
|
+
/**
|
|
1446
|
+
* 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).
|
|
1447
|
+
*
|
|
1448
|
+
* 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.
|
|
1449
|
+
*
|
|
1450
|
+
* Required API Key ACLs:
|
|
1451
|
+
* - deleteIndex
|
|
1452
|
+
* @param deleteBy - The deleteBy object.
|
|
1453
|
+
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
1454
|
+
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
1455
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1456
|
+
* @see deleteBy for the plain version.
|
|
1457
|
+
*/
|
|
1458
|
+
deleteByWithHTTPInfo({ indexName, deleteByParams }, requestOptions) {
|
|
1459
|
+
validateRequired("indexName", "deleteByWithHTTPInfo", indexName);
|
|
1460
|
+
validateRequired("deleteByParams", "deleteByWithHTTPInfo", deleteByParams);
|
|
1461
|
+
const requestPath = "/1/indexes/{indexName}/deleteByQuery".replace("{indexName}", encodeURIComponent(indexName));
|
|
1462
|
+
const headers = {};
|
|
1463
|
+
const queryParameters = {};
|
|
1464
|
+
const request = {
|
|
1465
|
+
method: "POST",
|
|
1466
|
+
path: requestPath,
|
|
1467
|
+
queryParameters,
|
|
1468
|
+
headers,
|
|
1469
|
+
data: deleteByParams
|
|
1470
|
+
};
|
|
1471
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1472
|
+
},
|
|
985
1473
|
/**
|
|
986
1474
|
* 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).
|
|
987
1475
|
*
|
|
@@ -1004,6 +1492,31 @@ function createSearchClient({
|
|
|
1004
1492
|
};
|
|
1005
1493
|
return transporter.request(request, requestOptions);
|
|
1006
1494
|
},
|
|
1495
|
+
/**
|
|
1496
|
+
* 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).
|
|
1497
|
+
*
|
|
1498
|
+
* 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.
|
|
1499
|
+
*
|
|
1500
|
+
* Required API Key ACLs:
|
|
1501
|
+
* - deleteIndex
|
|
1502
|
+
* @param deleteIndex - The deleteIndex object.
|
|
1503
|
+
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
1504
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1505
|
+
* @see deleteIndex for the plain version.
|
|
1506
|
+
*/
|
|
1507
|
+
deleteIndexWithHTTPInfo({ indexName }, requestOptions) {
|
|
1508
|
+
validateRequired("indexName", "deleteIndexWithHTTPInfo", indexName);
|
|
1509
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
1510
|
+
const headers = {};
|
|
1511
|
+
const queryParameters = {};
|
|
1512
|
+
const request = {
|
|
1513
|
+
method: "DELETE",
|
|
1514
|
+
path: requestPath,
|
|
1515
|
+
queryParameters,
|
|
1516
|
+
headers
|
|
1517
|
+
};
|
|
1518
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1519
|
+
},
|
|
1007
1520
|
/**
|
|
1008
1521
|
* 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).
|
|
1009
1522
|
*
|
|
@@ -1028,6 +1541,33 @@ function createSearchClient({
|
|
|
1028
1541
|
};
|
|
1029
1542
|
return transporter.request(request, requestOptions);
|
|
1030
1543
|
},
|
|
1544
|
+
/**
|
|
1545
|
+
* 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).
|
|
1546
|
+
*
|
|
1547
|
+
* 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.
|
|
1548
|
+
*
|
|
1549
|
+
* Required API Key ACLs:
|
|
1550
|
+
* - deleteObject
|
|
1551
|
+
* @param deleteObject - The deleteObject object.
|
|
1552
|
+
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
1553
|
+
* @param deleteObject.objectID - Unique record identifier.
|
|
1554
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1555
|
+
* @see deleteObject for the plain version.
|
|
1556
|
+
*/
|
|
1557
|
+
deleteObjectWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
1558
|
+
validateRequired("indexName", "deleteObjectWithHTTPInfo", indexName);
|
|
1559
|
+
validateRequired("objectID", "deleteObjectWithHTTPInfo", objectID);
|
|
1560
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1561
|
+
const headers = {};
|
|
1562
|
+
const queryParameters = {};
|
|
1563
|
+
const request = {
|
|
1564
|
+
method: "DELETE",
|
|
1565
|
+
path: requestPath,
|
|
1566
|
+
queryParameters,
|
|
1567
|
+
headers
|
|
1568
|
+
};
|
|
1569
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1570
|
+
},
|
|
1031
1571
|
/**
|
|
1032
1572
|
* 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).
|
|
1033
1573
|
*
|
|
@@ -1056,6 +1596,37 @@ function createSearchClient({
|
|
|
1056
1596
|
};
|
|
1057
1597
|
return transporter.request(request, requestOptions);
|
|
1058
1598
|
},
|
|
1599
|
+
/**
|
|
1600
|
+
* 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).
|
|
1601
|
+
*
|
|
1602
|
+
* 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.
|
|
1603
|
+
*
|
|
1604
|
+
* Required API Key ACLs:
|
|
1605
|
+
* - editSettings
|
|
1606
|
+
* @param deleteRule - The deleteRule object.
|
|
1607
|
+
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
1608
|
+
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
1609
|
+
* @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1610
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1611
|
+
* @see deleteRule for the plain version.
|
|
1612
|
+
*/
|
|
1613
|
+
deleteRuleWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1614
|
+
validateRequired("indexName", "deleteRuleWithHTTPInfo", indexName);
|
|
1615
|
+
validateRequired("objectID", "deleteRuleWithHTTPInfo", objectID);
|
|
1616
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1617
|
+
const headers = {};
|
|
1618
|
+
const queryParameters = {};
|
|
1619
|
+
if (forwardToReplicas !== void 0) {
|
|
1620
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1621
|
+
}
|
|
1622
|
+
const request = {
|
|
1623
|
+
method: "DELETE",
|
|
1624
|
+
path: requestPath,
|
|
1625
|
+
queryParameters,
|
|
1626
|
+
headers
|
|
1627
|
+
};
|
|
1628
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1629
|
+
},
|
|
1059
1630
|
/**
|
|
1060
1631
|
* Deletes a source from the list of allowed sources.
|
|
1061
1632
|
*
|
|
@@ -1078,6 +1649,31 @@ function createSearchClient({
|
|
|
1078
1649
|
};
|
|
1079
1650
|
return transporter.request(request, requestOptions);
|
|
1080
1651
|
},
|
|
1652
|
+
/**
|
|
1653
|
+
* Deletes a source from the list of allowed sources.
|
|
1654
|
+
*
|
|
1655
|
+
* 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.
|
|
1656
|
+
*
|
|
1657
|
+
* Required API Key ACLs:
|
|
1658
|
+
* - admin
|
|
1659
|
+
* @param deleteSource - The deleteSource object.
|
|
1660
|
+
* @param deleteSource.source - IP address range of the source.
|
|
1661
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1662
|
+
* @see deleteSource for the plain version.
|
|
1663
|
+
*/
|
|
1664
|
+
deleteSourceWithHTTPInfo({ source }, requestOptions) {
|
|
1665
|
+
validateRequired("source", "deleteSourceWithHTTPInfo", source);
|
|
1666
|
+
const requestPath = "/1/security/sources/{source}".replace("{source}", encodeURIComponent(source));
|
|
1667
|
+
const headers = {};
|
|
1668
|
+
const queryParameters = {};
|
|
1669
|
+
const request = {
|
|
1670
|
+
method: "DELETE",
|
|
1671
|
+
path: requestPath,
|
|
1672
|
+
queryParameters,
|
|
1673
|
+
headers
|
|
1674
|
+
};
|
|
1675
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1676
|
+
},
|
|
1081
1677
|
/**
|
|
1082
1678
|
* 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).
|
|
1083
1679
|
*
|
|
@@ -1107,13 +1703,44 @@ function createSearchClient({
|
|
|
1107
1703
|
return transporter.request(request, requestOptions);
|
|
1108
1704
|
},
|
|
1109
1705
|
/**
|
|
1110
|
-
*
|
|
1706
|
+
* 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).
|
|
1707
|
+
*
|
|
1708
|
+
* 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.
|
|
1111
1709
|
*
|
|
1112
1710
|
* Required API Key ACLs:
|
|
1113
|
-
* -
|
|
1114
|
-
* @param
|
|
1115
|
-
* @param
|
|
1116
|
-
* @param
|
|
1711
|
+
* - editSettings
|
|
1712
|
+
* @param deleteSynonym - The deleteSynonym object.
|
|
1713
|
+
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
1714
|
+
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
1715
|
+
* @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1716
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1717
|
+
* @see deleteSynonym for the plain version.
|
|
1718
|
+
*/
|
|
1719
|
+
deleteSynonymWithHTTPInfo({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
1720
|
+
validateRequired("indexName", "deleteSynonymWithHTTPInfo", indexName);
|
|
1721
|
+
validateRequired("objectID", "deleteSynonymWithHTTPInfo", objectID);
|
|
1722
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1723
|
+
const headers = {};
|
|
1724
|
+
const queryParameters = {};
|
|
1725
|
+
if (forwardToReplicas !== void 0) {
|
|
1726
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1727
|
+
}
|
|
1728
|
+
const request = {
|
|
1729
|
+
method: "DELETE",
|
|
1730
|
+
path: requestPath,
|
|
1731
|
+
queryParameters,
|
|
1732
|
+
headers
|
|
1733
|
+
};
|
|
1734
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1735
|
+
},
|
|
1736
|
+
/**
|
|
1737
|
+
* 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>`.
|
|
1738
|
+
*
|
|
1739
|
+
* Required API Key ACLs:
|
|
1740
|
+
* - search
|
|
1741
|
+
* @param getApiKey - The getApiKey object.
|
|
1742
|
+
* @param getApiKey.key - API key.
|
|
1743
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1117
1744
|
*/
|
|
1118
1745
|
getApiKey({ key }, requestOptions) {
|
|
1119
1746
|
validateRequired("key", "getApiKey", key);
|
|
@@ -1128,6 +1755,31 @@ function createSearchClient({
|
|
|
1128
1755
|
};
|
|
1129
1756
|
return transporter.request(request, requestOptions);
|
|
1130
1757
|
},
|
|
1758
|
+
/**
|
|
1759
|
+
* 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>`.
|
|
1760
|
+
*
|
|
1761
|
+
* 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.
|
|
1762
|
+
*
|
|
1763
|
+
* Required API Key ACLs:
|
|
1764
|
+
* - search
|
|
1765
|
+
* @param getApiKey - The getApiKey object.
|
|
1766
|
+
* @param getApiKey.key - API key.
|
|
1767
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1768
|
+
* @see getApiKey for the plain version.
|
|
1769
|
+
*/
|
|
1770
|
+
getApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
1771
|
+
validateRequired("key", "getApiKeyWithHTTPInfo", key);
|
|
1772
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
1773
|
+
const headers = {};
|
|
1774
|
+
const queryParameters = {};
|
|
1775
|
+
const request = {
|
|
1776
|
+
method: "GET",
|
|
1777
|
+
path: requestPath,
|
|
1778
|
+
queryParameters,
|
|
1779
|
+
headers
|
|
1780
|
+
};
|
|
1781
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1782
|
+
},
|
|
1131
1783
|
/**
|
|
1132
1784
|
* Checks the status of a given application task.
|
|
1133
1785
|
*
|
|
@@ -1150,6 +1802,31 @@ function createSearchClient({
|
|
|
1150
1802
|
};
|
|
1151
1803
|
return transporter.request(request, requestOptions);
|
|
1152
1804
|
},
|
|
1805
|
+
/**
|
|
1806
|
+
* Checks the status of a given application task.
|
|
1807
|
+
*
|
|
1808
|
+
* 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.
|
|
1809
|
+
*
|
|
1810
|
+
* Required API Key ACLs:
|
|
1811
|
+
* - editSettings
|
|
1812
|
+
* @param getAppTask - The getAppTask object.
|
|
1813
|
+
* @param getAppTask.taskID - Unique task identifier.
|
|
1814
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1815
|
+
* @see getAppTask for the plain version.
|
|
1816
|
+
*/
|
|
1817
|
+
getAppTaskWithHTTPInfo({ taskID }, requestOptions) {
|
|
1818
|
+
validateRequired("taskID", "getAppTaskWithHTTPInfo", taskID);
|
|
1819
|
+
const requestPath = "/1/task/{taskID}".replace("{taskID}", encodeURIComponent(taskID));
|
|
1820
|
+
const headers = {};
|
|
1821
|
+
const queryParameters = {};
|
|
1822
|
+
const request = {
|
|
1823
|
+
method: "GET",
|
|
1824
|
+
path: requestPath,
|
|
1825
|
+
queryParameters,
|
|
1826
|
+
headers
|
|
1827
|
+
};
|
|
1828
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1829
|
+
},
|
|
1153
1830
|
/**
|
|
1154
1831
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1155
1832
|
*
|
|
@@ -1169,6 +1846,28 @@ function createSearchClient({
|
|
|
1169
1846
|
};
|
|
1170
1847
|
return transporter.request(request, requestOptions);
|
|
1171
1848
|
},
|
|
1849
|
+
/**
|
|
1850
|
+
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1851
|
+
*
|
|
1852
|
+
* 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.
|
|
1853
|
+
*
|
|
1854
|
+
* Required API Key ACLs:
|
|
1855
|
+
* - settings
|
|
1856
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1857
|
+
* @see getDictionaryLanguages for the plain version.
|
|
1858
|
+
*/
|
|
1859
|
+
getDictionaryLanguagesWithHTTPInfo(requestOptions) {
|
|
1860
|
+
const requestPath = "/1/dictionaries/*/languages";
|
|
1861
|
+
const headers = {};
|
|
1862
|
+
const queryParameters = {};
|
|
1863
|
+
const request = {
|
|
1864
|
+
method: "GET",
|
|
1865
|
+
path: requestPath,
|
|
1866
|
+
queryParameters,
|
|
1867
|
+
headers
|
|
1868
|
+
};
|
|
1869
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1870
|
+
},
|
|
1172
1871
|
/**
|
|
1173
1872
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1174
1873
|
*
|
|
@@ -1188,6 +1887,28 @@ function createSearchClient({
|
|
|
1188
1887
|
};
|
|
1189
1888
|
return transporter.request(request, requestOptions);
|
|
1190
1889
|
},
|
|
1890
|
+
/**
|
|
1891
|
+
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1892
|
+
*
|
|
1893
|
+
* 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.
|
|
1894
|
+
*
|
|
1895
|
+
* Required API Key ACLs:
|
|
1896
|
+
* - settings
|
|
1897
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1898
|
+
* @see getDictionarySettings for the plain version.
|
|
1899
|
+
*/
|
|
1900
|
+
getDictionarySettingsWithHTTPInfo(requestOptions) {
|
|
1901
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
1902
|
+
const headers = {};
|
|
1903
|
+
const queryParameters = {};
|
|
1904
|
+
const request = {
|
|
1905
|
+
method: "GET",
|
|
1906
|
+
path: requestPath,
|
|
1907
|
+
queryParameters,
|
|
1908
|
+
headers
|
|
1909
|
+
};
|
|
1910
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1911
|
+
},
|
|
1191
1912
|
/**
|
|
1192
1913
|
* 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.
|
|
1193
1914
|
*
|
|
@@ -1224,6 +1945,45 @@ function createSearchClient({
|
|
|
1224
1945
|
};
|
|
1225
1946
|
return transporter.request(request, requestOptions);
|
|
1226
1947
|
},
|
|
1948
|
+
/**
|
|
1949
|
+
* 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.
|
|
1950
|
+
*
|
|
1951
|
+
* 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.
|
|
1952
|
+
*
|
|
1953
|
+
* Required API Key ACLs:
|
|
1954
|
+
* - logs
|
|
1955
|
+
* @param getLogs - The getLogs object.
|
|
1956
|
+
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
1957
|
+
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
1958
|
+
* @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
|
|
1959
|
+
* @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
|
|
1960
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1961
|
+
* @see getLogs for the plain version.
|
|
1962
|
+
*/
|
|
1963
|
+
getLogsWithHTTPInfo({ offset, length, indexName, type } = {}, requestOptions = void 0) {
|
|
1964
|
+
const requestPath = "/1/logs";
|
|
1965
|
+
const headers = {};
|
|
1966
|
+
const queryParameters = {};
|
|
1967
|
+
if (offset !== void 0) {
|
|
1968
|
+
queryParameters["offset"] = offset.toString();
|
|
1969
|
+
}
|
|
1970
|
+
if (length !== void 0) {
|
|
1971
|
+
queryParameters["length"] = length.toString();
|
|
1972
|
+
}
|
|
1973
|
+
if (indexName !== void 0) {
|
|
1974
|
+
queryParameters["indexName"] = indexName.toString();
|
|
1975
|
+
}
|
|
1976
|
+
if (type !== void 0) {
|
|
1977
|
+
queryParameters["type"] = type.toString();
|
|
1978
|
+
}
|
|
1979
|
+
const request = {
|
|
1980
|
+
method: "GET",
|
|
1981
|
+
path: requestPath,
|
|
1982
|
+
queryParameters,
|
|
1983
|
+
headers
|
|
1984
|
+
};
|
|
1985
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1986
|
+
},
|
|
1227
1987
|
/**
|
|
1228
1988
|
* 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).
|
|
1229
1989
|
*
|
|
@@ -1252,6 +2012,37 @@ function createSearchClient({
|
|
|
1252
2012
|
};
|
|
1253
2013
|
return transporter.request(request, requestOptions);
|
|
1254
2014
|
},
|
|
2015
|
+
/**
|
|
2016
|
+
* 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).
|
|
2017
|
+
*
|
|
2018
|
+
* 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.
|
|
2019
|
+
*
|
|
2020
|
+
* Required API Key ACLs:
|
|
2021
|
+
* - search
|
|
2022
|
+
* @param getObject - The getObject object.
|
|
2023
|
+
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
2024
|
+
* @param getObject.objectID - Unique record identifier.
|
|
2025
|
+
* @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.
|
|
2026
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2027
|
+
* @see getObject for the plain version.
|
|
2028
|
+
*/
|
|
2029
|
+
getObjectWithHTTPInfo({ indexName, objectID, attributesToRetrieve }, requestOptions) {
|
|
2030
|
+
validateRequired("indexName", "getObjectWithHTTPInfo", indexName);
|
|
2031
|
+
validateRequired("objectID", "getObjectWithHTTPInfo", objectID);
|
|
2032
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2033
|
+
const headers = {};
|
|
2034
|
+
const queryParameters = {};
|
|
2035
|
+
if (attributesToRetrieve !== void 0) {
|
|
2036
|
+
queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
|
|
2037
|
+
}
|
|
2038
|
+
const request = {
|
|
2039
|
+
method: "GET",
|
|
2040
|
+
path: requestPath,
|
|
2041
|
+
queryParameters,
|
|
2042
|
+
headers
|
|
2043
|
+
};
|
|
2044
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2045
|
+
},
|
|
1255
2046
|
/**
|
|
1256
2047
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
1257
2048
|
*
|
|
@@ -1277,20 +2068,246 @@ function createSearchClient({
|
|
|
1277
2068
|
};
|
|
1278
2069
|
return transporter.request(request, requestOptions);
|
|
1279
2070
|
},
|
|
2071
|
+
/**
|
|
2072
|
+
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
2073
|
+
*
|
|
2074
|
+
* 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.
|
|
2075
|
+
*
|
|
2076
|
+
* Required API Key ACLs:
|
|
2077
|
+
* - search
|
|
2078
|
+
* @param getObjectsParams - Request object.
|
|
2079
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2080
|
+
* @see getObjects for the plain version.
|
|
2081
|
+
*/
|
|
2082
|
+
getObjectsWithHTTPInfo(getObjectsParams, requestOptions) {
|
|
2083
|
+
validateRequired("getObjectsParams", "getObjectsWithHTTPInfo", getObjectsParams);
|
|
2084
|
+
validateRequired("getObjectsParams.requests", "getObjectsWithHTTPInfo", getObjectsParams.requests);
|
|
2085
|
+
const requestPath = "/1/indexes/*/objects";
|
|
2086
|
+
const headers = {};
|
|
2087
|
+
const queryParameters = {};
|
|
2088
|
+
const request = {
|
|
2089
|
+
method: "POST",
|
|
2090
|
+
path: requestPath,
|
|
2091
|
+
queryParameters,
|
|
2092
|
+
headers,
|
|
2093
|
+
data: getObjectsParams,
|
|
2094
|
+
useReadTransporter: true,
|
|
2095
|
+
cacheable: true
|
|
2096
|
+
};
|
|
2097
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2098
|
+
},
|
|
2099
|
+
/**
|
|
2100
|
+
* 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).
|
|
2101
|
+
*
|
|
2102
|
+
* Required API Key ACLs:
|
|
2103
|
+
* - settings
|
|
2104
|
+
* @param getRule - The getRule object.
|
|
2105
|
+
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
2106
|
+
* @param getRule.objectID - Unique identifier of a rule object.
|
|
2107
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2108
|
+
*/
|
|
2109
|
+
getRule({ indexName, objectID }, requestOptions) {
|
|
2110
|
+
validateRequired("indexName", "getRule", indexName);
|
|
2111
|
+
validateRequired("objectID", "getRule", objectID);
|
|
2112
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2113
|
+
const headers = {};
|
|
2114
|
+
const queryParameters = {};
|
|
2115
|
+
const request = {
|
|
2116
|
+
method: "GET",
|
|
2117
|
+
path: requestPath,
|
|
2118
|
+
queryParameters,
|
|
2119
|
+
headers
|
|
2120
|
+
};
|
|
2121
|
+
return transporter.request(request, requestOptions);
|
|
2122
|
+
},
|
|
1280
2123
|
/**
|
|
1281
2124
|
* 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).
|
|
1282
2125
|
*
|
|
2126
|
+
* 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.
|
|
2127
|
+
*
|
|
1283
2128
|
* Required API Key ACLs:
|
|
1284
2129
|
* - settings
|
|
1285
2130
|
* @param getRule - The getRule object.
|
|
1286
2131
|
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
1287
2132
|
* @param getRule.objectID - Unique identifier of a rule object.
|
|
1288
2133
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2134
|
+
* @see getRule for the plain version.
|
|
2135
|
+
*/
|
|
2136
|
+
getRuleWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2137
|
+
validateRequired("indexName", "getRuleWithHTTPInfo", indexName);
|
|
2138
|
+
validateRequired("objectID", "getRuleWithHTTPInfo", objectID);
|
|
2139
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2140
|
+
const headers = {};
|
|
2141
|
+
const queryParameters = {};
|
|
2142
|
+
const request = {
|
|
2143
|
+
method: "GET",
|
|
2144
|
+
path: requestPath,
|
|
2145
|
+
queryParameters,
|
|
2146
|
+
headers
|
|
2147
|
+
};
|
|
2148
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2149
|
+
},
|
|
2150
|
+
/**
|
|
2151
|
+
* Retrieves an object with non-null index settings.
|
|
2152
|
+
*
|
|
2153
|
+
* Required API Key ACLs:
|
|
2154
|
+
* - settings
|
|
2155
|
+
* @param getSettings - The getSettings object.
|
|
2156
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2157
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
2158
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2159
|
+
*/
|
|
2160
|
+
getSettings({ indexName, getVersion }, requestOptions) {
|
|
2161
|
+
validateRequired("indexName", "getSettings", indexName);
|
|
2162
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
2163
|
+
const headers = {};
|
|
2164
|
+
const queryParameters = {};
|
|
2165
|
+
if (getVersion !== void 0) {
|
|
2166
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2167
|
+
}
|
|
2168
|
+
const request = {
|
|
2169
|
+
method: "GET",
|
|
2170
|
+
path: requestPath,
|
|
2171
|
+
queryParameters,
|
|
2172
|
+
headers
|
|
2173
|
+
};
|
|
2174
|
+
return transporter.request(request, requestOptions);
|
|
2175
|
+
},
|
|
2176
|
+
/**
|
|
2177
|
+
* Retrieves an object with non-null index settings.
|
|
2178
|
+
*
|
|
2179
|
+
* 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.
|
|
2180
|
+
*
|
|
2181
|
+
* Required API Key ACLs:
|
|
2182
|
+
* - settings
|
|
2183
|
+
* @param getSettings - The getSettings object.
|
|
2184
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2185
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
2186
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2187
|
+
* @see getSettings for the plain version.
|
|
2188
|
+
*/
|
|
2189
|
+
getSettingsWithHTTPInfo({ indexName, getVersion }, requestOptions) {
|
|
2190
|
+
validateRequired("indexName", "getSettingsWithHTTPInfo", indexName);
|
|
2191
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
2192
|
+
const headers = {};
|
|
2193
|
+
const queryParameters = {};
|
|
2194
|
+
if (getVersion !== void 0) {
|
|
2195
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
2196
|
+
}
|
|
2197
|
+
const request = {
|
|
2198
|
+
method: "GET",
|
|
2199
|
+
path: requestPath,
|
|
2200
|
+
queryParameters,
|
|
2201
|
+
headers
|
|
2202
|
+
};
|
|
2203
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2204
|
+
},
|
|
2205
|
+
/**
|
|
2206
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2207
|
+
*
|
|
2208
|
+
* Required API Key ACLs:
|
|
2209
|
+
* - admin
|
|
2210
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2211
|
+
*/
|
|
2212
|
+
getSources(requestOptions) {
|
|
2213
|
+
const requestPath = "/1/security/sources";
|
|
2214
|
+
const headers = {};
|
|
2215
|
+
const queryParameters = {};
|
|
2216
|
+
const request = {
|
|
2217
|
+
method: "GET",
|
|
2218
|
+
path: requestPath,
|
|
2219
|
+
queryParameters,
|
|
2220
|
+
headers
|
|
2221
|
+
};
|
|
2222
|
+
return transporter.request(request, requestOptions);
|
|
2223
|
+
},
|
|
2224
|
+
/**
|
|
2225
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2226
|
+
*
|
|
2227
|
+
* 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.
|
|
2228
|
+
*
|
|
2229
|
+
* Required API Key ACLs:
|
|
2230
|
+
* - admin
|
|
2231
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2232
|
+
* @see getSources for the plain version.
|
|
2233
|
+
*/
|
|
2234
|
+
getSourcesWithHTTPInfo(requestOptions) {
|
|
2235
|
+
const requestPath = "/1/security/sources";
|
|
2236
|
+
const headers = {};
|
|
2237
|
+
const queryParameters = {};
|
|
2238
|
+
const request = {
|
|
2239
|
+
method: "GET",
|
|
2240
|
+
path: requestPath,
|
|
2241
|
+
queryParameters,
|
|
2242
|
+
headers
|
|
2243
|
+
};
|
|
2244
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2245
|
+
},
|
|
2246
|
+
/**
|
|
2247
|
+
* 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).
|
|
2248
|
+
*
|
|
2249
|
+
* Required API Key ACLs:
|
|
2250
|
+
* - settings
|
|
2251
|
+
* @param getSynonym - The getSynonym object.
|
|
2252
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2253
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2254
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2255
|
+
*/
|
|
2256
|
+
getSynonym({ indexName, objectID }, requestOptions) {
|
|
2257
|
+
validateRequired("indexName", "getSynonym", indexName);
|
|
2258
|
+
validateRequired("objectID", "getSynonym", objectID);
|
|
2259
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2260
|
+
const headers = {};
|
|
2261
|
+
const queryParameters = {};
|
|
2262
|
+
const request = {
|
|
2263
|
+
method: "GET",
|
|
2264
|
+
path: requestPath,
|
|
2265
|
+
queryParameters,
|
|
2266
|
+
headers
|
|
2267
|
+
};
|
|
2268
|
+
return transporter.request(request, requestOptions);
|
|
2269
|
+
},
|
|
2270
|
+
/**
|
|
2271
|
+
* 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).
|
|
2272
|
+
*
|
|
2273
|
+
* 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.
|
|
2274
|
+
*
|
|
2275
|
+
* Required API Key ACLs:
|
|
2276
|
+
* - settings
|
|
2277
|
+
* @param getSynonym - The getSynonym object.
|
|
2278
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2279
|
+
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2280
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2281
|
+
* @see getSynonym for the plain version.
|
|
2282
|
+
*/
|
|
2283
|
+
getSynonymWithHTTPInfo({ indexName, objectID }, requestOptions) {
|
|
2284
|
+
validateRequired("indexName", "getSynonymWithHTTPInfo", indexName);
|
|
2285
|
+
validateRequired("objectID", "getSynonymWithHTTPInfo", objectID);
|
|
2286
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2287
|
+
const headers = {};
|
|
2288
|
+
const queryParameters = {};
|
|
2289
|
+
const request = {
|
|
2290
|
+
method: "GET",
|
|
2291
|
+
path: requestPath,
|
|
2292
|
+
queryParameters,
|
|
2293
|
+
headers
|
|
2294
|
+
};
|
|
2295
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2296
|
+
},
|
|
2297
|
+
/**
|
|
2298
|
+
* 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.
|
|
2299
|
+
*
|
|
2300
|
+
* Required API Key ACLs:
|
|
2301
|
+
* - addObject
|
|
2302
|
+
* @param getTask - The getTask object.
|
|
2303
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2304
|
+
* @param getTask.taskID - Unique task identifier.
|
|
2305
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1289
2306
|
*/
|
|
1290
|
-
|
|
1291
|
-
validateRequired("indexName", "
|
|
1292
|
-
validateRequired("
|
|
1293
|
-
const requestPath = "/1/indexes/{indexName}/
|
|
2307
|
+
getTask({ indexName, taskID }, requestOptions) {
|
|
2308
|
+
validateRequired("indexName", "getTask", indexName);
|
|
2309
|
+
validateRequired("taskID", "getTask", taskID);
|
|
2310
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
1294
2311
|
const headers = {};
|
|
1295
2312
|
const queryParameters = {};
|
|
1296
2313
|
const request = {
|
|
@@ -1302,40 +2319,43 @@ function createSearchClient({
|
|
|
1302
2319
|
return transporter.request(request, requestOptions);
|
|
1303
2320
|
},
|
|
1304
2321
|
/**
|
|
1305
|
-
*
|
|
2322
|
+
* 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.
|
|
2323
|
+
*
|
|
2324
|
+
* 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.
|
|
1306
2325
|
*
|
|
1307
2326
|
* Required API Key ACLs:
|
|
1308
|
-
* -
|
|
1309
|
-
* @param
|
|
1310
|
-
* @param
|
|
1311
|
-
* @param
|
|
2327
|
+
* - addObject
|
|
2328
|
+
* @param getTask - The getTask object.
|
|
2329
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2330
|
+
* @param getTask.taskID - Unique task identifier.
|
|
1312
2331
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2332
|
+
* @see getTask for the plain version.
|
|
1313
2333
|
*/
|
|
1314
|
-
|
|
1315
|
-
validateRequired("indexName", "
|
|
1316
|
-
|
|
2334
|
+
getTaskWithHTTPInfo({ indexName, taskID }, requestOptions) {
|
|
2335
|
+
validateRequired("indexName", "getTaskWithHTTPInfo", indexName);
|
|
2336
|
+
validateRequired("taskID", "getTaskWithHTTPInfo", taskID);
|
|
2337
|
+
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
1317
2338
|
const headers = {};
|
|
1318
2339
|
const queryParameters = {};
|
|
1319
|
-
if (getVersion !== void 0) {
|
|
1320
|
-
queryParameters["getVersion"] = getVersion.toString();
|
|
1321
|
-
}
|
|
1322
2340
|
const request = {
|
|
1323
2341
|
method: "GET",
|
|
1324
2342
|
path: requestPath,
|
|
1325
2343
|
queryParameters,
|
|
1326
2344
|
headers
|
|
1327
2345
|
};
|
|
1328
|
-
return transporter.
|
|
2346
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1329
2347
|
},
|
|
1330
2348
|
/**
|
|
1331
|
-
*
|
|
2349
|
+
* 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.
|
|
1332
2350
|
*
|
|
1333
2351
|
* Required API Key ACLs:
|
|
1334
2352
|
* - admin
|
|
2353
|
+
*
|
|
2354
|
+
* @deprecated
|
|
1335
2355
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1336
2356
|
*/
|
|
1337
|
-
|
|
1338
|
-
const requestPath = "/1/
|
|
2357
|
+
getTopUserIds(requestOptions) {
|
|
2358
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
1339
2359
|
const headers = {};
|
|
1340
2360
|
const queryParameters = {};
|
|
1341
2361
|
const request = {
|
|
@@ -1347,19 +2367,19 @@ function createSearchClient({
|
|
|
1347
2367
|
return transporter.request(request, requestOptions);
|
|
1348
2368
|
},
|
|
1349
2369
|
/**
|
|
1350
|
-
*
|
|
2370
|
+
* 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.
|
|
2371
|
+
*
|
|
2372
|
+
* 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.
|
|
1351
2373
|
*
|
|
1352
2374
|
* Required API Key ACLs:
|
|
1353
|
-
* -
|
|
1354
|
-
*
|
|
1355
|
-
* @
|
|
1356
|
-
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2375
|
+
* - admin
|
|
2376
|
+
*
|
|
2377
|
+
* @deprecated
|
|
1357
2378
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2379
|
+
* @see getTopUserIds for the plain version.
|
|
1358
2380
|
*/
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
validateRequired("objectID", "getSynonym", objectID);
|
|
1362
|
-
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2381
|
+
getTopUserIdsWithHTTPInfo(requestOptions) {
|
|
2382
|
+
const requestPath = "/1/clusters/mapping/top";
|
|
1363
2383
|
const headers = {};
|
|
1364
2384
|
const queryParameters = {};
|
|
1365
2385
|
const request = {
|
|
@@ -1368,22 +2388,22 @@ function createSearchClient({
|
|
|
1368
2388
|
queryParameters,
|
|
1369
2389
|
headers
|
|
1370
2390
|
};
|
|
1371
|
-
return transporter.
|
|
2391
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1372
2392
|
},
|
|
1373
2393
|
/**
|
|
1374
|
-
*
|
|
2394
|
+
* 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.
|
|
1375
2395
|
*
|
|
1376
2396
|
* Required API Key ACLs:
|
|
1377
|
-
* -
|
|
1378
|
-
*
|
|
1379
|
-
* @
|
|
1380
|
-
* @param
|
|
2397
|
+
* - admin
|
|
2398
|
+
*
|
|
2399
|
+
* @deprecated
|
|
2400
|
+
* @param getUserId - The getUserId object.
|
|
2401
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1381
2402
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1382
2403
|
*/
|
|
1383
|
-
|
|
1384
|
-
validateRequired("
|
|
1385
|
-
|
|
1386
|
-
const requestPath = "/1/indexes/{indexName}/task/{taskID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{taskID}", encodeURIComponent(taskID));
|
|
2404
|
+
getUserId({ userID }, requestOptions) {
|
|
2405
|
+
validateRequired("userID", "getUserId", userID);
|
|
2406
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
1387
2407
|
const headers = {};
|
|
1388
2408
|
const queryParameters = {};
|
|
1389
2409
|
const request = {
|
|
@@ -1395,16 +2415,22 @@ function createSearchClient({
|
|
|
1395
2415
|
return transporter.request(request, requestOptions);
|
|
1396
2416
|
},
|
|
1397
2417
|
/**
|
|
1398
|
-
*
|
|
2418
|
+
* 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.
|
|
2419
|
+
*
|
|
2420
|
+
* 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.
|
|
1399
2421
|
*
|
|
1400
2422
|
* Required API Key ACLs:
|
|
1401
2423
|
* - admin
|
|
1402
2424
|
*
|
|
1403
2425
|
* @deprecated
|
|
2426
|
+
* @param getUserId - The getUserId object.
|
|
2427
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1404
2428
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2429
|
+
* @see getUserId for the plain version.
|
|
1405
2430
|
*/
|
|
1406
|
-
|
|
1407
|
-
|
|
2431
|
+
getUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2432
|
+
validateRequired("userID", "getUserIdWithHTTPInfo", userID);
|
|
2433
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
1408
2434
|
const headers = {};
|
|
1409
2435
|
const queryParameters = {};
|
|
1410
2436
|
const request = {
|
|
@@ -1413,24 +2439,26 @@ function createSearchClient({
|
|
|
1413
2439
|
queryParameters,
|
|
1414
2440
|
headers
|
|
1415
2441
|
};
|
|
1416
|
-
return transporter.
|
|
2442
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1417
2443
|
},
|
|
1418
2444
|
/**
|
|
1419
|
-
*
|
|
2445
|
+
* 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.
|
|
1420
2446
|
*
|
|
1421
2447
|
* Required API Key ACLs:
|
|
1422
2448
|
* - admin
|
|
1423
2449
|
*
|
|
1424
2450
|
* @deprecated
|
|
1425
|
-
* @param
|
|
1426
|
-
* @param
|
|
2451
|
+
* @param hasPendingMappings - The hasPendingMappings object.
|
|
2452
|
+
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1427
2453
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1428
2454
|
*/
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2455
|
+
hasPendingMappings({ getClusters } = {}, requestOptions = void 0) {
|
|
2456
|
+
const requestPath = "/1/clusters/mapping/pending";
|
|
1432
2457
|
const headers = {};
|
|
1433
2458
|
const queryParameters = {};
|
|
2459
|
+
if (getClusters !== void 0) {
|
|
2460
|
+
queryParameters["getClusters"] = getClusters.toString();
|
|
2461
|
+
}
|
|
1434
2462
|
const request = {
|
|
1435
2463
|
method: "GET",
|
|
1436
2464
|
path: requestPath,
|
|
@@ -1442,6 +2470,8 @@ function createSearchClient({
|
|
|
1442
2470
|
/**
|
|
1443
2471
|
* 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.
|
|
1444
2472
|
*
|
|
2473
|
+
* 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.
|
|
2474
|
+
*
|
|
1445
2475
|
* Required API Key ACLs:
|
|
1446
2476
|
* - admin
|
|
1447
2477
|
*
|
|
@@ -1449,8 +2479,9 @@ function createSearchClient({
|
|
|
1449
2479
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
1450
2480
|
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1451
2481
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2482
|
+
* @see hasPendingMappings for the plain version.
|
|
1452
2483
|
*/
|
|
1453
|
-
|
|
2484
|
+
hasPendingMappingsWithHTTPInfo({ getClusters } = {}, requestOptions = void 0) {
|
|
1454
2485
|
const requestPath = "/1/clusters/mapping/pending";
|
|
1455
2486
|
const headers = {};
|
|
1456
2487
|
const queryParameters = {};
|
|
@@ -1463,7 +2494,7 @@ function createSearchClient({
|
|
|
1463
2494
|
queryParameters,
|
|
1464
2495
|
headers
|
|
1465
2496
|
};
|
|
1466
|
-
return transporter.
|
|
2497
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1467
2498
|
},
|
|
1468
2499
|
/**
|
|
1469
2500
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
@@ -1484,6 +2515,28 @@ function createSearchClient({
|
|
|
1484
2515
|
};
|
|
1485
2516
|
return transporter.request(request, requestOptions);
|
|
1486
2517
|
},
|
|
2518
|
+
/**
|
|
2519
|
+
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
2520
|
+
*
|
|
2521
|
+
* 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.
|
|
2522
|
+
*
|
|
2523
|
+
* Required API Key ACLs:
|
|
2524
|
+
* - admin
|
|
2525
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2526
|
+
* @see listApiKeys for the plain version.
|
|
2527
|
+
*/
|
|
2528
|
+
listApiKeysWithHTTPInfo(requestOptions) {
|
|
2529
|
+
const requestPath = "/1/keys";
|
|
2530
|
+
const headers = {};
|
|
2531
|
+
const queryParameters = {};
|
|
2532
|
+
const request = {
|
|
2533
|
+
method: "GET",
|
|
2534
|
+
path: requestPath,
|
|
2535
|
+
queryParameters,
|
|
2536
|
+
headers
|
|
2537
|
+
};
|
|
2538
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2539
|
+
},
|
|
1487
2540
|
/**
|
|
1488
2541
|
* Lists the available clusters in a multi-cluster setup.
|
|
1489
2542
|
*
|
|
@@ -1505,6 +2558,30 @@ function createSearchClient({
|
|
|
1505
2558
|
};
|
|
1506
2559
|
return transporter.request(request, requestOptions);
|
|
1507
2560
|
},
|
|
2561
|
+
/**
|
|
2562
|
+
* Lists the available clusters in a multi-cluster setup.
|
|
2563
|
+
*
|
|
2564
|
+
* 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.
|
|
2565
|
+
*
|
|
2566
|
+
* Required API Key ACLs:
|
|
2567
|
+
* - admin
|
|
2568
|
+
*
|
|
2569
|
+
* @deprecated
|
|
2570
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2571
|
+
* @see listClusters for the plain version.
|
|
2572
|
+
*/
|
|
2573
|
+
listClustersWithHTTPInfo(requestOptions) {
|
|
2574
|
+
const requestPath = "/1/clusters";
|
|
2575
|
+
const headers = {};
|
|
2576
|
+
const queryParameters = {};
|
|
2577
|
+
const request = {
|
|
2578
|
+
method: "GET",
|
|
2579
|
+
path: requestPath,
|
|
2580
|
+
queryParameters,
|
|
2581
|
+
headers
|
|
2582
|
+
};
|
|
2583
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2584
|
+
},
|
|
1508
2585
|
/**
|
|
1509
2586
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
1510
2587
|
*
|
|
@@ -1533,6 +2610,37 @@ function createSearchClient({
|
|
|
1533
2610
|
};
|
|
1534
2611
|
return transporter.request(request, requestOptions);
|
|
1535
2612
|
},
|
|
2613
|
+
/**
|
|
2614
|
+
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
2615
|
+
*
|
|
2616
|
+
* 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.
|
|
2617
|
+
*
|
|
2618
|
+
* Required API Key ACLs:
|
|
2619
|
+
* - listIndexes
|
|
2620
|
+
* @param listIndices - The listIndices object.
|
|
2621
|
+
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2622
|
+
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
2623
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2624
|
+
* @see listIndices for the plain version.
|
|
2625
|
+
*/
|
|
2626
|
+
listIndicesWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2627
|
+
const requestPath = "/1/indexes";
|
|
2628
|
+
const headers = {};
|
|
2629
|
+
const queryParameters = {};
|
|
2630
|
+
if (page !== void 0) {
|
|
2631
|
+
queryParameters["page"] = page.toString();
|
|
2632
|
+
}
|
|
2633
|
+
if (hitsPerPage !== void 0) {
|
|
2634
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2635
|
+
}
|
|
2636
|
+
const request = {
|
|
2637
|
+
method: "GET",
|
|
2638
|
+
path: requestPath,
|
|
2639
|
+
queryParameters,
|
|
2640
|
+
headers
|
|
2641
|
+
};
|
|
2642
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2643
|
+
},
|
|
1536
2644
|
/**
|
|
1537
2645
|
* 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.
|
|
1538
2646
|
*
|
|
@@ -1563,6 +2671,39 @@ function createSearchClient({
|
|
|
1563
2671
|
};
|
|
1564
2672
|
return transporter.request(request, requestOptions);
|
|
1565
2673
|
},
|
|
2674
|
+
/**
|
|
2675
|
+
* 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.
|
|
2676
|
+
*
|
|
2677
|
+
* 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.
|
|
2678
|
+
*
|
|
2679
|
+
* Required API Key ACLs:
|
|
2680
|
+
* - admin
|
|
2681
|
+
*
|
|
2682
|
+
* @deprecated
|
|
2683
|
+
* @param listUserIds - The listUserIds object.
|
|
2684
|
+
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2685
|
+
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
2686
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2687
|
+
* @see listUserIds for the plain version.
|
|
2688
|
+
*/
|
|
2689
|
+
listUserIdsWithHTTPInfo({ page, hitsPerPage } = {}, requestOptions = void 0) {
|
|
2690
|
+
const requestPath = "/1/clusters/mapping";
|
|
2691
|
+
const headers = {};
|
|
2692
|
+
const queryParameters = {};
|
|
2693
|
+
if (page !== void 0) {
|
|
2694
|
+
queryParameters["page"] = page.toString();
|
|
2695
|
+
}
|
|
2696
|
+
if (hitsPerPage !== void 0) {
|
|
2697
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
2698
|
+
}
|
|
2699
|
+
const request = {
|
|
2700
|
+
method: "GET",
|
|
2701
|
+
path: requestPath,
|
|
2702
|
+
queryParameters,
|
|
2703
|
+
headers
|
|
2704
|
+
};
|
|
2705
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2706
|
+
},
|
|
1566
2707
|
/**
|
|
1567
2708
|
* 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).
|
|
1568
2709
|
*
|
|
@@ -1586,6 +2727,32 @@ function createSearchClient({
|
|
|
1586
2727
|
};
|
|
1587
2728
|
return transporter.request(request, requestOptions);
|
|
1588
2729
|
},
|
|
2730
|
+
/**
|
|
2731
|
+
* 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).
|
|
2732
|
+
*
|
|
2733
|
+
* 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.
|
|
2734
|
+
*
|
|
2735
|
+
* Required API Key ACLs:
|
|
2736
|
+
* - addObject
|
|
2737
|
+
* @param batchParams - The batchParams object.
|
|
2738
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2739
|
+
* @see multipleBatch for the plain version.
|
|
2740
|
+
*/
|
|
2741
|
+
multipleBatchWithHTTPInfo(batchParams, requestOptions) {
|
|
2742
|
+
validateRequired("batchParams", "multipleBatchWithHTTPInfo", batchParams);
|
|
2743
|
+
validateRequired("batchParams.requests", "multipleBatchWithHTTPInfo", batchParams.requests);
|
|
2744
|
+
const requestPath = "/1/indexes/*/batch";
|
|
2745
|
+
const headers = {};
|
|
2746
|
+
const queryParameters = {};
|
|
2747
|
+
const request = {
|
|
2748
|
+
method: "POST",
|
|
2749
|
+
path: requestPath,
|
|
2750
|
+
queryParameters,
|
|
2751
|
+
headers,
|
|
2752
|
+
data: batchParams
|
|
2753
|
+
};
|
|
2754
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2755
|
+
},
|
|
1589
2756
|
/**
|
|
1590
2757
|
* 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).
|
|
1591
2758
|
*
|
|
@@ -1609,13 +2776,80 @@ function createSearchClient({
|
|
|
1609
2776
|
path: requestPath,
|
|
1610
2777
|
queryParameters,
|
|
1611
2778
|
headers,
|
|
1612
|
-
data: operationIndexParams
|
|
2779
|
+
data: operationIndexParams
|
|
2780
|
+
};
|
|
2781
|
+
return transporter.request(request, requestOptions);
|
|
2782
|
+
},
|
|
2783
|
+
/**
|
|
2784
|
+
* 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).
|
|
2785
|
+
*
|
|
2786
|
+
* 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.
|
|
2787
|
+
*
|
|
2788
|
+
* Required API Key ACLs:
|
|
2789
|
+
* - addObject
|
|
2790
|
+
* @param operationIndex - The operationIndex object.
|
|
2791
|
+
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
2792
|
+
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
2793
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2794
|
+
* @see operationIndex for the plain version.
|
|
2795
|
+
*/
|
|
2796
|
+
operationIndexWithHTTPInfo({ indexName, operationIndexParams }, requestOptions) {
|
|
2797
|
+
validateRequired("indexName", "operationIndexWithHTTPInfo", indexName);
|
|
2798
|
+
validateRequired("operationIndexParams", "operationIndexWithHTTPInfo", operationIndexParams);
|
|
2799
|
+
validateRequired("operationIndexParams.operation", "operationIndexWithHTTPInfo", operationIndexParams.operation);
|
|
2800
|
+
validateRequired(
|
|
2801
|
+
"operationIndexParams.destination",
|
|
2802
|
+
"operationIndexWithHTTPInfo",
|
|
2803
|
+
operationIndexParams.destination
|
|
2804
|
+
);
|
|
2805
|
+
const requestPath = "/1/indexes/{indexName}/operation".replace("{indexName}", encodeURIComponent(indexName));
|
|
2806
|
+
const headers = {};
|
|
2807
|
+
const queryParameters = {};
|
|
2808
|
+
const request = {
|
|
2809
|
+
method: "POST",
|
|
2810
|
+
path: requestPath,
|
|
2811
|
+
queryParameters,
|
|
2812
|
+
headers,
|
|
2813
|
+
data: operationIndexParams
|
|
2814
|
+
};
|
|
2815
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2816
|
+
},
|
|
2817
|
+
/**
|
|
2818
|
+
* 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).
|
|
2819
|
+
*
|
|
2820
|
+
* Required API Key ACLs:
|
|
2821
|
+
* - addObject
|
|
2822
|
+
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2823
|
+
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
2824
|
+
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
2825
|
+
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
2826
|
+
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
2827
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2828
|
+
*/
|
|
2829
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2830
|
+
validateRequired("indexName", "partialUpdateObject", indexName);
|
|
2831
|
+
validateRequired("objectID", "partialUpdateObject", objectID);
|
|
2832
|
+
validateRequired("attributesToUpdate", "partialUpdateObject", attributesToUpdate);
|
|
2833
|
+
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
2834
|
+
const headers = {};
|
|
2835
|
+
const queryParameters = {};
|
|
2836
|
+
if (createIfNotExists !== void 0) {
|
|
2837
|
+
queryParameters["createIfNotExists"] = createIfNotExists.toString();
|
|
2838
|
+
}
|
|
2839
|
+
const request = {
|
|
2840
|
+
method: "POST",
|
|
2841
|
+
path: requestPath,
|
|
2842
|
+
queryParameters,
|
|
2843
|
+
headers,
|
|
2844
|
+
data: attributesToUpdate
|
|
1613
2845
|
};
|
|
1614
2846
|
return transporter.request(request, requestOptions);
|
|
1615
2847
|
},
|
|
1616
2848
|
/**
|
|
1617
2849
|
* 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).
|
|
1618
2850
|
*
|
|
2851
|
+
* 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.
|
|
2852
|
+
*
|
|
1619
2853
|
* Required API Key ACLs:
|
|
1620
2854
|
* - addObject
|
|
1621
2855
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
@@ -1624,11 +2858,12 @@ function createSearchClient({
|
|
|
1624
2858
|
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
1625
2859
|
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
1626
2860
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2861
|
+
* @see partialUpdateObject for the plain version.
|
|
1627
2862
|
*/
|
|
1628
|
-
|
|
1629
|
-
validateRequired("indexName", "
|
|
1630
|
-
validateRequired("objectID", "
|
|
1631
|
-
validateRequired("attributesToUpdate", "
|
|
2863
|
+
partialUpdateObjectWithHTTPInfo({ indexName, objectID, attributesToUpdate, createIfNotExists }, requestOptions) {
|
|
2864
|
+
validateRequired("indexName", "partialUpdateObjectWithHTTPInfo", indexName);
|
|
2865
|
+
validateRequired("objectID", "partialUpdateObjectWithHTTPInfo", objectID);
|
|
2866
|
+
validateRequired("attributesToUpdate", "partialUpdateObjectWithHTTPInfo", attributesToUpdate);
|
|
1632
2867
|
const requestPath = "/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
1633
2868
|
const headers = {};
|
|
1634
2869
|
const queryParameters = {};
|
|
@@ -1642,7 +2877,7 @@ function createSearchClient({
|
|
|
1642
2877
|
headers,
|
|
1643
2878
|
data: attributesToUpdate
|
|
1644
2879
|
};
|
|
1645
|
-
return transporter.
|
|
2880
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1646
2881
|
},
|
|
1647
2882
|
/**
|
|
1648
2883
|
* Deletes a user ID and its associated data from the clusters.
|
|
@@ -1668,6 +2903,33 @@ function createSearchClient({
|
|
|
1668
2903
|
};
|
|
1669
2904
|
return transporter.request(request, requestOptions);
|
|
1670
2905
|
},
|
|
2906
|
+
/**
|
|
2907
|
+
* Deletes a user ID and its associated data from the clusters.
|
|
2908
|
+
*
|
|
2909
|
+
* 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.
|
|
2910
|
+
*
|
|
2911
|
+
* Required API Key ACLs:
|
|
2912
|
+
* - admin
|
|
2913
|
+
*
|
|
2914
|
+
* @deprecated
|
|
2915
|
+
* @param removeUserId - The removeUserId object.
|
|
2916
|
+
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
2917
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2918
|
+
* @see removeUserId for the plain version.
|
|
2919
|
+
*/
|
|
2920
|
+
removeUserIdWithHTTPInfo({ userID }, requestOptions) {
|
|
2921
|
+
validateRequired("userID", "removeUserIdWithHTTPInfo", userID);
|
|
2922
|
+
const requestPath = "/1/clusters/mapping/{userID}".replace("{userID}", encodeURIComponent(userID));
|
|
2923
|
+
const headers = {};
|
|
2924
|
+
const queryParameters = {};
|
|
2925
|
+
const request = {
|
|
2926
|
+
method: "DELETE",
|
|
2927
|
+
path: requestPath,
|
|
2928
|
+
queryParameters,
|
|
2929
|
+
headers
|
|
2930
|
+
};
|
|
2931
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2932
|
+
},
|
|
1671
2933
|
/**
|
|
1672
2934
|
* Replaces the list of allowed sources.
|
|
1673
2935
|
*
|
|
@@ -1691,6 +2953,32 @@ function createSearchClient({
|
|
|
1691
2953
|
};
|
|
1692
2954
|
return transporter.request(request, requestOptions);
|
|
1693
2955
|
},
|
|
2956
|
+
/**
|
|
2957
|
+
* Replaces the list of allowed sources.
|
|
2958
|
+
*
|
|
2959
|
+
* 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.
|
|
2960
|
+
*
|
|
2961
|
+
* Required API Key ACLs:
|
|
2962
|
+
* - admin
|
|
2963
|
+
* @param replaceSources - The replaceSources object.
|
|
2964
|
+
* @param replaceSources.source - Allowed sources.
|
|
2965
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2966
|
+
* @see replaceSources for the plain version.
|
|
2967
|
+
*/
|
|
2968
|
+
replaceSourcesWithHTTPInfo({ source }, requestOptions) {
|
|
2969
|
+
validateRequired("source", "replaceSourcesWithHTTPInfo", source);
|
|
2970
|
+
const requestPath = "/1/security/sources";
|
|
2971
|
+
const headers = {};
|
|
2972
|
+
const queryParameters = {};
|
|
2973
|
+
const request = {
|
|
2974
|
+
method: "PUT",
|
|
2975
|
+
path: requestPath,
|
|
2976
|
+
queryParameters,
|
|
2977
|
+
headers,
|
|
2978
|
+
data: source
|
|
2979
|
+
};
|
|
2980
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2981
|
+
},
|
|
1694
2982
|
/**
|
|
1695
2983
|
* 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.
|
|
1696
2984
|
*
|
|
@@ -1713,6 +3001,31 @@ function createSearchClient({
|
|
|
1713
3001
|
};
|
|
1714
3002
|
return transporter.request(request, requestOptions);
|
|
1715
3003
|
},
|
|
3004
|
+
/**
|
|
3005
|
+
* 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.
|
|
3006
|
+
*
|
|
3007
|
+
* 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.
|
|
3008
|
+
*
|
|
3009
|
+
* Required API Key ACLs:
|
|
3010
|
+
* - admin
|
|
3011
|
+
* @param restoreApiKey - The restoreApiKey object.
|
|
3012
|
+
* @param restoreApiKey.key - API key.
|
|
3013
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3014
|
+
* @see restoreApiKey for the plain version.
|
|
3015
|
+
*/
|
|
3016
|
+
restoreApiKeyWithHTTPInfo({ key }, requestOptions) {
|
|
3017
|
+
validateRequired("key", "restoreApiKeyWithHTTPInfo", key);
|
|
3018
|
+
const requestPath = "/1/keys/{key}/restore".replace("{key}", encodeURIComponent(key));
|
|
3019
|
+
const headers = {};
|
|
3020
|
+
const queryParameters = {};
|
|
3021
|
+
const request = {
|
|
3022
|
+
method: "POST",
|
|
3023
|
+
path: requestPath,
|
|
3024
|
+
queryParameters,
|
|
3025
|
+
headers
|
|
3026
|
+
};
|
|
3027
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3028
|
+
},
|
|
1716
3029
|
/**
|
|
1717
3030
|
* 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).
|
|
1718
3031
|
*
|
|
@@ -1738,6 +3051,34 @@ function createSearchClient({
|
|
|
1738
3051
|
};
|
|
1739
3052
|
return transporter.request(request, requestOptions);
|
|
1740
3053
|
},
|
|
3054
|
+
/**
|
|
3055
|
+
* 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).
|
|
3056
|
+
*
|
|
3057
|
+
* 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.
|
|
3058
|
+
*
|
|
3059
|
+
* Required API Key ACLs:
|
|
3060
|
+
* - addObject
|
|
3061
|
+
* @param saveObject - The saveObject object.
|
|
3062
|
+
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
3063
|
+
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
3064
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3065
|
+
* @see saveObject for the plain version.
|
|
3066
|
+
*/
|
|
3067
|
+
saveObjectWithHTTPInfo({ indexName, body }, requestOptions) {
|
|
3068
|
+
validateRequired("indexName", "saveObjectWithHTTPInfo", indexName);
|
|
3069
|
+
validateRequired("body", "saveObjectWithHTTPInfo", body);
|
|
3070
|
+
const requestPath = "/1/indexes/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
|
|
3071
|
+
const headers = {};
|
|
3072
|
+
const queryParameters = {};
|
|
3073
|
+
const request = {
|
|
3074
|
+
method: "POST",
|
|
3075
|
+
path: requestPath,
|
|
3076
|
+
queryParameters,
|
|
3077
|
+
headers,
|
|
3078
|
+
data: body
|
|
3079
|
+
};
|
|
3080
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3081
|
+
},
|
|
1741
3082
|
/**
|
|
1742
3083
|
* 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).
|
|
1743
3084
|
*
|
|
@@ -1771,6 +3112,42 @@ function createSearchClient({
|
|
|
1771
3112
|
};
|
|
1772
3113
|
return transporter.request(request, requestOptions);
|
|
1773
3114
|
},
|
|
3115
|
+
/**
|
|
3116
|
+
* 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).
|
|
3117
|
+
*
|
|
3118
|
+
* 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.
|
|
3119
|
+
*
|
|
3120
|
+
* Required API Key ACLs:
|
|
3121
|
+
* - editSettings
|
|
3122
|
+
* @param saveRule - The saveRule object.
|
|
3123
|
+
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
3124
|
+
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
3125
|
+
* @param saveRule.rule - The rule object.
|
|
3126
|
+
* @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3127
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3128
|
+
* @see saveRule for the plain version.
|
|
3129
|
+
*/
|
|
3130
|
+
saveRuleWithHTTPInfo({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
|
|
3131
|
+
validateRequired("indexName", "saveRuleWithHTTPInfo", indexName);
|
|
3132
|
+
validateRequired("objectID", "saveRuleWithHTTPInfo", objectID);
|
|
3133
|
+
validateRequired("rule", "saveRuleWithHTTPInfo", rule);
|
|
3134
|
+
validateRequired("rule.objectID", "saveRuleWithHTTPInfo", rule.objectID);
|
|
3135
|
+
validateRequired("rule.consequence", "saveRuleWithHTTPInfo", rule.consequence);
|
|
3136
|
+
const requestPath = "/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3137
|
+
const headers = {};
|
|
3138
|
+
const queryParameters = {};
|
|
3139
|
+
if (forwardToReplicas !== void 0) {
|
|
3140
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3141
|
+
}
|
|
3142
|
+
const request = {
|
|
3143
|
+
method: "PUT",
|
|
3144
|
+
path: requestPath,
|
|
3145
|
+
queryParameters,
|
|
3146
|
+
headers,
|
|
3147
|
+
data: rule
|
|
3148
|
+
};
|
|
3149
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3150
|
+
},
|
|
1774
3151
|
/**
|
|
1775
3152
|
* 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).
|
|
1776
3153
|
*
|
|
@@ -1804,6 +3181,42 @@ function createSearchClient({
|
|
|
1804
3181
|
};
|
|
1805
3182
|
return transporter.request(request, requestOptions);
|
|
1806
3183
|
},
|
|
3184
|
+
/**
|
|
3185
|
+
* 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).
|
|
3186
|
+
*
|
|
3187
|
+
* 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.
|
|
3188
|
+
*
|
|
3189
|
+
* Required API Key ACLs:
|
|
3190
|
+
* - editSettings
|
|
3191
|
+
* @param saveRules - The saveRules object.
|
|
3192
|
+
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
3193
|
+
* @param saveRules.rules - The rules object.
|
|
3194
|
+
* @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3195
|
+
* @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
|
|
3196
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3197
|
+
* @see saveRules for the plain version.
|
|
3198
|
+
*/
|
|
3199
|
+
saveRulesWithHTTPInfo({ indexName, rules, forwardToReplicas, clearExistingRules }, requestOptions) {
|
|
3200
|
+
validateRequired("indexName", "saveRulesWithHTTPInfo", indexName);
|
|
3201
|
+
validateRequired("rules", "saveRulesWithHTTPInfo", rules);
|
|
3202
|
+
const requestPath = "/1/indexes/{indexName}/rules/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3203
|
+
const headers = {};
|
|
3204
|
+
const queryParameters = {};
|
|
3205
|
+
if (forwardToReplicas !== void 0) {
|
|
3206
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3207
|
+
}
|
|
3208
|
+
if (clearExistingRules !== void 0) {
|
|
3209
|
+
queryParameters["clearExistingRules"] = clearExistingRules.toString();
|
|
3210
|
+
}
|
|
3211
|
+
const request = {
|
|
3212
|
+
method: "POST",
|
|
3213
|
+
path: requestPath,
|
|
3214
|
+
queryParameters,
|
|
3215
|
+
headers,
|
|
3216
|
+
data: rules
|
|
3217
|
+
};
|
|
3218
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3219
|
+
},
|
|
1807
3220
|
/**
|
|
1808
3221
|
* 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).
|
|
1809
3222
|
*
|
|
@@ -1837,6 +3250,42 @@ function createSearchClient({
|
|
|
1837
3250
|
};
|
|
1838
3251
|
return transporter.request(request, requestOptions);
|
|
1839
3252
|
},
|
|
3253
|
+
/**
|
|
3254
|
+
* 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).
|
|
3255
|
+
*
|
|
3256
|
+
* 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.
|
|
3257
|
+
*
|
|
3258
|
+
* Required API Key ACLs:
|
|
3259
|
+
* - editSettings
|
|
3260
|
+
* @param saveSynonym - The saveSynonym object.
|
|
3261
|
+
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
3262
|
+
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
3263
|
+
* @param saveSynonym.synonymHit - The synonymHit object.
|
|
3264
|
+
* @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3265
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3266
|
+
* @see saveSynonym for the plain version.
|
|
3267
|
+
*/
|
|
3268
|
+
saveSynonymWithHTTPInfo({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
|
|
3269
|
+
validateRequired("indexName", "saveSynonymWithHTTPInfo", indexName);
|
|
3270
|
+
validateRequired("objectID", "saveSynonymWithHTTPInfo", objectID);
|
|
3271
|
+
validateRequired("synonymHit", "saveSynonymWithHTTPInfo", synonymHit);
|
|
3272
|
+
validateRequired("synonymHit.objectID", "saveSynonymWithHTTPInfo", synonymHit.objectID);
|
|
3273
|
+
validateRequired("synonymHit.type", "saveSynonymWithHTTPInfo", synonymHit.type);
|
|
3274
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}", encodeURIComponent(indexName)).replace("{objectID}", encodeURIComponent(objectID));
|
|
3275
|
+
const headers = {};
|
|
3276
|
+
const queryParameters = {};
|
|
3277
|
+
if (forwardToReplicas !== void 0) {
|
|
3278
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3279
|
+
}
|
|
3280
|
+
const request = {
|
|
3281
|
+
method: "PUT",
|
|
3282
|
+
path: requestPath,
|
|
3283
|
+
queryParameters,
|
|
3284
|
+
headers,
|
|
3285
|
+
data: synonymHit
|
|
3286
|
+
};
|
|
3287
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3288
|
+
},
|
|
1840
3289
|
/**
|
|
1841
3290
|
* 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).
|
|
1842
3291
|
*
|
|
@@ -1855,30 +3304,115 @@ function createSearchClient({
|
|
|
1855
3304
|
const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
1856
3305
|
const headers = {};
|
|
1857
3306
|
const queryParameters = {};
|
|
1858
|
-
if (forwardToReplicas !== void 0) {
|
|
1859
|
-
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1860
|
-
}
|
|
1861
|
-
if (replaceExistingSynonyms !== void 0) {
|
|
1862
|
-
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
1863
|
-
}
|
|
3307
|
+
if (forwardToReplicas !== void 0) {
|
|
3308
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3309
|
+
}
|
|
3310
|
+
if (replaceExistingSynonyms !== void 0) {
|
|
3311
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
3312
|
+
}
|
|
3313
|
+
const request = {
|
|
3314
|
+
method: "POST",
|
|
3315
|
+
path: requestPath,
|
|
3316
|
+
queryParameters,
|
|
3317
|
+
headers,
|
|
3318
|
+
data: synonymHit
|
|
3319
|
+
};
|
|
3320
|
+
return transporter.request(request, requestOptions);
|
|
3321
|
+
},
|
|
3322
|
+
/**
|
|
3323
|
+
* 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).
|
|
3324
|
+
*
|
|
3325
|
+
* 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.
|
|
3326
|
+
*
|
|
3327
|
+
* Required API Key ACLs:
|
|
3328
|
+
* - editSettings
|
|
3329
|
+
* @param saveSynonyms - The saveSynonyms object.
|
|
3330
|
+
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3331
|
+
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
3332
|
+
* @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3333
|
+
* @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
|
|
3334
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3335
|
+
* @see saveSynonyms for the plain version.
|
|
3336
|
+
*/
|
|
3337
|
+
saveSynonymsWithHTTPInfo({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }, requestOptions) {
|
|
3338
|
+
validateRequired("indexName", "saveSynonymsWithHTTPInfo", indexName);
|
|
3339
|
+
validateRequired("synonymHit", "saveSynonymsWithHTTPInfo", synonymHit);
|
|
3340
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/batch".replace("{indexName}", encodeURIComponent(indexName));
|
|
3341
|
+
const headers = {};
|
|
3342
|
+
const queryParameters = {};
|
|
3343
|
+
if (forwardToReplicas !== void 0) {
|
|
3344
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3345
|
+
}
|
|
3346
|
+
if (replaceExistingSynonyms !== void 0) {
|
|
3347
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
3348
|
+
}
|
|
3349
|
+
const request = {
|
|
3350
|
+
method: "POST",
|
|
3351
|
+
path: requestPath,
|
|
3352
|
+
queryParameters,
|
|
3353
|
+
headers,
|
|
3354
|
+
data: synonymHit
|
|
3355
|
+
};
|
|
3356
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3357
|
+
},
|
|
3358
|
+
/**
|
|
3359
|
+
* 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.
|
|
3360
|
+
*
|
|
3361
|
+
* Required API Key ACLs:
|
|
3362
|
+
* - search
|
|
3363
|
+
* @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
|
|
3364
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3365
|
+
*/
|
|
3366
|
+
search(searchMethodParams, requestOptions) {
|
|
3367
|
+
if (searchMethodParams && Array.isArray(searchMethodParams)) {
|
|
3368
|
+
const newSignatureRequest = {
|
|
3369
|
+
requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
|
|
3370
|
+
if (legacyRequest.type === "facet") {
|
|
3371
|
+
return {
|
|
3372
|
+
...legacyRequest,
|
|
3373
|
+
...params,
|
|
3374
|
+
type: "facet"
|
|
3375
|
+
};
|
|
3376
|
+
}
|
|
3377
|
+
return {
|
|
3378
|
+
...legacyRequest,
|
|
3379
|
+
...params,
|
|
3380
|
+
facet: void 0,
|
|
3381
|
+
maxFacetHits: void 0,
|
|
3382
|
+
facetQuery: void 0
|
|
3383
|
+
};
|
|
3384
|
+
})
|
|
3385
|
+
};
|
|
3386
|
+
searchMethodParams = newSignatureRequest;
|
|
3387
|
+
}
|
|
3388
|
+
validateRequired("searchMethodParams", "search", searchMethodParams);
|
|
3389
|
+
validateRequired("searchMethodParams.requests", "search", searchMethodParams.requests);
|
|
3390
|
+
const requestPath = "/1/indexes/*/queries";
|
|
3391
|
+
const headers = {};
|
|
3392
|
+
const queryParameters = {};
|
|
1864
3393
|
const request = {
|
|
1865
3394
|
method: "POST",
|
|
1866
3395
|
path: requestPath,
|
|
1867
3396
|
queryParameters,
|
|
1868
3397
|
headers,
|
|
1869
|
-
data:
|
|
3398
|
+
data: searchMethodParams,
|
|
3399
|
+
useReadTransporter: true,
|
|
3400
|
+
cacheable: true
|
|
1870
3401
|
};
|
|
1871
3402
|
return transporter.request(request, requestOptions);
|
|
1872
3403
|
},
|
|
1873
3404
|
/**
|
|
1874
3405
|
* 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.
|
|
1875
3406
|
*
|
|
3407
|
+
* 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.
|
|
3408
|
+
*
|
|
1876
3409
|
* Required API Key ACLs:
|
|
1877
3410
|
* - search
|
|
1878
3411
|
* @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
|
|
1879
3412
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3413
|
+
* @see search for the plain version.
|
|
1880
3414
|
*/
|
|
1881
|
-
|
|
3415
|
+
searchWithHTTPInfo(searchMethodParams, requestOptions) {
|
|
1882
3416
|
if (searchMethodParams && Array.isArray(searchMethodParams)) {
|
|
1883
3417
|
const newSignatureRequest = {
|
|
1884
3418
|
requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
|
|
@@ -1900,8 +3434,8 @@ function createSearchClient({
|
|
|
1900
3434
|
};
|
|
1901
3435
|
searchMethodParams = newSignatureRequest;
|
|
1902
3436
|
}
|
|
1903
|
-
validateRequired("searchMethodParams", "
|
|
1904
|
-
validateRequired("searchMethodParams.requests", "
|
|
3437
|
+
validateRequired("searchMethodParams", "searchWithHTTPInfo", searchMethodParams);
|
|
3438
|
+
validateRequired("searchMethodParams.requests", "searchWithHTTPInfo", searchMethodParams.requests);
|
|
1905
3439
|
const requestPath = "/1/indexes/*/queries";
|
|
1906
3440
|
const headers = {};
|
|
1907
3441
|
const queryParameters = {};
|
|
@@ -1914,7 +3448,7 @@ function createSearchClient({
|
|
|
1914
3448
|
useReadTransporter: true,
|
|
1915
3449
|
cacheable: true
|
|
1916
3450
|
};
|
|
1917
|
-
return transporter.
|
|
3451
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
1918
3452
|
},
|
|
1919
3453
|
/**
|
|
1920
3454
|
* Searches for standard and custom dictionary entries.
|
|
@@ -1951,6 +3485,48 @@ function createSearchClient({
|
|
|
1951
3485
|
};
|
|
1952
3486
|
return transporter.request(request, requestOptions);
|
|
1953
3487
|
},
|
|
3488
|
+
/**
|
|
3489
|
+
* Searches for standard and custom dictionary entries.
|
|
3490
|
+
*
|
|
3491
|
+
* 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.
|
|
3492
|
+
*
|
|
3493
|
+
* Required API Key ACLs:
|
|
3494
|
+
* - settings
|
|
3495
|
+
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
3496
|
+
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
3497
|
+
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
3498
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3499
|
+
* @see searchDictionaryEntries for the plain version.
|
|
3500
|
+
*/
|
|
3501
|
+
searchDictionaryEntriesWithHTTPInfo({ dictionaryName, searchDictionaryEntriesParams }, requestOptions) {
|
|
3502
|
+
validateRequired("dictionaryName", "searchDictionaryEntriesWithHTTPInfo", dictionaryName);
|
|
3503
|
+
validateRequired(
|
|
3504
|
+
"searchDictionaryEntriesParams",
|
|
3505
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3506
|
+
searchDictionaryEntriesParams
|
|
3507
|
+
);
|
|
3508
|
+
validateRequired(
|
|
3509
|
+
"searchDictionaryEntriesParams.query",
|
|
3510
|
+
"searchDictionaryEntriesWithHTTPInfo",
|
|
3511
|
+
searchDictionaryEntriesParams.query
|
|
3512
|
+
);
|
|
3513
|
+
const requestPath = "/1/dictionaries/{dictionaryName}/search".replace(
|
|
3514
|
+
"{dictionaryName}",
|
|
3515
|
+
encodeURIComponent(dictionaryName)
|
|
3516
|
+
);
|
|
3517
|
+
const headers = {};
|
|
3518
|
+
const queryParameters = {};
|
|
3519
|
+
const request = {
|
|
3520
|
+
method: "POST",
|
|
3521
|
+
path: requestPath,
|
|
3522
|
+
queryParameters,
|
|
3523
|
+
headers,
|
|
3524
|
+
data: searchDictionaryEntriesParams,
|
|
3525
|
+
useReadTransporter: true,
|
|
3526
|
+
cacheable: true
|
|
3527
|
+
};
|
|
3528
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3529
|
+
},
|
|
1954
3530
|
/**
|
|
1955
3531
|
* 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**.
|
|
1956
3532
|
*
|
|
@@ -1979,6 +3555,37 @@ function createSearchClient({
|
|
|
1979
3555
|
};
|
|
1980
3556
|
return transporter.request(request, requestOptions);
|
|
1981
3557
|
},
|
|
3558
|
+
/**
|
|
3559
|
+
* 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**.
|
|
3560
|
+
*
|
|
3561
|
+
* 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.
|
|
3562
|
+
*
|
|
3563
|
+
* Required API Key ACLs:
|
|
3564
|
+
* - search
|
|
3565
|
+
* @param searchForFacetValues - The searchForFacetValues object.
|
|
3566
|
+
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
3567
|
+
* @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.
|
|
3568
|
+
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
|
|
3569
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3570
|
+
* @see searchForFacetValues for the plain version.
|
|
3571
|
+
*/
|
|
3572
|
+
searchForFacetValuesWithHTTPInfo({ indexName, facetName, searchForFacetValuesRequest }, requestOptions) {
|
|
3573
|
+
validateRequired("indexName", "searchForFacetValuesWithHTTPInfo", indexName);
|
|
3574
|
+
validateRequired("facetName", "searchForFacetValuesWithHTTPInfo", facetName);
|
|
3575
|
+
const requestPath = "/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}", encodeURIComponent(indexName)).replace("{facetName}", encodeURIComponent(facetName));
|
|
3576
|
+
const headers = {};
|
|
3577
|
+
const queryParameters = {};
|
|
3578
|
+
const request = {
|
|
3579
|
+
method: "POST",
|
|
3580
|
+
path: requestPath,
|
|
3581
|
+
queryParameters,
|
|
3582
|
+
headers,
|
|
3583
|
+
data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},
|
|
3584
|
+
useReadTransporter: true,
|
|
3585
|
+
cacheable: true
|
|
3586
|
+
};
|
|
3587
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3588
|
+
},
|
|
1982
3589
|
/**
|
|
1983
3590
|
* Searches for rules in your index.
|
|
1984
3591
|
*
|
|
@@ -2005,6 +3612,35 @@ function createSearchClient({
|
|
|
2005
3612
|
};
|
|
2006
3613
|
return transporter.request(request, requestOptions);
|
|
2007
3614
|
},
|
|
3615
|
+
/**
|
|
3616
|
+
* Searches for rules in your index.
|
|
3617
|
+
*
|
|
3618
|
+
* 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.
|
|
3619
|
+
*
|
|
3620
|
+
* Required API Key ACLs:
|
|
3621
|
+
* - settings
|
|
3622
|
+
* @param searchRules - The searchRules object.
|
|
3623
|
+
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
3624
|
+
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
3625
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3626
|
+
* @see searchRules for the plain version.
|
|
3627
|
+
*/
|
|
3628
|
+
searchRulesWithHTTPInfo({ indexName, searchRulesParams }, requestOptions) {
|
|
3629
|
+
validateRequired("indexName", "searchRulesWithHTTPInfo", indexName);
|
|
3630
|
+
const requestPath = "/1/indexes/{indexName}/rules/search".replace("{indexName}", encodeURIComponent(indexName));
|
|
3631
|
+
const headers = {};
|
|
3632
|
+
const queryParameters = {};
|
|
3633
|
+
const request = {
|
|
3634
|
+
method: "POST",
|
|
3635
|
+
path: requestPath,
|
|
3636
|
+
queryParameters,
|
|
3637
|
+
headers,
|
|
3638
|
+
data: searchRulesParams ? searchRulesParams : {},
|
|
3639
|
+
useReadTransporter: true,
|
|
3640
|
+
cacheable: true
|
|
3641
|
+
};
|
|
3642
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3643
|
+
},
|
|
2008
3644
|
/**
|
|
2009
3645
|
* 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.
|
|
2010
3646
|
*
|
|
@@ -2031,6 +3667,35 @@ function createSearchClient({
|
|
|
2031
3667
|
};
|
|
2032
3668
|
return transporter.request(request, requestOptions);
|
|
2033
3669
|
},
|
|
3670
|
+
/**
|
|
3671
|
+
* 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.
|
|
3672
|
+
*
|
|
3673
|
+
* 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.
|
|
3674
|
+
*
|
|
3675
|
+
* Required API Key ACLs:
|
|
3676
|
+
* - search
|
|
3677
|
+
* @param searchSingleIndex - The searchSingleIndex object.
|
|
3678
|
+
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
3679
|
+
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
3680
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3681
|
+
* @see searchSingleIndex for the plain version.
|
|
3682
|
+
*/
|
|
3683
|
+
searchSingleIndexWithHTTPInfo({ indexName, searchParams }, requestOptions) {
|
|
3684
|
+
validateRequired("indexName", "searchSingleIndexWithHTTPInfo", indexName);
|
|
3685
|
+
const requestPath = "/1/indexes/{indexName}/query".replace("{indexName}", encodeURIComponent(indexName));
|
|
3686
|
+
const headers = {};
|
|
3687
|
+
const queryParameters = {};
|
|
3688
|
+
const request = {
|
|
3689
|
+
method: "POST",
|
|
3690
|
+
path: requestPath,
|
|
3691
|
+
queryParameters,
|
|
3692
|
+
headers,
|
|
3693
|
+
data: searchParams ? searchParams : {},
|
|
3694
|
+
useReadTransporter: true,
|
|
3695
|
+
cacheable: true
|
|
3696
|
+
};
|
|
3697
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3698
|
+
},
|
|
2034
3699
|
/**
|
|
2035
3700
|
* Searches for synonyms in your index.
|
|
2036
3701
|
*
|
|
@@ -2060,6 +3725,38 @@ function createSearchClient({
|
|
|
2060
3725
|
};
|
|
2061
3726
|
return transporter.request(request, requestOptions);
|
|
2062
3727
|
},
|
|
3728
|
+
/**
|
|
3729
|
+
* Searches for synonyms in your index.
|
|
3730
|
+
*
|
|
3731
|
+
* 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.
|
|
3732
|
+
*
|
|
3733
|
+
* Required API Key ACLs:
|
|
3734
|
+
* - settings
|
|
3735
|
+
* @param searchSynonyms - The searchSynonyms object.
|
|
3736
|
+
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3737
|
+
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
3738
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3739
|
+
* @see searchSynonyms for the plain version.
|
|
3740
|
+
*/
|
|
3741
|
+
searchSynonymsWithHTTPInfo({ indexName, searchSynonymsParams }, requestOptions) {
|
|
3742
|
+
validateRequired("indexName", "searchSynonymsWithHTTPInfo", indexName);
|
|
3743
|
+
const requestPath = "/1/indexes/{indexName}/synonyms/search".replace(
|
|
3744
|
+
"{indexName}",
|
|
3745
|
+
encodeURIComponent(indexName)
|
|
3746
|
+
);
|
|
3747
|
+
const headers = {};
|
|
3748
|
+
const queryParameters = {};
|
|
3749
|
+
const request = {
|
|
3750
|
+
method: "POST",
|
|
3751
|
+
path: requestPath,
|
|
3752
|
+
queryParameters,
|
|
3753
|
+
headers,
|
|
3754
|
+
data: searchSynonymsParams ? searchSynonymsParams : {},
|
|
3755
|
+
useReadTransporter: true,
|
|
3756
|
+
cacheable: true
|
|
3757
|
+
};
|
|
3758
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3759
|
+
},
|
|
2063
3760
|
/**
|
|
2064
3761
|
* 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).
|
|
2065
3762
|
*
|
|
@@ -2087,6 +3784,36 @@ function createSearchClient({
|
|
|
2087
3784
|
};
|
|
2088
3785
|
return transporter.request(request, requestOptions);
|
|
2089
3786
|
},
|
|
3787
|
+
/**
|
|
3788
|
+
* 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).
|
|
3789
|
+
*
|
|
3790
|
+
* 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.
|
|
3791
|
+
*
|
|
3792
|
+
* Required API Key ACLs:
|
|
3793
|
+
* - admin
|
|
3794
|
+
*
|
|
3795
|
+
* @deprecated
|
|
3796
|
+
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
3797
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3798
|
+
* @see searchUserIds for the plain version.
|
|
3799
|
+
*/
|
|
3800
|
+
searchUserIdsWithHTTPInfo(searchUserIdsParams, requestOptions) {
|
|
3801
|
+
validateRequired("searchUserIdsParams", "searchUserIdsWithHTTPInfo", searchUserIdsParams);
|
|
3802
|
+
validateRequired("searchUserIdsParams.query", "searchUserIdsWithHTTPInfo", searchUserIdsParams.query);
|
|
3803
|
+
const requestPath = "/1/clusters/mapping/search";
|
|
3804
|
+
const headers = {};
|
|
3805
|
+
const queryParameters = {};
|
|
3806
|
+
const request = {
|
|
3807
|
+
method: "POST",
|
|
3808
|
+
path: requestPath,
|
|
3809
|
+
queryParameters,
|
|
3810
|
+
headers,
|
|
3811
|
+
data: searchUserIdsParams,
|
|
3812
|
+
useReadTransporter: true,
|
|
3813
|
+
cacheable: true
|
|
3814
|
+
};
|
|
3815
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3816
|
+
},
|
|
2090
3817
|
/**
|
|
2091
3818
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
2092
3819
|
*
|
|
@@ -2114,6 +3841,36 @@ function createSearchClient({
|
|
|
2114
3841
|
};
|
|
2115
3842
|
return transporter.request(request, requestOptions);
|
|
2116
3843
|
},
|
|
3844
|
+
/**
|
|
3845
|
+
* Turns standard stop word dictionary entries on or off for a given language.
|
|
3846
|
+
*
|
|
3847
|
+
* 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.
|
|
3848
|
+
*
|
|
3849
|
+
* Required API Key ACLs:
|
|
3850
|
+
* - editSettings
|
|
3851
|
+
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
3852
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3853
|
+
* @see setDictionarySettings for the plain version.
|
|
3854
|
+
*/
|
|
3855
|
+
setDictionarySettingsWithHTTPInfo(dictionarySettingsParams, requestOptions) {
|
|
3856
|
+
validateRequired("dictionarySettingsParams", "setDictionarySettingsWithHTTPInfo", dictionarySettingsParams);
|
|
3857
|
+
validateRequired(
|
|
3858
|
+
"dictionarySettingsParams.disableStandardEntries",
|
|
3859
|
+
"setDictionarySettingsWithHTTPInfo",
|
|
3860
|
+
dictionarySettingsParams.disableStandardEntries
|
|
3861
|
+
);
|
|
3862
|
+
const requestPath = "/1/dictionaries/*/settings";
|
|
3863
|
+
const headers = {};
|
|
3864
|
+
const queryParameters = {};
|
|
3865
|
+
const request = {
|
|
3866
|
+
method: "PUT",
|
|
3867
|
+
path: requestPath,
|
|
3868
|
+
queryParameters,
|
|
3869
|
+
headers,
|
|
3870
|
+
data: dictionarySettingsParams
|
|
3871
|
+
};
|
|
3872
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3873
|
+
},
|
|
2117
3874
|
/**
|
|
2118
3875
|
* 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.
|
|
2119
3876
|
*
|
|
@@ -2143,6 +3900,38 @@ function createSearchClient({
|
|
|
2143
3900
|
};
|
|
2144
3901
|
return transporter.request(request, requestOptions);
|
|
2145
3902
|
},
|
|
3903
|
+
/**
|
|
3904
|
+
* 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.
|
|
3905
|
+
*
|
|
3906
|
+
* 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.
|
|
3907
|
+
*
|
|
3908
|
+
* Required API Key ACLs:
|
|
3909
|
+
* - editSettings
|
|
3910
|
+
* @param setSettings - The setSettings object.
|
|
3911
|
+
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
3912
|
+
* @param setSettings.indexSettings - The indexSettings object.
|
|
3913
|
+
* @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3914
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3915
|
+
* @see setSettings for the plain version.
|
|
3916
|
+
*/
|
|
3917
|
+
setSettingsWithHTTPInfo({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
|
|
3918
|
+
validateRequired("indexName", "setSettingsWithHTTPInfo", indexName);
|
|
3919
|
+
validateRequired("indexSettings", "setSettingsWithHTTPInfo", indexSettings);
|
|
3920
|
+
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
3921
|
+
const headers = {};
|
|
3922
|
+
const queryParameters = {};
|
|
3923
|
+
if (forwardToReplicas !== void 0) {
|
|
3924
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
3925
|
+
}
|
|
3926
|
+
const request = {
|
|
3927
|
+
method: "PUT",
|
|
3928
|
+
path: requestPath,
|
|
3929
|
+
queryParameters,
|
|
3930
|
+
headers,
|
|
3931
|
+
data: indexSettings
|
|
3932
|
+
};
|
|
3933
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
3934
|
+
},
|
|
2146
3935
|
/**
|
|
2147
3936
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
2148
3937
|
*
|
|
@@ -2168,6 +3957,35 @@ function createSearchClient({
|
|
|
2168
3957
|
data: apiKey
|
|
2169
3958
|
};
|
|
2170
3959
|
return transporter.request(request, requestOptions);
|
|
3960
|
+
},
|
|
3961
|
+
/**
|
|
3962
|
+
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
3963
|
+
*
|
|
3964
|
+
* 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.
|
|
3965
|
+
*
|
|
3966
|
+
* Required API Key ACLs:
|
|
3967
|
+
* - admin
|
|
3968
|
+
* @param updateApiKey - The updateApiKey object.
|
|
3969
|
+
* @param updateApiKey.key - API key.
|
|
3970
|
+
* @param updateApiKey.apiKey - The apiKey object.
|
|
3971
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3972
|
+
* @see updateApiKey for the plain version.
|
|
3973
|
+
*/
|
|
3974
|
+
updateApiKeyWithHTTPInfo({ key, apiKey }, requestOptions) {
|
|
3975
|
+
validateRequired("key", "updateApiKeyWithHTTPInfo", key);
|
|
3976
|
+
validateRequired("apiKey", "updateApiKeyWithHTTPInfo", apiKey);
|
|
3977
|
+
validateRequired("apiKey.acl", "updateApiKeyWithHTTPInfo", apiKey.acl);
|
|
3978
|
+
const requestPath = "/1/keys/{key}".replace("{key}", encodeURIComponent(key));
|
|
3979
|
+
const headers = {};
|
|
3980
|
+
const queryParameters = {};
|
|
3981
|
+
const request = {
|
|
3982
|
+
method: "PUT",
|
|
3983
|
+
path: requestPath,
|
|
3984
|
+
queryParameters,
|
|
3985
|
+
headers,
|
|
3986
|
+
data: apiKey
|
|
3987
|
+
};
|
|
3988
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
2171
3989
|
}
|
|
2172
3990
|
};
|
|
2173
3991
|
}
|