Algoliasearch Client Javascript Versions Save

⚡️ A fully-featured and blazing-fast JavaScript API client to interact with Algolia.

4.23.3

1 month ago

v4.23.3

  • fix(types): add serverTimeMS to search response (#1518) (a1d1707), closes #1518

4.23.2

1 month ago

v4.23.2

  • fix(recommend): only export default function (#1514) (4a04d8e), closes #1514

4.23.1

1 month ago

v4.23.1

  • fix(recommend): export recommend methods to use them in algoliasearch (#1512) (5fc5f4f), closes #1512

4.23.0

1 month ago

v4.23.0

  • feat(search): fetch recommendations directly from algoliasearch (#1509) (8087b28), closes #1509

4.22.1

4 months ago

v4.22.1

  • fix(recommend): update recommended-for-you model type (#1500) (f94ce64), closes #1500

4.22.0

5 months ago

v4.22.0

  • fix(recommend): update TrendingFacetHit facetValue type to string (#1498) (ac9d6e2), closes #1498

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(/**/)

4.21.1

5 months ago

v4.21.1

  • fix(recommend): RecommendedForYouQuery userToken should be required (#1496) (d20b253), closes #1496

4.21.0

5 months ago

v4.21.0

  • feat(recommend): add recommended-for-you model (#1490) (004f033), closes #1490
  • fix(recommend): getTrendingFacets typing (#1494) (94b46b5), closes #1494
  • docs(readme): fix typo (#1486) (db9953c), closes #1486

4.20.0

8 months ago

v4.20.0

  • feat(search): add inference ACL to API key object (#1479) (3a95126), closes #1479

4.19.1

10 months ago

v4.19.1

  • fix(recommend): Add Type RecommendQueriesResponse from old MultipleQueriesResponse for recommend (#1472) (36285b2), closes #1472