recombee-api-client 3.2.0 → 4.1.0

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.
Files changed (342) hide show
  1. package/README.md +2 -2
  2. package/doc/AddBookmark.html +506 -0
  3. package/doc/AddCartAddition.html +512 -0
  4. package/doc/AddDetailView.html +509 -0
  5. package/doc/AddGroup.html +447 -0
  6. package/doc/AddItem.html +448 -0
  7. package/doc/AddItemProperty.html +478 -0
  8. package/doc/AddPurchase.html +515 -0
  9. package/doc/AddRating.html +529 -0
  10. package/doc/AddSearchSynonym.html +501 -0
  11. package/doc/AddSeries.html +447 -0
  12. package/doc/AddUser.html +447 -0
  13. package/doc/AddUserProperty.html +476 -0
  14. package/doc/ApiClient.html +433 -0
  15. package/doc/ApiError.html +170 -0
  16. package/doc/Batch.html +476 -0
  17. package/doc/DeleteAllSearchSynonyms.html +398 -0
  18. package/doc/DeleteBookmark.html +497 -0
  19. package/doc/DeleteCartAddition.html +497 -0
  20. package/doc/DeleteDetailView.html +497 -0
  21. package/doc/DeleteGroup.html +448 -0
  22. package/doc/DeleteItem.html +449 -0
  23. package/doc/DeleteItemProperty.html +447 -0
  24. package/doc/DeleteMoreItems.html +448 -0
  25. package/doc/DeletePurchase.html +497 -0
  26. package/doc/DeleteRating.html +497 -0
  27. package/doc/DeleteSearchSynonym.html +447 -0
  28. package/doc/DeleteSeries.html +448 -0
  29. package/doc/DeleteUser.html +448 -0
  30. package/doc/DeleteUserProperty.html +447 -0
  31. package/doc/DeleteViewPortion.html +497 -0
  32. package/doc/GetItemPropertyInfo.html +447 -0
  33. package/doc/GetItemValues.html +447 -0
  34. package/doc/GetUserPropertyInfo.html +447 -0
  35. package/doc/GetUserValues.html +447 -0
  36. package/doc/InsertToGroup.html +520 -0
  37. package/doc/InsertToSeries.html +543 -0
  38. package/doc/ListGroupItems.html +447 -0
  39. package/doc/ListGroups.html +398 -0
  40. package/doc/ListItemBookmarks.html +447 -0
  41. package/doc/ListItemCartAdditions.html +447 -0
  42. package/doc/ListItemDetailViews.html +447 -0
  43. package/doc/ListItemProperties.html +398 -0
  44. package/doc/ListItemPurchases.html +447 -0
  45. package/doc/ListItemRatings.html +447 -0
  46. package/doc/ListItemViewPortions.html +447 -0
  47. package/doc/ListItems.html +497 -0
  48. package/doc/ListSearchSynonyms.html +454 -0
  49. package/doc/ListSeries.html +398 -0
  50. package/doc/ListSeriesItems.html +447 -0
  51. package/doc/ListUserBookmarks.html +447 -0
  52. package/doc/ListUserCartAdditions.html +447 -0
  53. package/doc/ListUserDetailViews.html +447 -0
  54. package/doc/ListUserProperties.html +398 -0
  55. package/doc/ListUserPurchases.html +447 -0
  56. package/doc/ListUserRatings.html +447 -0
  57. package/doc/ListUserViewPortions.html +447 -0
  58. package/doc/ListUsers.html +491 -0
  59. package/doc/MergeUsers.html +498 -0
  60. package/doc/RecommendItemsToItem.html +635 -0
  61. package/doc/RecommendItemsToUser.html +598 -0
  62. package/doc/RecommendNextItems.html +480 -0
  63. package/doc/RecommendUsersToItem.html +579 -0
  64. package/doc/RecommendUsersToUser.html +588 -0
  65. package/doc/RemoveFromGroup.html +493 -0
  66. package/doc/RemoveFromSeries.html +516 -0
  67. package/doc/Request.html +292 -0
  68. package/doc/ResetDatabase.html +398 -0
  69. package/doc/ResponseError.html +269 -0
  70. package/doc/SearchItems.html +610 -0
  71. package/doc/SetItemValues.html +279 -0
  72. package/doc/SetUserValues.html +277 -0
  73. package/doc/SetValues.html +480 -0
  74. package/doc/SetViewPortion.html +533 -0
  75. package/doc/TimeoutError.html +246 -0
  76. package/doc/UpdateMoreItems.html +472 -0
  77. package/doc/api-client.js.html +248 -0
  78. package/doc/errors_api-error.js.html +71 -0
  79. package/doc/errors_response-error.js.html +72 -0
  80. package/doc/errors_timeout-error.js.html +71 -0
  81. package/doc/fonts/OpenSans-Bold-webfont.eot +0 -0
  82. package/doc/fonts/OpenSans-Bold-webfont.svg +1830 -0
  83. package/doc/fonts/OpenSans-Bold-webfont.woff +0 -0
  84. package/doc/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  85. package/doc/fonts/OpenSans-BoldItalic-webfont.svg +1830 -0
  86. package/doc/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  87. package/doc/fonts/OpenSans-Italic-webfont.eot +0 -0
  88. package/doc/fonts/OpenSans-Italic-webfont.svg +1830 -0
  89. package/doc/fonts/OpenSans-Italic-webfont.woff +0 -0
  90. package/doc/fonts/OpenSans-Light-webfont.eot +0 -0
  91. package/doc/fonts/OpenSans-Light-webfont.svg +1831 -0
  92. package/doc/fonts/OpenSans-Light-webfont.woff +0 -0
  93. package/doc/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  94. package/doc/fonts/OpenSans-LightItalic-webfont.svg +1835 -0
  95. package/doc/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  96. package/doc/fonts/OpenSans-Regular-webfont.eot +0 -0
  97. package/doc/fonts/OpenSans-Regular-webfont.svg +1831 -0
  98. package/doc/fonts/OpenSans-Regular-webfont.woff +0 -0
  99. package/doc/index.html +65 -0
  100. package/doc/requests_add-bookmark.js.html +128 -0
  101. package/doc/requests_add-cart-addition.js.html +142 -0
  102. package/doc/requests_add-detail-view.js.html +135 -0
  103. package/doc/requests_add-group.js.html +93 -0
  104. package/doc/requests_add-item-property.js.html +104 -0
  105. package/doc/requests_add-item.js.html +94 -0
  106. package/doc/requests_add-purchase.js.html +149 -0
  107. package/doc/requests_add-rating.js.html +131 -0
  108. package/doc/requests_add-search-synonym.js.html +111 -0
  109. package/doc/requests_add-series.js.html +93 -0
  110. package/doc/requests_add-user-property.js.html +102 -0
  111. package/doc/requests_add-user.js.html +93 -0
  112. package/doc/requests_batch.js.html +121 -0
  113. package/doc/requests_delete-all-search-synonyms.js.html +91 -0
  114. package/doc/requests_delete-bookmark.js.html +106 -0
  115. package/doc/requests_delete-cart-addition.js.html +106 -0
  116. package/doc/requests_delete-detail-view.js.html +106 -0
  117. package/doc/requests_delete-group.js.html +94 -0
  118. package/doc/requests_delete-item-property.js.html +93 -0
  119. package/doc/requests_delete-item.js.html +95 -0
  120. package/doc/requests_delete-more-items.js.html +95 -0
  121. package/doc/requests_delete-purchase.js.html +106 -0
  122. package/doc/requests_delete-rating.js.html +106 -0
  123. package/doc/requests_delete-search-synonym.js.html +93 -0
  124. package/doc/requests_delete-series.js.html +94 -0
  125. package/doc/requests_delete-user-property.js.html +93 -0
  126. package/doc/requests_delete-user.js.html +94 -0
  127. package/doc/requests_delete-view-portion.js.html +106 -0
  128. package/doc/requests_get-item-property-info.js.html +93 -0
  129. package/doc/requests_get-item-values.js.html +93 -0
  130. package/doc/requests_get-user-property-info.js.html +93 -0
  131. package/doc/requests_get-user-values.js.html +93 -0
  132. package/doc/requests_insert-to-group.js.html +109 -0
  133. package/doc/requests_insert-to-series.js.html +112 -0
  134. package/doc/requests_list-group-items.js.html +93 -0
  135. package/doc/requests_list-groups.js.html +91 -0
  136. package/doc/requests_list-item-bookmarks.js.html +93 -0
  137. package/doc/requests_list-item-cart-additions.js.html +93 -0
  138. package/doc/requests_list-item-detail-views.js.html +93 -0
  139. package/doc/requests_list-item-properties.js.html +91 -0
  140. package/doc/requests_list-item-purchases.js.html +93 -0
  141. package/doc/requests_list-item-ratings.js.html +93 -0
  142. package/doc/requests_list-item-view-portions.js.html +93 -0
  143. package/doc/requests_list-items.js.html +158 -0
  144. package/doc/requests_list-search-synonyms.js.html +106 -0
  145. package/doc/requests_list-series-items.js.html +93 -0
  146. package/doc/requests_list-series.js.html +91 -0
  147. package/doc/requests_list-user-bookmarks.js.html +93 -0
  148. package/doc/requests_list-user-cart-additions.js.html +93 -0
  149. package/doc/requests_list-user-detail-views.js.html +93 -0
  150. package/doc/requests_list-user-properties.js.html +91 -0
  151. package/doc/requests_list-user-purchases.js.html +93 -0
  152. package/doc/requests_list-user-ratings.js.html +93 -0
  153. package/doc/requests_list-user-view-portions.js.html +93 -0
  154. package/doc/requests_list-users.js.html +152 -0
  155. package/doc/requests_merge-users.js.html +105 -0
  156. package/doc/requests_recommend-items-to-item.js.html +276 -0
  157. package/doc/requests_recommend-items-to-user.js.html +255 -0
  158. package/doc/requests_recommend-next-items.js.html +106 -0
  159. package/doc/requests_recommend-users-to-item.js.html +224 -0
  160. package/doc/requests_recommend-users-to-user.js.html +245 -0
  161. package/doc/requests_remove-from-group.js.html +99 -0
  162. package/doc/requests_remove-from-series.js.html +102 -0
  163. package/doc/requests_request.js.html +73 -0
  164. package/doc/requests_reset-database.js.html +91 -0
  165. package/doc/requests_search-items.js.html +231 -0
  166. package/doc/requests_set-item-values.js.html +80 -0
  167. package/doc/requests_set-user-values.js.html +79 -0
  168. package/doc/requests_set-values.js.html +102 -0
  169. package/doc/requests_set-view-portion.js.html +139 -0
  170. package/doc/requests_update-more-items.js.html +104 -0
  171. package/doc/scripts/linenumber.js +25 -0
  172. package/doc/scripts/prettify/Apache-License-2.0.txt +202 -0
  173. package/doc/scripts/prettify/lang-css.js +2 -0
  174. package/doc/scripts/prettify/prettify.js +28 -0
  175. package/doc/styles/jsdoc-default.css +358 -0
  176. package/doc/styles/prettify-jsdoc.css +111 -0
  177. package/doc/styles/prettify-tomorrow.css +132 -0
  178. package/lib/api-client.js +49 -36
  179. package/lib/requests/add-bookmark.js +1 -1
  180. package/lib/requests/add-cart-addition.js +3 -3
  181. package/lib/requests/add-detail-view.js +1 -1
  182. package/lib/requests/add-group.js +1 -1
  183. package/lib/requests/add-item-property.js +1 -1
  184. package/lib/requests/add-item.js +2 -2
  185. package/lib/requests/add-manual-reql-segment.js +58 -0
  186. package/lib/requests/add-purchase.js +4 -4
  187. package/lib/requests/add-rating.js +1 -1
  188. package/lib/requests/add-series.js +1 -1
  189. package/lib/requests/add-user-property.js +2 -2
  190. package/lib/requests/create-auto-reql-segmentation.js +66 -0
  191. package/lib/requests/create-manual-reql-segmentation.js +63 -0
  192. package/lib/requests/create-property-based-segmentation.js +67 -0
  193. package/lib/requests/delete-bookmark.js +3 -3
  194. package/lib/requests/delete-cart-addition.js +3 -3
  195. package/lib/requests/delete-detail-view.js +3 -3
  196. package/lib/requests/delete-group.js +2 -2
  197. package/lib/requests/delete-item.js +3 -3
  198. package/lib/requests/delete-manual-reql-segment.js +44 -0
  199. package/lib/requests/delete-more-items.js +44 -0
  200. package/lib/requests/delete-purchase.js +3 -3
  201. package/lib/requests/delete-rating.js +2 -2
  202. package/lib/requests/delete-search-synonym.js +1 -1
  203. package/lib/requests/delete-segmentation.js +42 -0
  204. package/lib/requests/delete-series.js +1 -1
  205. package/lib/requests/delete-user-property.js +1 -1
  206. package/lib/requests/delete-user.js +2 -2
  207. package/lib/requests/get-item-values.js +2 -2
  208. package/lib/requests/get-segmentation.js +42 -0
  209. package/lib/requests/get-user-values.js +2 -2
  210. package/lib/requests/index.js +18 -2
  211. package/lib/requests/insert-to-group.js +2 -2
  212. package/lib/requests/insert-to-series.js +2 -2
  213. package/lib/requests/list-group-items.js +1 -1
  214. package/lib/requests/list-item-bookmarks.js +2 -2
  215. package/lib/requests/list-item-cart-additions.js +2 -2
  216. package/lib/requests/list-item-detail-views.js +2 -2
  217. package/lib/requests/list-item-purchases.js +2 -2
  218. package/lib/requests/list-item-ratings.js +2 -2
  219. package/lib/requests/list-item-view-portions.js +2 -2
  220. package/lib/requests/list-items.js +1 -1
  221. package/lib/requests/list-segmentations.js +43 -0
  222. package/lib/requests/list-series-items.js +2 -2
  223. package/lib/requests/list-user-bookmarks.js +1 -1
  224. package/lib/requests/list-user-cart-additions.js +1 -1
  225. package/lib/requests/list-user-detail-views.js +1 -1
  226. package/lib/requests/list-user-purchases.js +1 -1
  227. package/lib/requests/list-user-ratings.js +1 -1
  228. package/lib/requests/list-user-view-portions.js +1 -1
  229. package/lib/requests/list-users.js +1 -1
  230. package/lib/requests/merge-users.js +2 -2
  231. package/lib/requests/recommend-item-segments-to-item-segment.js +125 -0
  232. package/lib/requests/recommend-item-segments-to-item.js +125 -0
  233. package/lib/requests/recommend-item-segments-to-user.js +110 -0
  234. package/lib/requests/recommend-items-to-item.js +26 -26
  235. package/lib/requests/recommend-items-to-user.js +23 -23
  236. package/lib/requests/recommend-next-items.js +2 -2
  237. package/lib/requests/recommend-users-to-item.js +18 -18
  238. package/lib/requests/recommend-users-to-user.js +21 -21
  239. package/lib/requests/reset-database.js +1 -1
  240. package/lib/requests/search-item-segments.js +112 -0
  241. package/lib/requests/search-items.js +17 -17
  242. package/lib/requests/set-view-portion.js +3 -3
  243. package/lib/requests/update-auto-reql-segmentation.js +66 -0
  244. package/lib/requests/update-manual-reql-segment.js +57 -0
  245. package/lib/requests/update-manual-reql-segmentation.js +59 -0
  246. package/lib/requests/update-more-items.js +53 -0
  247. package/lib/requests/update-property-based-segmentation.js +66 -0
  248. package/package.json +2 -3
  249. package/test/add-bookmark-test.js +24 -12
  250. package/test/add-cart-addition-test.js +24 -12
  251. package/test/add-detail-view-test.js +24 -12
  252. package/test/add-group-test.js +12 -6
  253. package/test/add-item-property-test.js +12 -6
  254. package/test/add-item-test.js +12 -6
  255. package/test/add-manual-reql-segment-batch_test.js +40 -0
  256. package/test/add-manual-reql-segment-callback_test.js +43 -0
  257. package/test/add-manual-reql-segment-test.js +35 -0
  258. package/test/add-purchase-test.js +24 -12
  259. package/test/add-rating-test.js +30 -15
  260. package/test/add-search-synonym-test.js +6 -3
  261. package/test/add-series-test.js +12 -6
  262. package/test/add-user-property-test.js +12 -6
  263. package/test/add-user-test.js +12 -6
  264. package/test/create-auto-reql-segmentation-batch_test.js +35 -0
  265. package/test/create-auto-reql-segmentation-callback_test.js +45 -0
  266. package/test/create-auto-reql-segmentation-test.js +43 -0
  267. package/test/create-manual-reql-segmentation-batch_test.js +35 -0
  268. package/test/create-manual-reql-segmentation-callback_test.js +45 -0
  269. package/test/create-manual-reql-segmentation-test.js +43 -0
  270. package/test/create-property-based-segmentation-batch_test.js +35 -0
  271. package/test/create-property-based-segmentation-callback_test.js +45 -0
  272. package/test/create-property-based-segmentation-test.js +43 -0
  273. package/test/delete-bookmark-test.js +6 -3
  274. package/test/delete-cart-addition-test.js +6 -3
  275. package/test/delete-detail-view-test.js +6 -3
  276. package/test/delete-group-test.js +18 -9
  277. package/test/delete-item-property-test.js +18 -9
  278. package/test/delete-item-test.js +18 -9
  279. package/test/delete-manual-reql-segment-batch_test.js +47 -0
  280. package/test/delete-manual-reql-segment-callback_test.js +51 -0
  281. package/test/delete-manual-reql-segment-test.js +39 -0
  282. package/test/{user-based-recommendation-batch_test.js → delete-more-items-batch_test.js} +4 -10
  283. package/test/delete-more-items-callback_test.js +37 -0
  284. package/test/delete-more-items-test.js +33 -0
  285. package/test/delete-purchase-test.js +6 -3
  286. package/test/delete-rating-test.js +6 -3
  287. package/test/delete-search-synonym-test.js +6 -3
  288. package/test/delete-segmentation-batch_test.js +42 -0
  289. package/test/delete-segmentation-callback_test.js +53 -0
  290. package/test/delete-segmentation-test.js +47 -0
  291. package/test/delete-series-test.js +18 -9
  292. package/test/delete-user-property-test.js +18 -9
  293. package/test/delete-user-test.js +18 -9
  294. package/test/delete-view-portion-test.js +6 -3
  295. package/test/get-segmentation-batch_test.js +41 -0
  296. package/test/get-segmentation-callback_test.js +44 -0
  297. package/test/get-segmentation-test.js +36 -0
  298. package/test/insert-to-group-test.js +6 -3
  299. package/test/insert-to-series-test.js +6 -3
  300. package/test/list-segmentations-batch_test.js +41 -0
  301. package/test/list-segmentations-callback_test.js +44 -0
  302. package/test/list-segmentations-test.js +36 -0
  303. package/test/merge-users-test.js +6 -3
  304. package/test/recommend-item-segments-to-item-batch_test.js +33 -0
  305. package/test/recommend-item-segments-to-item-callback_test.js +37 -0
  306. package/test/recommend-item-segments-to-item-segment-batch_test.js +33 -0
  307. package/test/recommend-item-segments-to-item-segment-callback_test.js +37 -0
  308. package/test/recommend-item-segments-to-item-segment-test.js +39 -0
  309. package/test/recommend-item-segments-to-item-test.js +39 -0
  310. package/test/recommend-item-segments-to-user-batch_test.js +33 -0
  311. package/test/recommend-item-segments-to-user-callback_test.js +37 -0
  312. package/test/recommend-item-segments-to-user-test.js +39 -0
  313. package/test/remove-from-group-test.js +6 -3
  314. package/test/remove-from-series-test.js +12 -6
  315. package/test/search-item-segments-batch_test.js +33 -0
  316. package/test/search-item-segments-callback_test.js +37 -0
  317. package/test/search-item-segments-test.js +39 -0
  318. package/test/set-environment.js +6 -4
  319. package/test/set-item-values-test.js +6 -3
  320. package/test/set-user-values-test.js +6 -3
  321. package/test/set-view-portion-test.js +30 -15
  322. package/test/update-auto-reql-segmentation-batch_test.js +40 -0
  323. package/test/update-auto-reql-segmentation-callback_test.js +43 -0
  324. package/test/update-auto-reql-segmentation-test.js +35 -0
  325. package/test/update-manual-reql-segment-batch_test.js +47 -0
  326. package/test/update-manual-reql-segment-callback_test.js +51 -0
  327. package/test/update-manual-reql-segment-test.js +39 -0
  328. package/test/update-manual-reql-segmentation-batch_test.js +40 -0
  329. package/test/update-manual-reql-segmentation-callback_test.js +43 -0
  330. package/test/update-manual-reql-segmentation-test.js +35 -0
  331. package/test/{item-based-recommendation-batch_test.js → update-more-items-batch_test.js} +4 -10
  332. package/test/update-more-items-callback_test.js +37 -0
  333. package/test/update-more-items-test.js +33 -0
  334. package/test/update-property-based-segmentation-batch_test.js +40 -0
  335. package/test/update-property-based-segmentation-callback_test.js +43 -0
  336. package/test/update-property-based-segmentation-test.js +35 -0
  337. package/lib/requests/item-based-recommendation.js +0 -187
  338. package/lib/requests/user-based-recommendation.js +0 -168
  339. package/test/item-based-recommendation-callback_test.js +0 -65
  340. package/test/item-based-recommendation-test.js +0 -53
  341. package/test/user-based-recommendation-callback_test.js +0 -65
  342. package/test/user-based-recommendation-test.js +0 -53
