v4.22.0
Why
The trending-facets
API only returns type string
for facetValue
.
A follow-up on #1494 as other models return items/hits which are of type RecordWithObjectID
However, trending-facets
model returns a list of TrendingFacetHit which (by definition) don't have an objectID
property.
How
To simplify the code, we can remove the type argument TObject
for trending-facets
Impact
If you're not using TypeScript or the trending-facets
model, there is nothing to change. You can ignore the following.
Otherwise, you will need to remove the type argument passed to getTrendingFacets
and the code goes from this:
type FacetType = {
facetName: string;
facetValue: string;
}
const { results } = await client.getTrendingFacets<FacetType>(/**/)
To this:
const { results } = await client.getTrendingFacets(/**/)