@algolia/client-search 5.0.0-alpha.99 → 5.0.0-beta.10
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/LICENSE +21 -0
- package/dist/builds/browser.d.ts +91 -3
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +109 -3
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-search.cjs +544 -219
- package/dist/client-search.esm.browser.js +494 -228
- package/dist/client-search.esm.node.js +545 -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 +23 -18
- 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 +8 -20
- 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/browsePagination.d.ts +19 -0
- package/dist/model/browsePagination.d.ts.map +1 -0
- package/dist/model/browseResponse.d.ts +2 -1
- package/dist/model/browseResponse.d.ts.map +1 -1
- package/dist/model/builtInOperation.d.ts +2 -2
- package/dist/model/builtInOperationType.d.ts +1 -1
- package/dist/model/clientMethodProps.d.ts +137 -70
- 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 +5 -1
- package/dist/model/fetchedIndex.d.ts.map +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 +8 -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 +13 -10
- 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/redirect.d.ts +1 -1
- package/dist/model/redirectURL.d.ts +7 -0
- package/dist/model/redirectURL.d.ts.map +1 -0
- 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 +3 -1
- package/dist/model/renderingContent.d.ts.map +1 -1
- package/dist/model/replaceAllObjectsResponse.d.ts +11 -0
- package/dist/model/replaceAllObjectsResponse.d.ts.map +1 -0
- 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/searchPagination.d.ts +19 -0
- package/dist/model/searchPagination.d.ts.map +1 -0
- 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/searchResponse.d.ts +2 -1
- package/dist/model/searchResponse.d.ts.map +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 +5 -1
- package/dist/model/value.d.ts.map +1 -1
- package/dist/src/searchClient.d.ts +385 -208
- 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 +25 -18
- package/model/baseSearchParamsWithoutQuery.ts +26 -30
- package/model/baseSearchResponse.ts +9 -24
- package/model/batchDictionaryEntriesParams.ts +3 -3
- package/model/batchResponse.ts +2 -2
- package/model/browsePagination.ts +23 -0
- package/model/browseResponse.ts +2 -0
- package/model/builtInOperation.ts +2 -2
- package/model/builtInOperationType.ts +1 -1
- package/model/clientMethodProps.ts +156 -70
- 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 +6 -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 +8 -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 +13 -10
- package/model/reRankingApplyFilter.ts +2 -4
- package/model/redirect.ts +1 -1
- package/model/redirectURL.ts +8 -0
- package/model/removeStopWords.ts +4 -2
- package/model/removeUserIdResponse.ts +1 -1
- package/model/removeWordsIfNoResults.ts +1 -1
- package/model/renderingContent.ts +4 -1
- package/model/replaceAllObjectsResponse.ts +15 -0
- 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/searchPagination.ts +23 -0
- package/model/searchParamsObject.ts +3 -0
- package/model/searchParamsQuery.ts +1 -1
- package/model/searchResponse.ts +3 -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 +6 -1
- package/package.json +11 -8
- package/dist/model/mixedSearchFilters.d.ts +0 -2
- package/dist/model/mixedSearchFilters.d.ts.map +0 -1
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import type { CreateIterablePromise } from '@algolia/client-common';
|
|
4
4
|
|
|
5
|
+
import type { Action } from './action';
|
|
5
6
|
import type { ApiKey } from './apiKey';
|
|
7
|
+
import type { ApiKeyOperation } from './apiKeyOperation';
|
|
6
8
|
import type { AssignUserIdParams } from './assignUserIdParams';
|
|
7
9
|
import type { AttributeToUpdate } from './attributeToUpdate';
|
|
8
10
|
import type { BatchAssignUserIdsParams } from './batchAssignUserIdsParams';
|
|
@@ -23,6 +25,7 @@ import type { SearchParams } from './searchParams';
|
|
|
23
25
|
import type { SearchParamsObject } from './searchParamsObject';
|
|
24
26
|
import type { SearchRulesParams } from './searchRulesParams';
|
|
25
27
|
import type { SearchSynonymsParams } from './searchSynonymsParams';
|
|
28
|
+
import type { SecuredApiKeyRestrictions } from './securedApiKeyRestrictions';
|
|
26
29
|
import type { Source } from './source';
|
|
27
30
|
import type { SynonymHit } from './synonymHit';
|
|
28
31
|
|
|
@@ -31,15 +34,15 @@ import type { SynonymHit } from './synonymHit';
|
|
|
31
34
|
*/
|
|
32
35
|
export type AddOrUpdateObjectProps = {
|
|
33
36
|
/**
|
|
34
|
-
*
|
|
37
|
+
* Name of the index on which to perform the operation.
|
|
35
38
|
*/
|
|
36
39
|
indexName: string;
|
|
37
40
|
/**
|
|
38
|
-
* Unique record
|
|
41
|
+
* Unique record identifier.
|
|
39
42
|
*/
|
|
40
43
|
objectID: string;
|
|
41
44
|
/**
|
|
42
|
-
*
|
|
45
|
+
* The record, a schemaless object with attributes that are useful in the context of search and discovery.
|
|
43
46
|
*/
|
|
44
47
|
body: Record<string, any>;
|
|
45
48
|
};
|
|
@@ -49,7 +52,7 @@ export type AddOrUpdateObjectProps = {
|
|
|
49
52
|
*/
|
|
50
53
|
export type AssignUserIdProps = {
|
|
51
54
|
/**
|
|
52
|
-
*
|
|
55
|
+
* Unique identifier of the user who makes the search request.
|
|
53
56
|
*/
|
|
54
57
|
xAlgoliaUserID: string;
|
|
55
58
|
assignUserIdParams: AssignUserIdParams;
|
|
@@ -60,7 +63,7 @@ export type AssignUserIdProps = {
|
|
|
60
63
|
*/
|
|
61
64
|
export type BatchProps = {
|
|
62
65
|
/**
|
|
63
|
-
*
|
|
66
|
+
* Name of the index on which to perform the operation.
|
|
64
67
|
*/
|
|
65
68
|
indexName: string;
|
|
66
69
|
batchWriteParams: BatchWriteParams;
|
|
@@ -71,7 +74,7 @@ export type BatchProps = {
|
|
|
71
74
|
*/
|
|
72
75
|
export type BatchAssignUserIdsProps = {
|
|
73
76
|
/**
|
|
74
|
-
*
|
|
77
|
+
* Unique identifier of the user who makes the search request.
|
|
75
78
|
*/
|
|
76
79
|
xAlgoliaUserID: string;
|
|
77
80
|
batchAssignUserIdsParams: BatchAssignUserIdsParams;
|
|
@@ -82,7 +85,7 @@ export type BatchAssignUserIdsProps = {
|
|
|
82
85
|
*/
|
|
83
86
|
export type BatchDictionaryEntriesProps = {
|
|
84
87
|
/**
|
|
85
|
-
* Dictionary to search
|
|
88
|
+
* Dictionary type in which to search.
|
|
86
89
|
*/
|
|
87
90
|
dictionaryName: DictionaryType;
|
|
88
91
|
batchDictionaryEntriesParams: BatchDictionaryEntriesParams;
|
|
@@ -93,7 +96,7 @@ export type BatchDictionaryEntriesProps = {
|
|
|
93
96
|
*/
|
|
94
97
|
export type BrowseProps = {
|
|
95
98
|
/**
|
|
96
|
-
*
|
|
99
|
+
* Name of the index on which to perform the operation.
|
|
97
100
|
*/
|
|
98
101
|
indexName: string;
|
|
99
102
|
browseParams?: BrowseParams;
|
|
@@ -104,7 +107,7 @@ export type BrowseProps = {
|
|
|
104
107
|
*/
|
|
105
108
|
export type ClearObjectsProps = {
|
|
106
109
|
/**
|
|
107
|
-
*
|
|
110
|
+
* Name of the index on which to perform the operation.
|
|
108
111
|
*/
|
|
109
112
|
indexName: string;
|
|
110
113
|
};
|
|
@@ -114,11 +117,11 @@ export type ClearObjectsProps = {
|
|
|
114
117
|
*/
|
|
115
118
|
export type ClearRulesProps = {
|
|
116
119
|
/**
|
|
117
|
-
*
|
|
120
|
+
* Name of the index on which to perform the operation.
|
|
118
121
|
*/
|
|
119
122
|
indexName: string;
|
|
120
123
|
/**
|
|
121
|
-
*
|
|
124
|
+
* Whether changes are applied to replica indices.
|
|
122
125
|
*/
|
|
123
126
|
forwardToReplicas?: boolean;
|
|
124
127
|
};
|
|
@@ -128,11 +131,11 @@ export type ClearRulesProps = {
|
|
|
128
131
|
*/
|
|
129
132
|
export type ClearSynonymsProps = {
|
|
130
133
|
/**
|
|
131
|
-
*
|
|
134
|
+
* Name of the index on which to perform the operation.
|
|
132
135
|
*/
|
|
133
136
|
indexName: string;
|
|
134
137
|
/**
|
|
135
|
-
*
|
|
138
|
+
* Whether changes are applied to replica indices.
|
|
136
139
|
*/
|
|
137
140
|
forwardToReplicas?: boolean;
|
|
138
141
|
};
|
|
@@ -216,7 +219,7 @@ export type DeleteApiKeyProps = {
|
|
|
216
219
|
*/
|
|
217
220
|
export type DeleteByProps = {
|
|
218
221
|
/**
|
|
219
|
-
*
|
|
222
|
+
* Name of the index on which to perform the operation.
|
|
220
223
|
*/
|
|
221
224
|
indexName: string;
|
|
222
225
|
deleteByParams: DeleteByParams;
|
|
@@ -227,7 +230,7 @@ export type DeleteByProps = {
|
|
|
227
230
|
*/
|
|
228
231
|
export type DeleteIndexProps = {
|
|
229
232
|
/**
|
|
230
|
-
*
|
|
233
|
+
* Name of the index on which to perform the operation.
|
|
231
234
|
*/
|
|
232
235
|
indexName: string;
|
|
233
236
|
};
|
|
@@ -237,11 +240,11 @@ export type DeleteIndexProps = {
|
|
|
237
240
|
*/
|
|
238
241
|
export type DeleteObjectProps = {
|
|
239
242
|
/**
|
|
240
|
-
*
|
|
243
|
+
* Name of the index on which to perform the operation.
|
|
241
244
|
*/
|
|
242
245
|
indexName: string;
|
|
243
246
|
/**
|
|
244
|
-
* Unique record
|
|
247
|
+
* Unique record identifier.
|
|
245
248
|
*/
|
|
246
249
|
objectID: string;
|
|
247
250
|
};
|
|
@@ -251,7 +254,7 @@ export type DeleteObjectProps = {
|
|
|
251
254
|
*/
|
|
252
255
|
export type DeleteRuleProps = {
|
|
253
256
|
/**
|
|
254
|
-
*
|
|
257
|
+
* Name of the index on which to perform the operation.
|
|
255
258
|
*/
|
|
256
259
|
indexName: string;
|
|
257
260
|
/**
|
|
@@ -259,7 +262,7 @@ export type DeleteRuleProps = {
|
|
|
259
262
|
*/
|
|
260
263
|
objectID: string;
|
|
261
264
|
/**
|
|
262
|
-
*
|
|
265
|
+
* Whether changes are applied to replica indices.
|
|
263
266
|
*/
|
|
264
267
|
forwardToReplicas?: boolean;
|
|
265
268
|
};
|
|
@@ -279,7 +282,7 @@ export type DeleteSourceProps = {
|
|
|
279
282
|
*/
|
|
280
283
|
export type DeleteSynonymProps = {
|
|
281
284
|
/**
|
|
282
|
-
*
|
|
285
|
+
* Name of the index on which to perform the operation.
|
|
283
286
|
*/
|
|
284
287
|
indexName: string;
|
|
285
288
|
/**
|
|
@@ -287,7 +290,7 @@ export type DeleteSynonymProps = {
|
|
|
287
290
|
*/
|
|
288
291
|
objectID: string;
|
|
289
292
|
/**
|
|
290
|
-
*
|
|
293
|
+
* Whether changes are applied to replica indices.
|
|
291
294
|
*/
|
|
292
295
|
forwardToReplicas?: boolean;
|
|
293
296
|
};
|
|
@@ -302,12 +305,22 @@ export type GetApiKeyProps = {
|
|
|
302
305
|
key: string;
|
|
303
306
|
};
|
|
304
307
|
|
|
308
|
+
/**
|
|
309
|
+
* Properties for the `getAppTask` method.
|
|
310
|
+
*/
|
|
311
|
+
export type GetAppTaskProps = {
|
|
312
|
+
/**
|
|
313
|
+
* Unique task identifier.
|
|
314
|
+
*/
|
|
315
|
+
taskID: number;
|
|
316
|
+
};
|
|
317
|
+
|
|
305
318
|
/**
|
|
306
319
|
* Properties for the `getLogs` method.
|
|
307
320
|
*/
|
|
308
321
|
export type GetLogsProps = {
|
|
309
322
|
/**
|
|
310
|
-
* First log entry to retrieve.
|
|
323
|
+
* First log entry to retrieve. The most recent entries are listed first.
|
|
311
324
|
*/
|
|
312
325
|
offset?: number;
|
|
313
326
|
/**
|
|
@@ -315,11 +328,11 @@ export type GetLogsProps = {
|
|
|
315
328
|
*/
|
|
316
329
|
length?: number;
|
|
317
330
|
/**
|
|
318
|
-
* Index for which log entries
|
|
331
|
+
* Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
|
|
319
332
|
*/
|
|
320
333
|
indexName?: string;
|
|
321
334
|
/**
|
|
322
|
-
* Type of log entries to retrieve.
|
|
335
|
+
* Type of log entries to retrieve. By default, all log entries are retrieved.
|
|
323
336
|
*/
|
|
324
337
|
type?: LogType;
|
|
325
338
|
};
|
|
@@ -329,15 +342,15 @@ export type GetLogsProps = {
|
|
|
329
342
|
*/
|
|
330
343
|
export type GetObjectProps = {
|
|
331
344
|
/**
|
|
332
|
-
*
|
|
345
|
+
* Name of the index on which to perform the operation.
|
|
333
346
|
*/
|
|
334
347
|
indexName: string;
|
|
335
348
|
/**
|
|
336
|
-
* Unique record
|
|
349
|
+
* Unique record identifier.
|
|
337
350
|
*/
|
|
338
351
|
objectID: string;
|
|
339
352
|
/**
|
|
340
|
-
* 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.
|
|
353
|
+
* 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.
|
|
341
354
|
*/
|
|
342
355
|
attributesToRetrieve?: string[];
|
|
343
356
|
};
|
|
@@ -347,7 +360,7 @@ export type GetObjectProps = {
|
|
|
347
360
|
*/
|
|
348
361
|
export type GetRuleProps = {
|
|
349
362
|
/**
|
|
350
|
-
*
|
|
363
|
+
* Name of the index on which to perform the operation.
|
|
351
364
|
*/
|
|
352
365
|
indexName: string;
|
|
353
366
|
/**
|
|
@@ -361,7 +374,7 @@ export type GetRuleProps = {
|
|
|
361
374
|
*/
|
|
362
375
|
export type GetSettingsProps = {
|
|
363
376
|
/**
|
|
364
|
-
*
|
|
377
|
+
* Name of the index on which to perform the operation.
|
|
365
378
|
*/
|
|
366
379
|
indexName: string;
|
|
367
380
|
};
|
|
@@ -371,7 +384,7 @@ export type GetSettingsProps = {
|
|
|
371
384
|
*/
|
|
372
385
|
export type GetSynonymProps = {
|
|
373
386
|
/**
|
|
374
|
-
*
|
|
387
|
+
* Name of the index on which to perform the operation.
|
|
375
388
|
*/
|
|
376
389
|
indexName: string;
|
|
377
390
|
/**
|
|
@@ -385,7 +398,7 @@ export type GetSynonymProps = {
|
|
|
385
398
|
*/
|
|
386
399
|
export type GetTaskProps = {
|
|
387
400
|
/**
|
|
388
|
-
*
|
|
401
|
+
* Name of the index on which to perform the operation.
|
|
389
402
|
*/
|
|
390
403
|
indexName: string;
|
|
391
404
|
/**
|
|
@@ -399,7 +412,7 @@ export type GetTaskProps = {
|
|
|
399
412
|
*/
|
|
400
413
|
export type GetUserIdProps = {
|
|
401
414
|
/**
|
|
402
|
-
*
|
|
415
|
+
* Unique identifier of the user who makes the search request.
|
|
403
416
|
*/
|
|
404
417
|
userID: string;
|
|
405
418
|
};
|
|
@@ -409,7 +422,7 @@ export type GetUserIdProps = {
|
|
|
409
422
|
*/
|
|
410
423
|
export type HasPendingMappingsProps = {
|
|
411
424
|
/**
|
|
412
|
-
*
|
|
425
|
+
* Whether to include the cluster\'s pending mapping state in the response.
|
|
413
426
|
*/
|
|
414
427
|
getClusters?: boolean;
|
|
415
428
|
};
|
|
@@ -419,11 +432,11 @@ export type HasPendingMappingsProps = {
|
|
|
419
432
|
*/
|
|
420
433
|
export type ListIndicesProps = {
|
|
421
434
|
/**
|
|
422
|
-
*
|
|
435
|
+
* Requested page of the API response. If `null`, the API response is not paginated.
|
|
423
436
|
*/
|
|
424
437
|
page?: number;
|
|
425
438
|
/**
|
|
426
|
-
*
|
|
439
|
+
* Number of hits per page.
|
|
427
440
|
*/
|
|
428
441
|
hitsPerPage?: number;
|
|
429
442
|
};
|
|
@@ -433,11 +446,11 @@ export type ListIndicesProps = {
|
|
|
433
446
|
*/
|
|
434
447
|
export type ListUserIdsProps = {
|
|
435
448
|
/**
|
|
436
|
-
*
|
|
449
|
+
* Requested page of the API response. If `null`, the API response is not paginated.
|
|
437
450
|
*/
|
|
438
451
|
page?: number;
|
|
439
452
|
/**
|
|
440
|
-
*
|
|
453
|
+
* Number of hits per page.
|
|
441
454
|
*/
|
|
442
455
|
hitsPerPage?: number;
|
|
443
456
|
};
|
|
@@ -447,7 +460,7 @@ export type ListUserIdsProps = {
|
|
|
447
460
|
*/
|
|
448
461
|
export type OperationIndexProps = {
|
|
449
462
|
/**
|
|
450
|
-
*
|
|
463
|
+
* Name of the index on which to perform the operation.
|
|
451
464
|
*/
|
|
452
465
|
indexName: string;
|
|
453
466
|
operationIndexParams: OperationIndexParams;
|
|
@@ -458,19 +471,19 @@ export type OperationIndexProps = {
|
|
|
458
471
|
*/
|
|
459
472
|
export type PartialUpdateObjectProps = {
|
|
460
473
|
/**
|
|
461
|
-
*
|
|
474
|
+
* Name of the index on which to perform the operation.
|
|
462
475
|
*/
|
|
463
476
|
indexName: string;
|
|
464
477
|
/**
|
|
465
|
-
* Unique record
|
|
478
|
+
* Unique record identifier.
|
|
466
479
|
*/
|
|
467
480
|
objectID: string;
|
|
468
481
|
/**
|
|
469
|
-
*
|
|
482
|
+
* Attributes with their values.
|
|
470
483
|
*/
|
|
471
484
|
attributesToUpdate: Record<string, AttributeToUpdate>;
|
|
472
485
|
/**
|
|
473
|
-
*
|
|
486
|
+
* Whether to create a new record if it doesn\'t exist.
|
|
474
487
|
*/
|
|
475
488
|
createIfNotExists?: boolean;
|
|
476
489
|
};
|
|
@@ -480,7 +493,7 @@ export type PartialUpdateObjectProps = {
|
|
|
480
493
|
*/
|
|
481
494
|
export type RemoveUserIdProps = {
|
|
482
495
|
/**
|
|
483
|
-
*
|
|
496
|
+
* Unique identifier of the user who makes the search request.
|
|
484
497
|
*/
|
|
485
498
|
userID: string;
|
|
486
499
|
};
|
|
@@ -510,11 +523,11 @@ export type RestoreApiKeyProps = {
|
|
|
510
523
|
*/
|
|
511
524
|
export type SaveObjectProps = {
|
|
512
525
|
/**
|
|
513
|
-
*
|
|
526
|
+
* Name of the index on which to perform the operation.
|
|
514
527
|
*/
|
|
515
528
|
indexName: string;
|
|
516
529
|
/**
|
|
517
|
-
* The
|
|
530
|
+
* The record, a schemaless object with attributes that are useful in the context of search and discovery.
|
|
518
531
|
*/
|
|
519
532
|
body: Record<string, any>;
|
|
520
533
|
};
|
|
@@ -524,7 +537,7 @@ export type SaveObjectProps = {
|
|
|
524
537
|
*/
|
|
525
538
|
export type SaveRuleProps = {
|
|
526
539
|
/**
|
|
527
|
-
*
|
|
540
|
+
* Name of the index on which to perform the operation.
|
|
528
541
|
*/
|
|
529
542
|
indexName: string;
|
|
530
543
|
/**
|
|
@@ -533,7 +546,7 @@ export type SaveRuleProps = {
|
|
|
533
546
|
objectID: string;
|
|
534
547
|
rule: Rule;
|
|
535
548
|
/**
|
|
536
|
-
*
|
|
549
|
+
* Whether changes are applied to replica indices.
|
|
537
550
|
*/
|
|
538
551
|
forwardToReplicas?: boolean;
|
|
539
552
|
};
|
|
@@ -543,16 +556,16 @@ export type SaveRuleProps = {
|
|
|
543
556
|
*/
|
|
544
557
|
export type SaveRulesProps = {
|
|
545
558
|
/**
|
|
546
|
-
*
|
|
559
|
+
* Name of the index on which to perform the operation.
|
|
547
560
|
*/
|
|
548
561
|
indexName: string;
|
|
549
562
|
rules: Rule[];
|
|
550
563
|
/**
|
|
551
|
-
*
|
|
564
|
+
* Whether changes are applied to replica indices.
|
|
552
565
|
*/
|
|
553
566
|
forwardToReplicas?: boolean;
|
|
554
567
|
/**
|
|
555
|
-
*
|
|
568
|
+
* Whether existing rules should be deleted before adding this batch.
|
|
556
569
|
*/
|
|
557
570
|
clearExistingRules?: boolean;
|
|
558
571
|
};
|
|
@@ -562,7 +575,7 @@ export type SaveRulesProps = {
|
|
|
562
575
|
*/
|
|
563
576
|
export type SaveSynonymProps = {
|
|
564
577
|
/**
|
|
565
|
-
*
|
|
578
|
+
* Name of the index on which to perform the operation.
|
|
566
579
|
*/
|
|
567
580
|
indexName: string;
|
|
568
581
|
/**
|
|
@@ -571,7 +584,7 @@ export type SaveSynonymProps = {
|
|
|
571
584
|
objectID: string;
|
|
572
585
|
synonymHit: SynonymHit;
|
|
573
586
|
/**
|
|
574
|
-
*
|
|
587
|
+
* Whether changes are applied to replica indices.
|
|
575
588
|
*/
|
|
576
589
|
forwardToReplicas?: boolean;
|
|
577
590
|
};
|
|
@@ -581,16 +594,16 @@ export type SaveSynonymProps = {
|
|
|
581
594
|
*/
|
|
582
595
|
export type SaveSynonymsProps = {
|
|
583
596
|
/**
|
|
584
|
-
*
|
|
597
|
+
* Name of the index on which to perform the operation.
|
|
585
598
|
*/
|
|
586
599
|
indexName: string;
|
|
587
600
|
synonymHit: SynonymHit[];
|
|
588
601
|
/**
|
|
589
|
-
*
|
|
602
|
+
* Whether changes are applied to replica indices.
|
|
590
603
|
*/
|
|
591
604
|
forwardToReplicas?: boolean;
|
|
592
605
|
/**
|
|
593
|
-
*
|
|
606
|
+
* Whether to replace all synonyms in the index with the ones sent with this request.
|
|
594
607
|
*/
|
|
595
608
|
replaceExistingSynonyms?: boolean;
|
|
596
609
|
};
|
|
@@ -632,7 +645,7 @@ export type LegacySearchMethodProps = LegacySearchQuery[];
|
|
|
632
645
|
*/
|
|
633
646
|
export type SearchDictionaryEntriesProps = {
|
|
634
647
|
/**
|
|
635
|
-
* Dictionary to search
|
|
648
|
+
* Dictionary type in which to search.
|
|
636
649
|
*/
|
|
637
650
|
dictionaryName: DictionaryType;
|
|
638
651
|
searchDictionaryEntriesParams: SearchDictionaryEntriesParams;
|
|
@@ -643,11 +656,11 @@ export type SearchDictionaryEntriesProps = {
|
|
|
643
656
|
*/
|
|
644
657
|
export type SearchForFacetValuesProps = {
|
|
645
658
|
/**
|
|
646
|
-
*
|
|
659
|
+
* Name of the index on which to perform the operation.
|
|
647
660
|
*/
|
|
648
661
|
indexName: string;
|
|
649
662
|
/**
|
|
650
|
-
* Facet
|
|
663
|
+
* Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
|
|
651
664
|
*/
|
|
652
665
|
facetName: string;
|
|
653
666
|
searchForFacetValuesRequest?: SearchForFacetValuesRequest;
|
|
@@ -658,7 +671,7 @@ export type SearchForFacetValuesProps = {
|
|
|
658
671
|
*/
|
|
659
672
|
export type SearchRulesProps = {
|
|
660
673
|
/**
|
|
661
|
-
*
|
|
674
|
+
* Name of the index on which to perform the operation.
|
|
662
675
|
*/
|
|
663
676
|
indexName: string;
|
|
664
677
|
searchRulesParams?: SearchRulesParams;
|
|
@@ -669,7 +682,7 @@ export type SearchRulesProps = {
|
|
|
669
682
|
*/
|
|
670
683
|
export type SearchSingleIndexProps = {
|
|
671
684
|
/**
|
|
672
|
-
*
|
|
685
|
+
* Name of the index on which to perform the operation.
|
|
673
686
|
*/
|
|
674
687
|
indexName: string;
|
|
675
688
|
searchParams?: SearchParams;
|
|
@@ -680,7 +693,7 @@ export type SearchSingleIndexProps = {
|
|
|
680
693
|
*/
|
|
681
694
|
export type SearchSynonymsProps = {
|
|
682
695
|
/**
|
|
683
|
-
*
|
|
696
|
+
* Name of the index on which to perform the operation.
|
|
684
697
|
*/
|
|
685
698
|
indexName: string;
|
|
686
699
|
/**
|
|
@@ -694,12 +707,12 @@ export type SearchSynonymsProps = {
|
|
|
694
707
|
*/
|
|
695
708
|
export type SetSettingsProps = {
|
|
696
709
|
/**
|
|
697
|
-
*
|
|
710
|
+
* Name of the index on which to perform the operation.
|
|
698
711
|
*/
|
|
699
712
|
indexName: string;
|
|
700
713
|
indexSettings: IndexSettings;
|
|
701
714
|
/**
|
|
702
|
-
*
|
|
715
|
+
* Whether changes are applied to replica indices.
|
|
703
716
|
*/
|
|
704
717
|
forwardToReplicas?: boolean;
|
|
705
718
|
};
|
|
@@ -735,17 +748,20 @@ type WaitForOptions = Partial<{
|
|
|
735
748
|
timeout: (retryCount: number) => number;
|
|
736
749
|
}>;
|
|
737
750
|
|
|
738
|
-
export type
|
|
739
|
-
/**
|
|
740
|
-
* The `indexName` where the operation was performed.
|
|
741
|
-
*/
|
|
742
|
-
indexName: string;
|
|
751
|
+
export type WaitForAppTaskOptions = WaitForOptions & {
|
|
743
752
|
/**
|
|
744
753
|
* The `taskID` returned by the method response.
|
|
745
754
|
*/
|
|
746
755
|
taskID: number;
|
|
747
756
|
};
|
|
748
757
|
|
|
758
|
+
export type WaitForTaskOptions = WaitForAppTaskOptions & {
|
|
759
|
+
/**
|
|
760
|
+
* The `indexName` where the operation was performed.
|
|
761
|
+
*/
|
|
762
|
+
indexName: string;
|
|
763
|
+
};
|
|
764
|
+
|
|
749
765
|
export type WaitForApiKeyOptions = WaitForOptions & {
|
|
750
766
|
/**
|
|
751
767
|
* The API Key.
|
|
@@ -756,17 +772,87 @@ export type WaitForApiKeyOptions = WaitForOptions & {
|
|
|
756
772
|
/**
|
|
757
773
|
* The operation that has been performed, used to compute the stop condition.
|
|
758
774
|
*/
|
|
759
|
-
operation: 'add' | 'delete'
|
|
775
|
+
operation: Extract<ApiKeyOperation, 'add' | 'delete'>;
|
|
760
776
|
apiKey?: never;
|
|
761
777
|
}
|
|
762
778
|
| {
|
|
763
779
|
/**
|
|
764
780
|
* The operation that has been performed, used to compute the stop condition.
|
|
765
781
|
*/
|
|
766
|
-
operation: 'update'
|
|
782
|
+
operation: Extract<ApiKeyOperation, 'update'>;
|
|
767
783
|
/**
|
|
768
784
|
* The updated fields, used to compute the stop condition.
|
|
769
785
|
*/
|
|
770
786
|
apiKey: Partial<ApiKey>;
|
|
771
787
|
}
|
|
772
788
|
);
|
|
789
|
+
|
|
790
|
+
export type GenerateSecuredApiKeyOptions = {
|
|
791
|
+
/**
|
|
792
|
+
* The base API key from which to generate the new secured one.
|
|
793
|
+
*/
|
|
794
|
+
parentApiKey: string;
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* A set of properties defining the restrictions of the secured API key.
|
|
798
|
+
*/
|
|
799
|
+
restrictions?: SecuredApiKeyRestrictions;
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
export type GetSecuredApiKeyRemainingValidityOptions = {
|
|
803
|
+
/**
|
|
804
|
+
* The secured API key generated with the `generateSecuredApiKey` method.
|
|
805
|
+
*/
|
|
806
|
+
securedApiKey: string;
|
|
807
|
+
};
|
|
808
|
+
|
|
809
|
+
export type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName'> & {
|
|
810
|
+
/**
|
|
811
|
+
* The objectIDs to delete.
|
|
812
|
+
*/
|
|
813
|
+
objectIDs: string[];
|
|
814
|
+
};
|
|
815
|
+
|
|
816
|
+
export type PartialUpdateObjectsOptions = Pick<
|
|
817
|
+
ChunkedBatchOptions,
|
|
818
|
+
'indexName' | 'objects'
|
|
819
|
+
> & {
|
|
820
|
+
/**
|
|
821
|
+
*To be provided if non-existing objects are passed, otherwise, the call will fail.
|
|
822
|
+
*/
|
|
823
|
+
createIfNotExists?: boolean;
|
|
824
|
+
};
|
|
825
|
+
|
|
826
|
+
export type SaveObjectsOptions = Pick<
|
|
827
|
+
ChunkedBatchOptions,
|
|
828
|
+
'indexName' | 'objects'
|
|
829
|
+
>;
|
|
830
|
+
|
|
831
|
+
export type ChunkedBatchOptions = ReplaceAllObjectsOptions & {
|
|
832
|
+
/**
|
|
833
|
+
* The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
|
|
834
|
+
*/
|
|
835
|
+
action?: Action;
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* 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.
|
|
839
|
+
*/
|
|
840
|
+
waitForTasks?: boolean;
|
|
841
|
+
};
|
|
842
|
+
|
|
843
|
+
export type ReplaceAllObjectsOptions = {
|
|
844
|
+
/**
|
|
845
|
+
* The `indexName` to replace `objects` in.
|
|
846
|
+
*/
|
|
847
|
+
indexName: string;
|
|
848
|
+
|
|
849
|
+
/**
|
|
850
|
+
* The array of `objects` to store in the given Algolia `indexName`.
|
|
851
|
+
*/
|
|
852
|
+
objects: Array<Record<string, any>>;
|
|
853
|
+
|
|
854
|
+
/**
|
|
855
|
+
* The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
856
|
+
*/
|
|
857
|
+
batchSize?: number;
|
|
858
|
+
};
|
package/model/condition.ts
CHANGED
|
@@ -4,19 +4,24 @@ import type { Anchoring } from './anchoring';
|
|
|
4
4
|
|
|
5
5
|
export type Condition = {
|
|
6
6
|
/**
|
|
7
|
-
* Query pattern
|
|
7
|
+
* Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\".
|
|
8
8
|
*/
|
|
9
9
|
pattern?: string;
|
|
10
10
|
|
|
11
11
|
anchoring?: Anchoring;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Whether the pattern
|
|
14
|
+
* Whether the pattern should match plurals, synonyms, and typos.
|
|
15
15
|
*/
|
|
16
16
|
alternatives?: boolean;
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters.
|
|
20
20
|
*/
|
|
21
21
|
context?: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter.
|
|
25
|
+
*/
|
|
26
|
+
filters?: string;
|
|
22
27
|
};
|
package/model/consequence.ts
CHANGED
|
@@ -5,28 +5,28 @@ import type { ConsequenceParams } from './consequenceParams';
|
|
|
5
5
|
import type { Promote } from './promote';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences)
|
|
8
|
+
* Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences).
|
|
9
9
|
*/
|
|
10
10
|
export type Consequence = {
|
|
11
11
|
params?: ConsequenceParams;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Records to promote.
|
|
14
|
+
* Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each.
|
|
15
15
|
*/
|
|
16
16
|
promote?: Promote[];
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won\'t be shown.
|
|
20
20
|
*/
|
|
21
21
|
filterPromotes?: boolean;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* Records
|
|
24
|
+
* Records you want to hide from the search results.
|
|
25
25
|
*/
|
|
26
26
|
hide?: ConsequenceHide[];
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* A JSON object with custom data that will be appended to the `userData` array in the response. This object isn\'t interpreted by the API and is limited to 1 kB of minified JSON.
|
|
30
30
|
*/
|
|
31
31
|
userData?: any | null;
|
|
32
32
|
};
|