@@ -6,12 +6,12 @@
6
6
  const rqs = require("./request");
7
7
 
8
8
  /**
9
- * Recommends set of items that are somehow related to one given item, *X*. Typical scenario is when user *A* is viewing *X*. Then you may display items to the user that he might be also interested in. Recommend items to item request gives you Top-N such items, optionally taking the target user *A* into account.
10
- * The returned items are sorted by relevance (first item being the most relevant).
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
+ * 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.html#reported-metrics).
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.html#reported-metrics).
13
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.html#recommend-next-items).
14
- * It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters.
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 {
17
17
 
@@ -24,27 +24,27 @@ class RecommendItemsToItem extends rqs.Request {
24
24
  * * Allows the calculation of Actions and Conversions
25
25
  * in the graphical user interface,
26
26
  * as Recombee can pair the user who got recommendations
27
- * and who afterwards viewed/purchased an item.
27
+ * and who afterward viewed/purchased an item.
28
28
  * If you insist on not specifying the user, pass `null`
29
- * (`None`, `nil`, `NULL` etc. depending on language) to *targetUserId*.
29
+ * (`None`, `nil`, `NULL` etc., depending on the language) to *targetUserId*.
30
30
  * Do not create some special dummy user for getting recommendations,
31
31
  * as it could mislead the recommendation models,
32
32
  * and result in wrong recommendations.
33
- * For anonymous/unregistered users it is possible to use for example their session ID.
33
+ * For anonymous/unregistered users, it is possible to use, for example, their session ID.
34
34
  * @param {number} count - Number of items to be recommended (N for the top-N recommendation).
35
35
  * @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value
36
36
  * - Allowed parameters:
37
37
  * - *scenario*
38
38
  * - Type: string
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.html) in the [Admin UI](https://admin.recombee.com). You can also see performance of each scenario in the Admin UI separately, so you can check how well each application performs.
41
- * The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios.
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.html) 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
+ * 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
44
- * - Description: If item of given *itemId* or user of given *targetUserId* doesn't exist in the database, it creates the missing entity/entities and returns some (non-personalized) recommendations. This allows for example rotations in the following recommendations for the user of given *targetUserId*, as the user will be already known to the system.
44
+ * - Description: If an item of the given *itemId* or user of the given *targetUserId* doesn't exist in the database, it creates the missing entity/entities 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.
45
45
  * - *returnProperties*
46
46
  * - Type: boolean
47
- * - 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 for easy displaying of the recommended items to the user.
47
+ * - 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.
48
48
  * Example response:
49
49
  * ```
50
50
  * {
@@ -75,7 +75,7 @@ class RecommendItemsToItem extends rqs.Request {
75
75
  * ```
76
76
  * - *includedProperties*
77
77
  * - Type: string[]
78
- * - Description: Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
78
+ * - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
79
79
  * Example response for `includedProperties=description,price`:
80
80
  * ```
81
81
  * {
@@ -102,39 +102,39 @@ class RecommendItemsToItem extends rqs.Request {
102
102
  * ```
103
103
  * - *filter*
104
104
  * - Type: string
105
- * - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes.
106
- * Filters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
105
+ * - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) 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.html) 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.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes.
110
- * Boosters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
109
+ * - Description: Number-returning [ReQL](https://docs.recombee.com/reql.html) 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.html) in the [Admin UI](https://admin.recombee.com).
111
111
  * - *logic*
112
112
  * - Type: string|
113
- * - Description: Logic specifies 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.html) for list of available logics and other details.
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.html) 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 be also set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
116
+ * Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
117
117
  * - *userImpact*
118
118
  * - Type: number
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 user-based recommendation. The default value is `0`.
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** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended items be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
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** If the *targetUserId* is provided: Specifies the threshold of how much 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 number of items equal to *count* at any cost. If there are 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 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.
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** 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 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.
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** If the *targetUserId* is provided: Taking *rotationRate* into account, specifies how long time it takes to an item to recover from the penalization. For example, `rotationTime=7200.0` means that items recommended less than 2 hours ago are penalized.
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:
134
134
  * - Description: Dictionary of custom options.
135
135
  * - *returnAbGroup*
136
136
  * - Type: boolean
137
- * - Description: If there is a custom AB-testing running, return name of group to which the request belongs.
137
+ * - Description: If there is a custom AB-testing running, return the name of the group to which the request belongs.
138
138
  */
