@algolia/recommend 5.0.0-alpha.77 → 5.0.0-alpha.79

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 (60) hide show
  1. package/dist/model/baseRecommendRequest.d.ts +1 -4
  2. package/dist/model/baseRecommendRequest.d.ts.map +1 -1
  3. package/dist/model/baseRecommendationsQuery.d.ts +12 -0
  4. package/dist/model/baseRecommendationsQuery.d.ts.map +1 -0
  5. package/dist/model/baseSearchParamsWithoutQuery.d.ts +12 -14
  6. package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  7. package/dist/model/baseTrendingFacetsQuery.d.ts +9 -0
  8. package/dist/model/baseTrendingFacetsQuery.d.ts.map +1 -0
  9. package/dist/model/baseTrendingItemsQuery.d.ts +16 -0
  10. package/dist/model/baseTrendingItemsQuery.d.ts.map +1 -0
  11. package/dist/model/index.d.ts +9 -6
  12. package/dist/model/index.d.ts.map +1 -1
  13. package/dist/model/indexSettingsAsSearchParams.d.ts +16 -14
  14. package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  15. package/dist/model/recommendationsQuery.d.ts +4 -0
  16. package/dist/model/recommendationsQuery.d.ts.map +1 -0
  17. package/dist/model/recommendationsRequest.d.ts +4 -3
  18. package/dist/model/recommendationsRequest.d.ts.map +1 -1
  19. package/dist/model/{indexSettingsAsSearchParamsSemanticSearch.d.ts → semanticSearch.d.ts} +2 -2
  20. package/dist/model/semanticSearch.d.ts.map +1 -0
  21. package/dist/model/trendingFacetsModel.d.ts +5 -0
  22. package/dist/model/trendingFacetsModel.d.ts.map +1 -0
  23. package/dist/model/trendingFacetsQuery.d.ts +4 -0
  24. package/dist/model/trendingFacetsQuery.d.ts.map +1 -0
  25. package/dist/model/trendingItemsModel.d.ts +5 -0
  26. package/dist/model/trendingItemsModel.d.ts.map +1 -0
  27. package/dist/model/trendingItemsQuery.d.ts +4 -0
  28. package/dist/model/trendingItemsQuery.d.ts.map +1 -0
  29. package/dist/{recommend.cjs.js → recommend.cjs} +1 -1
  30. package/dist/recommend.esm.browser.js +1 -1
  31. package/dist/recommend.esm.node.js +1 -1
  32. package/dist/recommend.umd.js +2 -2
  33. package/dist/src/recommendClient.d.ts +1 -1
  34. package/index.js +1 -1
  35. package/model/baseRecommendRequest.ts +1 -7
  36. package/model/{baseRecommendationRequest.ts → baseRecommendationsQuery.ts} +6 -1
  37. package/model/baseSearchParamsWithoutQuery.ts +14 -17
  38. package/model/baseTrendingFacetsQuery.ts +12 -0
  39. package/model/{baseTrendingRequest.ts → baseTrendingItemsQuery.ts} +9 -4
  40. package/model/index.ts +9 -6
  41. package/model/indexSettingsAsSearchParams.ts +20 -17
  42. package/model/{recommendationRequest.ts → recommendationsQuery.ts} +2 -2
  43. package/model/recommendationsRequest.ts +7 -3
  44. package/model/{indexSettingsAsSearchParamsSemanticSearch.ts → semanticSearch.ts} +1 -1
  45. package/model/{trendingModels.ts → trendingFacetsModel.ts} +2 -2
  46. package/model/trendingFacetsQuery.ts +7 -0
  47. package/model/trendingItemsModel.ts +6 -0
  48. package/model/{trendingRequest.ts → trendingItemsQuery.ts} +2 -2
  49. package/package.json +8 -8
  50. package/dist/model/baseRecommendationRequest.d.ts +0 -9
  51. package/dist/model/baseRecommendationRequest.d.ts.map +0 -1
  52. package/dist/model/baseTrendingRequest.d.ts +0 -13
  53. package/dist/model/baseTrendingRequest.d.ts.map +0 -1
  54. package/dist/model/indexSettingsAsSearchParamsSemanticSearch.d.ts.map +0 -1
  55. package/dist/model/recommendationRequest.d.ts +0 -4
  56. package/dist/model/recommendationRequest.d.ts.map +0 -1
  57. package/dist/model/trendingModels.d.ts +0 -5
  58. package/dist/model/trendingModels.d.ts.map +0 -1
  59. package/dist/model/trendingRequest.d.ts +0 -4
  60. package/dist/model/trendingRequest.d.ts.map +0 -1
@@ -1,4 +1,3 @@
1
- import type { SearchParamsObject } from './searchParamsObject';
2
1
  export type BaseRecommendRequest = {
3
2
  /**
4
3
  * Algolia index name.
@@ -7,12 +6,10 @@ export type BaseRecommendRequest = {
7
6
  /**
8
7
  * 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
8
  */
10
- threshold: number;
9
+ threshold?: number;
11
10
  /**
12
11
  * Maximum number of recommendations to retrieve. If 0, all recommendations will be returned.
13
12
  */
14
13
  maxRecommendations?: number;
15
- queryParameters?: SearchParamsObject;
16
- fallbackParameters?: SearchParamsObject;
17
14
  };
18
15
  //# sourceMappingURL=baseRecommendRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"baseRecommendRequest.d.ts","sourceRoot":"","sources":["../../model/baseRecommendRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,eAAe,CAAC,EAAE,kBAAkB,CAAC;IAErC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC,CAAC"}
