Skip to content

Commit

Permalink
Update docs & TS definition
Browse files Browse the repository at this point in the history
  • Loading branch information
vallpaper committed Feb 8, 2025
1 parent ba6aaf1 commit 79466eb
Show file tree
Hide file tree
Showing 12 changed files with 127 additions and 125 deletions.
209 changes: 105 additions & 104 deletions lib/index.d.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/requests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ exports.ListItemViewPortions = require("./list-item-view-portions").ListItemView
exports.ListUserViewPortions = require("./list-user-view-portions").ListUserViewPortions;
exports.RecommendItemsToUser = require("./recommend-items-to-user").RecommendItemsToUser;
exports.RecommendItemsToItem = require("./recommend-items-to-item").RecommendItemsToItem;
exports.RecommendItemsToItemSegment = require("./recommend-items-to-item-segment").RecommendItemsToItemSegment;
exports.RecommendNextItems = require("./recommend-next-items").RecommendNextItems;
exports.RecommendUsersToUser = require("./recommend-users-to-user").RecommendUsersToUser;
exports.RecommendUsersToItem = require("./recommend-users-to-item").RecommendUsersToItem;
exports.RecommendItemSegmentsToUser = require("./recommend-item-segments-to-user").RecommendItemSegmentsToUser;
exports.RecommendItemSegmentsToItem = require("./recommend-item-segments-to-item").RecommendItemSegmentsToItem;
exports.RecommendItemSegmentsToItemSegment = require("./recommend-item-segments-to-item-segment").RecommendItemSegmentsToItemSegment;
exports.RecommendItemsToItemSegment = require("./recommend-items-to-item-segment").RecommendItemsToItemSegment;
exports.SearchItems = require("./search-items").SearchItems;
exports.SearchItemSegments = require("./search-item-segments").SearchItemSegments;
exports.AddSearchSynonym = require("./add-search-synonym").AddSearchSynonym;
Expand Down
4 changes: 2 additions & 2 deletions lib/requests/list-items.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ListItems extends rqs.Request {
* - Type: boolean
* - Description: With `returnProperties=true`, property values of the listed items are returned along with their IDs in a JSON dictionary.
* Example response:
* ```
* ```json
* [
* {
* "itemId": "tv-178",
Expand All @@ -49,7 +49,7 @@ class ListItems extends rqs.Request {
* - Type: string[]
* - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
* Example response for `includedProperties=description,price`:
* ```
* ```json
* [
* {
* "itemId": "tv-178",
Expand Down
4 changes: 2 additions & 2 deletions lib/requests/list-users.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ListUsers extends rqs.Request {
* - Type: boolean
* - Description: With `returnProperties=true`, property values of the listed users are returned along with their IDs in a JSON dictionary.
* Example response:
* ```
* ```json
* [
* {
* "userId": "user-81",
Expand All @@ -45,7 +45,7 @@ class ListUsers extends rqs.Request {
* - Type: string[]
* - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
* Example response for `includedProperties=country`:
* ```
* ```json
* [
* {
* "userId": "user-81",
Expand Down
4 changes: 2 additions & 2 deletions lib/requests/recommend-items-to-item-segment.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class RecommendItemsToItemSegment extends rqs.Request {
* - Type: boolean
* - Description: With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user.
* Example response:
* ```
* ```json
* {
* "recommId": "0c6189e7-dc1a-429a-b613-192696309361",
* "recomms":
Expand Down Expand Up @@ -79,7 +79,7 @@ class RecommendItemsToItemSegment extends rqs.Request {
* - Type: string[]
* - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
* Example response for `includedProperties=description,price`:
* ```
* ```json
* {
* "recommId": "6842c725-a79f-4537-a02c-f34d668a3f80",
* "recomms":
Expand Down
4 changes: 2 additions & 2 deletions lib/requests/recommend-items-to-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class RecommendItemsToItem extends rqs.Request {
* - Type: boolean
* - Description: With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user.
* Example response:
* ```
* ```json
* {
* "recommId": "0c6189e7-dc1a-429a-b613-192696309361",
* "recomms":
Expand Down Expand Up @@ -77,7 +77,7 @@ class RecommendItemsToItem extends rqs.Request {
* - Type: string[]
* - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
* Example response for `includedProperties=description,price`:
* ```
* ```json
* {
* "recommId": "6842c725-a79f-4537-a02c-f34d668a3f80",
* "recomms":
Expand Down
4 changes: 2 additions & 2 deletions lib/requests/recommend-items-to-user.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class RecommendItemsToUser extends rqs.Request {
* - Type: boolean
* - Description: With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user.
* Example response:
* ```
* ```json
* {
* "recommId": "ce52ada4-e4d9-4885-943c-407db2dee837",
* "recomms":
Expand Down Expand Up @@ -65,7 +65,7 @@ class RecommendItemsToUser extends rqs.Request {
* - Type: string[]
* - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
* Example response for `includedProperties=description,price`:
* ```
* ```json
* {
* "recommId": "a86ee8d5-cd8e-46d1-886c-8b3771d0520b",
* "recomms":
Expand Down
7 changes: 4 additions & 3 deletions lib/requests/recommend-next-items.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ const rqs = require("./request");
* Returns items that shall be shown to a user as next recommendations when the user e.g. scrolls the page down (*infinite scroll*) or goes to the next page.
* It accepts `recommId` of a base recommendation request (e.g., request from the first page) and the number of items that shall be returned (`count`).
* The base request can be one of:
* - [Recommend items to item](https://docs.recombee.com/api.html#recommend-items-to-item)
* - [Recommend items to user](https://docs.recombee.com/api.html#recommend-items-to-user)
* - [Search items](https://docs.recombee.com/api.html#search-items)
* - [Recommend Items to Item](https://docs.recombee.com/api.html#recommend-items-to-item)
* - [Recommend Items to User](https://docs.recombee.com/api.html#recommend-items-to-user)
* - [Recommend Items to Item Segment](https://docs.recombee.com/api.html#recommend-items-to-item-segment)
* - [Search Items](https://docs.recombee.com/api.html#search-items)
* All the other parameters are inherited from the base request.
* *Recommend next items* can be called many times for a single `recommId` and each call returns different (previously not recommended) items.
* The number of *Recommend next items* calls performed so far is returned in the `numberNextRecommsCalls` field.
Expand Down
4 changes: 2 additions & 2 deletions lib/requests/recommend-users-to-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RecommendUsersToItem extends rqs.Request {
* - Type: boolean
* - Description: With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended users.
* Example response:
* ```
* ```json
* {
* "recommId": "039b71dc-b9cc-4645-a84f-62b841eecfce",
* "recomms":
Expand All @@ -57,7 +57,7 @@ class RecommendUsersToItem extends rqs.Request {
* - Type: string[]
* - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
* Example response for `includedProperties=country`:
* ```
* ```json
* {
* "recommId": "b2b355dd-972a-4728-9c6b-2dc229db0678",
* "recomms":
Expand Down
4 changes: 2 additions & 2 deletions lib/requests/recommend-users-to-user.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RecommendUsersToUser extends rqs.Request {
* - Type: boolean
* - Description: With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended users.
* Example response:
* ```
* ```json
* {
* "recommId": "9cb9c55d-50ba-4478-84fd-ab456136156e",
* "recomms":
Expand All @@ -57,7 +57,7 @@ class RecommendUsersToUser extends rqs.Request {
* - Type: string[]
* - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
* Example response for `includedProperties=country`:
* ```
* ```json
* {
* "recommId": "b326d82d-5d57-4b45-b362-c9d6f0895855",
* "recomms":
Expand Down
4 changes: 2 additions & 2 deletions lib/requests/search-items.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SearchItems extends rqs.Request {
* - Type: boolean
* - Description: With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user.
* Example response:
* ```
* ```json
* {
* "recommId": "ce52ada4-e4d9-4885-943c-407db2dee837",
* "recomms":
Expand Down Expand Up @@ -67,7 +67,7 @@ class SearchItems extends rqs.Request {
* - Type: string[]
* - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
* Example response for `includedProperties=description,price`:
* ```
* ```json
* {
* "recommId": "a86ee8d5-cd8e-46d1-886c-8b3771d0520b",
* "recomms":
Expand Down
2 changes: 1 addition & 1 deletion lib/requests/update-more-items.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const rqs = require("./request");
/**
* Updates (some) property values of all the items that pass the filter.
* Example: *Setting all the items that are older than a week as unavailable*
* ```
* ```json
* {
* "filter": "'releaseDate' < now() - 7*24*3600",
* "changes": {"available": false}
Expand Down

0 comments on commit 79466eb

Please sign in to comment.