Skip to content

Commit

Permalink
fix(recommend): update TrendingFacetHit facetValue type to string (#1498
Browse files Browse the repository at this point in the history
)
  • Loading branch information
raed667 committed Dec 14, 2023
1 parent ea7b9b1 commit ac9d6e2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/recommend/src/types/TrendingFacetHit.ts
@@ -1,5 +1,5 @@
export type TrendingFacetHit<TObject> = {
export type TrendingFacetHit = {
readonly _score: number;
readonly facetName: string;
readonly facetValue: TObject;
readonly facetValue: string;
};
4 changes: 2 additions & 2 deletions packages/recommend/src/types/TrendingFacetsResponse.ts
Expand Up @@ -2,6 +2,6 @@ import { SearchResponse } from '@algolia/client-search';

import { TrendingFacetHit } from './TrendingFacetHit';

export type TrendingFacetsResponse<TObject> = Omit<SearchResponse<TObject>, 'hits'> & {
readonly hits: ReadonlyArray<TrendingFacetHit<TObject>>;
export type TrendingFacetsResponse = Omit<SearchResponse, 'hits'> & {
readonly hits: readonly TrendingFacetHit[];
};
6 changes: 3 additions & 3 deletions packages/recommend/src/types/WithRecommendMethods.ts
Expand Up @@ -11,11 +11,11 @@ import { TrendingFacetsResponse } from './TrendingFacetsResponse';
import { TrendingItemsQuery } from './TrendingItemsQuery';
import { TrendingQuery } from './TrendingQuery';

export type RecommendTrendingFacetsQueriesResponse<TObject> = {
export type RecommendTrendingFacetsQueriesResponse = {
/**
* The list of results.
*/
readonly results: ReadonlyArray<TrendingFacetsResponse<TObject>>;
readonly results: readonly TrendingFacetsResponse[];
};

export type RecommendQueriesResponse<TObject> = {
Expand Down Expand Up @@ -64,7 +64,7 @@ export type WithRecommendMethods<TType> = TType & {
readonly getTrendingFacets: <TObject>(
queries: readonly TrendingFacetsQuery[],
requestOptions?: RequestOptions & SearchOptions
) => Readonly<Promise<RecommendTrendingFacetsQueriesResponse<TObject>>>;
) => Readonly<Promise<RecommendTrendingFacetsQueriesResponse>>;

/**
* Returns Looking Similar
Expand Down

0 comments on commit ac9d6e2

Please sign in to comment.