Skip to content

Commit c1ac7be

Browse files
authored
feat(specs): add personalizaton spec and client (#27)
1 parent f0c34de commit c1ac7be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1467
-38
lines changed

.github/workflows/client_javascript.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,10 @@ jobs:
3434
- name: Build recommend client
3535
run: yarn client:build-js:recommend
3636

37+
- name: Generate personalization client
38+
run: yarn generate:js:personalization
39+
40+
- name: Build personalization client
41+
run: yarn client:build-js:personalization
3742
- name: Lint
3843
run: yarn lint

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ yarn-error.log
1010
!.yarn/releases
1111
!.yarn/plugins
1212

13-
**/.openapi-generator
1413
**/node_modules
1514
**/dist
16-
**/.openapi-generator-ignore
17-
**/git_push.sh
1815

1916
.vscode
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
.openapi-generator
4+
.env
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
git_push.sh
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// This is the entrypoint for the package
2+
export * from './src/apis';
3+
export * from './model/models';
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export type DeleteUserProfileResponse = {
2+
/**
3+
* UserToken representing the user for which to fetch the Personalization profile.
4+
*/
5+
userToken: string;
6+
/**
7+
* A date until which the data can safely be considered as deleted for the given user. Any data received after the deletedUntil date will start building a new user profile.
8+
*/
9+
deletedUntil: Date;
10+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* Error.
3+
*/
4+
export type ErrorBase = {
5+
message?: string;
6+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export type EventScoring = {
2+
/**
3+
* The score for the event.
4+
*/
5+
score: number;
6+
/**
7+
* The name of the event.
8+
*/
9+
eventName: string;
10+
/**
11+
* The type of the event.
12+
*/
13+
eventType: string;
14+
};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export type FacetScoring = {
2+
/**
3+
* The score for the event.
4+
*/
5+
score: number;
6+
/**
7+
* The name of the facet.
8+
*/
9+
facetName: string;
10+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export type GetUserTokenResponse = {
2+
/**
3+
* UserToken representing the user for which to fetch the Personalization profile.
4+
*/
5+
userToken: string;
6+
/**
7+
* Date of last event update. (ISO-8601 format).
8+
*/
9+
lastEventAt: Date;
10+
/**
11+
* The userToken scores.
12+
*/
13+
scores: { [key: string]: Record<string, any> };
14+
};

0 commit comments

Comments
 (0)