@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/builds/browser.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
// builds/browser.ts
|
|
2
|
+
import { createXhrRequester } from "@algolia/requester-browser-xhr";
|
|
2
3
|
import {
|
|
3
|
-
createNullLogger,
|
|
4
|
-
createMemoryCache,
|
|
5
|
-
createFallbackableCache,
|
|
6
4
|
createBrowserLocalStorageCache,
|
|
5
|
+
createFallbackableCache,
|
|
6
|
+
createMemoryCache,
|
|
7
|
+
createNullLogger,
|
|
7
8
|
DEFAULT_CONNECT_TIMEOUT_BROWSER,
|
|
8
9
|
DEFAULT_READ_TIMEOUT_BROWSER,
|
|
9
10
|
DEFAULT_WRITE_TIMEOUT_BROWSER
|
|
10
11
|
} from "@algolia/client-common";
|
|
11
|
-
import { createXhrRequester } from "@algolia/requester-browser-xhr";
|
|
12
12
|
|
|
13
13
|
// src/searchClient.ts
|
|
14
14
|
import {
|
|
15
|
+
ApiError,
|
|
15
16
|
createAuth,
|
|
17
|
+
createIterablePromise,
|
|
16
18
|
createTransporter,
|
|
17
19
|
getAlgoliaAgent,
|
|
18
|
-
shuffle
|
|
19
|
-
ApiError,
|
|
20
|
-
createIterablePromise
|
|
20
|
+
shuffle
|
|
21
21
|
} from "@algolia/client-common";
|
|
22
|
-
var apiClientVersion = "5.
|
|
22
|
+
var apiClientVersion = "5.8.1";
|
|
23
23
|
function getDefaultHosts(appId) {
|
|
24
24
|
return [
|
|
25
25
|
{
|
|
@@ -517,8 +517,7 @@ function createSearchClient({
|
|
|
517
517
|
* Creates a new API key with specific permissions and restrictions.
|
|
518
518
|
*
|
|
519
519
|
* Required API Key ACLs:
|
|
520
|
-
*
|
|
521
|
-
*
|
|
520
|
+
* - admin
|
|
522
521
|
* @param apiKey - The apiKey object.
|
|
523
522
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
524
523
|
*/
|
|
@@ -545,12 +544,11 @@ function createSearchClient({
|
|
|
545
544
|
* 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).
|
|
546
545
|
*
|
|
547
546
|
* Required API Key ACLs:
|
|
548
|
-
*
|
|
549
|
-
*
|
|
547
|
+
* - addObject
|
|
550
548
|
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
551
549
|
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
552
550
|
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
553
|
-
* @param addOrUpdateObject.body - The record
|
|
551
|
+
* @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
554
552
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
555
553
|
*/
|
|
556
554
|
addOrUpdateObject({ indexName, objectID, body }, requestOptions) {
|
|
@@ -579,8 +577,7 @@ function createSearchClient({
|
|
|
579
577
|
* Adds a source to the list of allowed sources.
|
|
580
578
|
*
|
|
581
579
|
* Required API Key ACLs:
|
|
582
|
-
*
|
|
583
|
-
*
|
|
580
|
+
* - admin
|
|
584
581
|
* @param source - Source to add.
|
|
585
582
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
586
583
|
*/
|
|
@@ -607,8 +604,7 @@ function createSearchClient({
|
|
|
607
604
|
* 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.
|
|
608
605
|
*
|
|
609
606
|
* Required API Key ACLs:
|
|
610
|
-
*
|
|
611
|
-
*
|
|
607
|
+
* - admin
|
|
612
608
|
* @param assignUserId - The assignUserId object.
|
|
613
609
|
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
614
610
|
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
@@ -641,7 +637,6 @@ function createSearchClient({
|
|
|
641
637
|
},
|
|
642
638
|
/**
|
|
643
639
|
* 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.
|
|
644
|
-
*
|
|
645
640
|
* @param batch - The batch object.
|
|
646
641
|
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
647
642
|
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
@@ -673,8 +668,7 @@ function createSearchClient({
|
|
|
673
668
|
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
674
669
|
*
|
|
675
670
|
* Required API Key ACLs:
|
|
676
|
-
*
|
|
677
|
-
*
|
|
671
|
+
* - admin
|
|
678
672
|
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
679
673
|
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
680
674
|
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
@@ -712,8 +706,7 @@ function createSearchClient({
|
|
|
712
706
|
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
713
707
|
*
|
|
714
708
|
* Required API Key ACLs:
|
|
715
|
-
*
|
|
716
|
-
*
|
|
709
|
+
* - editSettings
|
|
717
710
|
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
718
711
|
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
719
712
|
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
@@ -747,11 +740,10 @@ function createSearchClient({
|
|
|
747
740
|
return transporter.request(request, requestOptions);
|
|
748
741
|
},
|
|
749
742
|
/**
|
|
750
|
-
* 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`
|
|
743
|
+
* 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.
|
|
751
744
|
*
|
|
752
745
|
* Required API Key ACLs:
|
|
753
|
-
*
|
|
754
|
-
*
|
|
746
|
+
* - browse
|
|
755
747
|
* @param browse - The browse object.
|
|
756
748
|
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
757
749
|
* @param browse.browseParams - The browseParams object.
|
|
@@ -769,7 +761,8 @@ function createSearchClient({
|
|
|
769
761
|
path: requestPath,
|
|
770
762
|
queryParameters,
|
|
771
763
|
headers,
|
|
772
|
-
data: browseParams ? browseParams : {}
|
|
764
|
+
data: browseParams ? browseParams : {},
|
|
765
|
+
useReadTransporter: true
|
|
773
766
|
};
|
|
774
767
|
return transporter.request(request, requestOptions);
|
|
775
768
|
},
|
|
@@ -777,8 +770,7 @@ function createSearchClient({
|
|
|
777
770
|
* Deletes only the records from an index while keeping settings, synonyms, and rules.
|
|
778
771
|
*
|
|
779
772
|
* Required API Key ACLs:
|
|
780
|
-
*
|
|
781
|
-
*
|
|
773
|
+
* - deleteIndex
|
|
782
774
|
* @param clearObjects - The clearObjects object.
|
|
783
775
|
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
784
776
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -802,8 +794,7 @@ function createSearchClient({
|
|
|
802
794
|
* Deletes all rules from the index.
|
|
803
795
|
*
|
|
804
796
|
* Required API Key ACLs:
|
|
805
|
-
*
|
|
806
|
-
*
|
|
797
|
+
* - editSettings
|
|
807
798
|
* @param clearRules - The clearRules object.
|
|
808
799
|
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
809
800
|
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
@@ -817,7 +808,7 @@ function createSearchClient({
|
|
|
817
808
|
const headers = {};
|
|
818
809
|
const queryParameters = {};
|
|
819
810
|
if (forwardToReplicas !== void 0) {
|
|
820
|
-
queryParameters
|
|
811
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
821
812
|
}
|
|
822
813
|
const request = {
|
|
823
814
|
method: "POST",
|
|
@@ -831,8 +822,7 @@ function createSearchClient({
|
|
|
831
822
|
* Deletes all synonyms from the index.
|
|
832
823
|
*
|
|
833
824
|
* Required API Key ACLs:
|
|
834
|
-
*
|
|
835
|
-
*
|
|
825
|
+
* - editSettings
|
|
836
826
|
* @param clearSynonyms - The clearSynonyms object.
|
|
837
827
|
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
838
828
|
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
@@ -846,7 +836,7 @@ function createSearchClient({
|
|
|
846
836
|
const headers = {};
|
|
847
837
|
const queryParameters = {};
|
|
848
838
|
if (forwardToReplicas !== void 0) {
|
|
849
|
-
queryParameters
|
|
839
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
850
840
|
}
|
|
851
841
|
const request = {
|
|
852
842
|
method: "POST",
|
|
@@ -858,7 +848,6 @@ function createSearchClient({
|
|
|
858
848
|
},
|
|
859
849
|
/**
|
|
860
850
|
* This method allow you to send requests to the Algolia REST API.
|
|
861
|
-
*
|
|
862
851
|
* @param customDelete - The customDelete object.
|
|
863
852
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
864
853
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -881,7 +870,6 @@ function createSearchClient({
|
|
|
881
870
|
},
|
|
882
871
|
/**
|
|
883
872
|
* This method allow you to send requests to the Algolia REST API.
|
|
884
|
-
*
|
|
885
873
|
* @param customGet - The customGet object.
|
|
886
874
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
887
875
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -904,7 +892,6 @@ function createSearchClient({
|
|
|
904
892
|
},
|
|
905
893
|
/**
|
|
906
894
|
* This method allow you to send requests to the Algolia REST API.
|
|
907
|
-
*
|
|
908
895
|
* @param customPost - The customPost object.
|
|
909
896
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
910
897
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -929,7 +916,6 @@ function createSearchClient({
|
|
|
929
916
|
},
|
|
930
917
|
/**
|
|
931
918
|
* This method allow you to send requests to the Algolia REST API.
|
|
932
|
-
*
|
|
933
919
|
* @param customPut - The customPut object.
|
|
934
920
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
935
921
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -956,8 +942,7 @@ function createSearchClient({
|
|
|
956
942
|
* Deletes the API key.
|
|
957
943
|
*
|
|
958
944
|
* Required API Key ACLs:
|
|
959
|
-
*
|
|
960
|
-
*
|
|
945
|
+
* - admin
|
|
961
946
|
* @param deleteApiKey - The deleteApiKey object.
|
|
962
947
|
* @param deleteApiKey.key - API key.
|
|
963
948
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -981,8 +966,7 @@ function createSearchClient({
|
|
|
981
966
|
* 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).
|
|
982
967
|
*
|
|
983
968
|
* Required API Key ACLs:
|
|
984
|
-
*
|
|
985
|
-
*
|
|
969
|
+
* - deleteIndex
|
|
986
970
|
* @param deleteBy - The deleteBy object.
|
|
987
971
|
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
988
972
|
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
@@ -1011,8 +995,7 @@ function createSearchClient({
|
|
|
1011
995
|
* 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/).
|
|
1012
996
|
*
|
|
1013
997
|
* Required API Key ACLs:
|
|
1014
|
-
*
|
|
1015
|
-
*
|
|
998
|
+
* - deleteIndex
|
|
1016
999
|
* @param deleteIndex - The deleteIndex object.
|
|
1017
1000
|
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
1018
1001
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1036,8 +1019,7 @@ function createSearchClient({
|
|
|
1036
1019
|
* 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).
|
|
1037
1020
|
*
|
|
1038
1021
|
* Required API Key ACLs:
|
|
1039
|
-
*
|
|
1040
|
-
*
|
|
1022
|
+
* - deleteObject
|
|
1041
1023
|
* @param deleteObject - The deleteObject object.
|
|
1042
1024
|
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
1043
1025
|
* @param deleteObject.objectID - Unique record identifier.
|
|
@@ -1065,8 +1047,7 @@ function createSearchClient({
|
|
|
1065
1047
|
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
1066
1048
|
*
|
|
1067
1049
|
* Required API Key ACLs:
|
|
1068
|
-
*
|
|
1069
|
-
*
|
|
1050
|
+
* - editSettings
|
|
1070
1051
|
* @param deleteRule - The deleteRule object.
|
|
1071
1052
|
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
1072
1053
|
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
@@ -1084,7 +1065,7 @@ function createSearchClient({
|
|
|
1084
1065
|
const headers = {};
|
|
1085
1066
|
const queryParameters = {};
|
|
1086
1067
|
if (forwardToReplicas !== void 0) {
|
|
1087
|
-
queryParameters
|
|
1068
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1088
1069
|
}
|
|
1089
1070
|
const request = {
|
|
1090
1071
|
method: "DELETE",
|
|
@@ -1098,8 +1079,7 @@ function createSearchClient({
|
|
|
1098
1079
|
* Deletes a source from the list of allowed sources.
|
|
1099
1080
|
*
|
|
1100
1081
|
* Required API Key ACLs:
|
|
1101
|
-
*
|
|
1102
|
-
*
|
|
1082
|
+
* - admin
|
|
1103
1083
|
* @param deleteSource - The deleteSource object.
|
|
1104
1084
|
* @param deleteSource.source - IP address range of the source.
|
|
1105
1085
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1123,8 +1103,7 @@ function createSearchClient({
|
|
|
1123
1103
|
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
1124
1104
|
*
|
|
1125
1105
|
* Required API Key ACLs:
|
|
1126
|
-
*
|
|
1127
|
-
*
|
|
1106
|
+
* - editSettings
|
|
1128
1107
|
* @param deleteSynonym - The deleteSynonym object.
|
|
1129
1108
|
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
1130
1109
|
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1142,7 +1121,7 @@ function createSearchClient({
|
|
|
1142
1121
|
const headers = {};
|
|
1143
1122
|
const queryParameters = {};
|
|
1144
1123
|
if (forwardToReplicas !== void 0) {
|
|
1145
|
-
queryParameters
|
|
1124
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1146
1125
|
}
|
|
1147
1126
|
const request = {
|
|
1148
1127
|
method: "DELETE",
|
|
@@ -1154,7 +1133,6 @@ function createSearchClient({
|
|
|
1154
1133
|
},
|
|
1155
1134
|
/**
|
|
1156
1135
|
* 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>`.
|
|
1157
|
-
*
|
|
1158
1136
|
* @param getApiKey - The getApiKey object.
|
|
1159
1137
|
* @param getApiKey.key - API key.
|
|
1160
1138
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1178,8 +1156,7 @@ function createSearchClient({
|
|
|
1178
1156
|
* Checks the status of a given application task.
|
|
1179
1157
|
*
|
|
1180
1158
|
* Required API Key ACLs:
|
|
1181
|
-
*
|
|
1182
|
-
*
|
|
1159
|
+
* - editSettings
|
|
1183
1160
|
* @param getAppTask - The getAppTask object.
|
|
1184
1161
|
* @param getAppTask.taskID - Unique task identifier.
|
|
1185
1162
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1203,8 +1180,7 @@ function createSearchClient({
|
|
|
1203
1180
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1204
1181
|
*
|
|
1205
1182
|
* Required API Key ACLs:
|
|
1206
|
-
*
|
|
1207
|
-
*
|
|
1183
|
+
* - settings
|
|
1208
1184
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1209
1185
|
*/
|
|
1210
1186
|
getDictionaryLanguages(requestOptions) {
|
|
@@ -1223,8 +1199,7 @@ function createSearchClient({
|
|
|
1223
1199
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1224
1200
|
*
|
|
1225
1201
|
* Required API Key ACLs:
|
|
1226
|
-
*
|
|
1227
|
-
*
|
|
1202
|
+
* - settings
|
|
1228
1203
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1229
1204
|
*/
|
|
1230
1205
|
getDictionarySettings(requestOptions) {
|
|
@@ -1243,8 +1218,7 @@ function createSearchClient({
|
|
|
1243
1218
|
* 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.
|
|
1244
1219
|
*
|
|
1245
1220
|
* Required API Key ACLs:
|
|
1246
|
-
*
|
|
1247
|
-
*
|
|
1221
|
+
* - logs
|
|
1248
1222
|
* @param getLogs - The getLogs object.
|
|
1249
1223
|
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
1250
1224
|
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
@@ -1257,16 +1231,16 @@ function createSearchClient({
|
|
|
1257
1231
|
const headers = {};
|
|
1258
1232
|
const queryParameters = {};
|
|
1259
1233
|
if (offset !== void 0) {
|
|
1260
|
-
queryParameters
|
|
1234
|
+
queryParameters["offset"] = offset.toString();
|
|
1261
1235
|
}
|
|
1262
1236
|
if (length !== void 0) {
|
|
1263
|
-
queryParameters
|
|
1237
|
+
queryParameters["length"] = length.toString();
|
|
1264
1238
|
}
|
|
1265
1239
|
if (indexName !== void 0) {
|
|
1266
|
-
queryParameters
|
|
1240
|
+
queryParameters["indexName"] = indexName.toString();
|
|
1267
1241
|
}
|
|
1268
1242
|
if (type !== void 0) {
|
|
1269
|
-
queryParameters
|
|
1243
|
+
queryParameters["type"] = type.toString();
|
|
1270
1244
|
}
|
|
1271
1245
|
const request = {
|
|
1272
1246
|
method: "GET",
|
|
@@ -1280,8 +1254,7 @@ function createSearchClient({
|
|
|
1280
1254
|
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
|
1281
1255
|
*
|
|
1282
1256
|
* Required API Key ACLs:
|
|
1283
|
-
*
|
|
1284
|
-
*
|
|
1257
|
+
* - search
|
|
1285
1258
|
* @param getObject - The getObject object.
|
|
1286
1259
|
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
1287
1260
|
* @param getObject.objectID - Unique record identifier.
|
|
@@ -1299,7 +1272,7 @@ function createSearchClient({
|
|
|
1299
1272
|
const headers = {};
|
|
1300
1273
|
const queryParameters = {};
|
|
1301
1274
|
if (attributesToRetrieve !== void 0) {
|
|
1302
|
-
queryParameters
|
|
1275
|
+
queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
|
|
1303
1276
|
}
|
|
1304
1277
|
const request = {
|
|
1305
1278
|
method: "GET",
|
|
@@ -1313,8 +1286,7 @@ function createSearchClient({
|
|
|
1313
1286
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
1314
1287
|
*
|
|
1315
1288
|
* Required API Key ACLs:
|
|
1316
|
-
*
|
|
1317
|
-
*
|
|
1289
|
+
* - search
|
|
1318
1290
|
* @param getObjectsParams - Request object.
|
|
1319
1291
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1320
1292
|
*/
|
|
@@ -1343,8 +1315,7 @@ function createSearchClient({
|
|
|
1343
1315
|
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
1344
1316
|
*
|
|
1345
1317
|
* Required API Key ACLs:
|
|
1346
|
-
*
|
|
1347
|
-
*
|
|
1318
|
+
* - settings
|
|
1348
1319
|
* @param getRule - The getRule object.
|
|
1349
1320
|
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
1350
1321
|
* @param getRule.objectID - Unique identifier of a rule object.
|
|
@@ -1372,8 +1343,7 @@ function createSearchClient({
|
|
|
1372
1343
|
* Retrieves an object with non-null index settings.
|
|
1373
1344
|
*
|
|
1374
1345
|
* Required API Key ACLs:
|
|
1375
|
-
*
|
|
1376
|
-
*
|
|
1346
|
+
* - search
|
|
1377
1347
|
* @param getSettings - The getSettings object.
|
|
1378
1348
|
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
1379
1349
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1397,8 +1367,7 @@ function createSearchClient({
|
|
|
1397
1367
|
* Retrieves all allowed IP addresses with access to your application.
|
|
1398
1368
|
*
|
|
1399
1369
|
* Required API Key ACLs:
|
|
1400
|
-
*
|
|
1401
|
-
*
|
|
1370
|
+
* - admin
|
|
1402
1371
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1403
1372
|
*/
|
|
1404
1373
|
getSources(requestOptions) {
|
|
@@ -1414,11 +1383,10 @@ function createSearchClient({
|
|
|
1414
1383
|
return transporter.request(request, requestOptions);
|
|
1415
1384
|
},
|
|
1416
1385
|
/**
|
|
1417
|
-
* Retrieves a
|
|
1386
|
+
* Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
1418
1387
|
*
|
|
1419
1388
|
* Required API Key ACLs:
|
|
1420
|
-
*
|
|
1421
|
-
*
|
|
1389
|
+
* - settings
|
|
1422
1390
|
* @param getSynonym - The getSynonym object.
|
|
1423
1391
|
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
1424
1392
|
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1446,8 +1414,7 @@ function createSearchClient({
|
|
|
1446
1414
|
* 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.
|
|
1447
1415
|
*
|
|
1448
1416
|
* Required API Key ACLs:
|
|
1449
|
-
*
|
|
1450
|
-
*
|
|
1417
|
+
* - addObject
|
|
1451
1418
|
* @param getTask - The getTask object.
|
|
1452
1419
|
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
1453
1420
|
* @param getTask.taskID - Unique task identifier.
|
|
@@ -1475,8 +1442,7 @@ function createSearchClient({
|
|
|
1475
1442
|
* 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.
|
|
1476
1443
|
*
|
|
1477
1444
|
* Required API Key ACLs:
|
|
1478
|
-
*
|
|
1479
|
-
*
|
|
1445
|
+
* - admin
|
|
1480
1446
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1481
1447
|
*/
|
|
1482
1448
|
getTopUserIds(requestOptions) {
|
|
@@ -1495,8 +1461,7 @@ function createSearchClient({
|
|
|
1495
1461
|
* 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.
|
|
1496
1462
|
*
|
|
1497
1463
|
* Required API Key ACLs:
|
|
1498
|
-
*
|
|
1499
|
-
*
|
|
1464
|
+
* - admin
|
|
1500
1465
|
* @param getUserId - The getUserId object.
|
|
1501
1466
|
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1502
1467
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1520,8 +1485,7 @@ function createSearchClient({
|
|
|
1520
1485
|
* 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.
|
|
1521
1486
|
*
|
|
1522
1487
|
* Required API Key ACLs:
|
|
1523
|
-
*
|
|
1524
|
-
*
|
|
1488
|
+
* - admin
|
|
1525
1489
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
1526
1490
|
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1527
1491
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1531,7 +1495,7 @@ function createSearchClient({
|
|
|
1531
1495
|
const headers = {};
|
|
1532
1496
|
const queryParameters = {};
|
|
1533
1497
|
if (getClusters !== void 0) {
|
|
1534
|
-
queryParameters
|
|
1498
|
+
queryParameters["getClusters"] = getClusters.toString();
|
|
1535
1499
|
}
|
|
1536
1500
|
const request = {
|
|
1537
1501
|
method: "GET",
|
|
@@ -1545,8 +1509,7 @@ function createSearchClient({
|
|
|
1545
1509
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
1546
1510
|
*
|
|
1547
1511
|
* Required API Key ACLs:
|
|
1548
|
-
*
|
|
1549
|
-
*
|
|
1512
|
+
* - admin
|
|
1550
1513
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1551
1514
|
*/
|
|
1552
1515
|
listApiKeys(requestOptions) {
|
|
@@ -1565,8 +1528,7 @@ function createSearchClient({
|
|
|
1565
1528
|
* Lists the available clusters in a multi-cluster setup.
|
|
1566
1529
|
*
|
|
1567
1530
|
* Required API Key ACLs:
|
|
1568
|
-
*
|
|
1569
|
-
*
|
|
1531
|
+
* - admin
|
|
1570
1532
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1571
1533
|
*/
|
|
1572
1534
|
listClusters(requestOptions) {
|
|
@@ -1585,8 +1547,7 @@ function createSearchClient({
|
|
|
1585
1547
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
1586
1548
|
*
|
|
1587
1549
|
* Required API Key ACLs:
|
|
1588
|
-
*
|
|
1589
|
-
*
|
|
1550
|
+
* - listIndexes
|
|
1590
1551
|
* @param listIndices - The listIndices object.
|
|
1591
1552
|
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
1592
1553
|
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
@@ -1597,10 +1558,10 @@ function createSearchClient({
|
|
|
1597
1558
|
const headers = {};
|
|
1598
1559
|
const queryParameters = {};
|
|
1599
1560
|
if (page !== void 0) {
|
|
1600
|
-
queryParameters
|
|
1561
|
+
queryParameters["page"] = page.toString();
|
|
1601
1562
|
}
|
|
1602
1563
|
if (hitsPerPage !== void 0) {
|
|
1603
|
-
queryParameters
|
|
1564
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
1604
1565
|
}
|
|
1605
1566
|
const request = {
|
|
1606
1567
|
method: "GET",
|
|
@@ -1614,8 +1575,7 @@ function createSearchClient({
|
|
|
1614
1575
|
* 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.
|
|
1615
1576
|
*
|
|
1616
1577
|
* Required API Key ACLs:
|
|
1617
|
-
*
|
|
1618
|
-
*
|
|
1578
|
+
* - admin
|
|
1619
1579
|
* @param listUserIds - The listUserIds object.
|
|
1620
1580
|
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
1621
1581
|
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
@@ -1626,10 +1586,10 @@ function createSearchClient({
|
|
|
1626
1586
|
const headers = {};
|
|
1627
1587
|
const queryParameters = {};
|
|
1628
1588
|
if (page !== void 0) {
|
|
1629
|
-
queryParameters
|
|
1589
|
+
queryParameters["page"] = page.toString();
|
|
1630
1590
|
}
|
|
1631
1591
|
if (hitsPerPage !== void 0) {
|
|
1632
|
-
queryParameters
|
|
1592
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
1633
1593
|
}
|
|
1634
1594
|
const request = {
|
|
1635
1595
|
method: "GET",
|
|
@@ -1641,7 +1601,6 @@ function createSearchClient({
|
|
|
1641
1601
|
},
|
|
1642
1602
|
/**
|
|
1643
1603
|
* 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.
|
|
1644
|
-
*
|
|
1645
1604
|
* @param batchParams - The batchParams object.
|
|
1646
1605
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1647
1606
|
*/
|
|
@@ -1665,11 +1624,10 @@ function createSearchClient({
|
|
|
1665
1624
|
return transporter.request(request, requestOptions);
|
|
1666
1625
|
},
|
|
1667
1626
|
/**
|
|
1668
|
-
* 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
|
|
1627
|
+
* 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/).
|
|
1669
1628
|
*
|
|
1670
1629
|
* Required API Key ACLs:
|
|
1671
|
-
*
|
|
1672
|
-
*
|
|
1630
|
+
* - addObject
|
|
1673
1631
|
* @param operationIndex - The operationIndex object.
|
|
1674
1632
|
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
1675
1633
|
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
@@ -1701,11 +1659,10 @@ function createSearchClient({
|
|
|
1701
1659
|
return transporter.request(request, requestOptions);
|
|
1702
1660
|
},
|
|
1703
1661
|
/**
|
|
1704
|
-
* Adds new attributes to a record, or
|
|
1662
|
+
* 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.
|
|
1705
1663
|
*
|
|
1706
1664
|
* Required API Key ACLs:
|
|
1707
|
-
*
|
|
1708
|
-
*
|
|
1665
|
+
* - addObject
|
|
1709
1666
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
1710
1667
|
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
1711
1668
|
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
@@ -1727,7 +1684,7 @@ function createSearchClient({
|
|
|
1727
1684
|
const headers = {};
|
|
1728
1685
|
const queryParameters = {};
|
|
1729
1686
|
if (createIfNotExists !== void 0) {
|
|
1730
|
-
queryParameters
|
|
1687
|
+
queryParameters["createIfNotExists"] = createIfNotExists.toString();
|
|
1731
1688
|
}
|
|
1732
1689
|
const request = {
|
|
1733
1690
|
method: "POST",
|
|
@@ -1742,8 +1699,7 @@ function createSearchClient({
|
|
|
1742
1699
|
* Deletes a user ID and its associated data from the clusters.
|
|
1743
1700
|
*
|
|
1744
1701
|
* Required API Key ACLs:
|
|
1745
|
-
*
|
|
1746
|
-
*
|
|
1702
|
+
* - admin
|
|
1747
1703
|
* @param removeUserId - The removeUserId object.
|
|
1748
1704
|
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
1749
1705
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1767,8 +1723,7 @@ function createSearchClient({
|
|
|
1767
1723
|
* Replaces the list of allowed sources.
|
|
1768
1724
|
*
|
|
1769
1725
|
* Required API Key ACLs:
|
|
1770
|
-
*
|
|
1771
|
-
*
|
|
1726
|
+
* - admin
|
|
1772
1727
|
* @param replaceSources - The replaceSources object.
|
|
1773
1728
|
* @param replaceSources.source - Allowed sources.
|
|
1774
1729
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1793,8 +1748,7 @@ function createSearchClient({
|
|
|
1793
1748
|
* 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.
|
|
1794
1749
|
*
|
|
1795
1750
|
* Required API Key ACLs:
|
|
1796
|
-
*
|
|
1797
|
-
*
|
|
1751
|
+
* - admin
|
|
1798
1752
|
* @param restoreApiKey - The restoreApiKey object.
|
|
1799
1753
|
* @param restoreApiKey.key - API key.
|
|
1800
1754
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1818,11 +1772,10 @@ function createSearchClient({
|
|
|
1818
1772
|
* 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).
|
|
1819
1773
|
*
|
|
1820
1774
|
* Required API Key ACLs:
|
|
1821
|
-
*
|
|
1822
|
-
*
|
|
1775
|
+
* - addObject
|
|
1823
1776
|
* @param saveObject - The saveObject object.
|
|
1824
1777
|
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
1825
|
-
* @param saveObject.body - The record
|
|
1778
|
+
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
1826
1779
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1827
1780
|
*/
|
|
1828
1781
|
saveObject({ indexName, body }, requestOptions) {
|
|
@@ -1848,8 +1801,7 @@ function createSearchClient({
|
|
|
1848
1801
|
* 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).
|
|
1849
1802
|
*
|
|
1850
1803
|
* Required API Key ACLs:
|
|
1851
|
-
*
|
|
1852
|
-
*
|
|
1804
|
+
* - editSettings
|
|
1853
1805
|
* @param saveRule - The saveRule object.
|
|
1854
1806
|
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
1855
1807
|
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
@@ -1874,7 +1826,7 @@ function createSearchClient({
|
|
|
1874
1826
|
const headers = {};
|
|
1875
1827
|
const queryParameters = {};
|
|
1876
1828
|
if (forwardToReplicas !== void 0) {
|
|
1877
|
-
queryParameters
|
|
1829
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1878
1830
|
}
|
|
1879
1831
|
const request = {
|
|
1880
1832
|
method: "PUT",
|
|
@@ -1889,8 +1841,7 @@ function createSearchClient({
|
|
|
1889
1841
|
* 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.
|
|
1890
1842
|
*
|
|
1891
1843
|
* Required API Key ACLs:
|
|
1892
|
-
*
|
|
1893
|
-
*
|
|
1844
|
+
* - editSettings
|
|
1894
1845
|
* @param saveRules - The saveRules object.
|
|
1895
1846
|
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
1896
1847
|
* @param saveRules.rules - The rules object.
|
|
@@ -1909,10 +1860,10 @@ function createSearchClient({
|
|
|
1909
1860
|
const headers = {};
|
|
1910
1861
|
const queryParameters = {};
|
|
1911
1862
|
if (forwardToReplicas !== void 0) {
|
|
1912
|
-
queryParameters
|
|
1863
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1913
1864
|
}
|
|
1914
1865
|
if (clearExistingRules !== void 0) {
|
|
1915
|
-
queryParameters
|
|
1866
|
+
queryParameters["clearExistingRules"] = clearExistingRules.toString();
|
|
1916
1867
|
}
|
|
1917
1868
|
const request = {
|
|
1918
1869
|
method: "POST",
|
|
@@ -1927,8 +1878,7 @@ function createSearchClient({
|
|
|
1927
1878
|
* 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).
|
|
1928
1879
|
*
|
|
1929
1880
|
* Required API Key ACLs:
|
|
1930
|
-
*
|
|
1931
|
-
*
|
|
1881
|
+
* - editSettings
|
|
1932
1882
|
* @param saveSynonym - The saveSynonym object.
|
|
1933
1883
|
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
1934
1884
|
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1956,7 +1906,7 @@ function createSearchClient({
|
|
|
1956
1906
|
const headers = {};
|
|
1957
1907
|
const queryParameters = {};
|
|
1958
1908
|
if (forwardToReplicas !== void 0) {
|
|
1959
|
-
queryParameters
|
|
1909
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1960
1910
|
}
|
|
1961
1911
|
const request = {
|
|
1962
1912
|
method: "PUT",
|
|
@@ -1971,8 +1921,7 @@ function createSearchClient({
|
|
|
1971
1921
|
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
|
|
1972
1922
|
*
|
|
1973
1923
|
* Required API Key ACLs:
|
|
1974
|
-
*
|
|
1975
|
-
*
|
|
1924
|
+
* - editSettings
|
|
1976
1925
|
* @param saveSynonyms - The saveSynonyms object.
|
|
1977
1926
|
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1978
1927
|
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
@@ -1991,10 +1940,10 @@ function createSearchClient({
|
|
|
1991
1940
|
const headers = {};
|
|
1992
1941
|
const queryParameters = {};
|
|
1993
1942
|
if (forwardToReplicas !== void 0) {
|
|
1994
|
-
queryParameters
|
|
1943
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1995
1944
|
}
|
|
1996
1945
|
if (replaceExistingSynonyms !== void 0) {
|
|
1997
|
-
queryParameters
|
|
1946
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
1998
1947
|
}
|
|
1999
1948
|
const request = {
|
|
2000
1949
|
method: "POST",
|
|
@@ -2006,11 +1955,10 @@ function createSearchClient({
|
|
|
2006
1955
|
return transporter.request(request, requestOptions);
|
|
2007
1956
|
},
|
|
2008
1957
|
/**
|
|
2009
|
-
* Sends multiple search
|
|
1958
|
+
* 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.
|
|
2010
1959
|
*
|
|
2011
1960
|
* Required API Key ACLs:
|
|
2012
|
-
*
|
|
2013
|
-
*
|
|
1961
|
+
* - search
|
|
2014
1962
|
* @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
|
|
2015
1963
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2016
1964
|
*/
|
|
@@ -2060,8 +2008,7 @@ function createSearchClient({
|
|
|
2060
2008
|
* Searches for standard and custom dictionary entries.
|
|
2061
2009
|
*
|
|
2062
2010
|
* Required API Key ACLs:
|
|
2063
|
-
*
|
|
2064
|
-
*
|
|
2011
|
+
* - settings
|
|
2065
2012
|
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
2066
2013
|
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
2067
2014
|
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
@@ -2102,8 +2049,7 @@ function createSearchClient({
|
|
|
2102
2049
|
* 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**.
|
|
2103
2050
|
*
|
|
2104
2051
|
* Required API Key ACLs:
|
|
2105
|
-
*
|
|
2106
|
-
*
|
|
2052
|
+
* - search
|
|
2107
2053
|
* @param searchForFacetValues - The searchForFacetValues object.
|
|
2108
2054
|
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
2109
2055
|
* @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.
|
|
@@ -2135,8 +2081,7 @@ function createSearchClient({
|
|
|
2135
2081
|
* Searches for rules in your index.
|
|
2136
2082
|
*
|
|
2137
2083
|
* Required API Key ACLs:
|
|
2138
|
-
*
|
|
2139
|
-
*
|
|
2084
|
+
* - settings
|
|
2140
2085
|
* @param searchRules - The searchRules object.
|
|
2141
2086
|
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
2142
2087
|
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
@@ -2161,11 +2106,10 @@ function createSearchClient({
|
|
|
2161
2106
|
return transporter.request(request, requestOptions);
|
|
2162
2107
|
},
|
|
2163
2108
|
/**
|
|
2164
|
-
* Searches a single index and
|
|
2109
|
+
* 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.
|
|
2165
2110
|
*
|
|
2166
2111
|
* Required API Key ACLs:
|
|
2167
|
-
*
|
|
2168
|
-
*
|
|
2112
|
+
* - search
|
|
2169
2113
|
* @param searchSingleIndex - The searchSingleIndex object.
|
|
2170
2114
|
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
2171
2115
|
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
@@ -2193,8 +2137,7 @@ function createSearchClient({
|
|
|
2193
2137
|
* Searches for synonyms in your index.
|
|
2194
2138
|
*
|
|
2195
2139
|
* Required API Key ACLs:
|
|
2196
|
-
*
|
|
2197
|
-
*
|
|
2140
|
+
* - settings
|
|
2198
2141
|
* @param searchSynonyms - The searchSynonyms object.
|
|
2199
2142
|
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
2200
2143
|
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
@@ -2225,8 +2168,7 @@ function createSearchClient({
|
|
|
2225
2168
|
* 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).
|
|
2226
2169
|
*
|
|
2227
2170
|
* Required API Key ACLs:
|
|
2228
|
-
*
|
|
2229
|
-
*
|
|
2171
|
+
* - admin
|
|
2230
2172
|
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
2231
2173
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2232
2174
|
*/
|
|
@@ -2255,8 +2197,7 @@ function createSearchClient({
|
|
|
2255
2197
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
2256
2198
|
*
|
|
2257
2199
|
* Required API Key ACLs:
|
|
2258
|
-
*
|
|
2259
|
-
*
|
|
2200
|
+
* - editSettings
|
|
2260
2201
|
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
2261
2202
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2262
2203
|
*/
|
|
@@ -2285,8 +2226,7 @@ function createSearchClient({
|
|
|
2285
2226
|
* 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.
|
|
2286
2227
|
*
|
|
2287
2228
|
* Required API Key ACLs:
|
|
2288
|
-
*
|
|
2289
|
-
*
|
|
2229
|
+
* - editSettings
|
|
2290
2230
|
* @param setSettings - The setSettings object.
|
|
2291
2231
|
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
2292
2232
|
* @param setSettings.indexSettings - The indexSettings object.
|
|
@@ -2304,7 +2244,7 @@ function createSearchClient({
|
|
|
2304
2244
|
const headers = {};
|
|
2305
2245
|
const queryParameters = {};
|
|
2306
2246
|
if (forwardToReplicas !== void 0) {
|
|
2307
|
-
queryParameters
|
|
2247
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
2308
2248
|
}
|
|
2309
2249
|
const request = {
|
|
2310
2250
|
method: "PUT",
|
|
@@ -2319,8 +2259,7 @@ function createSearchClient({
|
|
|
2319
2259
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
2320
2260
|
*
|
|
2321
2261
|
* Required API Key ACLs:
|
|
2322
|
-
*
|
|
2323
|
-
*
|
|
2262
|
+
* - admin
|
|
2324
2263
|
* @param updateApiKey - The updateApiKey object.
|
|
2325
2264
|
* @param updateApiKey.key - API key.
|
|
2326
2265
|
* @param updateApiKey.apiKey - The apiKey object.
|