@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.cjs
CHANGED
|
@@ -24,13 +24,12 @@ __export(node_exports, {
|
|
|
24
24
|
searchClient: () => searchClient
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(node_exports);
|
|
27
|
-
var import_node_crypto = require("crypto");
|
|
28
|
-
var import_client_common2 = require("@algolia/client-common");
|
|
29
27
|
var import_requester_node_http = require("@algolia/requester-node-http");
|
|
28
|
+
var import_client_common2 = require("@algolia/client-common");
|
|
30
29
|
|
|
31
30
|
// src/searchClient.ts
|
|
32
31
|
var import_client_common = require("@algolia/client-common");
|
|
33
|
-
var apiClientVersion = "5.
|
|
32
|
+
var apiClientVersion = "5.8.1";
|
|
34
33
|
function getDefaultHosts(appId) {
|
|
35
34
|
return [
|
|
36
35
|
{
|
|
@@ -528,8 +527,7 @@ function createSearchClient({
|
|
|
528
527
|
* Creates a new API key with specific permissions and restrictions.
|
|
529
528
|
*
|
|
530
529
|
* Required API Key ACLs:
|
|
531
|
-
*
|
|
532
|
-
*
|
|
530
|
+
* - admin
|
|
533
531
|
* @param apiKey - The apiKey object.
|
|
534
532
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
535
533
|
*/
|
|
@@ -556,12 +554,11 @@ function createSearchClient({
|
|
|
556
554
|
* 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).
|
|
557
555
|
*
|
|
558
556
|
* Required API Key ACLs:
|
|
559
|
-
*
|
|
560
|
-
*
|
|
557
|
+
* - addObject
|
|
561
558
|
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
562
559
|
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
563
560
|
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
564
|
-
* @param addOrUpdateObject.body - The record
|
|
561
|
+
* @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
565
562
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
566
563
|
*/
|
|
567
564
|
addOrUpdateObject({ indexName, objectID, body }, requestOptions) {
|
|
@@ -590,8 +587,7 @@ function createSearchClient({
|
|
|
590
587
|
* Adds a source to the list of allowed sources.
|
|
591
588
|
*
|
|
592
589
|
* Required API Key ACLs:
|
|
593
|
-
*
|
|
594
|
-
*
|
|
590
|
+
* - admin
|
|
595
591
|
* @param source - Source to add.
|
|
596
592
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
597
593
|
*/
|
|
@@ -618,8 +614,7 @@ function createSearchClient({
|
|
|
618
614
|
* 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.
|
|
619
615
|
*
|
|
620
616
|
* Required API Key ACLs:
|
|
621
|
-
*
|
|
622
|
-
*
|
|
617
|
+
* - admin
|
|
623
618
|
* @param assignUserId - The assignUserId object.
|
|
624
619
|
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
625
620
|
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
@@ -652,7 +647,6 @@ function createSearchClient({
|
|
|
652
647
|
},
|
|
653
648
|
/**
|
|
654
649
|
* 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.
|
|
655
|
-
*
|
|
656
650
|
* @param batch - The batch object.
|
|
657
651
|
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
658
652
|
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
@@ -684,8 +678,7 @@ function createSearchClient({
|
|
|
684
678
|
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
685
679
|
*
|
|
686
680
|
* Required API Key ACLs:
|
|
687
|
-
*
|
|
688
|
-
*
|
|
681
|
+
* - admin
|
|
689
682
|
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
690
683
|
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
691
684
|
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
@@ -723,8 +716,7 @@ function createSearchClient({
|
|
|
723
716
|
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
724
717
|
*
|
|
725
718
|
* Required API Key ACLs:
|
|
726
|
-
*
|
|
727
|
-
*
|
|
719
|
+
* - editSettings
|
|
728
720
|
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
729
721
|
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
730
722
|
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
@@ -758,11 +750,10 @@ function createSearchClient({
|
|
|
758
750
|
return transporter.request(request, requestOptions);
|
|
759
751
|
},
|
|
760
752
|
/**
|
|
761
|
-
* 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`
|
|
753
|
+
* 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.
|
|
762
754
|
*
|
|
763
755
|
* Required API Key ACLs:
|
|
764
|
-
*
|
|
765
|
-
*
|
|
756
|
+
* - browse
|
|
766
757
|
* @param browse - The browse object.
|
|
767
758
|
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
768
759
|
* @param browse.browseParams - The browseParams object.
|
|
@@ -780,7 +771,8 @@ function createSearchClient({
|
|
|
780
771
|
path: requestPath,
|
|
781
772
|
queryParameters,
|
|
782
773
|
headers,
|
|
783
|
-
data: browseParams ? browseParams : {}
|
|
774
|
+
data: browseParams ? browseParams : {},
|
|
775
|
+
useReadTransporter: true
|
|
784
776
|
};
|
|
785
777
|
return transporter.request(request, requestOptions);
|
|
786
778
|
},
|
|
@@ -788,8 +780,7 @@ function createSearchClient({
|
|
|
788
780
|
* Deletes only the records from an index while keeping settings, synonyms, and rules.
|
|
789
781
|
*
|
|
790
782
|
* Required API Key ACLs:
|
|
791
|
-
*
|
|
792
|
-
*
|
|
783
|
+
* - deleteIndex
|
|
793
784
|
* @param clearObjects - The clearObjects object.
|
|
794
785
|
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
795
786
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -813,8 +804,7 @@ function createSearchClient({
|
|
|
813
804
|
* Deletes all rules from the index.
|
|
814
805
|
*
|
|
815
806
|
* Required API Key ACLs:
|
|
816
|
-
*
|
|
817
|
-
*
|
|
807
|
+
* - editSettings
|
|
818
808
|
* @param clearRules - The clearRules object.
|
|
819
809
|
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
820
810
|
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
@@ -828,7 +818,7 @@ function createSearchClient({
|
|
|
828
818
|
const headers = {};
|
|
829
819
|
const queryParameters = {};
|
|
830
820
|
if (forwardToReplicas !== void 0) {
|
|
831
|
-
queryParameters
|
|
821
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
832
822
|
}
|
|
833
823
|
const request = {
|
|
834
824
|
method: "POST",
|
|
@@ -842,8 +832,7 @@ function createSearchClient({
|
|
|
842
832
|
* Deletes all synonyms from the index.
|
|
843
833
|
*
|
|
844
834
|
* Required API Key ACLs:
|
|
845
|
-
*
|
|
846
|
-
*
|
|
835
|
+
* - editSettings
|
|
847
836
|
* @param clearSynonyms - The clearSynonyms object.
|
|
848
837
|
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
849
838
|
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
@@ -857,7 +846,7 @@ function createSearchClient({
|
|
|
857
846
|
const headers = {};
|
|
858
847
|
const queryParameters = {};
|
|
859
848
|
if (forwardToReplicas !== void 0) {
|
|
860
|
-
queryParameters
|
|
849
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
861
850
|
}
|
|
862
851
|
const request = {
|
|
863
852
|
method: "POST",
|
|
@@ -869,7 +858,6 @@ function createSearchClient({
|
|
|
869
858
|
},
|
|
870
859
|
/**
|
|
871
860
|
* This method allow you to send requests to the Algolia REST API.
|
|
872
|
-
*
|
|
873
861
|
* @param customDelete - The customDelete object.
|
|
874
862
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
875
863
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -892,7 +880,6 @@ function createSearchClient({
|
|
|
892
880
|
},
|
|
893
881
|
/**
|
|
894
882
|
* This method allow you to send requests to the Algolia REST API.
|
|
895
|
-
*
|
|
896
883
|
* @param customGet - The customGet object.
|
|
897
884
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
898
885
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -915,7 +902,6 @@ function createSearchClient({
|
|
|
915
902
|
},
|
|
916
903
|
/**
|
|
917
904
|
* This method allow you to send requests to the Algolia REST API.
|
|
918
|
-
*
|
|
919
905
|
* @param customPost - The customPost object.
|
|
920
906
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
921
907
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -940,7 +926,6 @@ function createSearchClient({
|
|
|
940
926
|
},
|
|
941
927
|
/**
|
|
942
928
|
* This method allow you to send requests to the Algolia REST API.
|
|
943
|
-
*
|
|
944
929
|
* @param customPut - The customPut object.
|
|
945
930
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
946
931
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -967,8 +952,7 @@ function createSearchClient({
|
|
|
967
952
|
* Deletes the API key.
|
|
968
953
|
*
|
|
969
954
|
* Required API Key ACLs:
|
|
970
|
-
*
|
|
971
|
-
*
|
|
955
|
+
* - admin
|
|
972
956
|
* @param deleteApiKey - The deleteApiKey object.
|
|
973
957
|
* @param deleteApiKey.key - API key.
|
|
974
958
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -992,8 +976,7 @@ function createSearchClient({
|
|
|
992
976
|
* 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).
|
|
993
977
|
*
|
|
994
978
|
* Required API Key ACLs:
|
|
995
|
-
*
|
|
996
|
-
*
|
|
979
|
+
* - deleteIndex
|
|
997
980
|
* @param deleteBy - The deleteBy object.
|
|
998
981
|
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
999
982
|
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
@@ -1022,8 +1005,7 @@ function createSearchClient({
|
|
|
1022
1005
|
* 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/).
|
|
1023
1006
|
*
|
|
1024
1007
|
* Required API Key ACLs:
|
|
1025
|
-
*
|
|
1026
|
-
*
|
|
1008
|
+
* - deleteIndex
|
|
1027
1009
|
* @param deleteIndex - The deleteIndex object.
|
|
1028
1010
|
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
1029
1011
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1047,8 +1029,7 @@ function createSearchClient({
|
|
|
1047
1029
|
* 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).
|
|
1048
1030
|
*
|
|
1049
1031
|
* Required API Key ACLs:
|
|
1050
|
-
*
|
|
1051
|
-
*
|
|
1032
|
+
* - deleteObject
|
|
1052
1033
|
* @param deleteObject - The deleteObject object.
|
|
1053
1034
|
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
1054
1035
|
* @param deleteObject.objectID - Unique record identifier.
|
|
@@ -1076,8 +1057,7 @@ function createSearchClient({
|
|
|
1076
1057
|
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
1077
1058
|
*
|
|
1078
1059
|
* Required API Key ACLs:
|
|
1079
|
-
*
|
|
1080
|
-
*
|
|
1060
|
+
* - editSettings
|
|
1081
1061
|
* @param deleteRule - The deleteRule object.
|
|
1082
1062
|
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
1083
1063
|
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
@@ -1095,7 +1075,7 @@ function createSearchClient({
|
|
|
1095
1075
|
const headers = {};
|
|
1096
1076
|
const queryParameters = {};
|
|
1097
1077
|
if (forwardToReplicas !== void 0) {
|
|
1098
|
-
queryParameters
|
|
1078
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1099
1079
|
}
|
|
1100
1080
|
const request = {
|
|
1101
1081
|
method: "DELETE",
|
|
@@ -1109,8 +1089,7 @@ function createSearchClient({
|
|
|
1109
1089
|
* Deletes a source from the list of allowed sources.
|
|
1110
1090
|
*
|
|
1111
1091
|
* Required API Key ACLs:
|
|
1112
|
-
*
|
|
1113
|
-
*
|
|
1092
|
+
* - admin
|
|
1114
1093
|
* @param deleteSource - The deleteSource object.
|
|
1115
1094
|
* @param deleteSource.source - IP address range of the source.
|
|
1116
1095
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1134,8 +1113,7 @@ function createSearchClient({
|
|
|
1134
1113
|
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
1135
1114
|
*
|
|
1136
1115
|
* Required API Key ACLs:
|
|
1137
|
-
*
|
|
1138
|
-
*
|
|
1116
|
+
* - editSettings
|
|
1139
1117
|
* @param deleteSynonym - The deleteSynonym object.
|
|
1140
1118
|
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
1141
1119
|
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1153,7 +1131,7 @@ function createSearchClient({
|
|
|
1153
1131
|
const headers = {};
|
|
1154
1132
|
const queryParameters = {};
|
|
1155
1133
|
if (forwardToReplicas !== void 0) {
|
|
1156
|
-
queryParameters
|
|
1134
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1157
1135
|
}
|
|
1158
1136
|
const request = {
|
|
1159
1137
|
method: "DELETE",
|
|
@@ -1165,7 +1143,6 @@ function createSearchClient({
|
|
|
1165
1143
|
},
|
|
1166
1144
|
/**
|
|
1167
1145
|
* 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>`.
|
|
1168
|
-
*
|
|
1169
1146
|
* @param getApiKey - The getApiKey object.
|
|
1170
1147
|
* @param getApiKey.key - API key.
|
|
1171
1148
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1189,8 +1166,7 @@ function createSearchClient({
|
|
|
1189
1166
|
* Checks the status of a given application task.
|
|
1190
1167
|
*
|
|
1191
1168
|
* Required API Key ACLs:
|
|
1192
|
-
*
|
|
1193
|
-
*
|
|
1169
|
+
* - editSettings
|
|
1194
1170
|
* @param getAppTask - The getAppTask object.
|
|
1195
1171
|
* @param getAppTask.taskID - Unique task identifier.
|
|
1196
1172
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1214,8 +1190,7 @@ function createSearchClient({
|
|
|
1214
1190
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1215
1191
|
*
|
|
1216
1192
|
* Required API Key ACLs:
|
|
1217
|
-
*
|
|
1218
|
-
*
|
|
1193
|
+
* - settings
|
|
1219
1194
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1220
1195
|
*/
|
|
1221
1196
|
getDictionaryLanguages(requestOptions) {
|
|
@@ -1234,8 +1209,7 @@ function createSearchClient({
|
|
|
1234
1209
|
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1235
1210
|
*
|
|
1236
1211
|
* Required API Key ACLs:
|
|
1237
|
-
*
|
|
1238
|
-
*
|
|
1212
|
+
* - settings
|
|
1239
1213
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1240
1214
|
*/
|
|
1241
1215
|
getDictionarySettings(requestOptions) {
|
|
@@ -1254,8 +1228,7 @@ function createSearchClient({
|
|
|
1254
1228
|
* 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.
|
|
1255
1229
|
*
|
|
1256
1230
|
* Required API Key ACLs:
|
|
1257
|
-
*
|
|
1258
|
-
*
|
|
1231
|
+
* - logs
|
|
1259
1232
|
* @param getLogs - The getLogs object.
|
|
1260
1233
|
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
1261
1234
|
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
@@ -1268,16 +1241,16 @@ function createSearchClient({
|
|
|
1268
1241
|
const headers = {};
|
|
1269
1242
|
const queryParameters = {};
|
|
1270
1243
|
if (offset !== void 0) {
|
|
1271
|
-
queryParameters
|
|
1244
|
+
queryParameters["offset"] = offset.toString();
|
|
1272
1245
|
}
|
|
1273
1246
|
if (length !== void 0) {
|
|
1274
|
-
queryParameters
|
|
1247
|
+
queryParameters["length"] = length.toString();
|
|
1275
1248
|
}
|
|
1276
1249
|
if (indexName !== void 0) {
|
|
1277
|
-
queryParameters
|
|
1250
|
+
queryParameters["indexName"] = indexName.toString();
|
|
1278
1251
|
}
|
|
1279
1252
|
if (type !== void 0) {
|
|
1280
|
-
queryParameters
|
|
1253
|
+
queryParameters["type"] = type.toString();
|
|
1281
1254
|
}
|
|
1282
1255
|
const request = {
|
|
1283
1256
|
method: "GET",
|
|
@@ -1291,8 +1264,7 @@ function createSearchClient({
|
|
|
1291
1264
|
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
|
1292
1265
|
*
|
|
1293
1266
|
* Required API Key ACLs:
|
|
1294
|
-
*
|
|
1295
|
-
*
|
|
1267
|
+
* - search
|
|
1296
1268
|
* @param getObject - The getObject object.
|
|
1297
1269
|
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
1298
1270
|
* @param getObject.objectID - Unique record identifier.
|
|
@@ -1310,7 +1282,7 @@ function createSearchClient({
|
|
|
1310
1282
|
const headers = {};
|
|
1311
1283
|
const queryParameters = {};
|
|
1312
1284
|
if (attributesToRetrieve !== void 0) {
|
|
1313
|
-
queryParameters
|
|
1285
|
+
queryParameters["attributesToRetrieve"] = attributesToRetrieve.toString();
|
|
1314
1286
|
}
|
|
1315
1287
|
const request = {
|
|
1316
1288
|
method: "GET",
|
|
@@ -1324,8 +1296,7 @@ function createSearchClient({
|
|
|
1324
1296
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
1325
1297
|
*
|
|
1326
1298
|
* Required API Key ACLs:
|
|
1327
|
-
*
|
|
1328
|
-
*
|
|
1299
|
+
* - search
|
|
1329
1300
|
* @param getObjectsParams - Request object.
|
|
1330
1301
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1331
1302
|
*/
|
|
@@ -1354,8 +1325,7 @@ function createSearchClient({
|
|
|
1354
1325
|
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
1355
1326
|
*
|
|
1356
1327
|
* Required API Key ACLs:
|
|
1357
|
-
*
|
|
1358
|
-
*
|
|
1328
|
+
* - settings
|
|
1359
1329
|
* @param getRule - The getRule object.
|
|
1360
1330
|
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
1361
1331
|
* @param getRule.objectID - Unique identifier of a rule object.
|
|
@@ -1383,8 +1353,7 @@ function createSearchClient({
|
|
|
1383
1353
|
* Retrieves an object with non-null index settings.
|
|
1384
1354
|
*
|
|
1385
1355
|
* Required API Key ACLs:
|
|
1386
|
-
*
|
|
1387
|
-
*
|
|
1356
|
+
* - search
|
|
1388
1357
|
* @param getSettings - The getSettings object.
|
|
1389
1358
|
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
1390
1359
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1408,8 +1377,7 @@ function createSearchClient({
|
|
|
1408
1377
|
* Retrieves all allowed IP addresses with access to your application.
|
|
1409
1378
|
*
|
|
1410
1379
|
* Required API Key ACLs:
|
|
1411
|
-
*
|
|
1412
|
-
*
|
|
1380
|
+
* - admin
|
|
1413
1381
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1414
1382
|
*/
|
|
1415
1383
|
getSources(requestOptions) {
|
|
@@ -1425,11 +1393,10 @@ function createSearchClient({
|
|
|
1425
1393
|
return transporter.request(request, requestOptions);
|
|
1426
1394
|
},
|
|
1427
1395
|
/**
|
|
1428
|
-
* Retrieves a
|
|
1396
|
+
* Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
1429
1397
|
*
|
|
1430
1398
|
* Required API Key ACLs:
|
|
1431
|
-
*
|
|
1432
|
-
*
|
|
1399
|
+
* - settings
|
|
1433
1400
|
* @param getSynonym - The getSynonym object.
|
|
1434
1401
|
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
1435
1402
|
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1457,8 +1424,7 @@ function createSearchClient({
|
|
|
1457
1424
|
* 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.
|
|
1458
1425
|
*
|
|
1459
1426
|
* Required API Key ACLs:
|
|
1460
|
-
*
|
|
1461
|
-
*
|
|
1427
|
+
* - addObject
|
|
1462
1428
|
* @param getTask - The getTask object.
|
|
1463
1429
|
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
1464
1430
|
* @param getTask.taskID - Unique task identifier.
|
|
@@ -1486,8 +1452,7 @@ function createSearchClient({
|
|
|
1486
1452
|
* 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.
|
|
1487
1453
|
*
|
|
1488
1454
|
* Required API Key ACLs:
|
|
1489
|
-
*
|
|
1490
|
-
*
|
|
1455
|
+
* - admin
|
|
1491
1456
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1492
1457
|
*/
|
|
1493
1458
|
getTopUserIds(requestOptions) {
|
|
@@ -1506,8 +1471,7 @@ function createSearchClient({
|
|
|
1506
1471
|
* 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.
|
|
1507
1472
|
*
|
|
1508
1473
|
* Required API Key ACLs:
|
|
1509
|
-
*
|
|
1510
|
-
*
|
|
1474
|
+
* - admin
|
|
1511
1475
|
* @param getUserId - The getUserId object.
|
|
1512
1476
|
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1513
1477
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1531,8 +1495,7 @@ function createSearchClient({
|
|
|
1531
1495
|
* 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.
|
|
1532
1496
|
*
|
|
1533
1497
|
* Required API Key ACLs:
|
|
1534
|
-
*
|
|
1535
|
-
*
|
|
1498
|
+
* - admin
|
|
1536
1499
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
1537
1500
|
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1538
1501
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1542,7 +1505,7 @@ function createSearchClient({
|
|
|
1542
1505
|
const headers = {};
|
|
1543
1506
|
const queryParameters = {};
|
|
1544
1507
|
if (getClusters !== void 0) {
|
|
1545
|
-
queryParameters
|
|
1508
|
+
queryParameters["getClusters"] = getClusters.toString();
|
|
1546
1509
|
}
|
|
1547
1510
|
const request = {
|
|
1548
1511
|
method: "GET",
|
|
@@ -1556,8 +1519,7 @@ function createSearchClient({
|
|
|
1556
1519
|
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
1557
1520
|
*
|
|
1558
1521
|
* Required API Key ACLs:
|
|
1559
|
-
*
|
|
1560
|
-
*
|
|
1522
|
+
* - admin
|
|
1561
1523
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1562
1524
|
*/
|
|
1563
1525
|
listApiKeys(requestOptions) {
|
|
@@ -1576,8 +1538,7 @@ function createSearchClient({
|
|
|
1576
1538
|
* Lists the available clusters in a multi-cluster setup.
|
|
1577
1539
|
*
|
|
1578
1540
|
* Required API Key ACLs:
|
|
1579
|
-
*
|
|
1580
|
-
*
|
|
1541
|
+
* - admin
|
|
1581
1542
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1582
1543
|
*/
|
|
1583
1544
|
listClusters(requestOptions) {
|
|
@@ -1596,8 +1557,7 @@ function createSearchClient({
|
|
|
1596
1557
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
1597
1558
|
*
|
|
1598
1559
|
* Required API Key ACLs:
|
|
1599
|
-
*
|
|
1600
|
-
*
|
|
1560
|
+
* - listIndexes
|
|
1601
1561
|
* @param listIndices - The listIndices object.
|
|
1602
1562
|
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
1603
1563
|
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
@@ -1608,10 +1568,10 @@ function createSearchClient({
|
|
|
1608
1568
|
const headers = {};
|
|
1609
1569
|
const queryParameters = {};
|
|
1610
1570
|
if (page !== void 0) {
|
|
1611
|
-
queryParameters
|
|
1571
|
+
queryParameters["page"] = page.toString();
|
|
1612
1572
|
}
|
|
1613
1573
|
if (hitsPerPage !== void 0) {
|
|
1614
|
-
queryParameters
|
|
1574
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
1615
1575
|
}
|
|
1616
1576
|
const request = {
|
|
1617
1577
|
method: "GET",
|
|
@@ -1625,8 +1585,7 @@ function createSearchClient({
|
|
|
1625
1585
|
* 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.
|
|
1626
1586
|
*
|
|
1627
1587
|
* Required API Key ACLs:
|
|
1628
|
-
*
|
|
1629
|
-
*
|
|
1588
|
+
* - admin
|
|
1630
1589
|
* @param listUserIds - The listUserIds object.
|
|
1631
1590
|
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
1632
1591
|
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
@@ -1637,10 +1596,10 @@ function createSearchClient({
|
|
|
1637
1596
|
const headers = {};
|
|
1638
1597
|
const queryParameters = {};
|
|
1639
1598
|
if (page !== void 0) {
|
|
1640
|
-
queryParameters
|
|
1599
|
+
queryParameters["page"] = page.toString();
|
|
1641
1600
|
}
|
|
1642
1601
|
if (hitsPerPage !== void 0) {
|
|
1643
|
-
queryParameters
|
|
1602
|
+
queryParameters["hitsPerPage"] = hitsPerPage.toString();
|
|
1644
1603
|
}
|
|
1645
1604
|
const request = {
|
|
1646
1605
|
method: "GET",
|
|
@@ -1652,7 +1611,6 @@ function createSearchClient({
|
|
|
1652
1611
|
},
|
|
1653
1612
|
/**
|
|
1654
1613
|
* 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.
|
|
1655
|
-
*
|
|
1656
1614
|
* @param batchParams - The batchParams object.
|
|
1657
1615
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1658
1616
|
*/
|
|
@@ -1676,11 +1634,10 @@ function createSearchClient({
|
|
|
1676
1634
|
return transporter.request(request, requestOptions);
|
|
1677
1635
|
},
|
|
1678
1636
|
/**
|
|
1679
|
-
* 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
|
|
1637
|
+
* 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/).
|
|
1680
1638
|
*
|
|
1681
1639
|
* Required API Key ACLs:
|
|
1682
|
-
*
|
|
1683
|
-
*
|
|
1640
|
+
* - addObject
|
|
1684
1641
|
* @param operationIndex - The operationIndex object.
|
|
1685
1642
|
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
1686
1643
|
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
@@ -1712,11 +1669,10 @@ function createSearchClient({
|
|
|
1712
1669
|
return transporter.request(request, requestOptions);
|
|
1713
1670
|
},
|
|
1714
1671
|
/**
|
|
1715
|
-
* Adds new attributes to a record, or
|
|
1672
|
+
* 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.
|
|
1716
1673
|
*
|
|
1717
1674
|
* Required API Key ACLs:
|
|
1718
|
-
*
|
|
1719
|
-
*
|
|
1675
|
+
* - addObject
|
|
1720
1676
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
1721
1677
|
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
1722
1678
|
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
@@ -1738,7 +1694,7 @@ function createSearchClient({
|
|
|
1738
1694
|
const headers = {};
|
|
1739
1695
|
const queryParameters = {};
|
|
1740
1696
|
if (createIfNotExists !== void 0) {
|
|
1741
|
-
queryParameters
|
|
1697
|
+
queryParameters["createIfNotExists"] = createIfNotExists.toString();
|
|
1742
1698
|
}
|
|
1743
1699
|
const request = {
|
|
1744
1700
|
method: "POST",
|
|
@@ -1753,8 +1709,7 @@ function createSearchClient({
|
|
|
1753
1709
|
* Deletes a user ID and its associated data from the clusters.
|
|
1754
1710
|
*
|
|
1755
1711
|
* Required API Key ACLs:
|
|
1756
|
-
*
|
|
1757
|
-
*
|
|
1712
|
+
* - admin
|
|
1758
1713
|
* @param removeUserId - The removeUserId object.
|
|
1759
1714
|
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
1760
1715
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1778,8 +1733,7 @@ function createSearchClient({
|
|
|
1778
1733
|
* Replaces the list of allowed sources.
|
|
1779
1734
|
*
|
|
1780
1735
|
* Required API Key ACLs:
|
|
1781
|
-
*
|
|
1782
|
-
*
|
|
1736
|
+
* - admin
|
|
1783
1737
|
* @param replaceSources - The replaceSources object.
|
|
1784
1738
|
* @param replaceSources.source - Allowed sources.
|
|
1785
1739
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1804,8 +1758,7 @@ function createSearchClient({
|
|
|
1804
1758
|
* 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.
|
|
1805
1759
|
*
|
|
1806
1760
|
* Required API Key ACLs:
|
|
1807
|
-
*
|
|
1808
|
-
*
|
|
1761
|
+
* - admin
|
|
1809
1762
|
* @param restoreApiKey - The restoreApiKey object.
|
|
1810
1763
|
* @param restoreApiKey.key - API key.
|
|
1811
1764
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1829,11 +1782,10 @@ function createSearchClient({
|
|
|
1829
1782
|
* 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).
|
|
1830
1783
|
*
|
|
1831
1784
|
* Required API Key ACLs:
|
|
1832
|
-
*
|
|
1833
|
-
*
|
|
1785
|
+
* - addObject
|
|
1834
1786
|
* @param saveObject - The saveObject object.
|
|
1835
1787
|
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
1836
|
-
* @param saveObject.body - The record
|
|
1788
|
+
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
1837
1789
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1838
1790
|
*/
|
|
1839
1791
|
saveObject({ indexName, body }, requestOptions) {
|
|
@@ -1859,8 +1811,7 @@ function createSearchClient({
|
|
|
1859
1811
|
* 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).
|
|
1860
1812
|
*
|
|
1861
1813
|
* Required API Key ACLs:
|
|
1862
|
-
*
|
|
1863
|
-
*
|
|
1814
|
+
* - editSettings
|
|
1864
1815
|
* @param saveRule - The saveRule object.
|
|
1865
1816
|
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
1866
1817
|
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
@@ -1885,7 +1836,7 @@ function createSearchClient({
|
|
|
1885
1836
|
const headers = {};
|
|
1886
1837
|
const queryParameters = {};
|
|
1887
1838
|
if (forwardToReplicas !== void 0) {
|
|
1888
|
-
queryParameters
|
|
1839
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1889
1840
|
}
|
|
1890
1841
|
const request = {
|
|
1891
1842
|
method: "PUT",
|
|
@@ -1900,8 +1851,7 @@ function createSearchClient({
|
|
|
1900
1851
|
* 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.
|
|
1901
1852
|
*
|
|
1902
1853
|
* Required API Key ACLs:
|
|
1903
|
-
*
|
|
1904
|
-
*
|
|
1854
|
+
* - editSettings
|
|
1905
1855
|
* @param saveRules - The saveRules object.
|
|
1906
1856
|
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
1907
1857
|
* @param saveRules.rules - The rules object.
|
|
@@ -1920,10 +1870,10 @@ function createSearchClient({
|
|
|
1920
1870
|
const headers = {};
|
|
1921
1871
|
const queryParameters = {};
|
|
1922
1872
|
if (forwardToReplicas !== void 0) {
|
|
1923
|
-
queryParameters
|
|
1873
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1924
1874
|
}
|
|
1925
1875
|
if (clearExistingRules !== void 0) {
|
|
1926
|
-
queryParameters
|
|
1876
|
+
queryParameters["clearExistingRules"] = clearExistingRules.toString();
|
|
1927
1877
|
}
|
|
1928
1878
|
const request = {
|
|
1929
1879
|
method: "POST",
|
|
@@ -1938,8 +1888,7 @@ function createSearchClient({
|
|
|
1938
1888
|
* 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).
|
|
1939
1889
|
*
|
|
1940
1890
|
* Required API Key ACLs:
|
|
1941
|
-
*
|
|
1942
|
-
*
|
|
1891
|
+
* - editSettings
|
|
1943
1892
|
* @param saveSynonym - The saveSynonym object.
|
|
1944
1893
|
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
1945
1894
|
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
@@ -1967,7 +1916,7 @@ function createSearchClient({
|
|
|
1967
1916
|
const headers = {};
|
|
1968
1917
|
const queryParameters = {};
|
|
1969
1918
|
if (forwardToReplicas !== void 0) {
|
|
1970
|
-
queryParameters
|
|
1919
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
1971
1920
|
}
|
|
1972
1921
|
const request = {
|
|
1973
1922
|
method: "PUT",
|
|
@@ -1982,8 +1931,7 @@ function createSearchClient({
|
|
|
1982
1931
|
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
|
|
1983
1932
|
*
|
|
1984
1933
|
* Required API Key ACLs:
|
|
1985
|
-
*
|
|
1986
|
-
*
|
|
1934
|
+
* - editSettings
|
|
1987
1935
|
* @param saveSynonyms - The saveSynonyms object.
|
|
1988
1936
|
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1989
1937
|
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
@@ -2002,10 +1950,10 @@ function createSearchClient({
|
|
|
2002
1950
|
const headers = {};
|
|
2003
1951
|
const queryParameters = {};
|
|
2004
1952
|
if (forwardToReplicas !== void 0) {
|
|
2005
|
-
queryParameters
|
|
1953
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
2006
1954
|
}
|
|
2007
1955
|
if (replaceExistingSynonyms !== void 0) {
|
|
2008
|
-
queryParameters
|
|
1956
|
+
queryParameters["replaceExistingSynonyms"] = replaceExistingSynonyms.toString();
|
|
2009
1957
|
}
|
|
2010
1958
|
const request = {
|
|
2011
1959
|
method: "POST",
|
|
@@ -2017,11 +1965,10 @@ function createSearchClient({
|
|
|
2017
1965
|
return transporter.request(request, requestOptions);
|
|
2018
1966
|
},
|
|
2019
1967
|
/**
|
|
2020
|
-
* Sends multiple search
|
|
1968
|
+
* 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.
|
|
2021
1969
|
*
|
|
2022
1970
|
* Required API Key ACLs:
|
|
2023
|
-
*
|
|
2024
|
-
*
|
|
1971
|
+
* - search
|
|
2025
1972
|
* @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
|
|
2026
1973
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2027
1974
|
*/
|
|
@@ -2071,8 +2018,7 @@ function createSearchClient({
|
|
|
2071
2018
|
* Searches for standard and custom dictionary entries.
|
|
2072
2019
|
*
|
|
2073
2020
|
* Required API Key ACLs:
|
|
2074
|
-
*
|
|
2075
|
-
*
|
|
2021
|
+
* - settings
|
|
2076
2022
|
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
2077
2023
|
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
2078
2024
|
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
@@ -2113,8 +2059,7 @@ function createSearchClient({
|
|
|
2113
2059
|
* 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**.
|
|
2114
2060
|
*
|
|
2115
2061
|
* Required API Key ACLs:
|
|
2116
|
-
*
|
|
2117
|
-
*
|
|
2062
|
+
* - search
|
|
2118
2063
|
* @param searchForFacetValues - The searchForFacetValues object.
|
|
2119
2064
|
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
2120
2065
|
* @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.
|
|
@@ -2146,8 +2091,7 @@ function createSearchClient({
|
|
|
2146
2091
|
* Searches for rules in your index.
|
|
2147
2092
|
*
|
|
2148
2093
|
* Required API Key ACLs:
|
|
2149
|
-
*
|
|
2150
|
-
*
|
|
2094
|
+
* - settings
|
|
2151
2095
|
* @param searchRules - The searchRules object.
|
|
2152
2096
|
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
2153
2097
|
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
@@ -2172,11 +2116,10 @@ function createSearchClient({
|
|
|
2172
2116
|
return transporter.request(request, requestOptions);
|
|
2173
2117
|
},
|
|
2174
2118
|
/**
|
|
2175
|
-
* Searches a single index and
|
|
2119
|
+
* 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.
|
|
2176
2120
|
*
|
|
2177
2121
|
* Required API Key ACLs:
|
|
2178
|
-
*
|
|
2179
|
-
*
|
|
2122
|
+
* - search
|
|
2180
2123
|
* @param searchSingleIndex - The searchSingleIndex object.
|
|
2181
2124
|
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
2182
2125
|
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
@@ -2204,8 +2147,7 @@ function createSearchClient({
|
|
|
2204
2147
|
* Searches for synonyms in your index.
|
|
2205
2148
|
*
|
|
2206
2149
|
* Required API Key ACLs:
|
|
2207
|
-
*
|
|
2208
|
-
*
|
|
2150
|
+
* - settings
|
|
2209
2151
|
* @param searchSynonyms - The searchSynonyms object.
|
|
2210
2152
|
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
2211
2153
|
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
@@ -2236,8 +2178,7 @@ function createSearchClient({
|
|
|
2236
2178
|
* 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).
|
|
2237
2179
|
*
|
|
2238
2180
|
* Required API Key ACLs:
|
|
2239
|
-
*
|
|
2240
|
-
*
|
|
2181
|
+
* - admin
|
|
2241
2182
|
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
2242
2183
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2243
2184
|
*/
|
|
@@ -2266,8 +2207,7 @@ function createSearchClient({
|
|
|
2266
2207
|
* Turns standard stop word dictionary entries on or off for a given language.
|
|
2267
2208
|
*
|
|
2268
2209
|
* Required API Key ACLs:
|
|
2269
|
-
*
|
|
2270
|
-
*
|
|
2210
|
+
* - editSettings
|
|
2271
2211
|
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
2272
2212
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2273
2213
|
*/
|
|
@@ -2296,8 +2236,7 @@ function createSearchClient({
|
|
|
2296
2236
|
* 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.
|
|
2297
2237
|
*
|
|
2298
2238
|
* Required API Key ACLs:
|
|
2299
|
-
*
|
|
2300
|
-
*
|
|
2239
|
+
* - editSettings
|
|
2301
2240
|
* @param setSettings - The setSettings object.
|
|
2302
2241
|
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
2303
2242
|
* @param setSettings.indexSettings - The indexSettings object.
|
|
@@ -2315,7 +2254,7 @@ function createSearchClient({
|
|
|
2315
2254
|
const headers = {};
|
|
2316
2255
|
const queryParameters = {};
|
|
2317
2256
|
if (forwardToReplicas !== void 0) {
|
|
2318
|
-
queryParameters
|
|
2257
|
+
queryParameters["forwardToReplicas"] = forwardToReplicas.toString();
|
|
2319
2258
|
}
|
|
2320
2259
|
const request = {
|
|
2321
2260
|
method: "PUT",
|
|
@@ -2330,8 +2269,7 @@ function createSearchClient({
|
|
|
2330
2269
|
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
2331
2270
|
*
|
|
2332
2271
|
* Required API Key ACLs:
|
|
2333
|
-
*
|
|
2334
|
-
*
|
|
2272
|
+
* - admin
|
|
2335
2273
|
* @param updateApiKey - The updateApiKey object.
|
|
2336
2274
|
* @param updateApiKey.key - API key.
|
|
2337
2275
|
* @param updateApiKey.apiKey - The apiKey object.
|
|
@@ -2363,6 +2301,7 @@ function createSearchClient({
|
|
|
2363
2301
|
}
|
|
2364
2302
|
|
|
2365
2303
|
// builds/node.ts
|
|
2304
|
+
var import_node_crypto = require("crypto");
|
|
2366
2305
|
function searchClient(appId, apiKey, options) {
|
|
2367
2306
|
if (!appId || typeof appId !== "string") {
|
|
2368
2307
|
throw new Error("`appId` is missing.");
|