Skip to content

Commit a5df2fb

Browse files
docs(recommend): add TSDoc (#1305)
1 parent 566ae23 commit a5df2fb

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

packages/recommend/src/types/RecommendationsQuery.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,40 @@ import { RecommendModel } from './RecommendModel';
22
import { RecommendSearchOptions } from './RecommendSearchOptions';
33

44
export type RecommendationsQuery = {
5+
/**
6+
* The name of the target index.
7+
*/
58
readonly indexName: string;
9+
10+
/**
11+
* The name of the Recommendation model to use.
12+
*/
613
readonly model: RecommendModel;
14+
15+
/**
16+
* The `objectID` of the item to get recommendations for.
17+
*/
718
readonly objectID: string;
19+
20+
/**
21+
* Threshold for the recommendations confidence score (between 0 and 100). Only recommendations with a greater score are returned.
22+
*/
823
readonly threshold?: number;
24+
25+
/**
26+
* How many recommendations to retrieve.
27+
*/
928
readonly maxRecommendations?: number;
29+
30+
/**
31+
* List of [search parameters](https://www.algolia.com/doc/api-reference/search-api-parameters/) to send.
32+
*/
1033
readonly queryParameters?: RecommendSearchOptions;
34+
35+
/**
36+
* List of [search parameters](https://www.algolia.com/doc/api-reference/search-api-parameters/) to send.
37+
*
38+
* Additional filters to use as fallback when there aren’t enough recommendations.
39+
*/
1140
readonly fallbackParameters?: RecommendSearchOptions;
1241
};

0 commit comments

Comments
 (0)