139
139
  constructor(itemId, targetUserId, count, optional) {
140
140
  super('POST', `/recomms/items/${itemId}/items/`, 3000, false);
@@ -6,13 +6,13 @@
6
6
  const rqs = require("./request");
7
7
 
8
8
  /**
9
- * Based on user's past interactions (purchases, ratings, etc.) with the items, recommends top-N items that are most likely to be of high value for a given user.
10
- * The most typical use cases are recommendations at homepage, in some "Picked just for you" section or in email.
11
- * The returned items are sorted by relevance (first item being the most relevant).
9
+ * Based on the user's past interactions (purchases, ratings, etc.) with the items, recommends top-N items that are most likely to be of high value for the given user.
10
+ * The most typical use cases are recommendations on the homepage, in some "Picked just for you" section, or in email.
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.html#reported-metrics).
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.html#reported-metrics).
14
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.html#recommend-next-items).
15
- * It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters.
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 {
18
18
 
@@ -24,15 +24,15 @@ class RecommendItemsToUser extends rqs.Request {
24
24
  * - Allowed parameters:
25
25
  * - *scenario*
26
26
  * - Type: string
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.html) in the [Admin UI](https://admin.recombee.com). You can also see performance of each scenario in the Admin UI separately, so you can check how well each application performs.
29
- * The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios.
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.html) 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
+ * 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
32
- * - 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.
32
+ * - 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.
33
33
  * - *returnProperties*
34
34
  * - Type: boolean
35
- * - 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 for easy displaying of the recommended items to the user.
35
+ * - 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.
36
36
  * Example response:
37
37
  * ```
38
38
  * {
@@ -63,7 +63,7 @@ class RecommendItemsToUser extends rqs.Request {
63
63
  * ```
64
64
  * - *includedProperties*
65
65
  * - Type: string[]
66
- * - Description: Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
66
+ * - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
67
67
  * Example response for `includedProperties=description,price`:
68
68
  * ```
69
69
  * {
@@ -90,36 +90,36 @@ class RecommendItemsToUser extends rqs.Request {
90
90
  * ```
91
91
  * - *filter*
92
92
  * - Type: string
93
- * - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes.
94
- * Filters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
93
+ * - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) 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.html) 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.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes.
98
- * Boosters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
97
+ * - Description: Number-returning [ReQL](https://docs.recombee.com/reql.html) 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.html) in the [Admin UI](https://admin.recombee.com).
99
99
  * - *logic*
100
100
  * - Type: string|
101
- * - Description: Logic specifies 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.html) for list of available logics and other details.
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.html) 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 be also set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
104
+ * Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
105
105
  * - *diversity*
106
106
  * - Type: number
107
- * - Description: **Expert option** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended items be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
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** Specifies the threshold of how much 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 number of items equal to *count* at any cost. If there are 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 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.
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** 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 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.1`.
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** Taking *rotationRate* into account, specifies how long time it takes to 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`.
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:
119
119
  * - Description: Dictionary of custom options.
120
120
  * - *returnAbGroup*
121
121
  * - Type: boolean
122
- * - Description: If there is a custom AB-testing running, return name of group to which the request belongs.
122
+ * - Description: If there is a custom AB-testing running, return the name of the group to which the request belongs.
123
123
  */
124
124
  constructor(userId, count, optional) {
125
125
  super('POST', `/recomms/users/${userId}/items/`, 3000, false);
@@ -6,8 +6,8 @@
6
6
  const rqs = require("./request");
7
7
 
8
8
  /**
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 a next page.
10
- * It accepts `recommId` of a base recommendation request (e.g. request from the first page) and number of items that shall be returned (`count`).
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
+ * 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
12
  * - [Recommend items to item](https://docs.recombee.com/api.html#recommend-items-to-item)
13
13
  * - [Recommend items to user](https://docs.recombee.com/api.html#recommend-items-to-user)
@@ -6,9 +6,9 @@
6
6
  const rqs = require("./request");
7
7
 
8
8
  /**
9
- * Recommend users that are likely to be interested in a given item.
10
- * It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters.
11
- * The returned users are sorted by predicted interest in the item (first user being the most interested).
9
+ * Recommends users that are likely to be interested in the given item.
10
+ * 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.
11
+ * The returned users are sorted by predicted interest in the item (the first user being the most interested).
12
12
  */
13
13
  class RecommendUsersToItem extends rqs.Request {
14
14
 
@@ -20,15 +20,15 @@ class RecommendUsersToItem extends rqs.Request {
20
20
  * - Allowed parameters:
21
21
  * - *scenario*
22
22
  * - Type: string
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.html) in the [Admin UI](https://admin.recombee.com). You can also see performance of each scenario in the Admin UI separately, so you can check how well each application performs.
25
- * The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios.
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.html) 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
+ * 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
28
- * - Description: If item of given *itemId* doesn't exist in the database, it creates the missing item.
28
+ * - Description: If an item of the given *itemId* doesn't exist in the database, it creates the missing item.
29
29
  * - *returnProperties*
30
30
  * - Type: boolean
31
- * - 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 for easy displaying the recommended users.
31
+ * - 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.
32
32
  * Example response:
33
33
  * ```
34
34
  * {
@@ -55,7 +55,7 @@ class RecommendUsersToItem extends rqs.Request {
55
55
  * ```
56
56
  * - *includedProperties*
57
57
  * - Type: string[]
58
- * - Description: Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
58
+ * - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
59
59
  * Example response for `includedProperties=country`:
60
60
  * ```
61
61
  * {
@@ -80,27 +80,27 @@ class RecommendUsersToItem extends rqs.Request {
80
80
  * ```
81
81
  * - *filter*
82
82
  * - Type: string
83
- * - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes.
84
- * Filters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
83
+ * - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes.
84
+ * Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) 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.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes.
88
- * Boosters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
87
+ * - Description: Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes.
88
+ * Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
89
89
  * - *logic*
90
90
  * - Type: string|
91
- * - Description: Logic specifies 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.html) for list of available logics and other details.
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.html) 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 be also set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
94
+ * Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
95
95
  * - *diversity*
