recombee-api-client 4.0.0 → 4.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/lib/api-client.js +4 -3
- package/lib/index.d.ts +3202 -0
- package/lib/requests/add-bookmark.js +3 -3
- package/lib/requests/add-cart-addition.js +5 -5
- package/lib/requests/add-detail-view.js +3 -3
- package/lib/requests/add-group.js +1 -1
- package/lib/requests/add-item-property.js +1 -1
- package/lib/requests/add-item.js +2 -2
- package/lib/requests/add-manual-reql-segment.js +58 -0
- package/lib/requests/add-purchase.js +6 -6
- package/lib/requests/add-rating.js +3 -3
- package/lib/requests/add-series.js +1 -1
- package/lib/requests/add-user-property.js +2 -2
- package/lib/requests/create-auto-reql-segmentation.js +66 -0
- package/lib/requests/create-manual-reql-segmentation.js +63 -0
- package/lib/requests/create-property-based-segmentation.js +67 -0
- package/lib/requests/delete-bookmark.js +3 -3
- package/lib/requests/delete-cart-addition.js +3 -3
- package/lib/requests/delete-detail-view.js +3 -3
- package/lib/requests/delete-group.js +2 -2
- package/lib/requests/delete-item.js +2 -2
- package/lib/requests/delete-manual-reql-segment.js +44 -0
- package/lib/requests/delete-more-items.js +4 -4
- package/lib/requests/delete-purchase.js +3 -3
- package/lib/requests/delete-rating.js +2 -2
- package/lib/requests/delete-search-synonym.js +1 -1
- package/lib/requests/delete-segmentation.js +42 -0
- package/lib/requests/delete-series.js +1 -1
- package/lib/requests/delete-user-property.js +1 -1
- package/lib/requests/delete-user.js +1 -1
- package/lib/requests/get-item-values.js +2 -2
- package/lib/requests/get-segmentation.js +42 -0
- package/lib/requests/get-user-values.js +2 -2
- package/lib/requests/index.js +16 -0
- package/lib/requests/insert-to-group.js +2 -2
- package/lib/requests/insert-to-series.js +2 -2
- package/lib/requests/list-group-items.js +1 -1
- package/lib/requests/list-item-bookmarks.js +2 -2
- package/lib/requests/list-item-cart-additions.js +2 -2
- package/lib/requests/list-item-detail-views.js +2 -2
- package/lib/requests/list-item-purchases.js +2 -2
- package/lib/requests/list-item-ratings.js +2 -2
- package/lib/requests/list-item-view-portions.js +2 -2
- package/lib/requests/list-items.js +1 -1
- package/lib/requests/list-segmentations.js +43 -0
- package/lib/requests/list-series-items.js +2 -2
- package/lib/requests/list-user-bookmarks.js +1 -1
- package/lib/requests/list-user-cart-additions.js +1 -1
- package/lib/requests/list-user-detail-views.js +1 -1
- package/lib/requests/list-user-purchases.js +1 -1
- package/lib/requests/list-user-ratings.js +1 -1
- package/lib/requests/list-user-view-portions.js +1 -1
- package/lib/requests/list-users.js +1 -1
- package/lib/requests/merge-users.js +2 -2
- package/lib/requests/recommend-item-segments-to-item-segment.js +125 -0
- package/lib/requests/recommend-item-segments-to-item.js +125 -0
- package/lib/requests/recommend-item-segments-to-user.js +110 -0
- package/lib/requests/recommend-items-to-item.js +28 -28
- package/lib/requests/recommend-items-to-user.js +25 -25
- package/lib/requests/recommend-next-items.js +2 -2
- package/lib/requests/recommend-users-to-item.js +20 -20
- package/lib/requests/recommend-users-to-user.js +23 -23
- package/lib/requests/request.js +0 -1
- package/lib/requests/reset-database.js +1 -1
- package/lib/requests/search-item-segments.js +112 -0
- package/lib/requests/search-items.js +19 -19
- package/lib/requests/set-user-values.js +0 -1
- package/lib/requests/set-view-portion.js +5 -5
- package/lib/requests/update-auto-reql-segmentation.js +66 -0
- package/lib/requests/update-manual-reql-segment.js +57 -0
- package/lib/requests/update-manual-reql-segmentation.js +59 -0
- package/lib/requests/update-more-items.js +4 -4
- package/lib/requests/update-property-based-segmentation.js +66 -0
- package/package.json +2 -1
- package/test/add-manual-reql-segment-batch_test.js +40 -0
- package/test/add-manual-reql-segment-callback_test.js +43 -0
- package/test/add-manual-reql-segment-test.js +35 -0
- package/test/create-auto-reql-segmentation-batch_test.js +35 -0
- package/test/create-auto-reql-segmentation-callback_test.js +45 -0
- package/test/create-auto-reql-segmentation-test.js +43 -0
- package/test/create-manual-reql-segmentation-batch_test.js +35 -0
- package/test/create-manual-reql-segmentation-callback_test.js +45 -0
- package/test/create-manual-reql-segmentation-test.js +43 -0
- package/test/create-property-based-segmentation-batch_test.js +35 -0
- package/test/create-property-based-segmentation-callback_test.js +45 -0
- package/test/create-property-based-segmentation-test.js +43 -0
- package/test/delete-manual-reql-segment-batch_test.js +47 -0
- package/test/delete-manual-reql-segment-callback_test.js +51 -0
- package/test/delete-manual-reql-segment-test.js +39 -0
- package/test/delete-segmentation-batch_test.js +42 -0
- package/test/delete-segmentation-callback_test.js +53 -0
- package/test/delete-segmentation-test.js +47 -0
- package/test/get-segmentation-batch_test.js +41 -0
- package/test/get-segmentation-callback_test.js +44 -0
- package/test/get-segmentation-test.js +36 -0
- package/test/list-segmentations-batch_test.js +41 -0
- package/test/list-segmentations-callback_test.js +44 -0
- package/test/list-segmentations-test.js +36 -0
- package/test/recommend-item-segments-to-item-batch_test.js +33 -0
- package/test/recommend-item-segments-to-item-callback_test.js +37 -0
- package/test/recommend-item-segments-to-item-segment-batch_test.js +33 -0
- package/test/recommend-item-segments-to-item-segment-callback_test.js +37 -0
- package/test/recommend-item-segments-to-item-segment-test.js +39 -0
- package/test/recommend-item-segments-to-item-test.js +39 -0
- package/test/recommend-item-segments-to-user-batch_test.js +33 -0
- package/test/recommend-item-segments-to-user-callback_test.js +37 -0
- package/test/recommend-item-segments-to-user-test.js +39 -0
- package/test/search-item-segments-batch_test.js +33 -0
- package/test/search-item-segments-callback_test.js +37 -0
- package/test/search-item-segments-test.js +39 -0
- package/test/update-auto-reql-segmentation-batch_test.js +40 -0
- package/test/update-auto-reql-segmentation-callback_test.js +43 -0
- package/test/update-auto-reql-segmentation-test.js +35 -0
- package/test/update-manual-reql-segment-batch_test.js +47 -0
- package/test/update-manual-reql-segment-callback_test.js +51 -0
- package/test/update-manual-reql-segment-test.js +39 -0
- package/test/update-manual-reql-segmentation-batch_test.js +40 -0
- package/test/update-manual-reql-segmentation-callback_test.js +43 -0
- package/test/update-manual-reql-segmentation-test.js +35 -0
- package/test/update-property-based-segmentation-batch_test.js +40 -0
- package/test/update-property-based-segmentation-callback_test.js +43 -0
- package/test/update-property-based-segmentation-test.js +35 -0
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Deletes an existing purchase uniquely specified by `userId`, `itemId`, and `timestamp` or all the purchases with given `userId` and `itemId` if `timestamp` is omitted.
|
|
9
|
+
* Deletes an existing purchase uniquely specified by `userId`, `itemId`, and `timestamp` or all the purchases with the given `userId` and `itemId` if `timestamp` is omitted.
|
|
10
10
|
*/
|
|
11
11
|
class DeletePurchase extends rqs.Request {
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Construct the request
|
|
15
15
|
* @param {string} userId - ID of the user who made the purchase.
|
|
16
|
-
* @param {string} itemId - ID of the item
|
|
16
|
+
* @param {string} itemId - ID of the item which was purchased.
|
|
17
17
|
* @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value
|
|
18
18
|
* - Allowed parameters:
|
|
19
19
|
* - *timestamp*
|
|
20
20
|
* - Type: number
|
|
21
|
-
* - Description: Unix timestamp of the purchase. If the `timestamp` is omitted, then all the purchases with given `userId` and `itemId` are deleted.
|
|
21
|
+
* - Description: Unix timestamp of the purchase. If the `timestamp` is omitted, then all the purchases with the given `userId` and `itemId` are deleted.
|
|
22
22
|
*/
|
|
23
23
|
constructor(userId, itemId, optional) {
|
|
24
24
|
super('DELETE', '/purchases/', 1000, false);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Deletes an existing rating specified by (`userId`, `itemId`, `timestamp`) from the database or all the ratings with given `userId` and `itemId` if `timestamp` is omitted.
|
|
9
|
+
* Deletes an existing rating specified by (`userId`, `itemId`, `timestamp`) from the database or all the ratings with the given `userId` and `itemId` if `timestamp` is omitted.
|
|
10
10
|
*/
|
|
11
11
|
class DeleteRating extends rqs.Request {
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ class DeleteRating extends rqs.Request {
|
|
|
18
18
|
* - Allowed parameters:
|
|
19
19
|
* - *timestamp*
|
|
20
20
|
* - Type: number
|
|
21
|
-
* - Description: Unix timestamp of the rating. If the `timestamp` is omitted, then all the ratings with given `userId` and `itemId` are deleted.
|
|
21
|
+
* - Description: Unix timestamp of the rating. If the `timestamp` is omitted, then all the ratings with the given `userId` and `itemId` are deleted.
|
|
22
22
|
*/
|
|
23
23
|
constructor(userId, itemId, optional) {
|
|
24
24
|
super('DELETE', '/ratings/', 1000, false);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Deletes synonym of given `id
|
|
9
|
+
* Deletes synonym of the given `id`. This synonym is no longer taken into account in the [Search items](https://docs.recombee.com/api.html#search-items).
|
|
10
10
|
*/
|
|
11
11
|
class DeleteSearchSynonym extends rqs.Request {
|
|
12
12
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
This file is auto-generated, do not edit
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
'use strict';
|
|
6
|
+
const rqs = require("./request");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Delete existing Segmentation.
|
|
10
|
+
*/
|
|
11
|
+
class DeleteSegmentation extends rqs.Request {
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Construct the request
|
|
15
|
+
* @param {string} segmentationId - ID of the Segmentation that should be deleted
|
|
16
|
+
*/
|
|
17
|
+
constructor(segmentationId) {
|
|
18
|
+
super('DELETE', `/segmentations/${segmentationId}`, 10000, false);
|
|
19
|
+
this.segmentationId = segmentationId;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Get body parameters
|
|
24
|
+
* @return {Object} The values of body parameters (name of parameter: value of the parameter)
|
|
25
|
+
*/
|
|
26
|
+
bodyParameters() {
|
|
27
|
+
let params = {};
|
|
28
|
+
|
|
29
|
+
return params;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Get query parameters
|
|
34
|
+
* @return {Object} The values of query parameters (name of parameter: value of the parameter)
|
|
35
|
+
*/
|
|
36
|
+
queryParameters() {
|
|
37
|
+
let params = {};
|
|
38
|
+
return params;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
exports.DeleteSegmentation = DeleteSegmentation
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Deletes the series of given `seriesId` from the database.
|
|
9
|
+
* Deletes the series of the given `seriesId` from the database.
|
|
10
10
|
* Deleting a series will only delete assignment of items to it, not the items themselves!
|
|
11
11
|
*/
|
|
12
12
|
class DeleteSeries extends rqs.Request {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Deleting
|
|
9
|
+
* Deleting a user property is roughly equivalent to removing a column from the table of users.
|
|
10
10
|
*/
|
|
11
11
|
class DeleteUserProperty extends rqs.Request {
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Deletes a user of given *userId* from the database.
|
|
9
|
+
* Deletes a user of the given *userId* from the database.
|
|
10
10
|
* If there are any purchases, ratings, bookmarks, cart additions or detail views made by the user present in the database, they will be deleted in cascade as well.
|
|
11
11
|
*/
|
|
12
12
|
class DeleteUser extends rqs.Request {
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Gets all the current property values of the given item.
|
|
10
10
|
*/
|
|
11
11
|
class GetItemValues extends rqs.Request {
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Construct the request
|
|
15
|
-
* @param {string} itemId - ID of the item properties
|
|
15
|
+
* @param {string} itemId - ID of the item whose properties are to be obtained.
|
|
16
16
|
*/
|
|
17
17
|
constructor(itemId) {
|
|
18
18
|
super('GET', `/items/${itemId}`, 1000, false);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
This file is auto-generated, do not edit
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
'use strict';
|
|
6
|
+
const rqs = require("./request");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Get existing Segmentation.
|
|
10
|
+
*/
|
|
11
|
+
class GetSegmentation extends rqs.Request {
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Construct the request
|
|
15
|
+
* @param {string} segmentationId - ID of the Segmentation that should be returned
|
|
16
|
+
*/
|
|
17
|
+
constructor(segmentationId) {
|
|
18
|
+
super('GET', `/segmentations/list/${segmentationId}`, 10000, false);
|
|
19
|
+
this.segmentationId = segmentationId;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Get body parameters
|
|
24
|
+
* @return {Object} The values of body parameters (name of parameter: value of the parameter)
|
|
25
|
+
*/
|
|
26
|
+
bodyParameters() {
|
|
27
|
+
let params = {};
|
|
28
|
+
|
|
29
|
+
return params;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Get query parameters
|
|
34
|
+
* @return {Object} The values of query parameters (name of parameter: value of the parameter)
|
|
35
|
+
*/
|
|
36
|
+
queryParameters() {
|
|
37
|
+
let params = {};
|
|
38
|
+
return params;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
exports.GetSegmentation = GetSegmentation
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Gets all the current property values of the given user.
|
|
10
10
|
*/
|
|
11
11
|
class GetUserValues extends rqs.Request {
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Construct the request
|
|
15
|
-
* @param {string} userId - ID of the user properties
|
|
15
|
+
* @param {string} userId - ID of the user whose properties are to be obtained.
|
|
16
16
|
*/
|
|
17
17
|
constructor(userId) {
|
|
18
18
|
super('GET', `/users/${userId}`, 1000, false);
|
package/lib/requests/index.js
CHANGED
|
@@ -65,10 +65,26 @@ exports.RecommendItemsToItem = require("./recommend-items-to-item").RecommendIte
|
|
|
65
65
|
exports.RecommendNextItems = require("./recommend-next-items").RecommendNextItems;
|
|
66
66
|
exports.RecommendUsersToUser = require("./recommend-users-to-user").RecommendUsersToUser;
|
|
67
67
|
exports.RecommendUsersToItem = require("./recommend-users-to-item").RecommendUsersToItem;
|
|
68
|
+
exports.RecommendItemSegmentsToUser = require("./recommend-item-segments-to-user").RecommendItemSegmentsToUser;
|
|
69
|
+
exports.RecommendItemSegmentsToItem = require("./recommend-item-segments-to-item").RecommendItemSegmentsToItem;
|
|
70
|
+
exports.RecommendItemSegmentsToItemSegment = require("./recommend-item-segments-to-item-segment").RecommendItemSegmentsToItemSegment;
|
|
68
71
|
exports.SearchItems = require("./search-items").SearchItems;
|
|
72
|
+
exports.SearchItemSegments = require("./search-item-segments").SearchItemSegments;
|
|
69
73
|
exports.AddSearchSynonym = require("./add-search-synonym").AddSearchSynonym;
|
|
70
74
|
exports.ListSearchSynonyms = require("./list-search-synonyms").ListSearchSynonyms;
|
|
71
75
|
exports.DeleteAllSearchSynonyms = require("./delete-all-search-synonyms").DeleteAllSearchSynonyms;
|
|
72
76
|
exports.DeleteSearchSynonym = require("./delete-search-synonym").DeleteSearchSynonym;
|
|
77
|
+
exports.CreatePropertyBasedSegmentation = require("./create-property-based-segmentation").CreatePropertyBasedSegmentation;
|
|
78
|
+
exports.UpdatePropertyBasedSegmentation = require("./update-property-based-segmentation").UpdatePropertyBasedSegmentation;
|
|
79
|
+
exports.CreateAutoReqlSegmentation = require("./create-auto-reql-segmentation").CreateAutoReqlSegmentation;
|
|
80
|
+
exports.UpdateAutoReqlSegmentation = require("./update-auto-reql-segmentation").UpdateAutoReqlSegmentation;
|
|
81
|
+
exports.CreateManualReqlSegmentation = require("./create-manual-reql-segmentation").CreateManualReqlSegmentation;
|
|
82
|
+
exports.UpdateManualReqlSegmentation = require("./update-manual-reql-segmentation").UpdateManualReqlSegmentation;
|
|
83
|
+
exports.AddManualReqlSegment = require("./add-manual-reql-segment").AddManualReqlSegment;
|
|
84
|
+
exports.UpdateManualReqlSegment = require("./update-manual-reql-segment").UpdateManualReqlSegment;
|
|
85
|
+
exports.DeleteManualReqlSegment = require("./delete-manual-reql-segment").DeleteManualReqlSegment;
|
|
86
|
+
exports.ListSegmentations = require("./list-segmentations").ListSegmentations;
|
|
87
|
+
exports.GetSegmentation = require("./get-segmentation").GetSegmentation;
|
|
88
|
+
exports.DeleteSegmentation = require("./delete-segmentation").DeleteSegmentation;
|
|
73
89
|
exports.ResetDatabase = require("./reset-database").ResetDatabase;
|
|
74
90
|
exports.Batch = require("./batch").Batch;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Inserts an existing item/group into group of given `groupId`.
|
|
9
|
+
* Inserts an existing item/group into a group of the given `groupId`.
|
|
10
10
|
*/
|
|
11
11
|
class InsertToGroup extends rqs.Request {
|
|
12
12
|
|
|
@@ -19,7 +19,7 @@ class InsertToGroup extends rqs.Request {
|
|
|
19
19
|
* - Allowed parameters:
|
|
20
20
|
* - *cascadeCreate*
|
|
21
21
|
* - Type: boolean
|
|
22
|
-
* - Description: Indicates that any non-existing entity specified within the request should be created (as
|
|
22
|
+
* - Description: Indicates that any non-existing entity specified within the request should be created (as if corresponding PUT requests were invoked). This concerns both the `groupId` and the `groupId`. If `cascadeCreate` is set to true, the behavior also depends on the `itemType`. Either items or group may be created if not present in the database.
|
|
23
23
|
*/
|
|
24
24
|
constructor(groupId, itemType, itemId, optional) {
|
|
25
25
|
super('POST', `/groups/${groupId}/items/`, 1000, false);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Inserts an existing item/series into series of given seriesId at position determined by time.
|
|
9
|
+
* Inserts an existing item/series into a series of the given seriesId at a position determined by time.
|
|
10
10
|
*/
|
|
11
11
|
class InsertToSeries extends rqs.Request {
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ class InsertToSeries extends rqs.Request {
|
|
|
20
20
|
* - Allowed parameters:
|
|
21
21
|
* - *cascadeCreate*
|
|
22
22
|
* - Type: boolean
|
|
23
|
-
* - Description: Indicates that any non-existing entity specified within the request should be created (as
|
|
23
|
+
* - Description: Indicates that any non-existing entity specified within the request should be created (as if corresponding PUT requests were invoked). This concerns both the `seriesId` and the `itemId`. If `cascadeCreate` is set to true, the behavior also depends on the `itemType`. Either item or series may be created if not present in the database.
|
|
24
24
|
*/
|
|
25
25
|
constructor(seriesId, itemType, itemId, time, optional) {
|
|
26
26
|
super('POST', `/series/${seriesId}/items/`, 1000, false);
|
|
@@ -12,7 +12,7 @@ class ListGroupItems extends rqs.Request {
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Construct the request
|
|
15
|
-
* @param {string} groupId - ID of the group items
|
|
15
|
+
* @param {string} groupId - ID of the group whose items are to be listed.
|
|
16
16
|
*/
|
|
17
17
|
constructor(groupId) {
|
|
18
18
|
super('GET', `/groups/${groupId}/items/`, 100000, false);
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Lists all the ever-made bookmarks of the given item.
|
|
10
10
|
*/
|
|
11
11
|
class ListItemBookmarks extends rqs.Request {
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Construct the request
|
|
15
|
-
* @param {string} itemId - ID of the item
|
|
15
|
+
* @param {string} itemId - ID of the item whose bookmarks are to be listed.
|
|
16
16
|
*/
|
|
17
17
|
constructor(itemId) {
|
|
18
18
|
super('GET', `/items/${itemId}/bookmarks/`, 100000, false);
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Lists all the ever-made cart additions of the given item.
|
|
10
10
|
*/
|
|
11
11
|
class ListItemCartAdditions extends rqs.Request {
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Construct the request
|
|
15
|
-
* @param {string} itemId - ID of the item
|
|
15
|
+
* @param {string} itemId - ID of the item whose cart additions are to be listed.
|
|
16
16
|
*/
|
|
17
17
|
constructor(itemId) {
|
|
18
18
|
super('GET', `/items/${itemId}/cartadditions/`, 100000, false);
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Lists all the detail views of the given item ever made by different users.
|
|
10
10
|
*/
|
|
11
11
|
class ListItemDetailViews extends rqs.Request {
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Construct the request
|
|
15
|
-
* @param {string} itemId - ID of the item
|
|
15
|
+
* @param {string} itemId - ID of the item whose detail views are to be listed.
|
|
16
16
|
*/
|
|
17
17
|
constructor(itemId) {
|
|
18
18
|
super('GET', `/items/${itemId}/detailviews/`, 100000, false);
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Lists all the ever-made purchases of the given item.
|
|
10
10
|
*/
|
|
11
11
|
class ListItemPurchases extends rqs.Request {
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Construct the request
|
|
15
|
-
* @param {string} itemId - ID of the item
|
|
15
|
+
* @param {string} itemId - ID of the item whose purchases are to be listed.
|
|
16
16
|
*/
|
|
17
17
|
constructor(itemId) {
|
|
18
18
|
super('GET', `/items/${itemId}/purchases/`, 100000, false);
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Lists all the ratings of an item ever submitted by different users.
|
|
10
10
|
*/
|
|
11
11
|
class ListItemRatings extends rqs.Request {
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Construct the request
|
|
15
|
-
* @param {string} itemId - ID of the item
|
|
15
|
+
* @param {string} itemId - ID of the item whose ratings are to be listed.
|
|
16
16
|
*/
|
|
17
17
|
constructor(itemId) {
|
|
18
18
|
super('GET', `/items/${itemId}/ratings/`, 100000, false);
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Lists all the view portions of an item ever submitted by different users.
|
|
10
10
|
*/
|
|
11
11
|
class ListItemViewPortions extends rqs.Request {
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Construct the request
|
|
15
|
-
* @param {string} itemId - ID of the item
|
|
15
|
+
* @param {string} itemId - ID of the item whose view portions are to be listed.
|
|
16
16
|
*/
|
|
17
17
|
constructor(itemId) {
|
|
18
18
|
super('GET', `/items/${itemId}/viewportions/`, 100000, false);
|
|
@@ -47,7 +47,7 @@ class ListItems extends rqs.Request {
|
|
|
47
47
|
* ```
|
|
48
48
|
* - *includedProperties*
|
|
49
49
|
* - Type: string[]
|
|
50
|
-
* - Description: Allows
|
|
50
|
+
* - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
|
|
51
51
|
* Example response for `includedProperties=description,price`:
|
|
52
52
|
* ```
|
|
53
53
|
* [
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
This file is auto-generated, do not edit
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
'use strict';
|
|
6
|
+
const rqs = require("./request");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Return all existing items Segmentations.
|
|
10
|
+
*/
|
|
11
|
+
class ListSegmentations extends rqs.Request {
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Construct the request
|
|
15
|
+
* @param {string} sourceType - List Segmentations based on a particular type of data. Currently only `items` are supported.
|
|
16
|
+
*/
|
|
17
|
+
constructor(sourceType) {
|
|
18
|
+
super('GET', '/segmentations/list/', 10000, false);
|
|
19
|
+
this.sourceType = sourceType;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Get body parameters
|
|
24
|
+
* @return {Object} The values of body parameters (name of parameter: value of the parameter)
|
|
25
|
+
*/
|
|
26
|
+
bodyParameters() {
|
|
27
|
+
let params = {};
|
|
28
|
+
|
|
29
|
+
return params;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Get query parameters
|
|
34
|
+
* @return {Object} The values of query parameters (name of parameter: value of the parameter)
|
|
35
|
+
*/
|
|
36
|
+
queryParameters() {
|
|
37
|
+
let params = {};
|
|
38
|
+
params.sourceType = this.sourceType;
|
|
39
|
+
return params;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
exports.ListSegmentations = ListSegmentations
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Lists all the items present in the given series, sorted according to their time index values.
|
|
10
10
|
*/
|
|
11
11
|
class ListSeriesItems extends rqs.Request {
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Construct the request
|
|
15
|
-
* @param {string} seriesId - ID of the series items
|
|
15
|
+
* @param {string} seriesId - ID of the series whose items are to be listed.
|
|
16
16
|
*/
|
|
17
17
|
constructor(seriesId) {
|
|
18
18
|
super('GET', `/series/${seriesId}/items/`, 100000, false);
|
|
@@ -43,7 +43,7 @@ class ListUsers extends rqs.Request {
|
|
|
43
43
|
* ```
|
|
44
44
|
* - *includedProperties*
|
|
45
45
|
* - Type: string[]
|
|
46
|
-
* - Description: Allows
|
|
46
|
+
* - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
|
|
47
47
|
* Example response for `includedProperties=country`:
|
|
48
48
|
* ```
|
|
49
49
|
* [
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
const rqs = require("./request");
|
|
7
7
|
|
|
8
8
|
/**
|
|
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
|
|
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
11
|
*/
|
|
12
12
|
class MergeUsers extends rqs.Request {
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Construct the request
|
|
16
|
-
* @param {string} targetUserId - ID of the
|
|
16
|
+
* @param {string} targetUserId - ID of the target user.
|
|
17
17
|
* @param {string} sourceUserId - ID of the source user.
|
|
18
18
|
* @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value
|
|
19
19
|
* - Allowed parameters:
|