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