96
96
  * - Type: number
97
- * - Description: **Expert option** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended items be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
97
+ * - 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.
98
98
  * - *expertSettings*
99
99
  * - Type:
100
100
  * - Description: Dictionary of custom options.
101
101
  * - *returnAbGroup*
102
102
  * - Type: boolean
103
- * - Description: If there is a custom AB-testing running, return name of group to which the request belongs.
103
+ * - Description: If there is a custom AB-testing running, return the name of the group to which the request belongs.
104
104
  */
105
105
  constructor(itemId, count, optional) {
106
106
  super('POST', `/recomms/items/${itemId}/users/`, 50000, false);
@@ -6,9 +6,9 @@
6
6
  const rqs = require("./request");
7
7
 
8
8
  /**
9
- * Get similar users as some given user, based on the user's past interactions (purchases, ratings, etc.) and values of properties.
10
- * It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters.
11
- * The returned users are sorted by similarity (first user being the most similar).
9
+ * Gets users similar to the given user, based on the user's past interactions (purchases, ratings, etc.) and values of properties.
10
+ * 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.
11
+ * The returned users are sorted by similarity (the first user being the most similar).
12
12
  */
13
13
  class RecommendUsersToUser extends rqs.Request {
14
14
 
@@ -20,15 +20,15 @@ class RecommendUsersToUser extends rqs.Request {
20
20
  * - Allowed parameters:
21
21
  * - *scenario*
22
22
  * - Type: string
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.html) in the [Admin UI](https://admin.recombee.com). You can also see performance of each scenario in the Admin UI separately, so you can check how well each application performs.
25
- * The AI which optimizes models in order to get the best results may optimize different scenarios separately, or even use different models in each of the scenarios.
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.html) 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
+ * 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
28
- * - 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.
28
+ * - 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.
29
29
  * - *returnProperties*
30
30
  * - Type: boolean
31
- * - 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 for easy displaying the recommended users.
31
+ * - 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.
32
32
  * Example response:
33
33
  * ```
34
34
  * {
@@ -55,7 +55,7 @@ class RecommendUsersToUser extends rqs.Request {
55
55
  * ```
56
56
  * - *includedProperties*
57
57
  * - Type: string[]
58
- * - Description: Allows to specify, which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
58
+ * - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
59
59
  * Example response for `includedProperties=country`:
60
60
  * ```
61
61
  * {
@@ -80,36 +80,36 @@ class RecommendUsersToUser extends rqs.Request {
80
80
  * ```
81
81
  * - *filter*
82
82
  * - Type: string
83
- * - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended items based on the values of their attributes.
84
- * Filters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
83
+ * - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes.
84
+ * Filters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) 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.html) expression which allows you to boost recommendation rate of some items based on the values of their attributes.
88
- * Boosters can be also assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
87
+ * - Description: Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes.
88
+ * Boosters can also be assigned to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
89
89
  * - *logic*
