@algolia/client-search 5.0.0-alpha.99 → 5.0.0-beta.2
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/dist/builds/browser.d.ts +86 -3
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +104 -3
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-search.cjs +419 -219
- package/dist/client-search.esm.browser.js +376 -212
- package/dist/client-search.esm.node.js +420 -220
- package/dist/client-search.umd.js +2 -2
- package/dist/model/acl.d.ts +1 -1
- package/dist/model/action.d.ts +1 -1
- package/dist/model/addApiKeyResponse.d.ts +1 -1
- package/dist/model/anchoring.d.ts +1 -1
- package/dist/model/apiKey.d.ts +8 -8
- package/dist/model/apiKeyOperation.d.ts +2 -0
- package/dist/model/apiKeyOperation.d.ts.map +1 -0
- package/dist/model/aroundPrecision.d.ts +1 -1
- package/dist/model/aroundPrecisionFromValueInner.d.ts +9 -0
- package/dist/model/aroundPrecisionFromValueInner.d.ts.map +1 -1
- package/dist/model/aroundRadius.d.ts +1 -1
- package/dist/model/aroundRadiusAll.d.ts +3 -0
- package/dist/model/aroundRadiusAll.d.ts.map +1 -1
- package/dist/model/automaticFacetFilter.d.ts +4 -4
- package/dist/model/automaticFacetFilters.d.ts +1 -1
- package/dist/model/baseGetApiKeyResponse.d.ts +1 -1
- package/dist/model/baseIndexSettings.d.ts +22 -17
- package/dist/model/baseIndexSettings.d.ts.map +1 -1
- package/dist/model/baseSearchParamsWithoutQuery.d.ts +26 -29
- package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
- package/dist/model/baseSearchResponse.d.ts +10 -6
- package/dist/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/model/batchDictionaryEntriesParams.d.ts +3 -3
- package/dist/model/batchResponse.d.ts +2 -2
- package/dist/model/builtInOperation.d.ts +2 -2
- package/dist/model/builtInOperationType.d.ts +1 -1
- package/dist/model/clientMethodProps.d.ts +124 -65
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/condition.d.ts +7 -3
- package/dist/model/condition.d.ts.map +1 -1
- package/dist/model/consequence.d.ts +5 -5
- package/dist/model/consequenceHide.d.ts +2 -2
- package/dist/model/consequenceQuery.d.ts +1 -1
- package/dist/model/consequenceQueryObject.d.ts +2 -2
- package/dist/model/createdAtResponse.d.ts +1 -1
- package/dist/model/cursor.d.ts +1 -1
- package/dist/model/deleteApiKeyResponse.d.ts +1 -1
- package/dist/model/deleteByParams.d.ts +4 -4
- package/dist/model/deleteSourceResponse.d.ts +1 -1
- package/dist/model/deletedAtResponse.d.ts +2 -2
- package/dist/model/dictionaryEntry.d.ts +6 -8
- package/dist/model/dictionaryEntry.d.ts.map +1 -1
- package/dist/model/dictionaryEntryState.d.ts +1 -1
- package/dist/model/dictionaryLanguage.d.ts +2 -2
- package/dist/model/dictionarySettingsParams.d.ts +1 -1
- package/dist/model/distinct.d.ts +1 -1
- package/dist/model/edit.d.ts +1 -1
- package/dist/model/exactOnSingleWordQuery.d.ts +1 -1
- package/dist/model/facetFilters.d.ts +2 -3
- package/dist/model/facetFilters.d.ts.map +1 -1
- package/dist/model/facetHits.d.ts +2 -2
- package/dist/model/facetOrdering.d.ts +2 -2
- package/dist/model/facets.d.ts +2 -2
- package/dist/model/fetchedIndex.d.ts +1 -1
- package/dist/model/getObjectsRequest.d.ts +3 -3
- package/dist/model/getObjectsResponse.d.ts +1 -1
- package/dist/model/hasPendingMappingsResponse.d.ts +1 -1
- package/dist/model/highlightResult.d.ts +1 -1
- package/dist/model/highlightResult.d.ts.map +1 -1
- package/dist/model/highlightResultOption.d.ts +3 -3
- package/dist/model/hit.d.ts +4 -4
- package/dist/model/ignorePlurals.d.ts +3 -2
- package/dist/model/ignorePlurals.d.ts.map +1 -1
- package/dist/model/index.d.ts +4 -1
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/indexSettings.d.ts +1 -1
- package/dist/model/indexSettingsAsSearchParams.d.ts +32 -35
- package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/model/log.d.ts +11 -11
- package/dist/model/logQuery.d.ts +1 -1
- package/dist/model/matchLevel.d.ts +1 -1
- package/dist/model/mode.d.ts +1 -1
- package/dist/model/multipleBatchRequest.d.ts +1 -1
- package/dist/model/multipleBatchResponse.d.ts +2 -2
- package/dist/model/numericFilters.d.ts +2 -3
- package/dist/model/numericFilters.d.ts.map +1 -1
- package/dist/model/operationIndexParams.d.ts +2 -2
- package/dist/model/operationType.d.ts +1 -1
- package/dist/model/optionalFilters.d.ts +2 -3
- package/dist/model/optionalFilters.d.ts.map +1 -1
- package/dist/model/params.d.ts +1 -1
- package/dist/model/promoteObjectID.d.ts +2 -2
- package/dist/model/promoteObjectIDs.d.ts +2 -2
- package/dist/model/queryType.d.ts +1 -1
- package/dist/model/rankingInfo.d.ts +10 -7
- package/dist/model/rankingInfo.d.ts.map +1 -1
- package/dist/model/reRankingApplyFilter.d.ts +2 -3
- package/dist/model/reRankingApplyFilter.d.ts.map +1 -1
- package/dist/model/removeStopWords.d.ts +3 -2
- package/dist/model/removeStopWords.d.ts.map +1 -1
- package/dist/model/removeUserIdResponse.d.ts +1 -1
- package/dist/model/removeWordsIfNoResults.d.ts +1 -1
- package/dist/model/renderingContent.d.ts +1 -1
- package/dist/model/replaceSourceResponse.d.ts +1 -1
- package/dist/model/rule.d.ts +5 -5
- package/dist/model/saveObjectResponse.d.ts +3 -3
- package/dist/model/saveSynonymResponse.d.ts +2 -2
- package/dist/model/searchDictionaryEntriesParams.d.ts +5 -7
- package/dist/model/searchDictionaryEntriesParams.d.ts.map +1 -1
- package/dist/model/searchDictionaryEntriesResponse.d.ts +20 -0
- package/dist/model/searchDictionaryEntriesResponse.d.ts.map +1 -0
- package/dist/model/searchForFacetValuesRequest.d.ts +1 -1
- package/dist/model/searchForFacetValuesResponse.d.ts +4 -1
- package/dist/model/searchForFacetValuesResponse.d.ts.map +1 -1
- package/dist/model/searchForFacetsOptions.d.ts +2 -2
- package/dist/model/searchForHitsOptions.d.ts +1 -1
- package/dist/model/searchHits.d.ts +6 -3
- package/dist/model/searchHits.d.ts.map +1 -1
- package/dist/model/searchParamsObject.d.ts +3 -0
- package/dist/model/searchParamsObject.d.ts.map +1 -1
- package/dist/model/searchParamsQuery.d.ts +1 -1
- package/dist/model/searchRulesParams.d.ts +4 -8
- package/dist/model/searchRulesParams.d.ts.map +1 -1
- package/dist/model/searchRulesResponse.d.ts +2 -2
- package/dist/model/searchStrategy.d.ts +1 -1
- package/dist/model/searchSynonymsParams.d.ts +2 -2
- package/dist/model/searchSynonymsResponse.d.ts +2 -2
- package/dist/model/searchUserIdsParams.d.ts +1 -1
- package/dist/model/searchUserIdsResponse.d.ts +3 -3
- package/dist/model/securedAPIKeyRestrictions.d.ts +25 -0
- package/dist/model/securedAPIKeyRestrictions.d.ts.map +1 -0
- package/dist/model/semanticSearch.d.ts +2 -2
- package/dist/model/snippetResult.d.ts +1 -1
- package/dist/model/snippetResult.d.ts.map +1 -1
- package/dist/model/snippetResultOption.d.ts +2 -2
- package/dist/model/sortRemainingBy.d.ts +1 -1
- package/dist/model/supportedLanguage.d.ts +5 -0
- package/dist/model/supportedLanguage.d.ts.map +1 -0
- package/dist/model/tagFilters.d.ts +2 -3
- package/dist/model/tagFilters.d.ts.map +1 -1
- package/dist/model/taskStatus.d.ts +1 -1
- package/dist/model/timeRange.d.ts +2 -2
- package/dist/model/typoTolerance.d.ts +1 -1
- package/dist/model/typoToleranceEnum.d.ts +3 -0
- package/dist/model/typoToleranceEnum.d.ts.map +1 -1
- package/dist/model/updateApiKeyResponse.d.ts +1 -1
- package/dist/model/updatedAtResponse.d.ts +2 -2
- package/dist/model/updatedAtWithObjectIdResponse.d.ts +3 -3
- package/dist/model/updatedRuleResponse.d.ts +3 -3
- package/dist/model/userHit.d.ts +1 -1
- package/dist/model/userId.d.ts +1 -1
- package/dist/model/value.d.ts +1 -1
- package/dist/src/searchClient.d.ts +324 -202
- package/dist/src/searchClient.d.ts.map +1 -1
- package/model/acl.ts +1 -1
- package/model/action.ts +1 -1
- package/model/addApiKeyResponse.ts +1 -1
- package/model/anchoring.ts +1 -1
- package/model/apiKey.ts +8 -8
- package/model/{mixedSearchFilters.ts → apiKeyOperation.ts} +1 -1
- package/model/aroundPrecision.ts +1 -1
- package/model/aroundPrecisionFromValueInner.ts +9 -0
- package/model/aroundRadius.ts +1 -1
- package/model/aroundRadiusAll.ts +3 -0
- package/model/automaticFacetFilter.ts +4 -4
- package/model/automaticFacetFilters.ts +1 -1
- package/model/baseGetApiKeyResponse.ts +1 -1
- package/model/baseIndexSettings.ts +24 -17
- package/model/baseSearchParamsWithoutQuery.ts +26 -30
- package/model/baseSearchResponse.ts +11 -6
- package/model/batchDictionaryEntriesParams.ts +3 -3
- package/model/batchResponse.ts +2 -2
- package/model/builtInOperation.ts +2 -2
- package/model/builtInOperationType.ts +1 -1
- package/model/clientMethodProps.ts +135 -65
- package/model/condition.ts +8 -3
- package/model/consequence.ts +5 -5
- package/model/consequenceHide.ts +2 -2
- package/model/consequenceQuery.ts +1 -1
- package/model/consequenceQueryObject.ts +2 -2
- package/model/createdAtResponse.ts +1 -1
- package/model/cursor.ts +1 -1
- package/model/deleteApiKeyResponse.ts +1 -1
- package/model/deleteByParams.ts +4 -4
- package/model/deleteSourceResponse.ts +1 -1
- package/model/deletedAtResponse.ts +2 -2
- package/model/dictionaryEntry.ts +6 -8
- package/model/dictionaryEntryState.ts +1 -1
- package/model/dictionaryLanguage.ts +2 -2
- package/model/dictionarySettingsParams.ts +1 -1
- package/model/distinct.ts +1 -1
- package/model/edit.ts +1 -1
- package/model/exactOnSingleWordQuery.ts +1 -1
- package/model/facetFilters.ts +2 -4
- package/model/facetHits.ts +2 -2
- package/model/facetOrdering.ts +2 -2
- package/model/facets.ts +2 -2
- package/model/fetchedIndex.ts +1 -1
- package/model/getObjectsRequest.ts +3 -3
- package/model/getObjectsResponse.ts +1 -1
- package/model/hasPendingMappingsResponse.ts +1 -1
- package/model/highlightResult.ts +1 -0
- package/model/highlightResultOption.ts +3 -3
- package/model/hit.ts +4 -4
- package/model/ignorePlurals.ts +4 -2
- package/model/index.ts +4 -1
- package/model/indexSettings.ts +1 -1
- package/model/indexSettingsAsSearchParams.ts +32 -36
- package/model/log.ts +11 -11
- package/model/logQuery.ts +1 -1
- package/model/matchLevel.ts +1 -1
- package/model/mode.ts +1 -1
- package/model/multipleBatchRequest.ts +1 -1
- package/model/multipleBatchResponse.ts +2 -2
- package/model/numericFilters.ts +2 -4
- package/model/operationIndexParams.ts +2 -2
- package/model/operationType.ts +1 -1
- package/model/optionalFilters.ts +2 -4
- package/model/params.ts +1 -1
- package/model/promoteObjectID.ts +2 -2
- package/model/promoteObjectIDs.ts +2 -2
- package/model/queryType.ts +1 -1
- package/model/rankingInfo.ts +10 -7
- package/model/reRankingApplyFilter.ts +2 -4
- package/model/removeStopWords.ts +4 -2
- package/model/removeUserIdResponse.ts +1 -1
- package/model/removeWordsIfNoResults.ts +1 -1
- package/model/renderingContent.ts +1 -1
- package/model/replaceSourceResponse.ts +1 -1
- package/model/rule.ts +5 -5
- package/model/saveObjectResponse.ts +3 -3
- package/model/saveSynonymResponse.ts +2 -2
- package/model/searchDictionaryEntriesParams.ts +6 -7
- package/model/searchDictionaryEntriesResponse.ts +25 -0
- package/model/searchForFacetValuesRequest.ts +1 -1
- package/model/searchForFacetValuesResponse.ts +4 -1
- package/model/searchForFacetsOptions.ts +2 -2
- package/model/searchForHitsOptions.ts +1 -1
- package/model/searchHits.ts +6 -3
- package/model/searchParamsObject.ts +3 -0
- package/model/searchParamsQuery.ts +1 -1
- package/model/searchRulesParams.ts +4 -9
- package/model/searchRulesResponse.ts +2 -2
- package/model/searchStrategy.ts +1 -1
- package/model/searchSynonymsParams.ts +2 -2
- package/model/searchSynonymsResponse.ts +2 -2
- package/model/searchUserIdsParams.ts +1 -1
- package/model/searchUserIdsResponse.ts +3 -3
- package/model/securedAPIKeyRestrictions.ts +32 -0
- package/model/semanticSearch.ts +2 -2
- package/model/snippetResult.ts +2 -1
- package/model/snippetResultOption.ts +2 -2
- package/model/sortRemainingBy.ts +1 -1
- package/model/supportedLanguage.ts +74 -0
- package/model/tagFilters.ts +2 -4
- package/model/taskStatus.ts +1 -1
- package/model/timeRange.ts +2 -2
- package/model/typoTolerance.ts +1 -1
- package/model/typoToleranceEnum.ts +3 -0
- package/model/updateApiKeyResponse.ts +1 -1
- package/model/updatedAtResponse.ts +2 -2
- package/model/updatedAtWithObjectIdResponse.ts +3 -3
- package/model/updatedRuleResponse.ts +3 -3
- package/model/userHit.ts +1 -1
- package/model/userId.ts +1 -1
- package/model/value.ts +1 -1
- package/package.json +7 -7
- package/dist/model/mixedSearchFilters.d.ts +0 -2
- package/dist/model/mixedSearchFilters.d.ts.map +0 -1
|
@@ -247,7 +247,7 @@ function _toPrimitive(t, r) {
|
|
|
247
247
|
}
|
|
248
248
|
function _toPropertyKey(t) {
|
|
249
249
|
var i = _toPrimitive(t, "string");
|
|
250
|
-
return "symbol" == typeof i ? i :
|
|
250
|
+
return "symbol" == typeof i ? i : i + "";
|
|
251
251
|
}
|
|
252
252
|
function _defineProperty(obj, key, value) {
|
|
253
253
|
key = _toPropertyKey(key);
|
|
@@ -321,7 +321,7 @@ function shuffle(array) {
|
|
|
321
321
|
}
|
|
322
322
|
function serializeUrl(host, path, queryParameters) {
|
|
323
323
|
const queryParametersAsString = serializeQueryParameters(queryParameters);
|
|
324
|
-
let url = `${host.protocol}://${host.url}/${path.charAt(0) === '/' ? path.
|
|
324
|
+
let url = `${host.protocol}://${host.url}${host.port ? `:${host.port}` : ''}/${path.charAt(0) === '/' ? path.substring(1) : path}`;
|
|
325
325
|
if (queryParametersAsString.length) {
|
|
326
326
|
url += `?${queryParametersAsString}`;
|
|
327
327
|
}
|
|
@@ -329,7 +329,7 @@ function serializeUrl(host, path, queryParameters) {
|
|
|
329
329
|
}
|
|
330
330
|
function serializeQueryParameters(parameters) {
|
|
331
331
|
const isObjectOrArray = value => Object.prototype.toString.call(value) === '[object Object]' || Object.prototype.toString.call(value) === '[object Array]';
|
|
332
|
-
return Object.keys(parameters).map(key => `${key}=${encodeURIComponent(isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key])}`).join('&');
|
|
332
|
+
return Object.keys(parameters).map(key => `${key}=${encodeURIComponent(isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key]).replaceAll('+', '%20')}`).join('&');
|
|
333
333
|
}
|
|
334
334
|
function serializeData(request, requestOptions) {
|
|
335
335
|
if (request.method === 'GET' || request.data === undefined && requestOptions.data === undefined) {
|
|
@@ -500,16 +500,13 @@ function createTransporter({
|
|
|
500
500
|
if (host === undefined) {
|
|
501
501
|
throw new RetryError(stackTraceWithoutCredentials(stackTrace));
|
|
502
502
|
}
|
|
503
|
-
let responseTimeout = requestOptions.
|
|
504
|
-
if (responseTimeout === undefined) {
|
|
505
|
-
responseTimeout = isRead ? timeouts.read : timeouts.write;
|
|
506
|
-
}
|
|
503
|
+
let responseTimeout = isRead ? requestOptions.timeouts?.read || timeouts.read : requestOptions.timeouts?.write || timeouts.write;
|
|
507
504
|
const payload = {
|
|
508
505
|
data,
|
|
509
506
|
headers,
|
|
510
507
|
method: request.method,
|
|
511
508
|
url: serializeUrl(host, request.path, queryParameters),
|
|
512
|
-
connectTimeout: getTimeout(timeoutsCount, timeouts.connect),
|
|
509
|
+
connectTimeout: getTimeout(timeoutsCount, requestOptions.timeouts?.connect || timeouts.connect),
|
|
513
510
|
responseTimeout: getTimeout(timeoutsCount, responseTimeout)
|
|
514
511
|
};
|
|
515
512
|
/**
|
|
@@ -737,7 +734,7 @@ function createXhrRequester() {
|
|
|
737
734
|
}
|
|
738
735
|
|
|
739
736
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
740
|
-
const apiClientVersion = '5.0.0-
|
|
737
|
+
const apiClientVersion = '5.0.0-beta.2';
|
|
741
738
|
function getDefaultHosts(appId) {
|
|
742
739
|
return [
|
|
743
740
|
{
|
|
@@ -823,7 +820,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
823
820
|
* Helper: Wait for a task to be published (completed) for a given `indexName` and `taskID`.
|
|
824
821
|
*
|
|
825
822
|
* @summary Helper method that waits for a task to be published (completed).
|
|
826
|
-
* @param waitForTaskOptions - The waitForTaskOptions object.
|
|
823
|
+
* @param waitForTaskOptions - The `waitForTaskOptions` object.
|
|
827
824
|
* @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.
|
|
828
825
|
* @param waitForTaskOptions.taskID - The `taskID` returned in the method response.
|
|
829
826
|
* @param waitForTaskOptions.maxRetries - The maximum number of retries. 50 by default.
|
|
@@ -847,7 +844,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
847
844
|
* Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
|
|
848
845
|
*
|
|
849
846
|
* @summary Helper method that waits for an API key task to be processed.
|
|
850
|
-
* @param waitForApiKeyOptions - The waitForApiKeyOptions object.
|
|
847
|
+
* @param waitForApiKeyOptions - The `waitForApiKeyOptions` object.
|
|
851
848
|
* @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.
|
|
852
849
|
* @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.
|
|
853
850
|
* @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.
|
|
@@ -900,7 +897,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
900
897
|
* Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index.
|
|
901
898
|
*
|
|
902
899
|
* @summary Helper method that iterates on the `browse` method.
|
|
903
|
-
* @param browseObjects - The browseObjects object.
|
|
900
|
+
* @param browseObjects - The `browseObjects` object.
|
|
904
901
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
905
902
|
* @param browseObjects.browseParams - The `browse` parameters.
|
|
906
903
|
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is no `cursor` in the response.
|
|
@@ -926,11 +923,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
926
923
|
* Helper: Iterate on the `searchRules` method of the client to allow aggregating rules of an index.
|
|
927
924
|
*
|
|
928
925
|
* @summary Helper method that iterates on the `searchRules` method.
|
|
929
|
-
* @param
|
|
930
|
-
* @param
|
|
931
|
-
* @param
|
|
932
|
-
* @param
|
|
933
|
-
* @param
|
|
926
|
+
* @param browseRules - The `browseRules` object.
|
|
927
|
+
* @param browseRules.indexName - The index in which to perform the request.
|
|
928
|
+
* @param browseRules.searchRulesParams - The `searchRules` method parameters.
|
|
929
|
+
* @param browseRules.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
|
|
930
|
+
* @param browseRules.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
934
931
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
935
932
|
*/
|
|
936
933
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
|
|
@@ -958,11 +955,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
958
955
|
* Helper: Iterate on the `searchSynonyms` method of the client to allow aggregating rules of an index.
|
|
959
956
|
*
|
|
960
957
|
* @summary Helper method that iterates on the `searchSynonyms` method.
|
|
961
|
-
* @param
|
|
962
|
-
* @param
|
|
963
|
-
* @param
|
|
964
|
-
* @param
|
|
965
|
-
* @param
|
|
958
|
+
* @param browseSynonyms - The `browseSynonyms` object.
|
|
959
|
+
* @param browseSynonyms.indexName - The index in which to perform the request.
|
|
960
|
+
* @param browseSynonyms.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
|
|
961
|
+
* @param browseSynonyms.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
962
|
+
* @param browseSynonyms.searchSynonymsParams - The `searchSynonyms` method parameters.
|
|
966
963
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
967
964
|
*/
|
|
968
965
|
browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }, requestOptions) {
|
|
@@ -972,16 +969,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
972
969
|
hitsPerPage: 1000,
|
|
973
970
|
};
|
|
974
971
|
return createIterablePromise({
|
|
975
|
-
func: (
|
|
976
|
-
|
|
972
|
+
func: (_) => {
|
|
973
|
+
const resp = this.searchSynonyms({
|
|
977
974
|
indexName,
|
|
978
975
|
searchSynonymsParams: {
|
|
979
976
|
...params,
|
|
980
|
-
page:
|
|
981
|
-
? previousResponse.page + 1
|
|
982
|
-
: params.page,
|
|
977
|
+
page: params.page,
|
|
983
978
|
},
|
|
984
979
|
}, requestOptions);
|
|
980
|
+
params.page += 1;
|
|
981
|
+
return resp;
|
|
985
982
|
},
|
|
986
983
|
validate: (response) => response.nbHits < params.hitsPerPage,
|
|
987
984
|
...browseSynonymsOptions,
|
|
@@ -1010,9 +1007,76 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1010
1007
|
return this.search(searchMethodParams, requestOptions);
|
|
1011
1008
|
},
|
|
1012
1009
|
/**
|
|
1013
|
-
*
|
|
1010
|
+
* Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
|
|
1011
|
+
*
|
|
1012
|
+
* @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
|
|
1013
|
+
* @param chunkedBatch - The `chunkedBatch` object.
|
|
1014
|
+
* @param chunkedBatch.indexName - The `indexName` to replace `objects` in.
|
|
1015
|
+
* @param chunkedBatch.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
1016
|
+
* @param chunkedBatch.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
|
|
1017
|
+
* @param chunkedBatch.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
1018
|
+
* @param chunkedBatch.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
1019
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1020
|
+
*/
|
|
1021
|
+
async chunkedBatch({ indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000, }, requestOptions) {
|
|
1022
|
+
let requests = [];
|
|
1023
|
+
const responses = [];
|
|
1024
|
+
for (const [i, obj] of objects.entries()) {
|
|
1025
|
+
requests.push({ action, body: obj });
|
|
1026
|
+
if (i % batchSize === 0) {
|
|
1027
|
+
responses.push(await this.batch({ indexName, batchWriteParams: { requests } }, requestOptions));
|
|
1028
|
+
requests = [];
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
if (waitForTasks) {
|
|
1032
|
+
for (const resp of responses) {
|
|
1033
|
+
await this.waitForTask({ indexName, taskID: resp.taskID });
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
return responses;
|
|
1037
|
+
},
|
|
1038
|
+
/**
|
|
1039
|
+
* Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
|
|
1040
|
+
*
|
|
1041
|
+
* @summary Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
|
|
1042
|
+
* @param replaceAllObjects - The `replaceAllObjects` object.
|
|
1043
|
+
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
1044
|
+
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
1045
|
+
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
1046
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1047
|
+
*/
|
|
1048
|
+
async replaceAllObjects({ indexName, objects, batchSize }, requestOptions) {
|
|
1049
|
+
const randomSuffix = Math.random().toString(36).substring(7);
|
|
1050
|
+
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
1051
|
+
const copyOperationResponse = await this.operationIndex({
|
|
1052
|
+
indexName,
|
|
1053
|
+
operationIndexParams: {
|
|
1054
|
+
operation: 'copy',
|
|
1055
|
+
destination: tmpIndexName,
|
|
1056
|
+
scope: ['settings', 'rules', 'synonyms'],
|
|
1057
|
+
},
|
|
1058
|
+
}, requestOptions);
|
|
1059
|
+
await this.waitForTask({
|
|
1060
|
+
indexName,
|
|
1061
|
+
taskID: copyOperationResponse.taskID,
|
|
1062
|
+
});
|
|
1063
|
+
const batchResponses = await this.chunkedBatch({ indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, requestOptions);
|
|
1064
|
+
const moveOperationResponse = await this.operationIndex({
|
|
1065
|
+
indexName: tmpIndexName,
|
|
1066
|
+
operationIndexParams: { operation: 'move', destination: indexName },
|
|
1067
|
+
}, requestOptions);
|
|
1068
|
+
await this.waitForTask({
|
|
1069
|
+
indexName,
|
|
1070
|
+
taskID: moveOperationResponse.taskID,
|
|
1071
|
+
});
|
|
1072
|
+
return { copyOperationResponse, batchResponses, moveOperationResponse };
|
|
1073
|
+
},
|
|
1074
|
+
/**
|
|
1075
|
+
* Creates a new API key with specific permissions and restrictions.
|
|
1076
|
+
*
|
|
1077
|
+
* Required API Key ACLs:
|
|
1078
|
+
* - admin.
|
|
1014
1079
|
*
|
|
1015
|
-
* @summary Add API key.
|
|
1016
1080
|
* @param apiKey - The apiKey object.
|
|
1017
1081
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1018
1082
|
*/
|
|
@@ -1036,13 +1100,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1036
1100
|
return transporter.request(request, requestOptions);
|
|
1037
1101
|
},
|
|
1038
1102
|
/**
|
|
1039
|
-
* If
|
|
1103
|
+
* 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).
|
|
1104
|
+
*
|
|
1105
|
+
* Required API Key ACLs:
|
|
1106
|
+
* - addObject.
|
|
1040
1107
|
*
|
|
1041
|
-
* @summary Add or update a record (using objectID).
|
|
1042
1108
|
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
1043
|
-
* @param addOrUpdateObject.indexName -
|
|
1044
|
-
* @param addOrUpdateObject.objectID - Unique record
|
|
1045
|
-
* @param addOrUpdateObject.body -
|
|
1109
|
+
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
1110
|
+
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
1111
|
+
* @param addOrUpdateObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
|
|
1046
1112
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1047
1113
|
*/
|
|
1048
1114
|
addOrUpdateObject({ indexName, objectID, body }, requestOptions) {
|
|
@@ -1070,9 +1136,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1070
1136
|
return transporter.request(request, requestOptions);
|
|
1071
1137
|
},
|
|
1072
1138
|
/**
|
|
1073
|
-
*
|
|
1139
|
+
* Adds a source to the list of allowed sources.
|
|
1140
|
+
*
|
|
1141
|
+
* Required API Key ACLs:
|
|
1142
|
+
* - admin.
|
|
1074
1143
|
*
|
|
1075
|
-
* @summary Add a source.
|
|
1076
1144
|
* @param source - Source to add.
|
|
1077
1145
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1078
1146
|
*/
|
|
@@ -1096,11 +1164,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1096
1164
|
return transporter.request(request, requestOptions);
|
|
1097
1165
|
},
|
|
1098
1166
|
/**
|
|
1099
|
-
*
|
|
1167
|
+
* 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.
|
|
1168
|
+
*
|
|
1169
|
+
* Required API Key ACLs:
|
|
1170
|
+
* - admin.
|
|
1100
1171
|
*
|
|
1101
|
-
* @summary Assign or move a user ID.
|
|
1102
1172
|
* @param assignUserId - The assignUserId object.
|
|
1103
|
-
* @param assignUserId.xAlgoliaUserID -
|
|
1173
|
+
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
1104
1174
|
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
1105
1175
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1106
1176
|
*/
|
|
@@ -1130,11 +1200,10 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1130
1200
|
return transporter.request(request, requestOptions);
|
|
1131
1201
|
},
|
|
1132
1202
|
/**
|
|
1133
|
-
*
|
|
1203
|
+
* 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.
|
|
1134
1204
|
*
|
|
1135
|
-
* @summary Batch write operations on one index.
|
|
1136
1205
|
* @param batch - The batch object.
|
|
1137
|
-
* @param batch.indexName -
|
|
1206
|
+
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
1138
1207
|
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
1139
1208
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1140
1209
|
*/
|
|
@@ -1161,11 +1230,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1161
1230
|
return transporter.request(request, requestOptions);
|
|
1162
1231
|
},
|
|
1163
1232
|
/**
|
|
1164
|
-
*
|
|
1233
|
+
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
1234
|
+
*
|
|
1235
|
+
* Required API Key ACLs:
|
|
1236
|
+
* - admin.
|
|
1165
1237
|
*
|
|
1166
|
-
* @summary Batch assign userIDs.
|
|
1167
1238
|
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
1168
|
-
* @param batchAssignUserIds.xAlgoliaUserID -
|
|
1239
|
+
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
1169
1240
|
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
1170
1241
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1171
1242
|
*/
|
|
@@ -1198,11 +1269,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1198
1269
|
return transporter.request(request, requestOptions);
|
|
1199
1270
|
},
|
|
1200
1271
|
/**
|
|
1201
|
-
*
|
|
1272
|
+
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
1273
|
+
*
|
|
1274
|
+
* Required API Key ACLs:
|
|
1275
|
+
* - editSettings.
|
|
1202
1276
|
*
|
|
1203
|
-
* @summary Batch dictionary entries.
|
|
1204
1277
|
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
1205
|
-
* @param batchDictionaryEntries.dictionaryName - Dictionary to search
|
|
1278
|
+
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
1206
1279
|
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
1207
1280
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1208
1281
|
*/
|
|
@@ -1229,11 +1302,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1229
1302
|
return transporter.request(request, requestOptions);
|
|
1230
1303
|
},
|
|
1231
1304
|
/**
|
|
1232
|
-
*
|
|
1305
|
+
* 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. - Deduplication (`distinct`) is turned off. - There\'s no ranking for: typo-tolerance, number of matched words, proximity, geo distance.
|
|
1306
|
+
*
|
|
1307
|
+
* Required API Key ACLs:
|
|
1308
|
+
* - browse.
|
|
1233
1309
|
*
|
|
1234
|
-
* @summary Get all records from an index.
|
|
1235
1310
|
* @param browse - The browse object.
|
|
1236
|
-
* @param browse.indexName -
|
|
1311
|
+
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
1237
1312
|
* @param browse.browseParams - The browseParams object.
|
|
1238
1313
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1239
1314
|
*/
|
|
@@ -1254,11 +1329,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1254
1329
|
return transporter.request(request, requestOptions);
|
|
1255
1330
|
},
|
|
1256
1331
|
/**
|
|
1257
|
-
*
|
|
1332
|
+
* Deletes only the records from an index while keeping settings, synonyms, and rules.
|
|
1333
|
+
*
|
|
1334
|
+
* Required API Key ACLs:
|
|
1335
|
+
* - deleteIndex.
|
|
1258
1336
|
*
|
|
1259
|
-
* @summary Delete all records from an index.
|
|
1260
1337
|
* @param clearObjects - The clearObjects object.
|
|
1261
|
-
* @param clearObjects.indexName -
|
|
1338
|
+
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
1262
1339
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1263
1340
|
*/
|
|
1264
1341
|
clearObjects({ indexName }, requestOptions) {
|
|
@@ -1277,12 +1354,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1277
1354
|
return transporter.request(request, requestOptions);
|
|
1278
1355
|
},
|
|
1279
1356
|
/**
|
|
1280
|
-
*
|
|
1357
|
+
* Deletes all rules from the index.
|
|
1358
|
+
*
|
|
1359
|
+
* Required API Key ACLs:
|
|
1360
|
+
* - editSettings.
|
|
1281
1361
|
*
|
|
1282
|
-
* @summary Delete all rules.
|
|
1283
1362
|
* @param clearRules - The clearRules object.
|
|
1284
|
-
* @param clearRules.indexName -
|
|
1285
|
-
* @param clearRules.forwardToReplicas -
|
|
1363
|
+
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
1364
|
+
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1286
1365
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1287
1366
|
*/
|
|
1288
1367
|
clearRules({ indexName, forwardToReplicas }, requestOptions) {
|
|
@@ -1304,12 +1383,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1304
1383
|
return transporter.request(request, requestOptions);
|
|
1305
1384
|
},
|
|
1306
1385
|
/**
|
|
1307
|
-
*
|
|
1386
|
+
* Deletes all synonyms from the index.
|
|
1387
|
+
*
|
|
1388
|
+
* Required API Key ACLs:
|
|
1389
|
+
* - editSettings.
|
|
1308
1390
|
*
|
|
1309
|
-
* @summary Delete all synonyms.
|
|
1310
1391
|
* @param clearSynonyms - The clearSynonyms object.
|
|
1311
|
-
* @param clearSynonyms.indexName -
|
|
1312
|
-
* @param clearSynonyms.forwardToReplicas -
|
|
1392
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
1393
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1313
1394
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1314
1395
|
*/
|
|
1315
1396
|
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
@@ -1333,7 +1414,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1333
1414
|
/**
|
|
1334
1415
|
* This method allow you to send requests to the Algolia REST API.
|
|
1335
1416
|
*
|
|
1336
|
-
* @summary Send requests to the Algolia REST API.
|
|
1337
1417
|
* @param customDelete - The customDelete object.
|
|
1338
1418
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1339
1419
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -1343,7 +1423,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1343
1423
|
if (!path) {
|
|
1344
1424
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
1345
1425
|
}
|
|
1346
|
-
const requestPath = '/
|
|
1426
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1347
1427
|
const headers = {};
|
|
1348
1428
|
const queryParameters = parameters ? parameters : {};
|
|
1349
1429
|
const request = {
|
|
@@ -1357,7 +1437,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1357
1437
|
/**
|
|
1358
1438
|
* This method allow you to send requests to the Algolia REST API.
|
|
1359
1439
|
*
|
|
1360
|
-
* @summary Send requests to the Algolia REST API.
|
|
1361
1440
|
* @param customGet - The customGet object.
|
|
1362
1441
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1363
1442
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -1367,7 +1446,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1367
1446
|
if (!path) {
|
|
1368
1447
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
1369
1448
|
}
|
|
1370
|
-
const requestPath = '/
|
|
1449
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1371
1450
|
const headers = {};
|
|
1372
1451
|
const queryParameters = parameters ? parameters : {};
|
|
1373
1452
|
const request = {
|
|
@@ -1381,7 +1460,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1381
1460
|
/**
|
|
1382
1461
|
* This method allow you to send requests to the Algolia REST API.
|
|
1383
1462
|
*
|
|
1384
|
-
* @summary Send requests to the Algolia REST API.
|
|
1385
1463
|
* @param customPost - The customPost object.
|
|
1386
1464
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1387
1465
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -1392,7 +1470,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1392
1470
|
if (!path) {
|
|
1393
1471
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
1394
1472
|
}
|
|
1395
|
-
const requestPath = '/
|
|
1473
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1396
1474
|
const headers = {};
|
|
1397
1475
|
const queryParameters = parameters ? parameters : {};
|
|
1398
1476
|
const request = {
|
|
@@ -1407,7 +1485,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1407
1485
|
/**
|
|
1408
1486
|
* This method allow you to send requests to the Algolia REST API.
|
|
1409
1487
|
*
|
|
1410
|
-
* @summary Send requests to the Algolia REST API.
|
|
1411
1488
|
* @param customPut - The customPut object.
|
|
1412
1489
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1413
1490
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -1418,7 +1495,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1418
1495
|
if (!path) {
|
|
1419
1496
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
1420
1497
|
}
|
|
1421
|
-
const requestPath = '/
|
|
1498
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1422
1499
|
const headers = {};
|
|
1423
1500
|
const queryParameters = parameters ? parameters : {};
|
|
1424
1501
|
const request = {
|
|
@@ -1431,9 +1508,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1431
1508
|
return transporter.request(request, requestOptions);
|
|
1432
1509
|
},
|
|
1433
1510
|
/**
|
|
1434
|
-
*
|
|
1511
|
+
* Deletes the API key.
|
|
1512
|
+
*
|
|
1513
|
+
* Required API Key ACLs:
|
|
1514
|
+
* - admin.
|
|
1435
1515
|
*
|
|
1436
|
-
* @summary Delete API key.
|
|
1437
1516
|
* @param deleteApiKey - The deleteApiKey object.
|
|
1438
1517
|
* @param deleteApiKey.key - API key.
|
|
1439
1518
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1454,11 +1533,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1454
1533
|
return transporter.request(request, requestOptions);
|
|
1455
1534
|
},
|
|
1456
1535
|
/**
|
|
1457
|
-
* This operation doesn\'t
|
|
1536
|
+
* 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).
|
|
1537
|
+
*
|
|
1538
|
+
* Required API Key ACLs:
|
|
1539
|
+
* - deleteIndex.
|
|
1458
1540
|
*
|
|
1459
|
-
* @summary Delete all records matching a query.
|
|
1460
1541
|
* @param deleteBy - The deleteBy object.
|
|
1461
|
-
* @param deleteBy.indexName -
|
|
1542
|
+
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
1462
1543
|
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
1463
1544
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1464
1545
|
*/
|
|
@@ -1482,11 +1563,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1482
1563
|
return transporter.request(request, requestOptions);
|
|
1483
1564
|
},
|
|
1484
1565
|
/**
|
|
1485
|
-
*
|
|
1566
|
+
* 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/).
|
|
1567
|
+
*
|
|
1568
|
+
* Required API Key ACLs:
|
|
1569
|
+
* - deleteIndex.
|
|
1486
1570
|
*
|
|
1487
|
-
* @summary Delete index.
|
|
1488
1571
|
* @param deleteIndex - The deleteIndex object.
|
|
1489
|
-
* @param deleteIndex.indexName -
|
|
1572
|
+
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
1490
1573
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1491
1574
|
*/
|
|
1492
1575
|
deleteIndex({ indexName }, requestOptions) {
|
|
@@ -1505,12 +1588,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1505
1588
|
return transporter.request(request, requestOptions);
|
|
1506
1589
|
},
|
|
1507
1590
|
/**
|
|
1508
|
-
* To delete
|
|
1591
|
+
* 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).
|
|
1592
|
+
*
|
|
1593
|
+
* Required API Key ACLs:
|
|
1594
|
+
* - deleteObject.
|
|
1509
1595
|
*
|
|
1510
|
-
* @summary Delete a record.
|
|
1511
1596
|
* @param deleteObject - The deleteObject object.
|
|
1512
|
-
* @param deleteObject.indexName -
|
|
1513
|
-
* @param deleteObject.objectID - Unique record
|
|
1597
|
+
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
1598
|
+
* @param deleteObject.objectID - Unique record identifier.
|
|
1514
1599
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1515
1600
|
*/
|
|
1516
1601
|
deleteObject({ indexName, objectID }, requestOptions) {
|
|
@@ -1534,13 +1619,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1534
1619
|
return transporter.request(request, requestOptions);
|
|
1535
1620
|
},
|
|
1536
1621
|
/**
|
|
1537
|
-
*
|
|
1622
|
+
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
1623
|
+
*
|
|
1624
|
+
* Required API Key ACLs:
|
|
1625
|
+
* - editSettings.
|
|
1538
1626
|
*
|
|
1539
|
-
* @summary Delete a rule.
|
|
1540
1627
|
* @param deleteRule - The deleteRule object.
|
|
1541
|
-
* @param deleteRule.indexName -
|
|
1628
|
+
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
1542
1629
|
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
1543
|
-
* @param deleteRule.forwardToReplicas -
|
|
1630
|
+
* @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1544
1631
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1545
1632
|
*/
|
|
1546
1633
|
deleteRule({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
@@ -1567,9 +1654,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1567
1654
|
return transporter.request(request, requestOptions);
|
|
1568
1655
|
},
|
|
1569
1656
|
/**
|
|
1570
|
-
*
|
|
1657
|
+
* Deletes a source from the list of allowed sources.
|
|
1658
|
+
*
|
|
1659
|
+
* Required API Key ACLs:
|
|
1660
|
+
* - admin.
|
|
1571
1661
|
*
|
|
1572
|
-
* @summary Remove a source.
|
|
1573
1662
|
* @param deleteSource - The deleteSource object.
|
|
1574
1663
|
* @param deleteSource.source - IP address range of the source.
|
|
1575
1664
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1590,13 +1679,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1590
1679
|
return transporter.request(request, requestOptions);
|
|
1591
1680
|
},
|
|
1592
1681
|
/**
|
|
1593
|
-
*
|
|
1682
|
+
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
1683
|
+
*
|
|
1684
|
+
* Required API Key ACLs:
|
|
1685
|
+
* - editSettings.
|
|
1594
1686
|
*
|
|
1595
|
-
* @summary Delete a synonym.
|
|
1596
1687
|
* @param deleteSynonym - The deleteSynonym object.
|
|
1597
|
-
* @param deleteSynonym.indexName -
|
|
1688
|
+
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
1598
1689
|
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
1599
|
-
* @param deleteSynonym.forwardToReplicas -
|
|
1690
|
+
* @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
1600
1691
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1601
1692
|
*/
|
|
1602
1693
|
deleteSynonym({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
@@ -1623,9 +1714,8 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1623
1714
|
return transporter.request(request, requestOptions);
|
|
1624
1715
|
},
|
|
1625
1716
|
/**
|
|
1626
|
-
*
|
|
1717
|
+
* 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.
|
|
1627
1718
|
*
|
|
1628
|
-
* @summary Get API key permissions.
|
|
1629
1719
|
* @param getApiKey - The getApiKey object.
|
|
1630
1720
|
* @param getApiKey.key - API key.
|
|
1631
1721
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -1646,9 +1736,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1646
1736
|
return transporter.request(request, requestOptions);
|
|
1647
1737
|
},
|
|
1648
1738
|
/**
|
|
1649
|
-
* Lists
|
|
1739
|
+
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
1740
|
+
*
|
|
1741
|
+
* Required API Key ACLs:
|
|
1742
|
+
* - settings.
|
|
1650
1743
|
*
|
|
1651
|
-
* @summary List available languages.
|
|
1652
1744
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1653
1745
|
*/
|
|
1654
1746
|
getDictionaryLanguages(requestOptions) {
|
|
@@ -1664,9 +1756,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1664
1756
|
return transporter.request(request, requestOptions);
|
|
1665
1757
|
},
|
|
1666
1758
|
/**
|
|
1667
|
-
*
|
|
1759
|
+
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
1760
|
+
*
|
|
1761
|
+
* Required API Key ACLs:
|
|
1762
|
+
* - settings.
|
|
1668
1763
|
*
|
|
1669
|
-
* @summary Get stop word settings.
|
|
1670
1764
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1671
1765
|
*/
|
|
1672
1766
|
getDictionarySettings(requestOptions) {
|
|
@@ -1682,14 +1776,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1682
1776
|
return transporter.request(request, requestOptions);
|
|
1683
1777
|
},
|
|
1684
1778
|
/**
|
|
1685
|
-
* 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.
|
|
1779
|
+
* 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.
|
|
1780
|
+
*
|
|
1781
|
+
* Required API Key ACLs:
|
|
1782
|
+
* - logs.
|
|
1686
1783
|
*
|
|
1687
|
-
* @summary Return the latest log entries.
|
|
1688
1784
|
* @param getLogs - The getLogs object.
|
|
1689
|
-
* @param getLogs.offset - First log entry to retrieve.
|
|
1785
|
+
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
1690
1786
|
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
1691
|
-
* @param getLogs.indexName - Index for which log entries
|
|
1692
|
-
* @param getLogs.type - Type of log entries to retrieve.
|
|
1787
|
+
* @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
|
|
1788
|
+
* @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
|
|
1693
1789
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1694
1790
|
*/
|
|
1695
1791
|
getLogs({ offset, length, indexName, type } = {}, requestOptions = undefined) {
|
|
@@ -1717,13 +1813,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1717
1813
|
return transporter.request(request, requestOptions);
|
|
1718
1814
|
},
|
|
1719
1815
|
/**
|
|
1720
|
-
* To
|
|
1816
|
+
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
|
1817
|
+
*
|
|
1818
|
+
* Required API Key ACLs:
|
|
1819
|
+
* - search.
|
|
1721
1820
|
*
|
|
1722
|
-
* @summary Get a record.
|
|
1723
1821
|
* @param getObject - The getObject object.
|
|
1724
|
-
* @param getObject.indexName -
|
|
1725
|
-
* @param getObject.objectID - Unique record
|
|
1726
|
-
* @param getObject.attributesToRetrieve - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned.
|
|
1822
|
+
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
1823
|
+
* @param getObject.objectID - Unique record identifier.
|
|
1824
|
+
* @param getObject.attributesToRetrieve - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won\'t be retrieved unless the request is authenticated with the admin API key.
|
|
1727
1825
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1728
1826
|
*/
|
|
1729
1827
|
getObject({ indexName, objectID, attributesToRetrieve }, requestOptions) {
|
|
@@ -1750,9 +1848,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1750
1848
|
return transporter.request(request, requestOptions);
|
|
1751
1849
|
},
|
|
1752
1850
|
/**
|
|
1753
|
-
*
|
|
1851
|
+
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
1852
|
+
*
|
|
1853
|
+
* Required API Key ACLs:
|
|
1854
|
+
* - search.
|
|
1754
1855
|
*
|
|
1755
|
-
* @summary Get multiple records.
|
|
1756
1856
|
* @param getObjectsParams - Request object.
|
|
1757
1857
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1758
1858
|
*/
|
|
@@ -1778,11 +1878,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1778
1878
|
return transporter.request(request, requestOptions);
|
|
1779
1879
|
},
|
|
1780
1880
|
/**
|
|
1781
|
-
*
|
|
1881
|
+
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
1882
|
+
*
|
|
1883
|
+
* Required API Key ACLs:
|
|
1884
|
+
* - settings.
|
|
1782
1885
|
*
|
|
1783
|
-
* @summary Get a rule.
|
|
1784
1886
|
* @param getRule - The getRule object.
|
|
1785
|
-
* @param getRule.indexName -
|
|
1887
|
+
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
1786
1888
|
* @param getRule.objectID - Unique identifier of a rule object.
|
|
1787
1889
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1788
1890
|
*/
|
|
@@ -1807,11 +1909,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1807
1909
|
return transporter.request(request, requestOptions);
|
|
1808
1910
|
},
|
|
1809
1911
|
/**
|
|
1810
|
-
*
|
|
1912
|
+
* Retrieves an object with non-null index settings.
|
|
1913
|
+
*
|
|
1914
|
+
* Required API Key ACLs:
|
|
1915
|
+
* - search.
|
|
1811
1916
|
*
|
|
1812
|
-
* @summary Get index settings.
|
|
1813
1917
|
* @param getSettings - The getSettings object.
|
|
1814
|
-
* @param getSettings.indexName -
|
|
1918
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
1815
1919
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1816
1920
|
*/
|
|
1817
1921
|
getSettings({ indexName }, requestOptions) {
|
|
@@ -1830,9 +1934,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1830
1934
|
return transporter.request(request, requestOptions);
|
|
1831
1935
|
},
|
|
1832
1936
|
/**
|
|
1833
|
-
*
|
|
1937
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
1938
|
+
*
|
|
1939
|
+
* Required API Key ACLs:
|
|
1940
|
+
* - admin.
|
|
1834
1941
|
*
|
|
1835
|
-
* @summary Get all allowed IP addresses.
|
|
1836
1942
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1837
1943
|
*/
|
|
1838
1944
|
getSources(requestOptions) {
|
|
@@ -1848,11 +1954,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1848
1954
|
return transporter.request(request, requestOptions);
|
|
1849
1955
|
},
|
|
1850
1956
|
/**
|
|
1851
|
-
*
|
|
1957
|
+
* Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
1958
|
+
*
|
|
1959
|
+
* Required API Key ACLs:
|
|
1960
|
+
* - settings.
|
|
1852
1961
|
*
|
|
1853
|
-
* @summary Get a synonym object.
|
|
1854
1962
|
* @param getSynonym - The getSynonym object.
|
|
1855
|
-
* @param getSynonym.indexName -
|
|
1963
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
1856
1964
|
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
1857
1965
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1858
1966
|
*/
|
|
@@ -1877,11 +1985,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1877
1985
|
return transporter.request(request, requestOptions);
|
|
1878
1986
|
},
|
|
1879
1987
|
/**
|
|
1880
|
-
*
|
|
1988
|
+
* 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.
|
|
1989
|
+
*
|
|
1990
|
+
* Required API Key ACLs:
|
|
1991
|
+
* - addObject.
|
|
1881
1992
|
*
|
|
1882
|
-
* @summary Check a task\'s status.
|
|
1883
1993
|
* @param getTask - The getTask object.
|
|
1884
|
-
* @param getTask.indexName -
|
|
1994
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
1885
1995
|
* @param getTask.taskID - Unique task identifier.
|
|
1886
1996
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1887
1997
|
*/
|
|
@@ -1906,9 +2016,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1906
2016
|
return transporter.request(request, requestOptions);
|
|
1907
2017
|
},
|
|
1908
2018
|
/**
|
|
1909
|
-
* Get the IDs of the 10 users with the highest number of records per cluster.
|
|
2019
|
+
* 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.
|
|
2020
|
+
*
|
|
2021
|
+
* Required API Key ACLs:
|
|
2022
|
+
* - admin.
|
|
1910
2023
|
*
|
|
1911
|
-
* @summary Get top userID.
|
|
1912
2024
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1913
2025
|
*/
|
|
1914
2026
|
getTopUserIds(requestOptions) {
|
|
@@ -1924,11 +2036,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1924
2036
|
return transporter.request(request, requestOptions);
|
|
1925
2037
|
},
|
|
1926
2038
|
/**
|
|
1927
|
-
* Returns the
|
|
2039
|
+
* 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.
|
|
2040
|
+
*
|
|
2041
|
+
* Required API Key ACLs:
|
|
2042
|
+
* - admin.
|
|
1928
2043
|
*
|
|
1929
|
-
* @summary Get userID.
|
|
1930
2044
|
* @param getUserId - The getUserId object.
|
|
1931
|
-
* @param getUserId.userID -
|
|
2045
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
1932
2046
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1933
2047
|
*/
|
|
1934
2048
|
getUserId({ userID }, requestOptions) {
|
|
@@ -1949,9 +2063,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1949
2063
|
/**
|
|
1950
2064
|
* 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.
|
|
1951
2065
|
*
|
|
1952
|
-
*
|
|
2066
|
+
* Required API Key ACLs:
|
|
2067
|
+
* - admin.
|
|
2068
|
+
*
|
|
1953
2069
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
1954
|
-
* @param hasPendingMappings.getClusters -
|
|
2070
|
+
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
1955
2071
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1956
2072
|
*/
|
|
1957
2073
|
hasPendingMappings({ getClusters } = {}, requestOptions = undefined) {
|
|
@@ -1970,9 +2086,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1970
2086
|
return transporter.request(request, requestOptions);
|
|
1971
2087
|
},
|
|
1972
2088
|
/**
|
|
1973
|
-
*
|
|
2089
|
+
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
2090
|
+
*
|
|
2091
|
+
* Required API Key ACLs:
|
|
2092
|
+
* - admin.
|
|
1974
2093
|
*
|
|
1975
|
-
* @summary List API keys.
|
|
1976
2094
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1977
2095
|
*/
|
|
1978
2096
|
listApiKeys(requestOptions) {
|
|
@@ -1988,9 +2106,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1988
2106
|
return transporter.request(request, requestOptions);
|
|
1989
2107
|
},
|
|
1990
2108
|
/**
|
|
1991
|
-
*
|
|
2109
|
+
* Lists the available clusters in a multi-cluster setup.
|
|
2110
|
+
*
|
|
2111
|
+
* Required API Key ACLs:
|
|
2112
|
+
* - admin.
|
|
1992
2113
|
*
|
|
1993
|
-
* @summary List clusters.
|
|
1994
2114
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1995
2115
|
*/
|
|
1996
2116
|
listClusters(requestOptions) {
|
|
@@ -2006,12 +2126,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2006
2126
|
return transporter.request(request, requestOptions);
|
|
2007
2127
|
},
|
|
2008
2128
|
/**
|
|
2009
|
-
*
|
|
2129
|
+
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
2130
|
+
*
|
|
2131
|
+
* Required API Key ACLs:
|
|
2132
|
+
* - listIndexes.
|
|
2010
2133
|
*
|
|
2011
|
-
* @summary List indices.
|
|
2012
2134
|
* @param listIndices - The listIndices object.
|
|
2013
|
-
* @param listIndices.page -
|
|
2014
|
-
* @param listIndices.hitsPerPage -
|
|
2135
|
+
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2136
|
+
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
2015
2137
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2016
2138
|
*/
|
|
2017
2139
|
listIndices({ page, hitsPerPage } = {}, requestOptions = undefined) {
|
|
@@ -2033,12 +2155,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2033
2155
|
return transporter.request(request, requestOptions);
|
|
2034
2156
|
},
|
|
2035
2157
|
/**
|
|
2036
|
-
*
|
|
2158
|
+
* 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.
|
|
2159
|
+
*
|
|
2160
|
+
* Required API Key ACLs:
|
|
2161
|
+
* - admin.
|
|
2037
2162
|
*
|
|
2038
|
-
* @summary List userIDs.
|
|
2039
2163
|
* @param listUserIds - The listUserIds object.
|
|
2040
|
-
* @param listUserIds.page -
|
|
2041
|
-
* @param listUserIds.hitsPerPage -
|
|
2164
|
+
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
2165
|
+
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
2042
2166
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2043
2167
|
*/
|
|
2044
2168
|
listUserIds({ page, hitsPerPage } = {}, requestOptions = undefined) {
|
|
@@ -2060,9 +2184,8 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2060
2184
|
return transporter.request(request, requestOptions);
|
|
2061
2185
|
},
|
|
2062
2186
|
/**
|
|
2063
|
-
*
|
|
2187
|
+
* 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.
|
|
2064
2188
|
*
|
|
2065
|
-
* @summary Batch write operations on multiple indices.
|
|
2066
2189
|
* @param batchParams - The batchParams object.
|
|
2067
2190
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2068
2191
|
*/
|
|
@@ -2086,11 +2209,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2086
2209
|
return transporter.request(request, requestOptions);
|
|
2087
2210
|
},
|
|
2088
2211
|
/**
|
|
2089
|
-
*
|
|
2212
|
+
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and 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 keep their 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/).
|
|
2213
|
+
*
|
|
2214
|
+
* Required API Key ACLs:
|
|
2215
|
+
* - addObject.
|
|
2090
2216
|
*
|
|
2091
|
-
* @summary Copy, move, or rename an index.
|
|
2092
2217
|
* @param operationIndex - The operationIndex object.
|
|
2093
|
-
* @param operationIndex.indexName -
|
|
2218
|
+
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
2094
2219
|
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
2095
2220
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2096
2221
|
*/
|
|
@@ -2120,14 +2245,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2120
2245
|
return transporter.request(request, requestOptions);
|
|
2121
2246
|
},
|
|
2122
2247
|
/**
|
|
2123
|
-
*
|
|
2248
|
+
* Adds new attributes to a record, or update 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.
|
|
2249
|
+
*
|
|
2250
|
+
* Required API Key ACLs:
|
|
2251
|
+
* - addObject.
|
|
2124
2252
|
*
|
|
2125
|
-
* @summary Update record attributes.
|
|
2126
2253
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2127
|
-
* @param partialUpdateObject.indexName -
|
|
2128
|
-
* @param partialUpdateObject.objectID - Unique record
|
|
2129
|
-
* @param partialUpdateObject.attributesToUpdate -
|
|
2130
|
-
* @param partialUpdateObject.createIfNotExists -
|
|
2254
|
+
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
2255
|
+
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
2256
|
+
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
2257
|
+
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
2131
2258
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2132
2259
|
*/
|
|
2133
2260
|
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }, requestOptions) {
|
|
@@ -2158,11 +2285,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2158
2285
|
return transporter.request(request, requestOptions);
|
|
2159
2286
|
},
|
|
2160
2287
|
/**
|
|
2161
|
-
*
|
|
2288
|
+
* Deletes a user ID and its associated data from the clusters.
|
|
2289
|
+
*
|
|
2290
|
+
* Required API Key ACLs:
|
|
2291
|
+
* - admin.
|
|
2162
2292
|
*
|
|
2163
|
-
* @summary Remove userID.
|
|
2164
2293
|
* @param removeUserId - The removeUserId object.
|
|
2165
|
-
* @param removeUserId.userID -
|
|
2294
|
+
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
2166
2295
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2167
2296
|
*/
|
|
2168
2297
|
removeUserId({ userID }, requestOptions) {
|
|
@@ -2181,9 +2310,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2181
2310
|
return transporter.request(request, requestOptions);
|
|
2182
2311
|
},
|
|
2183
2312
|
/**
|
|
2184
|
-
*
|
|
2313
|
+
* Replaces the list of allowed sources.
|
|
2314
|
+
*
|
|
2315
|
+
* Required API Key ACLs:
|
|
2316
|
+
* - admin.
|
|
2185
2317
|
*
|
|
2186
|
-
* @summary Replace all sources.
|
|
2187
2318
|
* @param replaceSources - The replaceSources object.
|
|
2188
2319
|
* @param replaceSources.source - Allowed sources.
|
|
2189
2320
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2205,9 +2336,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2205
2336
|
return transporter.request(request, requestOptions);
|
|
2206
2337
|
},
|
|
2207
2338
|
/**
|
|
2208
|
-
*
|
|
2339
|
+
* 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.
|
|
2340
|
+
*
|
|
2341
|
+
* Required API Key ACLs:
|
|
2342
|
+
* - admin.
|
|
2209
2343
|
*
|
|
2210
|
-
* @summary Restore API key.
|
|
2211
2344
|
* @param restoreApiKey - The restoreApiKey object.
|
|
2212
2345
|
* @param restoreApiKey.key - API key.
|
|
2213
2346
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2228,12 +2361,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2228
2361
|
return transporter.request(request, requestOptions);
|
|
2229
2362
|
},
|
|
2230
2363
|
/**
|
|
2231
|
-
*
|
|
2364
|
+
* 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/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
|
|
2365
|
+
*
|
|
2366
|
+
* Required API Key ACLs:
|
|
2367
|
+
* - addObject.
|
|
2232
2368
|
*
|
|
2233
|
-
* @summary Add or update a record.
|
|
2234
2369
|
* @param saveObject - The saveObject object.
|
|
2235
|
-
* @param saveObject.indexName -
|
|
2236
|
-
* @param saveObject.body - The
|
|
2370
|
+
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
2371
|
+
* @param saveObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
|
|
2237
2372
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2238
2373
|
*/
|
|
2239
2374
|
saveObject({ indexName, body }, requestOptions) {
|
|
@@ -2256,14 +2391,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2256
2391
|
return transporter.request(request, requestOptions);
|
|
2257
2392
|
},
|
|
2258
2393
|
/**
|
|
2259
|
-
* To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
|
|
2394
|
+
* 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).
|
|
2395
|
+
*
|
|
2396
|
+
* Required API Key ACLs:
|
|
2397
|
+
* - editSettings.
|
|
2260
2398
|
*
|
|
2261
|
-
* @summary Create or update a rule.
|
|
2262
2399
|
* @param saveRule - The saveRule object.
|
|
2263
|
-
* @param saveRule.indexName -
|
|
2400
|
+
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
2264
2401
|
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
2265
2402
|
* @param saveRule.rule - The rule object.
|
|
2266
|
-
* @param saveRule.forwardToReplicas -
|
|
2403
|
+
* @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2267
2404
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2268
2405
|
*/
|
|
2269
2406
|
saveRule({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
|
|
@@ -2297,14 +2434,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2297
2434
|
return transporter.request(request, requestOptions);
|
|
2298
2435
|
},
|
|
2299
2436
|
/**
|
|
2300
|
-
* Create or update multiple rules.
|
|
2437
|
+
* 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.
|
|
2438
|
+
*
|
|
2439
|
+
* Required API Key ACLs:
|
|
2440
|
+
* - editSettings.
|
|
2301
2441
|
*
|
|
2302
|
-
* @summary Save a batch of rules.
|
|
2303
2442
|
* @param saveRules - The saveRules object.
|
|
2304
|
-
* @param saveRules.indexName -
|
|
2443
|
+
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
2305
2444
|
* @param saveRules.rules - The rules object.
|
|
2306
|
-
* @param saveRules.forwardToReplicas -
|
|
2307
|
-
* @param saveRules.clearExistingRules -
|
|
2445
|
+
* @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2446
|
+
* @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
|
|
2308
2447
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2309
2448
|
*/
|
|
2310
2449
|
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }, requestOptions) {
|
|
@@ -2333,14 +2472,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2333
2472
|
return transporter.request(request, requestOptions);
|
|
2334
2473
|
},
|
|
2335
2474
|
/**
|
|
2336
|
-
*
|
|
2475
|
+
* 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).
|
|
2476
|
+
*
|
|
2477
|
+
* Required API Key ACLs:
|
|
2478
|
+
* - editSettings.
|
|
2337
2479
|
*
|
|
2338
|
-
* @summary Save a synonym.
|
|
2339
2480
|
* @param saveSynonym - The saveSynonym object.
|
|
2340
|
-
* @param saveSynonym.indexName -
|
|
2481
|
+
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
2341
2482
|
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
2342
2483
|
* @param saveSynonym.synonymHit - The synonymHit object.
|
|
2343
|
-
* @param saveSynonym.forwardToReplicas -
|
|
2484
|
+
* @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2344
2485
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2345
2486
|
*/
|
|
2346
2487
|
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
|
|
@@ -2377,14 +2518,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2377
2518
|
return transporter.request(request, requestOptions);
|
|
2378
2519
|
},
|
|
2379
2520
|
/**
|
|
2380
|
-
*
|
|
2521
|
+
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
|
|
2522
|
+
*
|
|
2523
|
+
* Required API Key ACLs:
|
|
2524
|
+
* - editSettings.
|
|
2381
2525
|
*
|
|
2382
|
-
* @summary Save a batch of synonyms.
|
|
2383
2526
|
* @param saveSynonyms - The saveSynonyms object.
|
|
2384
|
-
* @param saveSynonyms.indexName -
|
|
2527
|
+
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
2385
2528
|
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
2386
|
-
* @param saveSynonyms.forwardToReplicas -
|
|
2387
|
-
* @param saveSynonyms.replaceExistingSynonyms -
|
|
2529
|
+
* @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2530
|
+
* @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
|
|
2388
2531
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2389
2532
|
*/
|
|
2390
2533
|
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }, requestOptions) {
|
|
@@ -2414,10 +2557,12 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2414
2557
|
return transporter.request(request, requestOptions);
|
|
2415
2558
|
},
|
|
2416
2559
|
/**
|
|
2417
|
-
*
|
|
2560
|
+
* Sends multiple search request 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.
|
|
2418
2561
|
*
|
|
2419
|
-
*
|
|
2420
|
-
*
|
|
2562
|
+
* Required API Key ACLs:
|
|
2563
|
+
* - search.
|
|
2564
|
+
*
|
|
2565
|
+
* @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
|
|
2421
2566
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2422
2567
|
*/
|
|
2423
2568
|
search(searchMethodParams, requestOptions) {
|
|
@@ -2464,11 +2609,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2464
2609
|
return transporter.request(request, requestOptions);
|
|
2465
2610
|
},
|
|
2466
2611
|
/**
|
|
2467
|
-
*
|
|
2612
|
+
* Searches for standard and custom dictionary entries.
|
|
2613
|
+
*
|
|
2614
|
+
* Required API Key ACLs:
|
|
2615
|
+
* - settings.
|
|
2468
2616
|
*
|
|
2469
|
-
* @summary Search dictionary entries.
|
|
2470
2617
|
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
2471
|
-
* @param searchDictionaryEntries.dictionaryName - Dictionary to search
|
|
2618
|
+
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
2472
2619
|
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
2473
2620
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2474
2621
|
*/
|
|
@@ -2497,12 +2644,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2497
2644
|
return transporter.request(request, requestOptions);
|
|
2498
2645
|
},
|
|
2499
2646
|
/**
|
|
2500
|
-
*
|
|
2647
|
+
* 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**.
|
|
2648
|
+
*
|
|
2649
|
+
* Required API Key ACLs:
|
|
2650
|
+
* - search.
|
|
2501
2651
|
*
|
|
2502
|
-
* @summary Search for facet values.
|
|
2503
2652
|
* @param searchForFacetValues - The searchForFacetValues object.
|
|
2504
|
-
* @param searchForFacetValues.indexName -
|
|
2505
|
-
* @param searchForFacetValues.facetName - Facet
|
|
2653
|
+
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
2654
|
+
* @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.
|
|
2506
2655
|
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
|
|
2507
2656
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2508
2657
|
*/
|
|
@@ -2530,11 +2679,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2530
2679
|
return transporter.request(request, requestOptions);
|
|
2531
2680
|
},
|
|
2532
2681
|
/**
|
|
2533
|
-
*
|
|
2682
|
+
* Searches for rules in your index.
|
|
2683
|
+
*
|
|
2684
|
+
* Required API Key ACLs:
|
|
2685
|
+
* - settings.
|
|
2534
2686
|
*
|
|
2535
|
-
* @summary Search for rules.
|
|
2536
2687
|
* @param searchRules - The searchRules object.
|
|
2537
|
-
* @param searchRules.indexName -
|
|
2688
|
+
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
2538
2689
|
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
2539
2690
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2540
2691
|
*/
|
|
@@ -2557,11 +2708,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2557
2708
|
return transporter.request(request, requestOptions);
|
|
2558
2709
|
},
|
|
2559
2710
|
/**
|
|
2560
|
-
*
|
|
2711
|
+
* Searches a single index and return 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.
|
|
2712
|
+
*
|
|
2713
|
+
* Required API Key ACLs:
|
|
2714
|
+
* - search.
|
|
2561
2715
|
*
|
|
2562
|
-
* @summary Search an index.
|
|
2563
2716
|
* @param searchSingleIndex - The searchSingleIndex object.
|
|
2564
|
-
* @param searchSingleIndex.indexName -
|
|
2717
|
+
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
2565
2718
|
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
2566
2719
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2567
2720
|
*/
|
|
@@ -2584,11 +2737,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2584
2737
|
return transporter.request(request, requestOptions);
|
|
2585
2738
|
},
|
|
2586
2739
|
/**
|
|
2587
|
-
*
|
|
2740
|
+
* Searches for synonyms in your index.
|
|
2741
|
+
*
|
|
2742
|
+
* Required API Key ACLs:
|
|
2743
|
+
* - settings.
|
|
2588
2744
|
*
|
|
2589
|
-
* @summary Search for synonyms.
|
|
2590
2745
|
* @param searchSynonyms - The searchSynonyms object.
|
|
2591
|
-
* @param searchSynonyms.indexName -
|
|
2746
|
+
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
2592
2747
|
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
2593
2748
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2594
2749
|
*/
|
|
@@ -2611,9 +2766,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2611
2766
|
return transporter.request(request, requestOptions);
|
|
2612
2767
|
},
|
|
2613
2768
|
/**
|
|
2614
|
-
* Since it can take
|
|
2769
|
+
* 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).
|
|
2770
|
+
*
|
|
2771
|
+
* Required API Key ACLs:
|
|
2772
|
+
* - admin.
|
|
2615
2773
|
*
|
|
2616
|
-
* @summary Search for a user ID.
|
|
2617
2774
|
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
2618
2775
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2619
2776
|
*/
|
|
@@ -2639,9 +2796,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2639
2796
|
return transporter.request(request, requestOptions);
|
|
2640
2797
|
},
|
|
2641
2798
|
/**
|
|
2642
|
-
*
|
|
2799
|
+
* Turns standard stop word dictionary entries on or off for a given language.
|
|
2800
|
+
*
|
|
2801
|
+
* Required API Key ACLs:
|
|
2802
|
+
* - editSettings.
|
|
2643
2803
|
*
|
|
2644
|
-
* @summary Set stop word settings.
|
|
2645
2804
|
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
2646
2805
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2647
2806
|
*/
|
|
@@ -2665,13 +2824,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2665
2824
|
return transporter.request(request, requestOptions);
|
|
2666
2825
|
},
|
|
2667
2826
|
/**
|
|
2668
|
-
* Update the specified
|
|
2827
|
+
* 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.
|
|
2828
|
+
*
|
|
2829
|
+
* Required API Key ACLs:
|
|
2830
|
+
* - editSettings.
|
|
2669
2831
|
*
|
|
2670
|
-
* @summary Update index settings.
|
|
2671
2832
|
* @param setSettings - The setSettings object.
|
|
2672
|
-
* @param setSettings.indexName -
|
|
2833
|
+
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
2673
2834
|
* @param setSettings.indexSettings - The indexSettings object.
|
|
2674
|
-
* @param setSettings.forwardToReplicas -
|
|
2835
|
+
* @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2675
2836
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2676
2837
|
*/
|
|
2677
2838
|
setSettings({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
|
|
@@ -2697,9 +2858,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2697
2858
|
return transporter.request(request, requestOptions);
|
|
2698
2859
|
},
|
|
2699
2860
|
/**
|
|
2700
|
-
*
|
|
2861
|
+
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
2862
|
+
*
|
|
2863
|
+
* Required API Key ACLs:
|
|
2864
|
+
* - admin.
|
|
2701
2865
|
*
|
|
2702
|
-
* @summary Update an API key.
|
|
2703
2866
|
* @param updateApiKey - The updateApiKey object.
|
|
2704
2867
|
* @param updateApiKey.key - API key.
|
|
2705
2868
|
* @param updateApiKey.apiKey - The apiKey object.
|
|
@@ -2731,6 +2894,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2731
2894
|
}
|
|
2732
2895
|
|
|
2733
2896
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2897
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
2734
2898
|
function searchClient(appId, apiKey, options) {
|
|
2735
2899
|
if (!appId || typeof appId !== 'string') {
|
|
2736
2900
|
throw new Error('`appId` is missing.');
|