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