1
+ {"version":3,"file":"baseRecommendRequest.d.ts","sourceRoot":"","sources":["../../model/baseRecommendRequest.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { RecommendationModels } from './recommendationModels';
2
+ import type { SearchParamsObject } from './searchParamsObject';
3
+ export type BaseRecommendationsQuery = {
4
+ model: RecommendationModels;
5
+ /**
6
+ * Unique object identifier.
7
+ */
8
+ objectID: string;
9
+ queryParameters?: SearchParamsObject;
10
+ fallbackParameters?: SearchParamsObject;
11
+ };
12
+ //# sourceMappingURL=baseRecommendationsQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseRecommendationsQuery.d.ts","sourceRoot":"","sources":["../../model/baseRecommendationsQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,oBAAoB,CAAC;IAE5B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,eAAe,CAAC,EAAE,kBAAkB,CAAC;IAErC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC,CAAC"}
@@ -3,7 +3,6 @@ import type { AroundRadius } from './aroundRadius';
3
3
  import type { FacetFilters } from './facetFilters';
4
4
  import type { NumericFilters } from './numericFilters';
5
5
  import type { OptionalFilters } from './optionalFilters';
6
- import type { ReRankingApplyFilter } from './reRankingApplyFilter';
7
6
  import type { TagFilters } from './tagFilters';
8
7
  export type BaseSearchParamsWithoutQuery = {
9
8
  /**
@@ -23,21 +22,17 @@ export type BaseSearchParamsWithoutQuery = {
23
22
  */
24
23
  sumOrFiltersScores?: boolean;
25
24
  /**
26
- * 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.
25
+ * Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).
27
26
  */
28
- facets?: string[];
27
+ restrictSearchableAttributes?: string[];
29
28
  /**
30
- * Maximum number of facet values to return for each facet.
29
+ * 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.
31
30
  */
32
- maxValuesPerFacet?: number;
31
+ facets?: string[];
33
32
  /**
34
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.
35
34
  */
36
35
  facetingAfterDistinct?: boolean;
37
- /**
38
- * Controls how facet values are fetched.
39
- */
40
- sortFacetValuesBy?: string;
41
36
  /**
42
37
  * Page to retrieve (the first page is `0`, not `1`).
43
38
  */
@@ -92,6 +87,14 @@ export type BaseSearchParamsWithoutQuery = {
92
87
  * 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).
93
88
  */
94
89
  getRankingInfo?: boolean;
90
+ /**
91
+ * Enriches the API\'s response with information about how the query was processed.
92
+ */
93
+ explain?: string[];
94
+ /**
95
+ * Whether to take into account an index\'s synonyms for a particular search.
96
+ */
97
+ synonyms?: boolean;
95
98
  /**
96
99
  * 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).
97
100
  */
@@ -112,10 +115,5 @@ export type BaseSearchParamsWithoutQuery = {
112
115
  * Incidates whether this search will be considered in A/B testing.
113
116
  */
114
117
  enableABTest?: boolean;
115
- /**
116
- * Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
117
- */
118
- enableReRanking?: boolean;
119
- reRankingApplyFilter?: ReRankingApplyFilter | null;
120
118
  };
121
119
  //# sourceMappingURL=baseSearchParamsWithoutQuery.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"baseSearchParamsWithoutQuery.d.ts","sourceRoot":"","sources":["../../model/baseSearchParamsWithoutQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,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CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAEzB;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { TrendingFacetsModel } from './trendingFacetsModel';
2
+ export type BaseTrendingFacetsQuery = {
3
+ /**
4
+ * Facet name for trending models.
5
+ */
6
+ facetName: string;
7
+ model?: TrendingFacetsModel;
8
+ };
9
+ //# sourceMappingURL=baseTrendingFacetsQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseTrendingFacetsQuery.d.ts","sourceRoot":"","sources":["../../model/baseTrendingFacetsQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC7B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { SearchParamsObject } from './searchParamsObject';
2
+ import type { TrendingItemsModel } from './trendingItemsModel';
3
+ export type BaseTrendingItemsQuery = {
4
+ /**
5
+ * Facet name for trending models.
6
+ */
7
+ facetName?: string;
8
+ /**
9
+ * Facet value for trending models.
10
+ */
11
+ facetValue?: string;
12
+ model?: TrendingItemsModel;
13
+ queryParameters?: SearchParamsObject;
14
+ fallbackParameters?: SearchParamsObject;
15
+ };
16
+ //# sourceMappingURL=baseTrendingItemsQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseTrendingItemsQuery.d.ts","sourceRoot":"","sources":["../../model/baseTrendingItemsQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAE3B,eAAe,CAAC,EAAE,kBAAkB,CAAC;IAErC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC,CAAC"}
@@ -8,12 +8,13 @@ export * from './aroundRadiusAll';
8
8
  export * from './automaticFacetFilter';
9
9
  export * from './automaticFacetFilters';
10
10
  export * from './baseRecommendRequest';
11
- export * from './baseRecommendationRequest';
11
+ export * from './baseRecommendationsQuery';
12
12
  export * from './baseSearchParams';
13
13
  export * from './baseSearchParamsWithoutQuery';
14
14
  export * from './baseSearchResponse';
15
15
  export * from './baseSearchResponseRedirect';
16
- export * from './baseTrendingRequest';
16
+ export * from './baseTrendingFacetsQuery';
17
+ export * from './baseTrendingItemsQuery';
17
18
  export * from './condition';
18
19
  export * from './consequence';
19
20
  export * from './consequenceHide';
@@ -37,7 +38,6 @@ export * from './highlightResult';
37
38
  export * from './highlightResultOption';
38
39
  export * from './ignorePlurals';
39
40
  export * from './indexSettingsAsSearchParams';
40
- export * from './indexSettingsAsSearchParamsSemanticSearch';
41
41
  export * from './matchLevel';
42
42
  export * from './matchedGeoLocation';
43
43
  export * from './mixedSearchFilters';
@@ -56,7 +56,7 @@ export * from './recommendHit';
56
56
  export * from './recommendHits';
57
57
  export * from './recommendModels';
58
58
  export * from './recommendationModels';
59
- export * from './recommendationRequest';
59
+ export * from './recommendationsQuery';
60
60
  export * from './recommendationsRequest';
61
61
  export * from './recommendationsResponse';
62
62
  export * from './redirectRuleIndexMetadata';
@@ -70,13 +70,16 @@ export * from './searchParamsObject';
70
70
  export * from './searchParamsQuery';
71
71
  export * from './searchRecommendRulesParams';
72
72
  export * from './searchRecommendRulesResponse';
73
+ export * from './semanticSearch';
73
74
  export * from './snippetResult';
74
75
  export * from './snippetResultOption';
75
76
  export * from './sortRemainingBy';
76
77
  export * from './tagFilters';
77
78
  export * from './taskStatus';
78
- export * from './trendingModels';
79
- export * from './trendingRequest';
79
+ export * from './trendingFacetsModel';
80
+ export * from './trendingFacetsQuery';
81
+ export * from './trendingItemsModel';
82
+ export * from './trendingItemsQuery';
80
83
  export * from './typoTolerance';
81
84
  export * from './typoToleranceEnum';
82
85
  export * from './value';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":"AAEA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iCAAiC,CAAC;AAChD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC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,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC"}
@@ -3,12 +3,13 @@ import type { AlternativesAsExact } from './alternativesAsExact';
3
3
  import type { Distinct } from './distinct';
4
4
  import type { ExactOnSingleWordQuery } from './exactOnSingleWordQuery';
5
5
  import type { IgnorePlurals } from './ignorePlurals';
6
- import type { IndexSettingsAsSearchParamsSemanticSearch } from './indexSettingsAsSearchParamsSemanticSearch';
7
6
  import type { Mode } from './mode';
8
7
  import type { QueryType } from './queryType';
8
+ import type { ReRankingApplyFilter } from './reRankingApplyFilter';
9
9
  import type { RemoveStopWords } from './removeStopWords';
10
10
  import type { RemoveWordsIfNoResults } from './removeWordsIfNoResults';
11
11
  import type { RenderingContent } from './renderingContent';
12
+ import type { SemanticSearch } from './semanticSearch';
12
13
  import type { TypoTolerance } from './typoTolerance';
13
14
  export type IndexSettingsAsSearchParams = {
14
15
  /**
@@ -19,10 +20,6 @@ export type IndexSettingsAsSearchParams = {
19
20
  * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. By default, the response includes all attributes.
20
21
  */
21
22
  attributesToRetrieve?: string[];
22
- /**
23
- * Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).
24
- */
25
- restrictSearchableAttributes?: string[];
26
23
  /**
27
24
  * Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).
28
25
  */
@@ -105,7 +102,7 @@ export type IndexSettingsAsSearchParams = {
105
102
  queryType?: QueryType;
106
103
  removeWordsIfNoResults?: RemoveWordsIfNoResults;
107
104
  mode?: Mode;
108
- semanticSearch?: IndexSettingsAsSearchParamsSemanticSearch;
105
+ semanticSearch?: SemanticSearch;
109
106
  /**
110
107
  * Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).
111
108
  */
@@ -127,19 +124,11 @@ export type IndexSettingsAsSearchParams = {
127
124
  * Allows you to specify which advanced syntax features are active when `advancedSyntax` is enabled.
128
125
  */
129
126
  advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];
130
- /**
131
- * Enriches the API\'s response with information about how the query was processed.
132
- */
133
- explain?: string[];
134
127
  distinct?: Distinct;
135
128
  /**
136
129
  * Name of the deduplication attribute to be used with Algolia\'s [_distinct_ feature](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature).
137
130
  */
138
131
  attributeForDistinct?: string;
139
- /**
140
- * Whether to take into account an index\'s synonyms for a particular search.
141
- */
142
- synonyms?: boolean;
143
132
  /**
144
133
  * Whether to highlight and snippet the original word that matches the synonym or the synonym itself.
145
134
  */
@@ -156,10 +145,23 @@ export type IndexSettingsAsSearchParams = {
156
145
  * Maximum number of facet hits to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
157
146
  */
158
147
  maxFacetHits?: number;
148
+ /**
149
+ * Maximum number of facet values to return for each facet.
150
+ */
151
+ maxValuesPerFacet?: number;
152
+ /**
153
+ * Controls how facet values are fetched.
154
+ */
155
+ sortFacetValuesBy?: string;
159
156
  /**
160
157
  * When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.
161
158
  */
162
159
  attributeCriteriaComputedByMinProximity?: boolean;
163
160
  renderingContent?: RenderingContent;
161
+ /**
162
+ * Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
163
+ */
164
+ enableReRanking?: boolean;
165
+ reRankingApplyFilter?: ReRankingApplyFilter | null;
164
166
  };
165
167
  //# sourceMappingURL=indexSettingsAsSearchParams.d.ts.map
@@ -1 +1 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CAAC;IAEpC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,oBAAoB,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;CACpD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { BaseRecommendRequest } from './baseRecommendRequest';
2
+ import type { BaseRecommendationsQuery } from './baseRecommendationsQuery';
3
+ export type RecommendationsQuery = BaseRecommendationsQuery & BaseRecommendRequest;
4
+ //# sourceMappingURL=recommendationsQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recommendationsQuery.d.ts","sourceRoot":"","sources":["../../model/recommendationsQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAE3E,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,GACzD,oBAAoB,CAAC"}
@@ -1,4 +1,5 @@
1
- import type { RecommendationRequest } from './recommendationRequest';
2
- import type { TrendingRequest } from './trendingRequest';
3
- export type RecommendationsRequest = RecommendationRequest | TrendingRequest;
1
+ import type { RecommendationsQuery } from './recommendationsQuery';
2
+ import type { TrendingFacetsQuery } from './trendingFacetsQuery';
3
+ import type { TrendingItemsQuery } from './trendingItemsQuery';
4
+ export type RecommendationsRequest = RecommendationsQuery | TrendingFacetsQuery | TrendingItemsQuery;
4
5
  //# sourceMappingURL=recommendationsRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recommendationsRequest.d.ts","sourceRoot":"","sources":["../../model/recommendationsRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,GAAG,eAAe,CAAC"}
1
+ {"version":3,"file":"recommendationsRequest.d.ts","sourceRoot":"","sources":["../../model/recommendationsRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,sBAAsB,GAC9B,oBAAoB,GACpB,mBAAmB,GACnB,kBAAkB,CAAC"}
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_.
3
3
  */
4
- export type IndexSettingsAsSearchParamsSemanticSearch = {
4
+ export type SemanticSearch = {
5
5
  /**
6
6
  * Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source.
7
7
  */
8
8
  eventSources?: string[] | null;
9
9
  };
10
- //# sourceMappingURL=indexSettingsAsSearchParamsSemanticSearch.d.ts.map
10
+ //# sourceMappingURL=semanticSearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semanticSearch.d.ts","sourceRoot":"","sources":["../../model/semanticSearch.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAChC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Trending facets model.
3
+ */
4
+ export type TrendingFacetsModel = 'trending-facets';
5
+ //# sourceMappingURL=trendingFacetsModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trendingFacetsModel.d.ts","sourceRoot":"","sources":["../../model/trendingFacetsModel.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { BaseRecommendRequest } from './baseRecommendRequest';
2
+ import type { BaseTrendingFacetsQuery } from './baseTrendingFacetsQuery';
3
+ export type TrendingFacetsQuery = BaseRecommendRequest & BaseTrendingFacetsQuery;
4
+ //# sourceMappingURL=trendingFacetsQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trendingFacetsQuery.d.ts","sourceRoot":"","sources":["../../model/trendingFacetsQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEzE,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,GACpD,uBAAuB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Trending items model.
3
+ */
4
+ export type TrendingItemsModel = 'trending-items';
5
+ //# sourceMappingURL=trendingItemsModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trendingItemsModel.d.ts","sourceRoot":"","sources":["../../model/trendingItemsModel.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { BaseRecommendRequest } from './baseRecommendRequest';
2
+ import type { BaseTrendingItemsQuery } from './baseTrendingItemsQuery';
3
+ export type TrendingItemsQuery = BaseRecommendRequest & BaseTrendingItemsQuery;
4
+ //# sourceMappingURL=trendingItemsQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trendingItemsQuery.d.ts","sourceRoot":"","sources":["../../model/trendingItemsQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG,sBAAsB,CAAC"}
@@ -4,7 +4,7 @@ var clientCommon = require('@algolia/client-common');
4
4
  var requesterNodeHttp = require('@algolia/requester-node-http');
5
5
 
6
6
  // 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.
7
- const apiClientVersion = '5.0.0-alpha.77';
7
+ const apiClientVersion = '5.0.0-alpha.79';
8
8
  function getDefaultHosts(appId) {
9
9
  return [
10
10
  {
@@ -673,7 +673,7 @@ function createXhrRequester() {
673
673
  }
674
674
 
675
675
  // 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.
676
- const apiClientVersion = '5.0.0-alpha.77';
676
+ const apiClientVersion = '5.0.0-alpha.79';
677
677
  function getDefaultHosts(appId) {
678
678
  return [
679
679
  {
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, shuffle, DEFAULT_CONNEC
2
2
  import { createHttpRequester } from '@algolia/requester-node-http';
3
3
 
4
4
  // 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.
5
- const apiClientVersion = '5.0.0-alpha.77';
5
+ const apiClientVersion = '5.0.0-alpha.79';
6
6
  function getDefaultHosts(appId) {
7
7
  return [
8
8
  {
@@ -1,2 +1,2 @@
1
- /*! recommend.umd.js | 5.0.0-alpha.77 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
2
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/recommend"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function a(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function o(){return JSON.parse(a().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),a=o()[r];return Promise.all([a||t(),void 0!==a])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=o();return s[JSON.stringify(e)]=t,a().setItem(r,JSON.stringify(s)),t})),delete:e=>Promise.resolve().then((()=>{const t=o();delete t[JSON.stringify(e)],a().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(r)}))}}function r(e){const t=[...e.caches],a=t.shift();return void 0===a?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,o,s={miss:()=>Promise.resolve()})=>a.get(e,o,s).catch((()=>r({caches:t}).get(e,o,s))),set:(e,o)=>a.set(e,o).catch((()=>r({caches:t}).set(e,o))),delete:e=>a.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>a.clear().catch((()=>r({caches:t}).clear()))}}function a(e={serializable:!0}){let t={};return{get(r,a,o={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const n=a();return n.then((e=>o.miss(e))).then((()=>n))},set:(r,a)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const o=12e4;function s(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>o},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=o}}}function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),n(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),n(this,"stackTrace",void 0),this.stackTrace=t}}class l extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class u extends c{constructor(e,t,r,a="ApiError"){super(e,r,a),n(this,"status",void 0),this.status=t}}class m extends i{constructor(e,t){super(e,"DeserializationError"),n(this,"response",void 0),this.response=t}}class d extends u{constructor(e,t,r,a){super(e,t,a,"DetailedApiError"),n(this,"error",void 0),this.error=r}}function h(e,t,r){const a=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return a.length&&(o+=`?${a}`),o}function p(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function g({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:a,algoliaAgent:o,timeouts:n,requester:i,requestsCache:c,responsesCache:g}){async function f(c,g,f=!0){const w=[],y=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,g),P=function(e,t,r){const a={Accept:"application/json",...e,...t,...r},o={};return Object.keys(a).forEach((e=>{const t=a[e];o[e.toLowerCase()]=t})),o}(r,c.headers,g.headers),q="GET"===c.method?{...c.data,...g.data}:{},b={...a,...c.queryParameters,...q};if(o.value&&(b["x-algolia-agent"]=o.value),g&&g.queryParameters)for(const e of Object.keys(g.queryParameters))g.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(g.queryParameters[e])?b[e]=g.queryParameters[e].toString():b[e]=g.queryParameters[e];let v=0;const R=async(e,r)=>{const a=e.pop();if(void 0===a)throw new l(function(e){return e.map((e=>p(e)))}(w));let o=g.timeout;void 0===o&&(o=f?n.read:n.write);const q={data:y,headers:P,method:c.method,url:h(a,c.path,b),connectTimeout:r(v,n.connect),responseTimeout:r(v,o)},T=t=>{const r={request:q,response:t,host:a,triesLeft:e.length};return w.push(r),r},E=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(E)){const o=T(E);return E.isTimedOut&&v++,console.log("Retryable failure",p(o)),await t.set(a,s(a,E.isTimedOut?"timed out":"down")),R(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new m(t.message,e)}}(E);throw T(E),function({content:e,status:t},r){try{const a=JSON.parse(e);return"error"in a?new d(a.message,t,a.error,r):new u(a.message,t,r)}catch(e){}return new u(e,t,r)}(E,w)},T=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(s(e))))))),a=r.filter((e=>e.isUp())),o=r.filter((e=>e.isTimedOut())),n=[...a,...o];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===o.length&&0===e?1:o.length+3+e)*t}}(T);return R([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:o,baseHeaders:r,baseQueryParameters:a,hosts:e,request:function(e,t={}){const o=e.useReadTransporter||"GET"===e.method;if(!o)return f(e,t,o);const s=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return s();const n={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return g.get(n,(()=>c.get(n,(()=>c.set(n,s()).then((e=>Promise.all([c.delete(n),e])),(e=>Promise.all([c.delete(n),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>g.set(n,e)})},requestsCache:c,responsesCache:g}}function f({algoliaAgents:e,client:t,version:r}){const a=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>a.add(e))),a}const w="5.0.0-alpha.77";function y(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const a=Math.floor(Math.random()*(r+1)),o=e[r];t[r]=e[a],t[a]=o}return t}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}e.apiClientVersion=w,e.recommendClient=function(e,o,s){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!o||"string"!=typeof o)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:a,...o}){const s=function(e,t,r="WithinHeaders"){const a={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?a:{},queryParameters:()=>"WithinQueryParameters"===r?a:{}}}(e,t,r),n=g({hosts:y(e),...o,algoliaAgent:f({algoliaAgents:a,client:"Recommend",version:w}),baseHeaders:{"content-type":"text/plain",...s.headers(),...o.baseHeaders},baseQueryParameters:{...s.queryParameters(),...o.baseQueryParameters}});return{transporter:n,appId:e,clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{})),get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,t){n.algoliaAgent.add({segment:e,version:t})},del({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const a={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(a,r)},deleteRecommendRule({indexName:e,model:t,objectID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRecommendRule`.");if(!t)throw new Error("Parameter `model` is required when calling `deleteRecommendRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRecommendRule`.");const o={method:"DELETE",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(o,a)},get({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const a={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(a,r)},getRecommendRule({indexName:e,model:t,objectID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendRule`.");if(!t)throw new Error("Parameter `model` is required when calling `getRecommendRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getRecommendRule`.");const o={method:"GET",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(o,a)},getRecommendStatus({indexName:e,model:t,taskID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendStatus`.");if(!t)throw new Error("Parameter `model` is required when calling `getRecommendStatus`.");if(!r)throw new Error("Parameter `taskID` is required when calling `getRecommendStatus`.");const o={method:"GET",path:"/1/indexes/{indexName}/{model}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(o,a)},getRecommendations(e,t){if(!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");const r={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return n.request(r,t)},post({path:e,parameters:t,body:r},a){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const o={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,a)},put({path:e,parameters:t,body:r},a){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const o={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,a)},searchRecommendRules({indexName:e,model:t,searchRecommendRulesParams:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRecommendRules`.");if(!t)throw new Error("Parameter `model` is required when calling `searchRecommendRules`.");const o={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/search".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return n.request(o,a)}}}({appId:e,apiKey:o,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const a=(e,a)=>setTimeout((()=>{r.abort(),t({status:0,content:a,isTimedOut:!0})}),e),o=a(e.connectTimeout,"Connection timeout");let s;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===s&&(clearTimeout(o),s=a(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(s),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(s),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:a(),requestsCache:a({serializable:!1}),hostsCache:r({caches:[t({key:`${w}-${e}`}),a()]}),...s})}}));
1
+ /*! recommend.umd.js | 5.0.0-alpha.79 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/recommend"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function a(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function o(){return JSON.parse(a().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),a=o()[r];return Promise.all([a||t(),void 0!==a])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=o();return s[JSON.stringify(e)]=t,a().setItem(r,JSON.stringify(s)),t})),delete:e=>Promise.resolve().then((()=>{const t=o();delete t[JSON.stringify(e)],a().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(r)}))}}function r(e){const t=[...e.caches],a=t.shift();return void 0===a?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,o,s={miss:()=>Promise.resolve()})=>a.get(e,o,s).catch((()=>r({caches:t}).get(e,o,s))),set:(e,o)=>a.set(e,o).catch((()=>r({caches:t}).set(e,o))),delete:e=>a.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>a.clear().catch((()=>r({caches:t}).clear()))}}function a(e={serializable:!0}){let t={};return{get(r,a,o={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const n=a();return n.then((e=>o.miss(e))).then((()=>n))},set:(r,a)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const o=12e4;function s(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>o},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=o}}}function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),n(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),n(this,"stackTrace",void 0),this.stackTrace=t}}class l extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class u extends c{constructor(e,t,r,a="ApiError"){super(e,r,a),n(this,"status",void 0),this.status=t}}class m extends i{constructor(e,t){super(e,"DeserializationError"),n(this,"response",void 0),this.response=t}}class d extends u{constructor(e,t,r,a){super(e,t,a,"DetailedApiError"),n(this,"error",void 0),this.error=r}}function h(e,t,r){const a=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return a.length&&(o+=`?${a}`),o}function p(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function g({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:a,algoliaAgent:o,timeouts:n,requester:i,requestsCache:c,responsesCache:g}){async function f(c,g,f=!0){const w=[],y=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,g),P=function(e,t,r){const a={Accept:"application/json",...e,...t,...r},o={};return Object.keys(a).forEach((e=>{const t=a[e];o[e.toLowerCase()]=t})),o}(r,c.headers,g.headers),q="GET"===c.method?{...c.data,...g.data}:{},b={...a,...c.queryParameters,...q};if(o.value&&(b["x-algolia-agent"]=o.value),g&&g.queryParameters)for(const e of Object.keys(g.queryParameters))g.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(g.queryParameters[e])?b[e]=g.queryParameters[e].toString():b[e]=g.queryParameters[e];let v=0;const R=async(e,r)=>{const a=e.pop();if(void 0===a)throw new l(function(e){return e.map((e=>p(e)))}(w));let o=g.timeout;void 0===o&&(o=f?n.read:n.write);const q={data:y,headers:P,method:c.method,url:h(a,c.path,b),connectTimeout:r(v,n.connect),responseTimeout:r(v,o)},T=t=>{const r={request:q,response:t,host:a,triesLeft:e.length};return w.push(r),r},E=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(E)){const o=T(E);return E.isTimedOut&&v++,console.log("Retryable failure",p(o)),await t.set(a,s(a,E.isTimedOut?"timed out":"down")),R(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new m(t.message,e)}}(E);throw T(E),function({content:e,status:t},r){try{const a=JSON.parse(e);return"error"in a?new d(a.message,t,a.error,r):new u(a.message,t,r)}catch(e){}return new u(e,t,r)}(E,w)},T=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(s(e))))))),a=r.filter((e=>e.isUp())),o=r.filter((e=>e.isTimedOut())),n=[...a,...o];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===o.length&&0===e?1:o.length+3+e)*t}}(T);return R([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:o,baseHeaders:r,baseQueryParameters:a,hosts:e,request:function(e,t={}){const o=e.useReadTransporter||"GET"===e.method;if(!o)return f(e,t,o);const s=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return s();const n={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return g.get(n,(()=>c.get(n,(()=>c.set(n,s()).then((e=>Promise.all([c.delete(n),e])),(e=>Promise.all([c.delete(n),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>g.set(n,e)})},requestsCache:c,responsesCache:g}}function f({algoliaAgents:e,client:t,version:r}){const a=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>a.add(e))),a}const w="5.0.0-alpha.79";function y(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const a=Math.floor(Math.random()*(r+1)),o=e[r];t[r]=e[a],t[a]=o}return t}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}e.apiClientVersion=w,e.recommendClient=function(e,o,s){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!o||"string"!=typeof o)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:a,...o}){const s=function(e,t,r="WithinHeaders"){const a={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?a:{},queryParameters:()=>"WithinQueryParameters"===r?a:{}}}(e,t,r),n=g({hosts:y(e),...o,algoliaAgent:f({algoliaAgents:a,client:"Recommend",version:w}),baseHeaders:{"content-type":"text/plain",...s.headers(),...o.baseHeaders},baseQueryParameters:{...s.queryParameters(),...o.baseQueryParameters}});return{transporter:n,appId:e,clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{})),get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,t){n.algoliaAgent.add({segment:e,version:t})},del({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const a={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(a,r)},deleteRecommendRule({indexName:e,model:t,objectID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRecommendRule`.");if(!t)throw new Error("Parameter `model` is required when calling `deleteRecommendRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRecommendRule`.");const o={method:"DELETE",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(o,a)},get({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const a={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(a,r)},getRecommendRule({indexName:e,model:t,objectID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendRule`.");if(!t)throw new Error("Parameter `model` is required when calling `getRecommendRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getRecommendRule`.");const o={method:"GET",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(o,a)},getRecommendStatus({indexName:e,model:t,taskID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendStatus`.");if(!t)throw new Error("Parameter `model` is required when calling `getRecommendStatus`.");if(!r)throw new Error("Parameter `taskID` is required when calling `getRecommendStatus`.");const o={method:"GET",path:"/1/indexes/{indexName}/{model}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(o,a)},getRecommendations(e,t){if(!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");const r={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return n.request(r,t)},post({path:e,parameters:t,body:r},a){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const o={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,a)},put({path:e,parameters:t,body:r},a){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const o={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,a)},searchRecommendRules({indexName:e,model:t,searchRecommendRulesParams:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRecommendRules`.");if(!t)throw new Error("Parameter `model` is required when calling `searchRecommendRules`.");const o={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/search".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return n.request(o,a)}}}({appId:e,apiKey:o,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const a=(e,a)=>setTimeout((()=>{r.abort(),t({status:0,content:a,isTimedOut:!0})}),e),o=a(e.connectTimeout,"Connection timeout");let s;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===s&&(clearTimeout(o),s=a(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(s),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(s),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:a(),requestsCache:a({serializable:!1}),hostsCache:r({caches:[t({key:`${w}-${e}`}),a()]}),...s})}}));
@@ -6,7 +6,7 @@ import type { GetRecommendationsParams } from '../model/getRecommendationsParams
6
6
  import type { GetRecommendationsResponse } from '../model/getRecommendationsResponse';
7
7
  import type { RuleResponse } from '../model/ruleResponse';
8
8
  import type { SearchRecommendRulesResponse } from '../model/searchRecommendRulesResponse';
9
- export declare const apiClientVersion = "5.0.0-alpha.77";
9
+ export declare const apiClientVersion = "5.0.0-alpha.79";
10
10
  export declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
11
11
  transporter: import("@algolia/client-common").Transporter;
12
12
  /**
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // eslint-disable-next-line import/no-commonjs,import/extensions
2
- module.exports = require('./dist/recommend.cjs.js');
2
+ module.exports = require('./dist/recommend.cjs');
@@ -1,7 +1,5 @@
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 { SearchParamsObject } from './searchParamsObject';
4
-
5
3
  export type BaseRecommendRequest = {
6
4
  /**
7
5
  * Algolia index name.
@@ -11,14 +9,10 @@ export type BaseRecommendRequest = {
11
9
  /**
12
10
  * 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.
13
11
  */
14
- threshold: number;
12
+ threshold?: number;
15
13
 
16
14
  /**
17
15
  * Maximum number of recommendations to retrieve. If 0, all recommendations will be returned.
18
16
  */
19
17
  maxRecommendations?: number;
20
-
21
- queryParameters?: SearchParamsObject;
22
-
23
- fallbackParameters?: SearchParamsObject;
24
18
  };
@@ -1,12 +1,17 @@
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
  import type { RecommendationModels } from './recommendationModels';
4
+ import type { SearchParamsObject } from './searchParamsObject';
4
5
 
5
- export type BaseRecommendationRequest = {
6
+ export type BaseRecommendationsQuery = {
6
7
  model: RecommendationModels;
7
8
 
8
9
  /**
9
10
  * Unique object identifier.
10
11
  */
11
12
  objectID: string;
13
+
14
+ queryParameters?: SearchParamsObject;
15
+
16
+ fallbackParameters?: SearchParamsObject;
12
17
  };
@@ -5,7 +5,6 @@ import type { AroundRadius } from './aroundRadius';
5
5
  import type { FacetFilters } from './facetFilters';
6
6
  import type { NumericFilters } from './numericFilters';
7
7
  import type { OptionalFilters } from './optionalFilters';
8
- import type { ReRankingApplyFilter } from './reRankingApplyFilter';
9
8
  import type { TagFilters } from './tagFilters';
10
9
 
11
10
  export type BaseSearchParamsWithoutQuery = {
@@ -33,25 +32,20 @@ export type BaseSearchParamsWithoutQuery = {
33
32
  sumOrFiltersScores?: boolean;
34
33
 
35
34
  /**
36
- * 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.
35
+ * Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).
37
36
  */
38
- facets?: string[];
37
+ restrictSearchableAttributes?: string[];
39
38
 
40
39
  /**
41
- * Maximum number of facet values to return for each facet.
40
+ * 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.
42
41
  */
43
- maxValuesPerFacet?: number;
42
+ facets?: string[];
44
43
 
45
44
  /**
46
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.
47
46
  */
48
47
  facetingAfterDistinct?: boolean;
49
48
 
50
- /**
51
- * Controls how facet values are fetched.
52
- */
53
- sortFacetValuesBy?: string;
54
-
55
49
  /**
56
50
  * Page to retrieve (the first page is `0`, not `1`).
57
51
  */
@@ -121,6 +115,16 @@ export type BaseSearchParamsWithoutQuery = {
121
115
  */
122
116
  getRankingInfo?: boolean;
123
117
 
118
+ /**
119
+ * Enriches the API\'s response with information about how the query was processed.
120
+ */
121
+ explain?: string[];
122
+
123
+ /**
124
+ * Whether to take into account an index\'s synonyms for a particular search.
125
+ */
126
+ synonyms?: boolean;
127
+
124
128
  /**
125
129
  * 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).
126
130
  */
@@ -145,11 +149,4 @@ export type BaseSearchParamsWithoutQuery = {
145
149
  * Incidates whether this search will be considered in A/B testing.
146
150
  */
147
151
  enableABTest?: boolean;
148
-
149
- /**
150
- * Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
151
- */
152
- enableReRanking?: boolean;
153
-
154
- reRankingApplyFilter?: ReRankingApplyFilter | null;
155
152
  };
@@ -0,0 +1,12 @@
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 { TrendingFacetsModel } from './trendingFacetsModel';
4
+
5
+ export type BaseTrendingFacetsQuery = {
6
+ /**
7
+ * Facet name for trending models.
8
+ */
9
+ facetName: string;
10
+
11
+ model?: TrendingFacetsModel;
12
+ };
@@ -1,10 +1,9 @@
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 { TrendingModels } from './trendingModels';
4
-
5
- export type BaseTrendingRequest = {
6
- model: TrendingModels;
3
+ import type { SearchParamsObject } from './searchParamsObject';
4
+ import type { TrendingItemsModel } from './trendingItemsModel';
7
5
 
6
+ export type BaseTrendingItemsQuery = {
8
7
  /**
9
8
  * Facet name for trending models.
10
9
  */
@@ -14,4 +13,10 @@ export type BaseTrendingRequest = {
14
13
  * Facet value for trending models.
15
14
  */
16
15
  facetValue?: string;
16
+
17
+ model?: TrendingItemsModel;
18
+
19
+ queryParameters?: SearchParamsObject;
20
+
21
+ fallbackParameters?: SearchParamsObject;
17
22
  };
package/model/index.ts CHANGED
@@ -10,12 +10,13 @@ export * from './aroundRadiusAll';
10
10
  export * from './automaticFacetFilter';
11
11
  export * from './automaticFacetFilters';
12
12
  export * from './baseRecommendRequest';
13
- export * from './baseRecommendationRequest';
13
+ export * from './baseRecommendationsQuery';
14
14
  export * from './baseSearchParams';
15
15
  export * from './baseSearchParamsWithoutQuery';
16
16
  export * from './baseSearchResponse';
17
17
  export * from './baseSearchResponseRedirect';
18
- export * from './baseTrendingRequest';
18
+ export * from './baseTrendingFacetsQuery';
19
+ export * from './baseTrendingItemsQuery';
19
20
  export * from './condition';
20
21
  export * from './consequence';
21
22
  export * from './consequenceHide';
@@ -39,7 +40,6 @@ export * from './highlightResult';
39
40
  export * from './highlightResultOption';
40
41
  export * from './ignorePlurals';
41
42
  export * from './indexSettingsAsSearchParams';
42
- export * from './indexSettingsAsSearchParamsSemanticSearch';
43
43
  export * from './matchLevel';
44
44
  export * from './matchedGeoLocation';
45
45
  export * from './mixedSearchFilters';
@@ -58,7 +58,7 @@ export * from './recommendHit';
58
58
  export * from './recommendHits';
59
59
  export * from './recommendModels';
60
60
  export * from './recommendationModels';
61
- export * from './recommendationRequest';
61
+ export * from './recommendationsQuery';
62
62
  export * from './recommendationsRequest';
63
63
  export * from './recommendationsResponse';
64
64
  export * from './redirectRuleIndexMetadata';
@@ -72,13 +72,16 @@ export * from './searchParamsObject';
72
72
  export * from './searchParamsQuery';
73
73
  export * from './searchRecommendRulesParams';
74
74
  export * from './searchRecommendRulesResponse';
75
+ export * from './semanticSearch';
75
76
  export * from './snippetResult';
76
77
  export * from './snippetResultOption';
77
78
  export * from './sortRemainingBy';
78
79
  export * from './tagFilters';
79
80
  export * from './taskStatus';
80
- export * from './trendingModels';
81
- export * from './trendingRequest';
81
+ export * from './trendingFacetsModel';
82
+ export * from './trendingFacetsQuery';
83
+ export * from './trendingItemsModel';
84
+ export * from './trendingItemsQuery';
82
85
  export * from './typoTolerance';
83
86
  export * from './typoToleranceEnum';
84
87
  export * from './value';
@@ -5,12 +5,13 @@ import type { AlternativesAsExact } from './alternativesAsExact';
5
5
  import type { Distinct } from './distinct';
6
6
  import type { ExactOnSingleWordQuery } from './exactOnSingleWordQuery';
7
7
  import type { IgnorePlurals } from './ignorePlurals';
8
- import type { IndexSettingsAsSearchParamsSemanticSearch } from './indexSettingsAsSearchParamsSemanticSearch';
9
8
  import type { Mode } from './mode';
10
9
  import type { QueryType } from './queryType';
10
+ import type { ReRankingApplyFilter } from './reRankingApplyFilter';
11
11
  import type { RemoveStopWords } from './removeStopWords';
12
12
  import type { RemoveWordsIfNoResults } from './removeWordsIfNoResults';
13
13
  import type { RenderingContent } from './renderingContent';
14
+ import type { SemanticSearch } from './semanticSearch';
14
15
  import type { TypoTolerance } from './typoTolerance';
15
16
 
16
17
  export type IndexSettingsAsSearchParams = {
@@ -24,11 +25,6 @@ export type IndexSettingsAsSearchParams = {
24
25
  */
25
26
  attributesToRetrieve?: string[];
26
27
 
27
- /**
28
- * Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).
29
- */
30
- restrictSearchableAttributes?: string[];
31
-
32
28
  /**
33
29
  * Determines the order in which Algolia [returns your results](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/).
34
30
  */
@@ -136,7 +132,7 @@ export type IndexSettingsAsSearchParams = {
136
132
 
137
133
  mode?: Mode;
138
134
 
139
- semanticSearch?: IndexSettingsAsSearchParamsSemanticSearch;
135
+ semanticSearch?: SemanticSearch;
140
136
 
141
137
  /**
142
138
  * Enables the [advanced query syntax](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#advanced-syntax).
@@ -165,11 +161,6 @@ export type IndexSettingsAsSearchParams = {
165
161
  */
166
162
  advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];
167
163
 
168
- /**
169
- * Enriches the API\'s response with information about how the query was processed.
170
- */
171
- explain?: string[];
172
-
173
164
  distinct?: Distinct;
174
165
 
175
166
  /**
@@ -177,11 +168,6 @@ export type IndexSettingsAsSearchParams = {
177
168
  */
178
169
  attributeForDistinct?: string;
179
170
 
180
- /**
181
- * Whether to take into account an index\'s synonyms for a particular search.
182
- */
183
- synonyms?: boolean;
184
-
185
171
  /**
186
172
  * Whether to highlight and snippet the original word that matches the synonym or the synonym itself.
187
173
  */
@@ -202,10 +188,27 @@ export type IndexSettingsAsSearchParams = {
202
188
  */
203
189
  maxFacetHits?: number;
204
190
 
191
+ /**
192
+ * Maximum number of facet values to return for each facet.
193
+ */
194
+ maxValuesPerFacet?: number;
195
+
196
+ /**
197
+ * Controls how facet values are fetched.
198
+ */
199
+ sortFacetValuesBy?: string;
200
+
205
201
  /**
206
202
  * When the [Attribute criterion is ranked above Proximity](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute-and-proximity-combinations) in your ranking formula, Proximity is used to select which searchable attribute is matched in the Attribute ranking stage.
207
203
  */
208
204
  attributeCriteriaComputedByMinProximity?: boolean;
209
205
 
210
206
  renderingContent?: RenderingContent;
207
+
208
+ /**
209
+ * Indicates whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/).
210
+ */
211
+ enableReRanking?: boolean;
212
+
213
+ reRankingApplyFilter?: ReRankingApplyFilter | null;
211
214
  };
@@ -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
  import type { BaseRecommendRequest } from './baseRecommendRequest';
4
- import type { BaseRecommendationRequest } from './baseRecommendationRequest';
4
+ import type { BaseRecommendationsQuery } from './baseRecommendationsQuery';
5
5
 
6
- export type RecommendationRequest = BaseRecommendationRequest &
6
+ export type RecommendationsQuery = BaseRecommendationsQuery &
7
7
  BaseRecommendRequest;
@@ -1,6 +1,10 @@
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 { RecommendationRequest } from './recommendationRequest';
4
- import type { TrendingRequest } from './trendingRequest';
3
+ import type { RecommendationsQuery } from './recommendationsQuery';
4
+ import type { TrendingFacetsQuery } from './trendingFacetsQuery';
5
+ import type { TrendingItemsQuery } from './trendingItemsQuery';
5
6
 
6
- export type RecommendationsRequest = RecommendationRequest | TrendingRequest;
7
+ export type RecommendationsRequest =
8
+ | RecommendationsQuery
9
+ | TrendingFacetsQuery
10
+ | TrendingItemsQuery;
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_.
5
5
  */
6
- export type IndexSettingsAsSearchParamsSemanticSearch = {
6
+ export type SemanticSearch = {
7
7
  /**
8
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.
9
9
  */
@@ -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
- * Trending model.
4
+ * Trending facets model.
5
5
  */
6
- export type TrendingModels = 'trending-facets' | 'trending-items';
6
+ export type TrendingFacetsModel = 'trending-facets';
@@ -0,0 +1,7 @@
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 { BaseRecommendRequest } from './baseRecommendRequest';
4
+ import type { BaseTrendingFacetsQuery } from './baseTrendingFacetsQuery';
5
+
6
+ export type TrendingFacetsQuery = BaseRecommendRequest &
7
+ BaseTrendingFacetsQuery;
@@ -0,0 +1,6 @@
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
+ * Trending items model.
5
+ */
6
+ export type TrendingItemsModel = 'trending-items';
@@ -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
  import type { BaseRecommendRequest } from './baseRecommendRequest';
4
- import type { BaseTrendingRequest } from './baseTrendingRequest';
4
+ import type { BaseTrendingItemsQuery } from './baseTrendingItemsQuery';
5
5
 
6
- export type TrendingRequest = BaseRecommendRequest & BaseTrendingRequest;
6
+ export type TrendingItemsQuery = BaseRecommendRequest & BaseTrendingItemsQuery;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/recommend",
3
- "version": "5.0.0-alpha.77",
3
+ "version": "5.0.0-alpha.79",
4
4
  "description": "JavaScript client for recommend",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
@@ -11,8 +11,8 @@
11
11
  "node": {
12
12
  "import": "./dist/recommend.esm.node.js",
13
13
  "module": "./dist/recommend.esm.node.js",
14
- "require": "./dist/recommend.cjs.js",
15
- "default": "./dist/recommend.cjs.js"
14
+ "require": "./dist/recommend.cjs",
15
+ "default": "./dist/recommend.cjs"
16
16
  },
17
17
  "default": {
18
18
  "umd": "./dist/recommend.umd.js",
@@ -39,13 +39,13 @@
39
39
  "clean": "rm -rf ./dist || true"
40
40
  },
41
41
  "dependencies": {
42
- "@algolia/client-common": "5.0.0-alpha.77",
43
- "@algolia/requester-browser-xhr": "5.0.0-alpha.77",
44
- "@algolia/requester-node-http": "5.0.0-alpha.77"
42
+ "@algolia/client-common": "5.0.0-alpha.79",
43
+ "@algolia/requester-browser-xhr": "5.0.0-alpha.79",
44
+ "@algolia/requester-node-http": "5.0.0-alpha.79"
45
45
  },
46
46
  "devDependencies": {
47
- "@types/node": "18.17.3",
48
- "rollup": "3.27.2",
47
+ "@types/node": "18.17.6",
48
+ "rollup": "3.28.0",
49
49
  "typescript": "5.1.6"
50
50
  },
51
51
  "engines": {
@@ -1,9 +0,0 @@
1
- import type { RecommendationModels } from './recommendationModels';
2
- export type BaseRecommendationRequest = {
3
- model: RecommendationModels;
4
- /**
5
- * Unique object identifier.
6
- */
7
- objectID: string;
8
- };
9
- //# sourceMappingURL=baseRecommendationRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"baseRecommendationRequest.d.ts","sourceRoot":"","sources":["../../model/baseRecommendationRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,EAAE,oBAAoB,CAAC;IAE5B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -1,13 +0,0 @@
1
- import type { TrendingModels } from './trendingModels';
2
- export type BaseTrendingRequest = {
3
- model: TrendingModels;
4
- /**
5
- * Facet name for trending models.
6
- */
7
- facetName?: string;
8
- /**
9
- * Facet value for trending models.
10
- */
11
- facetValue?: string;
12
- };
13
- //# sourceMappingURL=baseTrendingRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"baseTrendingRequest.d.ts","sourceRoot":"","sources":["../../model/baseTrendingRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,cAAc,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"indexSettingsAsSearchParamsSemanticSearch.d.ts","sourceRoot":"","sources":["../../model/indexSettingsAsSearchParamsSemanticSearch.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,yCAAyC,GAAG;IACtD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAChC,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { BaseRecommendRequest } from './baseRecommendRequest';
2
- import type { BaseRecommendationRequest } from './baseRecommendationRequest';
3
- export type RecommendationRequest = BaseRecommendationRequest & BaseRecommendRequest;
4
- //# sourceMappingURL=recommendationRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"recommendationRequest.d.ts","sourceRoot":"","sources":["../../model/recommendationRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAE7E,MAAM,MAAM,qBAAqB,GAAG,yBAAyB,GAC3D,oBAAoB,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Trending model.
3
- */
4
- export type TrendingModels = 'trending-facets' | 'trending-items';
5
- //# sourceMappingURL=trendingModels.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trendingModels.d.ts","sourceRoot":"","sources":["../../model/trendingModels.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG,gBAAgB,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { BaseRecommendRequest } from './baseRecommendRequest';
2
- import type { BaseTrendingRequest } from './baseTrendingRequest';
3
- export type TrendingRequest = BaseRecommendRequest & BaseTrendingRequest;
4
- //# sourceMappingURL=trendingRequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trendingRequest.d.ts","sourceRoot":"","sources":["../../model/trendingRequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG,mBAAmB,CAAC"}