recombee-api-client 5.1.0 → 6.0.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.
- package/lib/api-client.js +1 -1
- package/lib/index.d.ts +186 -59
- package/lib/requests/add-detail-view.js +7 -0
- package/lib/requests/composite-recommendation.js +127 -0
- package/lib/requests/index.js +1 -0
- package/lib/requests/recommend-items-to-item-segment.js +42 -0
- package/lib/requests/recommend-items-to-item.js +45 -0
- package/lib/requests/recommend-items-to-user.js +42 -0
- package/lib/requests/recommend-users-to-item.js +49 -4
- package/lib/requests/recommend-users-to-user.js +44 -2
- package/lib/requests/search-items.js +42 -0
- package/lib/requests/set-view-portion.js +14 -0
- package/package.json +8 -7
- package/test/add-bookmark-batch_test.js +8 -8
- package/test/add-bookmark-callback_test.js +14 -14
- package/test/add-bookmark-test.js +7 -7
- package/test/add-cart-addition-batch_test.js +8 -8
- package/test/add-cart-addition-callback_test.js +14 -14
- package/test/add-cart-addition-test.js +7 -7
- package/test/add-detail-view-batch_test.js +8 -8
- package/test/add-detail-view-callback_test.js +14 -14
- package/test/add-detail-view-test.js +7 -7
- package/test/add-item-batch_test.js +5 -5
- package/test/add-item-callback_test.js +9 -9
- package/test/add-item-property-batch_test.js +6 -6
- package/test/add-item-property-callback_test.js +10 -10
- package/test/add-item-property-test.js +5 -5
- package/test/add-item-test.js +5 -5
- package/test/add-manual-reql-segment-batch_test.js +3 -3
- package/test/add-manual-reql-segment-callback_test.js +3 -3
- package/test/add-manual-reql-segment-test.js +1 -1
- package/test/add-purchase-batch_test.js +8 -8
- package/test/add-purchase-callback_test.js +14 -14
- package/test/add-purchase-test.js +7 -7
- package/test/add-rating-batch_test.js +8 -8
- package/test/add-rating-callback_test.js +16 -16
- package/test/add-rating-test.js +9 -9
- package/test/add-search-synonym-batch_test.js +5 -5
- package/test/add-search-synonym-callback_test.js +7 -7
- package/test/add-search-synonym-test.js +5 -5
- package/test/add-series-batch_test.js +5 -5
- package/test/add-series-callback_test.js +9 -9
- package/test/add-series-test.js +5 -5
- package/test/add-user-batch_test.js +5 -5
- package/test/add-user-callback_test.js +9 -9
- package/test/add-user-property-batch_test.js +6 -6
- package/test/add-user-property-callback_test.js +10 -10
- package/test/add-user-property-test.js +5 -5
- package/test/add-user-test.js +5 -5
- package/test/composite-recommendation-batch_test.js +33 -0
- package/test/composite-recommendation-callback_test.js +37 -0
- package/test/composite-recommendation-test.js +39 -0
- package/test/create-auto-reql-segmentation-batch_test.js +3 -3
- package/test/create-auto-reql-segmentation-callback_test.js +5 -5
- package/test/create-auto-reql-segmentation-test.js +3 -3
- package/test/create-manual-reql-segmentation-batch_test.js +3 -3
- package/test/create-manual-reql-segmentation-callback_test.js +5 -5
- package/test/create-manual-reql-segmentation-test.js +3 -3
- package/test/create-property-based-segmentation-batch_test.js +3 -3
- package/test/create-property-based-segmentation-callback_test.js +5 -5
- package/test/create-property-based-segmentation-test.js +3 -3
- package/test/delete-all-search-synonyms-batch_test.js +2 -2
- package/test/delete-all-search-synonyms-callback_test.js +2 -2
- package/test/delete-all-search-synonyms-test.js +1 -1
- package/test/delete-bookmark-batch_test.js +3 -3
- package/test/delete-bookmark-callback_test.js +5 -5
- package/test/delete-bookmark-test.js +3 -3
- package/test/delete-cart-addition-batch_test.js +3 -3
- package/test/delete-cart-addition-callback_test.js +5 -5
- package/test/delete-cart-addition-test.js +3 -3
- package/test/delete-detail-view-batch_test.js +3 -3
- package/test/delete-detail-view-callback_test.js +5 -5
- package/test/delete-detail-view-test.js +3 -3
- package/test/delete-item-batch_test.js +5 -5
- package/test/delete-item-callback_test.js +11 -11
- package/test/delete-item-property-batch_test.js +5 -5
- package/test/delete-item-property-callback_test.js +11 -11
- package/test/delete-item-property-test.js +7 -7
- package/test/delete-item-test.js +7 -7
- package/test/delete-manual-reql-segment-batch_test.js +4 -4
- package/test/delete-manual-reql-segment-callback_test.js +4 -4
- package/test/delete-manual-reql-segment-test.js +1 -1
- package/test/delete-more-items-batch_test.js +4 -4
- package/test/delete-more-items-callback_test.js +4 -4
- package/test/delete-more-items-test.js +3 -3
- package/test/delete-purchase-batch_test.js +3 -3
- package/test/delete-purchase-callback_test.js +5 -5
- package/test/delete-purchase-test.js +3 -3
- package/test/delete-rating-batch_test.js +3 -3
- package/test/delete-rating-callback_test.js +5 -5
- package/test/delete-rating-test.js +3 -3
- package/test/delete-search-synonym-batch_test.js +4 -4
- package/test/delete-search-synonym-callback_test.js +6 -6
- package/test/delete-search-synonym-test.js +3 -3
- package/test/delete-segmentation-batch_test.js +4 -4
- package/test/delete-segmentation-callback_test.js +6 -6
- package/test/delete-segmentation-test.js +3 -3
- package/test/delete-series-batch_test.js +5 -5
- package/test/delete-series-callback_test.js +11 -11
- package/test/delete-series-test.js +7 -7
- package/test/delete-user-batch_test.js +5 -5
- package/test/delete-user-callback_test.js +11 -11
- package/test/delete-user-property-batch_test.js +5 -5
- package/test/delete-user-property-callback_test.js +11 -11
- package/test/delete-user-property-test.js +7 -7
- package/test/delete-user-test.js +7 -7
- package/test/delete-view-portion-batch_test.js +3 -3
- package/test/delete-view-portion-callback_test.js +5 -5
- package/test/delete-view-portion-test.js +3 -3
- package/test/get-item-property-info-batch_test.js +5 -5
- package/test/get-item-property-info-callback_test.js +5 -5
- package/test/get-item-property-info-test.js +3 -3
- package/test/get-item-values-batch_test.js +4 -4
- package/test/get-item-values-callback_test.js +4 -4
- package/test/get-item-values-test.js +3 -3
- package/test/get-segmentation-batch_test.js +4 -4
- package/test/get-segmentation-callback_test.js +4 -4
- package/test/get-segmentation-test.js +2 -2
- package/test/get-user-property-info-batch_test.js +5 -5
- package/test/get-user-property-info-callback_test.js +5 -5
- package/test/get-user-property-info-test.js +3 -3
- package/test/get-user-values-batch_test.js +4 -4
- package/test/get-user-values-callback_test.js +4 -4
- package/test/get-user-values-test.js +3 -3
- package/test/insert-to-series-batch_test.js +7 -7
- package/test/insert-to-series-callback_test.js +9 -9
- package/test/insert-to-series-test.js +3 -3
- package/test/list-item-bookmarks-batch_test.js +5 -5
- package/test/list-item-bookmarks-callback_test.js +5 -5
- package/test/list-item-bookmarks-test.js +4 -4
- package/test/list-item-cart-additions-batch_test.js +5 -5
- package/test/list-item-cart-additions-callback_test.js +5 -5
- package/test/list-item-cart-additions-test.js +4 -4
- package/test/list-item-detail-views-batch_test.js +5 -5
- package/test/list-item-detail-views-callback_test.js +5 -5
- package/test/list-item-detail-views-test.js +4 -4
- package/test/list-item-properties-batch_test.js +3 -3
- package/test/list-item-properties-callback_test.js +3 -3
- package/test/list-item-properties-test.js +2 -2
- package/test/list-item-purchases-batch_test.js +5 -5
- package/test/list-item-purchases-callback_test.js +5 -5
- package/test/list-item-purchases-test.js +4 -4
- package/test/list-item-ratings-batch_test.js +5 -5
- package/test/list-item-ratings-callback_test.js +5 -5
- package/test/list-item-ratings-test.js +4 -4
- package/test/list-item-view-portions-batch_test.js +5 -5
- package/test/list-item-view-portions-callback_test.js +5 -5
- package/test/list-item-view-portions-test.js +4 -4
- package/test/list-items-batch_test.js +5 -5
- package/test/list-items-callback_test.js +5 -5
- package/test/list-items-test.js +3 -3
- package/test/list-scenarios-batch_test.js +2 -2
- package/test/list-scenarios-callback_test.js +2 -2
- package/test/list-scenarios-test.js +1 -1
- package/test/list-search-synonyms-batch_test.js +6 -6
- package/test/list-search-synonyms-callback_test.js +6 -6
- package/test/list-search-synonyms-test.js +3 -3
- package/test/list-segmentations-batch_test.js +4 -4
- package/test/list-segmentations-callback_test.js +4 -4
- package/test/list-segmentations-test.js +2 -2
- package/test/list-series-batch_test.js +3 -3
- package/test/list-series-callback_test.js +3 -3
- package/test/list-series-items-batch_test.js +5 -5
- package/test/list-series-items-callback_test.js +5 -5
- package/test/list-series-items-test.js +4 -4
- package/test/list-series-test.js +2 -2
- package/test/list-user-bookmarks-batch_test.js +5 -5
- package/test/list-user-bookmarks-callback_test.js +5 -5
- package/test/list-user-bookmarks-test.js +4 -4
- package/test/list-user-cart-additions-batch_test.js +5 -5
- package/test/list-user-cart-additions-callback_test.js +5 -5
- package/test/list-user-cart-additions-test.js +4 -4
- package/test/list-user-detail-views-batch_test.js +5 -5
- package/test/list-user-detail-views-callback_test.js +5 -5
- package/test/list-user-detail-views-test.js +4 -4
- package/test/list-user-properties-batch_test.js +3 -3
- package/test/list-user-properties-callback_test.js +3 -3
- package/test/list-user-properties-test.js +2 -2
- package/test/list-user-purchases-batch_test.js +5 -5
- package/test/list-user-purchases-callback_test.js +5 -5
- package/test/list-user-purchases-test.js +4 -4
- package/test/list-user-ratings-batch_test.js +5 -5
- package/test/list-user-ratings-callback_test.js +5 -5
- package/test/list-user-ratings-test.js +4 -4
- package/test/list-user-view-portions-batch_test.js +5 -5
- package/test/list-user-view-portions-callback_test.js +5 -5
- package/test/list-user-view-portions-test.js +4 -4
- package/test/list-users-batch_test.js +5 -5
- package/test/list-users-callback_test.js +5 -5
- package/test/list-users-test.js +3 -3
- package/test/merge-users-batch_test.js +4 -4
- package/test/merge-users-callback_test.js +6 -6
- package/test/merge-users-test.js +3 -3
- package/test/recommend-item-segments-to-item-batch_test.js +2 -2
- package/test/recommend-item-segments-to-item-callback_test.js +4 -4
- package/test/recommend-item-segments-to-item-segment-batch_test.js +2 -2
- package/test/recommend-item-segments-to-item-segment-callback_test.js +4 -4
- package/test/recommend-item-segments-to-item-segment-test.js +3 -3
- package/test/recommend-item-segments-to-item-test.js +3 -3
- package/test/recommend-item-segments-to-user-batch_test.js +2 -2
- package/test/recommend-item-segments-to-user-callback_test.js +4 -4
- package/test/recommend-item-segments-to-user-test.js +3 -3
- package/test/recommend-items-to-item-batch_test.js +4 -4
- package/test/recommend-items-to-item-callback_test.js +4 -4
- package/test/recommend-items-to-item-segment-batch_test.js +2 -2
- package/test/recommend-items-to-item-segment-callback_test.js +4 -4
- package/test/recommend-items-to-item-segment-test.js +3 -3
- package/test/recommend-items-to-item-test.js +1 -1
- package/test/recommend-items-to-user-batch_test.js +7 -5
- package/test/recommend-items-to-user-callback_test.js +17 -4
- package/test/recommend-items-to-user-test.js +10 -1
- package/test/recommend-next-items-batch_test.js +6 -6
- package/test/recommend-next-items-callback_test.js +6 -6
- package/test/recommend-next-items-test.js +3 -3
- package/test/recommend-users-to-item-batch_test.js +7 -5
- package/test/recommend-users-to-item-callback_test.js +17 -4
- package/test/recommend-users-to-item-test.js +10 -1
- package/test/recommend-users-to-user-batch_test.js +7 -5
- package/test/recommend-users-to-user-callback_test.js +17 -4
- package/test/recommend-users-to-user-test.js +10 -1
- package/test/remove-from-series-batch_test.js +3 -3
- package/test/remove-from-series-callback_test.js +5 -5
- package/test/remove-from-series-test.js +3 -3
- package/test/search-item-segments-batch_test.js +2 -2
- package/test/search-item-segments-callback_test.js +4 -4
- package/test/search-item-segments-test.js +3 -3
- package/test/search-items-batch_test.js +7 -7
- package/test/search-items-callback_test.js +7 -7
- package/test/search-items-test.js +4 -4
- package/test/set-item-values-batch_test.js +7 -7
- package/test/set-item-values-callback_test.js +9 -9
- package/test/set-item-values-test.js +3 -3
- package/test/set-user-values-batch_test.js +7 -7
- package/test/set-user-values-callback_test.js +9 -9
- package/test/set-user-values-test.js +3 -3
- package/test/set-view-portion-batch_test.js +7 -7
- package/test/set-view-portion-callback_test.js +15 -15
- package/test/set-view-portion-test.js +9 -9
- package/test/update-auto-reql-segmentation-batch_test.js +3 -3
- package/test/update-auto-reql-segmentation-callback_test.js +3 -3
- package/test/update-auto-reql-segmentation-test.js +1 -1
- package/test/update-manual-reql-segment-batch_test.js +4 -4
- package/test/update-manual-reql-segment-callback_test.js +4 -4
- package/test/update-manual-reql-segment-test.js +1 -1
- package/test/update-manual-reql-segmentation-batch_test.js +3 -3
- package/test/update-manual-reql-segmentation-callback_test.js +3 -3
- package/test/update-manual-reql-segmentation-test.js +1 -1
- package/test/update-more-items-batch_test.js +4 -4
- package/test/update-more-items-callback_test.js +4 -4
- package/test/update-more-items-test.js +3 -3
- package/test/update-property-based-segmentation-batch_test.js +3 -3
- package/test/update-property-based-segmentation-callback_test.js +3 -3
- 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:
|
|
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:
|
|
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:
|
|
668
|
+
changes: Record<string, unknown>,
|
|
658
669
|
);
|
|
659
670
|
|
|
660
671
|
filter: string;
|
|
661
|
-
changes:
|
|
672
|
+
changes: Record<string, unknown>;
|
|
662
673
|
protected __response_type: UpdateMoreItemsResponse;
|
|
663
674
|
|
|
664
675
|
bodyParameters(): {
|
|
665
676
|
filter: string;
|
|
666
|
-
changes:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
2168
|
+
expertSettings?: Record<string, unknown>;
|
|
2134
2169
|
returnAbGroup?: boolean;
|
|
2135
2170
|
};
|
|
2136
2171
|
|
|
@@ -2197,12 +2232,14 @@ declare module "recombee-api-client" {
|
|
|
2197
2232
|
returnProperties?: boolean;
|
|
2198
2233
|
/** Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. */
|
|
2199
2234
|
includedProperties?: string[];
|
|
2200
|
-
/** Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter recommended
|
|
2235
|
+
/** Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter recommended users based on the values of their attributes. */
|
|
2201
2236
|
filter?: string;
|
|
2202
|
-
/** Number-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to boost the recommendation rate of some
|
|
2237
|
+
/** Number-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to boost the recommendation rate of some users based on the values of their attributes. */
|
|
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?:
|
|
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?:
|
|
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?:
|
|
2290
|
+
expertSettings?: Record<string, unknown>;
|
|
2252
2291
|
returnAbGroup?: boolean;
|
|
2253
2292
|
};
|
|
2254
2293
|
|
|
@@ -2264,7 +2303,7 @@ declare module "recombee-api-client" {
|
|
|
2264
2303
|
export class RecommendUsersToItem extends requests.Request {
|
|
2265
2304
|
/**
|
|
2266
2305
|
* @param itemId - ID of the item for which the recommendations are to be generated.
|
|
2267
|
-
* @param count - Number of
|
|
2306
|
+
* @param count - Number of users to be recommended (N for the top-N recommendation).
|
|
2268
2307
|
* @param optional - Optional parameters given as an object.
|
|
2269
2308
|
*/
|
|
2270
2309
|
constructor(
|
|
@@ -2279,16 +2318,18 @@ declare module "recombee-api-client" {
|
|
|
2279
2318
|
returnProperties?: boolean;
|
|
2280
2319
|
/** Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. */
|
|
2281
2320
|
includedProperties?: string[];
|
|
2282
|
-
/** Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter recommended
|
|
2321
|
+
/** Boolean-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to filter recommended users based on the values of their attributes. */
|
|
2283
2322
|
filter?: string;
|
|
2284
|
-
/** Number-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to boost the recommendation rate of some
|
|
2323
|
+
/** Number-returning [ReQL](https://docs.recombee.com/reql) expression, which allows you to boost the recommendation rate of some users based on the values of their attributes. */
|
|
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;
|
|
2288
|
-
/**
|
|
2327
|
+
/** A dictionary of [ReQL](https://docs.recombee.com/reql) expressions that will be executed for each recommended user. */
|
|
2328
|
+
reqlExpressions?: Record<string, string>;
|
|
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?:
|
|
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?:
|
|
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?:
|
|
2364
|
+
expertSettings?: Record<string, unknown>;
|
|
2322
2365
|
returnAbGroup?: boolean;
|
|
2323
2366
|
};
|
|
2324
2367
|
|
|
@@ -2358,7 +2401,7 @@ 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?:
|
|
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;
|
|
2364
2407
|
}
|
|
@@ -2371,7 +2414,7 @@ declare module "recombee-api-client" {
|
|
|
2371
2414
|
filter?: string;
|
|
2372
2415
|
booster?: string;
|
|
2373
2416
|
logic?: string | object;
|
|
2374
|
-
expertSettings?:
|
|
2417
|
+
expertSettings?: Record<string, unknown>;
|
|
2375
2418
|
returnAbGroup?: boolean;
|
|
2376
2419
|
protected __response_type: RecommendationResponse;
|
|
2377
2420
|
|
|
@@ -2382,7 +2425,7 @@ declare module "recombee-api-client" {
|
|
|
2382
2425
|
filter?: string;
|
|
2383
2426
|
booster?: string;
|
|
2384
2427
|
logic?: string | object;
|
|
2385
|
-
expertSettings?:
|
|
2428
|
+
expertSettings?: Record<string, unknown>;
|
|
2386
2429
|
returnAbGroup?: boolean;
|
|
2387
2430
|
};
|
|
2388
2431
|
|
|
@@ -2436,7 +2479,7 @@ declare module "recombee-api-client" {
|
|
|
2436
2479
|
/** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
|
|
2437
2480
|
logic?: string | object;
|
|
2438
2481
|
/** Dictionary of custom options. */
|
|
2439
|
-
expertSettings?:
|
|
2482
|
+
expertSettings?: Record<string, unknown>;
|
|
2440
2483
|
/** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
|
|
2441
2484
|
returnAbGroup?: boolean;
|
|
2442
2485
|
}
|
|
@@ -2450,7 +2493,7 @@ declare module "recombee-api-client" {
|
|
|
2450
2493
|
filter?: string;
|
|
2451
2494
|
booster?: string;
|
|
2452
2495
|
logic?: string | object;
|
|
2453
|
-
expertSettings?:
|
|
2496
|
+
expertSettings?: Record<string, unknown>;
|
|
2454
2497
|
returnAbGroup?: boolean;
|
|
2455
2498
|
protected __response_type: RecommendationResponse;
|
|
2456
2499
|
|
|
@@ -2462,7 +2505,7 @@ declare module "recombee-api-client" {
|
|
|
2462
2505
|
filter?: string;
|
|
2463
2506
|
booster?: string;
|
|
2464
2507
|
logic?: string | object;
|
|
2465
|
-
expertSettings?:
|
|
2508
|
+
expertSettings?: Record<string, unknown>;
|
|
2466
2509
|
returnAbGroup?: boolean;
|
|
2467
2510
|
};
|
|
2468
2511
|
|
|
@@ -2515,7 +2558,7 @@ declare module "recombee-api-client" {
|
|
|
2515
2558
|
/** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
|
|
2516
2559
|
logic?: string | object;
|
|
2517
2560
|
/** Dictionary of custom options. */
|
|
2518
|
-
expertSettings?:
|
|
2561
|
+
expertSettings?: Record<string, unknown>;
|
|
2519
2562
|
/** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
|
|
2520
2563
|
returnAbGroup?: boolean;
|
|
2521
2564
|
}
|
|
@@ -2529,7 +2572,7 @@ declare module "recombee-api-client" {
|
|
|
2529
2572
|
filter?: string;
|
|
2530
2573
|
booster?: string;
|
|
2531
2574
|
logic?: string | object;
|
|
2532
|
-
expertSettings?:
|
|
2575
|
+
expertSettings?: Record<string, unknown>;
|
|
2533
2576
|
returnAbGroup?: boolean;
|
|
2534
2577
|
protected __response_type: RecommendationResponse;
|
|
2535
2578
|
|
|
@@ -2542,7 +2585,7 @@ declare module "recombee-api-client" {
|
|
|
2542
2585
|
filter?: string;
|
|
2543
2586
|
booster?: string;
|
|
2544
2587
|
logic?: string | object;
|
|
2545
|
-
expertSettings?:
|
|
2588
|
+
expertSettings?: Record<string, unknown>;
|
|
2546
2589
|
returnAbGroup?: boolean;
|
|
2547
2590
|
};
|
|
2548
2591
|
|
|
@@ -2550,6 +2593,86 @@ declare module "recombee-api-client" {
|
|
|
2550
2593
|
};
|
|
2551
2594
|
}
|
|
2552
2595
|
|
|
2596
|
+
/**
|
|
2597
|
+
* 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.
|
|
2598
|
+
* 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>*.
|
|
2599
|
+
* See detailed **examples and configuration guidance** in the [Composite Scenarios documentation](https://docs.recombee.com/scenarios#composite-recommendations).
|
|
2600
|
+
* **Structure**
|
|
2601
|
+
* The endpoint operates in two stages:
|
|
2602
|
+
* 1. Recommends the *source* (e.g., an Item Segment or item) to the user.
|
|
2603
|
+
* 2. Recommends *results* (items or Item Segments) related to that *source*.
|
|
2604
|
+
* For example, *Articles from <category>* can be decomposed into:
|
|
2605
|
+
* - [Recommend Item Segments To User](https://docs.recombee.com/api#recommend-item-segments-to-user) to find the category.
|
|
2606
|
+
* - [Recommend Items To Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment) to recommend articles from that category.
|
|
2607
|
+
* 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.
|
|
2608
|
+
* Each *Composite Recommendation* counts as a single recommendation API request for billing.
|
|
2609
|
+
* **Stage-specific Parameters**
|
|
2610
|
+
* 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).
|
|
2611
|
+
* In the example above:
|
|
2612
|
+
* - `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`).
|
|
2613
|
+
* - `resultSettings` may include any parameter valid for [Recommend Items To Item Segment](https://docs.recombee.com/api#recommend-items-to-item-segment).
|
|
2614
|
+
* See [this example](https://docs.recombee.com/api#composite-recommendation-example-setting-parameters-for-individual-stages) for more details.
|
|
2615
|
+
*/
|
|
2616
|
+
export class CompositeRecommendation extends requests.Request {
|
|
2617
|
+
/**
|
|
2618
|
+
* @param scenario - Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing".
|
|
2619
|
+
* 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.
|
|
2620
|
+
* 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.
|
|
2621
|
+
* @param count - Number of items to be recommended (N for the top-N recommendation).
|
|
2622
|
+
* @param optional - Optional parameters given as an object.
|
|
2623
|
+
*/
|
|
2624
|
+
constructor(
|
|
2625
|
+
scenario: string,
|
|
2626
|
+
count: number,
|
|
2627
|
+
optional?: {
|
|
2628
|
+
/** ID of the item for which the recommendations are to be generated. */
|
|
2629
|
+
itemId?: string;
|
|
2630
|
+
/** ID of the user for which the recommendations are to be generated. */
|
|
2631
|
+
userId?: string;
|
|
2632
|
+
/** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
|
|
2633
|
+
logic?: string | object;
|
|
2634
|
+
/** ID of the segment from `contextSegmentationId` for which the recommendations are to be generated. */
|
|
2635
|
+
segmentId?: string;
|
|
2636
|
+
/** 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. */
|
|
2637
|
+
cascadeCreate?: boolean;
|
|
2638
|
+
/** Parameters applied for recommending the *Source* stage. The accepted parameters correspond with the recommendation sub-endpoint used to recommend the *Source*. */
|
|
2639
|
+
sourceSettings?: Record<string, unknown>;
|
|
2640
|
+
/** Parameters applied for recommending the *Result* stage. The accepted parameters correspond with the recommendation sub-endpoint used to recommend the *Result*. */
|
|
2641
|
+
resultSettings?: Record<string, unknown>;
|
|
2642
|
+
/** Dictionary of custom options. */
|
|
2643
|
+
expertSettings?: Record<string, unknown>;
|
|
2644
|
+
}
|
|
2645
|
+
);
|
|
2646
|
+
|
|
2647
|
+
scenario: string;
|
|
2648
|
+
count: number;
|
|
2649
|
+
itemId?: string;
|
|
2650
|
+
userId?: string;
|
|
2651
|
+
logic?: string | object;
|
|
2652
|
+
segmentId?: string;
|
|
2653
|
+
cascadeCreate?: boolean;
|
|
2654
|
+
sourceSettings?: Record<string, unknown>;
|
|
2655
|
+
resultSettings?: Record<string, unknown>;
|
|
2656
|
+
expertSettings?: Record<string, unknown>;
|
|
2657
|
+
protected __response_type: CompositeRecommendationResponse;
|
|
2658
|
+
|
|
2659
|
+
bodyParameters(): {
|
|
2660
|
+
scenario: string;
|
|
2661
|
+
count: number;
|
|
2662
|
+
itemId?: string;
|
|
2663
|
+
userId?: string;
|
|
2664
|
+
logic?: string | object;
|
|
2665
|
+
segmentId?: string;
|
|
2666
|
+
cascadeCreate?: boolean;
|
|
2667
|
+
sourceSettings?: Record<string, unknown>;
|
|
2668
|
+
resultSettings?: Record<string, unknown>;
|
|
2669
|
+
expertSettings?: Record<string, unknown>;
|
|
2670
|
+
};
|
|
2671
|
+
|
|
2672
|
+
queryParameters(): {
|
|
2673
|
+
};
|
|
2674
|
+
}
|
|
2675
|
+
|
|
2553
2676
|
/**
|
|
2554
2677
|
* Full-text personalized search. The results are based on the provided `searchQuery` and also on the user's past interactions (purchases, ratings, etc.) with the items (items more suitable for the user are preferred in the results).
|
|
2555
2678
|
* All the string and set item properties are indexed by the search engine.
|
|
@@ -2586,8 +2709,10 @@ declare module "recombee-api-client" {
|
|
|
2586
2709
|
booster?: string;
|
|
2587
2710
|
/** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
|
|
2588
2711
|
logic?: string | object;
|
|
2712
|
+
/** A dictionary of [ReQL](https://docs.recombee.com/reql) expressions that will be executed for each recommended item. */
|
|
2713
|
+
reqlExpressions?: Record<string, string>;
|
|
2589
2714
|
/** Dictionary of custom options. */
|
|
2590
|
-
expertSettings?:
|
|
2715
|
+
expertSettings?: Record<string, unknown>;
|
|
2591
2716
|
/** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
|
|
2592
2717
|
returnAbGroup?: boolean;
|
|
2593
2718
|
}
|
|
@@ -2603,7 +2728,8 @@ declare module "recombee-api-client" {
|
|
|
2603
2728
|
filter?: string;
|
|
2604
2729
|
booster?: string;
|
|
2605
2730
|
logic?: string | object;
|
|
2606
|
-
|
|
2731
|
+
reqlExpressions?: Record<string, string>;
|
|
2732
|
+
expertSettings?: Record<string, unknown>;
|
|
2607
2733
|
returnAbGroup?: boolean;
|
|
2608
2734
|
protected __response_type: SearchResponse;
|
|
2609
2735
|
|
|
@@ -2617,7 +2743,8 @@ declare module "recombee-api-client" {
|
|
|
2617
2743
|
filter?: string;
|
|
2618
2744
|
booster?: string;
|
|
2619
2745
|
logic?: string | object;
|
|
2620
|
-
|
|
2746
|
+
reqlExpressions?: Record<string, string>;
|
|
2747
|
+
expertSettings?: Record<string, unknown>;
|
|
2621
2748
|
returnAbGroup?: boolean;
|
|
2622
2749
|
};
|
|
2623
2750
|
|
|
@@ -2658,7 +2785,7 @@ declare module "recombee-api-client" {
|
|
|
2658
2785
|
/** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
|
|
2659
2786
|
logic?: string | object;
|
|
2660
2787
|
/** Dictionary of custom options. */
|
|
2661
|
-
expertSettings?:
|
|
2788
|
+
expertSettings?: Record<string, unknown>;
|
|
2662
2789
|
/** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
|
|
2663
2790
|
returnAbGroup?: boolean;
|
|
2664
2791
|
}
|
|
@@ -2672,7 +2799,7 @@ declare module "recombee-api-client" {
|
|
|
2672
2799
|
filter?: string;
|
|
2673
2800
|
booster?: string;
|
|
2674
2801
|
logic?: string | object;
|
|
2675
|
-
expertSettings?:
|
|
2802
|
+
expertSettings?: Record<string, unknown>;
|
|
2676
2803
|
returnAbGroup?: boolean;
|
|
2677
2804
|
protected __response_type: SearchResponse;
|
|
2678
2805
|
|
|
@@ -2684,7 +2811,7 @@ declare module "recombee-api-client" {
|
|
|
2684
2811
|
filter?: string;
|
|
2685
2812
|
booster?: string;
|
|
2686
2813
|
logic?: string | object;
|
|
2687
|
-
expertSettings?:
|
|
2814
|
+
expertSettings?: Record<string, unknown>;
|
|
2688
2815
|
returnAbGroup?: boolean;
|
|
2689
2816
|
};
|
|
2690
2817
|
|