@algolia/client-search 5.7.0 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -6
- package/dist/browser.d.ts +1670 -1650
- package/dist/builds/browser.js +93 -155
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +1 -1
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +2 -2
- package/dist/builds/fetch.js +93 -155
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +88 -150
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +94 -156
- package/dist/builds/node.js.map +1 -1
- package/dist/fetch.d.ts +1423 -1402
- package/dist/node.d.cts +1423 -1402
- package/dist/node.d.ts +1423 -1402
- package/dist/src/searchClient.cjs +86 -148
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +89 -151
- package/dist/src/searchClient.js.map +1 -1
- package/index.js +1 -1
- package/model/acl.ts +1 -1
- package/model/action.ts +4 -4
- package/model/alternativesAsExact.ts +1 -1
- package/model/anchoring.ts +2 -2
- package/model/apiKey.ts +4 -4
- package/model/aroundPrecision.ts +1 -1
- package/model/aroundRadius.ts +1 -1
- package/model/attributeToUpdate.ts +1 -1
- package/model/automaticFacetFilters.ts +1 -1
- package/model/banner.ts +13 -0
- package/model/bannerImage.ts +12 -0
- package/model/bannerImageUrl.ts +8 -0
- package/model/bannerLink.ts +8 -0
- package/model/banners.ts +10 -0
- package/model/baseIndexSettings.ts +15 -15
- package/model/baseSearchParams.ts +1 -1
- package/model/baseSearchParamsWithoutQuery.ts +8 -8
- package/model/baseSearchResponse.ts +2 -2
- package/model/batchAssignUserIdsParams.ts +1 -1
- package/model/batchDictionaryEntriesParams.ts +1 -1
- package/model/batchParams.ts +1 -1
- package/model/batchResponse.ts +1 -1
- package/model/batchWriteParams.ts +1 -1
- package/model/booleanString.ts +1 -1
- package/model/browseParams.ts +2 -1
- package/model/browseParamsObject.ts +1 -1
- package/model/browseResponse.ts +1 -1
- package/model/builtInOperationType.ts +4 -4
- package/model/builtInOperationValue.ts +1 -1
- package/model/clientMethodProps.ts +50 -34
- package/model/consequence.ts +2 -2
- package/model/consequenceQueryObject.ts +2 -2
- package/model/deleteByParams.ts +3 -3
- package/model/dictionaryEntry.ts +2 -2
- package/model/dictionaryEntryState.ts +1 -1
- package/model/dictionaryType.ts +1 -1
- package/model/facetFilters.ts +1 -1
- package/model/facetOrdering.ts +1 -1
- package/model/facets.ts +1 -1
- package/model/fetchedIndex.ts +1 -1
- package/model/getApiKeyResponse.ts +1 -1
- package/model/getLogsResponse.ts +1 -1
- package/model/getObjectsParams.ts +1 -1
- package/model/getObjectsRequest.ts +1 -1
- package/model/getTopUserIdsResponse.ts +1 -1
- package/model/hasPendingMappingsResponse.ts +1 -1
- package/model/highlightResult.ts +1 -1
- package/model/highlightResultOption.ts +1 -1
- package/model/hit.ts +2 -2
- package/model/ignorePlurals.ts +1 -1
- package/model/index.ts +13 -7
- package/model/indexSettingsAsSearchParams.ts +15 -15
- package/model/listApiKeysResponse.ts +1 -1
- package/model/listClustersResponse.ts +1 -1
- package/model/listIndicesResponse.ts +1 -1
- package/model/listUserIdsResponse.ts +1 -1
- package/model/log.ts +1 -1
- package/model/logType.ts +1 -1
- package/model/matchLevel.ts +1 -1
- package/model/mode.ts +1 -1
- package/model/multipleBatchResponse.ts +2 -2
- package/model/numericFilters.ts +2 -2
- package/model/operationIndexParams.ts +1 -1
- package/model/operationType.ts +1 -1
- package/model/optionalFilters.ts +1 -1
- package/model/promote.ts +1 -1
- package/model/promoteObjectIDs.ts +1 -1
- package/model/queryType.ts +2 -2
- package/model/reRankingApplyFilter.ts +1 -1
- package/model/redirect.ts +1 -1
- package/model/removeStopWords.ts +1 -1
- package/model/removeWordsIfNoResults.ts +1 -1
- package/model/renderingContent.ts +4 -1
- package/model/replaceAllObjectsResponse.ts +1 -1
- package/model/rule.ts +2 -2
- package/model/scopeType.ts +1 -1
- package/model/searchDictionaryEntriesResponse.ts +1 -1
- package/model/searchForFacetValuesResponse.ts +1 -1
- package/model/searchForFacets.ts +1 -1
- package/model/searchForHits.ts +1 -1
- package/model/searchHits.ts +1 -1
- package/model/searchMethodParams.ts +1 -1
- package/model/searchParams.ts +1 -1
- package/model/searchQuery.ts +1 -1
- package/model/searchResponse.ts +1 -1
- package/model/searchResponses.ts +1 -1
- package/model/searchResult.ts +1 -1
- package/model/searchRulesResponse.ts +1 -1
- package/model/searchSynonymsResponse.ts +1 -1
- package/model/searchUserIdsParams.ts +1 -1
- package/model/searchUserIdsResponse.ts +2 -2
- package/model/securedApiKeyRestrictions.ts +1 -1
- package/model/semanticSearch.ts +1 -1
- package/model/snippetResult.ts +1 -1
- package/model/sortRemainingBy.ts +1 -1
- package/model/standardEntries.ts +3 -3
- package/model/supportedLanguage.ts +1 -1
- package/model/synonymHit.ts +3 -3
- package/model/synonymType.ts +1 -1
- package/model/tagFilters.ts +1 -1
- package/model/taskStatus.ts +1 -1
- package/model/typoTolerance.ts +2 -2
- package/model/userHit.ts +1 -1
- package/model/value.ts +2 -2
- package/model/widgets.ts +10 -0
- package/package.json +6 -6
package/dist/builds/fetch.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
// builds/fetch.ts
|
|
2
|
-
import { createHmac } from "crypto";
|
|
3
2
|
import {
|
|
4
|
-
createNullLogger,
|
|
5
3
|
createMemoryCache,
|
|
6
4
|
createNullCache,
|
|
7
|
-
|
|
5
|
+
createNullLogger,
|
|
8
6
|
DEFAULT_CONNECT_TIMEOUT_NODE,
|
|
9
7
|
DEFAULT_READ_TIMEOUT_NODE,
|
|
10
|
-
DEFAULT_WRITE_TIMEOUT_NODE
|
|
8
|
+
DEFAULT_WRITE_TIMEOUT_NODE,
|
|
9
|
+
serializeQueryParameters
|
|
11
10
|
} from "@algolia/client-common";
|
|
12
11
|
import { createFetchRequester } from "@algolia/requester-fetch";
|
|
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.0";
|
|
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.
|
|
@@ -778,8 +769,7 @@ function createSearchClient({
|
|
|
778
769
|
* Deletes only the records from an index while keeping settings, synonyms, and rules.
|
|
779
770
|
*
|
|
780
771
|
* Required API Key ACLs:
|
|
781
|
-
*
|
|
782
|
-
*
|
|
772
|
+
* - deleteIndex
|
|
783
773
|
* @param clearObjects - The clearObjects object.
|
|
784
774
|
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
785
775
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -803,8 +793,7 @@ function createSearchClient({
|
|
|
803
793
|
* Deletes all rules from the index.
|
|
804
794
|
*
|
|
805
795
|
* Required API Key ACLs:
|
|
806
|
-
*
|
|
807
|
-
*
|
|
796
|
+
* - editSettings
|
|
808
797
|
* @param clearRules - The clearRules object.
|
|
809
798
|
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
810
799
|
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
@@ -818,7 +807,7 @@ function createSearchClient({
|
|
|
818
807
|
const headers = {};
|
|
819
808
|
const queryParameters = {};
|
|
820
809
|
if (forwardToReplicas !== void 0) {
|
|
821
|
-
queryParameters
|
|
810
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
822
811
|
}
|
|
823
812
|
const request = {
|
|
824
813
|
method: "POST",
|
|
@@ -832,8 +821,7 @@ function createSearchClient({
|
|
|
832
821
|
* Deletes all synonyms from the index.
|
|
833
822
|
*
|
|
834
823
|
* Required API Key ACLs:
|
|
835
|
-
*
|
|
836
|
-
*
|
|
824
|
+
* - editSettings
|
|
837
825
|
* @param clearSynonyms - The clearSynonyms object.
|
|
838
826
|
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
839
827
|
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
@@ -847,7 +835,7 @@ function createSearchClient({
|
|
|
847
835
|
const headers = {};
|
|
848
836
|
const queryParameters = {};
|
|
849
837
|
if (forwardToReplicas !== void 0) {
|
|
850
|
-
queryParameters
|
|
838
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
851
839
|
}
|
|
852
840
|
const request = {
|
|
853
841
|
method: "POST",
|
|
@@ -859,7 +847,6 @@ function createSearchClient({
|
|
|
859
847
|
},
|
|
860
848
|
/**
|
|
861
849
|
* This method allow you to send requests to the Algolia REST API.
|
|
862
|
-
*
|
|
863
850
|
* @param customDelete - The customDelete object.
|
|
864
851
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
865
852
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -882,7 +869,6 @@ function createSearchClient({
|
|
|
882
869
|
},
|
|
883
870
|
/**
|
|
884
871
|
* This method allow you to send requests to the Algolia REST API.
|
|
885
|
-
*
|
|
886
872
|
* @param customGet - The customGet object.
|
|
887
873
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
888
874
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -905,7 +891,6 @@ function createSearchClient({
|
|
|
905
891
|
},
|
|
906
892
|
/**
|
|
907
893
|
* This method allow you to send requests to the Algolia REST API.
|
|
908
|
-
*
|
|
909
894
|
* @param customPost - The customPost object.
|
|
910
895
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
911
896
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -930,7 +915,6 @@ function createSearchClient({
|
|
|
930
915
|
},
|
|
931
916
|
/**
|
|
932
917
|
* This method allow you to send requests to the Algolia REST API.
|
|
933
|
-
*
|
|
934
918
|
* @param customPut - The customPut object.
|
|
935
919
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
936
920
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -957,8 +941,7 @@ function createSearchClient({
|
|
|
957
941
|
* Deletes the API key.
|
|
958
942
|
*
|
|
959
943
|
* Required API Key ACLs:
|
|
960
|
-
*
|
|
961
|
-
*
|
|
944
|
+
* - admin
|
|
962
945
|
* @param deleteApiKey - The deleteApiKey object.
|
|
963
946
|
* @param deleteApiKey.key - API key.
|
|
964
947
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -982,8 +965,7 @@ function createSearchClient({
|
|
|
982
965
|
* 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
966
|
*
|
|
984
967
|
* Required API Key ACLs:
|
|
985
|
-
*
|
|
986
|
-
*
|
|
968
|
+
* - deleteIndex
|
|
987
969
|
* @param deleteBy - The deleteBy object.
|
|
988
970
|
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
989
971
|
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
@@ -1012,8 +994,7 @@ function createSearchClient({
|
|
|
1012
994
|
* 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
995
|
*
|
|
1014
996
|
* Required API Key ACLs:
|
|
1015
|
-
*
|
|
1016
|
-
*
|
|
997
|
+
* - deleteIndex
|
|
1017
998
|
* @param deleteIndex - The deleteIndex object.
|
|
1018
999
|
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
1019
1000
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1037,8 +1018,7 @@ function createSearchClient({
|
|
|
1037
1018
|
* 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
1019
|
*
|
|
1039
1020
|
* Required API Key ACLs:
|
|
1040
|
-
*
|
|
1041
|
-
*
|
|
1021
|
+
* - deleteObject
|
|
1042
1022
|
* @param deleteObject - The deleteObject object.
|
|
1043
1023
|
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
1044
1024
|
* @param deleteObject.objectID - Unique record identifier.
|
|
@@ -1066,8 +1046,7 @@ function createSearchClient({
|
|
|
1066
1046
|
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
1067
1047
|
*
|
|
1068
1048
|
* Required API Key ACLs:
|
|
1069
|
-
*
|
|
1070
|
-
*
|
|
1049
|
+
* - editSettings
|
|
1071
1050
|
* @param deleteRule - The deleteRule object.
|
|
1072
1051
|
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
1073
1052
|
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
@@ -1085,7 +1064,7 @@ function createSearchClient({
|
|
|
1085
1064
|
const headers = {};
|
|
1086
1065
|
const queryParameters = {};
|
|
1087
1066
|
if (forwardToReplicas !== void 0) {
|
|
1088
|
-
queryParameters
|
|
1067
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1089
1068
|
}
|
|
1090
1069
|
const request = {
|
|
1091
1070
|
method: "DELETE",
|
|
@@ -1099,8 +1078,7 @@ function createSearchClient({
|
|
|
1099
1078
|
* Deletes a source from the list of allowed sources.
|
|
1100
1079
|
*
|
|
1101
1080
|
* Required API Key ACLs:
|
|
1102
|
-
*
|
|
1103
|
-
*
|
|
1081
|
+
* - admin
|
|
1104
1082
|
* @param deleteSource - The deleteSource object.
|
|
1105
1083
|
* @param deleteSource.source - IP address range of the source.
|
|
1106
1084
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1124,8 +1102,7 @@ function createSearchClient({
|
|
|
1124
1102
|
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
1125
1103
|
*
|
|
1126
1104
|
* Required API Key ACLs:
|
|
1127
|
-
*
|
|
1128
|
-
*
|
|
1105
|
+
* - editSettings
|
|
1129
1106
|
* @param deleteSynonym - The deleteSynonym object.
|
|
1130
1107
|
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
1131
1108
|
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1143,7 +1120,7 @@ function createSearchClient({
|
|
|
1143
1120
|
const headers = {};
|
|
1144
1121
|
const queryParameters = {};
|
|
1145
1122
|
if (forwardToReplicas !== void 0) {
|
|
1146
|
-
queryParameters
|
|
1123
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1147
1124
|
}
|
|
1148
1125
|
const request = {
|
|
1149
1126
|
method: "DELETE",
|
|
@@ -1155,7 +1132,6 @@ function createSearchClient({
|
|
|
1155
1132
|
},
|
|
1156
1133
|
/**
|
|
1157
1134
|
* 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
1135
|
* @param getApiKey - The getApiKey object.
|
|
1160
1136
|
* @param getApiKey.key - API key.
|
|
1161
1137
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1179,8 +1155,7 @@ function createSearchClient({
|
|
|
1179
1155
|
* Checks the status of a given application task.
|
|
1180
1156
|
*
|
|
1181
1157
|
* Required API Key ACLs:
|
|
1182
|
-
*
|
|
1183
|
-
*
|
|
1158
|
+
* - editSettings
|
|
1184
1159
|
* @param getAppTask - The getAppTask object.
|
|
1185
1160
|
* @param getAppTask.taskID - Unique task identifier.
|
|
1186
1161
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1204,8 +1179,7 @@ function createSearchClient({
|
|
|
1204
1179
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1205
1180
|
*
|
|
1206
1181
|
* Required API Key ACLs:
|
|
1207
|
-
*
|
|
1208
|
-
*
|
|
1182
|
+
* - settings
|
|
1209
1183
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1210
1184
|
*/
|
|
1211
1185
|
getDictionaryLanguages(requestOptions) {
|
|
@@ -1224,8 +1198,7 @@ function createSearchClient({
|
|
|
1224
1198
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1225
1199
|
*
|
|
1226
1200
|
* Required API Key ACLs:
|
|
1227
|
-
*
|
|
1228
|
-
*
|
|
1201
|
+
* - settings
|
|
1229
1202
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1230
1203
|
*/
|
|
1231
1204
|
getDictionarySettings(requestOptions) {
|
|
@@ -1244,8 +1217,7 @@ function createSearchClient({
|
|
|
1244
1217
|
* 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
1218
|
*
|
|
1246
1219
|
* Required API Key ACLs:
|
|
1247
|
-
*
|
|
1248
|
-
*
|
|
1220
|
+
* - logs
|
|
1249
1221
|
* @param getLogs - The getLogs object.
|
|
1250
1222
|
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
1251
1223
|
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
@@ -1258,16 +1230,16 @@ function createSearchClient({
|
|
|
1258
1230
|
const headers = {};
|
|
1259
1231
|
const queryParameters = {};
|
|
1260
1232
|
if (offset !== void 0) {
|
|
1261
|
-
queryParameters
|
|
1233
|
+
queryParameters["offset"] = offset.toString();
|
|
1262
1234
|
}
|
|
1263
1235
|
if (length !== void 0) {
|
|
1264
|
-
queryParameters
|
|
1236
|
+
queryParameters["length"] = length.toString();
|
|
1265
1237
|
}
|
|
1266
1238
|
if (indexName !== void 0) {
|
|
1267
|
-
queryParameters
|
|
1239
|
+
queryParameters["indexName"] = indexName.toString();
|
|
1268
1240
|
}
|
|
1269
1241
|
if (type !== void 0) {
|
|
1270
|
-
queryParameters
|
|
1242
|
+
queryParameters["type"] = type.toString();
|
|
1271
1243
|
}
|
|
1272
1244
|
const request = {
|
|
1273
1245
|
method: "GET",
|
|
@@ -1281,8 +1253,7 @@ function createSearchClient({
|
|
|
1281
1253
|
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
|
1282
1254
|
*
|
|
1283
1255
|
* Required API Key ACLs:
|
|
1284
|
-
*
|
|
1285
|
-
*
|
|
1256
|
+
* - search
|
|
1286
1257
|
* @param getObject - The getObject object.
|
|
1287
1258
|
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
1288
1259
|
* @param getObject.objectID - Unique record identifier.
|
|
@@ -1300,7 +1271,7 @@ function createSearchClient({
|
|
|
1300
1271
|
const headers = {};
|
|
1301
1272
|
const queryParameters = {};
|
|
1302
1273
|
if (attributesToRetrieve !== void 0) {
|
|
1303
|
-
queryParameters
|
|
1274
|
+
queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
|
|
1304
1275
|
}
|
|
1305
1276
|
const request = {
|
|
1306
1277
|
method: "GET",
|
|
@@ -1314,8 +1285,7 @@ function createSearchClient({
|
|
|
1314
1285
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
1315
1286
|
*
|
|
1316
1287
|
* Required API Key ACLs:
|
|
1317
|
-
*
|
|
1318
|
-
*
|
|
1288
|
+
* - search
|
|
1319
1289
|
* @param getObjectsParams - Request object.
|
|
1320
1290
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1321
1291
|
*/
|
|
@@ -1344,8 +1314,7 @@ function createSearchClient({
|
|
|
1344
1314
|
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
1345
1315
|
*
|
|
1346
1316
|
* Required API Key ACLs:
|
|
1347
|
-
*
|
|
1348
|
-
*
|
|
1317
|
+
* - settings
|
|
1349
1318
|
* @param getRule - The getRule object.
|
|
1350
1319
|
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
1351
1320
|
* @param getRule.objectID - Unique identifier of a rule object.
|
|
@@ -1373,8 +1342,7 @@ function createSearchClient({
|
|
|
1373
1342
|
* Retrieves an object with non-null index settings.
|
|
1374
1343
|
*
|
|
1375
1344
|
* Required API Key ACLs:
|
|
1376
|
-
*
|
|
1377
|
-
*
|
|
1345
|
+
* - search
|
|
1378
1346
|
* @param getSettings - The getSettings object.
|
|
1379
1347
|
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
1380
1348
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1398,8 +1366,7 @@ function createSearchClient({
|
|
|
1398
1366
|
* Retrieves all allowed IP addresses with access to your application.
|
|
1399
1367
|
*
|
|
1400
1368
|
* Required API Key ACLs:
|
|
1401
|
-
*
|
|
1402
|
-
*
|
|
1369
|
+
* - admin
|
|
1403
1370
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1404
1371
|
*/
|
|
1405
1372
|
getSources(requestOptions) {
|
|
@@ -1415,11 +1382,10 @@ function createSearchClient({
|
|
|
1415
1382
|
return transporter.request(request, requestOptions);
|
|
1416
1383
|
},
|
|
1417
1384
|
/**
|
|
1418
|
-
* Retrieves a
|
|
1385
|
+
* Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
1419
1386
|
*
|
|
1420
1387
|
* Required API Key ACLs:
|
|
1421
|
-
*
|
|
1422
|
-
*
|
|
1388
|
+
* - settings
|
|
1423
1389
|
* @param getSynonym - The getSynonym object.
|
|
1424
1390
|
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
1425
1391
|
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1447,8 +1413,7 @@ function createSearchClient({
|
|
|
1447
1413
|
* 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
1414
|
*
|
|
1449
1415
|
* Required API Key ACLs:
|
|
1450
|
-
*
|
|
1451
|
-
*
|
|
1416
|
+
* - addObject
|
|
1452
1417
|
* @param getTask - The getTask object.
|
|
1453
1418
|
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
1454
1419
|
* @param getTask.taskID - Unique task identifier.
|
|
@@ -1476,8 +1441,7 @@ function createSearchClient({
|
|
|
1476
1441
|
* 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
1442
|
*
|
|
1478
1443
|
* Required API Key ACLs:
|
|
1479
|
-
*
|
|
1480
|
-
*
|
|
1444
|
+
* - admin
|
|
1481
1445
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1482
1446
|
*/
|
|
1483
1447
|
getTopUserIds(requestOptions) {
|
|
@@ -1496,8 +1460,7 @@ function createSearchClient({
|
|
|
1496
1460
|
* 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
1461
|
*
|
|
1498
1462
|
* Required API Key ACLs:
|
|
1499
|
-
*
|
|
1500
|
-
*
|
|
1463
|
+
* - admin
|
|
1501
1464
|
* @param getUserId - The getUserId object.
|
|
1502
1465
|
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1503
1466
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1521,8 +1484,7 @@ function createSearchClient({
|
|
|
1521
1484
|
* 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
1485
|
*
|
|
1523
1486
|
* Required API Key ACLs:
|
|
1524
|
-
*
|
|
1525
|
-
*
|
|
1487
|
+
* - admin
|
|
1526
1488
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
1527
1489
|
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1528
1490
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1532,7 +1494,7 @@ function createSearchClient({
|
|
|
1532
1494
|
const headers = {};
|
|
1533
1495
|
const queryParameters = {};
|
|
1534
1496
|
if (getClusters !== void 0) {
|
|
1535
|
-
queryParameters
|
|
1497
|
+
queryParameters["getClusters"] = getClusters.toString();
|
|
1536
1498
|
}
|
|
1537
1499
|
const request = {
|
|
1538
1500
|
method: "GET",
|
|
@@ -1546,8 +1508,7 @@ function createSearchClient({
|
|
|
1546
1508
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
1547
1509
|
*
|
|
1548
1510
|
* Required API Key ACLs:
|
|
1549
|
-
*
|
|
1550
|
-
*
|
|
1511
|
+
* - admin
|
|
1551
1512
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1552
1513
|
*/
|
|
1553
1514
|
listApiKeys(requestOptions) {
|
|
@@ -1566,8 +1527,7 @@ function createSearchClient({
|
|
|
1566
1527
|
* Lists the available clusters in a multi-cluster setup.
|
|
1567
1528
|
*
|
|
1568
1529
|
* Required API Key ACLs:
|
|
1569
|
-
*
|
|
1570
|
-
*
|
|
1530
|
+
* - admin
|
|
1571
1531
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1572
1532
|
*/
|
|
1573
1533
|
listClusters(requestOptions) {
|
|
@@ -1586,8 +1546,7 @@ function createSearchClient({
|
|
|
1586
1546
|
* 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
1547
|
*
|
|
1588
1548
|
* Required API Key ACLs:
|
|
1589
|
-
*
|
|
1590
|
-
*
|
|
1549
|
+
* - listIndexes
|
|
1591
1550
|
* @param listIndices - The listIndices object.
|
|
1592
1551
|
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
1593
1552
|
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
@@ -1598,10 +1557,10 @@ function createSearchClient({
|
|
|
1598
1557
|
const headers = {};
|
|
1599
1558
|
const queryParameters = {};
|
|
1600
1559
|
if (page !== void 0) {
|
|
1601
|
-
queryParameters
|
|
1560
|
+
queryParameters["page"] = page.toString();
|
|
1602
1561
|
}
|
|
1603
1562
|
if (hitsPerPage !== void 0) {
|
|
1604
|
-
queryParameters
|
|
1563
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
1605
1564
|
}
|
|
1606
1565
|
const request = {
|
|
1607
1566
|
method: "GET",
|
|
@@ -1615,8 +1574,7 @@ function createSearchClient({
|
|
|
1615
1574
|
* 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
1575
|
*
|
|
1617
1576
|
* Required API Key ACLs:
|
|
1618
|
-
*
|
|
1619
|
-
*
|
|
1577
|
+
* - admin
|
|
1620
1578
|
* @param listUserIds - The listUserIds object.
|
|
1621
1579
|
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
1622
1580
|
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
@@ -1627,10 +1585,10 @@ function createSearchClient({
|
|
|
1627
1585
|
const headers = {};
|
|
1628
1586
|
const queryParameters = {};
|
|
1629
1587
|
if (page !== void 0) {
|
|
1630
|
-
queryParameters
|
|
1588
|
+
queryParameters["page"] = page.toString();
|
|
1631
1589
|
}
|
|
1632
1590
|
if (hitsPerPage !== void 0) {
|
|
1633
|
-
queryParameters
|
|
1591
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
1634
1592
|
}
|
|
1635
1593
|
const request = {
|
|
1636
1594
|
method: "GET",
|
|
@@ -1642,7 +1600,6 @@ function createSearchClient({
|
|
|
1642
1600
|
},
|
|
1643
1601
|
/**
|
|
1644
1602
|
* 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
1603
|
* @param batchParams - The batchParams object.
|
|
1647
1604
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1648
1605
|
*/
|
|
@@ -1666,11 +1623,10 @@ function createSearchClient({
|
|
|
1666
1623
|
return transporter.request(request, requestOptions);
|
|
1667
1624
|
},
|
|
1668
1625
|
/**
|
|
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
|
|
1626
|
+
* 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
1627
|
*
|
|
1671
1628
|
* Required API Key ACLs:
|
|
1672
|
-
*
|
|
1673
|
-
*
|
|
1629
|
+
* - addObject
|
|
1674
1630
|
* @param operationIndex - The operationIndex object.
|
|
1675
1631
|
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
1676
1632
|
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
@@ -1702,11 +1658,10 @@ function createSearchClient({
|
|
|
1702
1658
|
return transporter.request(request, requestOptions);
|
|
1703
1659
|
},
|
|
1704
1660
|
/**
|
|
1705
|
-
* Adds new attributes to a record, or
|
|
1661
|
+
* 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
1662
|
*
|
|
1707
1663
|
* Required API Key ACLs:
|
|
1708
|
-
*
|
|
1709
|
-
*
|
|
1664
|
+
* - addObject
|
|
1710
1665
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
1711
1666
|
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
1712
1667
|
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
@@ -1728,7 +1683,7 @@ function createSearchClient({
|
|
|
1728
1683
|
const headers = {};
|
|
1729
1684
|
const queryParameters = {};
|
|
1730
1685
|
if (createIfNotExists !== void 0) {
|
|
1731
|
-
queryParameters
|
|
1686
|
+
queryParameters["createIfNotExists"] = createIfNotExists.toString();
|
|
1732
1687
|
}
|
|
1733
1688
|
const request = {
|
|
1734
1689
|
method: "POST",
|
|
@@ -1743,8 +1698,7 @@ function createSearchClient({
|
|
|
1743
1698
|
* Deletes a user ID and its associated data from the clusters.
|
|
1744
1699
|
*
|
|
1745
1700
|
* Required API Key ACLs:
|
|
1746
|
-
*
|
|
1747
|
-
*
|
|
1701
|
+
* - admin
|
|
1748
1702
|
* @param removeUserId - The removeUserId object.
|
|
1749
1703
|
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
1750
1704
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1768,8 +1722,7 @@ function createSearchClient({
|
|
|
1768
1722
|
* Replaces the list of allowed sources.
|
|
1769
1723
|
*
|
|
1770
1724
|
* Required API Key ACLs:
|
|
1771
|
-
*
|
|
1772
|
-
*
|
|
1725
|
+
* - admin
|
|
1773
1726
|
* @param replaceSources - The replaceSources object.
|
|
1774
1727
|
* @param replaceSources.source - Allowed sources.
|
|
1775
1728
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1794,8 +1747,7 @@ function createSearchClient({
|
|
|
1794
1747
|
* 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
1748
|
*
|
|
1796
1749
|
* Required API Key ACLs:
|
|
1797
|
-
*
|
|
1798
|
-
*
|
|
1750
|
+
* - admin
|
|
1799
1751
|
* @param restoreApiKey - The restoreApiKey object.
|
|
1800
1752
|
* @param restoreApiKey.key - API key.
|
|
1801
1753
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1819,11 +1771,10 @@ function createSearchClient({
|
|
|
1819
1771
|
* 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
1772
|
*
|
|
1821
1773
|
* Required API Key ACLs:
|
|
1822
|
-
*
|
|
1823
|
-
*
|
|
1774
|
+
* - addObject
|
|
1824
1775
|
* @param saveObject - The saveObject object.
|
|
1825
1776
|
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
1826
|
-
* @param saveObject.body - The record
|
|
1777
|
+
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
1827
1778
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1828
1779
|
*/
|
|
1829
1780
|
saveObject({ indexName, body }, requestOptions) {
|
|
@@ -1849,8 +1800,7 @@ function createSearchClient({
|
|
|
1849
1800
|
* 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
1801
|
*
|
|
1851
1802
|
* Required API Key ACLs:
|
|
1852
|
-
*
|
|
1853
|
-
*
|
|
1803
|
+
* - editSettings
|
|
1854
1804
|
* @param saveRule - The saveRule object.
|
|
1855
1805
|
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
1856
1806
|
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
@@ -1875,7 +1825,7 @@ function createSearchClient({
|
|
|
1875
1825
|
const headers = {};
|
|
1876
1826
|
const queryParameters = {};
|
|
1877
1827
|
if (forwardToReplicas !== void 0) {
|
|
1878
|
-
queryParameters
|
|
1828
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1879
1829
|
}
|
|
1880
1830
|
const request = {
|
|
1881
1831
|
method: "PUT",
|
|
@@ -1890,8 +1840,7 @@ function createSearchClient({
|
|
|
1890
1840
|
* 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
1841
|
*
|
|
1892
1842
|
* Required API Key ACLs:
|
|
1893
|
-
*
|
|
1894
|
-
*
|
|
1843
|
+
* - editSettings
|
|
1895
1844
|
* @param saveRules - The saveRules object.
|
|
1896
1845
|
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
1897
1846
|
* @param saveRules.rules - The rules object.
|
|
@@ -1910,10 +1859,10 @@ function createSearchClient({
|
|
|
1910
1859
|
const headers = {};
|
|
1911
1860
|
const queryParameters = {};
|
|
1912
1861
|
if (forwardToReplicas !== void 0) {
|
|
1913
|
-
queryParameters
|
|
1862
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1914
1863
|
}
|
|
1915
1864
|
if (clearExistingRules !== void 0) {
|
|
1916
|
-
queryParameters
|
|
1865
|
+
queryParameters["clearExistingRules"] = clearExistingRules.toString();
|
|
1917
1866
|
}
|
|
1918
1867
|
const request = {
|
|
1919
1868
|
method: "POST",
|
|
@@ -1928,8 +1877,7 @@ function createSearchClient({
|
|
|
1928
1877
|
* 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
1878
|
*
|
|
1930
1879
|
* Required API Key ACLs:
|
|
1931
|
-
*
|
|
1932
|
-
*
|
|
1880
|
+
* - editSettings
|
|
1933
1881
|
* @param saveSynonym - The saveSynonym object.
|
|
1934
1882
|
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
1935
1883
|
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1957,7 +1905,7 @@ function createSearchClient({
|
|
|
1957
1905
|
const headers = {};
|
|
1958
1906
|
const queryParameters = {};
|
|
1959
1907
|
if (forwardToReplicas !== void 0) {
|
|
1960
|
-
queryParameters
|
|
1908
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1961
1909
|
}
|
|
1962
1910
|
const request = {
|
|
1963
1911
|
method: "PUT",
|
|
@@ -1972,8 +1920,7 @@ function createSearchClient({
|
|
|
1972
1920
|
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
|
|
1973
1921
|
*
|
|
1974
1922
|
* Required API Key ACLs:
|
|
1975
|
-
*
|
|
1976
|
-
*
|
|
1923
|
+
* - editSettings
|
|
1977
1924
|
* @param saveSynonyms - The saveSynonyms object.
|
|
1978
1925
|
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1979
1926
|
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
@@ -1992,10 +1939,10 @@ function createSearchClient({
|
|
|
1992
1939
|
const headers = {};
|
|
1993
1940
|
const queryParameters = {};
|
|
1994
1941
|
if (forwardToReplicas !== void 0) {
|
|
1995
|
-
queryParameters
|
|
1942
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1996
1943
|
}
|
|
1997
1944
|
if (replaceExistingSynonyms !== void 0) {
|
|
1998
|
-
queryParameters
|
|
1945
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
1999
1946
|
}
|
|
2000
1947
|
const request = {
|
|
2001
1948
|
method: "POST",
|
|
@@ -2007,11 +1954,10 @@ function createSearchClient({
|
|
|
2007
1954
|
return transporter.request(request, requestOptions);
|
|
2008
1955
|
},
|
|
2009
1956
|
/**
|
|
2010
|
-
* Sends multiple search
|
|
1957
|
+
* 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
1958
|
*
|
|
2012
1959
|
* Required API Key ACLs:
|
|
2013
|
-
*
|
|
2014
|
-
*
|
|
1960
|
+
* - search
|
|
2015
1961
|
* @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
|
|
2016
1962
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2017
1963
|
*/
|
|
@@ -2061,8 +2007,7 @@ function createSearchClient({
|
|
|
2061
2007
|
* Searches for standard and custom dictionary entries.
|
|
2062
2008
|
*
|
|
2063
2009
|
* Required API Key ACLs:
|
|
2064
|
-
*
|
|
2065
|
-
*
|
|
2010
|
+
* - settings
|
|
2066
2011
|
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
2067
2012
|
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
2068
2013
|
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
@@ -2103,8 +2048,7 @@ function createSearchClient({
|
|
|
2103
2048
|
* 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
2049
|
*
|
|
2105
2050
|
* Required API Key ACLs:
|
|
2106
|
-
*
|
|
2107
|
-
*
|
|
2051
|
+
* - search
|
|
2108
2052
|
* @param searchForFacetValues - The searchForFacetValues object.
|
|
2109
2053
|
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
2110
2054
|
* @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 +2080,7 @@ function createSearchClient({
|
|
|
2136
2080
|
* Searches for rules in your index.
|
|
2137
2081
|
*
|
|
2138
2082
|
* Required API Key ACLs:
|
|
2139
|
-
*
|
|
2140
|
-
*
|
|
2083
|
+
* - settings
|
|
2141
2084
|
* @param searchRules - The searchRules object.
|
|
2142
2085
|
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
2143
2086
|
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
@@ -2162,11 +2105,10 @@ function createSearchClient({
|
|
|
2162
2105
|
return transporter.request(request, requestOptions);
|
|
2163
2106
|
},
|
|
2164
2107
|
/**
|
|
2165
|
-
* Searches a single index and
|
|
2108
|
+
* 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
2109
|
*
|
|
2167
2110
|
* Required API Key ACLs:
|
|
2168
|
-
*
|
|
2169
|
-
*
|
|
2111
|
+
* - search
|
|
2170
2112
|
* @param searchSingleIndex - The searchSingleIndex object.
|
|
2171
2113
|
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
2172
2114
|
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
@@ -2194,8 +2136,7 @@ function createSearchClient({
|
|
|
2194
2136
|
* Searches for synonyms in your index.
|
|
2195
2137
|
*
|
|
2196
2138
|
* Required API Key ACLs:
|
|
2197
|
-
*
|
|
2198
|
-
*
|
|
2139
|
+
* - settings
|
|
2199
2140
|
* @param searchSynonyms - The searchSynonyms object.
|
|
2200
2141
|
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
2201
2142
|
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
@@ -2226,8 +2167,7 @@ function createSearchClient({
|
|
|
2226
2167
|
* 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
2168
|
*
|
|
2228
2169
|
* Required API Key ACLs:
|
|
2229
|
-
*
|
|
2230
|
-
*
|
|
2170
|
+
* - admin
|
|
2231
2171
|
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
2232
2172
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2233
2173
|
*/
|
|
@@ -2256,8 +2196,7 @@ function createSearchClient({
|
|
|
2256
2196
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
2257
2197
|
*
|
|
2258
2198
|
* Required API Key ACLs:
|
|
2259
|
-
*
|
|
2260
|
-
*
|
|
2199
|
+
* - editSettings
|
|
2261
2200
|
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
2262
2201
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2263
2202
|
*/
|
|
@@ -2286,8 +2225,7 @@ function createSearchClient({
|
|
|
2286
2225
|
* 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
2226
|
*
|
|
2288
2227
|
* Required API Key ACLs:
|
|
2289
|
-
*
|
|
2290
|
-
*
|
|
2228
|
+
* - editSettings
|
|
2291
2229
|
* @param setSettings - The setSettings object.
|
|
2292
2230
|
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
2293
2231
|
* @param setSettings.indexSettings - The indexSettings object.
|
|
@@ -2305,7 +2243,7 @@ function createSearchClient({
|
|
|
2305
2243
|
const headers = {};
|
|
2306
2244
|
const queryParameters = {};
|
|
2307
2245
|
if (forwardToReplicas !== void 0) {
|
|
2308
|
-
queryParameters
|
|
2246
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
2309
2247
|
}
|
|
2310
2248
|
const request = {
|
|
2311
2249
|
method: "PUT",
|
|
@@ -2320,8 +2258,7 @@ function createSearchClient({
|
|
|
2320
2258
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
2321
2259
|
*
|
|
2322
2260
|
* Required API Key ACLs:
|
|
2323
|
-
*
|
|
2324
|
-
*
|
|
2261
|
+
* - admin
|
|
2325
2262
|
* @param updateApiKey - The updateApiKey object.
|
|
2326
2263
|
* @param updateApiKey.key - API key.
|
|
2327
2264
|
* @param updateApiKey.apiKey - The apiKey object.
|
|
@@ -2353,6 +2290,7 @@ function createSearchClient({
|
|
|
2353
2290
|
}
|
|
2354
2291
|
|
|
2355
2292
|
// builds/fetch.ts
|
|
2293
|
+
import { createHmac } from "crypto";
|
|
2356
2294
|
function searchClient(appId, apiKey, options) {
|
|
2357
2295
|
if (!appId || typeof appId !== "string") {
|
|
2358
2296
|
throw new Error("`appId` is missing.");
|