recombee-api-client 5.0.2 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/lib/api-client.js +1 -1
- package/lib/index.d.ts +137 -79
- package/lib/requests/add-manual-reql-segment.js +1 -1
- package/lib/requests/add-search-synonym.js +1 -1
- package/lib/requests/create-auto-reql-segmentation.js +1 -1
- package/lib/requests/create-manual-reql-segmentation.js +1 -1
- package/lib/requests/delete-item.js +1 -1
- package/lib/requests/delete-more-items.js +2 -2
- package/lib/requests/delete-search-synonym.js +1 -1
- package/lib/requests/index.js +2 -1
- package/lib/requests/list-items.js +1 -1
- package/lib/requests/list-scenarios.js +40 -0
- package/lib/requests/list-users.js +1 -1
- package/lib/requests/merge-users.js +2 -0
- package/lib/requests/recommend-item-segments-to-item-segment.js +6 -6
- package/lib/requests/recommend-item-segments-to-item.js +6 -6
- package/lib/requests/recommend-item-segments-to-user.js +6 -6
- package/lib/requests/recommend-items-to-item-segment.js +12 -12
- package/lib/requests/recommend-items-to-item.js +14 -14
- package/lib/requests/recommend-items-to-user.js +13 -13
- package/lib/requests/recommend-next-items.js +4 -4
- package/lib/requests/recommend-users-to-item.js +9 -9
- package/lib/requests/recommend-users-to-user.js +11 -11
- package/lib/requests/search-item-segments.js +5 -5
- package/lib/requests/search-items.js +9 -9
- package/lib/requests/set-item-values.js +1 -1
- package/lib/requests/set-user-values.js +1 -1
- package/lib/requests/set-view-portion.js +1 -1
- package/lib/requests/update-more-items.js +1 -1
- package/package.json +8 -7
- package/test/list-scenarios-batch_test.js +33 -0
- package/test/list-scenarios-callback_test.js +35 -0
- package/test/list-scenarios-test.js +31 -0
|
@@ -7,7 +7,7 @@ const rqs = require("./request");
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Adds a new Segment into a Manual ReQL Segmentation.
|
|
10
|
-
* The new Segment is defined by a [ReQL](https://docs.recombee.com/reql
|
|
10
|
+
* The new Segment is defined by a [ReQL](https://docs.recombee.com/reql) filter that returns `true` for an item in case that this item belongs to the segment.
|
|
11
11
|
*/
|
|
12
12
|
class AddManualReqlSegment extends rqs.Request {
|
|
13
13
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Adds a new synonym for the [Search items](https://docs.recombee.com/api
|
|
9
|
+
* Adds a new synonym for the [Search items](https://docs.recombee.com/api#search-items).
|
|
10
10
|
* When the `term` is used in the search query, the `synonym` is also used for the full-text search.
|
|
11
11
|
* Unless `oneWay=true`, it works also in the opposite way (`synonym` -> `term`).
|
|
12
12
|
* An example of a synonym can be `science fiction` for the term `sci-fi`.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Segment the items using a [ReQL](https://docs.recombee.com/reql
|
|
9
|
+
* Segment the items using a [ReQL](https://docs.recombee.com/reql) expression.
|
|
10
10
|
* For each item, the expression should return a set that contains IDs of segments to which the item belongs to.
|
|
11
11
|
*/
|
|
12
12
|
class CreateAutoReqlSegmentation extends rqs.Request {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Segment the items using multiple [ReQL](https://docs.recombee.com/reql
|
|
9
|
+
* Segment the items using multiple [ReQL](https://docs.recombee.com/reql) filters.
|
|
10
10
|
* Use the Add Manual ReQL Items Segment endpoint to create the individual segments.
|
|
11
11
|
*/
|
|
12
12
|
class CreateManualReqlSegmentation extends rqs.Request {
|
|
@@ -8,7 +8,7 @@ const rqs = require("./request");
|
|
|
8
8
|
/**
|
|
9
9
|
* Deletes an item of the given `itemId` from the catalog.
|
|
10
10
|
* If there are any *purchases*, *ratings*, *bookmarks*, *cart additions*, or *detail views* of the item present in the database, they will be deleted in cascade as well. Also, if the item is present in some *series*, it will be removed from all the *series* where present.
|
|
11
|
-
* If an item becomes obsolete/no longer available, it is meaningful to keep it in the catalog (along with all the interaction data, which are very useful), and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql
|
|
11
|
+
* If an item becomes obsolete/no longer available, it is meaningful to keep it in the catalog (along with all the interaction data, which are very useful), and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql) instead of deleting the item completely.
|
|
12
12
|
*/
|
|
13
13
|
class DeleteItem extends rqs.Request {
|
|
14
14
|
|
|
@@ -7,13 +7,13 @@ const rqs = require("./request");
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Deletes all the items that pass the filter.
|
|
10
|
-
* If an item becomes obsolete/no longer available, it is meaningful to **keep it in the catalog** (along with all the interaction data, which are very useful) and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql
|
|
10
|
+
* If an item becomes obsolete/no longer available, it is meaningful to **keep it in the catalog** (along with all the interaction data, which are very useful) and **only exclude the item from recommendations**. In such a case, use [ReQL filter](https://docs.recombee.com/reql) instead of deleting the item completely.
|
|
11
11
|
*/
|
|
12
12
|
class DeleteMoreItems extends rqs.Request {
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Construct the request
|
|
16
|
-
* @param {string} filter - A [ReQL](https://docs.recombee.com/reql
|
|
16
|
+
* @param {string} filter - A [ReQL](https://docs.recombee.com/reql) expression, which returns `true` for the items that shall be updated.
|
|
17
17
|
*/
|
|
18
18
|
constructor(filter) {
|
|
19
19
|
super('DELETE', '/more-items/', 100000, false);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Deletes synonym of the given `id`. This synonym is no longer taken into account in the [Search items](https://docs.recombee.com/api
|
|
9
|
+
* Deletes synonym of the given `id`. This synonym is no longer taken into account in the [Search items](https://docs.recombee.com/api#search-items).
|
|
10
10
|
*/
|
|
11
11
|
class DeleteSearchSynonym extends rqs.Request {
|
|
12
12
|
|
package/lib/requests/index.js
CHANGED
|
@@ -81,5 +81,6 @@ exports.DeleteManualReqlSegment = require("./delete-manual-reql-segment").Delete
|
|
|
81
81
|
exports.ListSegmentations = require("./list-segmentations").ListSegmentations;
|
|
82
82
|
exports.GetSegmentation = require("./get-segmentation").GetSegmentation;
|
|
83
83
|
exports.DeleteSegmentation = require("./delete-segmentation").DeleteSegmentation;
|
|
84
|
-
exports.ResetDatabase = require("./reset-database").ResetDatabase;
|
|
85
84
|
exports.Batch = require("./batch").Batch;
|
|
85
|
+
exports.ListScenarios = require("./list-scenarios").ListScenarios;
|
|
86
|
+
exports.ResetDatabase = require("./reset-database").ResetDatabase;
|
|
@@ -16,7 +16,7 @@ class ListItems extends rqs.Request {
|
|
|
16
16
|
* - Allowed parameters:
|
|
17
17
|
* - *filter*
|
|
18
18
|
* - Type: string
|
|
19
|
-
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql
|
|
19
|
+
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter items to be listed. Only the items for which the expression is *true* will be returned.
|
|
20
20
|
* - *count*
|
|
21
21
|
* - Type: number
|
|
22
22
|
* - Description: The number of items to be listed.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
This file is auto-generated, do not edit
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
'use strict';
|
|
6
|
+
const rqs = require("./request");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Get all [Scenarios](https://docs.recombee.com/scenarios) of the given database.
|
|
10
|
+
*/
|
|
11
|
+
class ListScenarios extends rqs.Request {
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Construct the request
|
|
15
|
+
*/
|
|
16
|
+
constructor() {
|
|
17
|
+
super('GET', '/scenarios/', 10000, false);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Get body parameters
|
|
22
|
+
* @return {Object} The values of body parameters (name of parameter: value of the parameter)
|
|
23
|
+
*/
|
|
24
|
+
bodyParameters() {
|
|
25
|
+
let params = {};
|
|
26
|
+
|
|
27
|
+
return params;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Get query parameters
|
|
32
|
+
* @return {Object} The values of query parameters (name of parameter: value of the parameter)
|
|
33
|
+
*/
|
|
34
|
+
queryParameters() {
|
|
35
|
+
let params = {};
|
|
36
|
+
return params;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
exports.ListScenarios = ListScenarios
|
|
@@ -16,7 +16,7 @@ class ListUsers extends rqs.Request {
|
|
|
16
16
|
* - Allowed parameters:
|
|
17
17
|
* - *filter*
|
|
18
18
|
* - Type: string
|
|
19
|
-
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql
|
|
19
|
+
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter users to be listed. Only the users for which the expression is *true* will be returned.
|
|
20
20
|
* - *count*
|
|
21
21
|
* - Type: number
|
|
22
22
|
* - Description: The number of users to be listed.
|
|
@@ -8,6 +8,8 @@ const rqs = require("./request");
|
|
|
8
8
|
/**
|
|
9
9
|
* Merges interactions (purchases, ratings, bookmarks, detail views ...) of two different users under a single user ID. This is especially useful for online e-commerce applications working with anonymous users identified by unique tokens such as the session ID. In such applications, it may often happen that a user owns a persistent account, yet accesses the system anonymously while, e.g., putting items into a shopping cart. At some point in time, such as when the user wishes to confirm the purchase, (s)he logs into the system using his/her username and password. The interactions made under anonymous session ID then become connected with the persistent account, and merging these two becomes desirable.
|
|
10
10
|
* Merging happens between two users referred to as the *target* and the *source*. After the merge, all the interactions of the source user are attributed to the target user, and the source user is **deleted**.
|
|
11
|
+
* By default, the *Merge Users* request is only available from server-side integrations for security reasons, to prevent potential abuse.
|
|
12
|
+
* If you need to call this request from a client-side environment (such as a web or mobile app), please contact our support and request access to enable this feature for your database.
|
|
11
13
|
*/
|
|
12
14
|
class MergeUsers extends rqs.Request {
|
|
13
15
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Recommends Segments from a result [Segmentation](https://docs.recombee.com/segmentations
|
|
9
|
+
* Recommends Segments from a result [Segmentation](https://docs.recombee.com/segmentations) that are the most relevant to a particular Segment from a context Segmentation.
|
|
10
10
|
* Based on the used Segmentations, this endpoint can be used for example for:
|
|
11
11
|
* - Recommending the related brands to particular brand
|
|
12
12
|
* - Recommending the related brands to particular category
|
|
@@ -39,23 +39,23 @@ class RecommendItemSegmentsToItemSegment extends rqs.Request {
|
|
|
39
39
|
* - *scenario*
|
|
40
40
|
* - Type: string
|
|
41
41
|
* - Description: Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
|
42
|
-
* You can set various settings to the [scenario](https://docs.recombee.com/scenarios
|
|
42
|
+
* You can set various settings to the [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs.
|
|
43
43
|
* The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios.
|
|
44
44
|
* - *cascadeCreate*
|
|
45
45
|
* - Type: boolean
|
|
46
46
|
* - Description: If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system.
|
|
47
47
|
* - *filter*
|
|
48
48
|
* - Type: string
|
|
49
|
-
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql
|
|
49
|
+
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql) expression which allows you to filter recommended segments based on the `segmentationId`.
|
|
50
50
|
* - *booster*
|
|
51
51
|
* - Type: string
|
|
52
|
-
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql
|
|
52
|
+
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`.
|
|
53
53
|
* - *logic*
|
|
54
54
|
* - Type: string | object
|
|
55
55
|
* - Description: Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
|
56
|
-
* See [this section](https://docs.recombee.com/recommendation_logics
|
|
56
|
+
* See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
|
|
57
57
|
* The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
|
58
|
-
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios
|
|
58
|
+
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
|
59
59
|
* - *expertSettings*
|
|
60
60
|
* - Type: object
|
|
61
61
|
* - Description: Dictionary of custom options.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Recommends Segments from a [Segmentation](https://docs.recombee.com/segmentations
|
|
9
|
+
* Recommends Segments from a [Segmentation](https://docs.recombee.com/segmentations) that are the most relevant to a particular item.
|
|
10
10
|
* Based on the used Segmentation, this endpoint can be used for example for:
|
|
11
11
|
* - Recommending the related categories
|
|
12
12
|
* - Recommending the related genres
|
|
@@ -40,23 +40,23 @@ class RecommendItemSegmentsToItem extends rqs.Request {
|
|
|
40
40
|
* - *scenario*
|
|
41
41
|
* - Type: string
|
|
42
42
|
* - Description: Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
|
43
|
-
* You can set various settings to the [scenario](https://docs.recombee.com/scenarios
|
|
43
|
+
* You can set various settings to the [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs.
|
|
44
44
|
* The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios.
|
|
45
45
|
* - *cascadeCreate*
|
|
46
46
|
* - Type: boolean
|
|
47
47
|
* - Description: If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system.
|
|
48
48
|
* - *filter*
|
|
49
49
|
* - Type: string
|
|
50
|
-
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql
|
|
50
|
+
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql) expression which allows you to filter recommended segments based on the `segmentationId`.
|
|
51
51
|
* - *booster*
|
|
52
52
|
* - Type: string
|
|
53
|
-
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql
|
|
53
|
+
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`.
|
|
54
54
|
* - *logic*
|
|
55
55
|
* - Type: string | object
|
|
56
56
|
* - Description: Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
|
57
|
-
* See [this section](https://docs.recombee.com/recommendation_logics
|
|
57
|
+
* See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
|
|
58
58
|
* The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
|
59
|
-
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios
|
|
59
|
+
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
|
60
60
|
* - *expertSettings*
|
|
61
61
|
* - Type: object
|
|
62
62
|
* - Description: Dictionary of custom options.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Recommends the top Segments from a [Segmentation](https://docs.recombee.com/segmentations
|
|
9
|
+
* Recommends the top Segments from a [Segmentation](https://docs.recombee.com/segmentations) for a particular user, based on the user's past interactions.
|
|
10
10
|
* Based on the used Segmentation, this endpoint can be used for example for:
|
|
11
11
|
* - Recommending the top categories for the user
|
|
12
12
|
* - Recommending the top genres for the user
|
|
@@ -27,23 +27,23 @@ class RecommendItemSegmentsToUser extends rqs.Request {
|
|
|
27
27
|
* - *scenario*
|
|
28
28
|
* - Type: string
|
|
29
29
|
* - Description: Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
|
30
|
-
* You can set various settings to the [scenario](https://docs.recombee.com/scenarios
|
|
30
|
+
* You can set various settings to the [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs.
|
|
31
31
|
* The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios.
|
|
32
32
|
* - *cascadeCreate*
|
|
33
33
|
* - Type: boolean
|
|
34
34
|
* - Description: If the user does not exist in the database, returns a list of non-personalized recommendations and creates the user in the database. This allows, for example, rotations in the following recommendations for that user, as the user will be already known to the system.
|
|
35
35
|
* - *filter*
|
|
36
36
|
* - Type: string
|
|
37
|
-
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql
|
|
37
|
+
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql) expression which allows you to filter recommended segments based on the `segmentationId`.
|
|
38
38
|
* - *booster*
|
|
39
39
|
* - Type: string
|
|
40
|
-
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql
|
|
40
|
+
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`.
|
|
41
41
|
* - *logic*
|
|
42
42
|
* - Type: string | object
|
|
43
43
|
* - Description: Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
|
44
|
-
* See [this section](https://docs.recombee.com/recommendation_logics
|
|
44
|
+
* See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
|
|
45
45
|
* The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
|
46
|
-
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios
|
|
46
|
+
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
|
47
47
|
* - *expertSettings*
|
|
48
48
|
* - Type: object
|
|
49
49
|
* - Description: Dictionary of custom options.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Recommends Items that are the most relevant to a particular Segment from a context [Segmentation](https://docs.recombee.com/segmentations
|
|
9
|
+
* Recommends Items that are the most relevant to a particular Segment from a context [Segmentation](https://docs.recombee.com/segmentations).
|
|
10
10
|
* Based on the used Segmentation, this endpoint can be used for example for:
|
|
11
11
|
* - Recommending articles related to a particular topic
|
|
12
12
|
* - Recommending songs belonging to a particular genre
|
|
@@ -39,11 +39,11 @@ class RecommendItemsToItemSegment extends rqs.Request {
|
|
|
39
39
|
* - *scenario*
|
|
40
40
|
* - Type: string
|
|
41
41
|
* - Description: Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
|
42
|
-
* You can set various settings to the [scenario](https://docs.recombee.com/scenarios
|
|
42
|
+
* You can set various settings to the [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs.
|
|
43
43
|
* The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios.
|
|
44
44
|
* - *cascadeCreate*
|
|
45
45
|
* - Type: boolean
|
|
46
|
-
* - Description: If
|
|
46
|
+
* - Description: If a user of the given *targetUserId* doesn't exist in the database, it creates this user and returns some (non-personalized) recommendations. This allows, for example, rotations in the following recommendations for the user of the given *targetUserId*, as the user will be already known to the system.
|
|
47
47
|
* - *returnProperties*
|
|
48
48
|
* - Type: boolean
|
|
49
49
|
* - 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.
|
|
@@ -104,27 +104,27 @@ class RecommendItemsToItemSegment extends rqs.Request {
|
|
|
104
104
|
* ```
|
|
105
105
|
* - *filter*
|
|
106
106
|
* - Type: string
|
|
107
|
-
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql
|
|
108
|
-
* Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios
|
|
107
|
+
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter recommended items based on the values of their attributes.
|
|
108
|
+
* Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
|
109
109
|
* - *booster*
|
|
110
110
|
* - Type: string
|
|
111
|
-
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql
|
|
112
|
-
* Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios
|
|
111
|
+
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes.
|
|
112
|
+
* Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
|
113
113
|
* - *logic*
|
|
114
114
|
* - Type: string | object
|
|
115
115
|
* - Description: Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
|
116
|
-
* See [this section](https://docs.recombee.com/recommendation_logics
|
|
116
|
+
* See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
|
|
117
117
|
* The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
|
118
|
-
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios
|
|
118
|
+
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
|
119
119
|
* - *minRelevance*
|
|
120
120
|
* - Type: string
|
|
121
|
-
* - Description: **Expert option
|
|
121
|
+
* - Description: **Expert option:** If the *targetUserId* is provided: Specifies the threshold of how relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend a number of items equal to *count* at any cost. If there is not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations being appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such case, the system only recommends items of at least the requested relevance and may return less than *count* items when there is not enough data to fulfill it.
|
|
122
122
|
* - *rotationRate*
|
|
123
123
|
* - Type: number
|
|
124
|
-
* - Description: **Expert option
|
|
124
|
+
* - Description: **Expert option:** If the *targetUserId* is provided: If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended items.
|
|
125
125
|
* - *rotationTime*
|
|
126
126
|
* - Type: number
|
|
127
|
-
* - Description: **Expert option
|
|
127
|
+
* - Description: **Expert option:** If the *targetUserId* is provided: Taking *rotationRate* into account, specifies how long it takes for an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized.
|
|
128
128
|
* - *expertSettings*
|
|
129
129
|
* - Type: object
|
|
130
130
|
* - Description: Dictionary of custom options.
|
|
@@ -9,8 +9,8 @@ const rqs = require("./request");
|
|
|
9
9
|
* Recommends a set of items that are somehow related to one given item, *X*. A typical scenario is when the user *A* is viewing *X*. Then you may display items to the user that he might also be interested in. Recommend items to item request gives you Top-N such items, optionally taking the target user *A* into account.
|
|
10
10
|
* The returned items are sorted by relevance (the first item being the most relevant).
|
|
11
11
|
* Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to:
|
|
12
|
-
* - Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui
|
|
13
|
-
* - Get subsequent recommended items when the user scrolls down (*infinite scroll*) or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api
|
|
12
|
+
* - Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui#reported-metrics).
|
|
13
|
+
* - Get subsequent recommended items when the user scrolls down (*infinite scroll*) or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api#recommend-next-items).
|
|
14
14
|
* It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters.
|
|
15
15
|
*/
|
|
16
16
|
class RecommendItemsToItem extends rqs.Request {
|
|
@@ -37,7 +37,7 @@ class RecommendItemsToItem extends rqs.Request {
|
|
|
37
37
|
* - *scenario*
|
|
38
38
|
* - Type: string
|
|
39
39
|
* - Description: Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
|
40
|
-
* You can set various settings to the [scenario](https://docs.recombee.com/scenarios
|
|
40
|
+
* You can set various settings to the [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs.
|
|
41
41
|
* The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios.
|
|
42
42
|
* - *cascadeCreate*
|
|
43
43
|
* - Type: boolean
|
|
@@ -102,33 +102,33 @@ class RecommendItemsToItem extends rqs.Request {
|
|
|
102
102
|
* ```
|
|
103
103
|
* - *filter*
|
|
104
104
|
* - Type: string
|
|
105
|
-
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql
|
|
106
|
-
* Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios
|
|
105
|
+
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter recommended items based on the values of their attributes.
|
|
106
|
+
* Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
|
107
107
|
* - *booster*
|
|
108
108
|
* - Type: string
|
|
109
|
-
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql
|
|
110
|
-
* Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios
|
|
109
|
+
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes.
|
|
110
|
+
* Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
|
111
111
|
* - *logic*
|
|
112
112
|
* - Type: string | object
|
|
113
113
|
* - Description: Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
|
114
|
-
* See [this section](https://docs.recombee.com/recommendation_logics
|
|
114
|
+
* See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
|
|
115
115
|
* The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
|
116
|
-
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios
|
|
116
|
+
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
|
117
117
|
* - *userImpact*
|
|
118
118
|
* - Type: number
|
|
119
|
-
* - Description: **Expert option
|
|
119
|
+
* - Description: **Expert option:** If *targetUserId* parameter is present, the recommendations are biased towards the given user. Using *userImpact*, you may control this bias. For an extreme case of `userImpact=0.0`, the interactions made by the user are not taken into account at all (with the exception of history-based blacklisting), for `userImpact=1.0`, you'll get a user-based recommendation. The default value is `0`.
|
|
120
120
|
* - *diversity*
|
|
121
121
|
* - Type: number
|
|
122
|
-
* - Description: **Expert option
|
|
122
|
+
* - Description: **Expert option:** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended items should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
|
|
123
123
|
* - *minRelevance*
|
|
124
124
|
* - Type: string
|
|
125
|
-
* - Description: **Expert option
|
|
125
|
+
* - Description: **Expert option:** If the *targetUserId* is provided: Specifies the threshold of how relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend a number of items equal to *count* at any cost. If there is not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations being appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such case, the system only recommends items of at least the requested relevance and may return less than *count* items when there is not enough data to fulfill it.
|
|
126
126
|
* - *rotationRate*
|
|
127
127
|
* - Type: number
|
|
128
|
-
* - Description: **Expert option
|
|
128
|
+
* - Description: **Expert option:** If the *targetUserId* is provided: If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended items.
|
|
129
129
|
* - *rotationTime*
|
|
130
130
|
* - Type: number
|
|
131
|
-
* - Description: **Expert option
|
|
131
|
+
* - Description: **Expert option:** If the *targetUserId* is provided: Taking *rotationRate* into account, specifies how long it takes for an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized.
|
|
132
132
|
* - *expertSettings*
|
|
133
133
|
* - Type: object
|
|
134
134
|
* - Description: Dictionary of custom options.
|
|
@@ -10,8 +10,8 @@ const rqs = require("./request");
|
|
|
10
10
|
* The most typical use cases are recommendations on the homepage, in some "Picked just for you" section, or in email.
|
|
11
11
|
* The returned items are sorted by relevance (the first item being the most relevant).
|
|
12
12
|
* Besides the recommended items, also a unique `recommId` is returned in the response. It can be used to:
|
|
13
|
-
* - Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui
|
|
14
|
-
* - Get subsequent recommended items when the user scrolls down (*infinite scroll*) or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api
|
|
13
|
+
* - Let Recombee know that this recommendation was successful (e.g., user clicked one of the recommended items). See [Reported metrics](https://docs.recombee.com/admin_ui#reported-metrics).
|
|
14
|
+
* - Get subsequent recommended items when the user scrolls down (*infinite scroll*) or goes to the next page. See [Recommend Next Items](https://docs.recombee.com/api#recommend-next-items).
|
|
15
15
|
* It is also possible to use POST HTTP method (for example in the case of a very long ReQL filter) - query parameters then become body parameters.
|
|
16
16
|
*/
|
|
17
17
|
class RecommendItemsToUser extends rqs.Request {
|
|
@@ -25,7 +25,7 @@ class RecommendItemsToUser extends rqs.Request {
|
|
|
25
25
|
* - *scenario*
|
|
26
26
|
* - Type: string
|
|
27
27
|
* - Description: Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
|
28
|
-
* You can set various settings to the [scenario](https://docs.recombee.com/scenarios
|
|
28
|
+
* You can set various settings to the [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs.
|
|
29
29
|
* The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios.
|
|
30
30
|
* - *cascadeCreate*
|
|
31
31
|
* - Type: boolean
|
|
@@ -90,30 +90,30 @@ class RecommendItemsToUser extends rqs.Request {
|
|
|
90
90
|
* ```
|
|
91
91
|
* - *filter*
|
|
92
92
|
* - Type: string
|
|
93
|
-
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql
|
|
94
|
-
* Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios
|
|
93
|
+
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter recommended items based on the values of their attributes.
|
|
94
|
+
* Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
|
95
95
|
* - *booster*
|
|
96
96
|
* - Type: string
|
|
97
|
-
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql
|
|
98
|
-
* Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios
|
|
97
|
+
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes.
|
|
98
|
+
* Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
|
99
99
|
* - *logic*
|
|
100
100
|
* - Type: string | object
|
|
101
101
|
* - Description: Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
|
102
|
-
* See [this section](https://docs.recombee.com/recommendation_logics
|
|
102
|
+
* See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
|
|
103
103
|
* The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
|
104
|
-
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios
|
|
104
|
+
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
|
105
105
|
* - *diversity*
|
|
106
106
|
* - Type: number
|
|
107
|
-
* - Description: **Expert option
|
|
107
|
+
* - Description: **Expert option:** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended items should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
|
|
108
108
|
* - *minRelevance*
|
|
109
109
|
* - Type: string
|
|
110
|
-
* - Description: **Expert option
|
|
110
|
+
* - Description: **Expert option:** Specifies the threshold of how relevant must the recommended items be to the user. Possible values one of: "low", "medium", "high". The default value is "low", meaning that the system attempts to recommend a number of items equal to *count* at any cost. If there is not enough data (such as interactions or item properties), this may even lead to bestseller-based recommendations to be appended to reach the full *count*. This behavior may be suppressed by using "medium" or "high" values. In such a case, the system only recommends items of at least the requested relevance and may return less than *count* items when there is not enough data to fulfill it.
|
|
111
111
|
* - *rotationRate*
|
|
112
112
|
* - Type: number
|
|
113
|
-
* - Description: **Expert option
|
|
113
|
+
* - Description: **Expert option:** If your users browse the system in real-time, it may easily happen that you wish to offer them recommendations multiple times. Here comes the question: how much should the recommendations change? Should they remain the same, or should they rotate? Recombee API allows you to control this per request in a backward fashion. You may penalize an item for being recommended in the near past. For the specific user, `rotationRate=1` means maximal rotation, `rotationRate=0` means absolutely no rotation. You may also use, for example, `rotationRate=0.2` for only slight rotation of recommended items. Default: `0`.
|
|
114
114
|
* - *rotationTime*
|
|
115
115
|
* - Type: number
|
|
116
|
-
* - Description: **Expert option
|
|
116
|
+
* - Description: **Expert option:** Taking *rotationRate* into account, specifies how long it takes for an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized. Default: `7200.0`.
|
|
117
117
|
* - *expertSettings*
|
|
118
118
|
* - Type: object
|
|
119
119
|
* - Description: Dictionary of custom options.
|
|
@@ -9,10 +9,10 @@ const rqs = require("./request");
|
|
|
9
9
|
* 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.
|
|
10
10
|
* 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`).
|
|
11
11
|
* The base request can be one of:
|
|
12
|
-
* - [Recommend Items to Item](https://docs.recombee.com/api
|
|
13
|
-
* - [Recommend Items to User](https://docs.recombee.com/api
|
|
14
|
-
* - [Recommend Items to Item Segment](https://docs.recombee.com/api
|
|
15
|
-
* - [Search Items](https://docs.recombee.com/api
|
|
12
|
+
* - [Recommend Items to Item](https://docs.recombee.com/api#recommend-items-to-item)
|
|
13
|
+
* - [Recommend Items to User](https://docs.recombee.com/api#recommend-items-to-user)
|
|
14
|
+
* - [Recommend Items to Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment)
|
|
15
|
+
* - [Search Items](https://docs.recombee.com/api#search-items)
|
|
16
16
|
* All the other parameters are inherited from the base request.
|
|
17
17
|
* *Recommend next items* can be called many times for a single `recommId` and each call returns different (previously not recommended) items.
|
|
18
18
|
* The number of *Recommend next items* calls performed so far is returned in the `numberNextRecommsCalls` field.
|
|
@@ -15,13 +15,13 @@ class RecommendUsersToItem extends rqs.Request {
|
|
|
15
15
|
/**
|
|
16
16
|
* Construct the request
|
|
17
17
|
* @param {string} itemId - ID of the item for which the recommendations are to be generated.
|
|
18
|
-
* @param {number} count - Number of
|
|
18
|
+
* @param {number} count - Number of users to be recommended (N for the top-N recommendation).
|
|
19
19
|
* @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value
|
|
20
20
|
* - Allowed parameters:
|
|
21
21
|
* - *scenario*
|
|
22
22
|
* - Type: string
|
|
23
23
|
* - Description: Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
|
24
|
-
* You can set various settings to the [scenario](https://docs.recombee.com/scenarios
|
|
24
|
+
* You can set various settings to the [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs.
|
|
25
25
|
* The AI that optimizes models to get the best results may optimize different scenarios separately or even use different models in each of the scenarios.
|
|
26
26
|
* - *cascadeCreate*
|
|
27
27
|
* - Type: boolean
|
|
@@ -80,21 +80,21 @@ class RecommendUsersToItem extends rqs.Request {
|
|
|
80
80
|
* ```
|
|
81
81
|
* - *filter*
|
|
82
82
|
* - Type: string
|
|
83
|
-
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql
|
|
84
|
-
* Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios
|
|
83
|
+
* - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter recommended users based on the values of their attributes.
|
|
84
|
+
* Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
|
85
85
|
* - *booster*
|
|
86
86
|
* - Type: string
|
|
87
|
-
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql
|
|
88
|
-
* Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios
|
|
87
|
+
* - Description: Number-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to boost the recommendation rate of some users based on the values of their attributes.
|
|
88
|
+
* Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
|
89
89
|
* - *logic*
|
|
90
90
|
* - Type: string | object
|
|
91
91
|
* - Description: Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case.
|
|
92
|
-
* See [this section](https://docs.recombee.com/recommendation_logics
|
|
92
|
+
* See [this section](https://docs.recombee.com/recommendation_logics) for a list of available logics and other details.
|
|
93
93
|
* The difference between `logic` and `scenario` is that `logic` specifies mainly behavior, while `scenario` specifies the place where recommendations are shown to the users.
|
|
94
|
-
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios
|
|
94
|
+
* Logic can also be set to a [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com).
|
|
95
95
|
* - *diversity*
|
|
96
96
|
* - Type: number
|
|
97
|
-
* - Description: **Expert option
|
|
97
|
+
* - Description: **Expert option:** Real number from [0.0, 1.0], which determines how mutually dissimilar the recommended users should be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
|
|
98
98
|
* - *expertSettings*
|
|
99
99
|
* - Type: object
|
|
100
100
|
* - Description: Dictionary of custom options.
|