@algolia/recommend 5.0.0-alpha.73 → 5.0.0-alpha.76

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.
Files changed (154) hide show
  1. package/dist/model/anchoring.d.ts +5 -0
  2. package/dist/model/anchoring.d.ts.map +1 -0
  3. package/dist/model/aroundRadius.d.ts +1 -1
  4. package/dist/model/automaticFacetFilter.d.ts +18 -0
  5. package/dist/model/automaticFacetFilter.d.ts.map +1 -0
  6. package/dist/model/automaticFacetFilters.d.ts +6 -0
  7. package/dist/model/automaticFacetFilters.d.ts.map +1 -0
  8. package/dist/model/baseRecommendRequest.d.ts +3 -3
  9. package/dist/model/baseRecommendationRequest.d.ts +1 -1
  10. package/dist/model/baseSearchParamsWithoutQuery.d.ts +25 -25
  11. package/dist/model/baseSearchResponse.d.ts +20 -20
  12. package/dist/model/baseSearchResponseRedirect.d.ts +1 -1
  13. package/dist/model/baseTrendingRequest.d.ts +2 -2
  14. package/dist/model/clientMethodProps.d.ts +77 -10
  15. package/dist/model/clientMethodProps.d.ts.map +1 -1
  16. package/dist/model/condition.d.ts +17 -0
  17. package/dist/model/condition.d.ts.map +1 -0
  18. package/dist/model/consequence.d.ts +26 -0
  19. package/dist/model/consequence.d.ts.map +1 -0
  20. package/dist/model/consequenceHide.d.ts +10 -0
  21. package/dist/model/consequenceHide.d.ts.map +1 -0
  22. package/dist/model/consequenceParams.d.ts +5 -0
  23. package/dist/model/consequenceParams.d.ts.map +1 -0
  24. package/dist/model/consequenceQuery.d.ts +6 -0
  25. package/dist/model/consequenceQuery.d.ts.map +1 -0
  26. package/dist/model/consequenceQueryObject.d.ts +12 -0
  27. package/dist/model/consequenceQueryObject.d.ts.map +1 -0
  28. package/dist/model/deletedAtResponse.d.ts +14 -0
  29. package/dist/model/deletedAtResponse.d.ts.map +1 -0
  30. package/dist/model/distinct.d.ts +1 -1
  31. package/dist/model/edit.d.ts +13 -0
  32. package/dist/model/edit.d.ts.map +1 -0
  33. package/dist/model/editType.d.ts +5 -0
  34. package/dist/model/editType.d.ts.map +1 -0
  35. package/dist/model/exactOnSingleWordQuery.d.ts +1 -1
  36. package/dist/model/facetFilters.d.ts +1 -1
  37. package/dist/model/facetOrdering.d.ts +2 -2
  38. package/dist/model/facets.d.ts +1 -1
  39. package/dist/model/facetsStats.d.ts +4 -4
  40. package/dist/model/getRecommendTaskResponse.d.ts +5 -0
  41. package/dist/model/getRecommendTaskResponse.d.ts.map +1 -0
  42. package/dist/model/getRecommendationsParams.d.ts +2 -2
  43. package/dist/model/highlightResultOption.d.ts +1 -1
  44. package/dist/model/ignorePlurals.d.ts +1 -1
  45. package/dist/model/index.d.ts +23 -0
  46. package/dist/model/index.d.ts.map +1 -1
  47. package/dist/model/indexSettingsAsSearchParams.d.ts +30 -30
  48. package/dist/model/indexSettingsAsSearchParamsSemanticSearch.d.ts +2 -2
  49. package/dist/model/mode.d.ts +1 -1
  50. package/dist/model/numericFilters.d.ts +1 -1
  51. package/dist/model/optionalFilters.d.ts +1 -1
  52. package/dist/model/params.d.ts +13 -0
  53. package/dist/model/params.d.ts.map +1 -0
  54. package/dist/model/promote.d.ts +4 -0
  55. package/dist/model/promote.d.ts.map +1 -0
  56. package/dist/model/promoteObjectID.d.ts +14 -0
  57. package/dist/model/promoteObjectID.d.ts.map +1 -0
  58. package/dist/model/promoteObjectIDs.d.ts +14 -0
  59. package/dist/model/promoteObjectIDs.d.ts.map +1 -0
  60. package/dist/model/queryType.d.ts +1 -1
  61. package/dist/model/reRankingApplyFilter.d.ts +1 -1
  62. package/dist/model/recommendHit.d.ts +3 -3
  63. package/dist/model/recommendModels.d.ts +2 -0
  64. package/dist/model/recommendModels.d.ts.map +1 -0
  65. package/dist/model/recommendationModels.d.ts +1 -1
  66. package/dist/model/redirectRuleIndexMetadata.d.ts +1 -1
  67. package/dist/model/redirectRuleIndexMetadataData.d.ts +1 -1
  68. package/dist/model/removeStopWords.d.ts +1 -1
  69. package/dist/model/removeWordsIfNoResults.d.ts +1 -1
  70. package/dist/model/renderingContent.d.ts +1 -1
  71. package/dist/model/ruleResponse.d.ts +27 -0
  72. package/dist/model/ruleResponse.d.ts.map +1 -0
  73. package/dist/model/ruleResponseMetadata.d.ts +7 -0
  74. package/dist/model/ruleResponseMetadata.d.ts.map +1 -0
  75. package/dist/model/searchParamsQuery.d.ts +1 -1
  76. package/dist/model/searchRecommendRulesParams.d.ts +30 -0
  77. package/dist/model/searchRecommendRulesParams.d.ts.map +1 -0
  78. package/dist/model/searchRecommendRulesResponse.d.ts +20 -0
  79. package/dist/model/searchRecommendRulesResponse.d.ts.map +1 -0
  80. package/dist/model/snippetResultOption.d.ts +1 -1
  81. package/dist/model/sortRemainingBy.d.ts +1 -1
  82. package/dist/model/tagFilters.d.ts +1 -1
  83. package/dist/model/taskStatus.d.ts +5 -0
  84. package/dist/model/taskStatus.d.ts.map +1 -0
  85. package/dist/model/trendingModels.d.ts +1 -1
  86. package/dist/model/typoTolerance.d.ts +1 -1
  87. package/dist/recommend.cjs.js +148 -15
  88. package/dist/recommend.esm.browser.js +148 -13
  89. package/dist/recommend.esm.node.js +148 -13
  90. package/dist/recommend.umd.js +2 -2
  91. package/dist/src/recommendClient.d.ts +62 -14
  92. package/dist/src/recommendClient.d.ts.map +1 -1
  93. package/model/anchoring.ts +6 -0
  94. package/model/aroundRadius.ts +1 -1
  95. package/model/automaticFacetFilter.ts +21 -0
  96. package/model/automaticFacetFilters.ts +8 -0
  97. package/model/baseRecommendRequest.ts +3 -3
  98. package/model/baseRecommendationRequest.ts +1 -1
  99. package/model/baseSearchParamsWithoutQuery.ts +25 -25
  100. package/model/baseSearchResponse.ts +20 -20
  101. package/model/baseSearchResponseRedirect.ts +1 -1
  102. package/model/baseTrendingRequest.ts +2 -2
  103. package/model/clientMethodProps.ts +82 -10
  104. package/model/condition.ts +22 -0
  105. package/model/consequence.ts +32 -0
  106. package/model/consequenceHide.ts +11 -0
  107. package/model/consequenceParams.ts +9 -0
  108. package/model/consequenceQuery.ts +8 -0
  109. package/model/consequenceQueryObject.ts +15 -0
  110. package/model/deletedAtResponse.ts +16 -0
  111. package/model/distinct.ts +1 -1
  112. package/model/edit.ts +17 -0
  113. package/model/editType.ts +6 -0
  114. package/model/exactOnSingleWordQuery.ts +1 -1
  115. package/model/facetFilters.ts +1 -1
  116. package/model/facetOrdering.ts +2 -2
  117. package/model/facets.ts +1 -1
  118. package/model/facetsStats.ts +4 -4
  119. package/model/getRecommendTaskResponse.ts +7 -0
  120. package/model/getRecommendationsParams.ts +2 -2
  121. package/model/highlightResultOption.ts +1 -1
  122. package/model/ignorePlurals.ts +1 -1
  123. package/model/index.ts +23 -0
  124. package/model/indexSettingsAsSearchParams.ts +30 -30
  125. package/model/indexSettingsAsSearchParamsSemanticSearch.ts +2 -2
  126. package/model/mode.ts +1 -1
  127. package/model/numericFilters.ts +1 -1
  128. package/model/optionalFilters.ts +1 -1
  129. package/model/params.ts +18 -0
  130. package/model/promote.ts +6 -0
  131. package/model/promoteObjectID.ts +16 -0
  132. package/model/promoteObjectIDs.ts +16 -0
  133. package/model/queryType.ts +1 -1
  134. package/model/reRankingApplyFilter.ts +1 -1
  135. package/model/recommendHit.ts +3 -3
  136. package/model/recommendModels.ts +7 -0
  137. package/model/recommendationModels.ts +1 -1
  138. package/model/redirectRuleIndexMetadata.ts +1 -1
  139. package/model/redirectRuleIndexMetadataData.ts +1 -1
  140. package/model/removeStopWords.ts +1 -1
  141. package/model/removeWordsIfNoResults.ts +1 -1
  142. package/model/renderingContent.ts +1 -1
  143. package/model/ruleResponse.ts +34 -0
  144. package/model/ruleResponseMetadata.ts +8 -0
  145. package/model/searchParamsQuery.ts +1 -1
  146. package/model/searchRecommendRulesParams.ts +36 -0
  147. package/model/searchRecommendRulesResponse.ts +25 -0
  148. package/model/snippetResultOption.ts +1 -1
  149. package/model/sortRemainingBy.ts +1 -1
  150. package/model/tagFilters.ts +1 -1
  151. package/model/taskStatus.ts +6 -0
  152. package/model/trendingModels.ts +1 -1
  153. package/model/typoTolerance.ts +1 -1
  154. package/package.json +8 -7
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`).
3
+ */
4
+ export type Anchoring = 'contains' | 'endsWith' | 'is' | 'startsWith';
5
+ //# sourceMappingURL=anchoring.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anchoring.d.ts","sourceRoot":"","sources":["../../model/anchoring.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI,GAAG,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { AroundRadiusAll } from './aroundRadiusAll';
2
2
  /**
3
- * Define the maximum radius for a geo search (in meters).
3
+ * [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters).
4
4
  */
5
5
  export type AroundRadius = AroundRadiusAll | number;
6
6
  //# sourceMappingURL=aroundRadius.d.ts.map
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Automatic facet Filter.
3
+ */
4
+ export type AutomaticFacetFilter = {
5
+ /**
6
+ * Attribute to filter on. This must match a facet placeholder in the Rule\'s pattern.
7
+ */
8
+ facet: string;
9
+ /**
10
+ * Score for the filter. Typically used for optional or disjunctive filters.
11
+ */
12
+ score?: number;
13
+ /**
14
+ * Whether the filter is disjunctive (true) or conjunctive (false).
15
+ */
16
+ disjunctive?: boolean;
17
+ };
18
+ //# sourceMappingURL=automaticFacetFilter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automaticFacetFilter.d.ts","sourceRoot":"","sources":["../../model/automaticFacetFilter.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { AutomaticFacetFilter } from './automaticFacetFilter';
2
+ /**
3
+ * Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern.
4
+ */
5
+ export type AutomaticFacetFilters = AutomaticFacetFilter[] | string[];
6
+ //# sourceMappingURL=automaticFacetFilters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automaticFacetFilters.d.ts","sourceRoot":"","sources":["../../model/automaticFacetFilters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,oBAAoB,EAAE,GAAG,MAAM,EAAE,CAAC"}
@@ -1,15 +1,15 @@
1
1
  import type { SearchParamsObject } from './searchParamsObject';
2
2
  export type BaseRecommendRequest = {
3
3
  /**
4
- * The Algolia index name.
4
+ * Algolia index name.
5
5
  */
6
6
  indexName: string;
7
7
  /**
8
- * The threshold to use when filtering recommendations by their score.
8
+ * Recommendations with a confidence score lower than `threshold` won\'t appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are.
9
9
  */
10
10
  threshold: number;
11
11
  /**
12
- * The max number of recommendations to retrieve. If it\'s set to 0, all the recommendations of the objectID may be returned.
12
+ * Maximum number of recommendations to retrieve. If 0, all recommendations will be returned.
13
13
  */
14
14
  maxRecommendations?: number;
15
15
  queryParameters?: SearchParamsObject;
@@ -2,7 +2,7 @@ import type { RecommendationModels } from './recommendationModels';
2
2
  export type BaseRecommendationRequest = {
3
3
  model: RecommendationModels;
4
4
  /**
5
- * Unique identifier of the object.
5
+ * Unique object identifier.
6
6
  */
7
7
  objectID: string;
8
8
  };
@@ -6,11 +6,11 @@ import type { ReRankingApplyFilter } from './reRankingApplyFilter';
6
6
  import type { TagFilters } from './tagFilters';
7
7
  export type BaseSearchParamsWithoutQuery = {
8
8
  /**
9
- * Overrides the query parameter and performs a more generic search that can be used to find \"similar\" results.
9
+ * Overrides the query parameter and performs a more generic search.
10
10
  */
11
11
  similarQuery?: string;
12
12
  /**
13
- * Filter the query with numeric, facet and/or tag filters.
13
+ * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters.
14
14
  */
15
15
  filters?: string;
16
16
  facetFilters?: FacetFilters;
@@ -18,19 +18,19 @@ export type BaseSearchParamsWithoutQuery = {
18
18
  numericFilters?: NumericFilters;
19
19
  tagFilters?: TagFilters;
20
20
  /**
21
- * Determines how to calculate the total score for filtering.
21
+ * 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.
22
22
  */
23
23
  sumOrFiltersScores?: boolean;
24
24
  /**
25
- * Retrieve facets and their facet values.
25
+ * 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.
26
26
  */
27
27
  facets?: string[];
28
28
  /**
29
- * Maximum number of facet values to return for each facet during a regular search.
29
+ * Maximum number of facet values to return for each facet.
30
30
  */
31
31
  maxValuesPerFacet?: number;
32
32
  /**
33
- * Force faceting to be applied after de-duplication (via the Distinct setting).
33
+ * 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.
34
34
  */
35
35
  facetingAfterDistinct?: boolean;
36
36
  /**
@@ -38,72 +38,72 @@ export type BaseSearchParamsWithoutQuery = {
38
38
  */
39
39
  sortFacetValuesBy?: string;
40
40
  /**
41
- * Specify the page to retrieve.
41
+ * Page to retrieve (the first page is `0`, not `1`).
42
42
  */
43
43
  page?: number;
44
44
  /**
45
- * Specify the offset of the first hit to return.
45
+ * 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).
46
46
  */
47
47
  offset?: number;
48
48
  /**
49
- * Set the number of hits to retrieve (used only with offset).
49
+ * 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).
50
50
  */
51
51
  length?: number;
52
52
  /**
53
- * Search for entries around a central geolocation, enabling a geo search within a circular area.
53
+ * 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.
54
54
  */
55
55
  aroundLatLng?: string;
56
56
  /**
57
- * Search for entries around a given location automatically computed from the requester\'s IP address.
57
+ * Search for entries around a location. The location is automatically computed from the requester\'s IP address.
58
58
  */
59
59
  aroundLatLngViaIP?: boolean;
60
60
  aroundRadius?: AroundRadius;
61
61
  /**
62
- * Precision of geo search (in meters), to add grouping by geo location to the ranking formula.
62
+ * 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/).
63
63
  */
64
64
  aroundPrecision?: number;
65
65
  /**
66
- * Minimum radius (in meters) used for a geo search when aroundRadius is not set.
66
+ * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn\'t set.
67
67
  */
68
68
  minimumAroundRadius?: number;
69
69
  /**
70
- * Search inside a rectangular area (in geo coordinates).
70
+ * 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).
71
71
  */
72
72
  insideBoundingBox?: number[];
73
73
  /**
74
- * Search inside a polygon (in geo coordinates).
74
+ * Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).
75
75
  */
76
76
  insidePolygon?: number[];
77
77
  /**
78
- * This parameter changes the default values of certain parameters and settings that work best for a natural language query, such as ignorePlurals, removeStopWords, removeWordsIfNoResults, analyticsTags and ruleContexts. These parameters and settings work well together when the query is formatted in natural language instead of keywords, for example when your user performs a voice search.
78
+ * 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.
79
79
  */
80
80
  naturalLanguages?: string[];
81
81
  /**
82
- * Enables contextual rules.
82
+ * 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.
83
83
  */
84
84
  ruleContexts?: string[];
85
85
  /**
86
- * Define the impact of the Personalization feature.
86
+ * Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
87
87
  */
88
88
  personalizationImpact?: number;
89
89
  /**
90
- * Associates a certain user token with the current search.
90
+ * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.
91
91
  */
92
92
  userToken?: string;
93
93
  /**
94
- * Retrieve detailed ranking information.
94
+ * 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).
95
95
  */
96
96
  getRankingInfo?: boolean;
97
97
  /**
98
- * Enable the Click Analytics feature.
98
+ * 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).
99
99
  */
100
100
  clickAnalytics?: boolean;
101
101
  /**
102
- * Whether the current query will be taken into account in the Analytics.
102
+ * Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).
103
103
  */
104
104
  analytics?: boolean;
105
105
  /**
106
- * List of tags to apply to the query for analytics purposes.
106
+ * Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
107
107
  */
108
108
  analyticsTags?: string[];
109
109
  /**
@@ -111,11 +111,11 @@ export type BaseSearchParamsWithoutQuery = {
111
111
  */
112
112
  percentileComputation?: boolean;
113
113
  /**
114
- * Whether this search should participate in running AB tests.
114
+ * Incidates whether this search will be considered in A/B testing.
115
115
  */
116
116
  enableABTest?: boolean;
117
117
  /**
118
- * Whether this search should use AI Re-Ranking.
118
+ * Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
119
119
  */
120
120
  enableReRanking?: boolean;
121
121
  reRankingApplyFilter?: ReRankingApplyFilter | null;
@@ -3,35 +3,35 @@ import type { FacetsStats } from './facetsStats';
3
3
  import type { RenderingContent } from './renderingContent';
4
4
  export type BaseSearchResponse = {
5
5
  /**
6
- * If a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID.
6
+ * A/B test ID. This is only included in the response for indices that are part of an A/B test.
7
7
  */
8
8
  abTestID?: number;
9
9
  /**
10
- * If a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used (starting at 1).
10
+ * Variant ID. This is only included in the response for indices that are part of an A/B test.
11
11
  */
12
12
  abTestVariantID?: number;
13
13
  /**
14
- * The computed geo location.
14
+ * Computed geographical location.
15
15
  */
16
16
  aroundLatLng?: string;
17
17
  /**
18
- * The automatically computed radius. For legacy reasons, this parameter is a string and not an integer.
18
+ * Automatically-computed radius.
19
19
  */
20
20
  automaticRadius?: string;
21
21
  /**
22
- * Whether the facet count is exhaustive or approximate.
22
+ * Indicates whether the facet count is exhaustive (exact) or approximate.
23
23
  */
24
24
  exhaustiveFacetsCount?: boolean;
25
25
  /**
26
- * Indicate if the nbHits count was exhaustive or approximate.
26
+ * Indicates whether the number of hits `nbHits` is exhaustive (exact) or approximate.
27
27
  */
28
28
  exhaustiveNbHits: boolean;
29
29
  /**
30
- * Indicate if the typo-tolerance search was exhaustive or approximate (only included when typo-tolerance is enabled).
30
+ * Indicates whether the search for typos was exhaustive (exact) or approximate.
31
31
  */
32
32
  exhaustiveTypo?: boolean;
33
33
  /**
34
- * A mapping of each facet name to the corresponding facet counts.
34
+ * Mapping of each facet name to the corresponding facet counts.
35
35
  */
36
36
  facets?: Record<string, Record<string, number>>;
37
37
  /**
@@ -39,7 +39,7 @@ export type BaseSearchResponse = {
39
39
  */
40
40
  facets_stats?: Record<string, FacetsStats>;
41
41
  /**
42
- * Set the number of hits per page.
42
+ * Number of hits per page.
43
43
  */
44
44
  hitsPerPage: number;
45
45
  /**
@@ -47,36 +47,36 @@ export type BaseSearchResponse = {
47
47
  */
48
48
  index?: string;
49
49
  /**
50
- * 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.
50
+ * Index name used for the query. During A/B testing, the targeted index isn\'t always the index used by the query.
51
51
  */
52
52
  indexUsed?: string;
53
53
  /**
54
- * Used to return warnings about the query.
54
+ * Warnings about the query.
55
55
  */
56
56
  message?: string;
57
57
  /**
58
- * Number of hits that the search query matched.
58
+ * Number of hits the search query matched.
59
59
  */
60
60
  nbHits: number;
61
61
  /**
62
- * Number of pages available for the current query.
62
+ * Number of pages of results for the current query.
63
63
  */
64
64
  nbPages: number;
65
65
  /**
66
- * The number of hits selected and sorted by the relevant sort algorithm.
66
+ * Number of hits selected and sorted by the relevant sort algorithm.
67
67
  */
68
68
  nbSortedHits?: number;
69
69
  /**
70
- * Specify the page to retrieve.
70
+ * Page to retrieve (the first page is `0`, not `1`).
71
71
  */
72
72
  page: number;
73
73
  /**
74
- * A url-encoded string of all search parameters.
74
+ * URL-encoded string of all search parameters.
75
75
  */
76
76
  params: string;
77
77
  redirect?: BaseSearchResponseRedirect;
78
78
  /**
79
- * The query string that will be searched, after normalization.
79
+ * 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.
80
80
  */
81
81
  parsedQuery?: string;
82
82
  /**
@@ -84,15 +84,15 @@ export type BaseSearchResponse = {
84
84
  */
85
85
  processingTimeMS: number;
86
86
  /**
87
- * The text to search in the index.
87
+ * Text to search for in an index.
88
88
  */
89
89
  query: string;
90
90
  /**
91
- * A markup text indicating which parts of the original query have been removed in order to retrieve a non-empty result set.
91
+ * Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set.
92
92
  */
93
93
  queryAfterRemoval?: string;
94
94
  /**
95
- * Actual host name of the server that processed the request.
95
+ * Host name of the server that processed the request.
96
96
  */
97
97
  serverUsed?: string;
98
98
  /**
@@ -1,6 +1,6 @@
1
1
  import type { RedirectRuleIndexMetadata } from './redirectRuleIndexMetadata';
2
2
  /**
3
- * This parameter is for internal use only.
3
+ * [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/).
4
4
  */
5
5
  export type BaseSearchResponseRedirect = {
6
6
  index?: RedirectRuleIndexMetadata[];
@@ -2,11 +2,11 @@ import type { TrendingModels } from './trendingModels';
2
2
  export type BaseTrendingRequest = {
3
3
  model: TrendingModels;
4
4
  /**
5
- * The facet name to use for trending models.
5
+ * Facet name for trending models.
6
6
  */
7
7
  facetName?: string;
8
8
  /**
9
- * The facet value to use for trending models.
9
+ * Facet value for trending models.
10
10
  */
11
11
  facetValue?: string;
12
12
  };
@@ -1,43 +1,96 @@
1
+ import type { RecommendModels } from './recommendModels';
2
+ import type { SearchRecommendRulesParams } from './searchRecommendRulesParams';
1
3
  /**
2
4
  * Properties for the `del` method.
3
5
  */
4
6
  export type DelProps = {
5
7
  /**
6
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
8
+ * Path of the endpoint, anything after \"/1\" must be specified.
7
9
  */
8
10
  path: string;
9
11
  /**
10
- * Query parameters to be applied to the current query.
12
+ * Query parameters to apply to the current query.
11
13
  */
12
14
  parameters?: Record<string, any>;
13
15
  };
16
+ /**
17
+ * Properties for the `deleteRecommendRule` method.
18
+ */
19
+ export type DeleteRecommendRuleProps = {
20
+ /**
21
+ * Index on which to perform the request.
22
+ */
23
+ indexName: string;
24
+ /**
25
+ * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
26
+ */
27
+ model: RecommendModels;
28
+ /**
29
+ * Unique record (object) identifier.
30
+ */
31
+ objectID: string;
32
+ };
14
33
  /**
15
34
  * Properties for the `get` method.
16
35
  */
17
36
  export type GetProps = {
18
37
  /**
19
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
38
+ * Path of the endpoint, anything after \"/1\" must be specified.
20
39
  */
21
40
  path: string;
22
41
  /**
23
- * Query parameters to be applied to the current query.
42
+ * Query parameters to apply to the current query.
24
43
  */
25
44
  parameters?: Record<string, any>;
26
45
  };
46
+ /**
47
+ * Properties for the `getRecommendRule` method.
48
+ */
49
+ export type GetRecommendRuleProps = {
50
+ /**
51
+ * Index on which to perform the request.
52
+ */
53
+ indexName: string;
54
+ /**
55
+ * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
56
+ */
57
+ model: RecommendModels;
58
+ /**
59
+ * Unique record (object) identifier.
60
+ */
61
+ objectID: string;
62
+ };
63
+ /**
64
+ * Properties for the `getRecommendStatus` method.
65
+ */
66
+ export type GetRecommendStatusProps = {
67
+ /**
68
+ * Index on which to perform the request.
69
+ */
70
+ indexName: string;
71
+ /**
72
+ * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
73
+ */
74
+ model: RecommendModels;
75
+ /**
76
+ * Unique identifier of a task. Numeric value (up to 64bits).
77
+ */
78
+ taskID: number;
79
+ };
27
80
  /**
28
81
  * Properties for the `post` method.
29
82
  */
30
83
  export type PostProps = {
31
84
  /**
32
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
85
+ * Path of the endpoint, anything after \"/1\" must be specified.
33
86
  */
34
87
  path: string;
35
88
  /**
36
- * Query parameters to be applied to the current query.
89
+ * Query parameters to apply to the current query.
37
90
  */
38
91
  parameters?: Record<string, any>;
39
92
  /**
40
- * The parameters to send with the custom request.
93
+ * Parameters to send with the custom request.
41
94
  */
42
95
  body?: Record<string, any>;
43
96
  };
@@ -46,16 +99,30 @@ export type PostProps = {
46
99
  */
47
100
  export type PutProps = {
48
101
  /**
49
- * The path of the API endpoint to target, anything after the /1 needs to be specified.
102
+ * Path of the endpoint, anything after \"/1\" must be specified.
50
103
  */
51
104
  path: string;
52
105
  /**
53
- * Query parameters to be applied to the current query.
106
+ * Query parameters to apply to the current query.
54
107
  */
55
108
  parameters?: Record<string, any>;
56
109
  /**
57
- * The parameters to send with the custom request.
110
+ * Parameters to send with the custom request.
58
111
  */
59
112
  body?: Record<string, any>;
60
113
  };
114
+ /**
115
+ * Properties for the `searchRecommendRules` method.
116
+ */
117
+ export type SearchRecommendRulesProps = {
118
+ /**
119
+ * Index on which to perform the request.
120
+ */
121
+ indexName: string;
122
+ /**
123
+ * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
124
+ */
125
+ model: RecommendModels;
126
+ searchRecommendRulesParams?: SearchRecommendRulesParams;
127
+ };
61
128
  //# sourceMappingURL=clientMethodProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH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,KAAK,EAAE,eAAe,CAAC;IACvB,0BAA0B,CAAC,EAAE,0BAA0B,CAAC;CACzD,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { Anchoring } from './anchoring';
2
+ export type Condition = {
3
+ /**
4
+ * Query pattern syntax.
5
+ */
6
+ pattern?: string;
7
+ anchoring?: Anchoring;
8
+ /**
9
+ * Whether the pattern matches on plurals, synonyms, and typos.
10
+ */
11
+ alternatives?: boolean;
12
+ /**
13
+ * Rule context format: [A-Za-z0-9_-]+).
14
+ */
15
+ context?: string;
16
+ };
17
+ //# sourceMappingURL=condition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../../model/condition.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { ConsequenceHide } from './consequenceHide';
2
+ import type { ConsequenceParams } from './consequenceParams';
3
+ import type { Promote } from './promote';
4
+ /**
5
+ * [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule.
6
+ */
7
+ export type Consequence = {
8
+ params?: ConsequenceParams;
9
+ /**
10
+ * Records to promote.
11
+ */
12
+ promote?: Promote[];
13
+ /**
14
+ * 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.
15
+ */
16
+ filterPromotes?: boolean;
17
+ /**
18
+ * Records to hide. By default, you can hide up to 50 records per rule.
19
+ */
20
+ hide?: ConsequenceHide[];
21
+ /**
22
+ * 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.
23
+ */
24
+ userData?: Record<string, any>;
25
+ };
26
+ //# sourceMappingURL=consequence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consequence.d.ts","sourceRoot":"","sources":["../../model/consequence.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAE3B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC;IAEpB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,eAAe,EAAE,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Unique identifier of the record to hide.
3
+ */
4
+ export type ConsequenceHide = {
5
+ /**
6
+ * Unique object identifier.
7
+ */
8
+ objectID: string;
9
+ };
10
+ //# sourceMappingURL=consequenceHide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consequenceHide.d.ts","sourceRoot":"","sources":["../../model/consequenceHide.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { BaseSearchParamsWithoutQuery } from './baseSearchParamsWithoutQuery';
2
+ import type { IndexSettingsAsSearchParams } from './indexSettingsAsSearchParams';
3
+ import type { Params } from './params';
4
+ export type ConsequenceParams = BaseSearchParamsWithoutQuery & IndexSettingsAsSearchParams & Params;
5
+ //# sourceMappingURL=consequenceParams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consequenceParams.d.ts","sourceRoot":"","sources":["../../model/consequenceParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,MAAM,MAAM,iBAAiB,GAAG,4BAA4B,GAC1D,2BAA2B,GAC3B,MAAM,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { ConsequenceQueryObject } from './consequenceQueryObject';
2
+ /**
3
+ * 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).
4
+ */
5
+ export type ConsequenceQuery = ConsequenceQueryObject | string;
6
+ //# sourceMappingURL=consequenceQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consequenceQuery.d.ts","sourceRoot":"","sources":["../../model/consequenceQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GAAG,MAAM,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { Edit } from './edit';
2
+ export type ConsequenceQueryObject = {
3
+ /**
4
+ * Words to remove.
5
+ */
6
+ remove?: string[];
7
+ /**
8
+ * Edits to apply.
9
+ */
10
+ edits?: Edit[];
11
+ };
12
+ //# sourceMappingURL=consequenceQueryObject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consequenceQueryObject.d.ts","sourceRoot":"","sources":["../../model/consequenceQueryObject.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;CAChB,CAAC"}