@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
package/dist/src/searchClient.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// src/searchClient.ts
|
|
2
2
|
import {
|
|
3
|
+
ApiError,
|
|
3
4
|
createAuth,
|
|
5
|
+
createIterablePromise,
|
|
4
6
|
createTransporter,
|
|
5
7
|
getAlgoliaAgent,
|
|
6
|
-
shuffle
|
|
7
|
-
ApiError,
|
|
8
|
-
createIterablePromise
|
|
8
|
+
shuffle
|
|
9
9
|
} from "@algolia/client-common";
|
|
10
|
-
var apiClientVersion = "5.
|
|
10
|
+
var apiClientVersion = "5.8.0";
|
|
11
11
|
function getDefaultHosts(appId) {
|
|
12
12
|
return [
|
|
13
13
|
{
|
|
@@ -505,8 +505,7 @@ function createSearchClient({
|
|
|
505
505
|
* Creates a new API key with specific permissions and restrictions.
|
|
506
506
|
*
|
|
507
507
|
* Required API Key ACLs:
|
|
508
|
-
*
|
|
509
|
-
*
|
|
508
|
+
* - admin
|
|
510
509
|
* @param apiKey - The apiKey object.
|
|
511
510
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
512
511
|
*/
|
|
@@ -533,12 +532,11 @@ function createSearchClient({
|
|
|
533
532
|
* 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).
|
|
534
533
|
*
|
|
535
534
|
* Required API Key ACLs:
|
|
536
|
-
*
|
|
537
|
-
*
|
|
535
|
+
* - addObject
|
|
538
536
|
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
539
537
|
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
540
538
|
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
541
|
-
* @param addOrUpdateObject.body - The record
|
|
539
|
+
* @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
542
540
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
543
541
|
*/
|
|
544
542
|
addOrUpdateObject({ indexName, objectID, body }, requestOptions) {
|
|
@@ -567,8 +565,7 @@ function createSearchClient({
|
|
|
567
565
|
* Adds a source to the list of allowed sources.
|
|
568
566
|
*
|
|
569
567
|
* Required API Key ACLs:
|
|
570
|
-
*
|
|
571
|
-
*
|
|
568
|
+
* - admin
|
|
572
569
|
* @param source - Source to add.
|
|
573
570
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
574
571
|
*/
|
|
@@ -595,8 +592,7 @@ function createSearchClient({
|
|
|
595
592
|
* 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.
|
|
596
593
|
*
|
|
597
594
|
* Required API Key ACLs:
|
|
598
|
-
*
|
|
599
|
-
*
|
|
595
|
+
* - admin
|
|
600
596
|
* @param assignUserId - The assignUserId object.
|
|
601
597
|
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
602
598
|
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
@@ -629,7 +625,6 @@ function createSearchClient({
|
|
|
629
625
|
},
|
|
630
626
|
/**
|
|
631
627
|
* 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.
|
|
632
|
-
*
|
|
633
628
|
* @param batch - The batch object.
|
|
634
629
|
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
635
630
|
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
@@ -661,8 +656,7 @@ function createSearchClient({
|
|
|
661
656
|
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
662
657
|
*
|
|
663
658
|
* Required API Key ACLs:
|
|
664
|
-
*
|
|
665
|
-
*
|
|
659
|
+
* - admin
|
|
666
660
|
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
667
661
|
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
668
662
|
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
@@ -700,8 +694,7 @@ function createSearchClient({
|
|
|
700
694
|
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
701
695
|
*
|
|
702
696
|
* Required API Key ACLs:
|
|
703
|
-
*
|
|
704
|
-
*
|
|
697
|
+
* - editSettings
|
|
705
698
|
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
706
699
|
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
707
700
|
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
@@ -735,11 +728,10 @@ function createSearchClient({
|
|
|
735
728
|
return transporter.request(request, requestOptions);
|
|
736
729
|
},
|
|
737
730
|
/**
|
|
738
|
-
* 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`
|
|
731
|
+
* 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.
|
|
739
732
|
*
|
|
740
733
|
* Required API Key ACLs:
|
|
741
|
-
*
|
|
742
|
-
*
|
|
734
|
+
* - browse
|
|
743
735
|
* @param browse - The browse object.
|
|
744
736
|
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
745
737
|
* @param browse.browseParams - The browseParams object.
|
|
@@ -765,8 +757,7 @@ function createSearchClient({
|
|
|
765
757
|
* Deletes only the records from an index while keeping settings, synonyms, and rules.
|
|
766
758
|
*
|
|
767
759
|
* Required API Key ACLs:
|
|
768
|
-
*
|
|
769
|
-
*
|
|
760
|
+
* - deleteIndex
|
|
770
761
|
* @param clearObjects - The clearObjects object.
|
|
771
762
|
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
772
763
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -790,8 +781,7 @@ function createSearchClient({
|
|
|
790
781
|
* Deletes all rules from the index.
|
|
791
782
|
*
|
|
792
783
|
* Required API Key ACLs:
|
|
793
|
-
*
|
|
794
|
-
*
|
|
784
|
+
* - editSettings
|
|
795
785
|
* @param clearRules - The clearRules object.
|
|
796
786
|
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
797
787
|
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
@@ -805,7 +795,7 @@ function createSearchClient({
|
|
|
805
795
|
const headers = {};
|
|
806
796
|
const queryParameters = {};
|
|
807
797
|
if (forwardToReplicas !== void 0) {
|
|
808
|
-
queryParameters
|
|
798
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
809
799
|
}
|
|
810
800
|
const request = {
|
|
811
801
|
method: "POST",
|
|
@@ -819,8 +809,7 @@ function createSearchClient({
|
|
|
819
809
|
* Deletes all synonyms from the index.
|
|
820
810
|
*
|
|
821
811
|
* Required API Key ACLs:
|
|
822
|
-
*
|
|
823
|
-
*
|
|
812
|
+
* - editSettings
|
|
824
813
|
* @param clearSynonyms - The clearSynonyms object.
|
|
825
814
|
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
826
815
|
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
@@ -834,7 +823,7 @@ function createSearchClient({
|
|
|
834
823
|
const headers = {};
|
|
835
824
|
const queryParameters = {};
|
|
836
825
|
if (forwardToReplicas !== void 0) {
|
|
837
|
-
queryParameters
|
|
826
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
838
827
|
}
|
|
839
828
|
const request = {
|
|
840
829
|
method: "POST",
|
|
@@ -846,7 +835,6 @@ function createSearchClient({
|
|
|
846
835
|
},
|
|
847
836
|
/**
|
|
848
837
|
* This method allow you to send requests to the Algolia REST API.
|
|
849
|
-
*
|
|
850
838
|
* @param customDelete - The customDelete object.
|
|
851
839
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
852
840
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -869,7 +857,6 @@ function createSearchClient({
|
|
|
869
857
|
},
|
|
870
858
|
/**
|
|
871
859
|
* This method allow you to send requests to the Algolia REST API.
|
|
872
|
-
*
|
|
873
860
|
* @param customGet - The customGet object.
|
|
874
861
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
875
862
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -892,7 +879,6 @@ function createSearchClient({
|
|
|
892
879
|
},
|
|
893
880
|
/**
|
|
894
881
|
* This method allow you to send requests to the Algolia REST API.
|
|
895
|
-
*
|
|
896
882
|
* @param customPost - The customPost object.
|
|
897
883
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
898
884
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -917,7 +903,6 @@ function createSearchClient({
|
|
|
917
903
|
},
|
|
918
904
|
/**
|
|
919
905
|
* This method allow you to send requests to the Algolia REST API.
|
|
920
|
-
*
|
|
921
906
|
* @param customPut - The customPut object.
|
|
922
907
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
923
908
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -944,8 +929,7 @@ function createSearchClient({
|
|
|
944
929
|
* Deletes the API key.
|
|
945
930
|
*
|
|
946
931
|
* Required API Key ACLs:
|
|
947
|
-
*
|
|
948
|
-
*
|
|
932
|
+
* - admin
|
|
949
933
|
* @param deleteApiKey - The deleteApiKey object.
|
|
950
934
|
* @param deleteApiKey.key - API key.
|
|
951
935
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -969,8 +953,7 @@ function createSearchClient({
|
|
|
969
953
|
* 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).
|
|
970
954
|
*
|
|
971
955
|
* Required API Key ACLs:
|
|
972
|
-
*
|
|
973
|
-
*
|
|
956
|
+
* - deleteIndex
|
|
974
957
|
* @param deleteBy - The deleteBy object.
|
|
975
958
|
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
976
959
|
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
@@ -999,8 +982,7 @@ function createSearchClient({
|
|
|
999
982
|
* 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/).
|
|
1000
983
|
*
|
|
1001
984
|
* Required API Key ACLs:
|
|
1002
|
-
*
|
|
1003
|
-
*
|
|
985
|
+
* - deleteIndex
|
|
1004
986
|
* @param deleteIndex - The deleteIndex object.
|
|
1005
987
|
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
1006
988
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1024,8 +1006,7 @@ function createSearchClient({
|
|
|
1024
1006
|
* 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).
|
|
1025
1007
|
*
|
|
1026
1008
|
* Required API Key ACLs:
|
|
1027
|
-
*
|
|
1028
|
-
*
|
|
1009
|
+
* - deleteObject
|
|
1029
1010
|
* @param deleteObject - The deleteObject object.
|
|
1030
1011
|
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
1031
1012
|
* @param deleteObject.objectID - Unique record identifier.
|
|
@@ -1053,8 +1034,7 @@ function createSearchClient({
|
|
|
1053
1034
|
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
1054
1035
|
*
|
|
1055
1036
|
* Required API Key ACLs:
|
|
1056
|
-
*
|
|
1057
|
-
*
|
|
1037
|
+
* - editSettings
|
|
1058
1038
|
* @param deleteRule - The deleteRule object.
|
|
1059
1039
|
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
1060
1040
|
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
@@ -1072,7 +1052,7 @@ function createSearchClient({
|
|
|
1072
1052
|
const headers = {};
|
|
1073
1053
|
const queryParameters = {};
|
|
1074
1054
|
if (forwardToReplicas !== void 0) {
|
|
1075
|
-
queryParameters
|
|
1055
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1076
1056
|
}
|
|
1077
1057
|
const request = {
|
|
1078
1058
|
method: "DELETE",
|
|
@@ -1086,8 +1066,7 @@ function createSearchClient({
|
|
|
1086
1066
|
* Deletes a source from the list of allowed sources.
|
|
1087
1067
|
*
|
|
1088
1068
|
* Required API Key ACLs:
|
|
1089
|
-
*
|
|
1090
|
-
*
|
|
1069
|
+
* - admin
|
|
1091
1070
|
* @param deleteSource - The deleteSource object.
|
|
1092
1071
|
* @param deleteSource.source - IP address range of the source.
|
|
1093
1072
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1111,8 +1090,7 @@ function createSearchClient({
|
|
|
1111
1090
|
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
1112
1091
|
*
|
|
1113
1092
|
* Required API Key ACLs:
|
|
1114
|
-
*
|
|
1115
|
-
*
|
|
1093
|
+
* - editSettings
|
|
1116
1094
|
* @param deleteSynonym - The deleteSynonym object.
|
|
1117
1095
|
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
1118
1096
|
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1130,7 +1108,7 @@ function createSearchClient({
|
|
|
1130
1108
|
const headers = {};
|
|
1131
1109
|
const queryParameters = {};
|
|
1132
1110
|
if (forwardToReplicas !== void 0) {
|
|
1133
|
-
queryParameters
|
|
1111
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1134
1112
|
}
|
|
1135
1113
|
const request = {
|
|
1136
1114
|
method: "DELETE",
|
|
@@ -1142,7 +1120,6 @@ function createSearchClient({
|
|
|
1142
1120
|
},
|
|
1143
1121
|
/**
|
|
1144
1122
|
* 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>`.
|
|
1145
|
-
*
|
|
1146
1123
|
* @param getApiKey - The getApiKey object.
|
|
1147
1124
|
* @param getApiKey.key - API key.
|
|
1148
1125
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1166,8 +1143,7 @@ function createSearchClient({
|
|
|
1166
1143
|
* Checks the status of a given application task.
|
|
1167
1144
|
*
|
|
1168
1145
|
* Required API Key ACLs:
|
|
1169
|
-
*
|
|
1170
|
-
*
|
|
1146
|
+
* - editSettings
|
|
1171
1147
|
* @param getAppTask - The getAppTask object.
|
|
1172
1148
|
* @param getAppTask.taskID - Unique task identifier.
|
|
1173
1149
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1191,8 +1167,7 @@ function createSearchClient({
|
|
|
1191
1167
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1192
1168
|
*
|
|
1193
1169
|
* Required API Key ACLs:
|
|
1194
|
-
*
|
|
1195
|
-
*
|
|
1170
|
+
* - settings
|
|
1196
1171
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1197
1172
|
*/
|
|
1198
1173
|
getDictionaryLanguages(requestOptions) {
|
|
@@ -1211,8 +1186,7 @@ function createSearchClient({
|
|
|
1211
1186
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1212
1187
|
*
|
|
1213
1188
|
* Required API Key ACLs:
|
|
1214
|
-
*
|
|
1215
|
-
*
|
|
1189
|
+
* - settings
|
|
1216
1190
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1217
1191
|
*/
|
|
1218
1192
|
getDictionarySettings(requestOptions) {
|
|
@@ -1231,8 +1205,7 @@ function createSearchClient({
|
|
|
1231
1205
|
* 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.
|
|
1232
1206
|
*
|
|
1233
1207
|
* Required API Key ACLs:
|
|
1234
|
-
*
|
|
1235
|
-
*
|
|
1208
|
+
* - logs
|
|
1236
1209
|
* @param getLogs - The getLogs object.
|
|
1237
1210
|
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
1238
1211
|
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
@@ -1245,16 +1218,16 @@ function createSearchClient({
|
|
|
1245
1218
|
const headers = {};
|
|
1246
1219
|
const queryParameters = {};
|
|
1247
1220
|
if (offset !== void 0) {
|
|
1248
|
-
queryParameters
|
|
1221
|
+
queryParameters["offset"] = offset.toString();
|
|
1249
1222
|
}
|
|
1250
1223
|
if (length !== void 0) {
|
|
1251
|
-
queryParameters
|
|
1224
|
+
queryParameters["length"] = length.toString();
|
|
1252
1225
|
}
|
|
1253
1226
|
if (indexName !== void 0) {
|
|
1254
|
-
queryParameters
|
|
1227
|
+
queryParameters["indexName"] = indexName.toString();
|
|
1255
1228
|
}
|
|
1256
1229
|
if (type !== void 0) {
|
|
1257
|
-
queryParameters
|
|
1230
|
+
queryParameters["type"] = type.toString();
|
|
1258
1231
|
}
|
|
1259
1232
|
const request = {
|
|
1260
1233
|
method: "GET",
|
|
@@ -1268,8 +1241,7 @@ function createSearchClient({
|
|
|
1268
1241
|
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
|
1269
1242
|
*
|
|
1270
1243
|
* Required API Key ACLs:
|
|
1271
|
-
*
|
|
1272
|
-
*
|
|
1244
|
+
* - search
|
|
1273
1245
|
* @param getObject - The getObject object.
|
|
1274
1246
|
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
1275
1247
|
* @param getObject.objectID - Unique record identifier.
|
|
@@ -1287,7 +1259,7 @@ function createSearchClient({
|
|
|
1287
1259
|
const headers = {};
|
|
1288
1260
|
const queryParameters = {};
|
|
1289
1261
|
if (attributesToRetrieve !== void 0) {
|
|
1290
|
-
queryParameters
|
|
1262
|
+
queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
|
|
1291
1263
|
}
|
|
1292
1264
|
const request = {
|
|
1293
1265
|
method: "GET",
|
|
@@ -1301,8 +1273,7 @@ function createSearchClient({
|
|
|
1301
1273
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
1302
1274
|
*
|
|
1303
1275
|
* Required API Key ACLs:
|
|
1304
|
-
*
|
|
1305
|
-
*
|
|
1276
|
+
* - search
|
|
1306
1277
|
* @param getObjectsParams - Request object.
|
|
1307
1278
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1308
1279
|
*/
|
|
@@ -1331,8 +1302,7 @@ function createSearchClient({
|
|
|
1331
1302
|
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
1332
1303
|
*
|
|
1333
1304
|
* Required API Key ACLs:
|
|
1334
|
-
*
|
|
1335
|
-
*
|
|
1305
|
+
* - settings
|
|
1336
1306
|
* @param getRule - The getRule object.
|
|
1337
1307
|
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
1338
1308
|
* @param getRule.objectID - Unique identifier of a rule object.
|
|
@@ -1360,8 +1330,7 @@ function createSearchClient({
|
|
|
1360
1330
|
* Retrieves an object with non-null index settings.
|
|
1361
1331
|
*
|
|
1362
1332
|
* Required API Key ACLs:
|
|
1363
|
-
*
|
|
1364
|
-
*
|
|
1333
|
+
* - search
|
|
1365
1334
|
* @param getSettings - The getSettings object.
|
|
1366
1335
|
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
1367
1336
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1385,8 +1354,7 @@ function createSearchClient({
|
|
|
1385
1354
|
* Retrieves all allowed IP addresses with access to your application.
|
|
1386
1355
|
*
|
|
1387
1356
|
* Required API Key ACLs:
|
|
1388
|
-
*
|
|
1389
|
-
*
|
|
1357
|
+
* - admin
|
|
1390
1358
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1391
1359
|
*/
|
|
1392
1360
|
getSources(requestOptions) {
|
|
@@ -1402,11 +1370,10 @@ function createSearchClient({
|
|
|
1402
1370
|
return transporter.request(request, requestOptions);
|
|
1403
1371
|
},
|
|
1404
1372
|
/**
|
|
1405
|
-
* Retrieves a
|
|
1373
|
+
* Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
1406
1374
|
*
|
|
1407
1375
|
* Required API Key ACLs:
|
|
1408
|
-
*
|
|
1409
|
-
*
|
|
1376
|
+
* - settings
|
|
1410
1377
|
* @param getSynonym - The getSynonym object.
|
|
1411
1378
|
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
1412
1379
|
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1434,8 +1401,7 @@ function createSearchClient({
|
|
|
1434
1401
|
* 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.
|
|
1435
1402
|
*
|
|
1436
1403
|
* Required API Key ACLs:
|
|
1437
|
-
*
|
|
1438
|
-
*
|
|
1404
|
+
* - addObject
|
|
1439
1405
|
* @param getTask - The getTask object.
|
|
1440
1406
|
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
1441
1407
|
* @param getTask.taskID - Unique task identifier.
|
|
@@ -1463,8 +1429,7 @@ function createSearchClient({
|
|
|
1463
1429
|
* 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.
|
|
1464
1430
|
*
|
|
1465
1431
|
* Required API Key ACLs:
|
|
1466
|
-
*
|
|
1467
|
-
*
|
|
1432
|
+
* - admin
|
|
1468
1433
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1469
1434
|
*/
|
|
1470
1435
|
getTopUserIds(requestOptions) {
|
|
@@ -1483,8 +1448,7 @@ function createSearchClient({
|
|
|
1483
1448
|
* 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.
|
|
1484
1449
|
*
|
|
1485
1450
|
* Required API Key ACLs:
|
|
1486
|
-
*
|
|
1487
|
-
*
|
|
1451
|
+
* - admin
|
|
1488
1452
|
* @param getUserId - The getUserId object.
|
|
1489
1453
|
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1490
1454
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1508,8 +1472,7 @@ function createSearchClient({
|
|
|
1508
1472
|
* 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.
|
|
1509
1473
|
*
|
|
1510
1474
|
* Required API Key ACLs:
|
|
1511
|
-
*
|
|
1512
|
-
*
|
|
1475
|
+
* - admin
|
|
1513
1476
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
1514
1477
|
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1515
1478
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1519,7 +1482,7 @@ function createSearchClient({
|
|
|
1519
1482
|
const headers = {};
|
|
1520
1483
|
const queryParameters = {};
|
|
1521
1484
|
if (getClusters !== void 0) {
|
|
1522
|
-
queryParameters
|
|
1485
|
+
queryParameters["getClusters"] = getClusters.toString();
|
|
1523
1486
|
}
|
|
1524
1487
|
const request = {
|
|
1525
1488
|
method: "GET",
|
|
@@ -1533,8 +1496,7 @@ function createSearchClient({
|
|
|
1533
1496
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
1534
1497
|
*
|
|
1535
1498
|
* Required API Key ACLs:
|
|
1536
|
-
*
|
|
1537
|
-
*
|
|
1499
|
+
* - admin
|
|
1538
1500
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1539
1501
|
*/
|
|
1540
1502
|
listApiKeys(requestOptions) {
|
|
@@ -1553,8 +1515,7 @@ function createSearchClient({
|
|
|
1553
1515
|
* Lists the available clusters in a multi-cluster setup.
|
|
1554
1516
|
*
|
|
1555
1517
|
* Required API Key ACLs:
|
|
1556
|
-
*
|
|
1557
|
-
*
|
|
1518
|
+
* - admin
|
|
1558
1519
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1559
1520
|
*/
|
|
1560
1521
|
listClusters(requestOptions) {
|
|
@@ -1573,8 +1534,7 @@ function createSearchClient({
|
|
|
1573
1534
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
1574
1535
|
*
|
|
1575
1536
|
* Required API Key ACLs:
|
|
1576
|
-
*
|
|
1577
|
-
*
|
|
1537
|
+
* - listIndexes
|
|
1578
1538
|
* @param listIndices - The listIndices object.
|
|
1579
1539
|
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
1580
1540
|
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
@@ -1585,10 +1545,10 @@ function createSearchClient({
|
|
|
1585
1545
|
const headers = {};
|
|
1586
1546
|
const queryParameters = {};
|
|
1587
1547
|
if (page !== void 0) {
|
|
1588
|
-
queryParameters
|
|
1548
|
+
queryParameters["page"] = page.toString();
|
|
1589
1549
|
}
|
|
1590
1550
|
if (hitsPerPage !== void 0) {
|
|
1591
|
-
queryParameters
|
|
1551
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
1592
1552
|
}
|
|
1593
1553
|
const request = {
|
|
1594
1554
|
method: "GET",
|
|
@@ -1602,8 +1562,7 @@ function createSearchClient({
|
|
|
1602
1562
|
* 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.
|
|
1603
1563
|
*
|
|
1604
1564
|
* Required API Key ACLs:
|
|
1605
|
-
*
|
|
1606
|
-
*
|
|
1565
|
+
* - admin
|
|
1607
1566
|
* @param listUserIds - The listUserIds object.
|
|
1608
1567
|
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
1609
1568
|
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
@@ -1614,10 +1573,10 @@ function createSearchClient({
|
|
|
1614
1573
|
const headers = {};
|
|
1615
1574
|
const queryParameters = {};
|
|
1616
1575
|
if (page !== void 0) {
|
|
1617
|
-
queryParameters
|
|
1576
|
+
queryParameters["page"] = page.toString();
|
|
1618
1577
|
}
|
|
1619
1578
|
if (hitsPerPage !== void 0) {
|
|
1620
|
-
queryParameters
|
|
1579
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
1621
1580
|
}
|
|
1622
1581
|
const request = {
|
|
1623
1582
|
method: "GET",
|
|
@@ -1629,7 +1588,6 @@ function createSearchClient({
|
|
|
1629
1588
|
},
|
|
1630
1589
|
/**
|
|
1631
1590
|
* 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.
|
|
1632
|
-
*
|
|
1633
1591
|
* @param batchParams - The batchParams object.
|
|
1634
1592
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1635
1593
|
*/
|
|
@@ -1653,11 +1611,10 @@ function createSearchClient({
|
|
|
1653
1611
|
return transporter.request(request, requestOptions);
|
|
1654
1612
|
},
|
|
1655
1613
|
/**
|
|
1656
|
-
* 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
|
|
1614
|
+
* 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/).
|
|
1657
1615
|
*
|
|
1658
1616
|
* Required API Key ACLs:
|
|
1659
|
-
*
|
|
1660
|
-
*
|
|
1617
|
+
* - addObject
|
|
1661
1618
|
* @param operationIndex - The operationIndex object.
|
|
1662
1619
|
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
1663
1620
|
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
@@ -1689,11 +1646,10 @@ function createSearchClient({
|
|
|
1689
1646
|
return transporter.request(request, requestOptions);
|
|
1690
1647
|
},
|
|
1691
1648
|
/**
|
|
1692
|
-
* Adds new attributes to a record, or
|
|
1649
|
+
* 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.
|
|
1693
1650
|
*
|
|
1694
1651
|
* Required API Key ACLs:
|
|
1695
|
-
*
|
|
1696
|
-
*
|
|
1652
|
+
* - addObject
|
|
1697
1653
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
1698
1654
|
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
1699
1655
|
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
@@ -1715,7 +1671,7 @@ function createSearchClient({
|
|
|
1715
1671
|
const headers = {};
|
|
1716
1672
|
const queryParameters = {};
|
|
1717
1673
|
if (createIfNotExists !== void 0) {
|
|
1718
|
-
queryParameters
|
|
1674
|
+
queryParameters["createIfNotExists"] = createIfNotExists.toString();
|
|
1719
1675
|
}
|
|
1720
1676
|
const request = {
|
|
1721
1677
|
method: "POST",
|
|
@@ -1730,8 +1686,7 @@ function createSearchClient({
|
|
|
1730
1686
|
* Deletes a user ID and its associated data from the clusters.
|
|
1731
1687
|
*
|
|
1732
1688
|
* Required API Key ACLs:
|
|
1733
|
-
*
|
|
1734
|
-
*
|
|
1689
|
+
* - admin
|
|
1735
1690
|
* @param removeUserId - The removeUserId object.
|
|
1736
1691
|
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
1737
1692
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1755,8 +1710,7 @@ function createSearchClient({
|
|
|
1755
1710
|
* Replaces the list of allowed sources.
|
|
1756
1711
|
*
|
|
1757
1712
|
* Required API Key ACLs:
|
|
1758
|
-
*
|
|
1759
|
-
*
|
|
1713
|
+
* - admin
|
|
1760
1714
|
* @param replaceSources - The replaceSources object.
|
|
1761
1715
|
* @param replaceSources.source - Allowed sources.
|
|
1762
1716
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1781,8 +1735,7 @@ function createSearchClient({
|
|
|
1781
1735
|
* 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.
|
|
1782
1736
|
*
|
|
1783
1737
|
* Required API Key ACLs:
|
|
1784
|
-
*
|
|
1785
|
-
*
|
|
1738
|
+
* - admin
|
|
1786
1739
|
* @param restoreApiKey - The restoreApiKey object.
|
|
1787
1740
|
* @param restoreApiKey.key - API key.
|
|
1788
1741
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1806,11 +1759,10 @@ function createSearchClient({
|
|
|
1806
1759
|
* 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).
|
|
1807
1760
|
*
|
|
1808
1761
|
* Required API Key ACLs:
|
|
1809
|
-
*
|
|
1810
|
-
*
|
|
1762
|
+
* - addObject
|
|
1811
1763
|
* @param saveObject - The saveObject object.
|
|
1812
1764
|
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
1813
|
-
* @param saveObject.body - The record
|
|
1765
|
+
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
1814
1766
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1815
1767
|
*/
|
|
1816
1768
|
saveObject({ indexName, body }, requestOptions) {
|
|
@@ -1836,8 +1788,7 @@ function createSearchClient({
|
|
|
1836
1788
|
* 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).
|
|
1837
1789
|
*
|
|
1838
1790
|
* Required API Key ACLs:
|
|
1839
|
-
*
|
|
1840
|
-
*
|
|
1791
|
+
* - editSettings
|
|
1841
1792
|
* @param saveRule - The saveRule object.
|
|
1842
1793
|
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
1843
1794
|
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
@@ -1862,7 +1813,7 @@ function createSearchClient({
|
|
|
1862
1813
|
const headers = {};
|
|
1863
1814
|
const queryParameters = {};
|
|
1864
1815
|
if (forwardToReplicas !== void 0) {
|
|
1865
|
-
queryParameters
|
|
1816
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1866
1817
|
}
|
|
1867
1818
|
const request = {
|
|
1868
1819
|
method: "PUT",
|
|
@@ -1877,8 +1828,7 @@ function createSearchClient({
|
|
|
1877
1828
|
* 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.
|
|
1878
1829
|
*
|
|
1879
1830
|
* Required API Key ACLs:
|
|
1880
|
-
*
|
|
1881
|
-
*
|
|
1831
|
+
* - editSettings
|
|
1882
1832
|
* @param saveRules - The saveRules object.
|
|
1883
1833
|
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
1884
1834
|
* @param saveRules.rules - The rules object.
|
|
@@ -1897,10 +1847,10 @@ function createSearchClient({
|
|
|
1897
1847
|
const headers = {};
|
|
1898
1848
|
const queryParameters = {};
|
|
1899
1849
|
if (forwardToReplicas !== void 0) {
|
|
1900
|
-
queryParameters
|
|
1850
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1901
1851
|
}
|
|
1902
1852
|
if (clearExistingRules !== void 0) {
|
|
1903
|
-
queryParameters
|
|
1853
|
+
queryParameters["clearExistingRules"] = clearExistingRules.toString();
|
|
1904
1854
|
}
|
|
1905
1855
|
const request = {
|
|
1906
1856
|
method: "POST",
|
|
@@ -1915,8 +1865,7 @@ function createSearchClient({
|
|
|
1915
1865
|
* 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).
|
|
1916
1866
|
*
|
|
1917
1867
|
* Required API Key ACLs:
|
|
1918
|
-
*
|
|
1919
|
-
*
|
|
1868
|
+
* - editSettings
|
|
1920
1869
|
* @param saveSynonym - The saveSynonym object.
|
|
1921
1870
|
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
1922
1871
|
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1944,7 +1893,7 @@ function createSearchClient({
|
|
|
1944
1893
|
const headers = {};
|
|
1945
1894
|
const queryParameters = {};
|
|
1946
1895
|
if (forwardToReplicas !== void 0) {
|
|
1947
|
-
queryParameters
|
|
1896
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1948
1897
|
}
|
|
1949
1898
|
const request = {
|
|
1950
1899
|
method: "PUT",
|
|
@@ -1959,8 +1908,7 @@ function createSearchClient({
|
|
|
1959
1908
|
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
|
|
1960
1909
|
*
|
|
1961
1910
|
* Required API Key ACLs:
|
|
1962
|
-
*
|
|
1963
|
-
*
|
|
1911
|
+
* - editSettings
|
|
1964
1912
|
* @param saveSynonyms - The saveSynonyms object.
|
|
1965
1913
|
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1966
1914
|
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
@@ -1979,10 +1927,10 @@ function createSearchClient({
|
|
|
1979
1927
|
const headers = {};
|
|
1980
1928
|
const queryParameters = {};
|
|
1981
1929
|
if (forwardToReplicas !== void 0) {
|
|
1982
|
-
queryParameters
|
|
1930
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1983
1931
|
}
|
|
1984
1932
|
if (replaceExistingSynonyms !== void 0) {
|
|
1985
|
-
queryParameters
|
|
1933
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
1986
1934
|
}
|
|
1987
1935
|
const request = {
|
|
1988
1936
|
method: "POST",
|
|
@@ -1994,11 +1942,10 @@ function createSearchClient({
|
|
|
1994
1942
|
return transporter.request(request, requestOptions);
|
|
1995
1943
|
},
|
|
1996
1944
|
/**
|
|
1997
|
-
* Sends multiple search
|
|
1945
|
+
* 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.
|
|
1998
1946
|
*
|
|
1999
1947
|
* Required API Key ACLs:
|
|
2000
|
-
*
|
|
2001
|
-
*
|
|
1948
|
+
* - search
|
|
2002
1949
|
* @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
|
|
2003
1950
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2004
1951
|
*/
|
|
@@ -2048,8 +1995,7 @@ function createSearchClient({
|
|
|
2048
1995
|
* Searches for standard and custom dictionary entries.
|
|
2049
1996
|
*
|
|
2050
1997
|
* Required API Key ACLs:
|
|
2051
|
-
*
|
|
2052
|
-
*
|
|
1998
|
+
* - settings
|
|
2053
1999
|
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
2054
2000
|
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
2055
2001
|
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
@@ -2090,8 +2036,7 @@ function createSearchClient({
|
|
|
2090
2036
|
* 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**.
|
|
2091
2037
|
*
|
|
2092
2038
|
* Required API Key ACLs:
|
|
2093
|
-
*
|
|
2094
|
-
*
|
|
2039
|
+
* - search
|
|
2095
2040
|
* @param searchForFacetValues - The searchForFacetValues object.
|
|
2096
2041
|
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
2097
2042
|
* @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.
|
|
@@ -2123,8 +2068,7 @@ function createSearchClient({
|
|
|
2123
2068
|
* Searches for rules in your index.
|
|
2124
2069
|
*
|
|
2125
2070
|
* Required API Key ACLs:
|
|
2126
|
-
*
|
|
2127
|
-
*
|
|
2071
|
+
* - settings
|
|
2128
2072
|
* @param searchRules - The searchRules object.
|
|
2129
2073
|
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
2130
2074
|
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
@@ -2149,11 +2093,10 @@ function createSearchClient({
|
|
|
2149
2093
|
return transporter.request(request, requestOptions);
|
|
2150
2094
|
},
|
|
2151
2095
|
/**
|
|
2152
|
-
* Searches a single index and
|
|
2096
|
+
* 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.
|
|
2153
2097
|
*
|
|
2154
2098
|
* Required API Key ACLs:
|
|
2155
|
-
*
|
|
2156
|
-
*
|
|
2099
|
+
* - search
|
|
2157
2100
|
* @param searchSingleIndex - The searchSingleIndex object.
|
|
2158
2101
|
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
2159
2102
|
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
@@ -2181,8 +2124,7 @@ function createSearchClient({
|
|
|
2181
2124
|
* Searches for synonyms in your index.
|
|
2182
2125
|
*
|
|
2183
2126
|
* Required API Key ACLs:
|
|
2184
|
-
*
|
|
2185
|
-
*
|
|
2127
|
+
* - settings
|
|
2186
2128
|
* @param searchSynonyms - The searchSynonyms object.
|
|
2187
2129
|
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
2188
2130
|
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
@@ -2213,8 +2155,7 @@ function createSearchClient({
|
|
|
2213
2155
|
* 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).
|
|
2214
2156
|
*
|
|
2215
2157
|
* Required API Key ACLs:
|
|
2216
|
-
*
|
|
2217
|
-
*
|
|
2158
|
+
* - admin
|
|
2218
2159
|
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
2219
2160
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2220
2161
|
*/
|
|
@@ -2243,8 +2184,7 @@ function createSearchClient({
|
|
|
2243
2184
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
2244
2185
|
*
|
|
2245
2186
|
* Required API Key ACLs:
|
|
2246
|
-
*
|
|
2247
|
-
*
|
|
2187
|
+
* - editSettings
|
|
2248
2188
|
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
2249
2189
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2250
2190
|
*/
|
|
@@ -2273,8 +2213,7 @@ function createSearchClient({
|
|
|
2273
2213
|
* 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.
|
|
2274
2214
|
*
|
|
2275
2215
|
* Required API Key ACLs:
|
|
2276
|
-
*
|
|
2277
|
-
*
|
|
2216
|
+
* - editSettings
|
|
2278
2217
|
* @param setSettings - The setSettings object.
|
|
2279
2218
|
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
2280
2219
|
* @param setSettings.indexSettings - The indexSettings object.
|
|
@@ -2292,7 +2231,7 @@ function createSearchClient({
|
|
|
2292
2231
|
const headers = {};
|
|
2293
2232
|
const queryParameters = {};
|
|
2294
2233
|
if (forwardToReplicas !== void 0) {
|
|
2295
|
-
queryParameters
|
|
2234
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
2296
2235
|
}
|
|
2297
2236
|
const request = {
|
|
2298
2237
|
method: "PUT",
|
|
@@ -2307,8 +2246,7 @@ function createSearchClient({
|
|
|
2307
2246
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
2308
2247
|
*
|
|
2309
2248
|
* Required API Key ACLs:
|
|
2310
|
-
*
|
|
2311
|
-
*
|
|
2249
|
+
* - admin
|
|
2312
2250
|
* @param updateApiKey - The updateApiKey object.
|
|
2313
2251
|
* @param updateApiKey.key - API key.
|
|
2314
2252
|
* @param updateApiKey.apiKey - The apiKey object.
|