@algolia/recommend 5.0.0-alpha.106 → 5.0.0-alpha.107

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 (121) hide show
  1. package/dist/model/anchoring.d.ts +1 -1
  2. package/dist/model/aroundPrecision.d.ts +1 -1
  3. package/dist/model/aroundPrecisionFromValueInner.d.ts +9 -0
  4. package/dist/model/aroundPrecisionFromValueInner.d.ts.map +1 -1
  5. package/dist/model/aroundRadius.d.ts +1 -1
  6. package/dist/model/aroundRadiusAll.d.ts +3 -0
  7. package/dist/model/aroundRadiusAll.d.ts.map +1 -1
  8. package/dist/model/automaticFacetFilter.d.ts +4 -4
  9. package/dist/model/automaticFacetFilters.d.ts +1 -1
  10. package/dist/model/baseRecommendRequest.d.ts +1 -1
  11. package/dist/model/baseRecommendationsQuery.d.ts +1 -1
  12. package/dist/model/baseRecommendedForYouQueryParameters.d.ts +1 -1
  13. package/dist/model/baseSearchParamsWithoutQuery.d.ts +24 -28
  14. package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  15. package/dist/model/baseSearchResponse.d.ts +6 -6
  16. package/dist/model/clientMethodProps.d.ts +6 -6
  17. package/dist/model/condition.d.ts +7 -3
  18. package/dist/model/condition.d.ts.map +1 -1
  19. package/dist/model/consequence.d.ts +5 -5
  20. package/dist/model/consequenceHide.d.ts +2 -2
  21. package/dist/model/consequenceQuery.d.ts +1 -1
  22. package/dist/model/consequenceQueryObject.d.ts +2 -2
  23. package/dist/model/deletedAtResponse.d.ts +1 -1
  24. package/dist/model/distinct.d.ts +1 -1
  25. package/dist/model/edit.d.ts +1 -1
  26. package/dist/model/exactOnSingleWordQuery.d.ts +1 -1
  27. package/dist/model/facetFilters.d.ts +1 -1
  28. package/dist/model/facetOrdering.d.ts +2 -2
  29. package/dist/model/facets.d.ts +2 -2
  30. package/dist/model/highlightResultOption.d.ts +3 -3
  31. package/dist/model/ignorePlurals.d.ts +1 -1
  32. package/dist/model/indexSettingsAsSearchParams.d.ts +30 -34
  33. package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  34. package/dist/model/matchLevel.d.ts +1 -1
  35. package/dist/model/mode.d.ts +1 -1
  36. package/dist/model/numericFilters.d.ts +1 -1
  37. package/dist/model/optionalFilters.d.ts +1 -1
  38. package/dist/model/params.d.ts +1 -1
  39. package/dist/model/promoteObjectID.d.ts +2 -2
  40. package/dist/model/promoteObjectIDs.d.ts +2 -2
  41. package/dist/model/queryType.d.ts +1 -1
  42. package/dist/model/rankingInfo.d.ts +10 -7
  43. package/dist/model/rankingInfo.d.ts.map +1 -1
  44. package/dist/model/reRankingApplyFilter.d.ts +1 -1
  45. package/dist/model/recommendHit.d.ts +3 -3
  46. package/dist/model/recommendationsHits.d.ts +1 -1
  47. package/dist/model/removeStopWords.d.ts +1 -1
  48. package/dist/model/removeWordsIfNoResults.d.ts +1 -1
  49. package/dist/model/renderingContent.d.ts +1 -1
  50. package/dist/model/searchParamsQuery.d.ts +1 -1
  51. package/dist/model/searchRecommendRulesParams.d.ts +2 -2
  52. package/dist/model/searchRecommendRulesResponse.d.ts +3 -3
  53. package/dist/model/semanticSearch.d.ts +2 -2
  54. package/dist/model/snippetResultOption.d.ts +2 -2
  55. package/dist/model/sortRemainingBy.d.ts +1 -1
  56. package/dist/model/tagFilters.d.ts +1 -1
  57. package/dist/model/taskStatus.d.ts +1 -1
  58. package/dist/model/typoTolerance.d.ts +1 -1
  59. package/dist/model/typoToleranceEnum.d.ts +3 -0
  60. package/dist/model/typoToleranceEnum.d.ts.map +1 -1
  61. package/dist/model/value.d.ts +1 -1
  62. package/dist/recommend.cjs +7 -7
  63. package/dist/recommend.esm.browser.js +7 -7
  64. package/dist/recommend.esm.node.js +7 -7
  65. package/dist/recommend.umd.js +2 -2
  66. package/dist/src/recommendClient.d.ts +7 -7
  67. package/model/anchoring.ts +1 -1
  68. package/model/aroundPrecision.ts +1 -1
  69. package/model/aroundPrecisionFromValueInner.ts +9 -0
  70. package/model/aroundRadius.ts +1 -1
  71. package/model/aroundRadiusAll.ts +3 -0
  72. package/model/automaticFacetFilter.ts +4 -4
  73. package/model/automaticFacetFilters.ts +1 -1
  74. package/model/baseRecommendRequest.ts +1 -1
  75. package/model/baseRecommendationsQuery.ts +1 -1
  76. package/model/baseRecommendedForYouQueryParameters.ts +1 -1
  77. package/model/baseSearchParamsWithoutQuery.ts +24 -29
  78. package/model/baseSearchResponse.ts +6 -6
  79. package/model/clientMethodProps.ts +6 -6
  80. package/model/condition.ts +8 -3
  81. package/model/consequence.ts +5 -5
  82. package/model/consequenceHide.ts +2 -2
  83. package/model/consequenceQuery.ts +1 -1
  84. package/model/consequenceQueryObject.ts +2 -2
  85. package/model/deletedAtResponse.ts +1 -1
  86. package/model/distinct.ts +1 -1
  87. package/model/edit.ts +1 -1
  88. package/model/exactOnSingleWordQuery.ts +1 -1
  89. package/model/facetFilters.ts +1 -1
  90. package/model/facetOrdering.ts +2 -2
  91. package/model/facets.ts +2 -2
  92. package/model/highlightResultOption.ts +3 -3
  93. package/model/ignorePlurals.ts +1 -1
  94. package/model/indexSettingsAsSearchParams.ts +30 -35
  95. package/model/matchLevel.ts +1 -1
  96. package/model/mode.ts +1 -1
  97. package/model/numericFilters.ts +1 -1
  98. package/model/optionalFilters.ts +1 -1
  99. package/model/params.ts +1 -1
  100. package/model/promoteObjectID.ts +2 -2
  101. package/model/promoteObjectIDs.ts +2 -2
  102. package/model/queryType.ts +1 -1
  103. package/model/rankingInfo.ts +10 -7
  104. package/model/reRankingApplyFilter.ts +1 -1
  105. package/model/recommendHit.ts +3 -3
  106. package/model/recommendationsHits.ts +1 -1
  107. package/model/removeStopWords.ts +1 -1
  108. package/model/removeWordsIfNoResults.ts +1 -1
  109. package/model/renderingContent.ts +1 -1
  110. package/model/searchParamsQuery.ts +1 -1
  111. package/model/searchRecommendRulesParams.ts +2 -2
  112. package/model/searchRecommendRulesResponse.ts +3 -3
  113. package/model/semanticSearch.ts +2 -2
  114. package/model/snippetResultOption.ts +2 -2
  115. package/model/sortRemainingBy.ts +1 -1
  116. package/model/tagFilters.ts +1 -1
  117. package/model/taskStatus.ts +1 -1
  118. package/model/typoTolerance.ts +1 -1
  119. package/model/typoToleranceEnum.ts +3 -0
  120. package/model/value.ts +1 -1
  121. package/package.json +7 -7
