recombee-api-client 5.0.0 → 5.0.2

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 CHANGED
@@ -43,7 +43,7 @@ class ApiClient {
43
43
  method: request.method,
44
44
  headers: {'Accept': 'application/json',
45
45
  'Content-Type': 'application/json',
46
- 'User-Agent': 'recombee-node-api-client/5.0.0'},
46
+ 'User-Agent': 'recombee-node-api-client/5.0.2'},
47
47
  timeout: request.timeout,
48
48
  agent: this.options.agent
49
49
  };
@@ -60,23 +60,21 @@ class ApiClient {
60
60
  return resolve(response);
61
61
  });
62
62
  })
63
- .catch((error) => {
64
- return error.response.text().then((body) => {
65
- if (error instanceof ky.HTTPError) {
66
- error = new api_errors.ResponseError(
67
- request,
68
- error.response.status,
69
- body
70
- );
71
- } else if (error instanceof ky.TimeoutError) {
72
- error = new api_errors.TimeoutError(request, error);
73
- }
74
- if (callback) {
75
- return callback(error);
76
- }
77
- throw error;
78
- });
79
- });
63
+ .catch(async (error) => {
64
+ if (error instanceof ky.TimeoutError) {
65
+ error = new api_errors.TimeoutError(request, error);
66
+ } else if (error instanceof ky.HTTPError) {
67
+ error = new api_errors.ResponseError(
68
+ request,
69
+ error.response.status,
70
+ await error.response.text()
71
+ );
72
+ }
73
+ if (callback) {
74
+ return callback(error);
75
+ }
76
+ throw error;
77
+ });
80
78
  })
81
79
  }
82
80
 
