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