algolia / algoliasearch-client-javascript

⚡️ A fully-featured and blazing-fast JavaScript API client to interact with Algolia.
https://www.algolia.com/doc/api-client/javascript/getting-started/
MIT License
1.33k stars 221 forks source link

fix(recommend): update recommended-for-you model type #1500

Closed raed667 closed 8 months ago

raed667 commented 8 months ago

When calling getRecommendations we need to make sure that the user doesn't have to pass objectID for the model recommended-for-you.

Otherwise this error will occur:

Property 'objectID' is missing in type '{ indexName: string; model: "recommended-for-you"; fallbackParameters: RecommendSearchOptions | undefined; queryParameters: (RecommendSearchOptions & { ...; }) | undefined; maxRecommendations: number | undefined; }' but required in type 'RecommendationsQuery'.

The fix should be a patch since the model is not publicly available yet.

raed667 commented 8 months ago

Hey @francoischalifour , sorry i had some unpushed changes 😵‍💫 now, the PR should match what we talked about.