api-clients-automation icon indicating copy to clipboard operation
api-clients-automation copied to clipboard

feat(clients): support recommend methods in `algoliasearch`

Open aymeric-giraudet opened this issue 3 months ago • 2 comments

🧭 What and Why

As we're trying to unify FX libraries, we want to avoid requiring users to import a bunch of different packages. We've made those changes to v4 : https://github.com/algolia/algoliasearch-client-javascript/pull/1509

🎟 JIRA Ticket: FX-2774

Changes included:

I'm publishing this as a draft as I'm overall not too sure about the best way to implement this :

  • I opted to merge the search and recommend specs for algoliasearch/lite, and it works well however this will have repercussions for the Dart client (cc @aallam)
  • For the algoliasearch part (not lite), I'm a bit torn as methods are not exported so we can't have the same treeshaking we have with v4, createRecommend has to be called and the bundle will have redundant code. Running into problems with similar models being exported too. Also didn't update it for Dart but it might be fine for now.

🧪 Test

Didn't bother with tests yet as this is subject to change :D

aymeric-giraudet avatar Mar 07 '24 16:03 aymeric-giraudet

🔨 The codegen job will run at the end of the CI.

Make sure your last commit does not contain generated code, it will be automatically pushed by our CI.

algolia-bot avatar Mar 07 '24 16:03 algolia-bot

thanks for the contribution! I actually had a local branch for this feature, I'll add them to your branch and push so we can discuss it :)

had trouble merging our changes, so I've applied some of yours on my PR, which should make the test pass https://github.com/algolia/api-clients-automation/pull/2860, let me know wdyt

shortcuts avatar Mar 12 '24 18:03 shortcuts