@algolia/recommend 4.14.1 → 5.0.0-alpha.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 +6 -0
- package/dist/builds/browser.d.ts.map +1 -0
- package/dist/builds/node.d.ts +6 -0
- package/dist/builds/node.d.ts.map +1 -0
- package/dist/model/advancedSyntaxFeatures.d.ts +2 -0
- package/dist/model/advancedSyntaxFeatures.d.ts.map +1 -0
- package/dist/model/alternativesAsExact.d.ts +2 -0
- package/dist/model/alternativesAsExact.d.ts.map +1 -0
- package/dist/model/aroundRadius.d.ts +6 -0
- package/dist/model/aroundRadius.d.ts.map +1 -0
- package/dist/model/aroundRadiusAll.d.ts +2 -0
- package/dist/model/aroundRadiusAll.d.ts.map +1 -0
- package/dist/model/baseRecommendRequest.d.ts +18 -0
- package/dist/model/baseRecommendRequest.d.ts.map +1 -0
- package/dist/model/baseRecommendationRequest.d.ts +9 -0
- package/dist/model/baseRecommendationRequest.d.ts.map +1 -0
- package/dist/model/baseSearchParams.d.ts +4 -0
- package/dist/model/baseSearchParams.d.ts.map +1 -0
- package/dist/model/baseSearchParamsWithoutQuery.d.ts +123 -0
- package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -0
- package/dist/model/baseSearchResponse.d.ts +102 -0
- package/dist/model/baseSearchResponse.d.ts.map +1 -0
- package/dist/model/baseTrendingRequest.d.ts +13 -0
- package/dist/model/baseTrendingRequest.d.ts.map +1 -0
- package/dist/model/clientMethodProps.d.ts +61 -0
- package/dist/model/clientMethodProps.d.ts.map +1 -0
- package/dist/model/errorBase.d.ts +7 -0
- package/dist/model/errorBase.d.ts.map +1 -0
- package/dist/model/exactOnSingleWordQuery.d.ts +5 -0
- package/dist/model/exactOnSingleWordQuery.d.ts.map +1 -0
- package/dist/model/facetFilters.d.ts +6 -0
- package/dist/model/facetFilters.d.ts.map +1 -0
- package/dist/model/facetOrdering.d.ts +13 -0
- package/dist/model/facetOrdering.d.ts.map +1 -0
- package/dist/model/facets.d.ts +10 -0
- package/dist/model/facets.d.ts.map +1 -0
- package/dist/model/facetsStats.d.ts +19 -0
- package/dist/model/facetsStats.d.ts.map +1 -0
- package/dist/model/getRecommendationsParams.d.ts +11 -0
- package/dist/model/getRecommendationsParams.d.ts.map +1 -0
- package/dist/model/getRecommendationsResponse.d.ts +5 -0
- package/dist/model/getRecommendationsResponse.d.ts.map +1 -0
- package/dist/model/highlightResult.d.ts +3 -0
- package/dist/model/highlightResult.d.ts.map +1 -0
- package/dist/model/highlightResultOption.d.ts +20 -0
- package/dist/model/highlightResultOption.d.ts.map +1 -0
- package/dist/model/ignorePlurals.d.ts +5 -0
- package/dist/model/ignorePlurals.d.ts.map +1 -0
- package/dist/model/index.d.ts +53 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model/indexSettingsAsSearchParams.d.ts +159 -0
- package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -0
- package/dist/model/matchLevel.d.ts +5 -0
- package/dist/model/matchLevel.d.ts.map +1 -0
- package/dist/model/matchedGeoLocation.d.ts +15 -0
- package/dist/model/matchedGeoLocation.d.ts.map +1 -0
- package/dist/model/mixedSearchFilters.d.ts +2 -0
- package/dist/model/mixedSearchFilters.d.ts.map +1 -0
- package/dist/model/numericFilters.d.ts +6 -0
- package/dist/model/numericFilters.d.ts.map +1 -0
- package/dist/model/optionalFilters.d.ts +6 -0
- package/dist/model/optionalFilters.d.ts.map +1 -0
- package/dist/model/personalization.d.ts +15 -0
- package/dist/model/personalization.d.ts.map +1 -0
- package/dist/model/queryType.d.ts +5 -0
- package/dist/model/queryType.d.ts.map +1 -0
- package/dist/model/rankingInfo.d.ts +51 -0
- package/dist/model/rankingInfo.d.ts.map +1 -0
- package/dist/model/reRankingApplyFilter.d.ts +6 -0
- package/dist/model/reRankingApplyFilter.d.ts.map +1 -0
- package/dist/model/recommendHit.d.ts +27 -0
- package/dist/model/recommendHit.d.ts.map +1 -0
- package/dist/model/recommendHits.d.ts +5 -0
- package/dist/model/recommendHits.d.ts.map +1 -0
- package/dist/model/recommendationModels.d.ts +5 -0
- package/dist/model/recommendationModels.d.ts.map +1 -0
- package/dist/model/recommendationRequest.d.ts +4 -0
- package/dist/model/recommendationRequest.d.ts.map +1 -0
- package/dist/model/recommendationsRequest.d.ts +4 -0
- package/dist/model/recommendationsRequest.d.ts.map +1 -0
- package/dist/model/recommendationsResponse.d.ts +4 -0
- package/dist/model/recommendationsResponse.d.ts.map +1 -0
- package/dist/model/removeStopWords.d.ts +5 -0
- package/dist/model/removeStopWords.d.ts.map +1 -0
- package/dist/model/removeWordsIfNoResults.d.ts +5 -0
- package/dist/model/removeWordsIfNoResults.d.ts.map +1 -0
- package/dist/model/renderingContent.d.ts +8 -0
- package/dist/model/renderingContent.d.ts.map +1 -0
- package/dist/model/searchParamsObject.d.ts +4 -0
- package/dist/model/searchParamsObject.d.ts.map +1 -0
- package/dist/model/searchParamsQuery.d.ts +7 -0
- package/dist/model/searchParamsQuery.d.ts.map +1 -0
- package/dist/model/snippetResult.d.ts +3 -0
- package/dist/model/snippetResult.d.ts.map +1 -0
- package/dist/model/snippetResultOption.d.ts +12 -0
- package/dist/model/snippetResultOption.d.ts.map +1 -0
- package/dist/model/sortRemainingBy.d.ts +5 -0
- package/dist/model/sortRemainingBy.d.ts.map +1 -0
- package/dist/model/tagFilters.d.ts +6 -0
- package/dist/model/tagFilters.d.ts.map +1 -0
- package/dist/model/trendingModels.d.ts +5 -0
- package/dist/model/trendingModels.d.ts.map +1 -0
- package/dist/model/trendingRequest.d.ts +4 -0
- package/dist/model/trendingRequest.d.ts.map +1 -0
- package/dist/model/typoTolerance.d.ts +6 -0
- package/dist/model/typoTolerance.d.ts.map +1 -0
- package/dist/model/typoToleranceEnum.d.ts +2 -0
- package/dist/model/typoToleranceEnum.d.ts.map +1 -0
- package/dist/model/value.d.ts +9 -0
- package/dist/model/value.d.ts.map +1 -0
- package/dist/recommend.cjs.js +212 -142
- package/dist/recommend.esm.browser.js +884 -824
- package/dist/recommend.esm.node.js +230 -0
- package/dist/recommend.umd.js +2 -2
- package/dist/src/recommendClient.d.ts +74 -0
- package/dist/src/recommendClient.d.ts.map +1 -0
- package/index.d.ts +2 -3
- package/index.js +2 -15
- package/model/advancedSyntaxFeatures.ts +3 -0
- package/model/alternativesAsExact.ts +6 -0
- package/model/aroundRadius.ts +8 -0
- package/model/aroundRadiusAll.ts +3 -0
- package/model/baseRecommendRequest.ts +20 -0
- package/model/baseRecommendationRequest.ts +11 -0
- package/model/baseSearchParams.ts +6 -0
- package/model/baseSearchParamsWithoutQuery.ts +125 -0
- package/model/baseSearchResponse.ts +104 -0
- package/model/baseTrendingRequest.ts +15 -0
- package/model/clientMethodProps.ts +65 -0
- package/model/errorBase.ts +8 -0
- package/model/exactOnSingleWordQuery.ts +6 -0
- package/model/facetFilters.ts +8 -0
- package/model/facetOrdering.ts +15 -0
- package/model/facets.ts +11 -0
- package/model/facetsStats.ts +20 -0
- package/model/getRecommendationsParams.ts +13 -0
- package/model/getRecommendationsResponse.ts +7 -0
- package/model/highlightResult.ts +5 -0
- package/model/highlightResultOption.ts +22 -0
- package/model/ignorePlurals.ts +6 -0
- package/model/index.ts +54 -0
- package/model/indexSettingsAsSearchParams.ts +161 -0
- package/model/matchLevel.ts +6 -0
- package/model/matchedGeoLocation.ts +16 -0
- package/model/mixedSearchFilters.ts +3 -0
- package/model/numericFilters.ts +8 -0
- package/model/optionalFilters.ts +8 -0
- package/model/personalization.ts +16 -0
- package/model/queryType.ts +6 -0
- package/model/rankingInfo.ts +53 -0
- package/model/reRankingApplyFilter.ts +8 -0
- package/model/recommendHit.ts +29 -0
- package/model/recommendHits.ts +7 -0
- package/model/recommendationModels.ts +6 -0
- package/model/recommendationRequest.ts +7 -0
- package/model/recommendationsRequest.ts +6 -0
- package/model/recommendationsResponse.ts +6 -0
- package/model/removeStopWords.ts +6 -0
- package/model/removeWordsIfNoResults.ts +10 -0
- package/model/renderingContent.ts +10 -0
- package/model/searchParamsObject.ts +6 -0
- package/model/searchParamsQuery.ts +8 -0
- package/model/snippetResult.ts +5 -0
- package/model/snippetResultOption.ts +14 -0
- package/model/sortRemainingBy.ts +6 -0
- package/model/tagFilters.ts +8 -0
- package/model/trendingModels.ts +6 -0
- package/model/trendingRequest.ts +6 -0
- package/model/typoTolerance.ts +8 -0
- package/model/typoToleranceEnum.ts +3 -0
- package/model/value.ts +11 -0
- package/package.json +22 -24
- package/README.md +0 -76
- package/dist/recommend.d.ts +0 -162
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { FacetsStats } from './facetsStats';
|
|
4
|
+
import type { RenderingContent } from './renderingContent';
|
|
5
|
+
|
|
6
|
+
export type BaseSearchResponse = {
|
|
7
|
+
/**
|
|
8
|
+
* If a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID.
|
|
9
|
+
*/
|
|
10
|
+
abTestID?: number;
|
|
11
|
+
/**
|
|
12
|
+
* 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
|
+
abTestVariantID?: number;
|
|
15
|
+
/**
|
|
16
|
+
* The computed geo location.
|
|
17
|
+
*/
|
|
18
|
+
aroundLatLng?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The automatically computed radius. For legacy reasons, this parameter is a string and not an integer.
|
|
21
|
+
*/
|
|
22
|
+
automaticRadius?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Whether the facet count is exhaustive or approximate.
|
|
25
|
+
*/
|
|
26
|
+
exhaustiveFacetsCount?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Indicate if the nbHits count was exhaustive or approximate.
|
|
29
|
+
*/
|
|
30
|
+
exhaustiveNbHits: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Indicate if the typo-tolerance search was exhaustive or approximate (only included when typo-tolerance is enabled).
|
|
33
|
+
*/
|
|
34
|
+
exhaustiveTypo: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* A mapping of each facet name to the corresponding facet counts.
|
|
37
|
+
*/
|
|
38
|
+
facets?: Record<string, Record<string, number>>;
|
|
39
|
+
/**
|
|
40
|
+
* Statistics for numerical facets.
|
|
41
|
+
*/
|
|
42
|
+
facets_stats?: Record<string, FacetsStats>;
|
|
43
|
+
/**
|
|
44
|
+
* Set the number of hits per page.
|
|
45
|
+
*/
|
|
46
|
+
hitsPerPage: number;
|
|
47
|
+
/**
|
|
48
|
+
* Index name used for the query.
|
|
49
|
+
*/
|
|
50
|
+
index?: string;
|
|
51
|
+
/**
|
|
52
|
+
* 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
|
+
*/
|
|
54
|
+
indexUsed?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Used to return warnings about the query.
|
|
57
|
+
*/
|
|
58
|
+
message?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Number of hits that the search query matched.
|
|
61
|
+
*/
|
|
62
|
+
nbHits: number;
|
|
63
|
+
/**
|
|
64
|
+
* Number of pages available for the current query.
|
|
65
|
+
*/
|
|
66
|
+
nbPages: number;
|
|
67
|
+
/**
|
|
68
|
+
* The number of hits selected and sorted by the relevant sort algorithm.
|
|
69
|
+
*/
|
|
70
|
+
nbSortedHits?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Specify the page to retrieve.
|
|
73
|
+
*/
|
|
74
|
+
page: number;
|
|
75
|
+
/**
|
|
76
|
+
* A url-encoded string of all search parameters.
|
|
77
|
+
*/
|
|
78
|
+
params: string;
|
|
79
|
+
/**
|
|
80
|
+
* The query string that will be searched, after normalization.
|
|
81
|
+
*/
|
|
82
|
+
parsedQuery?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Time the server took to process the request, in milliseconds.
|
|
85
|
+
*/
|
|
86
|
+
processingTimeMS: number;
|
|
87
|
+
/**
|
|
88
|
+
* The text to search in the index.
|
|
89
|
+
*/
|
|
90
|
+
query: string;
|
|
91
|
+
/**
|
|
92
|
+
* A markup text indicating which parts of the original query have been removed in order to retrieve a non-empty result set.
|
|
93
|
+
*/
|
|
94
|
+
queryAfterRemoval?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Actual host name of the server that processed the request.
|
|
97
|
+
*/
|
|
98
|
+
serverUsed?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Lets you store custom data in your indices.
|
|
101
|
+
*/
|
|
102
|
+
userData?: Record<string, any>;
|
|
103
|
+
renderingContent?: RenderingContent;
|
|
104
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { TrendingModels } from './trendingModels';
|
|
4
|
+
|
|
5
|
+
export type BaseTrendingRequest = {
|
|
6
|
+
model: TrendingModels;
|
|
7
|
+
/**
|
|
8
|
+
* The facet name to use for trending models.
|
|
9
|
+
*/
|
|
10
|
+
facetName?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The facet value to use for trending models.
|
|
13
|
+
*/
|
|
14
|
+
facetValue?: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Properties for the `del` method.
|
|
5
|
+
*/
|
|
6
|
+
export type DelProps = {
|
|
7
|
+
/**
|
|
8
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
9
|
+
*/
|
|
10
|
+
path: string;
|
|
11
|
+
/**
|
|
12
|
+
* Query parameters to be applied to the current query.
|
|
13
|
+
*/
|
|
14
|
+
parameters?: Record<string, any>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Properties for the `get` method.
|
|
19
|
+
*/
|
|
20
|
+
export type GetProps = {
|
|
21
|
+
/**
|
|
22
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
23
|
+
*/
|
|
24
|
+
path: string;
|
|
25
|
+
/**
|
|
26
|
+
* Query parameters to be applied to the current query.
|
|
27
|
+
*/
|
|
28
|
+
parameters?: Record<string, any>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Properties for the `post` method.
|
|
33
|
+
*/
|
|
34
|
+
export type PostProps = {
|
|
35
|
+
/**
|
|
36
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
37
|
+
*/
|
|
38
|
+
path: string;
|
|
39
|
+
/**
|
|
40
|
+
* Query parameters to be applied to the current query.
|
|
41
|
+
*/
|
|
42
|
+
parameters?: Record<string, any>;
|
|
43
|
+
/**
|
|
44
|
+
* The parameters to send with the custom request.
|
|
45
|
+
*/
|
|
46
|
+
body?: Record<string, any>;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Properties for the `put` method.
|
|
51
|
+
*/
|
|
52
|
+
export type PutProps = {
|
|
53
|
+
/**
|
|
54
|
+
* The path of the API endpoint to target, anything after the /1 needs to be specified.
|
|
55
|
+
*/
|
|
56
|
+
path: string;
|
|
57
|
+
/**
|
|
58
|
+
* Query parameters to be applied to the current query.
|
|
59
|
+
*/
|
|
60
|
+
parameters?: Record<string, any>;
|
|
61
|
+
/**
|
|
62
|
+
* The parameters to send with the custom request.
|
|
63
|
+
*/
|
|
64
|
+
body?: Record<string, any>;
|
|
65
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Controls how the exact ranking criterion is computed when the query contains only one word.
|
|
5
|
+
*/
|
|
6
|
+
export type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { MixedSearchFilters } from './mixedSearchFilters';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Filter hits by facet value.
|
|
7
|
+
*/
|
|
8
|
+
export type FacetFilters = MixedSearchFilters[] | string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { Facets } from './facets';
|
|
4
|
+
import type { Value } from './value';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Defining how facets should be ordered.
|
|
8
|
+
*/
|
|
9
|
+
export type FacetOrdering = {
|
|
10
|
+
facets?: Facets;
|
|
11
|
+
/**
|
|
12
|
+
* The ordering of facet values, within an individual list.
|
|
13
|
+
*/
|
|
14
|
+
values?: Record<string, Value>;
|
|
15
|
+
};
|
package/model/facets.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The ordering of facets (widgets).
|
|
5
|
+
*/
|
|
6
|
+
export type Facets = {
|
|
7
|
+
/**
|
|
8
|
+
* Pinned order of facet lists.
|
|
9
|
+
*/
|
|
10
|
+
order?: string[];
|
|
11
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
export type FacetsStats = {
|
|
4
|
+
/**
|
|
5
|
+
* The minimum value in the result set.
|
|
6
|
+
*/
|
|
7
|
+
min?: number;
|
|
8
|
+
/**
|
|
9
|
+
* The maximum value in the result set.
|
|
10
|
+
*/
|
|
11
|
+
max?: number;
|
|
12
|
+
/**
|
|
13
|
+
* The average facet value in the result set.
|
|
14
|
+
*/
|
|
15
|
+
avg?: number;
|
|
16
|
+
/**
|
|
17
|
+
* The sum of all values in the result set.
|
|
18
|
+
*/
|
|
19
|
+
sum?: number;
|
|
20
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { RecommendationsRequest } from './recommendationsRequest';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The `getRecommendations` parameters.
|
|
7
|
+
*/
|
|
8
|
+
export type GetRecommendationsParams = {
|
|
9
|
+
/**
|
|
10
|
+
* The `getRecommendations` requests.
|
|
11
|
+
*/
|
|
12
|
+
requests: RecommendationsRequest[];
|
|
13
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { RecommendationsResponse } from './recommendationsResponse';
|
|
4
|
+
|
|
5
|
+
export type GetRecommendationsResponse = {
|
|
6
|
+
results?: RecommendationsResponse[];
|
|
7
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { HighlightResultOption } from './highlightResultOption';
|
|
4
|
+
|
|
5
|
+
export type HighlightResult = HighlightResultOption | HighlightResultOption[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { MatchLevel } from './matchLevel';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Show highlighted section and words matched on a query.
|
|
7
|
+
*/
|
|
8
|
+
export type HighlightResultOption = {
|
|
9
|
+
/**
|
|
10
|
+
* Markup text with occurrences highlighted.
|
|
11
|
+
*/
|
|
12
|
+
value: string;
|
|
13
|
+
matchLevel: MatchLevel;
|
|
14
|
+
/**
|
|
15
|
+
* List of words from the query that matched the object.
|
|
16
|
+
*/
|
|
17
|
+
matchedWords: string[];
|
|
18
|
+
/**
|
|
19
|
+
* Whether the entire attribute value is highlighted.
|
|
20
|
+
*/
|
|
21
|
+
fullyHighlighted?: boolean;
|
|
22
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Treats singular, plurals, and other forms of declensions as matching terms. IgnorePlurals is used in conjunction with the queryLanguages setting. List: language ISO codes for which ignoring plurals should be enabled. This list will override any values that you may have set in queryLanguages. True: enables the ignore plurals functionality, where singulars and plurals are considered equivalent (foot = feet). The languages supported here are either every language (this is the default, see list of languages below), or those set by queryLanguages. False: disables ignore plurals, where singulars and plurals are not considered the same for matching purposes (foot will not find feet).
|
|
5
|
+
*/
|
|
6
|
+
export type IgnorePlurals = string[] | boolean;
|
package/model/index.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
export * from './advancedSyntaxFeatures';
|
|
4
|
+
export * from './alternativesAsExact';
|
|
5
|
+
export * from './aroundRadius';
|
|
6
|
+
export * from './aroundRadiusAll';
|
|
7
|
+
export * from './baseRecommendRequest';
|
|
8
|
+
export * from './baseRecommendationRequest';
|
|
9
|
+
export * from './baseSearchParams';
|
|
10
|
+
export * from './baseSearchParamsWithoutQuery';
|
|
11
|
+
export * from './baseSearchResponse';
|
|
12
|
+
export * from './baseTrendingRequest';
|
|
13
|
+
export * from './errorBase';
|
|
14
|
+
export * from './exactOnSingleWordQuery';
|
|
15
|
+
export * from './facetFilters';
|
|
16
|
+
export * from './facetOrdering';
|
|
17
|
+
export * from './facets';
|
|
18
|
+
export * from './facetsStats';
|
|
19
|
+
export * from './getRecommendationsParams';
|
|
20
|
+
export * from './getRecommendationsResponse';
|
|
21
|
+
export * from './highlightResult';
|
|
22
|
+
export * from './highlightResultOption';
|
|
23
|
+
export * from './ignorePlurals';
|
|
24
|
+
export * from './indexSettingsAsSearchParams';
|
|
25
|
+
export * from './matchLevel';
|
|
26
|
+
export * from './matchedGeoLocation';
|
|
27
|
+
export * from './mixedSearchFilters';
|
|
28
|
+
export * from './numericFilters';
|
|
29
|
+
export * from './optionalFilters';
|
|
30
|
+
export * from './personalization';
|
|
31
|
+
export * from './queryType';
|
|
32
|
+
export * from './rankingInfo';
|
|
33
|
+
export * from './reRankingApplyFilter';
|
|
34
|
+
export * from './recommendHit';
|
|
35
|
+
export * from './recommendHits';
|
|
36
|
+
export * from './recommendationModels';
|
|
37
|
+
export * from './recommendationRequest';
|
|
38
|
+
export * from './recommendationsRequest';
|
|
39
|
+
export * from './recommendationsResponse';
|
|
40
|
+
export * from './removeStopWords';
|
|
41
|
+
export * from './removeWordsIfNoResults';
|
|
42
|
+
export * from './renderingContent';
|
|
43
|
+
export * from './searchParamsObject';
|
|
44
|
+
export * from './searchParamsQuery';
|
|
45
|
+
export * from './snippetResult';
|
|
46
|
+
export * from './snippetResultOption';
|
|
47
|
+
export * from './sortRemainingBy';
|
|
48
|
+
export * from './tagFilters';
|
|
49
|
+
export * from './trendingModels';
|
|
50
|
+
export * from './trendingRequest';
|
|
51
|
+
export * from './typoTolerance';
|
|
52
|
+
export * from './typoToleranceEnum';
|
|
53
|
+
export * from './value';
|
|
54
|
+
export * from './clientMethodProps';
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { AdvancedSyntaxFeatures } from './advancedSyntaxFeatures';
|
|
4
|
+
import type { AlternativesAsExact } from './alternativesAsExact';
|
|
5
|
+
import type { ExactOnSingleWordQuery } from './exactOnSingleWordQuery';
|
|
6
|
+
import type { IgnorePlurals } from './ignorePlurals';
|
|
7
|
+
import type { QueryType } from './queryType';
|
|
8
|
+
import type { RemoveStopWords } from './removeStopWords';
|
|
9
|
+
import type { RemoveWordsIfNoResults } from './removeWordsIfNoResults';
|
|
10
|
+
import type { RenderingContent } from './renderingContent';
|
|
11
|
+
import type { TypoTolerance } from './typoTolerance';
|
|
12
|
+
|
|
13
|
+
export type IndexSettingsAsSearchParams = {
|
|
14
|
+
/**
|
|
15
|
+
* The complete list of attributes that will be used for faceting.
|
|
16
|
+
*/
|
|
17
|
+
attributesForFaceting?: string[];
|
|
18
|
+
/**
|
|
19
|
+
* List of attributes that can\'t be retrieved at query time.
|
|
20
|
+
*/
|
|
21
|
+
unretrievableAttributes?: string[];
|
|
22
|
+
/**
|
|
23
|
+
* This parameter controls which attributes to retrieve and which not to retrieve.
|
|
24
|
+
*/
|
|
25
|
+
attributesToRetrieve?: string[];
|
|
26
|
+
/**
|
|
27
|
+
* Restricts a given query to look in only a subset of your searchable attributes.
|
|
28
|
+
*/
|
|
29
|
+
restrictSearchableAttributes?: string[];
|
|
30
|
+
/**
|
|
31
|
+
* Controls how Algolia should sort your results.
|
|
32
|
+
*/
|
|
33
|
+
ranking?: string[];
|
|
34
|
+
/**
|
|
35
|
+
* Specifies the custom ranking criterion.
|
|
36
|
+
*/
|
|
37
|
+
customRanking?: string[];
|
|
38
|
+
/**
|
|
39
|
+
* Controls the relevancy threshold below which less relevant results aren\'t included in the results.
|
|
40
|
+
*/
|
|
41
|
+
relevancyStrictness?: number;
|
|
42
|
+
/**
|
|
43
|
+
* List of attributes to highlight.
|
|
44
|
+
*/
|
|
45
|
+
attributesToHighlight?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* List of attributes to snippet, with an optional maximum number of words to snippet.
|
|
48
|
+
*/
|
|
49
|
+
attributesToSnippet?: string[];
|
|
50
|
+
/**
|
|
51
|
+
* The HTML string to insert before the highlighted parts in all highlight and snippet results.
|
|
52
|
+
*/
|
|
53
|
+
highlightPreTag?: string;
|
|
54
|
+
/**
|
|
55
|
+
* The HTML string to insert after the highlighted parts in all highlight and snippet results.
|
|
56
|
+
*/
|
|
57
|
+
highlightPostTag?: string;
|
|
58
|
+
/**
|
|
59
|
+
* String used as an ellipsis indicator when a snippet is truncated.
|
|
60
|
+
*/
|
|
61
|
+
snippetEllipsisText?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Restrict highlighting and snippeting to items that matched the query.
|
|
64
|
+
*/
|
|
65
|
+
restrictHighlightAndSnippetArrays?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Set the number of hits per page.
|
|
68
|
+
*/
|
|
69
|
+
hitsPerPage?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Minimum number of characters a word in the query string must contain to accept matches with 1 typo.
|
|
72
|
+
*/
|
|
73
|
+
minWordSizefor1Typo?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Minimum number of characters a word in the query string must contain to accept matches with 2 typos.
|
|
76
|
+
*/
|
|
77
|
+
minWordSizefor2Typos?: number;
|
|
78
|
+
typoTolerance?: TypoTolerance;
|
|
79
|
+
/**
|
|
80
|
+
* Whether to allow typos on numbers (\"numeric tokens\") in the query string.
|
|
81
|
+
*/
|
|
82
|
+
allowTyposOnNumericTokens?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* List of attributes on which you want to disable typo tolerance.
|
|
85
|
+
*/
|
|
86
|
+
disableTypoToleranceOnAttributes?: string[];
|
|
87
|
+
ignorePlurals?: IgnorePlurals;
|
|
88
|
+
removeStopWords?: RemoveStopWords;
|
|
89
|
+
/**
|
|
90
|
+
* List of characters that the engine shouldn\'t automatically normalize.
|
|
91
|
+
*/
|
|
92
|
+
keepDiacriticsOnCharacters?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection.
|
|
95
|
+
*/
|
|
96
|
+
queryLanguages?: string[];
|
|
97
|
+
/**
|
|
98
|
+
* Splits compound words into their composing atoms in the query.
|
|
99
|
+
*/
|
|
100
|
+
decompoundQuery?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Whether Rules should be globally enabled.
|
|
103
|
+
*/
|
|
104
|
+
enableRules?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Enable the Personalization feature.
|
|
107
|
+
*/
|
|
108
|
+
enablePersonalization?: boolean;
|
|
109
|
+
queryType?: QueryType;
|
|
110
|
+
removeWordsIfNoResults?: RemoveWordsIfNoResults;
|
|
111
|
+
/**
|
|
112
|
+
* Enables the advanced query syntax.
|
|
113
|
+
*/
|
|
114
|
+
advancedSyntax?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* A list of words that should be considered as optional when found in the query.
|
|
117
|
+
*/
|
|
118
|
+
optionalWords?: string[];
|
|
119
|
+
/**
|
|
120
|
+
* List of attributes on which you want to disable the exact ranking criterion.
|
|
121
|
+
*/
|
|
122
|
+
disableExactOnAttributes?: string[];
|
|
123
|
+
exactOnSingleWordQuery?: ExactOnSingleWordQuery;
|
|
124
|
+
/**
|
|
125
|
+
* List of alternatives that should be considered an exact match by the exact ranking criterion.
|
|
126
|
+
*/
|
|
127
|
+
alternativesAsExact?: AlternativesAsExact[];
|
|
128
|
+
/**
|
|
129
|
+
* Allows you to specify which advanced syntax features are active when ‘advancedSyntax\' is enabled.
|
|
130
|
+
*/
|
|
131
|
+
advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];
|
|
132
|
+
/**
|
|
133
|
+
* Enables de-duplication or grouping of results.
|
|
134
|
+
*/
|
|
135
|
+
distinct?: number;
|
|
136
|
+
/**
|
|
137
|
+
* Whether to take into account an index\'s synonyms for a particular search.
|
|
138
|
+
*/
|
|
139
|
+
synonyms?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Whether to highlight and snippet the original word that matches the synonym or the synonym itself.
|
|
142
|
+
*/
|
|
143
|
+
replaceSynonymsInHighlight?: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Precision of the proximity ranking criterion.
|
|
146
|
+
*/
|
|
147
|
+
minProximity?: number;
|
|
148
|
+
/**
|
|
149
|
+
* Choose which fields to return in the API response. This parameters applies to search and browse queries.
|
|
150
|
+
*/
|
|
151
|
+
responseFields?: string[];
|
|
152
|
+
/**
|
|
153
|
+
* Maximum number of facet hits to return during a search for facet values. For performance reasons, the maximum allowed number of returned values is 100.
|
|
154
|
+
*/
|
|
155
|
+
maxFacetHits?: number;
|
|
156
|
+
/**
|
|
157
|
+
* When attribute is ranked above proximity in your ranking formula, proximity is used to select which searchable attribute is matched in the attribute ranking stage.
|
|
158
|
+
*/
|
|
159
|
+
attributeCriteriaComputedByMinProximity?: boolean;
|
|
160
|
+
renderingContent?: RenderingContent;
|
|
161
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
export type MatchedGeoLocation = {
|
|
4
|
+
/**
|
|
5
|
+
* Latitude of the matched location.
|
|
6
|
+
*/
|
|
7
|
+
lat?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Longitude of the matched location.
|
|
10
|
+
*/
|
|
11
|
+
lng?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Distance between the matched location and the search location (in meters).
|
|
14
|
+
*/
|
|
15
|
+
distance?: number;
|
|
16
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { MixedSearchFilters } from './mixedSearchFilters';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Filter on numeric attributes.
|
|
7
|
+
*/
|
|
8
|
+
export type NumericFilters = MixedSearchFilters[] | string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { MixedSearchFilters } from './mixedSearchFilters';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Create filters for ranking purposes, where records that match the filter are ranked higher, or lower in the case of a negative optional filter.
|
|
7
|
+
*/
|
|
8
|
+
export type OptionalFilters = MixedSearchFilters[] | string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
export type Personalization = {
|
|
4
|
+
/**
|
|
5
|
+
* The score of the filters.
|
|
6
|
+
*/
|
|
7
|
+
filtersScore?: number;
|
|
8
|
+
/**
|
|
9
|
+
* The score of the ranking.
|
|
10
|
+
*/
|
|
11
|
+
rankingScore?: number;
|
|
12
|
+
/**
|
|
13
|
+
* The score of the event.
|
|
14
|
+
*/
|
|
15
|
+
score?: number;
|
|
16
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
|
+
|
|
3
|
+
import type { MatchedGeoLocation } from './matchedGeoLocation';
|
|
4
|
+
import type { Personalization } from './personalization';
|
|
5
|
+
|
|
6
|
+
export type RankingInfo = {
|
|
7
|
+
/**
|
|
8
|
+
* This field is reserved for advanced usage.
|
|
9
|
+
*/
|
|
10
|
+
filters: number;
|
|
11
|
+
/**
|
|
12
|
+
* Position of the most important matched attribute in the attributes to index list.
|
|
13
|
+
*/
|
|
14
|
+
firstMatchedWord: number;
|
|
15
|
+
/**
|
|
16
|
+
* Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters).
|
|
17
|
+
*/
|
|
18
|
+
geoDistance: number;
|
|
19
|
+
/**
|
|
20
|
+
* Precision used when computing the geo distance, in meters.
|
|
21
|
+
*/
|
|
22
|
+
geoPrecision?: number;
|
|
23
|
+
matchedGeoLocation?: MatchedGeoLocation;
|
|
24
|
+
personalization?: Personalization;
|
|
25
|
+
/**
|
|
26
|
+
* Number of exactly matched words.
|
|
27
|
+
*/
|
|
28
|
+
nbExactWords: number;
|
|
29
|
+
/**
|
|
30
|
+
* Number of typos encountered when matching the record.
|
|
31
|
+
*/
|
|
32
|
+
nbTypos: number;
|
|
33
|
+
/**
|
|
34
|
+
* Present and set to true if a Rule promoted the hit.
|
|
35
|
+
*/
|
|
36
|
+
promoted: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* When the query contains more than one word, the sum of the distances between matched words (in meters).
|
|
39
|
+
*/
|
|
40
|
+
proximityDistance?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Custom ranking for the object, expressed as a single integer value.
|
|
43
|
+
*/
|
|
44
|
+
userScore: number;
|
|
45
|
+
/**
|
|
46
|
+
* Number of matched words, including prefixes and typos.
|
|
47
|
+
*/
|
|
48
|
+
words: number;
|
|
49
|
+
/**
|
|
50
|
+
* Wether the record are promoted by the re-ranking strategy.
|
|
51
|
+
*/
|
|
52
|
+
promotedByReRanking?: boolean;
|
|
53
|
+
};
|