-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support trigger events option #745
Conversation
1285dee
to
a146d15
Compare
09c372f
to
5e5f12a
Compare
e907957
to
999f1a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
Why didn't you put this (duplicated) piece of code in the if (options.triggerEvents !== undefined) {
request.triggerEvents = options.triggerEvents;
} I see that stuff like this is already done in this method: Lines 901 to 906 in 83e434b
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything look good and updated.
There is just something odd about the :any you added to the request.
Since you have the type for the KuzzleRequest isn't that possible to put the type instead of any ?
Or like Alex said, it could be possible to avoid duplication at the Kuzzle.ts file level
I've thought about that, it was an option but not all methods got options and it could lead to useless code for those. I thought it was less readable to apply it were needed but more optimized. If we decide to apply it directly on query it is doable for sure |
There's no KuzzleRequest type in js SDK |
For maintainability purpose and after doing pro and cons, I'll stick to maintainability purpose where the query solution is better than little optim nit picking. I will refactor it |
LIttle UP as this need to be merged 💪🏼 |
will close this to open a Doc only PR |
This PR is intended to support triggerEvents request parameter for embeded sdk.
It is unit tested and will be functionnal tested when released on kuzzle side.
A lot of doc as been realigned with code
JIRA: KZLPRD-579