@algolia/client-search 5.7.0 → 5.8.1
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 +1668 -1652
- package/dist/builds/browser.js +95 -156
- 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 +95 -156
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +90 -151
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +96 -157
- package/dist/builds/node.js.map +1 -1
- package/dist/fetch.d.ts +1420 -1403
- package/dist/node.d.cts +1420 -1403
- package/dist/node.d.ts +1420 -1403
- package/dist/src/searchClient.cjs +88 -149
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +91 -152
- package/dist/src/searchClient.js.map +1 -1
- package/index.d.ts +0 -1
- package/index.js +1 -2
- 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/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 +12 -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 +13 -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.1";
|
|
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.
|
|
@@ -775,7 +767,8 @@ function createSearchClient({
|
|
|
775
767
|
path: requestPath,
|
|
776
768
|
queryParameters,
|
|
777
769
|
headers,
|
|
778
|
-
data: browseParams ? browseParams : {}
|
|
770
|
+
data: browseParams ? browseParams : {},
|
|
771
|
+
useReadTransporter: true
|
|
779
772
|
};
|
|
780
773
|
return transporter.request(request, requestOptions);
|
|
781
774
|
},
|
|
@@ -783,8 +776,7 @@ function createSearchClient({
|
|
|
783
776
|
* Deletes only the records from an index while keeping settings, synonyms, and rules.
|
|
784
777
|
*
|
|
785
778
|
* Required API Key ACLs:
|
|
786
|
-
*
|
|
787
|
-
*
|
|
779
|
+
* - deleteIndex
|
|
788
780
|
* @param clearObjects - The clearObjects object.
|
|
789
781
|
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
790
782
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -808,8 +800,7 @@ function createSearchClient({
|
|
|
808
800
|
* Deletes all rules from the index.
|
|
809
801
|
*
|
|
810
802
|
* Required API Key ACLs:
|
|
811
|
-
*
|
|
812
|
-
*
|
|
803
|
+
* - editSettings
|
|
813
804
|
* @param clearRules - The clearRules object.
|
|
814
805
|
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
815
806
|
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
@@ -823,7 +814,7 @@ function createSearchClient({
|
|
|
823
814
|
const headers = {};
|
|
824
815
|
const queryParameters = {};
|
|
825
816
|
if (forwardToReplicas !== void 0) {
|
|
826
|
-
queryParameters
|
|
817
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
827
818
|
}
|
|
828
819
|
const request = {
|
|
829
820
|
method: "POST",
|
|
@@ -837,8 +828,7 @@ function createSearchClient({
|
|
|
837
828
|
* Deletes all synonyms from the index.
|
|
838
829
|
*
|
|
839
830
|
* Required API Key ACLs:
|
|
840
|
-
*
|
|
841
|
-
*
|
|
831
|
+
* - editSettings
|
|
842
832
|
* @param clearSynonyms - The clearSynonyms object.
|
|
843
833
|
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
844
834
|
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
@@ -852,7 +842,7 @@ function createSearchClient({
|
|
|
852
842
|
const headers = {};
|
|
853
843
|
const queryParameters = {};
|
|
854
844
|
if (forwardToReplicas !== void 0) {
|
|
855
|
-
queryParameters
|
|
845
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
856
846
|
}
|
|
857
847
|
const request = {
|
|
858
848
|
method: "POST",
|
|
@@ -864,7 +854,6 @@ function createSearchClient({
|
|
|
864
854
|
},
|
|
865
855
|
/**
|
|
866
856
|
* This method allow you to send requests to the Algolia REST API.
|
|
867
|
-
*
|
|
868
857
|
* @param customDelete - The customDelete object.
|
|
869
858
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
870
859
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -887,7 +876,6 @@ function createSearchClient({
|
|
|
887
876
|
},
|
|
888
877
|
/**
|
|
889
878
|
* This method allow you to send requests to the Algolia REST API.
|
|
890
|
-
*
|
|
891
879
|
* @param customGet - The customGet object.
|
|
892
880
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
893
881
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -910,7 +898,6 @@ function createSearchClient({
|
|
|
910
898
|
},
|
|
911
899
|
/**
|
|
912
900
|
* This method allow you to send requests to the Algolia REST API.
|
|
913
|
-
*
|
|
914
901
|
* @param customPost - The customPost object.
|
|
915
902
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
916
903
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -935,7 +922,6 @@ function createSearchClient({
|
|
|
935
922
|
},
|
|
936
923
|
/**
|
|
937
924
|
* This method allow you to send requests to the Algolia REST API.
|
|
938
|
-
*
|
|
939
925
|
* @param customPut - The customPut object.
|
|
940
926
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
941
927
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -962,8 +948,7 @@ function createSearchClient({
|
|
|
962
948
|
* Deletes the API key.
|
|
963
949
|
*
|
|
964
950
|
* Required API Key ACLs:
|
|
965
|
-
*
|
|
966
|
-
*
|
|
951
|
+
* - admin
|
|
967
952
|
* @param deleteApiKey - The deleteApiKey object.
|
|
968
953
|
* @param deleteApiKey.key - API key.
|
|
969
954
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -987,8 +972,7 @@ function createSearchClient({
|
|
|
987
972
|
* 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
973
|
*
|
|
989
974
|
* Required API Key ACLs:
|
|
990
|
-
*
|
|
991
|
-
*
|
|
975
|
+
* - deleteIndex
|
|
992
976
|
* @param deleteBy - The deleteBy object.
|
|
993
977
|
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
994
978
|
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
@@ -1017,8 +1001,7 @@ function createSearchClient({
|
|
|
1017
1001
|
* 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
1002
|
*
|
|
1019
1003
|
* Required API Key ACLs:
|
|
1020
|
-
*
|
|
1021
|
-
*
|
|
1004
|
+
* - deleteIndex
|
|
1022
1005
|
* @param deleteIndex - The deleteIndex object.
|
|
1023
1006
|
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
1024
1007
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1042,8 +1025,7 @@ function createSearchClient({
|
|
|
1042
1025
|
* 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
1026
|
*
|
|
1044
1027
|
* Required API Key ACLs:
|
|
1045
|
-
*
|
|
1046
|
-
*
|
|
1028
|
+
* - deleteObject
|
|
1047
1029
|
* @param deleteObject - The deleteObject object.
|
|
1048
1030
|
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
1049
1031
|
* @param deleteObject.objectID - Unique record identifier.
|
|
@@ -1071,8 +1053,7 @@ function createSearchClient({
|
|
|
1071
1053
|
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
1072
1054
|
*
|
|
1073
1055
|
* Required API Key ACLs:
|
|
1074
|
-
*
|
|
1075
|
-
*
|
|
1056
|
+
* - editSettings
|
|
1076
1057
|
* @param deleteRule - The deleteRule object.
|
|
1077
1058
|
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
1078
1059
|
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
@@ -1090,7 +1071,7 @@ function createSearchClient({
|
|
|
1090
1071
|
const headers = {};
|
|
1091
1072
|
const queryParameters = {};
|
|
1092
1073
|
if (forwardToReplicas !== void 0) {
|
|
1093
|
-
queryParameters
|
|
1074
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1094
1075
|
}
|
|
1095
1076
|
const request = {
|
|
1096
1077
|
method: "DELETE",
|
|
@@ -1104,8 +1085,7 @@ function createSearchClient({
|
|
|
1104
1085
|
* Deletes a source from the list of allowed sources.
|
|
1105
1086
|
*
|
|
1106
1087
|
* Required API Key ACLs:
|
|
1107
|
-
*
|
|
1108
|
-
*
|
|
1088
|
+
* - admin
|
|
1109
1089
|
* @param deleteSource - The deleteSource object.
|
|
1110
1090
|
* @param deleteSource.source - IP address range of the source.
|
|
1111
1091
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1129,8 +1109,7 @@ function createSearchClient({
|
|
|
1129
1109
|
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
1130
1110
|
*
|
|
1131
1111
|
* Required API Key ACLs:
|
|
1132
|
-
*
|
|
1133
|
-
*
|
|
1112
|
+
* - editSettings
|
|
1134
1113
|
* @param deleteSynonym - The deleteSynonym object.
|
|
1135
1114
|
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
1136
1115
|
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1148,7 +1127,7 @@ function createSearchClient({
|
|
|
1148
1127
|
const headers = {};
|
|
1149
1128
|
const queryParameters = {};
|
|
1150
1129
|
if (forwardToReplicas !== void 0) {
|
|
1151
|
-
queryParameters
|
|
1130
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1152
1131
|
}
|
|
1153
1132
|
const request = {
|
|
1154
1133
|
method: "DELETE",
|
|
@@ -1160,7 +1139,6 @@ function createSearchClient({
|
|
|
1160
1139
|
},
|
|
1161
1140
|
/**
|
|
1162
1141
|
* 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
1142
|
* @param getApiKey - The getApiKey object.
|
|
1165
1143
|
* @param getApiKey.key - API key.
|
|
1166
1144
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1184,8 +1162,7 @@ function createSearchClient({
|
|
|
1184
1162
|
* Checks the status of a given application task.
|
|
1185
1163
|
*
|
|
1186
1164
|
* Required API Key ACLs:
|
|
1187
|
-
*
|
|
1188
|
-
*
|
|
1165
|
+
* - editSettings
|
|
1189
1166
|
* @param getAppTask - The getAppTask object.
|
|
1190
1167
|
* @param getAppTask.taskID - Unique task identifier.
|
|
1191
1168
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1209,8 +1186,7 @@ function createSearchClient({
|
|
|
1209
1186
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1210
1187
|
*
|
|
1211
1188
|
* Required API Key ACLs:
|
|
1212
|
-
*
|
|
1213
|
-
*
|
|
1189
|
+
* - settings
|
|
1214
1190
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1215
1191
|
*/
|
|
1216
1192
|
getDictionaryLanguages(requestOptions) {
|
|
@@ -1229,8 +1205,7 @@ function createSearchClient({
|
|
|
1229
1205
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1230
1206
|
*
|
|
1231
1207
|
* Required API Key ACLs:
|
|
1232
|
-
*
|
|
1233
|
-
*
|
|
1208
|
+
* - settings
|
|
1234
1209
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1235
1210
|
*/
|
|
1236
1211
|
getDictionarySettings(requestOptions) {
|
|
@@ -1249,8 +1224,7 @@ function createSearchClient({
|
|
|
1249
1224
|
* 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
1225
|
*
|
|
1251
1226
|
* Required API Key ACLs:
|
|
1252
|
-
*
|
|
1253
|
-
*
|
|
1227
|
+
* - logs
|
|
1254
1228
|
* @param getLogs - The getLogs object.
|
|
1255
1229
|
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
1256
1230
|
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
@@ -1263,16 +1237,16 @@ function createSearchClient({
|
|
|
1263
1237
|
const headers = {};
|
|
1264
1238
|
const queryParameters = {};
|
|
1265
1239
|
if (offset !== void 0) {
|
|
1266
|
-
queryParameters
|
|
1240
|
+
queryParameters["offset"] = offset.toString();
|
|
1267
1241
|
}
|
|
1268
1242
|
if (length !== void 0) {
|
|
1269
|
-
queryParameters
|
|
1243
|
+
queryParameters["length"] = length.toString();
|
|
1270
1244
|
}
|
|
1271
1245
|
if (indexName !== void 0) {
|
|
1272
|
-
queryParameters
|
|
1246
|
+
queryParameters["indexName"] = indexName.toString();
|
|
1273
1247
|
}
|
|
1274
1248
|
if (type !== void 0) {
|
|
1275
|
-
queryParameters
|
|
1249
|
+
queryParameters["type"] = type.toString();
|
|
1276
1250
|
}
|
|
1277
1251
|
const request = {
|
|
1278
1252
|
method: "GET",
|
|
@@ -1286,8 +1260,7 @@ function createSearchClient({
|
|
|
1286
1260
|
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
|
1287
1261
|
*
|
|
1288
1262
|
* Required API Key ACLs:
|
|
1289
|
-
*
|
|
1290
|
-
*
|
|
1263
|
+
* - search
|
|
1291
1264
|
* @param getObject - The getObject object.
|
|
1292
1265
|
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
1293
1266
|
* @param getObject.objectID - Unique record identifier.
|
|
@@ -1305,7 +1278,7 @@ function createSearchClient({
|
|
|
1305
1278
|
const headers = {};
|
|
1306
1279
|
const queryParameters = {};
|
|
1307
1280
|
if (attributesToRetrieve !== void 0) {
|
|
1308
|
-
queryParameters
|
|
1281
|
+
queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
|
|
1309
1282
|
}
|
|
1310
1283
|
const request = {
|
|
1311
1284
|
method: "GET",
|
|
@@ -1319,8 +1292,7 @@ function createSearchClient({
|
|
|
1319
1292
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
1320
1293
|
*
|
|
1321
1294
|
* Required API Key ACLs:
|
|
1322
|
-
*
|
|
1323
|
-
*
|
|
1295
|
+
* - search
|
|
1324
1296
|
* @param getObjectsParams - Request object.
|
|
1325
1297
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1326
1298
|
*/
|
|
@@ -1349,8 +1321,7 @@ function createSearchClient({
|
|
|
1349
1321
|
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
1350
1322
|
*
|
|
1351
1323
|
* Required API Key ACLs:
|
|
1352
|
-
*
|
|
1353
|
-
*
|
|
1324
|
+
* - settings
|
|
1354
1325
|
* @param getRule - The getRule object.
|
|
1355
1326
|
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
1356
1327
|
* @param getRule.objectID - Unique identifier of a rule object.
|
|
@@ -1378,8 +1349,7 @@ function createSearchClient({
|
|
|
1378
1349
|
* Retrieves an object with non-null index settings.
|
|
1379
1350
|
*
|
|
1380
1351
|
* Required API Key ACLs:
|
|
1381
|
-
*
|
|
1382
|
-
*
|
|
1352
|
+
* - search
|
|
1383
1353
|
* @param getSettings - The getSettings object.
|
|
1384
1354
|
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
1385
1355
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1403,8 +1373,7 @@ function createSearchClient({
|
|
|
1403
1373
|
* Retrieves all allowed IP addresses with access to your application.
|
|
1404
1374
|
*
|
|
1405
1375
|
* Required API Key ACLs:
|
|
1406
|
-
*
|
|
1407
|
-
*
|
|
1376
|
+
* - admin
|
|
1408
1377
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1409
1378
|
*/
|
|
1410
1379
|
getSources(requestOptions) {
|
|
@@ -1420,11 +1389,10 @@ function createSearchClient({
|
|
|
1420
1389
|
return transporter.request(request, requestOptions);
|
|
1421
1390
|
},
|
|
1422
1391
|
/**
|
|
1423
|
-
* Retrieves a
|
|
1392
|
+
* Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
1424
1393
|
*
|
|
1425
1394
|
* Required API Key ACLs:
|
|
1426
|
-
*
|
|
1427
|
-
*
|
|
1395
|
+
* - settings
|
|
1428
1396
|
* @param getSynonym - The getSynonym object.
|
|
1429
1397
|
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
1430
1398
|
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1452,8 +1420,7 @@ function createSearchClient({
|
|
|
1452
1420
|
* 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
1421
|
*
|
|
1454
1422
|
* Required API Key ACLs:
|
|
1455
|
-
*
|
|
1456
|
-
*
|
|
1423
|
+
* - addObject
|
|
1457
1424
|
* @param getTask - The getTask object.
|
|
1458
1425
|
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
1459
1426
|
* @param getTask.taskID - Unique task identifier.
|
|
@@ -1481,8 +1448,7 @@ function createSearchClient({
|
|
|
1481
1448
|
* 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
1449
|
*
|
|
1483
1450
|
* Required API Key ACLs:
|
|
1484
|
-
*
|
|
1485
|
-
*
|
|
1451
|
+
* - admin
|
|
1486
1452
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1487
1453
|
*/
|
|
1488
1454
|
getTopUserIds(requestOptions) {
|
|
@@ -1501,8 +1467,7 @@ function createSearchClient({
|
|
|
1501
1467
|
* 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
1468
|
*
|
|
1503
1469
|
* Required API Key ACLs:
|
|
1504
|
-
*
|
|
1505
|
-
*
|
|
1470
|
+
* - admin
|
|
1506
1471
|
* @param getUserId - The getUserId object.
|
|
1507
1472
|
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1508
1473
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1526,8 +1491,7 @@ function createSearchClient({
|
|
|
1526
1491
|
* 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
1492
|
*
|
|
1528
1493
|
* Required API Key ACLs:
|
|
1529
|
-
*
|
|
1530
|
-
*
|
|
1494
|
+
* - admin
|
|
1531
1495
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
1532
1496
|
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1533
1497
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1537,7 +1501,7 @@ function createSearchClient({
|
|
|
1537
1501
|
const headers = {};
|
|
1538
1502
|
const queryParameters = {};
|
|
1539
1503
|
if (getClusters !== void 0) {
|
|
1540
|
-
queryParameters
|
|
1504
|
+
queryParameters["getClusters"] = getClusters.toString();
|
|
1541
1505
|
}
|
|
1542
1506
|
const request = {
|
|
1543
1507
|
method: "GET",
|
|
@@ -1551,8 +1515,7 @@ function createSearchClient({
|
|
|
1551
1515
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
1552
1516
|
*
|
|
1553
1517
|
* Required API Key ACLs:
|
|
1554
|
-
*
|
|
1555
|
-
*
|
|
1518
|
+
* - admin
|
|
1556
1519
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1557
1520
|
*/
|
|
1558
1521
|
listApiKeys(requestOptions) {
|
|
@@ -1571,8 +1534,7 @@ function createSearchClient({
|
|
|
1571
1534
|
* Lists the available clusters in a multi-cluster setup.
|
|
1572
1535
|
*
|
|
1573
1536
|
* Required API Key ACLs:
|
|
1574
|
-
*
|
|
1575
|
-
*
|
|
1537
|
+
* - admin
|
|
1576
1538
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1577
1539
|
*/
|
|
1578
1540
|
listClusters(requestOptions) {
|
|
@@ -1591,8 +1553,7 @@ function createSearchClient({
|
|
|
1591
1553
|
* 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
1554
|
*
|
|
1593
1555
|
* Required API Key ACLs:
|
|
1594
|
-
*
|
|
1595
|
-
*
|
|
1556
|
+
* - listIndexes
|
|
1596
1557
|
* @param listIndices - The listIndices object.
|
|
1597
1558
|
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
1598
1559
|
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
@@ -1603,10 +1564,10 @@ function createSearchClient({
|
|
|
1603
1564
|
const headers = {};
|
|
1604
1565
|
const queryParameters = {};
|
|
1605
1566
|
if (page !== void 0) {
|
|
1606
|
-
queryParameters
|
|
1567
|
+
queryParameters["page"] = page.toString();
|
|
1607
1568
|
}
|
|
1608
1569
|
if (hitsPerPage !== void 0) {
|
|
1609
|
-
queryParameters
|
|
1570
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
1610
1571
|
}
|
|
1611
1572
|
const request = {
|
|
1612
1573
|
method: "GET",
|
|
@@ -1620,8 +1581,7 @@ function createSearchClient({
|
|
|
1620
1581
|
* 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
1582
|
*
|
|
1622
1583
|
* Required API Key ACLs:
|
|
1623
|
-
*
|
|
1624
|
-
*
|
|
1584
|
+
* - admin
|
|
1625
1585
|
* @param listUserIds - The listUserIds object.
|
|
1626
1586
|
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
1627
1587
|
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
@@ -1632,10 +1592,10 @@ function createSearchClient({
|
|
|
1632
1592
|
const headers = {};
|
|
1633
1593
|
const queryParameters = {};
|
|
1634
1594
|
if (page !== void 0) {
|
|
1635
|
-
queryParameters
|
|
1595
|
+
queryParameters["page"] = page.toString();
|
|
1636
1596
|
}
|
|
1637
1597
|
if (hitsPerPage !== void 0) {
|
|
1638
|
-
queryParameters
|
|
1598
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
1639
1599
|
}
|
|
1640
1600
|
const request = {
|
|
1641
1601
|
method: "GET",
|
|
@@ -1647,7 +1607,6 @@ function createSearchClient({
|
|
|
1647
1607
|
},
|
|
1648
1608
|
/**
|
|
1649
1609
|
* 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
1610
|
* @param batchParams - The batchParams object.
|
|
1652
1611
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1653
1612
|
*/
|
|
@@ -1671,11 +1630,10 @@ function createSearchClient({
|
|
|
1671
1630
|
return transporter.request(request, requestOptions);
|
|
1672
1631
|
},
|
|
1673
1632
|
/**
|
|
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
|
|
1633
|
+
* 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
1634
|
*
|
|
1676
1635
|
* Required API Key ACLs:
|
|
1677
|
-
*
|
|
1678
|
-
*
|
|
1636
|
+
* - addObject
|
|
1679
1637
|
* @param operationIndex - The operationIndex object.
|
|
1680
1638
|
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
1681
1639
|
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
@@ -1707,11 +1665,10 @@ function createSearchClient({
|
|
|
1707
1665
|
return transporter.request(request, requestOptions);
|
|
1708
1666
|
},
|
|
1709
1667
|
/**
|
|
1710
|
-
* Adds new attributes to a record, or
|
|
1668
|
+
* 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
1669
|
*
|
|
1712
1670
|
* Required API Key ACLs:
|
|
1713
|
-
*
|
|
1714
|
-
*
|
|
1671
|
+
* - addObject
|
|
1715
1672
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
1716
1673
|
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
1717
1674
|
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
@@ -1733,7 +1690,7 @@ function createSearchClient({
|
|
|
1733
1690
|
const headers = {};
|
|
1734
1691
|
const queryParameters = {};
|
|
1735
1692
|
if (createIfNotExists !== void 0) {
|
|
1736
|
-
queryParameters
|
|
1693
|
+
queryParameters["createIfNotExists"] = createIfNotExists.toString();
|
|
1737
1694
|
}
|
|
1738
1695
|
const request = {
|
|
1739
1696
|
method: "POST",
|
|
@@ -1748,8 +1705,7 @@ function createSearchClient({
|
|
|
1748
1705
|
* Deletes a user ID and its associated data from the clusters.
|
|
1749
1706
|
*
|
|
1750
1707
|
* Required API Key ACLs:
|
|
1751
|
-
*
|
|
1752
|
-
*
|
|
1708
|
+
* - admin
|
|
1753
1709
|
* @param removeUserId - The removeUserId object.
|
|
1754
1710
|
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
1755
1711
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1773,8 +1729,7 @@ function createSearchClient({
|
|
|
1773
1729
|
* Replaces the list of allowed sources.
|
|
1774
1730
|
*
|
|
1775
1731
|
* Required API Key ACLs:
|
|
1776
|
-
*
|
|
1777
|
-
*
|
|
1732
|
+
* - admin
|
|
1778
1733
|
* @param replaceSources - The replaceSources object.
|
|
1779
1734
|
* @param replaceSources.source - Allowed sources.
|
|
1780
1735
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1799,8 +1754,7 @@ function createSearchClient({
|
|
|
1799
1754
|
* 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
1755
|
*
|
|
1801
1756
|
* Required API Key ACLs:
|
|
1802
|
-
*
|
|
1803
|
-
*
|
|
1757
|
+
* - admin
|
|
1804
1758
|
* @param restoreApiKey - The restoreApiKey object.
|
|
1805
1759
|
* @param restoreApiKey.key - API key.
|
|
1806
1760
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1824,11 +1778,10 @@ function createSearchClient({
|
|
|
1824
1778
|
* 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
1779
|
*
|
|
1826
1780
|
* Required API Key ACLs:
|
|
1827
|
-
*
|
|
1828
|
-
*
|
|
1781
|
+
* - addObject
|
|
1829
1782
|
* @param saveObject - The saveObject object.
|
|
1830
1783
|
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
1831
|
-
* @param saveObject.body - The record
|
|
1784
|
+
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
1832
1785
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1833
1786
|
*/
|
|
1834
1787
|
saveObject({ indexName, body }, requestOptions) {
|
|
@@ -1854,8 +1807,7 @@ function createSearchClient({
|
|
|
1854
1807
|
* 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
1808
|
*
|
|
1856
1809
|
* Required API Key ACLs:
|
|
1857
|
-
*
|
|
1858
|
-
*
|
|
1810
|
+
* - editSettings
|
|
1859
1811
|
* @param saveRule - The saveRule object.
|
|
1860
1812
|
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
1861
1813
|
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
@@ -1880,7 +1832,7 @@ function createSearchClient({
|
|
|
1880
1832
|
const headers = {};
|
|
1881
1833
|
const queryParameters = {};
|
|
1882
1834
|
if (forwardToReplicas !== void 0) {
|
|
1883
|
-
queryParameters
|
|
1835
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1884
1836
|
}
|
|
1885
1837
|
const request = {
|
|
1886
1838
|
method: "PUT",
|
|
@@ -1895,8 +1847,7 @@ function createSearchClient({
|
|
|
1895
1847
|
* 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
1848
|
*
|
|
1897
1849
|
* Required API Key ACLs:
|
|
1898
|
-
*
|
|
1899
|
-
*
|
|
1850
|
+
* - editSettings
|
|
1900
1851
|
* @param saveRules - The saveRules object.
|
|
1901
1852
|
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
1902
1853
|
* @param saveRules.rules - The rules object.
|
|
@@ -1915,10 +1866,10 @@ function createSearchClient({
|
|
|
1915
1866
|
const headers = {};
|
|
1916
1867
|
const queryParameters = {};
|
|
1917
1868
|
if (forwardToReplicas !== void 0) {
|
|
1918
|
-
queryParameters
|
|
1869
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1919
1870
|
}
|
|
1920
1871
|
if (clearExistingRules !== void 0) {
|
|
1921
|
-
queryParameters
|
|
1872
|
+
queryParameters["clearExistingRules"] = clearExistingRules.toString();
|
|
1922
1873
|
}
|
|
1923
1874
|
const request = {
|
|
1924
1875
|
method: "POST",
|
|
@@ -1933,8 +1884,7 @@ function createSearchClient({
|
|
|
1933
1884
|
* 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
1885
|
*
|
|
1935
1886
|
* Required API Key ACLs:
|
|
1936
|
-
*
|
|
1937
|
-
*
|
|
1887
|
+
* - editSettings
|
|
1938
1888
|
* @param saveSynonym - The saveSynonym object.
|
|
1939
1889
|
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
1940
1890
|
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1962,7 +1912,7 @@ function createSearchClient({
|
|
|
1962
1912
|
const headers = {};
|
|
1963
1913
|
const queryParameters = {};
|
|
1964
1914
|
if (forwardToReplicas !== void 0) {
|
|
1965
|
-
queryParameters
|
|
1915
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1966
1916
|
}
|
|
1967
1917
|
const request = {
|
|
1968
1918
|
method: "PUT",
|
|
@@ -1977,8 +1927,7 @@ function createSearchClient({
|
|
|
1977
1927
|
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
|
|
1978
1928
|
*
|
|
1979
1929
|
* Required API Key ACLs:
|
|
1980
|
-
*
|
|
1981
|
-
*
|
|
1930
|
+
* - editSettings
|
|
1982
1931
|
* @param saveSynonyms - The saveSynonyms object.
|
|
1983
1932
|
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1984
1933
|
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
@@ -1997,10 +1946,10 @@ function createSearchClient({
|
|
|
1997
1946
|
const headers = {};
|
|
1998
1947
|
const queryParameters = {};
|
|
1999
1948
|
if (forwardToReplicas !== void 0) {
|
|
2000
|
-
queryParameters
|
|
1949
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
2001
1950
|
}
|
|
2002
1951
|
if (replaceExistingSynonyms !== void 0) {
|
|
2003
|
-
queryParameters
|
|
1952
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
2004
1953
|
}
|
|
2005
1954
|
const request = {
|
|
2006
1955
|
method: "POST",
|
|
@@ -2012,11 +1961,10 @@ function createSearchClient({
|
|
|
2012
1961
|
return transporter.request(request, requestOptions);
|
|
2013
1962
|
},
|
|
2014
1963
|
/**
|
|
2015
|
-
* Sends multiple search
|
|
1964
|
+
* 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
1965
|
*
|
|
2017
1966
|
* Required API Key ACLs:
|
|
2018
|
-
*
|
|
2019
|
-
*
|
|
1967
|
+
* - search
|
|
2020
1968
|
* @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
|
|
2021
1969
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2022
1970
|
*/
|
|
@@ -2066,8 +2014,7 @@ function createSearchClient({
|
|
|
2066
2014
|
* Searches for standard and custom dictionary entries.
|
|
2067
2015
|
*
|
|
2068
2016
|
* Required API Key ACLs:
|
|
2069
|
-
*
|
|
2070
|
-
*
|
|
2017
|
+
* - settings
|
|
2071
2018
|
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
2072
2019
|
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
2073
2020
|
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
@@ -2108,8 +2055,7 @@ function createSearchClient({
|
|
|
2108
2055
|
* 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
2056
|
*
|
|
2110
2057
|
* Required API Key ACLs:
|
|
2111
|
-
*
|
|
2112
|
-
*
|
|
2058
|
+
* - search
|
|
2113
2059
|
* @param searchForFacetValues - The searchForFacetValues object.
|
|
2114
2060
|
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
2115
2061
|
* @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 +2087,7 @@ function createSearchClient({
|
|
|
2141
2087
|
* Searches for rules in your index.
|
|
2142
2088
|
*
|
|
2143
2089
|
* Required API Key ACLs:
|
|
2144
|
-
*
|
|
2145
|
-
*
|
|
2090
|
+
* - settings
|
|
2146
2091
|
* @param searchRules - The searchRules object.
|
|
2147
2092
|
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
2148
2093
|
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
@@ -2167,11 +2112,10 @@ function createSearchClient({
|
|
|
2167
2112
|
return transporter.request(request, requestOptions);
|
|
2168
2113
|
},
|
|
2169
2114
|
/**
|
|
2170
|
-
* Searches a single index and
|
|
2115
|
+
* 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
2116
|
*
|
|
2172
2117
|
* Required API Key ACLs:
|
|
2173
|
-
*
|
|
2174
|
-
*
|
|
2118
|
+
* - search
|
|
2175
2119
|
* @param searchSingleIndex - The searchSingleIndex object.
|
|
2176
2120
|
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
2177
2121
|
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
@@ -2199,8 +2143,7 @@ function createSearchClient({
|
|
|
2199
2143
|
* Searches for synonyms in your index.
|
|
2200
2144
|
*
|
|
2201
2145
|
* Required API Key ACLs:
|
|
2202
|
-
*
|
|
2203
|
-
*
|
|
2146
|
+
* - settings
|
|
2204
2147
|
* @param searchSynonyms - The searchSynonyms object.
|
|
2205
2148
|
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
2206
2149
|
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
@@ -2231,8 +2174,7 @@ function createSearchClient({
|
|
|
2231
2174
|
* 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
2175
|
*
|
|
2233
2176
|
* Required API Key ACLs:
|
|
2234
|
-
*
|
|
2235
|
-
*
|
|
2177
|
+
* - admin
|
|
2236
2178
|
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
2237
2179
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2238
2180
|
*/
|
|
@@ -2261,8 +2203,7 @@ function createSearchClient({
|
|
|
2261
2203
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
2262
2204
|
*
|
|
2263
2205
|
* Required API Key ACLs:
|
|
2264
|
-
*
|
|
2265
|
-
*
|
|
2206
|
+
* - editSettings
|
|
2266
2207
|
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
2267
2208
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2268
2209
|
*/
|
|
@@ -2291,8 +2232,7 @@ function createSearchClient({
|
|
|
2291
2232
|
* 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
2233
|
*
|
|
2293
2234
|
* Required API Key ACLs:
|
|
2294
|
-
*
|
|
2295
|
-
*
|
|
2235
|
+
* - editSettings
|
|
2296
2236
|
* @param setSettings - The setSettings object.
|
|
2297
2237
|
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
2298
2238
|
* @param setSettings.indexSettings - The indexSettings object.
|
|
@@ -2310,7 +2250,7 @@ function createSearchClient({
|
|
|
2310
2250
|
const headers = {};
|
|
2311
2251
|
const queryParameters = {};
|
|
2312
2252
|
if (forwardToReplicas !== void 0) {
|
|
2313
|
-
queryParameters
|
|
2253
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
2314
2254
|
}
|
|
2315
2255
|
const request = {
|
|
2316
2256
|
method: "PUT",
|
|
@@ -2325,8 +2265,7 @@ function createSearchClient({
|
|
|
2325
2265
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
2326
2266
|
*
|
|
2327
2267
|
* Required API Key ACLs:
|
|
2328
|
-
*
|
|
2329
|
-
*
|
|
2268
|
+
* - admin
|
|
2330
2269
|
* @param updateApiKey - The updateApiKey object.
|
|
2331
2270
|
* @param updateApiKey.key - API key.
|
|
2332
2271
|
* @param updateApiKey.apiKey - The apiKey object.
|