Skip to content

Commit c1a0d6a

Browse files
committed
feat: recommended for you
1 parent 2ef075c commit c1a0d6a

File tree

3 files changed

+44
-5
lines changed

3 files changed

+44
-5
lines changed

specs/common/schemas/SearchParams.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,7 @@ baseSearchParamsWithoutQuery:
136136
x-categories:
137137
- Personalization
138138
userToken:
139-
type: string
140-
description: Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.
141-
example: '123456'
142-
x-categories:
143-
- Personalization
139+
$ref: '#/userToken'
144140
getRankingInfo:
145141
type: boolean
146142
description: Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).
@@ -209,6 +205,13 @@ paramsAsString:
209205
type: string
210206
default: ''
211207

208+
userToken:
209+
type: string
210+
description: Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.
211+
example: '123456'
212+
x-categories:
213+
- Personalization
214+
212215
query:
213216
type: string
214217
description: Text to search for in an index.

specs/recommend/common/schemas/RecommendationsRequest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ recommendationsRequest:
33
- $ref: './TrendingItemsQuery.yml#/trendingItemsQuery'
44
- $ref: './TrendingFacetsQuery.yml#/trendingFacetsQuery'
55
- $ref: './RecommendationsQuery.yml#/recommendationsQuery'
6+
- $ref: './RecommendedForYouQuery.yml#/recommendedForYouQuery'
67

78
baseRecommendRequest:
89
type: object
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
recommendedForYouQuery:
2+
allOf:
3+
- $ref: './RecommendationsRequest.yml#/baseRecommendRequest'
4+
- $ref: '#/baseRecommendedForYouQuery'
5+
6+
recommendedForYouQueryParameters:
7+
allOf:
8+
- $ref: '../../../common/schemas/SearchParams.yml#/searchParamsObject'
9+
- $ref: '#/baseRecommendedForYouQueryParameters'
10+
11+
baseRecommendedForYouQueryParameters:
12+
type: object
13+
properties:
14+
userToken:
15+
$ref: '../../../common/schemas/SearchParams.yml#/userToken'
16+
required:
17+
- userToken
18+
19+
baseRecommendedForYouQuery:
20+
type: object
21+
additionalProperties: false
22+
properties:
23+
model:
24+
$ref: '#/recommendedForYouModel'
25+
queryParameters:
26+
$ref: '#/recommendedForYouQueryParameters'
27+
fallbackParameters:
28+
$ref: '#/recommendedForYouQueryParameters'
29+
required:
30+
- model
31+
32+
recommendedForYouModel:
33+
description: Recommended for you model.
34+
type: string
35+
enum: [recommended-for-you]

0 commit comments

Comments
 (0)