recombee-api-client 5.1.1 → 6.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 (257) hide show
  1. package/lib/api-client.js +1 -1
  2. package/lib/index.d.ts +196 -53
  3. package/lib/requests/add-detail-view.js +7 -0
  4. package/lib/requests/composite-recommendation.js +127 -0
  5. package/lib/requests/index.js +1 -0
  6. package/lib/requests/recommend-item-segments-to-item-segment.js +39 -0
  7. package/lib/requests/recommend-item-segments-to-item.js +39 -0
  8. package/lib/requests/recommend-item-segments-to-user.js +39 -0
  9. package/lib/requests/recommend-items-to-item-segment.js +42 -0
  10. package/lib/requests/recommend-items-to-item.js +45 -0
  11. package/lib/requests/recommend-items-to-user.js +42 -0
  12. package/lib/requests/recommend-users-to-item.js +45 -0
  13. package/lib/requests/recommend-users-to-user.js +42 -0
  14. package/lib/requests/search-item-segments.js +39 -0
  15. package/lib/requests/search-items.js +42 -0
  16. package/lib/requests/set-view-portion.js +14 -0
  17. package/package.json +1 -1
  18. package/test/add-bookmark-batch_test.js +8 -8
  19. package/test/add-bookmark-callback_test.js +14 -14
  20. package/test/add-bookmark-test.js +7 -7
  21. package/test/add-cart-addition-batch_test.js +8 -8
  22. package/test/add-cart-addition-callback_test.js +14 -14
  23. package/test/add-cart-addition-test.js +7 -7
  24. package/test/add-detail-view-batch_test.js +8 -8
  25. package/test/add-detail-view-callback_test.js +14 -14
  26. package/test/add-detail-view-test.js +7 -7
  27. package/test/add-item-batch_test.js +5 -5
  28. package/test/add-item-callback_test.js +9 -9
  29. package/test/add-item-property-batch_test.js +6 -6
  30. package/test/add-item-property-callback_test.js +10 -10
  31. package/test/add-item-property-test.js +5 -5
  32. package/test/add-item-test.js +5 -5
  33. package/test/add-manual-reql-segment-batch_test.js +3 -3
  34. package/test/add-manual-reql-segment-callback_test.js +3 -3
  35. package/test/add-manual-reql-segment-test.js +1 -1
  36. package/test/add-purchase-batch_test.js +8 -8
  37. package/test/add-purchase-callback_test.js +14 -14
  38. package/test/add-purchase-test.js +7 -7
  39. package/test/add-rating-batch_test.js +8 -8
  40. package/test/add-rating-callback_test.js +16 -16
  41. package/test/add-rating-test.js +9 -9
  42. package/test/add-search-synonym-batch_test.js +5 -5
  43. package/test/add-search-synonym-callback_test.js +7 -7
  44. package/test/add-search-synonym-test.js +5 -5
  45. package/test/add-series-batch_test.js +5 -5
  46. package/test/add-series-callback_test.js +9 -9
  47. package/test/add-series-test.js +5 -5
  48. package/test/add-user-batch_test.js +5 -5
  49. package/test/add-user-callback_test.js +9 -9
  50. package/test/add-user-property-batch_test.js +6 -6
  51. package/test/add-user-property-callback_test.js +10 -10
  52. package/test/add-user-property-test.js +5 -5
  53. package/test/add-user-test.js +5 -5
  54. package/test/composite-recommendation-batch_test.js +33 -0
  55. package/test/composite-recommendation-callback_test.js +37 -0
  56. package/test/composite-recommendation-test.js +39 -0
  57. package/test/create-auto-reql-segmentation-batch_test.js +3 -3
  58. package/test/create-auto-reql-segmentation-callback_test.js +5 -5
  59. package/test/create-auto-reql-segmentation-test.js +3 -3
  60. package/test/create-manual-reql-segmentation-batch_test.js +3 -3
  61. package/test/create-manual-reql-segmentation-callback_test.js +5 -5
  62. package/test/create-manual-reql-segmentation-test.js +3 -3
  63. package/test/create-property-based-segmentation-batch_test.js +3 -3
  64. package/test/create-property-based-segmentation-callback_test.js +5 -5
  65. package/test/create-property-based-segmentation-test.js +3 -3
  66. package/test/delete-all-search-synonyms-batch_test.js +2 -2
  67. package/test/delete-all-search-synonyms-callback_test.js +2 -2
  68. package/test/delete-all-search-synonyms-test.js +1 -1
  69. package/test/delete-bookmark-batch_test.js +3 -3
  70. package/test/delete-bookmark-callback_test.js +5 -5
  71. package/test/delete-bookmark-test.js +3 -3
  72. package/test/delete-cart-addition-batch_test.js +3 -3
  73. package/test/delete-cart-addition-callback_test.js +5 -5
  74. package/test/delete-cart-addition-test.js +3 -3
  75. package/test/delete-detail-view-batch_test.js +3 -3
  76. package/test/delete-detail-view-callback_test.js +5 -5
  77. package/test/delete-detail-view-test.js +3 -3
  78. package/test/delete-item-batch_test.js +5 -5
  79. package/test/delete-item-callback_test.js +11 -11
  80. package/test/delete-item-property-batch_test.js +5 -5
  81. package/test/delete-item-property-callback_test.js +11 -11
  82. package/test/delete-item-property-test.js +7 -7
  83. package/test/delete-item-test.js +7 -7
  84. package/test/delete-manual-reql-segment-batch_test.js +4 -4
  85. package/test/delete-manual-reql-segment-callback_test.js +4 -4
  86. package/test/delete-manual-reql-segment-test.js +1 -1
  87. package/test/delete-more-items-batch_test.js +4 -4
  88. package/test/delete-more-items-callback_test.js +4 -4
  89. package/test/delete-more-items-test.js +3 -3
  90. package/test/delete-purchase-batch_test.js +3 -3
  91. package/test/delete-purchase-callback_test.js +5 -5
  92. package/test/delete-purchase-test.js +3 -3
  93. package/test/delete-rating-batch_test.js +3 -3
  94. package/test/delete-rating-callback_test.js +5 -5
  95. package/test/delete-rating-test.js +3 -3
  96. package/test/delete-search-synonym-batch_test.js +4 -4
  97. package/test/delete-search-synonym-callback_test.js +6 -6
  98. package/test/delete-search-synonym-test.js +3 -3
  99. package/test/delete-segmentation-batch_test.js +4 -4
  100. package/test/delete-segmentation-callback_test.js +6 -6
  101. package/test/delete-segmentation-test.js +3 -3
  102. package/test/delete-series-batch_test.js +5 -5
  103. package/test/delete-series-callback_test.js +11 -11
  104. package/test/delete-series-test.js +7 -7
  105. package/test/delete-user-batch_test.js +5 -5
  106. package/test/delete-user-callback_test.js +11 -11
  107. package/test/delete-user-property-batch_test.js +5 -5
  108. package/test/delete-user-property-callback_test.js +11 -11
  109. package/test/delete-user-property-test.js +7 -7
  110. package/test/delete-user-test.js +7 -7
  111. package/test/delete-view-portion-batch_test.js +3 -3
  112. package/test/delete-view-portion-callback_test.js +5 -5
  113. package/test/delete-view-portion-test.js +3 -3
  114. package/test/get-item-property-info-batch_test.js +5 -5
  115. package/test/get-item-property-info-callback_test.js +5 -5
  116. package/test/get-item-property-info-test.js +3 -3
  117. package/test/get-item-values-batch_test.js +4 -4
  118. package/test/get-item-values-callback_test.js +4 -4
  119. package/test/get-item-values-test.js +3 -3
  120. package/test/get-segmentation-batch_test.js +4 -4
  121. package/test/get-segmentation-callback_test.js +4 -4
  122. package/test/get-segmentation-test.js +2 -2
  123. package/test/get-user-property-info-batch_test.js +5 -5
  124. package/test/get-user-property-info-callback_test.js +5 -5
  125. package/test/get-user-property-info-test.js +3 -3
  126. package/test/get-user-values-batch_test.js +4 -4
  127. package/test/get-user-values-callback_test.js +4 -4
  128. package/test/get-user-values-test.js +3 -3
  129. package/test/insert-to-series-batch_test.js +7 -7
  130. package/test/insert-to-series-callback_test.js +9 -9
  131. package/test/insert-to-series-test.js +3 -3
  132. package/test/list-item-bookmarks-batch_test.js +5 -5
  133. package/test/list-item-bookmarks-callback_test.js +5 -5
  134. package/test/list-item-bookmarks-test.js +4 -4
  135. package/test/list-item-cart-additions-batch_test.js +5 -5
  136. package/test/list-item-cart-additions-callback_test.js +5 -5
  137. package/test/list-item-cart-additions-test.js +4 -4
  138. package/test/list-item-detail-views-batch_test.js +5 -5
  139. package/test/list-item-detail-views-callback_test.js +5 -5
  140. package/test/list-item-detail-views-test.js +4 -4
  141. package/test/list-item-properties-batch_test.js +3 -3
  142. package/test/list-item-properties-callback_test.js +3 -3
  143. package/test/list-item-properties-test.js +2 -2
  144. package/test/list-item-purchases-batch_test.js +5 -5
  145. package/test/list-item-purchases-callback_test.js +5 -5
  146. package/test/list-item-purchases-test.js +4 -4
  147. package/test/list-item-ratings-batch_test.js +5 -5
  148. package/test/list-item-ratings-callback_test.js +5 -5
  149. package/test/list-item-ratings-test.js +4 -4
  150. package/test/list-item-view-portions-batch_test.js +5 -5
  151. package/test/list-item-view-portions-callback_test.js +5 -5
  152. package/test/list-item-view-portions-test.js +4 -4
  153. package/test/list-items-batch_test.js +5 -5
  154. package/test/list-items-callback_test.js +5 -5
  155. package/test/list-items-test.js +3 -3
  156. package/test/list-scenarios-batch_test.js +2 -2
  157. package/test/list-scenarios-callback_test.js +2 -2
  158. package/test/list-scenarios-test.js +1 -1
  159. package/test/list-search-synonyms-batch_test.js +6 -6
  160. package/test/list-search-synonyms-callback_test.js +6 -6
  161. package/test/list-search-synonyms-test.js +3 -3
  162. package/test/list-segmentations-batch_test.js +4 -4
  163. package/test/list-segmentations-callback_test.js +4 -4
  164. package/test/list-segmentations-test.js +2 -2
  165. package/test/list-series-batch_test.js +3 -3
  166. package/test/list-series-callback_test.js +3 -3
  167. package/test/list-series-items-batch_test.js +5 -5
  168. package/test/list-series-items-callback_test.js +5 -5
  169. package/test/list-series-items-test.js +4 -4
  170. package/test/list-series-test.js +2 -2
  171. package/test/list-user-bookmarks-batch_test.js +5 -5
  172. package/test/list-user-bookmarks-callback_test.js +5 -5
  173. package/test/list-user-bookmarks-test.js +4 -4
  174. package/test/list-user-cart-additions-batch_test.js +5 -5
  175. package/test/list-user-cart-additions-callback_test.js +5 -5
  176. package/test/list-user-cart-additions-test.js +4 -4
  177. package/test/list-user-detail-views-batch_test.js +5 -5
  178. package/test/list-user-detail-views-callback_test.js +5 -5
  179. package/test/list-user-detail-views-test.js +4 -4
  180. package/test/list-user-properties-batch_test.js +3 -3
  181. package/test/list-user-properties-callback_test.js +3 -3
  182. package/test/list-user-properties-test.js +2 -2
  183. package/test/list-user-purchases-batch_test.js +5 -5
  184. package/test/list-user-purchases-callback_test.js +5 -5
  185. package/test/list-user-purchases-test.js +4 -4
  186. package/test/list-user-ratings-batch_test.js +5 -5
  187. package/test/list-user-ratings-callback_test.js +5 -5
  188. package/test/list-user-ratings-test.js +4 -4
  189. package/test/list-user-view-portions-batch_test.js +5 -5
  190. package/test/list-user-view-portions-callback_test.js +5 -5
  191. package/test/list-user-view-portions-test.js +4 -4
  192. package/test/list-users-batch_test.js +5 -5
  193. package/test/list-users-callback_test.js +5 -5
  194. package/test/list-users-test.js +3 -3
  195. package/test/merge-users-batch_test.js +4 -4
  196. package/test/merge-users-callback_test.js +6 -6
  197. package/test/merge-users-test.js +3 -3
  198. package/test/recommend-item-segments-to-item-batch_test.js +2 -2
  199. package/test/recommend-item-segments-to-item-callback_test.js +4 -4
  200. package/test/recommend-item-segments-to-item-segment-batch_test.js +2 -2
  201. package/test/recommend-item-segments-to-item-segment-callback_test.js +4 -4
  202. package/test/recommend-item-segments-to-item-segment-test.js +3 -3
  203. package/test/recommend-item-segments-to-item-test.js +3 -3
  204. package/test/recommend-item-segments-to-user-batch_test.js +2 -2
  205. package/test/recommend-item-segments-to-user-callback_test.js +4 -4
  206. package/test/recommend-item-segments-to-user-test.js +3 -3
  207. package/test/recommend-items-to-item-batch_test.js +4 -4
  208. package/test/recommend-items-to-item-callback_test.js +4 -4
  209. package/test/recommend-items-to-item-segment-batch_test.js +2 -2
  210. package/test/recommend-items-to-item-segment-callback_test.js +4 -4
  211. package/test/recommend-items-to-item-segment-test.js +3 -3
  212. package/test/recommend-items-to-item-test.js +1 -1
  213. package/test/recommend-items-to-user-batch_test.js +7 -5
  214. package/test/recommend-items-to-user-callback_test.js +17 -4
  215. package/test/recommend-items-to-user-test.js +10 -1
  216. package/test/recommend-next-items-batch_test.js +6 -6
  217. package/test/recommend-next-items-callback_test.js +6 -6
  218. package/test/recommend-next-items-test.js +3 -3
  219. package/test/recommend-users-to-item-batch_test.js +7 -5
  220. package/test/recommend-users-to-item-callback_test.js +17 -4
  221. package/test/recommend-users-to-item-test.js +10 -1
  222. package/test/recommend-users-to-user-batch_test.js +7 -5
  223. package/test/recommend-users-to-user-callback_test.js +17 -4
  224. package/test/recommend-users-to-user-test.js +10 -1
  225. package/test/remove-from-series-batch_test.js +3 -3
  226. package/test/remove-from-series-callback_test.js +5 -5
  227. package/test/remove-from-series-test.js +3 -3
  228. package/test/search-item-segments-batch_test.js +2 -2
  229. package/test/search-item-segments-callback_test.js +4 -4
  230. package/test/search-item-segments-test.js +3 -3
  231. package/test/search-items-batch_test.js +7 -7
  232. package/test/search-items-callback_test.js +7 -7
  233. package/test/search-items-test.js +4 -4
  234. package/test/set-item-values-batch_test.js +7 -7
  235. package/test/set-item-values-callback_test.js +9 -9
  236. package/test/set-item-values-test.js +3 -3
  237. package/test/set-user-values-batch_test.js +7 -7
  238. package/test/set-user-values-callback_test.js +9 -9
  239. package/test/set-user-values-test.js +3 -3
  240. package/test/set-view-portion-batch_test.js +7 -7
  241. package/test/set-view-portion-callback_test.js +15 -15
  242. package/test/set-view-portion-test.js +9 -9
  243. package/test/update-auto-reql-segmentation-batch_test.js +3 -3
  244. package/test/update-auto-reql-segmentation-callback_test.js +3 -3
  245. package/test/update-auto-reql-segmentation-test.js +1 -1
  246. package/test/update-manual-reql-segment-batch_test.js +4 -4
  247. package/test/update-manual-reql-segment-callback_test.js +4 -4
  248. package/test/update-manual-reql-segment-test.js +1 -1
  249. package/test/update-manual-reql-segmentation-batch_test.js +3 -3
  250. package/test/update-manual-reql-segmentation-callback_test.js +3 -3
  251. package/test/update-manual-reql-segmentation-test.js +1 -1
  252. package/test/update-more-items-batch_test.js +4 -4
  253. package/test/update-more-items-callback_test.js +4 -4
  254. package/test/update-more-items-test.js +3 -3
  255. package/test/update-property-based-segmentation-batch_test.js +3 -3
  256. package/test/update-property-based-segmentation-callback_test.js +3 -3
  257. package/test/update-property-based-segmentation-test.js +1 -1
