-
Notifications
You must be signed in to change notification settings - Fork 21
docs(ai-perso): add ai-personalization spec file for documentation generation #4063
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
faa7271
feat: add ai-personalization spec file
writeens 7082b00
Merge branch 'main' into feat/ai-perso/add-ai-personalization-spec
writeens 277bf7e
fix: bundle ai-personalization
shortcuts 5ef63e0
fix: issue with casing
writeens 2ddec72
fix: prefer API description
writeens 99566f3
fix: future proof type
writeens d14f3d1
fix: move status to Configuration.yml
writeens eb456c2
fix: move config object to standalone file
writeens 04bd320
Merge branch 'main' into feat/ai-perso/add-ai-personalization-spec
shortcuts File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
errorCodes: | ||
title: errorCodes | ||
type: string | ||
enum: | ||
- blocked | ||
- deleted | ||
- no_perso_access | ||
- all_attr_value_filtered | ||
- missing_index | ||
- no_events_last_30_days | ||
- pending_pipelines | ||
- invalid_config | ||
|
||
status: | ||
title: status | ||
type: string | ||
enum: [pending, active, paused] | ||
|
||
sourceType: | ||
title: type | ||
type: string | ||
enum: [insights] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
description: Bad request. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './BaseResponse.yml' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
type: object | ||
properties: | ||
status: | ||
type: integer | ||
description: HTTP status code. | ||
message: | ||
type: string | ||
description: Details about the response, such as error messages. |
5 changes: 5 additions & 0 deletions
5
specs/ai-personalization/common/responses/ConfigurationNotFound.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
description: Configuration not found. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './BaseResponse.yml' |
5 changes: 5 additions & 0 deletions
5
specs/ai-personalization/common/responses/InternalServerError.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
description: Internal server error. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './BaseResponse.yml' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
description: Invalid user ID format. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './BaseResponse.yml' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
description: Not authorized to access this resource. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './BaseResponse.yml' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
description: User not found. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: './BaseResponse.yml' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
event: | ||
type: object | ||
properties: | ||
type: | ||
$ref: '#/eventType' | ||
subtype: | ||
$ref: '#/subtype' | ||
name: | ||
type: string | ||
required: [type, name] | ||
|
||
events: | ||
type: object | ||
properties: | ||
viewDetails: | ||
type: array | ||
items: | ||
$ref: '#/event' | ||
viewListing: | ||
type: array | ||
items: | ||
$ref: '#/event' | ||
addToCart: | ||
type: array | ||
items: | ||
$ref: '#/event' | ||
purchase: | ||
type: array | ||
items: | ||
$ref: '#/event' | ||
required: [viewDetails, viewListing, addToCart, purchase] | ||
|
||
issue: | ||
type: object | ||
description: An issue is either an 'error' or a 'warning' that is generated by the validator. | ||
properties: | ||
code: | ||
type: string | ||
index: | ||
type: string | ||
message: | ||
type: string | ||
required: [code, index, message] | ||
|
||
personalizationReRanking: | ||
type: string | ||
description: The impact that personalization has on the re-ranking of search results. | ||
enum: [none, low, medium, high, maximum] | ||
|
||
profileType: | ||
type: string | ||
enum: [basic, predictive] | ||
description: | | ||
The type of user profiles to generate. | ||
|
||
Basic profiles are based on past behaviors, ensuring search results align with previous interests. | ||
Predictive profiles are AI-powered profiles that predict and adapt to users' interests, ensuring search results align with evolving preferences. | ||
|
||
eventType: | ||
type: string | ||
enum: [view, click, conversion] | ||
|
||
subtype: | ||
type: string | ||
enum: [addToCart, purchase] | ||
|
||
status: | ||
type: object | ||
properties: | ||
type: | ||
$ref: '../enums.yml#/status' | ||
errors: | ||
type: array | ||
items: | ||
$ref: '../enums.yml#/errorCodes' |
41 changes: 41 additions & 0 deletions
41
specs/ai-personalization/common/schemas/ConfigurationObject.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
configurationObject: | ||
type: object | ||
properties: | ||
indices: | ||
type: array | ||
items: | ||
title: configurationObject | ||
type: object | ||
properties: | ||
index: | ||
type: string | ||
affinities: | ||
type: array | ||
items: | ||
type: string | ||
source: | ||
title: source | ||
type: object | ||
properties: | ||
type: | ||
$ref: '../enums.yml#/sourceType' | ||
events: | ||
$ref: './Configuration.yml#/events' | ||
errors: | ||
type: array | ||
items: | ||
$ref: './Configuration.yml#/issue' | ||
warnings: | ||
type: array | ||
items: | ||
$ref: './Configuration.yml#/issue' | ||
lastUpdatedAt: | ||
type: string | ||
required: [index, affinities, source, errors, warnings, lastUpdatedAt] | ||
personalizationReRanking: | ||
$ref: './Configuration.yml#/personalizationReRanking' | ||
profileType: | ||
$ref: './Configuration.yml#/profileType' | ||
status: | ||
$ref: './Configuration.yml#/status' | ||
required: [indices, personalzationReRanking, profileType, status] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
user: | ||
type: object | ||
properties: | ||
userID: | ||
type: string | ||
affinities: | ||
type: array | ||
items: | ||
title: affinity | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
indices: | ||
type: array | ||
items: | ||
type: string | ||
minimum: 1 | ||
value: | ||
type: string | ||
score: | ||
type: number | ||
minimum: 1 | ||
maximum: 20 | ||
lastUpdatedAt: | ||
type: string | ||
required: [name, indices, value, score, lastUpdatedAt] | ||
lastUpdatedAt: | ||
type: string | ||
required: [userID, affinities, lastUpdatedAt] |
104 changes: 104 additions & 0 deletions
104
specs/ai-personalization/common/schemas/UsersParams.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# query | ||
startDate: | ||
name: startDate | ||
description: | | ||
Filter users by start date (in RFC3339 format). | ||
Only users that were updated after the passed date will be returned. | ||
in: query | ||
schema: | ||
type: string | ||
example: 2024-06-27T08:27:26Z | ||
|
||
endDate: | ||
name: endDate | ||
description: | | ||
Filter users by end date (in RFC3339 format). | ||
Only users that were updated before the passed date will be returned. | ||
in: query | ||
schema: | ||
type: string | ||
example: 2024-06-28T08:27:26Z | ||
|
||
indices: | ||
name: indices | ||
description: | | ||
Filter users by matching indices. | ||
If multiple indices are passed, returned users will match all indices. | ||
in: query | ||
schema: | ||
type: array | ||
items: | ||
type: string | ||
examples: | ||
singleIndex: | ||
value: [products_EN] | ||
summary: Filter by single index | ||
multipleIndices: | ||
value: [products_EN, products_FR] | ||
summary: Filter by multiple indices | ||
style: form | ||
explode: false | ||
|
||
affinity: | ||
name: affinity | ||
description: | | ||
Filter users by affinity name and value. | ||
If multiple values are passed, returned users will match all values. | ||
in: query | ||
schema: | ||
type: array | ||
items: | ||
type: string | ||
examples: | ||
affinityName: | ||
value: brand | ||
summary: Filter by single affinity name | ||
affinityValuePair: | ||
value: brand:Nike | ||
summary: Filter by single affinity name and value | ||
multipleAffinityNames: | ||
value: brand,color | ||
summary: Filter by multiple affinity names | ||
multipleAffinityValuePairs: | ||
value: brand:Nike,color:white | ||
summary: Filter by multiple affinity name and value pairs | ||
|
||
limit: | ||
name: limit | ||
description: | | ||
Limit the number of users in the response. | ||
The value of this parameter ranges from 1 to 1000. | ||
in: query | ||
schema: | ||
type: integer | ||
default: 10 | ||
minimum: 1 | ||
maximum: 1000 | ||
|
||
nextPageToken: | ||
name: nextPageToken | ||
description: | | ||
Reference for the next page, when navigating forward using pagination. | ||
Can't be used in the same request as `previousPageToken`. | ||
in: query | ||
schema: | ||
type: string | ||
|
||
previousPageToken: | ||
name: previousPageToken | ||
description: | | ||
Reference for the previous page, when navigating backward using pagination. | ||
Can't be used in the same request as `nextPageToken`. | ||
in: query | ||
schema: | ||
type: string | ||
|
||
# path | ||
|
||
userID: | ||
name: userID | ||
description: ID of the user. | ||
in: path | ||
required: true | ||
schema: | ||
type: string |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.