@@ -5,12 +5,12 @@
5
5
  */
6
6
  export type PromoteObjectID = {
7
7
  /**
8
- * Unique identifier of the record to promote.
8
+ * Unique record identifier.
9
9
  */
10
10
  objectID: string;
11
11
 
12
12
  /**
13
- * The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions.
13
+ * Position in the search results where you want to show the promoted records.
14
14
  */
15
15
  position: number;
16
16
  };
@@ -5,12 +5,12 @@
5
5
  */
6
6
  export type PromoteObjectIDs = {
7
7
  /**
8
- * Unique identifiers of the records to promote.
8
+ * Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results.
9
9
  */
10
10
  objectIDs: string[];
11
11
 
12
12
  /**
13
- * The position to promote the records to. If you pass objectIDs, the records are placed at this position as a group. For example, if you pronmote four objectIDs to position 0, the records take the first four positions.
13
+ * Position in the search results where you want to show the promoted records.
14
14
  */
15
15
  position: number;
16
16
  };
@@ -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
- * Determines how query words are [interpreted as prefixes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/).
4
+ * Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/).
5
5
  */
6
6
  export type QueryType = 'prefixAll' | 'prefixLast' | 'prefixNone';
@@ -3,14 +3,17 @@
3
3
  import type { MatchedGeoLocation } from './matchedGeoLocation';
4
4
  import type { Personalization } from './personalization';