package/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export module "recombee-api-client" {
1
+ declare module "recombee-api-client" {
2
2
  namespace requests {
3
3
  /**
4
4
  * Base class for all the requests
@@ -257,8 +257,6 @@ export module "recombee-api-client" {
257
257
  ): string
258
258
  }
259
259
 
260
- type Response = Item | PropertyInfo | UpdateMoreItemsResponse | DeleteMoreItemsResponse | Series | SeriesItem | User | DetailView | Purchase | Rating | CartAddition | Bookmark | ViewPortion | RecommendationResponse | SearchResponse | SearchSynonym | ListSearchSynonymsResponse | ListSegmentationsResponse | Segmentation;
261
-
262
260
  export type Item = {
263
261
  itemId: string;
264
262
  values?: { [key: string]: unknown };
@@ -605,7 +603,7 @@ export module "recombee-api-client" {
605
603
  /**
606
604
  * Updates (some) property values of all the items that pass the filter.
607
605
  * Example: *Setting all the items that are older than a week as unavailable*
608
- * ```
606
+ * ```json
609
607
  * {
610
608
  * "filter": "'releaseDate' < now() - 7*24*3600",
611
609
  * "changes": {"available": false}
@@ -2001,13 +1999,114 @@ export module "recombee-api-client" {
2001
1999
  };
2002
2000
  }
2003
2001
 
2002
+ /**
2003
+ * Recommends Items that are the most relevant to a particular Segment from a context [Segmentation](https://docs.recombee.com/segmentations.html).
2004
+ * Based on the used Segmentation, this endpoint can be used for example for:
2005
+ * - Recommending articles related to a particular topic
2006
+ * - Recommending songs belonging to a particular genre
2007
+ * - Recommending products produced by a particular brand
2008
+ * You need to set the used context Segmentation in the Admin UI in the [Scenario settings](https://docs.recombee.com/scenarios) prior to using this endpoint.
2009
+ * The returned items are sorted by relevance (the first item being the most relevant).
2010
+ * It is also possible to use the POST HTTP method (for example, in the case of a very long ReQL filter) — query parameters then become body parameters.
2011
+ */
2012
+ export class RecommendItemsToItemSegment extends requests.Request {
2013
+ /**
2014
+ * @param contextSegmentId - ID of the segment from `contextSegmentationId` for which the recommendations are to be generated.
2015
+ * @param targetUserId - ID of the user who will see the recommendations.
2016
+ * Specifying the *targetUserId* is beneficial because:
2017
+ * * It makes the recommendations personalized
2018
+ * * Allows the calculation of Actions and Conversions
2019
+ * in the graphical user interface,
2020
+ * as Recombee can pair the user who got recommendations
2021
+ * and who afterward viewed/purchased an item.
2022
+ * If you insist on not specifying the user, pass `null`
2023
+ * (`None`, `nil`, `NULL` etc., depending on the language) to *targetUserId*.
2024
+ * Do not create some special dummy user for getting recommendations,
2025
+ * as it could mislead the recommendation models,
2026
+ * and result in wrong recommendations.
2027
+ * For anonymous/unregistered users, it is possible to use, for example, their session ID.
2028
+ * @param count - Number of items to be recommended (N for the top-N recommendation).
2029
+ * @param optional - Optional parameters given as an object.
2030
+ */
2031
+ constructor(
2032
+ contextSegmentId: string,
2033
+ targetUserId: string,
2034
+ count: number,
2035
+ optional?: {
2036
+ /** Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". */
2037
+ scenario?: string;
2038
+ /** If an item of the given *itemId* or user of the given *targetUserId* doesn't exist in the database, it creates the missing entity/entities and returns some (non-personalized) recommendations. This allows, for example, rotations in the following recommendations for the user of the given *targetUserId*, as the user will be already known to the system. */
2039
+ cascadeCreate?: boolean;
2040
+ /** With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user. */
2041
+ returnProperties?: boolean;
2042
+ /** Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. */
2043
+ includedProperties?: string[];
2044
+ /** Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes. */
2045
+ filter?: string;
2046
+ /** Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes. */
2047
+ booster?: string;
2048
+ /** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
2049
+ logic?: string | object;
2050
+ /** **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. */
2051
+ minRelevance?: string;
2052
+ /** **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. */
2053
+ rotationRate?: number;
2054
+ /** **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. */
2055
+ rotationTime?: number;
2056
+ /** Dictionary of custom options. */
2057
+ expertSettings?: { [key: string]: unknown };
2058
+ /** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
2059
+ returnAbGroup?: boolean;
2060
+ }
2061
+ );
2062
+
2063
+ contextSegmentId: string;
2064
+ targetUserId: string;
2065
+ count: number;
2066
+ scenario?: string;
2067
+ cascadeCreate?: boolean;
2068
+ returnProperties?: boolean;
2069
+ includedProperties?: string[];
2070
+ filter?: string;
2071
+ booster?: string;
2072
+ logic?: string | object;
2073
+ minRelevance?: string;
2074
+ rotationRate?: number;
2075
+ rotationTime?: number;
2076
+ expertSettings?: { [key: string]: unknown };
2077
+ returnAbGroup?: boolean;
2078
+ protected __response_type: RecommendationResponse;
2079
+
2080
+ bodyParameters(): {
2081
+ contextSegmentId: string;
2082
+ targetUserId: string;
2083
+ count: number;
2084
+ scenario?: string;
2085
+ cascadeCreate?: boolean;
2086
+ returnProperties?: boolean;
2087
+ includedProperties?: string[];
2088
+ filter?: string;
2089
+ booster?: string;
2090
+ logic?: string | object;
2091
+ minRelevance?: string;
2092
+ rotationRate?: number;
2093
+ rotationTime?: number;
2094
+ expertSettings?: { [key: string]: unknown };
2095
+ returnAbGroup?: boolean;
2096
+ };
2097
+
2098
+ queryParameters(): {
2099
+ };
2100
+ }
2101
+
2004
2102
  /**
2005
2103
  * Returns items that shall be shown to a user as next recommendations when the user e.g. scrolls the page down (*infinite scroll*) or goes to the next page.
2006
2104
  * It accepts `recommId` of a base recommendation request (e.g., request from the first page) and the number of items that shall be returned (`count`).
2007
2105
  * The base request can be one of:
2008
- * - [Recommend items to item](https://docs.recombee.com/api.html#recommend-items-to-item)
2009
- * - [Recommend items to user](https://docs.recombee.com/api.html#recommend-items-to-user)
2010
- * - [Search items](https://docs.recombee.com/api.html#search-items)
2106
+ * - [Recommend Items to Item](https://docs.recombee.com/api.html#recommend-items-to-item)
2107
+ * - [Recommend Items to User](https://docs.recombee.com/api.html#recommend-items-to-user)
2108
+ * - [Recommend Items to Item Segment](https://docs.recombee.com/api.html#recommend-items-to-item-segment)
2109
+ * - [Search Items](https://docs.recombee.com/api.html#search-items)
2011
2110
  * All the other parameters are inherited from the base request.
2012
2111
  * *Recommend next items* can be called many times for a single `recommId` and each call returns different (previously not recommended) items.
2013
2112
  * The number of *Recommend next items* calls performed so far is returned in the `numberNextRecommsCalls` field.
@@ -2412,106 +2511,6 @@ export module "recombee-api-client" {
2412
2511
  };
2413
2512
  }
2414
2513
 
2415
- /**
2416
- * Recommends Items that are the most relevant to a particular Segment from a context [Segmentation](https://docs.recombee.com/segmentations.html).
2417
- * Based on the used Segmentation, this endpoint can be used for example for:
2418
- * - Recommending articles related to a particular topic
2419
- * - Recommending songs belonging to a particular genre
2420
- * - Recommending products produced by a particular brand
2421
- * You need to set the used context Segmentation in the Admin UI in the [Scenario settings](https://docs.recombee.com/scenarios) prior to using this endpoint.
2422
- * The returned items are sorted by relevance (the first item being the most relevant).
2423
- * It is also possible to use the POST HTTP method (for example, in the case of a very long ReQL filter) — query parameters then become body parameters.
2424
- */
2425
- export class RecommendItemsToItemSegment extends requests.Request {
2426
- /**
2427
- * @param contextSegmentId - ID of the segment from `contextSegmentationId` for which the recommendations are to be generated.
2428
- * @param targetUserId - ID of the user who will see the recommendations.
2429
- * Specifying the *targetUserId* is beneficial because:
2430
- * * It makes the recommendations personalized
2431
- * * Allows the calculation of Actions and Conversions
2432
- * in the graphical user interface,
2433
- * as Recombee can pair the user who got recommendations
2434
- * and who afterward viewed/purchased an item.
2435
- * If you insist on not specifying the user, pass `null`
2436
- * (`None`, `nil`, `NULL` etc., depending on the language) to *targetUserId*.
2437
- * Do not create some special dummy user for getting recommendations,
2438
- * as it could mislead the recommendation models,
2439
- * and result in wrong recommendations.
2440
- * For anonymous/unregistered users, it is possible to use, for example, their session ID.
2441
- * @param count - Number of items to be recommended (N for the top-N recommendation).
2442
- * @param optional - Optional parameters given as an object.
2443
- */
2444
- constructor(
2445
- contextSegmentId: string,
2446
- targetUserId: string,
2447
- count: number,
2448
- optional?: {
2449
- /** Scenario defines a particular application of recommendations. It can be, for example, "homepage", "cart", or "emailing". */
2450
- scenario?: string;
2451
- /** If an item of the given *itemId* or user of the given *targetUserId* doesn't exist in the database, it creates the missing entity/entities and returns some (non-personalized) recommendations. This allows, for example, rotations in the following recommendations for the user of the given *targetUserId*, as the user will be already known to the system. */
2452
- cascadeCreate?: boolean;
2453
- /** With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user. */
2454
- returnProperties?: boolean;
2455
- /** Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list. */
2456
- includedProperties?: string[];
2457
- /** Boolean-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to filter recommended items based on the values of their attributes. */
2458
- filter?: string;
2459
- /** Number-returning [ReQL](https://docs.recombee.com/reql.html) expression, which allows you to boost the recommendation rate of some items based on the values of their attributes. */
2460
- booster?: string;
2461
- /** Logic specifies the particular behavior of the recommendation models. You can pick tailored logic for your domain and use case. */
2462
- logic?: string | object;
2463
- /** **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. */
2464
- minRelevance?: string;
2465
- /** **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. */
2466
- rotationRate?: number;
2467
- /** **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. */
2468
- rotationTime?: number;
2469
- /** Dictionary of custom options. */
2470
- expertSettings?: { [key: string]: unknown };
2471
- /** If there is a custom AB-testing running, return the name of the group to which the request belongs. */
2472
- returnAbGroup?: boolean;
2473
- }
2474
- );
2475
-
2476
- contextSegmentId: string;
2477
- targetUserId: string;
2478
- count: number;
2479
- scenario?: string;
2480
- cascadeCreate?: boolean;
2481
- returnProperties?: boolean;
2482
- includedProperties?: string[];
2483
- filter?: string;
2484
- booster?: string;
2485
- logic?: string | object;
2486
- minRelevance?: string;
2487
- rotationRate?: number;
2488
- rotationTime?: number;
2489
- expertSettings?: { [key: string]: unknown };
2490
- returnAbGroup?: boolean;
2491
- protected __response_type: RecommendationResponse;
2492
-
2493
- bodyParameters(): {
2494
- contextSegmentId: string;
2495
- targetUserId: string;
2496
- count: number;
2497
- scenario?: string;
2498
- cascadeCreate?: boolean;
2499
- returnProperties?: boolean;
2500
- includedProperties?: string[];
2501
- filter?: string;
2502
- booster?: string;
2503
- logic?: string | object;
2504
- minRelevance?: string;
2505
- rotationRate?: number;
2506
- rotationTime?: number;
2507
- expertSettings?: { [key: string]: unknown };
2508
- returnAbGroup?: boolean;
2509
- };
2510
-
2511
- queryParameters(): {
2512
- };
2513
- }
2514
-
2515
2514
  /**
2516
2515
  * 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).
2517
2516
  * All the string and set item properties are indexed by the search engine.
@@ -56,13 +56,13 @@ exports.ListItemViewPortions = require("./list-item-view-portions").ListItemView
56
56
  exports.ListUserViewPortions = require("./list-user-view-portions").ListUserViewPortions;
57
57
  exports.RecommendItemsToUser = require("./recommend-items-to-user").RecommendItemsToUser;
58
58
  exports.RecommendItemsToItem = require("./recommend-items-to-item").RecommendItemsToItem;
59
+ exports.RecommendItemsToItemSegment = require("./recommend-items-to-item-segment").RecommendItemsToItemSegment;
59
60
  exports.RecommendNextItems = require("./recommend-next-items").RecommendNextItems;
60
61
  exports.RecommendUsersToUser = require("./recommend-users-to-user").RecommendUsersToUser;
61
62
  exports.RecommendUsersToItem = require("./recommend-users-to-item").RecommendUsersToItem;
62
63
  exports.RecommendItemSegmentsToUser = require("./recommend-item-segments-to-user").RecommendItemSegmentsToUser;
63
64
  exports.RecommendItemSegmentsToItem = require("./recommend-item-segments-to-item").RecommendItemSegmentsToItem;
64
65
  exports.RecommendItemSegmentsToItemSegment = require("./recommend-item-segments-to-item-segment").RecommendItemSegmentsToItemSegment;
65
- exports.RecommendItemsToItemSegment = require("./recommend-items-to-item-segment").RecommendItemsToItemSegment;
66
66
  exports.SearchItems = require("./search-items").SearchItems;
67
67
  exports.SearchItemSegments = require("./search-item-segments").SearchItemSegments;
68
68
  exports.AddSearchSynonym = require("./add-search-synonym").AddSearchSynonym;
@@ -27,7 +27,7 @@ class ListItems extends rqs.Request {
27
27
  * - Type: boolean
28
28
  * - Description: With `returnProperties=true`, property values of the listed items are returned along with their IDs in a JSON dictionary.
29
29
  * Example response:
30
- * ```
30
+ * ```json
31
31
  * [
32
32
  * {
33
33
  * "itemId": "tv-178",
@@ -49,7 +49,7 @@ class ListItems extends rqs.Request {
49
49
  * - Type: string[]
50
50
  * - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
51
51
  * Example response for `includedProperties=description,price`:
52
- * ```
52
+ * ```json
53
53
  * [
54
54
  * {
55
55
  * "itemId": "tv-178",
@@ -27,7 +27,7 @@ class ListUsers extends rqs.Request {
27
27
  * - Type: boolean
28
28
  * - Description: With `returnProperties=true`, property values of the listed users are returned along with their IDs in a JSON dictionary.
29
29
  * Example response:
30
- * ```
30
+ * ```json
31
31
  * [
32
32
  * {
33
33
  * "userId": "user-81",
@@ -45,7 +45,7 @@ class ListUsers extends rqs.Request {
45
45
  * - Type: string[]
46
46
  * - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
47
47
  * Example response for `includedProperties=country`:
48
- * ```
48
+ * ```json
49
49
  * [
50
50
  * {
51
51
  * "userId": "user-81",
@@ -48,7 +48,7 @@ class RecommendItemsToItemSegment extends rqs.Request {
48
48
  * - Type: boolean
49
49
  * - Description: With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user.
50
50
  * Example response:
51
- * ```
51
+ * ```json
52
52
  * {
53
53
  * "recommId": "0c6189e7-dc1a-429a-b613-192696309361",
54
54
  * "recomms":
@@ -79,7 +79,7 @@ class RecommendItemsToItemSegment extends rqs.Request {
79
79
  * - Type: string[]
80
80
  * - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
81
81
  * Example response for `includedProperties=description,price`:
82
- * ```
82
+ * ```json
83
83
  * {
84
84
  * "recommId": "6842c725-a79f-4537-a02c-f34d668a3f80",
85
85
  * "recomms":
@@ -46,7 +46,7 @@ class RecommendItemsToItem extends rqs.Request {
46
46
  * - Type: boolean
47
47
  * - Description: With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user.
48
48
  * Example response:
49
- * ```
49
+ * ```json
50
50
  * {
51
51
  * "recommId": "0c6189e7-dc1a-429a-b613-192696309361",
52
52
  * "recomms":
@@ -77,7 +77,7 @@ class RecommendItemsToItem extends rqs.Request {
77
77
  * - Type: string[]
78
78
  * - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
79
79
  * Example response for `includedProperties=description,price`:
80
- * ```
80
+ * ```json
81
81
  * {
82
82
  * "recommId": "6842c725-a79f-4537-a02c-f34d668a3f80",
83
83
  * "recomms":
@@ -34,7 +34,7 @@ class RecommendItemsToUser extends rqs.Request {
34
34
  * - Type: boolean
35
35
  * - Description: With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user.
36
36
  * Example response:
37
- * ```
37
+ * ```json
38
38
  * {
39
39
  * "recommId": "ce52ada4-e4d9-4885-943c-407db2dee837",
40
40
  * "recomms":
@@ -65,7 +65,7 @@ class RecommendItemsToUser extends rqs.Request {
65
65
  * - Type: string[]
66
66
  * - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
67
67
  * Example response for `includedProperties=description,price`:
68
- * ```
68
+ * ```json
69
69
  * {
70
70
  * "recommId": "a86ee8d5-cd8e-46d1-886c-8b3771d0520b",
71
71
  * "recomms":
@@ -9,9 +9,10 @@ const rqs = require("./request");
9
9
  * Returns items that shall be shown to a user as next recommendations when the user e.g. scrolls the page down (*infinite scroll*) or goes to the next page.
10
10
  * It accepts `recommId` of a base recommendation request (e.g., request from the first page) and the number of items that shall be returned (`count`).
11
11
  * The base request can be one of:
12
- * - [Recommend items to item](https://docs.recombee.com/api.html#recommend-items-to-item)
13
- * - [Recommend items to user](https://docs.recombee.com/api.html#recommend-items-to-user)
14
- * - [Search items](https://docs.recombee.com/api.html#search-items)
12
+ * - [Recommend Items to Item](https://docs.recombee.com/api.html#recommend-items-to-item)
13
+ * - [Recommend Items to User](https://docs.recombee.com/api.html#recommend-items-to-user)
14
+ * - [Recommend Items to Item Segment](https://docs.recombee.com/api.html#recommend-items-to-item-segment)
15
+ * - [Search Items](https://docs.recombee.com/api.html#search-items)
15
16
  * All the other parameters are inherited from the base request.
16
17
  * *Recommend next items* can be called many times for a single `recommId` and each call returns different (previously not recommended) items.
17
18
  * The number of *Recommend next items* calls performed so far is returned in the `numberNextRecommsCalls` field.
@@ -30,7 +30,7 @@ class RecommendUsersToItem extends rqs.Request {
30
30
  * - Type: boolean
31
31
  * - Description: With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended users.
32
32
  * Example response:
33
- * ```
33
+ * ```json
34
34
  * {
35
35
  * "recommId": "039b71dc-b9cc-4645-a84f-62b841eecfce",
36
36
  * "recomms":
@@ -57,7 +57,7 @@ class RecommendUsersToItem extends rqs.Request {
57
57
  * - Type: string[]
58
58
  * - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
59
59
  * Example response for `includedProperties=country`:
60
- * ```
60
+ * ```json
61
61
  * {
62
62
  * "recommId": "b2b355dd-972a-4728-9c6b-2dc229db0678",
63
63
  * "recomms":
@@ -30,7 +30,7 @@ class RecommendUsersToUser extends rqs.Request {
30
30
  * - Type: boolean
31
31
  * - Description: With `returnProperties=true`, property values of the recommended users are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended users.
32
32
  * Example response:
33
- * ```
33
+ * ```json
34
34
  * {
35
35
  * "recommId": "9cb9c55d-50ba-4478-84fd-ab456136156e",
36
36
  * "recomms":
@@ -57,7 +57,7 @@ class RecommendUsersToUser extends rqs.Request {
57
57
  * - Type: string[]
58
58
  * - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
59
59
  * Example response for `includedProperties=country`:
60
- * ```
60
+ * ```json
61
61
  * {
62
62
  * "recommId": "b326d82d-5d57-4b45-b362-c9d6f0895855",
63
63
  * "recomms":
@@ -36,7 +36,7 @@ class SearchItems extends rqs.Request {
36
36
  * - Type: boolean
37
37
  * - Description: With `returnProperties=true`, property values of the recommended items are returned along with their IDs in a JSON dictionary. The acquired property values can be used to easily display the recommended items to the user.
38
38
  * Example response:
39
- * ```
39
+ * ```json
40
40
  * {
41
41
  * "recommId": "ce52ada4-e4d9-4885-943c-407db2dee837",
42
42
  * "recomms":
@@ -67,7 +67,7 @@ class SearchItems extends rqs.Request {
67
67
  * - Type: string[]
68
68
  * - Description: Allows specifying which properties should be returned when `returnProperties=true` is set. The properties are given as a comma-separated list.
69
69
  * Example response for `includedProperties=description,price`:
70
- * ```
70
+ * ```json
71
71
  * {
72
72
  * "recommId": "a86ee8d5-cd8e-46d1-886c-8b3771d0520b",
73
73
  * "recomms":
@@ -8,7 +8,7 @@ const rqs = require("./request");
8
8
  /**
9
9
  * Updates (some) property values of all the items that pass the filter.
10
10
  * Example: *Setting all the items that are older than a week as unavailable*
11
- * ```
11
+ * ```json
12
12
  * {
13
13
  * "filter": "'releaseDate' < now() - 7*24*3600",
14
14
  * "changes": {"available": false}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "recombee-api-client",
3
- "version": "5.0.0",
3
+ "version": "5.0.2",
4
4
  "description": "Node.js client (SDK) for easy use of the Recombee recommendation API",
5
5
  "main": "index.js",
6
6
  "types": "lib/index.d.ts",