@algolia/recommend 5.0.0-alpha.73 → 5.0.0-alpha.75
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/model/anchoring.d.ts +5 -0
- package/dist/model/anchoring.d.ts.map +1 -0
- package/dist/model/aroundRadius.d.ts +1 -1
- package/dist/model/automaticFacetFilter.d.ts +18 -0
- package/dist/model/automaticFacetFilter.d.ts.map +1 -0
- package/dist/model/automaticFacetFilters.d.ts +6 -0
- package/dist/model/automaticFacetFilters.d.ts.map +1 -0
- package/dist/model/baseRecommendRequest.d.ts +3 -3
- package/dist/model/baseRecommendationRequest.d.ts +1 -1
- package/dist/model/baseSearchParamsWithoutQuery.d.ts +25 -25
- package/dist/model/baseSearchResponse.d.ts +20 -20
- package/dist/model/baseSearchResponseRedirect.d.ts +1 -1
- package/dist/model/baseTrendingRequest.d.ts +2 -2
- package/dist/model/clientMethodProps.d.ts +77 -10
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/condition.d.ts +17 -0
- package/dist/model/condition.d.ts.map +1 -0
- package/dist/model/consequence.d.ts +26 -0
- package/dist/model/consequence.d.ts.map +1 -0
- package/dist/model/consequenceHide.d.ts +10 -0
- package/dist/model/consequenceHide.d.ts.map +1 -0
- package/dist/model/consequenceParams.d.ts +5 -0
- package/dist/model/consequenceParams.d.ts.map +1 -0
- package/dist/model/consequenceQuery.d.ts +6 -0
- package/dist/model/consequenceQuery.d.ts.map +1 -0
- package/dist/model/consequenceQueryObject.d.ts +12 -0
- package/dist/model/consequenceQueryObject.d.ts.map +1 -0
- package/dist/model/deletedAtResponse.d.ts +14 -0
- package/dist/model/deletedAtResponse.d.ts.map +1 -0
- package/dist/model/distinct.d.ts +1 -1
- package/dist/model/edit.d.ts +13 -0
- package/dist/model/edit.d.ts.map +1 -0
- package/dist/model/editType.d.ts +5 -0
- package/dist/model/editType.d.ts.map +1 -0
- package/dist/model/exactOnSingleWordQuery.d.ts +1 -1
- package/dist/model/facetFilters.d.ts +1 -1
- package/dist/model/facetOrdering.d.ts +2 -2
- package/dist/model/facets.d.ts +1 -1
- package/dist/model/facetsStats.d.ts +4 -4
- package/dist/model/getRecommendTaskResponse.d.ts +5 -0
- package/dist/model/getRecommendTaskResponse.d.ts.map +1 -0
- package/dist/model/getRecommendationsParams.d.ts +2 -2
- package/dist/model/highlightResultOption.d.ts +1 -1
- package/dist/model/ignorePlurals.d.ts +1 -1
- package/dist/model/index.d.ts +23 -0
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/indexSettingsAsSearchParams.d.ts +30 -30
- package/dist/model/indexSettingsAsSearchParamsSemanticSearch.d.ts +2 -2
- package/dist/model/mode.d.ts +1 -1
- package/dist/model/numericFilters.d.ts +1 -1
- package/dist/model/optionalFilters.d.ts +1 -1
- package/dist/model/params.d.ts +13 -0
- package/dist/model/params.d.ts.map +1 -0
- package/dist/model/promote.d.ts +4 -0
- package/dist/model/promote.d.ts.map +1 -0
- package/dist/model/promoteObjectID.d.ts +14 -0
- package/dist/model/promoteObjectID.d.ts.map +1 -0
- package/dist/model/promoteObjectIDs.d.ts +14 -0
- package/dist/model/promoteObjectIDs.d.ts.map +1 -0
- package/dist/model/queryType.d.ts +1 -1
- package/dist/model/reRankingApplyFilter.d.ts +1 -1
- package/dist/model/recommendHit.d.ts +3 -3
- package/dist/model/recommendModels.d.ts +2 -0
- package/dist/model/recommendModels.d.ts.map +1 -0
- package/dist/model/recommendationModels.d.ts +1 -1
- package/dist/model/redirectRuleIndexMetadata.d.ts +1 -1
- package/dist/model/redirectRuleIndexMetadataData.d.ts +1 -1
- package/dist/model/removeStopWords.d.ts +1 -1
- package/dist/model/removeWordsIfNoResults.d.ts +1 -1
- package/dist/model/renderingContent.d.ts +1 -1
- package/dist/model/ruleResponse.d.ts +27 -0
- package/dist/model/ruleResponse.d.ts.map +1 -0
- package/dist/model/ruleResponseMetadata.d.ts +7 -0
- package/dist/model/ruleResponseMetadata.d.ts.map +1 -0
- package/dist/model/searchParamsQuery.d.ts +1 -1
- package/dist/model/searchRecommendRulesParams.d.ts +30 -0
- package/dist/model/searchRecommendRulesParams.d.ts.map +1 -0
- package/dist/model/searchRecommendRulesResponse.d.ts +20 -0
- package/dist/model/searchRecommendRulesResponse.d.ts.map +1 -0
- package/dist/model/snippetResultOption.d.ts +1 -1
- package/dist/model/sortRemainingBy.d.ts +1 -1
- package/dist/model/tagFilters.d.ts +1 -1
- package/dist/model/taskStatus.d.ts +5 -0
- package/dist/model/taskStatus.d.ts.map +1 -0
- package/dist/model/trendingModels.d.ts +1 -1
- package/dist/model/typoTolerance.d.ts +1 -1
- package/dist/recommend.cjs.js +148 -15
- package/dist/recommend.esm.browser.js +148 -13
- package/dist/recommend.esm.node.js +148 -13
- package/dist/recommend.umd.js +2 -2
- package/dist/src/recommendClient.d.ts +62 -14
- package/dist/src/recommendClient.d.ts.map +1 -1
- package/model/anchoring.ts +6 -0
- package/model/aroundRadius.ts +1 -1
- package/model/automaticFacetFilter.ts +21 -0
- package/model/automaticFacetFilters.ts +8 -0
- package/model/baseRecommendRequest.ts +3 -3
- package/model/baseRecommendationRequest.ts +1 -1
- package/model/baseSearchParamsWithoutQuery.ts +25 -25
- package/model/baseSearchResponse.ts +20 -20
- package/model/baseSearchResponseRedirect.ts +1 -1
- package/model/baseTrendingRequest.ts +2 -2
- package/model/clientMethodProps.ts +82 -10
- package/model/condition.ts +22 -0
- package/model/consequence.ts +32 -0
- package/model/consequenceHide.ts +11 -0
- package/model/consequenceParams.ts +9 -0
- package/model/consequenceQuery.ts +8 -0
- package/model/consequenceQueryObject.ts +15 -0
- package/model/deletedAtResponse.ts +16 -0
- package/model/distinct.ts +1 -1
- package/model/edit.ts +17 -0
- package/model/editType.ts +6 -0
- package/model/exactOnSingleWordQuery.ts +1 -1
- package/model/facetFilters.ts +1 -1
- package/model/facetOrdering.ts +2 -2
- package/model/facets.ts +1 -1
- package/model/facetsStats.ts +4 -4
- package/model/getRecommendTaskResponse.ts +7 -0
- package/model/getRecommendationsParams.ts +2 -2
- package/model/highlightResultOption.ts +1 -1
- package/model/ignorePlurals.ts +1 -1
- package/model/index.ts +23 -0
- package/model/indexSettingsAsSearchParams.ts +30 -30
- package/model/indexSettingsAsSearchParamsSemanticSearch.ts +2 -2
- package/model/mode.ts +1 -1
- package/model/numericFilters.ts +1 -1
- package/model/optionalFilters.ts +1 -1
- package/model/params.ts +18 -0
- package/model/promote.ts +6 -0
- package/model/promoteObjectID.ts +16 -0
- package/model/promoteObjectIDs.ts +16 -0
- package/model/queryType.ts +1 -1
- package/model/reRankingApplyFilter.ts +1 -1
- package/model/recommendHit.ts +3 -3
- package/model/recommendModels.ts +7 -0
- package/model/recommendationModels.ts +1 -1
- package/model/redirectRuleIndexMetadata.ts +1 -1
- package/model/redirectRuleIndexMetadataData.ts +1 -1
- package/model/removeStopWords.ts +1 -1
- package/model/removeWordsIfNoResults.ts +1 -1
- package/model/renderingContent.ts +1 -1
- package/model/ruleResponse.ts +34 -0
- package/model/ruleResponseMetadata.ts +8 -0
- package/model/searchParamsQuery.ts +1 -1
- package/model/searchRecommendRulesParams.ts +36 -0
- package/model/searchRecommendRulesResponse.ts +25 -0
- package/model/snippetResultOption.ts +1 -1
- package/model/sortRemainingBy.ts +1 -1
- package/model/tagFilters.ts +1 -1
- package/model/taskStatus.ts +6 -0
- package/model/trendingModels.ts +1 -1
- package/model/typoTolerance.ts +1 -1
- package/package.json +8 -7
|
@@ -9,12 +9,12 @@ import type { TagFilters } from './tagFilters';
|
|
|
9
9
|
|
|
10
10
|
export type BaseSearchParamsWithoutQuery = {
|
|
11
11
|
/**
|
|
12
|
-
* Overrides the query parameter and performs a more generic search
|
|
12
|
+
* Overrides the query parameter and performs a more generic search.
|
|
13
13
|
*/
|
|
14
14
|
similarQuery?: string;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* Filter the query with numeric, facet
|
|
17
|
+
* [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters.
|
|
18
18
|
*/
|
|
19
19
|
filters?: string;
|
|
20
20
|
|
|
@@ -27,22 +27,22 @@ export type BaseSearchParamsWithoutQuery = {
|
|
|
27
27
|
tagFilters?: TagFilters;
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Determines how to calculate
|
|
30
|
+
* Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed.
|
|
31
31
|
*/
|
|
32
32
|
sumOrFiltersScores?: boolean;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values.
|
|
36
36
|
*/
|
|
37
37
|
facets?: string[];
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* Maximum number of facet values to return for each facet
|
|
40
|
+
* Maximum number of facet values to return for each facet.
|
|
41
41
|
*/
|
|
42
42
|
maxValuesPerFacet?: number;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control.
|
|
46
46
|
*/
|
|
47
47
|
facetingAfterDistinct?: boolean;
|
|
48
48
|
|
|
@@ -52,89 +52,89 @@ export type BaseSearchParamsWithoutQuery = {
|
|
|
52
52
|
sortFacetValuesBy?: string;
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* Page to retrieve (the first page is `0`, not `1`).
|
|
56
56
|
*/
|
|
57
57
|
page?: number;
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length).
|
|
61
61
|
*/
|
|
62
62
|
offset?: number;
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length).
|
|
66
66
|
*/
|
|
67
67
|
length?: number;
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
|
-
* Search for entries around a central geolocation, enabling a
|
|
70
|
+
* Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.
|
|
71
71
|
*/
|
|
72
72
|
aroundLatLng?: string;
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
|
-
* Search for entries around a
|
|
75
|
+
* Search for entries around a location. The location is automatically computed from the requester\'s IP address.
|
|
76
76
|
*/
|
|
77
77
|
aroundLatLngViaIP?: boolean;
|
|
78
78
|
|
|
79
79
|
aroundRadius?: AroundRadius;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
* Precision of
|
|
82
|
+
* Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/).
|
|
83
83
|
*/
|
|
84
84
|
aroundPrecision?: number;
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
|
-
* Minimum radius (in meters) used for a
|
|
87
|
+
* Minimum radius (in meters) used for a geographical search when `aroundRadius` isn\'t set.
|
|
88
88
|
*/
|
|
89
89
|
minimumAroundRadius?: number;
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
|
-
* Search inside a rectangular area (in
|
|
92
|
+
* Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).
|
|
93
93
|
*/
|
|
94
94
|
insideBoundingBox?: number[];
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
|
-
* Search inside a polygon (in
|
|
97
|
+
* Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).
|
|
98
98
|
*/
|
|
99
99
|
insidePolygon?: number[];
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
|
-
*
|
|
102
|
+
* Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries.
|
|
103
103
|
*/
|
|
104
104
|
naturalLanguages?: string[];
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
|
-
*
|
|
107
|
+
* Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries.
|
|
108
108
|
*/
|
|
109
109
|
ruleContexts?: string[];
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
|
-
*
|
|
112
|
+
* Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
|
|
113
113
|
*/
|
|
114
114
|
personalizationImpact?: number;
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
|
-
* Associates a
|
|
117
|
+
* Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.
|
|
118
118
|
*/
|
|
119
119
|
userToken?: string;
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
|
-
*
|
|
122
|
+
* Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).
|
|
123
123
|
*/
|
|
124
124
|
getRankingInfo?: boolean;
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
|
-
*
|
|
127
|
+
* Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests).
|
|
128
128
|
*/
|
|
129
129
|
clickAnalytics?: boolean;
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
|
-
*
|
|
132
|
+
* Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).
|
|
133
133
|
*/
|
|
134
134
|
analytics?: boolean;
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
|
-
*
|
|
137
|
+
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
138
138
|
*/
|
|
139
139
|
analyticsTags?: string[];
|
|
140
140
|
|
|
@@ -144,12 +144,12 @@ export type BaseSearchParamsWithoutQuery = {
|
|
|
144
144
|
percentileComputation?: boolean;
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
|
-
*
|
|
147
|
+
* Incidates whether this search will be considered in A/B testing.
|
|
148
148
|
*/
|
|
149
149
|
enableABTest?: boolean;
|
|
150
150
|
|
|
151
151
|
/**
|
|
152
|
-
*
|
|
152
|
+
* Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
|
|
153
153
|
*/
|
|
154
154
|
enableReRanking?: boolean;
|
|
155
155
|
|
|
@@ -6,42 +6,42 @@ import type { RenderingContent } from './renderingContent';
|
|
|
6
6
|
|
|
7
7
|
export type BaseSearchResponse = {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* A/B test ID. This is only included in the response for indices that are part of an A/B test.
|
|
10
10
|
*/
|
|
11
11
|
abTestID?: number;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Variant ID. This is only included in the response for indices that are part of an A/B test.
|
|
15
15
|
*/
|
|
16
16
|
abTestVariantID?: number;
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Computed geographical location.
|
|
20
20
|
*/
|
|
21
21
|
aroundLatLng?: string;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Automatically-computed radius.
|
|
25
25
|
*/
|
|
26
26
|
automaticRadius?: string;
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Indicates whether the facet count is exhaustive (exact) or approximate.
|
|
30
30
|
*/
|
|
31
31
|
exhaustiveFacetsCount?: boolean;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Indicates whether the number of hits `nbHits` is exhaustive (exact) or approximate.
|
|
35
35
|
*/
|
|
36
36
|
exhaustiveNbHits: boolean;
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* Indicates whether the search for typos was exhaustive (exact) or approximate.
|
|
40
40
|
*/
|
|
41
41
|
exhaustiveTypo?: boolean;
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Mapping of each facet name to the corresponding facet counts.
|
|
45
45
|
*/
|
|
46
46
|
facets?: Record<string, Record<string, number>>;
|
|
47
47
|
|
|
@@ -51,7 +51,7 @@ export type BaseSearchResponse = {
|
|
|
51
51
|
facets_stats?: Record<string, FacetsStats>;
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Number of hits per page.
|
|
55
55
|
*/
|
|
56
56
|
hitsPerPage: number;
|
|
57
57
|
|
|
@@ -61,44 +61,44 @@ export type BaseSearchResponse = {
|
|
|
61
61
|
index?: string;
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
|
-
* Index name used for the query.
|
|
64
|
+
* Index name used for the query. During A/B testing, the targeted index isn\'t always the index used by the query.
|
|
65
65
|
*/
|
|
66
66
|
indexUsed?: string;
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Warnings about the query.
|
|
70
70
|
*/
|
|
71
71
|
message?: string;
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
* Number of hits
|
|
74
|
+
* Number of hits the search query matched.
|
|
75
75
|
*/
|
|
76
76
|
nbHits: number;
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
|
-
* Number of pages
|
|
79
|
+
* Number of pages of results for the current query.
|
|
80
80
|
*/
|
|
81
81
|
nbPages: number;
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
84
|
+
* Number of hits selected and sorted by the relevant sort algorithm.
|
|
85
85
|
*/
|
|
86
86
|
nbSortedHits?: number;
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
89
|
+
* Page to retrieve (the first page is `0`, not `1`).
|
|
90
90
|
*/
|
|
91
91
|
page: number;
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
*
|
|
94
|
+
* URL-encoded string of all search parameters.
|
|
95
95
|
*/
|
|
96
96
|
params: string;
|
|
97
97
|
|
|
98
98
|
redirect?: BaseSearchResponseRedirect;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
*
|
|
101
|
+
* Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) query string that will be searched.
|
|
102
102
|
*/
|
|
103
103
|
parsedQuery?: string;
|
|
104
104
|
|
|
@@ -108,17 +108,17 @@ export type BaseSearchResponse = {
|
|
|
108
108
|
processingTimeMS: number;
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
|
-
*
|
|
111
|
+
* Text to search for in an index.
|
|
112
112
|
*/
|
|
113
113
|
query: string;
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
|
-
*
|
|
116
|
+
* Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set.
|
|
117
117
|
*/
|
|
118
118
|
queryAfterRemoval?: string;
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
*
|
|
121
|
+
* Host name of the server that processed the request.
|
|
122
122
|
*/
|
|
123
123
|
serverUsed?: string;
|
|
124
124
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import type { RedirectRuleIndexMetadata } from './redirectRuleIndexMetadata';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/).
|
|
7
7
|
*/
|
|
8
8
|
export type BaseSearchResponseRedirect = {
|
|
9
9
|
index?: RedirectRuleIndexMetadata[];
|
|
@@ -6,12 +6,12 @@ export type BaseTrendingRequest = {
|
|
|
6
6
|
model: TrendingModels;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Facet name for trending models.
|
|
10
10
|
*/
|
|
11
11
|
facetName?: string;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Facet value for trending models.
|
|
15
15
|
*/
|
|
16
16
|
facetValue?: string;
|
|
17
17
|
};
|
|
@@ -1,47 +1,104 @@
|
|
|
1
1
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
|
+
import type { RecommendModels } from './recommendModels';
|
|
4
|
+
import type { SearchRecommendRulesParams } from './searchRecommendRulesParams';
|
|
5
|
+
|
|
3
6
|
/**
|
|
4
7
|
* Properties for the `del` method.
|
|
5
8
|
*/
|
|
6
9
|
export type DelProps = {
|
|
7
10
|
/**
|
|
8
|
-
*
|
|
11
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
9
12
|
*/
|
|
10
13
|
path: string;
|
|
11
14
|
/**
|
|
12
|
-
* Query parameters to
|
|
15
|
+
* Query parameters to apply to the current query.
|
|
13
16
|
*/
|
|
14
17
|
parameters?: Record<string, any>;
|
|
15
18
|
};
|
|
16
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Properties for the `deleteRecommendRule` method.
|
|
22
|
+
*/
|
|
23
|
+
export type DeleteRecommendRuleProps = {
|
|
24
|
+
/**
|
|
25
|
+
* Index on which to perform the request.
|
|
26
|
+
*/
|
|
27
|
+
indexName: string;
|
|
28
|
+
/**
|
|
29
|
+
* [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
30
|
+
*/
|
|
31
|
+
model: RecommendModels;
|
|
32
|
+
/**
|
|
33
|
+
* Unique record (object) identifier.
|
|
34
|
+
*/
|
|
35
|
+
objectID: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
17
38
|
/**
|
|
18
39
|
* Properties for the `get` method.
|
|
19
40
|
*/
|
|
20
41
|
export type GetProps = {
|
|
21
42
|
/**
|
|
22
|
-
*
|
|
43
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
23
44
|
*/
|
|
24
45
|
path: string;
|
|
25
46
|
/**
|
|
26
|
-
* Query parameters to
|
|
47
|
+
* Query parameters to apply to the current query.
|
|
27
48
|
*/
|
|
28
49
|
parameters?: Record<string, any>;
|
|
29
50
|
};
|
|
30
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Properties for the `getRecommendRule` method.
|
|
54
|
+
*/
|
|
55
|
+
export type GetRecommendRuleProps = {
|
|
56
|
+
/**
|
|
57
|
+
* Index on which to perform the request.
|
|
58
|
+
*/
|
|
59
|
+
indexName: string;
|
|
60
|
+
/**
|
|
61
|
+
* [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
62
|
+
*/
|
|
63
|
+
model: RecommendModels;
|
|
64
|
+
/**
|
|
65
|
+
* Unique record (object) identifier.
|
|
66
|
+
*/
|
|
67
|
+
objectID: string;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Properties for the `getRecommendStatus` method.
|
|
72
|
+
*/
|
|
73
|
+
export type GetRecommendStatusProps = {
|
|
74
|
+
/**
|
|
75
|
+
* Index on which to perform the request.
|
|
76
|
+
*/
|
|
77
|
+
indexName: string;
|
|
78
|
+
/**
|
|
79
|
+
* [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
80
|
+
*/
|
|
81
|
+
model: RecommendModels;
|
|
82
|
+
/**
|
|
83
|
+
* Unique identifier of a task. Numeric value (up to 64bits).
|
|
84
|
+
*/
|
|
85
|
+
taskID: number;
|
|
86
|
+
};
|
|
87
|
+
|
|
31
88
|
/**
|
|
32
89
|
* Properties for the `post` method.
|
|
33
90
|
*/
|
|
34
91
|
export type PostProps = {
|
|
35
92
|
/**
|
|
36
|
-
*
|
|
93
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
37
94
|
*/
|
|
38
95
|
path: string;
|
|
39
96
|
/**
|
|
40
|
-
* Query parameters to
|
|
97
|
+
* Query parameters to apply to the current query.
|
|
41
98
|
*/
|
|
42
99
|
parameters?: Record<string, any>;
|
|
43
100
|
/**
|
|
44
|
-
*
|
|
101
|
+
* Parameters to send with the custom request.
|
|
45
102
|
*/
|
|
46
103
|
body?: Record<string, any>;
|
|
47
104
|
};
|
|
@@ -51,15 +108,30 @@ export type PostProps = {
|
|
|
51
108
|
*/
|
|
52
109
|
export type PutProps = {
|
|
53
110
|
/**
|
|
54
|
-
*
|
|
111
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
55
112
|
*/
|
|
56
113
|
path: string;
|
|
57
114
|
/**
|
|
58
|
-
* Query parameters to
|
|
115
|
+
* Query parameters to apply to the current query.
|
|
59
116
|
*/
|
|
60
117
|
parameters?: Record<string, any>;
|
|
61
118
|
/**
|
|
62
|
-
*
|
|
119
|
+
* Parameters to send with the custom request.
|
|
63
120
|
*/
|
|
64
121
|
body?: Record<string, any>;
|
|
65
122
|
};
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Properties for the `searchRecommendRules` method.
|
|
126
|
+
*/
|
|
127
|
+
export type SearchRecommendRulesProps = {
|
|
128
|
+
/**
|
|
129
|
+
* Index on which to perform the request.
|
|
130
|
+
*/
|
|
131
|
+
indexName: string;
|
|
132
|
+
/**
|
|
133
|
+
* [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
134
|
+
*/
|
|
135
|
+
model: RecommendModels;
|
|
136
|
+
searchRecommendRulesParams?: SearchRecommendRulesParams;
|
|
137
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import type { Anchoring } from './anchoring';
|
|
4
|
+
|
|
5
|
+
export type Condition = {
|
|
6
|
+
/**
|
|
7
|
+
* Query pattern syntax.
|
|
8
|
+
*/
|
|
9
|
+
pattern?: string;
|
|
10
|
+
|
|
11
|
+
anchoring?: Anchoring;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Whether the pattern matches on plurals, synonyms, and typos.
|
|
15
|
+
*/
|
|
16
|
+
alternatives?: boolean;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Rule context format: [A-Za-z0-9_-]+).
|
|
20
|
+
*/
|
|
21
|
+
context?: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import type { ConsequenceHide } from './consequenceHide';
|
|
4
|
+
import type { ConsequenceParams } from './consequenceParams';
|
|
5
|
+
import type { Promote } from './promote';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule.
|
|
9
|
+
*/
|
|
10
|
+
export type Consequence = {
|
|
11
|
+
params?: ConsequenceParams;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Records to promote.
|
|
15
|
+
*/
|
|
16
|
+
promote?: Promote[];
|
|
17
|
+
|
|
18
|
+
/**
|
|
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.
|
|
20
|
+
*/
|
|
21
|
+
filterPromotes?: boolean;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Records to hide. By default, you can hide up to 50 records per rule.
|
|
25
|
+
*/
|
|
26
|
+
hide?: ConsequenceHide[];
|
|
27
|
+
|
|
28
|
+
/**
|
|
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.
|
|
30
|
+
*/
|
|
31
|
+
userData?: Record<string, any>;
|
|
32
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Unique identifier of the record to hide.
|
|
5
|
+
*/
|
|
6
|
+
export type ConsequenceHide = {
|
|
7
|
+
/**
|
|
8
|
+
* Unique object identifier.
|
|
9
|
+
*/
|
|
10
|
+
objectID: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import type { BaseSearchParamsWithoutQuery } from './baseSearchParamsWithoutQuery';
|
|
4
|
+
import type { IndexSettingsAsSearchParams } from './indexSettingsAsSearchParams';
|
|
5
|
+
import type { Params } from './params';
|
|
6
|
+
|
|
7
|
+
export type ConsequenceParams = BaseSearchParamsWithoutQuery &
|
|
8
|
+
IndexSettingsAsSearchParams &
|
|
9
|
+
Params;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import type { ConsequenceQueryObject } from './consequenceQueryObject';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* When providing a string, it replaces the entire query string. When providing an object, it describes incremental edits to be made to the query string (but you can\'t do both).
|
|
7
|
+
*/
|
|
8
|
+
export type ConsequenceQuery = ConsequenceQueryObject | string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import type { Edit } from './edit';
|
|
4
|
+
|
|
5
|
+
export type ConsequenceQueryObject = {
|
|
6
|
+
/**
|
|
7
|
+
* Words to remove.
|
|
8
|
+
*/
|
|
9
|
+
remove?: string[];
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Edits to apply.
|
|
13
|
+
*/
|
|
14
|
+
edits?: Edit[];
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Response, taskID, and deletion timestamp.
|
|
5
|
+
*/
|
|
6
|
+
export type DeletedAtResponse = {
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the `task` operation and this `taskID`.
|
|
9
|
+
*/
|
|
10
|
+
taskID: number;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
|
|
14
|
+
*/
|
|
15
|
+
deletedAt: string;
|
|
16
|
+
};
|
package/model/distinct.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Enables
|
|
4
|
+
* Enables [deduplication or grouping of results (Algolia\'s _distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature)).
|
|
5
5
|
*/
|
|
6
6
|
export type Distinct = boolean | number;
|
package/model/edit.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import type { EditType } from './editType';
|
|
4
|
+
|
|
5
|
+
export type Edit = {
|
|
6
|
+
type?: EditType;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Text or patterns to remove from the query string.
|
|
10
|
+
*/
|
|
11
|
+
delete?: string;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Text that should be inserted in place of the removed text inside the query string.
|
|
15
|
+
*/
|
|
16
|
+
insert?: string;
|
|
17
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the query contains only one word.
|
|
5
5
|
*/
|
|
6
6
|
export type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word';
|
package/model/facetFilters.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
import type { MixedSearchFilters } from './mixedSearchFilters';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Filter hits by facet value.
|
|
6
|
+
* [Filter hits by facet value](https://www.algolia.com/doc/api-reference/api-parameters/facetFilters/).
|
|
7
7
|
*/
|
|
8
8
|
export type FacetFilters = MixedSearchFilters[] | string;
|