5
5
 
6
+ /**
7
+ * Object with detailed information about the record\'s ranking.
8
+ */
6
9
  export type RankingInfo = {
7
10
  /**
8
- * This field is reserved for advanced usage.
11
+ * Whether a filter matched the query.
9
12
  */
10
13
  filters: number;
11
14
 
12
15
  /**
13
- * Position of the most important matched attribute in the attributes to index list.
16
+ * Position of the first matched word in the best matching attribute of the record.
14
17
  */
15
18
  firstMatchedWord: number;
16
19
 
@@ -39,27 +42,27 @@ export type RankingInfo = {
39
42
  nbTypos: number;
40
43
 
41
44
  /**
42
- * Present and set to true if a Rule promoted the hit.
45
+ * Whether the record was promoted by a rule.
43
46
  */
44
47
  promoted: boolean;
45
48
 
46
49
  /**
47
- * When the query contains more than one word, the sum of the distances between matched words (in meters).
50
+ * Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0.
48
51
  */
49
52
  proximityDistance?: number;
50
53
 
51
54
  /**
52
- * Custom ranking for the object, expressed as a single integer value.
55
+ * Overall ranking of the record, expressed as a single integer. This attribute is internal.
53
56
  */
54
57
  userScore: number;
55
58
 
56
59
  /**
57
- * Number of matched words, including prefixes and typos.
60
+ * Number of matched words.
58
61
  */
59
62
  words: number;
60
63
 
61
64
  /**
62
- * Wether the record are promoted by the re-ranking strategy.
65
+ * Whether the record is re-ranked.
63
66
  */
64
67
  promotedByReRanking?: boolean;
65
68
  };
@@ -3,6 +3,6 @@
3
3
  import type { MixedSearchFilters } from './mixedSearchFilters';
4
4
 
5
5
  /**
6
- * When [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) is enabled, only records that match these filters will be affected by Dynamic Re-Ranking.
6
+ * Restrict [Dynamic Re-ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.
7
7
  */
8
8
  export type ReRankingApplyFilter = MixedSearchFilters[] | string;
@@ -9,17 +9,17 @@ import type { SnippetResult } from './snippetResult';
9
9
  */
10
10
  export type RecommendHit = Record<string, any> & {
11
11
  /**
12
- * Unique object identifier.
12
+ * Unique record identifier.
13
13
  */
14
14
  objectID: string;
15
15
 
16
16
  /**
17
- * Show highlighted section and words matched on a query.
17
+ * Surround words that match the query with HTML tags for highlighting.
18
18
  */
19
19
  _highlightResult?: Record<string, HighlightResult>;
20
20
 
21
21
  /**
22
- * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.
22
+ * Snippets that show the context around a matching search query.
23
23
  */
24
24
  _snippetResult?: Record<string, SnippetResult>;
25
25
 
@@ -6,7 +6,7 @@ export type RecommendationsHits = {
6
6
  hits: RecommendationsHit[];
7
7
 
8
8
  /**
9
- * Text to search for in an index.
9
+ * Search query.
10
10
  */
11
11
  query?: string;
12
12
 
@@ -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
- * Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search.
4
+ * Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index.
5
5
  */
6
6
  export type RemoveStopWords = string[] | boolean;
@@ -1,7 +1,7 @@
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
- * Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn\'t match any hits.
4
+ * Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. <dl> <dt><code>none</code></dt> <dd>No words are removed when a query doesn\'t return results.</dd> <dt><code>lastWords</code></dt> <dd>Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>firstWords</code></dt> <dd>Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>allOptional</code></dt> <dd>Treat all words as optional.</dd> </dl> For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
5
5
  */
6
6
  export type RemoveWordsIfNoResults =
7
7
  | 'allOptional'
@@ -3,7 +3,7 @@
3
3
  import type { FacetOrdering } from './facetOrdering';
4
4
 
5
5
  /**
6
- * Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/).
6
+ * Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code.
7
7
  */
8
8
  export type RenderingContent = {
9
9
  facetOrdering?: FacetOrdering;
@@ -2,7 +2,7 @@
2
2
 
3
3
  export type SearchParamsQuery = {
4
4
  /**
5
- * Text to search for in an index.
5
+ * Search query.
6
6
  */
7
7
  query?: string;
8
8
  };
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export type SearchRecommendRulesParams = {
7
7
  /**
8
- * Full-text query.
8
+ * Search query.
9
9
  */
10
10
  query?: string;
11
11
 
@@ -15,7 +15,7 @@ export type SearchRecommendRulesParams = {
15
15
  context?: string;
16
16
 
17
17
  /**
18
- * Requested page (the first page is page 0).
18
+ * Requested page of the API response.
19
19
  */
20
20
  page?: number;
21
21
 
@@ -9,17 +9,17 @@ export type SearchRecommendRulesResponse = {
9
9
  hits: RuleResponse[];
10
10
 
11
11
  /**
12
- * Number of hits the search query matched.
12
+ * Number of results (hits).
13
13
  */
14
14
  nbHits: number;
15
15
 
16
16
  /**
17
- * Page to retrieve (the first page is `0`, not `1`).
17
+ * Page of search results to retrieve.
18
18
  */
19
19
  page: number;
20
20
 
21
21
  /**
22
- * Number of pages of results for the current query.
22
+ * Number of pages of results.
23
23
  */
24
24
  nbPages: number;
25
25
  };
@@ -1,11 +1,11 @@
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
- * Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_.
4
+ * Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`.
5
5
  */
6
6
  export type SemanticSearch = {
7
7
  /**
8
- * Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source.
8
+ * Indices from which to collect click and conversion events. If null, the current index and all its replicas are used.
9
9
  */
10
10
  eventSources?: string[] | null;
11
11
  };
@@ -3,11 +3,11 @@
3
3
  import type { MatchLevel } from './matchLevel';
4
4
 
5
5
  /**
6
- * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.
6
+ * Snippets that show the context around a matching search query.
7
7
  */
8
8
  export type SnippetResultOption = {
9
9
  /**
10
- * Markup text with `facetQuery` matches highlighted.
10
+ * Highlighted attribute value, including HTML tags.
11
11
  */
12
12
  value: string;
13
13
 
@@ -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
- * How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values.
4
+ * Order of facet values that aren\'t explicitly positioned with the `order` setting. <dl> <dt><code>count</code></dt> <dd> Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Sort facet values alphabetically.</dd> <dt><code>hidden</code></dt> <dd>Don\'t show facet values that aren\'t explicitly positioned.</dd> </dl>.
5
5
  */
6
6
  export type SortRemainingBy = 'alpha' | 'count' | 'hidden';
@@ -3,6 +3,6 @@
3
3
  import type { MixedSearchFilters } from './mixedSearchFilters';
4
4
 
5
5
  /**
6
- * [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/).
6
+ * Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won\'t get a facet count. The same combination and escaping rules apply as for `facetFilters`.
7
7
  */
8
8
  export type TagFilters = MixedSearchFilters[] | string;
@@ -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
- * _published_ if the task has been processed, _notPublished_ otherwise.
4
+ * Task status, `published` if the task is completed, `notPublished` otherwise.
5
5
  */
6
6
  export type TaskStatus = 'notPublished' | 'published';
@@ -3,6 +3,6 @@
3
3
  import type { TypoToleranceEnum } from './typoToleranceEnum';
4
4
 
5
5
  /**
6
- * Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied.
6
+ * Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active.
7
7
  */
8
8
  export type TypoTolerance = TypoToleranceEnum | boolean;
@@ -1,3 +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
+ /**
4
+ * - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.
5
+ */
3
6
  export type TypoToleranceEnum = 'min' | 'strict';
package/model/value.ts CHANGED
@@ -4,7 +4,7 @@ import type { SortRemainingBy } from './sortRemainingBy';
4
4
 
5
5
  export type Value = {
6
6
  /**
7
- * Pinned order of facet lists.
7
+ * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
8
8
  */
9
9
  order?: string[];
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/recommend",
3
- "version": "5.0.0-alpha.106",
3
+ "version": "5.0.0-alpha.107",
4
4
  "description": "JavaScript client for recommend",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
@@ -39,14 +39,14 @@
39
39
  "clean": "rm -rf ./dist || true"
40
40
  },
41
41
  "dependencies": {
42
- "@algolia/client-common": "5.0.0-alpha.107",
43
- "@algolia/requester-browser-xhr": "5.0.0-alpha.107",
44
- "@algolia/requester-node-http": "5.0.0-alpha.107"
42
+ "@algolia/client-common": "5.0.0-alpha.108",
43
+ "@algolia/requester-browser-xhr": "5.0.0-alpha.108",
44
+ "@algolia/requester-node-http": "5.0.0-alpha.108"
45
45
  },
46
46
  "devDependencies": {
47
- "@types/node": "20.11.24",
48
- "rollup": "4.12.0",
49
- "typescript": "5.3.3"
47
+ "@types/node": "20.11.25",
48
+ "rollup": "4.12.1",
49
+ "typescript": "5.4.2"
50
50
  },
51
51
  "engines": {
52
52
  "node": ">= 14.0.0"