-
Notifications
You must be signed in to change notification settings - Fork 12
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(specs): add personalizaton
spec and client
#27
Conversation
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.
That's impressive ! I need to catch up the tests 馃槢
...-client-javascript/client-personalization/model/personalizationStrategyObjectEventScoring.ts
Outdated
Show resolved
Hide resolved
...s/algoliasearch-client-javascript/client-personalization/model/setPersonalizationStrategy.ts
Outdated
Show resolved
Hide resolved
"npmName": "@algolia/client-personalization", | ||
"npmVersion": "5.0.0", | ||
|
||
"isPersonalizationHost": false |
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.
Only personalization
uses different hosts ?
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.
For now yes, I guess we should iterate on that if we encounter that again
templates/javascript/gitignore
Outdated
dist | ||
build | ||
.git_push.sh | ||
.openapi-generator-ignore |
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.
.openapi-generator-ignore
is used in other languages, and can be used here too, to put git_push.sh
and openapi-generator
inside for example, so that they won't get generated.
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.
Do you mean we can add a .openapi-generator-ignore
to the template folder? 馃
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.
Unfortunately no, in must be at the root of the generated folder, where it is already, and never destroyed.
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.
I did not try, maybe it can be copied with a script instead
Don't forget to add it to the CI also |
specs/common/parameters.yml
Outdated
@@ -8,6 +8,14 @@ IndexName: | |||
type: string | |||
example: 'myIndexName' | |||
|
|||
UserToken: |
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.
It's weird to have a common parameter depends on a personalization
param, does this belong in personalization
? Or userToken
belong in common ?
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.
True! I think it's used later for API keys but we're not there yet, I've moved it to the personalization
folder
{{/isPersonalizationHost}} | ||
|
||
{{#isPersonalizationHost}} | ||
public getDefaultHosts(region: string = 'us'): Host[] { |
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.
do we have a list of region somewhere ? this could be an union (unless infra likes to add a new region everyday)
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.
I don't think so, at least did not found one. We will also need it for A/B testing, so it would be could to list them all indeed
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.
Cool ! I don't know if this is in this PR but the file client-search/model/listIndicesObject.ts
is commited but not generated, could you remove it please if this is the right scope ?
Good catch! Not related to this PR but not a big deal, done in 3c50767 |
馃Л What and Why
馃師 JIRA Ticket: https://algolia.atlassian.net/browse/APIC-203
Changes included:
personalization
spec and clienthost
logic related to the client