90
90
  * - Type: string|
91
- * - Description: Logic specifies 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.html) for list of available logics and other details.
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.html) 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 be also set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
94
+ * Logic can also be set to a [scenario](https://docs.recombee.com/scenarios.html) in the [Admin UI](https://admin.recombee.com).
95
95
  * - *diversity*
96
96
  * - Type: number
97
- * - Description: **Expert option** Real number from [0.0, 1.0] which determines how much mutually dissimilar should the recommended users be. The default value is 0.0, i.e., no diversification. Value 1.0 means maximal diversification.
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
  * - *minRelevance*
99
99
  * - Type: string
100
- * - Description: **Expert option** Specifies the threshold of how much relevant must the recommended users be. Possible values one of: "low", "medium", "high".
100
+ * - Description: **Expert option** Specifies the threshold of how relevant must the recommended users be. Possible values one of: "low", "medium", "high".
101
101
  * - *rotationRate*
102
102
  * - Type: number
103
- * - 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 backward fashion. You may penalize an user 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 users.
103
+ * - 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 a user 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 users.
104
104
  * - *rotationTime*
105
105
  * - Type: number
106
- * - Description: **Expert option** Taking *rotationRate* into account, specifies how long time it takes to an user to recover from the penalization. For example, `rotationTime=7200.0` means that users recommended less than 2 hours ago are penalized.
106
+ * - Description: **Expert option** Taking *rotationRate* into account, specifies how long it takes for a user to recover from the penalization. For example, `rotationTime=7200.0` means that users recommended less than 2 hours ago are penalized.
107
107
  * - *expertSettings*
108
108
  * - Type:
109
109
  * - Description: Dictionary of custom options.
110
110
  * - *returnAbGroup*
111
111
  * - Type: boolean
112
- * - Description: If there is a custom AB-testing running, return name of group to which the request belongs.
112
+ * - Description: If there is a custom AB-testing running, return the name of the group to which the request belongs.
113
113
  */
114
114
  constructor(userId, count, optional) {
115
115
  super('POST', `/recomms/users/${userId}/users/`, 50000, false);
@@ -6,7 +6,7 @@
6
6
  const rqs = require("./request");
7
7
 
8
8
  /**
9
- * Completely erases all your data, including items, item properties, series, user database, purchases, ratings, detail views, and bookmarks. Make sure the request to be never executed in production environment! Resetting your database is irreversible.
9
+ * Completely erases all your data, including items, item properties, series, user database, purchases, ratings, detail views, and bookmarks. Make sure the request is never executed in the production environment! Resetting your database is irreversible.
10
10
  */
11
11
  class ResetDatabase extends rqs.Request {
12
12
 
@@ -0,0 +1,112 @@
1
+ /*
2
+ This file is auto-generated, do not edit
3
+ */
4
+
5
+ 'use strict';
6
+ const rqs = require("./request");
7
+
8
+ /**
9
+ * Full-text personalized search that returns Segments from a Segmentation. The results are based on the provided `searchQuery` and also on the user's past interactions (purchases, ratings, etc.).
10
+ * Based on the used Segmentation, this endpoint can be used for example for:
11
+ * - Searching within categories or brands
12
+ * - Searching within genres or artists
13
+ * For example if the user is searching for "iPhone" this endpoint can return "cell phones" category.
14
+ * You need to set the used Segmentation the Admin UI in the Scenario settings prior to using this endpoint.
15
+ * The returned segments are sorted by relevance (first segment being the most relevant).
16
+ * It is also possible to use POST HTTP method (for example in case of very long ReQL filter) - query parameters then become body parameters.
17
+ */
18
+ class SearchItemSegments extends rqs.Request {
19
+
20
+ /**
21
+ * Construct the request
22
+ * @param {string} userId - ID of the user for whom personalized search will be performed.
23
+ * @param {string} searchQuery - Search query provided by the user. It is used for the full-text search.
24
+ * @param {number} count - Number of segments to be returned (N for the top-N results).
25
+ * @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value
26
+ * - Allowed parameters:
27
+ * - *scenario*
28
+ * - Type: string
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.html) 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
+ * 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
+ * - *cascadeCreate*
33
+ * - Type: boolean
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
+ * - *filter*
36
+ * - Type: string
37
+ * - Description: Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to filter recommended segments based on the `segmentationId`.
38
+ * - *booster*
39
+ * - Type: string
40
+ * - Description: Number-returning [ReQL](https://docs.recombee.com/reql.html) expression which allows you to boost recommendation rate of some segments based on the `segmentationId`.
41
+ * - *logic*
42
+ * - Type: string|
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.html) for a list of available logics and other details.
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.html) in the [Admin UI](https://admin.recombee.com).
47
+ * - *expertSettings*
48
+ * - Type:
49
+ * - Description: Dictionary of custom options.
50
+ * - *returnAbGroup*
51
+ * - Type: boolean
52
+ * - Description: If there is a custom AB-testing running, return the name of the group to which the request belongs.
53
+ */
54
+ constructor(userId, searchQuery, count, optional) {
55
+ super('POST', `/search/users/${userId}/item-segments/`, 3000, false);
56
+ this.userId = userId;
57
+ this.searchQuery = searchQuery;
58
+ this.count = count;
59
+ optional = optional || {};
60
+ this.scenario = optional.scenario;
61
+ this.cascadeCreate = optional.cascadeCreate;
62
+ this.filter = optional.filter;
63
+ this.booster = optional.booster;
64
+ this.logic = optional.logic;
65
+ this.expertSettings = optional.expertSettings;
66
+ this.returnAbGroup = optional.returnAbGroup;
67
+ }
68
+
69
+ /**
70
+ * Get body parameters
71
+ * @return {Object} The values of body parameters (name of parameter: value of the parameter)
72
+ */
73
+ bodyParameters() {
74
+ let params = {};
75
+ params.searchQuery = this.searchQuery;
76
+ params.count = this.count;
77
+
78
+ if(this.scenario !== undefined)
79
+ params.scenario = this.scenario;
80
+
81
+ if(this.cascadeCreate !== undefined)
82
+ params.cascadeCreate = this.cascadeCreate;
83
+
84
+ if(this.filter !== undefined)
85
+ params.filter = this.filter;
86
+
87
+ if(this.booster !== undefined)
88
+ params.booster = this.booster;
89
+
90
+ if(this.logic !== undefined)
91
+ params.logic = this.logic;
92
+
93
+ if(this.expertSettings !== undefined)
94
+ params.expertSettings = this.expertSettings;
95
+
96
+ if(this.returnAbGroup !== undefined)
97
+ params.returnAbGroup = this.returnAbGroup;
98
+
99
+ return params;
100
+ }
101
+
102
+ /**
103
+ * Get query parameters
104
+ * @return {Object} The values of query parameters (name of parameter: value of the parameter)
105
+ */
106
+ queryParameters() {
107
+ let params = {};
108
+ return params;
109
+ }
110
+ }
111
+
112
+ exports.SearchItemSegments = SearchItemSegments