@algolia/client-search 5.7.0 → 5.8.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 +5 -6
- package/dist/browser.d.ts +1670 -1650
- package/dist/builds/browser.js +93 -155
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +1 -1
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +2 -2
- package/dist/builds/fetch.js +93 -155
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +88 -150
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +94 -156
- package/dist/builds/node.js.map +1 -1
- package/dist/fetch.d.ts +1423 -1402
- package/dist/node.d.cts +1423 -1402
- package/dist/node.d.ts +1423 -1402
- package/dist/src/searchClient.cjs +86 -148
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +89 -151
- package/dist/src/searchClient.js.map +1 -1
- package/index.js +1 -1
- package/model/acl.ts +1 -1
- package/model/action.ts +4 -4
- package/model/alternativesAsExact.ts +1 -1
- package/model/anchoring.ts +2 -2
- package/model/apiKey.ts +4 -4
- package/model/aroundPrecision.ts +1 -1
- package/model/aroundRadius.ts +1 -1
- package/model/attributeToUpdate.ts +1 -1
- package/model/automaticFacetFilters.ts +1 -1
- package/model/banner.ts +13 -0
- package/model/bannerImage.ts +12 -0
- package/model/bannerImageUrl.ts +8 -0
- package/model/bannerLink.ts +8 -0
- package/model/banners.ts +10 -0
- package/model/baseIndexSettings.ts +15 -15
- package/model/baseSearchParams.ts +1 -1
- package/model/baseSearchParamsWithoutQuery.ts +8 -8
- package/model/baseSearchResponse.ts +2 -2
- package/model/batchAssignUserIdsParams.ts +1 -1
- package/model/batchDictionaryEntriesParams.ts +1 -1
- package/model/batchParams.ts +1 -1
- package/model/batchResponse.ts +1 -1
- package/model/batchWriteParams.ts +1 -1
- package/model/booleanString.ts +1 -1
- package/model/browseParams.ts +2 -1
- package/model/browseParamsObject.ts +1 -1
- package/model/browseResponse.ts +1 -1
- package/model/builtInOperationType.ts +4 -4
- package/model/builtInOperationValue.ts +1 -1
- package/model/clientMethodProps.ts +50 -34
- package/model/consequence.ts +2 -2
- package/model/consequenceQueryObject.ts +2 -2
- package/model/deleteByParams.ts +3 -3
- package/model/dictionaryEntry.ts +2 -2
- package/model/dictionaryEntryState.ts +1 -1
- package/model/dictionaryType.ts +1 -1
- package/model/facetFilters.ts +1 -1
- package/model/facetOrdering.ts +1 -1
- package/model/facets.ts +1 -1
- package/model/fetchedIndex.ts +1 -1
- package/model/getApiKeyResponse.ts +1 -1
- package/model/getLogsResponse.ts +1 -1
- package/model/getObjectsParams.ts +1 -1
- package/model/getObjectsRequest.ts +1 -1
- package/model/getTopUserIdsResponse.ts +1 -1
- package/model/hasPendingMappingsResponse.ts +1 -1
- package/model/highlightResult.ts +1 -1
- package/model/highlightResultOption.ts +1 -1
- package/model/hit.ts +2 -2
- package/model/ignorePlurals.ts +1 -1
- package/model/index.ts +13 -7
- package/model/indexSettingsAsSearchParams.ts +15 -15
- package/model/listApiKeysResponse.ts +1 -1
- package/model/listClustersResponse.ts +1 -1
- package/model/listIndicesResponse.ts +1 -1
- package/model/listUserIdsResponse.ts +1 -1
- package/model/log.ts +1 -1
- package/model/logType.ts +1 -1
- package/model/matchLevel.ts +1 -1
- package/model/mode.ts +1 -1
- package/model/multipleBatchResponse.ts +2 -2
- package/model/numericFilters.ts +2 -2
- package/model/operationIndexParams.ts +1 -1
- package/model/operationType.ts +1 -1
- package/model/optionalFilters.ts +1 -1
- package/model/promote.ts +1 -1
- package/model/promoteObjectIDs.ts +1 -1
- package/model/queryType.ts +2 -2
- package/model/reRankingApplyFilter.ts +1 -1
- package/model/redirect.ts +1 -1
- package/model/removeStopWords.ts +1 -1
- package/model/removeWordsIfNoResults.ts +1 -1
- package/model/renderingContent.ts +4 -1
- package/model/replaceAllObjectsResponse.ts +1 -1
- package/model/rule.ts +2 -2
- package/model/scopeType.ts +1 -1
- package/model/searchDictionaryEntriesResponse.ts +1 -1
- package/model/searchForFacetValuesResponse.ts +1 -1
- package/model/searchForFacets.ts +1 -1
- package/model/searchForHits.ts +1 -1
- package/model/searchHits.ts +1 -1
- package/model/searchMethodParams.ts +1 -1
- package/model/searchParams.ts +1 -1
- package/model/searchQuery.ts +1 -1
- package/model/searchResponse.ts +1 -1
- package/model/searchResponses.ts +1 -1
- package/model/searchResult.ts +1 -1
- package/model/searchRulesResponse.ts +1 -1
- package/model/searchSynonymsResponse.ts +1 -1
- package/model/searchUserIdsParams.ts +1 -1
- package/model/searchUserIdsResponse.ts +2 -2
- package/model/securedApiKeyRestrictions.ts +1 -1
- package/model/semanticSearch.ts +1 -1
- package/model/snippetResult.ts +1 -1
- package/model/sortRemainingBy.ts +1 -1
- package/model/standardEntries.ts +3 -3
- package/model/supportedLanguage.ts +1 -1
- package/model/synonymHit.ts +3 -3
- package/model/synonymType.ts +1 -1
- package/model/tagFilters.ts +1 -1
- package/model/taskStatus.ts +1 -1
- package/model/typoTolerance.ts +2 -2
- package/model/userHit.ts +1 -1
- package/model/value.ts +2 -2
- package/model/widgets.ts +10 -0
- package/package.json +6 -6
|
@@ -25,7 +25,7 @@ __export(searchClient_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(searchClient_exports);
|
|
27
27
|
var import_client_common = require("@algolia/client-common");
|
|
28
|
-
var apiClientVersion = "5.
|
|
28
|
+
var apiClientVersion = "5.8.0";
|
|
29
29
|
function getDefaultHosts(appId) {
|
|
30
30
|
return [
|
|
31
31
|
{
|
|
@@ -523,8 +523,7 @@ function createSearchClient({
|
|
|
523
523
|
* Creates a new API key with specific permissions and restrictions.
|
|
524
524
|
*
|
|
525
525
|
* Required API Key ACLs:
|
|
526
|
-
*
|
|
527
|
-
*
|
|
526
|
+
* - admin
|
|
528
527
|
* @param apiKey - The apiKey object.
|
|
529
528
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
530
529
|
*/
|
|
@@ -551,12 +550,11 @@ function createSearchClient({
|
|
|
551
550
|
* If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
|
|
552
551
|
*
|
|
553
552
|
* Required API Key ACLs:
|
|
554
|
-
*
|
|
555
|
-
*
|
|
553
|
+
* - addObject
|
|
556
554
|
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
557
555
|
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
558
556
|
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
559
|
-
* @param addOrUpdateObject.body - The record
|
|
557
|
+
* @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
560
558
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
561
559
|
*/
|
|
562
560
|
addOrUpdateObject({ indexName, objectID, body }, requestOptions) {
|
|
@@ -585,8 +583,7 @@ function createSearchClient({
|
|
|
585
583
|
* Adds a source to the list of allowed sources.
|
|
586
584
|
*
|
|
587
585
|
* Required API Key ACLs:
|
|
588
|
-
*
|
|
589
|
-
*
|
|
586
|
+
* - admin
|
|
590
587
|
* @param source - Source to add.
|
|
591
588
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
592
589
|
*/
|
|
@@ -613,8 +610,7 @@ function createSearchClient({
|
|
|
613
610
|
* 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.
|
|
614
611
|
*
|
|
615
612
|
* Required API Key ACLs:
|
|
616
|
-
*
|
|
617
|
-
*
|
|
613
|
+
* - admin
|
|
618
614
|
* @param assignUserId - The assignUserId object.
|
|
619
615
|
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
620
616
|
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
@@ -647,7 +643,6 @@ function createSearchClient({
|
|
|
647
643
|
},
|
|
648
644
|
/**
|
|
649
645
|
* 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.
|
|
650
|
-
*
|
|
651
646
|
* @param batch - The batch object.
|
|
652
647
|
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
653
648
|
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
@@ -679,8 +674,7 @@ function createSearchClient({
|
|
|
679
674
|
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
680
675
|
*
|
|
681
676
|
* Required API Key ACLs:
|
|
682
|
-
*
|
|
683
|
-
*
|
|
677
|
+
* - admin
|
|
684
678
|
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
685
679
|
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
686
680
|
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
@@ -718,8 +712,7 @@ function createSearchClient({
|
|
|
718
712
|
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
719
713
|
*
|
|
720
714
|
* Required API Key ACLs:
|
|
721
|
-
*
|
|
722
|
-
*
|
|
715
|
+
* - editSettings
|
|
723
716
|
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
724
717
|
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
725
718
|
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
@@ -753,11 +746,10 @@ function createSearchClient({
|
|
|
753
746
|
return transporter.request(request, requestOptions);
|
|
754
747
|
},
|
|
755
748
|
/**
|
|
756
|
-
* Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want 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, 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`
|
|
749
|
+
* Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want 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, 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\'ll be ignored.
|
|
757
750
|
*
|
|
758
751
|
* Required API Key ACLs:
|
|
759
|
-
*
|
|
760
|
-
*
|
|
752
|
+
* - browse
|
|
761
753
|
* @param browse - The browse object.
|
|
762
754
|
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
763
755
|
* @param browse.browseParams - The browseParams object.
|
|
@@ -783,8 +775,7 @@ function createSearchClient({
|
|
|
783
775
|
* Deletes only the records from an index while keeping settings, synonyms, and rules.
|
|
784
776
|
*
|
|
785
777
|
* Required API Key ACLs:
|
|
786
|
-
*
|
|
787
|
-
*
|
|
778
|
+
* - deleteIndex
|
|
788
779
|
* @param clearObjects - The clearObjects object.
|
|
789
780
|
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
790
781
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -808,8 +799,7 @@ function createSearchClient({
|
|
|
808
799
|
* Deletes all rules from the index.
|
|
809
800
|
*
|
|
810
801
|
* Required API Key ACLs:
|
|
811
|
-
*
|
|
812
|
-
*
|
|
802
|
+
* - editSettings
|
|
813
803
|
* @param clearRules - The clearRules object.
|
|
814
804
|
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
815
805
|
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
@@ -823,7 +813,7 @@ function createSearchClient({
|
|
|
823
813
|
const headers = {};
|
|
824
814
|
const queryParameters = {};
|
|
825
815
|
if (forwardToReplicas !== void 0) {
|
|
826
|
-
queryParameters
|
|
816
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
827
817
|
}
|
|
828
818
|
const request = {
|
|
829
819
|
method: "POST",
|
|
@@ -837,8 +827,7 @@ function createSearchClient({
|
|
|
837
827
|
* Deletes all synonyms from the index.
|
|
838
828
|
*
|
|
839
829
|
* Required API Key ACLs:
|
|
840
|
-
*
|
|
841
|
-
*
|
|
830
|
+
* - editSettings
|
|
842
831
|
* @param clearSynonyms - The clearSynonyms object.
|
|
843
832
|
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
844
833
|
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
@@ -852,7 +841,7 @@ function createSearchClient({
|
|
|
852
841
|
const headers = {};
|
|
853
842
|
const queryParameters = {};
|
|
854
843
|
if (forwardToReplicas !== void 0) {
|
|
855
|
-
queryParameters
|
|
844
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
856
845
|
}
|
|
857
846
|
const request = {
|
|
858
847
|
method: "POST",
|
|
@@ -864,7 +853,6 @@ function createSearchClient({
|
|
|
864
853
|
},
|
|
865
854
|
/**
|
|
866
855
|
* This method allow you to send requests to the Algolia REST API.
|
|
867
|
-
*
|
|
868
856
|
* @param customDelete - The customDelete object.
|
|
869
857
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
870
858
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -887,7 +875,6 @@ function createSearchClient({
|
|
|
887
875
|
},
|
|
888
876
|
/**
|
|
889
877
|
* This method allow you to send requests to the Algolia REST API.
|
|
890
|
-
*
|
|
891
878
|
* @param customGet - The customGet object.
|
|
892
879
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
893
880
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -910,7 +897,6 @@ function createSearchClient({
|
|
|
910
897
|
},
|
|
911
898
|
/**
|
|
912
899
|
* This method allow you to send requests to the Algolia REST API.
|
|
913
|
-
*
|
|
914
900
|
* @param customPost - The customPost object.
|
|
915
901
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
916
902
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -935,7 +921,6 @@ function createSearchClient({
|
|
|
935
921
|
},
|
|
936
922
|
/**
|
|
937
923
|
* This method allow you to send requests to the Algolia REST API.
|
|
938
|
-
*
|
|
939
924
|
* @param customPut - The customPut object.
|
|
940
925
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
941
926
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -962,8 +947,7 @@ function createSearchClient({
|
|
|
962
947
|
* Deletes the API key.
|
|
963
948
|
*
|
|
964
949
|
* Required API Key ACLs:
|
|
965
|
-
*
|
|
966
|
-
*
|
|
950
|
+
* - admin
|
|
967
951
|
* @param deleteApiKey - The deleteApiKey object.
|
|
968
952
|
* @param deleteApiKey.key - API key.
|
|
969
953
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -987,8 +971,7 @@ function createSearchClient({
|
|
|
987
971
|
* This operation doesn\'t accept empty queries or filters. It\'s more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](#tag/Records/operation/batch).
|
|
988
972
|
*
|
|
989
973
|
* Required API Key ACLs:
|
|
990
|
-
*
|
|
991
|
-
*
|
|
974
|
+
* - deleteIndex
|
|
992
975
|
* @param deleteBy - The deleteBy object.
|
|
993
976
|
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
994
977
|
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
@@ -1017,8 +1000,7 @@ function createSearchClient({
|
|
|
1017
1000
|
* 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/).
|
|
1018
1001
|
*
|
|
1019
1002
|
* Required API Key ACLs:
|
|
1020
|
-
*
|
|
1021
|
-
*
|
|
1003
|
+
* - deleteIndex
|
|
1022
1004
|
* @param deleteIndex - The deleteIndex object.
|
|
1023
1005
|
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
1024
1006
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1042,8 +1024,7 @@ function createSearchClient({
|
|
|
1042
1024
|
* Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy).
|
|
1043
1025
|
*
|
|
1044
1026
|
* Required API Key ACLs:
|
|
1045
|
-
*
|
|
1046
|
-
*
|
|
1027
|
+
* - deleteObject
|
|
1047
1028
|
* @param deleteObject - The deleteObject object.
|
|
1048
1029
|
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
1049
1030
|
* @param deleteObject.objectID - Unique record identifier.
|
|
@@ -1071,8 +1052,7 @@ function createSearchClient({
|
|
|
1071
1052
|
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
1072
1053
|
*
|
|
1073
1054
|
* Required API Key ACLs:
|
|
1074
|
-
*
|
|
1075
|
-
*
|
|
1055
|
+
* - editSettings
|
|
1076
1056
|
* @param deleteRule - The deleteRule object.
|
|
1077
1057
|
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
1078
1058
|
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
@@ -1090,7 +1070,7 @@ function createSearchClient({
|
|
|
1090
1070
|
const headers = {};
|
|
1091
1071
|
const queryParameters = {};
|
|
1092
1072
|
if (forwardToReplicas !== void 0) {
|
|
1093
|
-
queryParameters
|
|
1073
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1094
1074
|
}
|
|
1095
1075
|
const request = {
|
|
1096
1076
|
method: "DELETE",
|
|
@@ -1104,8 +1084,7 @@ function createSearchClient({
|
|
|
1104
1084
|
* Deletes a source from the list of allowed sources.
|
|
1105
1085
|
*
|
|
1106
1086
|
* Required API Key ACLs:
|
|
1107
|
-
*
|
|
1108
|
-
*
|
|
1087
|
+
* - admin
|
|
1109
1088
|
* @param deleteSource - The deleteSource object.
|
|
1110
1089
|
* @param deleteSource.source - IP address range of the source.
|
|
1111
1090
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1129,8 +1108,7 @@ function createSearchClient({
|
|
|
1129
1108
|
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
1130
1109
|
*
|
|
1131
1110
|
* Required API Key ACLs:
|
|
1132
|
-
*
|
|
1133
|
-
*
|
|
1111
|
+
* - editSettings
|
|
1134
1112
|
* @param deleteSynonym - The deleteSynonym object.
|
|
1135
1113
|
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
1136
1114
|
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1148,7 +1126,7 @@ function createSearchClient({
|
|
|
1148
1126
|
const headers = {};
|
|
1149
1127
|
const queryParameters = {};
|
|
1150
1128
|
if (forwardToReplicas !== void 0) {
|
|
1151
|
-
queryParameters
|
|
1129
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1152
1130
|
}
|
|
1153
1131
|
const request = {
|
|
1154
1132
|
method: "DELETE",
|
|
@@ -1160,7 +1138,6 @@ function createSearchClient({
|
|
|
1160
1138
|
},
|
|
1161
1139
|
/**
|
|
1162
1140
|
* 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>`.
|
|
1163
|
-
*
|
|
1164
1141
|
* @param getApiKey - The getApiKey object.
|
|
1165
1142
|
* @param getApiKey.key - API key.
|
|
1166
1143
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1184,8 +1161,7 @@ function createSearchClient({
|
|
|
1184
1161
|
* Checks the status of a given application task.
|
|
1185
1162
|
*
|
|
1186
1163
|
* Required API Key ACLs:
|
|
1187
|
-
*
|
|
1188
|
-
*
|
|
1164
|
+
* - editSettings
|
|
1189
1165
|
* @param getAppTask - The getAppTask object.
|
|
1190
1166
|
* @param getAppTask.taskID - Unique task identifier.
|
|
1191
1167
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1209,8 +1185,7 @@ function createSearchClient({
|
|
|
1209
1185
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1210
1186
|
*
|
|
1211
1187
|
* Required API Key ACLs:
|
|
1212
|
-
*
|
|
1213
|
-
*
|
|
1188
|
+
* - settings
|
|
1214
1189
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1215
1190
|
*/
|
|
1216
1191
|
getDictionaryLanguages(requestOptions) {
|
|
@@ -1229,8 +1204,7 @@ function createSearchClient({
|
|
|
1229
1204
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1230
1205
|
*
|
|
1231
1206
|
* Required API Key ACLs:
|
|
1232
|
-
*
|
|
1233
|
-
*
|
|
1207
|
+
* - settings
|
|
1234
1208
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1235
1209
|
*/
|
|
1236
1210
|
getDictionarySettings(requestOptions) {
|
|
@@ -1249,8 +1223,7 @@ function createSearchClient({
|
|
|
1249
1223
|
* 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/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn\'t appear in the logs itself.
|
|
1250
1224
|
*
|
|
1251
1225
|
* Required API Key ACLs:
|
|
1252
|
-
*
|
|
1253
|
-
*
|
|
1226
|
+
* - logs
|
|
1254
1227
|
* @param getLogs - The getLogs object.
|
|
1255
1228
|
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
1256
1229
|
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
@@ -1263,16 +1236,16 @@ function createSearchClient({
|
|
|
1263
1236
|
const headers = {};
|
|
1264
1237
|
const queryParameters = {};
|
|
1265
1238
|
if (offset !== void 0) {
|
|
1266
|
-
queryParameters
|
|
1239
|
+
queryParameters["offset"] = offset.toString();
|
|
1267
1240
|
}
|
|
1268
1241
|
if (length !== void 0) {
|
|
1269
|
-
queryParameters
|
|
1242
|
+
queryParameters["length"] = length.toString();
|
|
1270
1243
|
}
|
|
1271
1244
|
if (indexName !== void 0) {
|
|
1272
|
-
queryParameters
|
|
1245
|
+
queryParameters["indexName"] = indexName.toString();
|
|
1273
1246
|
}
|
|
1274
1247
|
if (type !== void 0) {
|
|
1275
|
-
queryParameters
|
|
1248
|
+
queryParameters["type"] = type.toString();
|
|
1276
1249
|
}
|
|
1277
1250
|
const request = {
|
|
1278
1251
|
method: "GET",
|
|
@@ -1286,8 +1259,7 @@ function createSearchClient({
|
|
|
1286
1259
|
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
|
1287
1260
|
*
|
|
1288
1261
|
* Required API Key ACLs:
|
|
1289
|
-
*
|
|
1290
|
-
*
|
|
1262
|
+
* - search
|
|
1291
1263
|
* @param getObject - The getObject object.
|
|
1292
1264
|
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
1293
1265
|
* @param getObject.objectID - Unique record identifier.
|
|
@@ -1305,7 +1277,7 @@ function createSearchClient({
|
|
|
1305
1277
|
const headers = {};
|
|
1306
1278
|
const queryParameters = {};
|
|
1307
1279
|
if (attributesToRetrieve !== void 0) {
|
|
1308
|
-
queryParameters
|
|
1280
|
+
queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
|
|
1309
1281
|
}
|
|
1310
1282
|
const request = {
|
|
1311
1283
|
method: "GET",
|
|
@@ -1319,8 +1291,7 @@ function createSearchClient({
|
|
|
1319
1291
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
1320
1292
|
*
|
|
1321
1293
|
* Required API Key ACLs:
|
|
1322
|
-
*
|
|
1323
|
-
*
|
|
1294
|
+
* - search
|
|
1324
1295
|
* @param getObjectsParams - Request object.
|
|
1325
1296
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1326
1297
|
*/
|
|
@@ -1349,8 +1320,7 @@ function createSearchClient({
|
|
|
1349
1320
|
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
1350
1321
|
*
|
|
1351
1322
|
* Required API Key ACLs:
|
|
1352
|
-
*
|
|
1353
|
-
*
|
|
1323
|
+
* - settings
|
|
1354
1324
|
* @param getRule - The getRule object.
|
|
1355
1325
|
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
1356
1326
|
* @param getRule.objectID - Unique identifier of a rule object.
|
|
@@ -1378,8 +1348,7 @@ function createSearchClient({
|
|
|
1378
1348
|
* Retrieves an object with non-null index settings.
|
|
1379
1349
|
*
|
|
1380
1350
|
* Required API Key ACLs:
|
|
1381
|
-
*
|
|
1382
|
-
*
|
|
1351
|
+
* - search
|
|
1383
1352
|
* @param getSettings - The getSettings object.
|
|
1384
1353
|
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
1385
1354
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1403,8 +1372,7 @@ function createSearchClient({
|
|
|
1403
1372
|
* Retrieves all allowed IP addresses with access to your application.
|
|
1404
1373
|
*
|
|
1405
1374
|
* Required API Key ACLs:
|
|
1406
|
-
*
|
|
1407
|
-
*
|
|
1375
|
+
* - admin
|
|
1408
1376
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1409
1377
|
*/
|
|
1410
1378
|
getSources(requestOptions) {
|
|
@@ -1420,11 +1388,10 @@ function createSearchClient({
|
|
|
1420
1388
|
return transporter.request(request, requestOptions);
|
|
1421
1389
|
},
|
|
1422
1390
|
/**
|
|
1423
|
-
* Retrieves a
|
|
1391
|
+
* Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
1424
1392
|
*
|
|
1425
1393
|
* Required API Key ACLs:
|
|
1426
|
-
*
|
|
1427
|
-
*
|
|
1394
|
+
* - settings
|
|
1428
1395
|
* @param getSynonym - The getSynonym object.
|
|
1429
1396
|
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
1430
1397
|
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1452,8 +1419,7 @@ function createSearchClient({
|
|
|
1452
1419
|
* 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.
|
|
1453
1420
|
*
|
|
1454
1421
|
* Required API Key ACLs:
|
|
1455
|
-
*
|
|
1456
|
-
*
|
|
1422
|
+
* - addObject
|
|
1457
1423
|
* @param getTask - The getTask object.
|
|
1458
1424
|
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
1459
1425
|
* @param getTask.taskID - Unique task identifier.
|
|
@@ -1481,8 +1447,7 @@ function createSearchClient({
|
|
|
1481
1447
|
* 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.
|
|
1482
1448
|
*
|
|
1483
1449
|
* Required API Key ACLs:
|
|
1484
|
-
*
|
|
1485
|
-
*
|
|
1450
|
+
* - admin
|
|
1486
1451
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1487
1452
|
*/
|
|
1488
1453
|
getTopUserIds(requestOptions) {
|
|
@@ -1501,8 +1466,7 @@ function createSearchClient({
|
|
|
1501
1466
|
* 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.
|
|
1502
1467
|
*
|
|
1503
1468
|
* Required API Key ACLs:
|
|
1504
|
-
*
|
|
1505
|
-
*
|
|
1469
|
+
* - admin
|
|
1506
1470
|
* @param getUserId - The getUserId object.
|
|
1507
1471
|
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1508
1472
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1526,8 +1490,7 @@ function createSearchClient({
|
|
|
1526
1490
|
* 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.
|
|
1527
1491
|
*
|
|
1528
1492
|
* Required API Key ACLs:
|
|
1529
|
-
*
|
|
1530
|
-
*
|
|
1493
|
+
* - admin
|
|
1531
1494
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
1532
1495
|
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1533
1496
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1537,7 +1500,7 @@ function createSearchClient({
|
|
|
1537
1500
|
const headers = {};
|
|
1538
1501
|
const queryParameters = {};
|
|
1539
1502
|
if (getClusters !== void 0) {
|
|
1540
|
-
queryParameters
|
|
1503
|
+
queryParameters["getClusters"] = getClusters.toString();
|
|
1541
1504
|
}
|
|
1542
1505
|
const request = {
|
|
1543
1506
|
method: "GET",
|
|
@@ -1551,8 +1514,7 @@ function createSearchClient({
|
|
|
1551
1514
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
1552
1515
|
*
|
|
1553
1516
|
* Required API Key ACLs:
|
|
1554
|
-
*
|
|
1555
|
-
*
|
|
1517
|
+
* - admin
|
|
1556
1518
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1557
1519
|
*/
|
|
1558
1520
|
listApiKeys(requestOptions) {
|
|
@@ -1571,8 +1533,7 @@ function createSearchClient({
|
|
|
1571
1533
|
* Lists the available clusters in a multi-cluster setup.
|
|
1572
1534
|
*
|
|
1573
1535
|
* Required API Key ACLs:
|
|
1574
|
-
*
|
|
1575
|
-
*
|
|
1536
|
+
* - admin
|
|
1576
1537
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1577
1538
|
*/
|
|
1578
1539
|
listClusters(requestOptions) {
|
|
@@ -1591,8 +1552,7 @@ function createSearchClient({
|
|
|
1591
1552
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
1592
1553
|
*
|
|
1593
1554
|
* Required API Key ACLs:
|
|
1594
|
-
*
|
|
1595
|
-
*
|
|
1555
|
+
* - listIndexes
|
|
1596
1556
|
* @param listIndices - The listIndices object.
|
|
1597
1557
|
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
1598
1558
|
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
@@ -1603,10 +1563,10 @@ function createSearchClient({
|
|
|
1603
1563
|
const headers = {};
|
|
1604
1564
|
const queryParameters = {};
|
|
1605
1565
|
if (page !== void 0) {
|
|
1606
|
-
queryParameters
|
|
1566
|
+
queryParameters["page"] = page.toString();
|
|
1607
1567
|
}
|
|
1608
1568
|
if (hitsPerPage !== void 0) {
|
|
1609
|
-
queryParameters
|
|
1569
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
1610
1570
|
}
|
|
1611
1571
|
const request = {
|
|
1612
1572
|
method: "GET",
|
|
@@ -1620,8 +1580,7 @@ function createSearchClient({
|
|
|
1620
1580
|
* 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.
|
|
1621
1581
|
*
|
|
1622
1582
|
* Required API Key ACLs:
|
|
1623
|
-
*
|
|
1624
|
-
*
|
|
1583
|
+
* - admin
|
|
1625
1584
|
* @param listUserIds - The listUserIds object.
|
|
1626
1585
|
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
1627
1586
|
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
@@ -1632,10 +1591,10 @@ function createSearchClient({
|
|
|
1632
1591
|
const headers = {};
|
|
1633
1592
|
const queryParameters = {};
|
|
1634
1593
|
if (page !== void 0) {
|
|
1635
|
-
queryParameters
|
|
1594
|
+
queryParameters["page"] = page.toString();
|
|
1636
1595
|
}
|
|
1637
1596
|
if (hitsPerPage !== void 0) {
|
|
1638
|
-
queryParameters
|
|
1597
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
1639
1598
|
}
|
|
1640
1599
|
const request = {
|
|
1641
1600
|
method: "GET",
|
|
@@ -1647,7 +1606,6 @@ function createSearchClient({
|
|
|
1647
1606
|
},
|
|
1648
1607
|
/**
|
|
1649
1608
|
* 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.
|
|
1650
|
-
*
|
|
1651
1609
|
* @param batchParams - The batchParams object.
|
|
1652
1610
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1653
1611
|
*/
|
|
@@ -1671,11 +1629,10 @@ function createSearchClient({
|
|
|
1671
1629
|
return transporter.request(request, requestOptions);
|
|
1672
1630
|
},
|
|
1673
1631
|
/**
|
|
1674
|
-
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of 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). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data
|
|
1632
|
+
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of 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). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist 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. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
|
|
1675
1633
|
*
|
|
1676
1634
|
* Required API Key ACLs:
|
|
1677
|
-
*
|
|
1678
|
-
*
|
|
1635
|
+
* - addObject
|
|
1679
1636
|
* @param operationIndex - The operationIndex object.
|
|
1680
1637
|
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
1681
1638
|
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
@@ -1707,11 +1664,10 @@ function createSearchClient({
|
|
|
1707
1664
|
return transporter.request(request, requestOptions);
|
|
1708
1665
|
},
|
|
1709
1666
|
/**
|
|
1710
|
-
* Adds new attributes to a record, or
|
|
1667
|
+
* 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. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. To update an attribute without pushing the entire record, you can use these built-in operations. These operations can be helpful if you don\'t have access to your initial data. - 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, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn\'t exist, the engine 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, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn\'t exist yet, the engine only creates it if you pass an IncrementSet value greater than 0. You can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties: - _operation: the operation to apply on the attribute - value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove.
|
|
1711
1668
|
*
|
|
1712
1669
|
* Required API Key ACLs:
|
|
1713
|
-
*
|
|
1714
|
-
*
|
|
1670
|
+
* - addObject
|
|
1715
1671
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
1716
1672
|
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
1717
1673
|
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
@@ -1733,7 +1689,7 @@ function createSearchClient({
|
|
|
1733
1689
|
const headers = {};
|
|
1734
1690
|
const queryParameters = {};
|
|
1735
1691
|
if (createIfNotExists !== void 0) {
|
|
1736
|
-
queryParameters
|
|
1692
|
+
queryParameters["createIfNotExists"] = createIfNotExists.toString();
|
|
1737
1693
|
}
|
|
1738
1694
|
const request = {
|
|
1739
1695
|
method: "POST",
|
|
@@ -1748,8 +1704,7 @@ function createSearchClient({
|
|
|
1748
1704
|
* Deletes a user ID and its associated data from the clusters.
|
|
1749
1705
|
*
|
|
1750
1706
|
* Required API Key ACLs:
|
|
1751
|
-
*
|
|
1752
|
-
*
|
|
1707
|
+
* - admin
|
|
1753
1708
|
* @param removeUserId - The removeUserId object.
|
|
1754
1709
|
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
1755
1710
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1773,8 +1728,7 @@ function createSearchClient({
|
|
|
1773
1728
|
* Replaces the list of allowed sources.
|
|
1774
1729
|
*
|
|
1775
1730
|
* Required API Key ACLs:
|
|
1776
|
-
*
|
|
1777
|
-
*
|
|
1731
|
+
* - admin
|
|
1778
1732
|
* @param replaceSources - The replaceSources object.
|
|
1779
1733
|
* @param replaceSources.source - Allowed sources.
|
|
1780
1734
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1799,8 +1753,7 @@ function createSearchClient({
|
|
|
1799
1753
|
* 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.
|
|
1800
1754
|
*
|
|
1801
1755
|
* Required API Key ACLs:
|
|
1802
|
-
*
|
|
1803
|
-
*
|
|
1756
|
+
* - admin
|
|
1804
1757
|
* @param restoreApiKey - The restoreApiKey object.
|
|
1805
1758
|
* @param restoreApiKey.key - API key.
|
|
1806
1759
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1824,11 +1777,10 @@ function createSearchClient({
|
|
|
1824
1777
|
* Adds a record to an index or replace 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](#tag/Records/operation/partialUpdateObject). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
|
|
1825
1778
|
*
|
|
1826
1779
|
* Required API Key ACLs:
|
|
1827
|
-
*
|
|
1828
|
-
*
|
|
1780
|
+
* - addObject
|
|
1829
1781
|
* @param saveObject - The saveObject object.
|
|
1830
1782
|
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
1831
|
-
* @param saveObject.body - The record
|
|
1783
|
+
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
1832
1784
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1833
1785
|
*/
|
|
1834
1786
|
saveObject({ indexName, body }, requestOptions) {
|
|
@@ -1854,8 +1806,7 @@ function createSearchClient({
|
|
|
1854
1806
|
* 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](#tag/Rules/operation/saveRules).
|
|
1855
1807
|
*
|
|
1856
1808
|
* Required API Key ACLs:
|
|
1857
|
-
*
|
|
1858
|
-
*
|
|
1809
|
+
* - editSettings
|
|
1859
1810
|
* @param saveRule - The saveRule object.
|
|
1860
1811
|
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
1861
1812
|
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
@@ -1880,7 +1831,7 @@ function createSearchClient({
|
|
|
1880
1831
|
const headers = {};
|
|
1881
1832
|
const queryParameters = {};
|
|
1882
1833
|
if (forwardToReplicas !== void 0) {
|
|
1883
|
-
queryParameters
|
|
1834
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1884
1835
|
}
|
|
1885
1836
|
const request = {
|
|
1886
1837
|
method: "PUT",
|
|
@@ -1895,8 +1846,7 @@ function createSearchClient({
|
|
|
1895
1846
|
* 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.
|
|
1896
1847
|
*
|
|
1897
1848
|
* Required API Key ACLs:
|
|
1898
|
-
*
|
|
1899
|
-
*
|
|
1849
|
+
* - editSettings
|
|
1900
1850
|
* @param saveRules - The saveRules object.
|
|
1901
1851
|
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
1902
1852
|
* @param saveRules.rules - The rules object.
|
|
@@ -1915,10 +1865,10 @@ function createSearchClient({
|
|
|
1915
1865
|
const headers = {};
|
|
1916
1866
|
const queryParameters = {};
|
|
1917
1867
|
if (forwardToReplicas !== void 0) {
|
|
1918
|
-
queryParameters
|
|
1868
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1919
1869
|
}
|
|
1920
1870
|
if (clearExistingRules !== void 0) {
|
|
1921
|
-
queryParameters
|
|
1871
|
+
queryParameters["clearExistingRules"] = clearExistingRules.toString();
|
|
1922
1872
|
}
|
|
1923
1873
|
const request = {
|
|
1924
1874
|
method: "POST",
|
|
@@ -1933,8 +1883,7 @@ function createSearchClient({
|
|
|
1933
1883
|
* 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](#tag/Synonyms/operation/saveSynonyms).
|
|
1934
1884
|
*
|
|
1935
1885
|
* Required API Key ACLs:
|
|
1936
|
-
*
|
|
1937
|
-
*
|
|
1886
|
+
* - editSettings
|
|
1938
1887
|
* @param saveSynonym - The saveSynonym object.
|
|
1939
1888
|
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
1940
1889
|
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1962,7 +1911,7 @@ function createSearchClient({
|
|
|
1962
1911
|
const headers = {};
|
|
1963
1912
|
const queryParameters = {};
|
|
1964
1913
|
if (forwardToReplicas !== void 0) {
|
|
1965
|
-
queryParameters
|
|
1914
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1966
1915
|
}
|
|
1967
1916
|
const request = {
|
|
1968
1917
|
method: "PUT",
|
|
@@ -1977,8 +1926,7 @@ function createSearchClient({
|
|
|
1977
1926
|
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
|
|
1978
1927
|
*
|
|
1979
1928
|
* Required API Key ACLs:
|
|
1980
|
-
*
|
|
1981
|
-
*
|
|
1929
|
+
* - editSettings
|
|
1982
1930
|
* @param saveSynonyms - The saveSynonyms object.
|
|
1983
1931
|
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1984
1932
|
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
@@ -1997,10 +1945,10 @@ function createSearchClient({
|
|
|
1997
1945
|
const headers = {};
|
|
1998
1946
|
const queryParameters = {};
|
|
1999
1947
|
if (forwardToReplicas !== void 0) {
|
|
2000
|
-
queryParameters
|
|
1948
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
2001
1949
|
}
|
|
2002
1950
|
if (replaceExistingSynonyms !== void 0) {
|
|
2003
|
-
queryParameters
|
|
1951
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
2004
1952
|
}
|
|
2005
1953
|
const request = {
|
|
2006
1954
|
method: "POST",
|
|
@@ -2012,11 +1960,10 @@ function createSearchClient({
|
|
|
2012
1960
|
return transporter.request(request, requestOptions);
|
|
2013
1961
|
},
|
|
2014
1962
|
/**
|
|
2015
|
-
* Sends multiple search
|
|
1963
|
+
* Sends multiple search requests to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters.
|
|
2016
1964
|
*
|
|
2017
1965
|
* Required API Key ACLs:
|
|
2018
|
-
*
|
|
2019
|
-
*
|
|
1966
|
+
* - search
|
|
2020
1967
|
* @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
|
|
2021
1968
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2022
1969
|
*/
|
|
@@ -2066,8 +2013,7 @@ function createSearchClient({
|
|
|
2066
2013
|
* Searches for standard and custom dictionary entries.
|
|
2067
2014
|
*
|
|
2068
2015
|
* Required API Key ACLs:
|
|
2069
|
-
*
|
|
2070
|
-
*
|
|
2016
|
+
* - settings
|
|
2071
2017
|
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
2072
2018
|
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
2073
2019
|
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
@@ -2108,8 +2054,7 @@ function createSearchClient({
|
|
|
2108
2054
|
* 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**.
|
|
2109
2055
|
*
|
|
2110
2056
|
* Required API Key ACLs:
|
|
2111
|
-
*
|
|
2112
|
-
*
|
|
2057
|
+
* - search
|
|
2113
2058
|
* @param searchForFacetValues - The searchForFacetValues object.
|
|
2114
2059
|
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
2115
2060
|
* @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.
|
|
@@ -2141,8 +2086,7 @@ function createSearchClient({
|
|
|
2141
2086
|
* Searches for rules in your index.
|
|
2142
2087
|
*
|
|
2143
2088
|
* Required API Key ACLs:
|
|
2144
|
-
*
|
|
2145
|
-
*
|
|
2089
|
+
* - settings
|
|
2146
2090
|
* @param searchRules - The searchRules object.
|
|
2147
2091
|
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
2148
2092
|
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
@@ -2167,11 +2111,10 @@ function createSearchClient({
|
|
|
2167
2111
|
return transporter.request(request, requestOptions);
|
|
2168
2112
|
},
|
|
2169
2113
|
/**
|
|
2170
|
-
* Searches a single index and
|
|
2114
|
+
* Searches a single index and returns matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting.
|
|
2171
2115
|
*
|
|
2172
2116
|
* Required API Key ACLs:
|
|
2173
|
-
*
|
|
2174
|
-
*
|
|
2117
|
+
* - search
|
|
2175
2118
|
* @param searchSingleIndex - The searchSingleIndex object.
|
|
2176
2119
|
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
2177
2120
|
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
@@ -2199,8 +2142,7 @@ function createSearchClient({
|
|
|
2199
2142
|
* Searches for synonyms in your index.
|
|
2200
2143
|
*
|
|
2201
2144
|
* Required API Key ACLs:
|
|
2202
|
-
*
|
|
2203
|
-
*
|
|
2145
|
+
* - settings
|
|
2204
2146
|
* @param searchSynonyms - The searchSynonyms object.
|
|
2205
2147
|
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
2206
2148
|
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
@@ -2231,8 +2173,7 @@ function createSearchClient({
|
|
|
2231
2173
|
* 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).
|
|
2232
2174
|
*
|
|
2233
2175
|
* Required API Key ACLs:
|
|
2234
|
-
*
|
|
2235
|
-
*
|
|
2176
|
+
* - admin
|
|
2236
2177
|
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
2237
2178
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2238
2179
|
*/
|
|
@@ -2261,8 +2202,7 @@ function createSearchClient({
|
|
|
2261
2202
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
2262
2203
|
*
|
|
2263
2204
|
* Required API Key ACLs:
|
|
2264
|
-
*
|
|
2265
|
-
*
|
|
2205
|
+
* - editSettings
|
|
2266
2206
|
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
2267
2207
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2268
2208
|
*/
|
|
@@ -2291,8 +2231,7 @@ function createSearchClient({
|
|
|
2291
2231
|
* 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.
|
|
2292
2232
|
*
|
|
2293
2233
|
* Required API Key ACLs:
|
|
2294
|
-
*
|
|
2295
|
-
*
|
|
2234
|
+
* - editSettings
|
|
2296
2235
|
* @param setSettings - The setSettings object.
|
|
2297
2236
|
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
2298
2237
|
* @param setSettings.indexSettings - The indexSettings object.
|
|
@@ -2310,7 +2249,7 @@ function createSearchClient({
|
|
|
2310
2249
|
const headers = {};
|
|
2311
2250
|
const queryParameters = {};
|
|
2312
2251
|
if (forwardToReplicas !== void 0) {
|
|
2313
|
-
queryParameters
|
|
2252
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
2314
2253
|
}
|
|
2315
2254
|
const request = {
|
|
2316
2255
|
method: "PUT",
|
|
@@ -2325,8 +2264,7 @@ function createSearchClient({
|
|
|
2325
2264
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
2326
2265
|
*
|
|
2327
2266
|
* Required API Key ACLs:
|
|
2328
|
-
*
|
|
2329
|
-
*
|
|
2267
|
+
* - admin
|
|
2330
2268
|
* @param updateApiKey - The updateApiKey object.
|
|
2331
2269
|
* @param updateApiKey.key - API key.
|
|
2332
2270
|
* @param updateApiKey.apiKey - The apiKey object.
|