fiftyone.devicedetection.onpremise
Advanced tools
Comparing version 4.4.128 to 4.4.129
@@ -24,9 +24,28 @@ /* ********************************************************************* | ||
class Component { | ||
/** | ||
* Constructor for Component | ||
* | ||
* @param {object} metadata Metadata | ||
* @param {object} engineMetadata Engine metadata | ||
*/ | ||
constructor (metadata, engineMetadata) { | ||
this.metadata = metadata; | ||
this.engineMetadata = engineMetadata; | ||
/** | ||
* @type {string} | ||
*/ | ||
this.name = metadata.getName(); | ||
/** | ||
* @type {object} | ||
*/ | ||
this.properties = engineMetadata.getPropertiesForComponent(metadata); | ||
} | ||
/** | ||
* Yield component properties | ||
* | ||
* @generator | ||
* @yields {Property} | ||
* @returns {void} | ||
*/ | ||
* getProperties () { | ||
@@ -33,0 +52,0 @@ const Property = require('./property'); |
@@ -34,6 +34,10 @@ /* ********************************************************************* | ||
* updateURLParams parameter | ||
* | ||
* @param {string} options.useUrlFormatter whether to append default URL params for Data File download | ||
**/ | ||
class DeviceDetectionDataFile extends DataFile { | ||
/** | ||
* Constructor for Device Detection DataFile | ||
* | ||
* @param {object} options options for the datafile | ||
* @param {string} options.useUrlFormatter whether to append default URL params for Data File download | ||
**/ | ||
constructor ({ useUrlFormatter = true, ...rest }) { | ||
@@ -43,2 +47,3 @@ super({ ...rest }); | ||
} | ||
/** | ||
@@ -51,3 +56,2 @@ * Uses the product, type and licensekey parameters the datafile | ||
*/ | ||
urlFormatter () { | ||
@@ -54,0 +58,0 @@ const queryParams = { |
@@ -46,2 +46,10 @@ /* ********************************************************************* | ||
/** | ||
* @typedef {import('fiftyone.pipeline.engines').Engine} Engine | ||
*/ | ||
/** | ||
* @typedef {import('fiftyone.pipeline.core').FlowData} FlowData | ||
*/ | ||
// Determine if Windows or linux and which node version | ||
@@ -189,3 +197,3 @@ | ||
* @param {boolean} options.dataUpdateUseUrlFormatter whether to append default URL params for Data File download | ||
* @param {Array} options.restrictedProperties list of properties the engine | ||
* @param {Array<string>} options.restrictedProperties list of properties the engine | ||
* will be restricted to | ||
@@ -211,3 +219,3 @@ * @param {string} options.licenceKeys license key(s) used by the | ||
* should record the matched characters from the target User-Agent | ||
* @param {object} options.maxMatchedUserAgentLength Number of characters to | ||
* @param {number} options.maxMatchedUserAgentLength Number of characters to | ||
* consider in the matched User-Agent. Ignored if updateMatchedUserAgent | ||
@@ -423,6 +431,9 @@ * is false | ||
// Function for initialising the engine, wrapped like this so | ||
// that an engine can be initialised once the datafile is | ||
// retrieved if updateOnStart is set to true | ||
/** | ||
* Function for initialising the engine, wrapped like this so | ||
* that an engine can be initialised once the datafile is | ||
* retrieved if updateOnStart is set to true | ||
* | ||
* @returns {Promise<void>} init Engine Promise | ||
*/ | ||
this.initEngine = function () { | ||
@@ -552,3 +563,3 @@ return new Promise(function (resolve, reject) { | ||
* @param {FlowData} flowData FlowData to process | ||
* @returns {Promise} the result of processing | ||
* @returns {Promise<void>} the result of processing | ||
**/ | ||
@@ -555,0 +566,0 @@ processInternal (flowData) { |
@@ -68,3 +68,3 @@ /* ********************************************************************* | ||
* engine. | ||
* @param {Array} options.restrictedProperties list of properties the engine | ||
* @param {Array<string>} options.restrictedProperties list of properties the engine | ||
* will be restricted to | ||
@@ -71,0 +71,0 @@ * @param {string} options.performanceProfile used to control the tradeoff |
@@ -24,3 +24,2 @@ /* ********************************************************************* | ||
module.exports = { | ||
DeviceDetectionOnPremise: require('./deviceDetectionOnPremise'), | ||
@@ -30,3 +29,2 @@ DeviceDetectionOnPremisePipelineBuilder: require('./deviceDetectionOnPremisePipelineBuilder'), | ||
swigHelpers: require('../fiftyone.devicedetection.onpremise/swigHelpers') | ||
}; |
{ | ||
"name": "fiftyone.devicedetection.onpremise", | ||
"version": "4.4.128", | ||
"version": "4.4.129", | ||
"description": "Device detection on-premise services for the 51Degrees Pipeline API", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -24,2 +24,8 @@ /* ********************************************************************* | ||
class Profile { | ||
/** | ||
* Constructor for Profile | ||
* | ||
* @param {object} metadata Metadata | ||
* @param {object} engineMetadata Engine metadata | ||
*/ | ||
constructor (metadata, engineMetadata) { | ||
@@ -30,4 +36,10 @@ this.metadata = metadata; | ||
const Component = require('./component'); | ||
/** | ||
* @type {Component} | ||
*/ | ||
this.component = new Component( | ||
engineMetadata.getComponentForProfile(metadata), engineMetadata); | ||
/** | ||
* @type {number} uint32 | ||
*/ | ||
this.profileId = metadata.getProfileId(); | ||
@@ -34,0 +46,0 @@ } |
@@ -26,2 +26,8 @@ /* ********************************************************************* | ||
class Property { | ||
/** | ||
* Constructor for Property | ||
* | ||
* @param {object} metadata Metadata | ||
* @param {object} engineMetadata Engine metadata | ||
*/ | ||
constructor ( | ||
@@ -32,14 +38,42 @@ metadata, | ||
this.engineMetadata = engineMetadata; | ||
/** | ||
* @type {string} | ||
*/ | ||
this.name = metadata.getName(); | ||
/** | ||
* @type {string} | ||
*/ | ||
this.type = metadata.getType(); | ||
/** | ||
* @type {Array<string>} | ||
*/ | ||
this.dataFiles = swigHelpers.vectorToArray(metadata.getDataFilesWherePresent()); | ||
/** | ||
* @type {string} | ||
*/ | ||
this.category = metadata.getCategory(); | ||
/** | ||
* @type {string} | ||
*/ | ||
this.description = metadata.getDescription(); | ||
const Component = require('./component'); | ||
/** | ||
* @type {Component} | ||
*/ | ||
this.component = new Component( | ||
engineMetadata.getComponentForProperty(metadata), engineMetadata); | ||
/** | ||
* @type {object} | ||
*/ | ||
this.values = engineMetadata.getValuesForProperty(metadata); | ||
} | ||
/** | ||
* Yield property values | ||
* | ||
* @generator | ||
* @yields {object} | ||
* @returns {void} | ||
*/ | ||
* getValues () { | ||
@@ -51,2 +85,7 @@ for (let i = 0; i < this.values.getSize(); i++) { | ||
/** | ||
* Get number of values in the property | ||
* | ||
* @returns {number} uint32 | ||
*/ | ||
getNumberOfValues () { | ||
@@ -53,0 +92,0 @@ return this.values.getSize(); |
@@ -46,3 +46,3 @@ /* ********************************************************************* | ||
* data is part of | ||
* @param {ResultsHashSwig} options.swigResults the results from the | ||
* @param {object} options.swigResults the results from the | ||
* swig engine | ||
@@ -63,3 +63,3 @@ */ | ||
* @param {string} key the property key to retrieve | ||
* @returns {mixed} value property value | ||
* @returns {AspectPropertyValue} value property value | ||
*/ | ||
@@ -66,0 +66,0 @@ getInternal (key) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
8521730
1268