File tree Expand file tree Collapse file tree 4 files changed +23
-1
lines changed
packages/recommend/src/types Expand file tree Collapse file tree 4 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 1+ export type TrendingFacetHit < TObject > = {
2+ readonly _score : number ;
3+ readonly facetName : string ;
4+ readonly facetValue : TObject ;
5+ } ;
Original file line number Diff line number Diff line change 1+ import { SearchResponse } from '@algolia/client-search' ;
2+
3+ import { TrendingFacetHit } from './TrendingFacetHit' ;
4+
5+ export type TrendingFacetsResponse < TObject > = Omit < SearchResponse < TObject > , 'hits' > & {
6+ readonly hits : ReadonlyArray < TrendingFacetHit < TObject > > ;
7+ } ;
Original file line number Diff line number Diff line change @@ -6,9 +6,17 @@ import { LookingSimilarQuery } from './LookingSimilarQuery';
66import { RecommendationsQuery } from './RecommendationsQuery' ;
77import { RelatedProductsQuery } from './RelatedProductsQuery' ;
88import { TrendingFacetsQuery } from './TrendingFacetsQuery' ;
9+ import { TrendingFacetsResponse } from './TrendingFacetsResponse' ;
910import { TrendingItemsQuery } from './TrendingItemsQuery' ;
1011import { TrendingQuery } from './TrendingQuery' ;
1112
13+ export type RecommendTrendingFacetsQueriesResponse < TObject > = {
14+ /**
15+ * The list of results.
16+ */
17+ readonly results : ReadonlyArray < TrendingFacetsResponse < TObject > > ;
18+ } ;
19+
1220export type RecommendQueriesResponse < TObject > = {
1321 /**
1422 * The list of results.
@@ -55,7 +63,7 @@ export type WithRecommendMethods<TType> = TType & {
5563 readonly getTrendingFacets : < TObject > (
5664 queries : readonly TrendingFacetsQuery [ ] ,
5765 requestOptions ?: RequestOptions & SearchOptions
58- ) => Readonly < Promise < RecommendQueriesResponse < TObject > > > ;
66+ ) => Readonly < Promise < RecommendTrendingFacetsQueriesResponse < TObject > > > ;
5967
6068 /**
6169 * Returns Looking Similar
Original file line number Diff line number Diff line change @@ -15,3 +15,5 @@ export * from './TrendingItemsQuery';
1515export * from './TrendingQuery' ;
1616export * from './WithRecommendMethods' ;
1717export * from './LookingSimilarQuery' ;
18+ export * from './TrendingFacetHit' ;
19+ export * from './TrendingFacetsResponse' ;
You can’t perform that action at this time.
0 commit comments