package/lib/index.d.ts CHANGED
@@ -22,7 +22,7 @@ declare module "recombee-api-client" {
22
22
  timeout: number;
23
23
  ensureHttps: boolean;
24
24
 
25
- protected __response_type: any;
25
+ protected __response_type: unknown;
26
26
  }
27
27
 
28
28
  export class SetValuesOptions {
@@ -205,7 +205,7 @@ declare module "recombee-api-client" {
205
205
 
206
206
  export type BatchResponse = {
207
207
  code: number;
208
- json: any;
208
+ json: unknown;
209
209
  }[]
210
210
 
211
211
  /**
@@ -333,6 +333,7 @@ declare module "recombee-api-client" {
333
333
  cascadeCreate?: boolean;
334
334
  recommId?: string;
335
335
  additionalData?: Record<string, unknown>;
336
+ autoPresented?: boolean;
336
337
  }
337
338
 
338
339
  export type Purchase = {
@@ -386,11 +387,14 @@ declare module "recombee-api-client" {
386
387
  cascadeCreate?: boolean;
387
388
  recommId?: string;
388
389
  additionalData?: Record<string, unknown>;
390
+ autoPresented?: boolean;
391
+ timeSpent?: number;
389
392
  }
390
393
 
391
394
  export type Recommendation = {
392
395
  id: string;
393
396
  values?: Record<string, EntityProperty>;
397
+ reqlEvaluations?: Record<string, unknown>;
394
398
  }
395
399
 
396
400
  export type RecommendationResponse = {
@@ -400,6 +404,13 @@ declare module "recombee-api-client" {
400
404
  abGroup?: string;
401
405
  }
402
406
 
407
+ export type CompositeRecommendationResponse = {
408
+ recommId: string;
409
+ source: Recommendation;
410
+ recomms: Recommendation[];
411
+ numberNextRecommsCalls?: number;
412
+ }
413
+
403
414
  export type SearchResponse = {
404
415
  recommId: string;
405
416
  recomms: Recommendation[];
@@ -654,16 +665,16 @@ declare module "recombee-api-client" {
654
665
  */
655
666
  constructor(
656
667
  filter: string,
657
- changes: { [key: string]: unknown },
668
+ changes: Record<string, unknown>,
658
669
  );
659
670
 
660
671
  filter: string;
661
- changes: { [key: string]: unknown };
672
+ changes: Record<string, unknown>;
662
673
  protected __response_type: UpdateMoreItemsResponse;
663
674
 
664
675
  bodyParameters(): {
665
676
  filter: string;
666
- changes: { [key: string]: unknown };
677
+ changes: Record<string, unknown>;
667
678
  };
668
679
 
669
680
  queryParameters(): {
@@ -1112,7 +1123,9 @@ declare module "recombee-api-client" {
1112
1123
  /** If this detail view is based on a recommendation request, `recommId` is the id of the clicked recommendation. */
1113
1124
  recommId?: string;
1114
1125
  /** A dictionary of additional data for the interaction. */
1115
- additionalData?: { [key: string]: unknown };
1126
+ additionalData?: Record<string, unknown>;
1127
+ /** Indicates whether the item was automatically presented to the user (e.g., in a swiping feed) or explicitly requested by the user (e.g., by clicking on a link). Defaults to `false`. */
1128
+ autoPresented?: boolean;
1116
1129
  }
1117
1130
  );
1118
1131
 
@@ -1122,7 +1135,8 @@ declare module "recombee-api-client" {
1122
1135
  duration?: number;
1123
1136
  cascadeCreate?: boolean;
1124
1137
  recommId?: string;
1125
- additionalData?: { [key: string]: unknown };
1138
+ additionalData?: Record<string, unknown>;
1139
+ autoPresented?: boolean;
1126
1140
  protected __response_type: string;
1127
1141
 
1128
1142
  bodyParameters(): {
@@ -1132,7 +1146,8 @@ declare module "recombee-api-client" {
1132
1146
  duration?: number;
1133
1147
  cascadeCreate?: boolean;
1134
1148
  recommId?: string;
1135
- additionalData?: { [key: string]: unknown };
1149
+ additionalData?: Record<string, unknown>;
1150
+ autoPresented?: boolean;
1136
1151
  };
1137
1152
 
1138
1153
  queryParameters(): {
@@ -1240,7 +1255,7 @@ declare module "recombee-api-client" {
1240
1255
  /** If this purchase is based on a recommendation request, `recommId` is the id of the clicked recommendation. */
1241
1256
  recommId?: string;
1242
1257
  /** A dictionary of additional data for the interaction. */
1243
- additionalData?: { [key: string]: unknown };
1258
+ additionalData?: Record<string, unknown>;
1244
1259
  }
1245
1260
  );
1246
1261
 
@@ -1252,7 +1267,7 @@ declare module "recombee-api-client" {
1252
1267
  price?: number;
1253
1268
  profit?: number;
1254
1269
  recommId?: string;
1255
- additionalData?: { [key: string]: unknown };
1270
+ additionalData?: Record<string, unknown>;
1256
1271
  protected __response_type: string;
1257
1272
 
1258
1273
  bodyParameters(): {
@@ -1264,7 +1279,7 @@ declare module "recombee-api-client" {
1264
1279
  price?: number;
1265
1280
  profit?: number;
1266
1281
  recommId?: string;
1267
- additionalData?: { [key: string]: unknown };
1282
+ additionalData?: Record<string, unknown>;
1268
1283
  };
1269
1284
 
1270
1285
  queryParameters(): {
@@ -1368,7 +1383,7 @@ declare module "recombee-api-client" {
1368
1383
  /** If this rating is based on a recommendation request, `recommId` is the id of the clicked recommendation. */
1369
1384
  recommId?: string;
1370
1385
  /** A dictionary of additional data for the interaction. */
1371
- additionalData?: { [key: string]: unknown };
1386
+ additionalData?: Record<string, unknown>;
1372
1387
  }
1373
1388
  );
1374
1389
 
@@ -1378,7 +1393,7 @@ declare module "recombee-api-client" {
1378
1393
  timestamp?: string | number;
1379
1394
  cascadeCreate?: boolean;
1380
1395
  recommId?: string;
1381
- additionalData?: { [key: string]: unknown };
1396
+ additionalData?: Record<string, unknown>;
1382
1397
  protected __response_type: string;
1383
1398
 
1384
1399
  bodyParameters(): {
@@ -1388,7 +1403,7 @@ declare module "recombee-api-client" {
1388
1403
  timestamp?: string | number;
1389
1404
  cascadeCreate?: boolean;
1390
1405
  recommId?: string;
1391
- additionalData?: { [key: string]: unknown };
1406
+ additionalData?: Record<string, unknown>;
1392
1407
  };
1393
1408
 
1394
1409
  queryParameters(): {
@@ -1494,7 +1509,7 @@ declare module "recombee-api-client" {
1494
1509
  /** If this cart addition is based on a recommendation request, `recommId` is the id of the clicked recommendation. */
1495
1510
  recommId?: string;
1496
1511
  /** A dictionary of additional data for the interaction. */
1497
- additionalData?: { [key: string]: unknown };
1512
+ additionalData?: Record<string, unknown>;
1498
1513
  }
1499
1514
  );
1500
1515
 
@@ -1505,7 +1520,7 @@ declare module "recombee-api-client" {
1505
1520
  amount?: number;
1506
1521
  price?: number;
1507
1522
  recommId?: string;
1508
- additionalData?: { [key: string]: unknown };
1523
+ additionalData?: Record<string, unknown>;
1509
1524
  protected __response_type: string;
1510
1525
 
1511
1526
  bodyParameters(): {
@@ -1516,7 +1531,7 @@ declare module "recombee-api-client" {
1516
1531
  amount?: number;
1517
1532
  price?: number;
1518
1533
  recommId?: string;
1519
- additionalData?: { [key: string]: unknown };
1534
+ additionalData?: Record<string, unknown>;
1520
1535
  };
1521
1536
 
1522
1537
  queryParameters(): {
@@ -1618,7 +1633,7 @@ declare module "recombee-api-client" {
1618
1633
  /** If this bookmark is based on a recommendation request, `recommId` is the id of the clicked recommendation. */
1619
1634
  recommId?: string;
1620
1635
  /** A dictionary of additional data for the interaction. */
1621
- additionalData?: { [key: string]: unknown };
1636
+ additionalData?: Record<string, unknown>;
1622
1637
  }
1623
1638
  );
1624
1639
 
@@ -1627,7 +1642,7 @@ declare module "recombee-api-client" {
1627
1642
  timestamp?: string | number;
1628
1643
  cascadeCreate?: boolean;
1629
1644
  recommId?: string;
1630
- additionalData?: { [key: string]: unknown };
1645
+ additionalData?: Record<string, unknown>;
1631
1646
  protected __response_type: string;
1632
1647
 
1633
1648
  bodyParameters(): {
@@ -1636,7 +1651,7 @@ declare module "recombee-api-client" {
1636
1651
  timestamp?: string | number;
1637
1652
  cascadeCreate?: boolean;
1638
1653
  recommId?: string;
1639
- additionalData?: { [key: string]: unknown };
1654
+ additionalData?: Record<string, unknown>;
1640
1655
  };
1641
1656
 
1642
1657
  queryParameters(): {
@@ -1743,7 +1758,11 @@ declare module "recombee-api-client" {
1743
1758
  /** If this view portion is based on a recommendation request, `recommId` is the id of the clicked recommendation. */
1744
1759
  recommId?: string;
1745
1760
  /** A dictionary of additional data for the interaction. */
1746
- additionalData?: { [key: string]: unknown };
1761
+ additionalData?: Record<string, unknown>;
1762
+ /** Indicates whether the item was automatically presented to the user (e.g., in a swiping feed) or explicitly requested by the user (e.g., by clicking on a link). Defaults to `false`. */
1763
+ autoPresented?: boolean;
1764
+ /** The duration (in seconds) that the user viewed the item. In update requests, this value may only increase and is required only if it has changed. */
1765
+ timeSpent?: number;
1747
1766
  }
1748
1767
  );
1749
1768
 
@@ -1754,7 +1773,9 @@ declare module "recombee-api-client" {
1754
1773
  timestamp?: string | number;
1755
1774
  cascadeCreate?: boolean;
1756
1775
  recommId?: string;
1757
- additionalData?: { [key: string]: unknown };
1776
+ additionalData?: Record<string, unknown>;
1777
+ autoPresented?: boolean;
1778
+ timeSpent?: number;
1758
1779
  protected __response_type: string;
1759
1780
 
1760
1781
  bodyParameters(): {
@@ -1765,7 +1786,9 @@ declare module "recombee-api-client" {
1765
1786
  timestamp?: string | number;
1766
1787
  cascadeCreate?: boolean;
1767
1788
  recommId?: string;
1768
- additionalData?: { [key: string]: unknown };
1789
+ additionalData?: Record<string, unknown>;
1790
+ autoPresented?: boolean;
1791
+ timeSpent?: number;
1769
1792
  };
1770
1793
 
1771
1794
  queryParameters(): {
@@ -1880,6 +1903,8 @@ declare module "recombee-api-client" {
1880
1903
  booster?: string;
1881
1904
  /** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
1882
1905
  logic?: string | object;
1906
+ /** A dictionary of [ReQL](https://docs.recombee.com/reql) expressions that will be executed for each recommended item. */
1907
+ reqlExpressions?: Record<string, string>;
1883
1908
  /** **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. */
1884
1909
  diversity?: number;
1885
1910
  /** **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. */
@@ -1889,7 +1914,7 @@ declare module "recombee-api-client" {
1889
1914
  /** **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`. */
1890
1915
  rotationTime?: number;
1891
1916
  /** Dictionary of custom options. */
1892
- expertSettings?: { [key: string]: unknown };
1917
+ expertSettings?: Record<string, unknown>;
1893
1918
  /** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
1894
1919
  returnAbGroup?: boolean;
1895
1920
  }
@@ -1904,11 +1929,12 @@ declare module "recombee-api-client" {
1904
1929
  filter?: string;
1905
1930
  booster?: string;
1906
1931
  logic?: string | object;
1932
+ reqlExpressions?: Record<string, string>;
1907
1933
  diversity?: number;
1908
1934
  minRelevance?: string;
1909
1935
  rotationRate?: number;
1910
1936
  rotationTime?: number;
1911
- expertSettings?: { [key: string]: unknown };
1937
+ expertSettings?: Record<string, unknown>;
1912
1938
  returnAbGroup?: boolean;
1913
1939
  protected __response_type: RecommendationResponse;
1914
1940
 
@@ -1921,11 +1947,12 @@ declare module "recombee-api-client" {
1921
1947
  filter?: string;
1922
1948
  booster?: string;
1923
1949
  logic?: string | object;
1950
+ reqlExpressions?: Record<string, string>;
1924
1951
  diversity?: number;
1925
1952
  minRelevance?: string;
1926
1953
  rotationRate?: number;
1927
1954
  rotationTime?: number;
1928
- expertSettings?: { [key: string]: unknown };
1955
+ expertSettings?: Record<string, unknown>;
1929
1956
  returnAbGroup?: boolean;
1930
1957
  };
1931
1958
 
@@ -1979,6 +2006,8 @@ declare module "recombee-api-client" {
1979
2006
  booster?: string;
1980
2007
  /** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
1981
2008
  logic?: string | object;
2009
+ /** A dictionary of [ReQL](https://docs.recombee.com/reql) expressions that will be executed for each recommended item. */
2010
+ reqlExpressions?: Record<string, string>;
1982
2011
  /** **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`. */
1983
2012
  userImpact?: number;
1984
2013
  /** **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. */
@@ -1990,7 +2019,7 @@ declare module "recombee-api-client" {
1990
2019
  /** **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. */
1991
2020
  rotationTime?: number;
1992
2021
  /** Dictionary of custom options. */
1993
- expertSettings?: { [key: string]: unknown };
2022
+ expertSettings?: Record<string, unknown>;
1994
2023
  /** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
1995
2024
  returnAbGroup?: boolean;
1996
2025
  }
@@ -2006,12 +2035,13 @@ declare module "recombee-api-client" {
2006
2035
  filter?: string;
2007
2036
  booster?: string;
2008
2037
  logic?: string | object;
2038
+ reqlExpressions?: Record<string, string>;
2009
2039
  userImpact?: number;
2010
2040
  diversity?: number;
2011
2041
  minRelevance?: string;
2012
2042
  rotationRate?: number;
2013
2043
  rotationTime?: number;
2014
- expertSettings?: { [key: string]: unknown };
2044
+ expertSettings?: Record<string, unknown>;
2015
2045
  returnAbGroup?: boolean;
2016
2046
  protected __response_type: RecommendationResponse;
2017
2047
 
@@ -2025,12 +2055,13 @@ declare module "recombee-api-client" {
2025
2055
  filter?: string;
2026
2056
  booster?: string;
2027
2057
  logic?: string | object;
2058
+ reqlExpressions?: Record<string, string>;
2028
2059
  userImpact?: number;
2029
2060
  diversity?: number;
2030
2061
  minRelevance?: string;
2031
2062
  rotationRate?: number;
2032
2063
  rotationTime?: number;
2033
- expertSettings?: { [key: string]: unknown };
2064
+ expertSettings?: Record<string, unknown>;
2034
2065
  returnAbGroup?: boolean;
2035
2066
  };
2036
2067
 
@@ -2086,6 +2117,8 @@ declare module "recombee-api-client" {
2086
2117
  booster?: string;
2087
2118
  /** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
2088
2119
  logic?: string | object;
2120
+ /** A dictionary of [ReQL](https://docs.recombee.com/reql) expressions that will be executed for each recommended item. */
2121
+ reqlExpressions?: Record<string, string>;
2089
2122
  /** **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. */
2090
2123
  minRelevance?: string;
2091
2124
  /** **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. */
@@ -2093,7 +2126,7 @@ declare module "recombee-api-client" {
2093
2126
  /** **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. */
2094
2127
  rotationTime?: number;
2095
2128
  /** Dictionary of custom options. */
2096
- expertSettings?: { [key: string]: unknown };
2129
+ expertSettings?: Record<string, unknown>;
2097
2130
  /** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
2098
2131
  returnAbGroup?: boolean;
2099
2132
  }
@@ -2109,10 +2142,11 @@ declare module "recombee-api-client" {
2109
2142
  filter?: string;
2110
2143
  booster?: string;
2111
2144
  logic?: string | object;
2145
+ reqlExpressions?: Record<string, string>;
2112
2146
  minRelevance?: string;
2113
2147
  rotationRate?: number;
2114
2148
  rotationTime?: number;
2115
- expertSettings?: { [key: string]: unknown };
2149
+ expertSettings?: Record<string, unknown>;
2116
2150
  returnAbGroup?: boolean;
2117
2151
  protected __response_type: RecommendationResponse;
2118
2152
 
@@ -2127,10 +2161,11 @@ declare module "recombee-api-client" {
2127
2161
  filter?: string;
2128
2162
  booster?: string;
2129
2163
  logic?: string | object;
2164
+ reqlExpressions?: Record<string, string>;
2130
2165
  minRelevance?: string;
2131
2166
  rotationRate?: number;
2132
2167
  rotationTime?: number;
2133
- expertSettings?: { [key: string]: unknown };
2168
+ expertSettings?: Record<string, unknown>;
2134
2169
  returnAbGroup?: boolean;
2135
2170
  };
2136
2171
 
@@ -2203,6 +2238,8 @@ declare module "recombee-api-client" {
2203
2238
  booster?: string;
2204
2239
  /** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
2205
2240
  logic?: string | object;
2241
+ /** A dictionary of [ReQL](https://docs.recombee.com/reql) expressions that will be executed for each recommended user. */
2242
+ reqlExpressions?: Record<string, string>;
2206
2243
  /** **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. */
2207
2244
  diversity?: number;
2208
2245
  /** **Expert option:** Specifies the threshold of how relevant must the recommended users be. Possible values one of: "low", "medium", "high". */
@@ -2212,7 +2249,7 @@ declare module "recombee-api-client" {
2212
2249
  /** **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. */
2213
2250
  rotationTime?: number;
2214
2251
  /** Dictionary of custom options. */
2215
- expertSettings?: { [key: string]: unknown };
2252
+ expertSettings?: Record<string, unknown>;
2216
2253
  /** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
2217
2254
  returnAbGroup?: boolean;
2218
2255
  }
@@ -2227,11 +2264,12 @@ declare module "recombee-api-client" {
2227
2264
  filter?: string;
2228
2265
  booster?: string;
2229
2266
  logic?: string | object;
2267
+ reqlExpressions?: Record<string, string>;
2230
2268
  diversity?: number;
2231
2269
  minRelevance?: string;
2232
2270
  rotationRate?: number;
2233
2271
  rotationTime?: number;
2234
- expertSettings?: { [key: string]: unknown };
2272
+ expertSettings?: Record<string, unknown>;
2235
2273
  returnAbGroup?: boolean;
2236
2274
  protected __response_type: RecommendationResponse;
2237
2275
 
@@ -2244,11 +2282,12 @@ declare module "recombee-api-client" {
2244
2282
  filter?: string;
2245
2283
  booster?: string;
2246
2284
  logic?: string | object;
2285
+ reqlExpressions?: Record<string, string>;
2247
2286
  diversity?: number;
2248
2287
  minRelevance?: string;
2249
2288
  rotationRate?: number;
2250
2289
  rotationTime?: number;
2251
- expertSettings?: { [key: string]: unknown };
2290
+ expertSettings?: Record<string, unknown>;
2252
2291
  returnAbGroup?: boolean;
2253
2292
  };
2254
2293
 
@@ -2285,10 +2324,12 @@ declare module "recombee-api-client" {
2285
2324
  booster?: string;
2286
2325
  /** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
2287
2326
  logic?: string | object;
2327
+ /** A dictionary of [ReQL](https://docs.recombee.com/reql) expressions that will be executed for each recommended user. */
2328
+ reqlExpressions?: Record<string, string>;
2288
2329
  /** **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. */
2289
2330
  diversity?: number;
2290
2331
  /** Dictionary of custom options. */
2291
- expertSettings?: { [key: string]: unknown };
2332
+ expertSettings?: Record<string, unknown>;
2292
2333
  /** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
2293
2334
  returnAbGroup?: boolean;
2294
2335
  }
@@ -2303,8 +2344,9 @@ declare module "recombee-api-client" {
2303
2344
  filter?: string;
2304
2345
  booster?: string;
2305
2346
  logic?: string | object;
2347
+ reqlExpressions?: Record<string, string>;
2306
2348
  diversity?: number;
2307
- expertSettings?: { [key: string]: unknown };
2349
+ expertSettings?: Record<string, unknown>;
2308
2350
  returnAbGroup?: boolean;
2309
2351
  protected __response_type: RecommendationResponse;
2310
2352
 
@@ -2317,8 +2359,9 @@ declare module "recombee-api-client" {
2317
2359
  filter?: string;
2318
2360
  booster?: string;
2319
2361
  logic?: string | object;
2362
+ reqlExpressions?: Record<string, string>;
2320
2363
  diversity?: number;
2321
- expertSettings?: { [key: string]: unknown };
2364
+ expertSettings?: Record<string, unknown>;
2322
2365
  returnAbGroup?: boolean;
2323
2366
  };
2324
2367
 
@@ -2358,9 +2401,11 @@ declare module "recombee-api-client" {
2358
2401
  /** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
2359
2402
  logic?: string | object;
2360
2403
  /** Dictionary of custom options. */
2361
- expertSettings?: { [key: string]: unknown };
2404
+ expertSettings?: Record<string, unknown>;
2362
2405
  /** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
2363
2406
  returnAbGroup?: boolean;
2407
+ /** A dictionary of [ReQL](https://docs.recombee.com/reql) expressions that will be executed for each recommended Item Segment. */
2408
+ reqlExpressions?: Record<string, string>;
2364
2409
  }
2365
2410
  );
2366
2411
 
@@ -2371,8 +2416,9 @@ declare module "recombee-api-client" {
2371
2416
  filter?: string;
2372
2417
  booster?: string;
2373
2418
  logic?: string | object;
2374
- expertSettings?: { [key: string]: unknown };
2419
+ expertSettings?: Record<string, unknown>;
2375
2420
  returnAbGroup?: boolean;
2421
+ reqlExpressions?: Record<string, string>;
2376
2422
  protected __response_type: RecommendationResponse;
2377
2423
 
2378
2424
  bodyParameters(): {
@@ -2382,8 +2428,9 @@ declare module "recombee-api-client" {
2382
2428
  filter?: string;
2383
2429
  booster?: string;
2384
2430
  logic?: string | object;
2385
- expertSettings?: { [key: string]: unknown };
2431
+ expertSettings?: Record<string, unknown>;
2386
2432
  returnAbGroup?: boolean;
2433
+ reqlExpressions?: Record<string, string>;
2387
2434
  };
2388
2435
 
2389
2436
  queryParameters(): {
@@ -2436,9 +2483,11 @@ declare module "recombee-api-client" {
2436
2483
  /** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
2437
2484
  logic?: string | object;
2438
2485
  /** Dictionary of custom options. */
2439
- expertSettings?: { [key: string]: unknown };
2486
+ expertSettings?: Record<string, unknown>;
2440
2487
  /** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
2441
2488
  returnAbGroup?: boolean;
2489
+ /** A dictionary of [ReQL](https://docs.recombee.com/reql) expressions that will be executed for each recommended Item Segment. */
2490
+ reqlExpressions?: Record<string, string>;
2442
2491
  }
2443
2492
  );
2444
2493
 
@@ -2450,8 +2499,9 @@ declare module "recombee-api-client" {
2450
2499
  filter?: string;
2451
2500
  booster?: string;
2452
2501
  logic?: string | object;
2453
- expertSettings?: { [key: string]: unknown };
2502
+ expertSettings?: Record<string, unknown>;
2454
2503
  returnAbGroup?: boolean;
2504
+ reqlExpressions?: Record<string, string>;
2455
2505
  protected __response_type: RecommendationResponse;
2456
2506
 
2457
2507
  bodyParameters(): {
@@ -2462,8 +2512,9 @@ declare module "recombee-api-client" {
2462
2512
  filter?: string;
2463
2513
  booster?: string;
2464
2514
  logic?: string | object;
2465
- expertSettings?: { [key: string]: unknown };
2515
+ expertSettings?: Record<string, unknown>;
2466
2516
  returnAbGroup?: boolean;
2517
+ reqlExpressions?: Record<string, string>;
2467
2518
  };
2468
2519
 
2469
2520
  queryParameters(): {
@@ -2515,9 +2566,11 @@ declare module "recombee-api-client" {
2515
2566
  /** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
2516
2567
  logic?: string | object;
2517
2568
  /** Dictionary of custom options. */
2518
- expertSettings?: { [key: string]: unknown };
2569
+ expertSettings?: Record<string, unknown>;
2519
2570
  /** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
2520
2571
  returnAbGroup?: boolean;
2572
+ /** A dictionary of [ReQL](https://docs.recombee.com/reql) expressions that will be executed for each recommended Item Segment. */
2573
+ reqlExpressions?: Record<string, string>;
2521
2574
  }
2522
2575
  );
2523
2576
 
@@ -2529,8 +2582,9 @@ declare module "recombee-api-client" {
2529
2582
  filter?: string;
2530
2583
  booster?: string;
2531
2584
  logic?: string | object;
2532
- expertSettings?: { [key: string]: unknown };
2585
+ expertSettings?: Record<string, unknown>;
2533
2586
  returnAbGroup?: boolean;
2587
+ reqlExpressions?: Record<string, string>;
2534
2588
  protected __response_type: RecommendationResponse;
2535
2589
 
2536
2590
  bodyParameters(): {
@@ -2542,8 +2596,89 @@ declare module "recombee-api-client" {
2542
2596
  filter?: string;
2543
2597
  booster?: string;
2544
2598
  logic?: string | object;
2545
- expertSettings?: { [key: string]: unknown };
2599
+ expertSettings?: Record<string, unknown>;
2546
2600
  returnAbGroup?: boolean;
2601
+ reqlExpressions?: Record<string, string>;
2602
+ };
2603
+
2604
+ queryParameters(): {
2605
+ };
2606
+ }
2607
+
2608
+ /**
2609
+ * Composite Recommendation returns both a *source entity* (e.g., an Item or [Item Segment](https://docs.recombee.com/segmentations.html)) and a list of related recommendations in a single response.
2610
+ * It is ideal for use cases such as personalized homepage sections (*Articles from <category>*), *Because You Watched <movie>*, or *Artists Related to Your Favorite Artist <artist>*.
2611
+ * See detailed **examples and configuration guidance** in the [Composite Scenarios documentation](https://docs.recombee.com/scenarios#composite-recommendations).
2612
+ * **Structure**
2613
+ * The endpoint operates in two stages:
2614
+ * 1. Recommends the *source* (e.g., an Item Segment or item) to the user.
2615
+ * 2. Recommends *results* (items or Item Segments) related to that *source*.
2616
+ * For example, *Articles from <category>* can be decomposed into:
2617
+ * - [Recommend Item Segments To User](https://docs.recombee.com/api#recommend-item-segments-to-user) to find the category.
2618
+ * - [Recommend Items To Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment) to recommend articles from that category.
2619
+ * Since the first step uses [Recommend Item Segments To User](https://docs.recombee.com/api#recommend-items-to-user), you must include the `userId` parameter in the *Composite Recommendation* request.
2620
+ * Each *Composite Recommendation* counts as a single recommendation API request for billing.
2621
+ * **Stage-specific Parameters**
2622
+ * Additional parameters can be supplied via [sourceSettings](https://docs.recombee.com/api#composite-recommendation-param-sourceSettings) and [resultSettings](https://docs.recombee.com/api#composite-recommendation-param-resultSettings).
2623
+ * In the example above:
2624
+ * - `sourceSettings` may include any parameter valid for [Recommend Item Segments To User](https://docs.recombee.com/api#recommend-items-to-user) (e.g., `filter`, `booster`).
2625
+ * - `resultSettings` may include any parameter valid for [Recommend Items To Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment).
2626
+ * See [this example](https://docs.recombee.com/api#composite-recommendation-example-setting-parameters-for-individual-stages) for more details.
2627
+ */
2628
+ export class CompositeRecommendation extends requests.Request {
2629
+ /**
2630
+ * @param scenario - Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
2631
+ * You can set various settings to the [scenario](https://docs.recombee.com/scenarios) in the [Admin UI](https://admin.recombee.com). You can also see the performance of each scenario in the Admin UI separately, so you can check how well each application performs.
2632
+ * 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.
2633
+ * @param count - Number of items to be recommended (N for the top-N recommendation).
2634
+ * @param optional - Optional parameters given as an object.
2635
+ */
2636
+ constructor(
2637
+ scenario: string,
2638
+ count: number,
2639
+ optional?: {
2640
+ /** ID of the item for which the recommendations are to be generated. */
2641
+ itemId?: string;
2642
+ /** ID of the user for which the recommendations are to be generated. */
2643
+ userId?: string;
2644
+ /** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
2645
+ logic?: string | object;
2646
+ /** ID of the segment from `contextSegmentationId` for which the recommendations are to be generated. */
2647
+ segmentId?: string;
2648
+ /** If the entity for the source recommendation 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 entity, as the entity will be already known to the system. */
2649
+ cascadeCreate?: boolean;
2650
+ /** Parameters applied for recommending the *Source* stage. The accepted parameters correspond with the recommendation sub-endpoint used to recommend the *Source*. */
2651
+ sourceSettings?: Record<string, unknown>;
2652
+ /** Parameters applied for recommending the *Result* stage. The accepted parameters correspond with the recommendation sub-endpoint used to recommend the *Result*. */
2653
+ resultSettings?: Record<string, unknown>;
2654
+ /** Dictionary of custom options. */
2655
+ expertSettings?: Record<string, unknown>;
2656
+ }
2657
+ );
2658
+
2659
+ scenario: string;
2660
+ count: number;
2661
+ itemId?: string;
2662
+ userId?: string;
2663
+ logic?: string | object;
2664
+ segmentId?: string;
2665
+ cascadeCreate?: boolean;
2666
+ sourceSettings?: Record<string, unknown>;
2667
+ resultSettings?: Record<string, unknown>;
2668
+ expertSettings?: Record<string, unknown>;
2669
+ protected __response_type: CompositeRecommendationResponse;
2670
+
2671
+ bodyParameters(): {
2672
+ scenario: string;
2673
+ count: number;
2674
+ itemId?: string;
2675
+ userId?: string;
2676
+ logic?: string | object;
2677
+ segmentId?: string;
2678
+ cascadeCreate?: boolean;
2679
+ sourceSettings?: Record<string, unknown>;
2680
+ resultSettings?: Record<string, unknown>;
2681
+ expertSettings?: Record<string, unknown>;
2547
2682
  };
2548
2683
 
2549
2684
  queryParameters(): {
@@ -2586,8 +2721,10 @@ declare module "recombee-api-client" {
2586
2721
  booster?: string;
2587
2722
  /** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
2588
2723
  logic?: string | object;
2724
+ /** A dictionary of [ReQL](https://docs.recombee.com/reql) expressions that will be executed for each recommended item. */
2725
+ reqlExpressions?: Record<string, string>;
2589
2726
  /** Dictionary of custom options. */
2590
- expertSettings?: { [key: string]: unknown };
2727
+ expertSettings?: Record<string, unknown>;
2591
2728
  /** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
2592
2729
  returnAbGroup?: boolean;
2593
2730
  }
@@ -2603,7 +2740,8 @@ declare module "recombee-api-client" {
2603
2740
  filter?: string;
2604
2741
  booster?: string;
2605
2742
  logic?: string | object;
2606
- expertSettings?: { [key: string]: unknown };
2743
+ reqlExpressions?: Record<string, string>;
2744
+ expertSettings?: Record<string, unknown>;
2607
2745
  returnAbGroup?: boolean;
2608
2746
  protected __response_type: SearchResponse;
2609
2747
 
@@ -2617,7 +2755,8 @@ declare module "recombee-api-client" {
2617
2755
  filter?: string;
2618
2756
  booster?: string;
2619
2757
  logic?: string | object;
2620
- expertSettings?: { [key: string]: unknown };
2758
+ reqlExpressions?: Record<string, string>;
2759
+ expertSettings?: Record<string, unknown>;
2621
2760
  returnAbGroup?: boolean;
2622
2761
  };
2623
2762
 
@@ -2658,9 +2797,11 @@ declare module "recombee-api-client" {
2658
2797
  /** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
2659
2798
  logic?: string | object;
2660
2799
  /** Dictionary of custom options. */
2661
- expertSettings?: { [key: string]: unknown };
2800
+ expertSettings?: Record<string, unknown>;
2662
2801
  /** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
2663
2802
  returnAbGroup?: boolean;
2803
+ /** A dictionary of [ReQL](https://docs.recombee.com/reql) expressions that will be executed for each recommended Item Segment. */
2804
+ reqlExpressions?: Record<string, string>;
2664
2805
  }
2665
2806
  );
2666
2807
 
@@ -2672,8 +2813,9 @@ declare module "recombee-api-client" {
2672
2813
  filter?: string;
2673
2814
  booster?: string;
2674
2815
  logic?: string | object;
2675
- expertSettings?: { [key: string]: unknown };
2816
+ expertSettings?: Record<string, unknown>;
2676
2817
  returnAbGroup?: boolean;
2818
+ reqlExpressions?: Record<string, string>;
2677
2819
  protected __response_type: SearchResponse;
2678
2820
 
2679
2821
  bodyParameters(): {
@@ -2684,8 +2826,9 @@ declare module "recombee-api-client" {
2684
2826
  filter?: string;
2685
2827
  booster?: string;
2686
2828
  logic?: string | object;
2687
- expertSettings?: { [key: string]: unknown };
2829
+ expertSettings?: Record<string, unknown>;
2688
2830
  returnAbGroup?: boolean;
2831
+ reqlExpressions?: Record<string, string>;
2689
2832
  };
2690
2833
 
2691
2834
  queryParameters(): {