@algolia/client-search 5.0.0-alpha.1 → 5.0.0-alpha.4
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 +2 -2
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +2 -2
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-search.cjs.js +144 -25
- package/dist/client-search.esm.browser.js +172 -53
- package/dist/client-search.esm.node.js +145 -26
- package/dist/client-search.umd.js +2 -2
- package/dist/model/acl.d.ts +3 -0
- package/dist/model/acl.d.ts.map +1 -1
- package/dist/model/addApiKeyResponse.d.ts +1 -1
- package/dist/model/addApiKeyResponse.d.ts.map +1 -1
- package/dist/model/apiKey.d.ts.map +1 -1
- package/dist/model/attributeToUpdate.d.ts +3 -0
- package/dist/model/attributeToUpdate.d.ts.map +1 -0
- package/dist/model/automaticFacetFilter.d.ts.map +1 -1
- package/dist/model/baseGetApiKeyResponse.d.ts +11 -0
- package/dist/model/baseGetApiKeyResponse.d.ts.map +1 -0
- package/dist/model/baseIndexSettings.d.ts.map +1 -1
- package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
- package/dist/model/baseSearchResponse.d.ts +2 -2
- package/dist/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/model/batchAssignUserIdsParams.d.ts.map +1 -1
- package/dist/model/batchDictionaryEntriesParams.d.ts.map +1 -1
- package/dist/model/batchDictionaryEntriesRequest.d.ts.map +1 -1
- package/dist/model/batchParams.d.ts +2 -2
- package/dist/model/batchParams.d.ts.map +1 -1
- package/dist/model/{batchOperation.d.ts → batchRequest.d.ts} +2 -2
- package/dist/model/batchRequest.d.ts.map +1 -0
- package/dist/model/batchResponse.d.ts.map +1 -1
- package/dist/model/batchWriteParams.d.ts +2 -2
- package/dist/model/batchWriteParams.d.ts.map +1 -1
- package/dist/model/browseRequest.d.ts.map +1 -1
- package/dist/model/browseResponse.d.ts +1 -1
- package/dist/model/browseResponse.d.ts.map +1 -1
- package/dist/model/builtInOperation.d.ts.map +1 -1
- package/dist/model/clientMethodProps.d.ts +21 -8
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/condition.d.ts.map +1 -1
- package/dist/model/consequence.d.ts.map +1 -1
- package/dist/model/consequenceQueryObject.d.ts.map +1 -1
- package/dist/model/deletedAtResponse.d.ts.map +1 -1
- package/dist/model/dictionaryEntry.d.ts.map +1 -1
- package/dist/model/distinct.d.ts +5 -0
- package/dist/model/distinct.d.ts.map +1 -0
- package/dist/model/edit.d.ts.map +1 -1
- package/dist/model/facetHits.d.ts.map +1 -1
- package/dist/model/facetOrdering.d.ts.map +1 -1
- package/dist/model/facetsStats.d.ts.map +1 -1
- package/dist/model/fetchedIndex.d.ts.map +1 -1
- package/dist/model/getApiKeyResponse.d.ts +4 -0
- package/dist/model/getApiKeyResponse.d.ts.map +1 -0
- package/dist/model/getObjectsParams.d.ts +2 -2
- package/dist/model/getObjectsParams.d.ts.map +1 -1
- package/dist/model/{multipleGetObjectsParams.d.ts → getObjectsRequest.d.ts} +2 -2
- package/dist/model/getObjectsRequest.d.ts.map +1 -0
- package/dist/model/getObjectsResponse.d.ts +2 -2
- package/dist/model/getObjectsResponse.d.ts.map +1 -1
- package/dist/model/hasPendingMappingsResponse.d.ts.map +1 -1
- package/dist/model/highlightResultOption.d.ts.map +1 -1
- package/dist/model/hit.d.ts +1 -1
- package/dist/model/hit.d.ts.map +1 -1
- package/dist/model/index.d.ts +7 -6
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/indexSettingsAsSearchParams.d.ts +2 -4
- package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/model/languages.d.ts.map +1 -1
- package/dist/model/listApiKeysResponse.d.ts +2 -2
- package/dist/model/listApiKeysResponse.d.ts.map +1 -1
- package/dist/model/listIndicesResponse.d.ts +1 -1
- package/dist/model/listIndicesResponse.d.ts.map +1 -1
- package/dist/model/log.d.ts.map +1 -1
- package/dist/model/logQuery.d.ts.map +1 -1
- package/dist/model/matchedGeoLocation.d.ts.map +1 -1
- package/dist/model/{multipleBatchOperation.d.ts → multipleBatchRequest.d.ts} +5 -5
- package/dist/model/multipleBatchRequest.d.ts.map +1 -0
- package/dist/model/multipleBatchResponse.d.ts +2 -2
- package/dist/model/multipleBatchResponse.d.ts.map +1 -1
- package/dist/model/operationIndexParams.d.ts.map +1 -1
- package/dist/model/params.d.ts.map +1 -1
- package/dist/model/personalization.d.ts.map +1 -1
- package/dist/model/promoteObjectID.d.ts.map +1 -1
- package/dist/model/promoteObjectIDs.d.ts.map +1 -1
- package/dist/model/rankingInfo.d.ts.map +1 -1
- package/dist/model/rule.d.ts.map +1 -1
- package/dist/model/saveObjectResponse.d.ts +2 -2
- package/dist/model/saveObjectResponse.d.ts.map +1 -1
- package/dist/model/saveSynonymResponse.d.ts.map +1 -1
- package/dist/model/searchDictionaryEntriesParams.d.ts.map +1 -1
- package/dist/model/searchForFacetValuesRequest.d.ts.map +1 -1
- package/dist/model/searchForFacetsOptions.d.ts.map +1 -1
- package/dist/model/searchForHitsOptions.d.ts.map +1 -1
- package/dist/model/searchHits.d.ts +2 -2
- package/dist/model/searchHits.d.ts.map +1 -1
- package/dist/model/searchMethodParams.d.ts.map +1 -1
- package/dist/model/searchResponse.d.ts +1 -1
- package/dist/model/searchResponse.d.ts.map +1 -1
- package/dist/model/searchResponses.d.ts +1 -1
- package/dist/model/searchResponses.d.ts.map +1 -1
- package/dist/model/searchRulesParams.d.ts.map +1 -1
- package/dist/model/searchRulesResponse.d.ts.map +1 -1
- package/dist/model/searchSynonymsResponse.d.ts.map +1 -1
- package/dist/model/searchUserIdsParams.d.ts.map +1 -1
- package/dist/model/searchUserIdsResponse.d.ts.map +1 -1
- package/dist/model/snippetResultOption.d.ts.map +1 -1
- package/dist/model/source.d.ts.map +1 -1
- package/dist/model/standardEntries.d.ts.map +1 -1
- package/dist/model/synonymHit.d.ts.map +1 -1
- package/dist/model/synonymHitHighlightResult.d.ts.map +1 -1
- package/dist/model/timeRange.d.ts.map +1 -1
- package/dist/model/updateApiKeyResponse.d.ts +1 -1
- package/dist/model/updateApiKeyResponse.d.ts.map +1 -1
- package/dist/model/updatedAtResponse.d.ts.map +1 -1
- package/dist/model/updatedAtWithObjectIdResponse.d.ts.map +1 -1
- package/dist/model/updatedRuleResponse.d.ts.map +1 -1
- package/dist/model/userHighlightResult.d.ts.map +1 -1
- package/dist/model/userHit.d.ts.map +1 -1
- package/dist/model/userId.d.ts.map +1 -1
- package/dist/model/value.d.ts.map +1 -1
- package/dist/src/searchClient.d.ts +65 -15
- package/dist/src/searchClient.d.ts.map +1 -1
- package/model/acl.ts +3 -0
- package/model/addApiKeyResponse.ts +2 -1
- package/model/apiKey.ts +7 -0
- package/model/{attributeOrBuiltInOperation.ts → attributeToUpdate.ts} +1 -1
- package/model/automaticFacetFilter.ts +2 -0
- package/model/baseGetApiKeyResponse.ts +13 -0
- package/model/baseIndexSettings.ts +13 -0
- package/model/baseSearchParamsWithoutQuery.ts +32 -0
- package/model/baseSearchResponse.ts +26 -2
- package/model/batchAssignUserIdsParams.ts +1 -0
- package/model/batchDictionaryEntriesParams.ts +1 -0
- package/model/batchDictionaryEntriesRequest.ts +1 -0
- package/model/batchParams.ts +2 -2
- package/model/{batchOperation.ts → batchRequest.ts} +2 -1
- package/model/batchResponse.ts +1 -0
- package/model/batchWriteParams.ts +2 -2
- package/model/browseRequest.ts +1 -0
- package/model/browseResponse.ts +1 -1
- package/model/builtInOperation.ts +1 -0
- package/model/clientMethodProps.ts +28 -12
- package/model/condition.ts +3 -0
- package/model/consequence.ts +4 -0
- package/model/consequenceQueryObject.ts +1 -0
- package/model/deletedAtResponse.ts +1 -0
- package/model/dictionaryEntry.ts +5 -0
- package/model/{createdAtObject.ts → distinct.ts} +4 -6
- package/model/edit.ts +2 -0
- package/model/facetHits.ts +2 -0
- package/model/facetOrdering.ts +1 -0
- package/model/facetsStats.ts +3 -0
- package/model/fetchedIndex.ts +10 -0
- package/model/{key.ts → getApiKeyResponse.ts} +2 -2
- package/model/getObjectsParams.ts +2 -2
- package/model/{multipleGetObjectsParams.ts → getObjectsRequest.ts} +3 -1
- package/model/getObjectsResponse.ts +2 -2
- package/model/hasPendingMappingsResponse.ts +1 -0
- package/model/highlightResultOption.ts +3 -0
- package/model/hit.ts +5 -1
- package/model/index.ts +7 -6
- package/model/indexSettingsAsSearchParams.ts +43 -4
- package/model/languages.ts +2 -0
- package/model/listApiKeysResponse.ts +2 -2
- package/model/listIndicesResponse.ts +2 -1
- package/model/log.ts +14 -0
- package/model/logQuery.ts +2 -0
- package/model/matchedGeoLocation.ts +2 -0
- package/model/{multipleBatchOperation.ts → multipleBatchRequest.ts} +6 -4
- package/model/multipleBatchResponse.ts +3 -2
- package/model/operationIndexParams.ts +2 -0
- package/model/params.ts +3 -0
- package/model/personalization.ts +2 -0
- package/model/promoteObjectID.ts +1 -0
- package/model/promoteObjectIDs.ts +1 -0
- package/model/rankingInfo.ts +12 -0
- package/model/rule.ts +5 -0
- package/model/saveObjectResponse.ts +4 -2
- package/model/saveSynonymResponse.ts +2 -0
- package/model/searchDictionaryEntriesParams.ts +3 -0
- package/model/searchForFacetValuesRequest.ts +2 -0
- package/model/searchForFacetsOptions.ts +4 -0
- package/model/searchForHitsOptions.ts +1 -0
- package/model/searchHits.ts +2 -2
- package/model/searchMethodParams.ts +1 -0
- package/model/searchResponse.ts +2 -1
- package/model/searchResponses.ts +1 -1
- package/model/searchRulesParams.ts +6 -0
- package/model/searchRulesResponse.ts +3 -0
- package/model/searchSynonymsResponse.ts +1 -0
- package/model/searchUserIdsParams.ts +3 -0
- package/model/searchUserIdsResponse.ts +4 -0
- package/model/snippetResultOption.ts +1 -0
- package/model/source.ts +1 -0
- package/model/standardEntries.ts +2 -0
- package/model/synonymHit.ts +8 -0
- package/model/synonymHitHighlightResult.ts +1 -0
- package/model/timeRange.ts +1 -0
- package/model/updateApiKeyResponse.ts +2 -1
- package/model/updatedAtResponse.ts +1 -0
- package/model/updatedAtWithObjectIdResponse.ts +2 -0
- package/model/updatedRuleResponse.ts +2 -0
- package/model/userHighlightResult.ts +1 -0
- package/model/userHit.ts +5 -0
- package/model/userId.ts +3 -0
- package/model/value.ts +1 -0
- package/package.json +5 -5
- package/dist/model/attributeOrBuiltInOperation.d.ts +0 -3
- package/dist/model/attributeOrBuiltInOperation.d.ts.map +0 -1
- package/dist/model/batchOperation.d.ts.map +0 -1
- package/dist/model/createdAtObject.d.ts +0 -7
- package/dist/model/createdAtObject.d.ts.map +0 -1
- package/dist/model/key.d.ts +0 -4
- package/dist/model/key.d.ts.map +0 -1
- package/dist/model/multipleBatchOperation.d.ts.map +0 -1
- package/dist/model/multipleGetObjectsParams.d.ts.map +0 -1
|
@@ -8,97 +8,121 @@ export type BaseSearchResponse = {
|
|
|
8
8
|
* If a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID.
|
|
9
9
|
*/
|
|
10
10
|
abTestID?: number;
|
|
11
|
+
|
|
11
12
|
/**
|
|
12
|
-
* If a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used.
|
|
13
|
+
* If a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used (starting at 1).
|
|
13
14
|
*/
|
|
14
15
|
abTestVariantID?: number;
|
|
16
|
+
|
|
15
17
|
/**
|
|
16
18
|
* The computed geo location.
|
|
17
19
|
*/
|
|
18
20
|
aroundLatLng?: string;
|
|
21
|
+
|
|
19
22
|
/**
|
|
20
23
|
* The automatically computed radius. For legacy reasons, this parameter is a string and not an integer.
|
|
21
24
|
*/
|
|
22
25
|
automaticRadius?: string;
|
|
26
|
+
|
|
23
27
|
/**
|
|
24
28
|
* Whether the facet count is exhaustive or approximate.
|
|
25
29
|
*/
|
|
26
30
|
exhaustiveFacetsCount?: boolean;
|
|
31
|
+
|
|
27
32
|
/**
|
|
28
33
|
* Indicate if the nbHits count was exhaustive or approximate.
|
|
29
34
|
*/
|
|
30
35
|
exhaustiveNbHits: boolean;
|
|
36
|
+
|
|
31
37
|
/**
|
|
32
38
|
* Indicate if the typo-tolerance search was exhaustive or approximate (only included when typo-tolerance is enabled).
|
|
33
39
|
*/
|
|
34
40
|
exhaustiveTypo: boolean;
|
|
41
|
+
|
|
35
42
|
/**
|
|
36
43
|
* A mapping of each facet name to the corresponding facet counts.
|
|
37
44
|
*/
|
|
38
|
-
facets?: Record<string, Record<string,
|
|
45
|
+
facets?: Record<string, Record<string, number>>;
|
|
46
|
+
|
|
39
47
|
/**
|
|
40
48
|
* Statistics for numerical facets.
|
|
41
49
|
*/
|
|
42
50
|
facets_stats?: Record<string, FacetsStats>;
|
|
51
|
+
|
|
43
52
|
/**
|
|
44
53
|
* Set the number of hits per page.
|
|
45
54
|
*/
|
|
46
55
|
hitsPerPage: number;
|
|
56
|
+
|
|
47
57
|
/**
|
|
48
58
|
* Index name used for the query.
|
|
49
59
|
*/
|
|
50
60
|
index?: string;
|
|
61
|
+
|
|
51
62
|
/**
|
|
52
63
|
* Index name used for the query. In the case of an A/B test, the targeted index isn\'t always the index used by the query.
|
|
53
64
|
*/
|
|
54
65
|
indexUsed?: string;
|
|
66
|
+
|
|
55
67
|
/**
|
|
56
68
|
* Used to return warnings about the query.
|
|
57
69
|
*/
|
|
58
70
|
message?: string;
|
|
71
|
+
|
|
59
72
|
/**
|
|
60
73
|
* Number of hits that the search query matched.
|
|
61
74
|
*/
|
|
62
75
|
nbHits: number;
|
|
76
|
+
|
|
63
77
|
/**
|
|
64
78
|
* Number of pages available for the current query.
|
|
65
79
|
*/
|
|
66
80
|
nbPages: number;
|
|
81
|
+
|
|
67
82
|
/**
|
|
68
83
|
* The number of hits selected and sorted by the relevant sort algorithm.
|
|
69
84
|
*/
|
|
70
85
|
nbSortedHits?: number;
|
|
86
|
+
|
|
71
87
|
/**
|
|
72
88
|
* Specify the page to retrieve.
|
|
73
89
|
*/
|
|
74
90
|
page: number;
|
|
91
|
+
|
|
75
92
|
/**
|
|
76
93
|
* A url-encoded string of all search parameters.
|
|
77
94
|
*/
|
|
78
95
|
params: string;
|
|
96
|
+
|
|
79
97
|
/**
|
|
80
98
|
* The query string that will be searched, after normalization.
|
|
81
99
|
*/
|
|
82
100
|
parsedQuery?: string;
|
|
101
|
+
|
|
83
102
|
/**
|
|
84
103
|
* Time the server took to process the request, in milliseconds.
|
|
85
104
|
*/
|
|
86
105
|
processingTimeMS: number;
|
|
106
|
+
|
|
87
107
|
/**
|
|
88
108
|
* The text to search in the index.
|
|
89
109
|
*/
|
|
90
110
|
query: string;
|
|
111
|
+
|
|
91
112
|
/**
|
|
92
113
|
* A markup text indicating which parts of the original query have been removed in order to retrieve a non-empty result set.
|
|
93
114
|
*/
|
|
94
115
|
queryAfterRemoval?: string;
|
|
116
|
+
|
|
95
117
|
/**
|
|
96
118
|
* Actual host name of the server that processed the request.
|
|
97
119
|
*/
|
|
98
120
|
serverUsed?: string;
|
|
121
|
+
|
|
99
122
|
/**
|
|
100
123
|
* Lets you store custom data in your indices.
|
|
101
124
|
*/
|
|
102
125
|
userData?: Record<string, any>;
|
|
126
|
+
|
|
103
127
|
renderingContent?: RenderingContent;
|
|
104
128
|
};
|
|
@@ -10,6 +10,7 @@ export type BatchDictionaryEntriesParams = {
|
|
|
10
10
|
* When `true`, start the batch by removing all the custom entries from the dictionary.
|
|
11
11
|
*/
|
|
12
12
|
clearExistingDictionaryEntries?: boolean;
|
|
13
|
+
|
|
13
14
|
/**
|
|
14
15
|
* List of operations to batch. Each operation is described by an `action` and a `body`.
|
|
15
16
|
*/
|
package/model/batchParams.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { MultipleBatchRequest } from './multipleBatchRequest';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The `multipleBatch` parameters.
|
|
7
7
|
*/
|
|
8
8
|
export type BatchParams = {
|
|
9
|
-
requests
|
|
9
|
+
requests: MultipleBatchRequest[];
|
|
10
10
|
};
|
package/model/batchResponse.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { BatchRequest } from './batchRequest';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The `batch` parameters.
|
|
7
7
|
*/
|
|
8
8
|
export type BatchWriteParams = {
|
|
9
|
-
requests?:
|
|
9
|
+
requests?: BatchRequest[];
|
|
10
10
|
};
|
package/model/browseRequest.ts
CHANGED
package/model/browseResponse.ts
CHANGED
|
@@ -4,6 +4,6 @@ import type { BaseBrowseResponse } from './baseBrowseResponse';
|
|
|
4
4
|
import type { BaseSearchResponse } from './baseSearchResponse';
|
|
5
5
|
import type { SearchHits } from './searchHits';
|
|
6
6
|
|
|
7
|
-
export type BrowseResponse<T
|
|
7
|
+
export type BrowseResponse<T = Record<string, any>> = BaseBrowseResponse &
|
|
8
8
|
BaseSearchResponse &
|
|
9
9
|
SearchHits<T>;
|
|
@@ -7,6 +7,7 @@ import type { BuiltInOperationType } from './builtInOperationType';
|
|
|
7
7
|
*/
|
|
8
8
|
export type BuiltInOperation = {
|
|
9
9
|
_operation: BuiltInOperationType;
|
|
10
|
+
|
|
10
11
|
/**
|
|
11
12
|
* The right-hand side argument to the operation, for example, increment or decrement step, value to add or remove.
|
|
12
13
|
*/
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { CreateIterablePromise } from '@algolia/client-common';
|
|
4
4
|
|
|
5
5
|
import type { ApiKey } from './apiKey';
|
|
6
6
|
import type { AssignUserIdParams } from './assignUserIdParams';
|
|
7
|
-
import type {
|
|
7
|
+
import type { AttributeToUpdate } from './attributeToUpdate';
|
|
8
8
|
import type { BatchAssignUserIdsParams } from './batchAssignUserIdsParams';
|
|
9
9
|
import type { BatchDictionaryEntriesParams } from './batchDictionaryEntriesParams';
|
|
10
10
|
import type { BatchWriteParams } from './batchWriteParams';
|
|
11
11
|
import type { BrowseRequest } from './browseRequest';
|
|
12
12
|
import type { DictionaryType } from './dictionaryType';
|
|
13
|
+
import type { GetApiKeyResponse } from './getApiKeyResponse';
|
|
13
14
|
import type { GetTaskResponse } from './getTaskResponse';
|
|
14
15
|
import type { IndexSettings } from './indexSettings';
|
|
15
|
-
import type { Key } from './key';
|
|
16
16
|
import type { LogType } from './logType';
|
|
17
17
|
import type { OperationIndexParams } from './operationIndexParams';
|
|
18
18
|
import type { Rule } from './rule';
|
|
@@ -430,9 +430,7 @@ export type PartialUpdateObjectProps = {
|
|
|
430
430
|
/**
|
|
431
431
|
* List of attributes to update.
|
|
432
432
|
*/
|
|
433
|
-
|
|
434
|
-
Record<string, AttributeOrBuiltInOperation>
|
|
435
|
-
>;
|
|
433
|
+
attributeToUpdate: Array<Record<string, AttributeToUpdate>>;
|
|
436
434
|
/**
|
|
437
435
|
* Creates the record if it does not exist yet.
|
|
438
436
|
*/
|
|
@@ -661,7 +659,7 @@ export type SearchRulesProps = {
|
|
|
661
659
|
* The index in which to perform the request.
|
|
662
660
|
*/
|
|
663
661
|
indexName: string;
|
|
664
|
-
searchRulesParams
|
|
662
|
+
searchRulesParams?: SearchRulesParams;
|
|
665
663
|
};
|
|
666
664
|
|
|
667
665
|
/**
|
|
@@ -672,7 +670,7 @@ export type SearchSingleIndexProps = {
|
|
|
672
670
|
* The index in which to perform the request.
|
|
673
671
|
*/
|
|
674
672
|
indexName: string;
|
|
675
|
-
searchParams
|
|
673
|
+
searchParams?: SearchParams;
|
|
676
674
|
};
|
|
677
675
|
|
|
678
676
|
/**
|
|
@@ -727,10 +725,28 @@ export type UpdateApiKeyProps = {
|
|
|
727
725
|
apiKey: ApiKey;
|
|
728
726
|
};
|
|
729
727
|
|
|
728
|
+
/**
|
|
729
|
+
* The `browseObjects`, `browseRules`, `browseSynonyms` options.
|
|
730
|
+
*/
|
|
731
|
+
export type BrowseOptions<T> = Partial<
|
|
732
|
+
Pick<CreateIterablePromise<T>, 'validate'>
|
|
733
|
+
> &
|
|
734
|
+
Required<Pick<CreateIterablePromise<T>, 'aggregator'>>;
|
|
735
|
+
|
|
730
736
|
type WaitForOptions<T> = Omit<
|
|
731
|
-
|
|
732
|
-
'func' | 'validate'
|
|
733
|
-
|
|
737
|
+
CreateIterablePromise<T>,
|
|
738
|
+
'func' | 'timeout' | 'validate'
|
|
739
|
+
> & {
|
|
740
|
+
/**
|
|
741
|
+
* The maximum number of retries. 50 by default.
|
|
742
|
+
*/
|
|
743
|
+
maxRetries: number;
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* The function to decide how long to wait between retries.
|
|
747
|
+
*/
|
|
748
|
+
timeout: (retryCount: number) => number;
|
|
749
|
+
};
|
|
734
750
|
|
|
735
751
|
export type WaitForTaskOptions = WaitForOptions<GetTaskResponse> & {
|
|
736
752
|
/**
|
|
@@ -743,7 +759,7 @@ export type WaitForTaskOptions = WaitForOptions<GetTaskResponse> & {
|
|
|
743
759
|
taskID: number;
|
|
744
760
|
};
|
|
745
761
|
|
|
746
|
-
export type WaitForApiKeyOptions = WaitForOptions<
|
|
762
|
+
export type WaitForApiKeyOptions = WaitForOptions<GetApiKeyResponse> & {
|
|
747
763
|
/**
|
|
748
764
|
* The API Key.
|
|
749
765
|
*/
|
package/model/condition.ts
CHANGED
|
@@ -7,11 +7,14 @@ export type Condition = {
|
|
|
7
7
|
* Query pattern syntax.
|
|
8
8
|
*/
|
|
9
9
|
pattern?: string;
|
|
10
|
+
|
|
10
11
|
anchoring?: Anchoring;
|
|
12
|
+
|
|
11
13
|
/**
|
|
12
14
|
* Whether the pattern matches on plurals, synonyms, and typos.
|
|
13
15
|
*/
|
|
14
16
|
alternatives?: boolean;
|
|
17
|
+
|
|
15
18
|
/**
|
|
16
19
|
* Rule context format: [A-Za-z0-9_-]+).
|
|
17
20
|
*/
|
package/model/consequence.ts
CHANGED
|
@@ -9,18 +9,22 @@ import type { Promote } from './promote';
|
|
|
9
9
|
*/
|
|
10
10
|
export type Consequence = {
|
|
11
11
|
params?: ConsequenceParams;
|
|
12
|
+
|
|
12
13
|
/**
|
|
13
14
|
* Objects to promote as hits.
|
|
14
15
|
*/
|
|
15
16
|
promote?: Promote[];
|
|
17
|
+
|
|
16
18
|
/**
|
|
17
19
|
* Only use in combination with the promote consequence. When true, promoted results will be restricted to match the filters of the current search. When false, the promoted results will show up regardless of the filters.
|
|
18
20
|
*/
|
|
19
21
|
filterPromotes?: boolean;
|
|
22
|
+
|
|
20
23
|
/**
|
|
21
24
|
* Objects to hide from hits. Each object must contain an objectID field. By default, you can hide up to 50 items per rule.
|
|
22
25
|
*/
|
|
23
26
|
hide?: ConsequenceHide[];
|
|
27
|
+
|
|
24
28
|
/**
|
|
25
29
|
* Custom JSON object that will be appended to the userData array in the response. This object isn\'t interpreted by the API. It\'s limited to 1kB of minified JSON.
|
|
26
30
|
*/
|
package/model/dictionaryEntry.ts
CHANGED
|
@@ -10,21 +10,26 @@ export type DictionaryEntry = Record<string, any> & {
|
|
|
10
10
|
* Unique identifier of the object.
|
|
11
11
|
*/
|
|
12
12
|
objectID: string;
|
|
13
|
+
|
|
13
14
|
/**
|
|
14
15
|
* Language ISO code supported by the dictionary (e.g., \"en\" for English).
|
|
15
16
|
*/
|
|
16
17
|
language: string;
|
|
18
|
+
|
|
17
19
|
/**
|
|
18
20
|
* The word of the dictionary entry.
|
|
19
21
|
*/
|
|
20
22
|
word?: string;
|
|
23
|
+
|
|
21
24
|
/**
|
|
22
25
|
* The words of the dictionary entry.
|
|
23
26
|
*/
|
|
24
27
|
words?: string[];
|
|
28
|
+
|
|
25
29
|
/**
|
|
26
30
|
* A decomposition of the word of the dictionary entry.
|
|
27
31
|
*/
|
|
28
32
|
decomposition?: string[];
|
|
33
|
+
|
|
29
34
|
state?: DictionaryEntryState;
|
|
30
35
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
createdAt: string;
|
|
8
|
-
};
|
|
3
|
+
/**
|
|
4
|
+
* Enables de-duplication or grouping of results.
|
|
5
|
+
*/
|
|
6
|
+
export type Distinct = boolean | number;
|
package/model/edit.ts
CHANGED
|
@@ -4,10 +4,12 @@ import type { EditType } from './editType';
|
|
|
4
4
|
|
|
5
5
|
export type Edit = {
|
|
6
6
|
type?: EditType;
|
|
7
|
+
|
|
7
8
|
/**
|
|
8
9
|
* Text or patterns to remove from the query string.
|
|
9
10
|
*/
|
|
10
11
|
delete?: string;
|
|
12
|
+
|
|
11
13
|
/**
|
|
12
14
|
* Text that should be inserted in place of the removed text inside the query string.
|
|
13
15
|
*/
|
package/model/facetHits.ts
CHANGED
|
@@ -5,10 +5,12 @@ export type FacetHits = {
|
|
|
5
5
|
* Raw value of the facet.
|
|
6
6
|
*/
|
|
7
7
|
value: string;
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* Markup text with occurrences highlighted.
|
|
10
11
|
*/
|
|
11
12
|
highlighted: string;
|
|
13
|
+
|
|
12
14
|
/**
|
|
13
15
|
* How many objects contain this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the counts may not be exhaustive.
|
|
14
16
|
*/
|
package/model/facetOrdering.ts
CHANGED
package/model/facetsStats.ts
CHANGED
|
@@ -5,14 +5,17 @@ export type FacetsStats = {
|
|
|
5
5
|
* The minimum value in the result set.
|
|
6
6
|
*/
|
|
7
7
|
min?: number;
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* The maximum value in the result set.
|
|
10
11
|
*/
|
|
11
12
|
max?: number;
|
|
13
|
+
|
|
12
14
|
/**
|
|
13
15
|
* The average facet value in the result set.
|
|
14
16
|
*/
|
|
15
17
|
avg?: number;
|
|
18
|
+
|
|
16
19
|
/**
|
|
17
20
|
* The sum of all values in the result set.
|
|
18
21
|
*/
|
package/model/fetchedIndex.ts
CHANGED
|
@@ -5,42 +5,52 @@ export type FetchedIndex = {
|
|
|
5
5
|
* Index name.
|
|
6
6
|
*/
|
|
7
7
|
name: string;
|
|
8
|
+
|
|
8
9
|
/**
|
|
9
10
|
* Index creation date. An empty string means that the index has no records.
|
|
10
11
|
*/
|
|
11
12
|
createdAt: string;
|
|
13
|
+
|
|
12
14
|
/**
|
|
13
15
|
* Date of last update (ISO-8601 format).
|
|
14
16
|
*/
|
|
15
17
|
updatedAt: string;
|
|
18
|
+
|
|
16
19
|
/**
|
|
17
20
|
* Number of records contained in the index.
|
|
18
21
|
*/
|
|
19
22
|
entries: number;
|
|
23
|
+
|
|
20
24
|
/**
|
|
21
25
|
* Number of bytes of the index in minified format.
|
|
22
26
|
*/
|
|
23
27
|
dataSize: number;
|
|
28
|
+
|
|
24
29
|
/**
|
|
25
30
|
* Number of bytes of the index binary file.
|
|
26
31
|
*/
|
|
27
32
|
fileSize: number;
|
|
33
|
+
|
|
28
34
|
/**
|
|
29
35
|
* Last build time.
|
|
30
36
|
*/
|
|
31
37
|
lastBuildTimeS: number;
|
|
38
|
+
|
|
32
39
|
/**
|
|
33
40
|
* Number of pending indexing operations. This value is deprecated and should not be used.
|
|
34
41
|
*/
|
|
35
42
|
numberOfPendingTask?: number;
|
|
43
|
+
|
|
36
44
|
/**
|
|
37
45
|
* A boolean which says whether the index has pending tasks. This value is deprecated and should not be used.
|
|
38
46
|
*/
|
|
39
47
|
pendingTask: boolean;
|
|
48
|
+
|
|
40
49
|
/**
|
|
41
50
|
* Only present if the index is a replica. Contains the name of the related primary index.
|
|
42
51
|
*/
|
|
43
52
|
primary?: string;
|
|
53
|
+
|
|
44
54
|
/**
|
|
45
55
|
* Only present if the index is a primary index with replicas. Contains the names of all linked replicas.
|
|
46
56
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
2
|
|
|
3
3
|
import type { ApiKey } from './apiKey';
|
|
4
|
-
import type {
|
|
4
|
+
import type { BaseGetApiKeyResponse } from './baseGetApiKeyResponse';
|
|
5
5
|
|
|
6
|
-
export type
|
|
6
|
+
export type GetApiKeyResponse = ApiKey & BaseGetApiKeyResponse;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { GetObjectsRequest } from './getObjectsRequest';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* The `getObjects` parameters.
|
|
7
7
|
*/
|
|
8
8
|
export type GetObjectsParams = {
|
|
9
|
-
requests
|
|
9
|
+
requests: GetObjectsRequest[];
|
|
10
10
|
};
|
|
@@ -3,15 +3,17 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* GetObjects operation on an index.
|
|
5
5
|
*/
|
|
6
|
-
export type
|
|
6
|
+
export type GetObjectsRequest = {
|
|
7
7
|
/**
|
|
8
8
|
* List of attributes to retrieve. By default, all retrievable attributes are returned.
|
|
9
9
|
*/
|
|
10
10
|
attributesToRetrieve?: string[];
|
|
11
|
+
|
|
11
12
|
/**
|
|
12
13
|
* ID of the object within that index.
|
|
13
14
|
*/
|
|
14
15
|
objectID: string;
|
|
16
|
+
|
|
15
17
|
/**
|
|
16
18
|
* Name of the index containing the object.
|
|
17
19
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
2
|
|
|
3
|
-
export type GetObjectsResponse = {
|
|
3
|
+
export type GetObjectsResponse<T = Record<string, any>> = {
|
|
4
4
|
/**
|
|
5
5
|
* List of results fetched.
|
|
6
6
|
*/
|
|
7
|
-
results
|
|
7
|
+
results: T[];
|
|
8
8
|
};
|
|
@@ -10,11 +10,14 @@ export type HighlightResultOption = {
|
|
|
10
10
|
* Markup text with occurrences highlighted.
|
|
11
11
|
*/
|
|
12
12
|
value: string;
|
|
13
|
+
|
|
13
14
|
matchLevel: MatchLevel;
|
|
15
|
+
|
|
14
16
|
/**
|
|
15
17
|
* List of words from the query that matched the object.
|
|
16
18
|
*/
|
|
17
19
|
matchedWords: string[];
|
|
20
|
+
|
|
18
21
|
/**
|
|
19
22
|
* Whether the entire attribute value is highlighted.
|
|
20
23
|
*/
|
package/model/hit.ts
CHANGED
|
@@ -7,19 +7,23 @@ import type { SnippetResult } from './snippetResult';
|
|
|
7
7
|
/**
|
|
8
8
|
* A single hit.
|
|
9
9
|
*/
|
|
10
|
-
export type Hit<T
|
|
10
|
+
export type Hit<T = Record<string, any>> = T & {
|
|
11
11
|
/**
|
|
12
12
|
* Unique identifier of the object.
|
|
13
13
|
*/
|
|
14
14
|
objectID: string;
|
|
15
|
+
|
|
15
16
|
/**
|
|
16
17
|
* Show highlighted section and words matched on a query.
|
|
17
18
|
*/
|
|
18
19
|
_highlightResult?: Record<string, HighlightResult>;
|
|
20
|
+
|
|
19
21
|
/**
|
|
20
22
|
* Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.
|
|
21
23
|
*/
|
|
22
24
|
_snippetResult?: Record<string, SnippetResult>;
|
|
25
|
+
|
|
23
26
|
_rankingInfo?: RankingInfo;
|
|
27
|
+
|
|
24
28
|
_distinctSeqID?: number;
|
|
25
29
|
};
|