-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef84cf3
commit d062549
Showing
119 changed files
with
3,287 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
This file is auto-generated, do not edit | ||
*/ | ||
|
||
'use strict'; | ||
const rqs = require("./request"); | ||
|
||
/** | ||
* Adds a new Segment into a Manual ReQL Segmentation. | ||
* The new Segment is defined by a [ReQL](https://docs.recombee.com/reql.html) filter that returns `true` for an item in case that this item belongs to the segment. | ||
*/ | ||
class AddManualReqlSegment extends rqs.Request { | ||
|
||
/** | ||
* Construct the request | ||
* @param {string} segmentationId - ID of the Segmentation to which the new Segment should be added | ||
* @param {string} segmentId - ID of the newly created Segment | ||
* @param {string} filter - ReQL filter that returns `true` for items that belong to this Segment. Otherwise returns `false`. | ||
* @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value | ||
* - Allowed parameters: | ||
* - *title* | ||
* - Type: string | ||
* - Description: Human-readable name of the Segment that is shown in the Recombee Admin UI. | ||
*/ | ||
constructor(segmentationId, segmentId, filter, optional) { | ||
super('PUT', `/segmentations/manual-reql/${segmentationId}/segments/${segmentId}`, 10000, false); | ||
this.segmentationId = segmentationId; | ||
this.segmentId = segmentId; | ||
this.filter = filter; | ||
optional = optional || {}; | ||
this.title = optional.title; | ||
} | ||
|
||
/** | ||
* Get body parameters | ||
* @return {Object} The values of body parameters (name of parameter: value of the parameter) | ||
*/ | ||
bodyParameters() { | ||
let params = {}; | ||
params.filter = this.filter; | ||
|
||
if(this.title !== undefined) | ||
params.title = this.title; | ||
|
||
return params; | ||
} | ||
|
||
/** | ||
* Get query parameters | ||
* @return {Object} The values of query parameters (name of parameter: value of the parameter) | ||
*/ | ||
queryParameters() { | ||
let params = {}; | ||
return params; | ||
} | ||
} | ||
|
||
exports.AddManualReqlSegment = AddManualReqlSegment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
This file is auto-generated, do not edit | ||
*/ | ||
|
||
'use strict'; | ||
const rqs = require("./request"); | ||
|
||
/** | ||
* Segment the items using a [ReQL](https://docs.recombee.com/reql.html) expression. | ||
* For each item, the expression should return a set that contains IDs of segments to which the item belongs to. | ||
*/ | ||
class CreateAutoReqlSegmentation extends rqs.Request { | ||
|
||
/** | ||
* Construct the request | ||
* @param {string} segmentationId - ID of the newly created Segmentation | ||
* @param {string} sourceType - What type of data should be segmented. Currently only `items` are supported. | ||
* @param {string} expression - ReQL expression that returns for each item a set with IDs of segments to which the item belongs | ||
* @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value | ||
* - Allowed parameters: | ||
* - *title* | ||
* - Type: string | ||
* - Description: Human-readable name that is shown in the Recombee Admin UI. | ||
* - *description* | ||
* - Type: string | ||
* - Description: Description that is shown in the Recombee Admin UI. | ||
*/ | ||
constructor(segmentationId, sourceType, expression, optional) { | ||
super('PUT', `/segmentations/auto-reql/${segmentationId}`, 10000, false); | ||
this.segmentationId = segmentationId; | ||
this.sourceType = sourceType; | ||
this.expression = expression; | ||
optional = optional || {}; | ||
this.title = optional.title; | ||
this.description = optional.description; | ||
} | ||
|
||
/** | ||
* Get body parameters | ||
* @return {Object} The values of body parameters (name of parameter: value of the parameter) | ||
*/ | ||
bodyParameters() { | ||
let params = {}; | ||
params.sourceType = this.sourceType; | ||
params.expression = this.expression; | ||
|
||
if(this.title !== undefined) | ||
params.title = this.title; | ||
|
||
if(this.description !== undefined) | ||
params.description = this.description; | ||
|
||
return params; | ||
} | ||
|
||
/** | ||
* Get query parameters | ||
* @return {Object} The values of query parameters (name of parameter: value of the parameter) | ||
*/ | ||
queryParameters() { | ||
let params = {}; | ||
return params; | ||
} | ||
} | ||
|
||
exports.CreateAutoReqlSegmentation = CreateAutoReqlSegmentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
This file is auto-generated, do not edit | ||
*/ | ||
|
||
'use strict'; | ||
const rqs = require("./request"); | ||
|
||
/** | ||
* Segment the items using multiple [ReQL](https://docs.recombee.com/reql.html) filters. | ||
* Use the Add Manual ReQL Items Segment endpoint to create the individual segments. | ||
*/ | ||
class CreateManualReqlSegmentation extends rqs.Request { | ||
|
||
/** | ||
* Construct the request | ||
* @param {string} segmentationId - ID of the newly created Segmentation | ||
* @param {string} sourceType - What type of data should be segmented. Currently only `items` are supported. | ||
* @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value | ||
* - Allowed parameters: | ||
* - *title* | ||
* - Type: string | ||
* - Description: Human-readable name that is shown in the Recombee Admin UI. | ||
* - *description* | ||
* - Type: string | ||
* - Description: Description that is shown in the Recombee Admin UI. | ||
*/ | ||
constructor(segmentationId, sourceType, optional) { | ||
super('PUT', `/segmentations/manual-reql/${segmentationId}`, 10000, false); | ||
this.segmentationId = segmentationId; | ||
this.sourceType = sourceType; | ||
optional = optional || {}; | ||
this.title = optional.title; | ||
this.description = optional.description; | ||
} | ||
|
||
/** | ||
* Get body parameters | ||
* @return {Object} The values of body parameters (name of parameter: value of the parameter) | ||
*/ | ||
bodyParameters() { | ||
let params = {}; | ||
params.sourceType = this.sourceType; | ||
|
||
if(this.title !== undefined) | ||
params.title = this.title; | ||
|
||
if(this.description !== undefined) | ||
params.description = this.description; | ||
|
||
return params; | ||
} | ||
|
||
/** | ||
* Get query parameters | ||
* @return {Object} The values of query parameters (name of parameter: value of the parameter) | ||
*/ | ||
queryParameters() { | ||
let params = {}; | ||
return params; | ||
} | ||
} | ||
|
||
exports.CreateManualReqlSegmentation = CreateManualReqlSegmentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
This file is auto-generated, do not edit | ||
*/ | ||
|
||
'use strict'; | ||
const rqs = require("./request"); | ||
|
||
/** | ||
* Creates a Segmentation that splits the items into segments based on values of a particular item property. | ||
* A segment is created for each unique value of the property. | ||
* In case of `set` properties, a segment is created for each value in the set. Item belongs to all these segments. | ||
*/ | ||
class CreatePropertyBasedSegmentation extends rqs.Request { | ||
|
||
/** | ||
* Construct the request | ||
* @param {string} segmentationId - ID of the newly created Segmentation | ||
* @param {string} sourceType - What type of data should be segmented. Currently only `items` are supported. | ||
* @param {string} propertyName - Name of the property on which the Segmentation should be based | ||
* @param {Object} optional - Optional parameters given as an object with structure name of the parameter: value | ||
* - Allowed parameters: | ||
* - *title* | ||
* - Type: string | ||
* - Description: Human-readable name that is shown in the Recombee Admin UI. | ||
* - *description* | ||
* - Type: string | ||
* - Description: Description that is shown in the Recombee Admin UI. | ||
*/ | ||
constructor(segmentationId, sourceType, propertyName, optional) { | ||
super('PUT', `/segmentations/property-based/${segmentationId}`, 10000, false); | ||
this.segmentationId = segmentationId; | ||
this.sourceType = sourceType; | ||
this.propertyName = propertyName; | ||
optional = optional || {}; | ||
this.title = optional.title; | ||
this.description = optional.description; | ||
} | ||
|
||
/** | ||
* Get body parameters | ||
* @return {Object} The values of body parameters (name of parameter: value of the parameter) | ||
*/ | ||
bodyParameters() { | ||
let params = {}; | ||
params.sourceType = this.sourceType; | ||
params.propertyName = this.propertyName; | ||
|
||
if(this.title !== undefined) | ||
params.title = this.title; | ||
|
||
if(this.description !== undefined) | ||
params.description = this.description; | ||
|
||
return params; | ||
} | ||
|
||
/** | ||
* Get query parameters | ||
* @return {Object} The values of query parameters (name of parameter: value of the parameter) | ||
*/ | ||
queryParameters() { | ||
let params = {}; | ||
return params; | ||
} | ||
} | ||
|
||
exports.CreatePropertyBasedSegmentation = CreatePropertyBasedSegmentation |
Oops, something went wrong.