From 32340e8d6d89c0821db49497c0228268e7a603de Mon Sep 17 00:00:00 2001 From: r-brown Date: Tue, 27 Mar 2018 20:27:22 +0000 Subject: [PATCH] Prepare for release 1.2.1 --- dist/netlicensing-client.js | 1172 +++++++++++++-------------- dist/netlicensing-client.js.map | 2 +- dist/netlicensing-client.min.js.map | 2 +- 3 files changed, 588 insertions(+), 588 deletions(-) diff --git a/dist/netlicensing-client.js b/dist/netlicensing-client.js index 743b370..e717793 100644 --- a/dist/netlicensing-client.js +++ b/dist/netlicensing-client.js @@ -4619,7 +4619,7 @@ module.exports.default = NetLicensing; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); var _Context = __webpack_require__(/*! ../vo/Context */ "./src/vo/Context.js"); @@ -4663,182 +4663,182 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de */ exports.default = { - /** - * Creates new license object with given properties.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Createlicense - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * parent licensee to which the new license is to be added - * @param licenseeNumber string - * - * license template that the license is created from - * @param licenseTemplateNumber string - * - * For privileged logins specifies transaction for the license creation. For regular logins new - * transaction always created implicitly, and the operation will be in a separate transaction. - * Transaction is generated with the provided transactionNumber, or, if transactionNumber is null, with - * auto-generated number. - * @param transactionNumber null|string - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param license NetLicensing.License - * - * return the newly created license object in promise - * @returns {Promise} - */ - create: function create(context, licenseeNumber, licenseTemplateNumber, transactionNumber, license) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Creates new license object with given properties.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Createlicense + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * parent licensee to which the new license is to be added + * @param licenseeNumber string + * + * license template that the license is created from + * @param licenseTemplateNumber string + * + * For privileged logins specifies transaction for the license creation. For regular logins new + * transaction always created implicitly, and the operation will be in a separate transaction. + * Transaction is generated with the provided transactionNumber, or, if transactionNumber is null, with + * auto-generated number. + * @param transactionNumber null|string + * + * non-null properties will be taken for the new object, null properties will either stay null, or will + * be set to a default value, depending on property. + * @param license NetLicensing.License + * + * return the newly created license object in promise + * @returns {Promise} + */ + create: function create(context, licenseeNumber, licenseTemplateNumber, transactionNumber, license) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - if (!(license instanceof _License2.default)) { - throw new TypeError('license must be an instance of License'); - } + if (!(license instanceof _License2.default)) { + throw new TypeError('license must be an instance of License'); + } - _CheckUtils2.default.paramNotEmpty(licenseeNumber, 'licenseeNumber'); - _CheckUtils2.default.paramNotEmpty(licenseTemplateNumber, 'licenseTemplateNumber'); + _CheckUtils2.default.paramNotEmpty(licenseeNumber, 'licenseeNumber'); + _CheckUtils2.default.paramNotEmpty(licenseTemplateNumber, 'licenseTemplateNumber'); - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - license.setProperty('licenseeNumber', licenseeNumber); - license.setProperty('licenseTemplateNumber', licenseTemplateNumber); + license.setProperty('licenseeNumber', licenseeNumber); + license.setProperty('licenseTemplateNumber', licenseTemplateNumber); - if (transactionNumber) license.setProperty('transactionNumber', transactionNumber); + if (transactionNumber) license.setProperty('transactionNumber', transactionNumber); - return _Service2.default.post(context, _Constants2.default.License.ENDPOINT_PATH, license.asPropertiesMap(), _License2.default); - }, + return _Service2.default.post(context, _Constants2.default.License.ENDPOINT_PATH, license.asPropertiesMap(), _License2.default); + }, - /** - * Gets license by its number.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Getlicense - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the license number - * @param number string - * - * return the license in promise - * @returns {Promise} - */ - get: function get(context, number) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Gets license by its number.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Getlicense + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the license number + * @param number string + * + * return the license in promise + * @returns {Promise} + */ + get: function get(context, number) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - _CheckUtils2.default.paramNotEmpty(number, 'number'); + _CheckUtils2.default.paramNotEmpty(number, 'number'); - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - return _Service2.default.get(context, _Constants2.default.License.ENDPOINT_PATH + '/' + number, {}, _License2.default); - }, + return _Service2.default.get(context, _Constants2.default.License.ENDPOINT_PATH + '/' + number, {}, _License2.default); + }, - /** - * Returns licenses of a vendor.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Licenseslist - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * return array of licenses (of all products) or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Returns licenses of a vendor.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Licenseslist + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter string|null + * + * return array of licenses (of all products) or empty array if nothing found in promise. + * @returns {Promise} + */ + list: function list(context, filter) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - var queryParams = {}; + var queryParams = {}; - if (filter) { - if (!_CheckUtils2.default.isValid(filter)) { - throw new TypeError('filter has bad value ' + filter); - } - queryParams.filter = typeof filter === 'string' ? filter : _FilterUtils2.default.encode(filter); - } + if (filter) { + if (!_CheckUtils2.default.isValid(filter)) { + throw new TypeError('filter has bad value ' + filter); + } + queryParams.filter = typeof filter === 'string' ? filter : _FilterUtils2.default.encode(filter); + } - return _Service2.default.list(context, _Constants2.default.License.ENDPOINT_PATH, queryParams, _License2.default); - }, + return _Service2.default.list(context, _Constants2.default.License.ENDPOINT_PATH, queryParams, _License2.default); + }, - /** - * Updates license properties.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Updatelicense - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license number - * @param number string - * - * transaction for the license update. Created implicitly if transactionNumber is null. In this case the - * operation will be in a separate transaction. - * @param transactionNumber string|null - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param license NetLicensing.License - * - * return updated license in promise. - * @returns {Promise} - */ - update: function update(context, number, transactionNumber, license) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Updates license properties.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Updatelicense + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * license number + * @param number string + * + * transaction for the license update. Created implicitly if transactionNumber is null. In this case the + * operation will be in a separate transaction. + * @param transactionNumber string|null + * + * non-null properties will be updated to the provided values, null properties will stay unchanged. + * @param license NetLicensing.License + * + * return updated license in promise. + * @returns {Promise} + */ + update: function update(context, number, transactionNumber, license) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - if (!(license instanceof _License2.default)) { - throw new TypeError('license must be an instance of License'); - } + if (!(license instanceof _License2.default)) { + throw new TypeError('license must be an instance of License'); + } - _CheckUtils2.default.paramNotEmpty(number, 'number'); + _CheckUtils2.default.paramNotEmpty(number, 'number'); - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - if (transactionNumber) license.setProperty('transactionNumber', transactionNumber); + if (transactionNumber) license.setProperty('transactionNumber', transactionNumber); - return _Service2.default.post(context, _Constants2.default.License.ENDPOINT_PATH + '/' + number, license.asPropertiesMap(), _License2.default); - }, + return _Service2.default.post(context, _Constants2.default.License.ENDPOINT_PATH + '/' + number, license.asPropertiesMap(), _License2.default); + }, - /** - * Deletes license.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Deletelicense - * - * When any license is deleted, corresponding transaction is created automatically. - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number, forceCascade) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Deletes license.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Deletelicense + * + * When any license is deleted, corresponding transaction is created automatically. + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * license number + * @param number string + * + * if true, any entities that depend on the one being deleted will be deleted too + * @param forceCascade boolean + * + * return boolean state of delete in promise + * @returns {Promise} + */ + delete: function _delete(context, number, forceCascade) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - _CheckUtils2.default.paramNotEmpty(number, 'number'); + _CheckUtils2.default.paramNotEmpty(number, 'number'); - var queryParams = { forceCascade: Boolean(forceCascade) }; + var queryParams = { forceCascade: Boolean(forceCascade) }; - return _Service2.default.delete(context, _Constants2.default.License.ENDPOINT_PATH + '/' + number, queryParams); - } + return _Service2.default.delete(context, _Constants2.default.License.ENDPOINT_PATH + '/' + number, queryParams); + } }; module.exports = exports['default']; @@ -4855,7 +4855,7 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); var _Context = __webpack_require__(/*! ../vo/Context */ "./src/vo/Context.js"); @@ -4899,163 +4899,163 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de */ exports.default = { - /** - * Creates new license template object with given properties.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Createlicensetemplate - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * parent product module to which the new license template is to be added - * @param productModuleNumber - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param licenseTemplate NetLicensing.LicenseTemplate - * - * the newly created license template object in promise - * @returns {Promise} - */ - create: function create(context, productModuleNumber, licenseTemplate) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Creates new license template object with given properties.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Createlicensetemplate + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * parent product module to which the new license template is to be added + * @param productModuleNumber + * + * non-null properties will be taken for the new object, null properties will either stay null, or will + * be set to a default value, depending on property. + * @param licenseTemplate NetLicensing.LicenseTemplate + * + * the newly created license template object in promise + * @returns {Promise} + */ + create: function create(context, productModuleNumber, licenseTemplate) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - if (!(licenseTemplate instanceof _LicenseTemplate2.default)) { - throw new TypeError('licenseTemplate must be an instance of LicenseTemplate'); - } + if (!(licenseTemplate instanceof _LicenseTemplate2.default)) { + throw new TypeError('licenseTemplate must be an instance of LicenseTemplate'); + } - _CheckUtils2.default.paramNotEmpty(productModuleNumber, 'productModuleNumber'); + _CheckUtils2.default.paramNotEmpty(productModuleNumber, 'productModuleNumber'); - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - licenseTemplate.setProperty('productModuleNumber', productModuleNumber); + licenseTemplate.setProperty('productModuleNumber', productModuleNumber); - return _Service2.default.post(context, _Constants2.default.LicenseTemplate.ENDPOINT_PATH, licenseTemplate.asPropertiesMap(), _LicenseTemplate2.default); - }, + return _Service2.default.post(context, _Constants2.default.LicenseTemplate.ENDPOINT_PATH, licenseTemplate.asPropertiesMap(), _LicenseTemplate2.default); + }, - /** - * Gets license template by its number.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Getlicensetemplate - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the license template number - * @param number string - * - * return the license template object in promise - * @returns {Promise} - */ - get: function get(context, number) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Gets license template by its number.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Getlicensetemplate + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the license template number + * @param number string + * + * return the license template object in promise + * @returns {Promise} + */ + get: function get(context, number) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - _CheckUtils2.default.paramNotEmpty(number, 'number'); + _CheckUtils2.default.paramNotEmpty(number, 'number'); - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - return _Service2.default.get(context, _Constants2.default.LicenseTemplate.ENDPOINT_PATH + '/' + number, {}, _LicenseTemplate2.default); - }, + return _Service2.default.get(context, _Constants2.default.LicenseTemplate.ENDPOINT_PATH + '/' + number, {}, _LicenseTemplate2.default); + }, - /** - * Returns all license templates of a vendor.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Licensetemplateslist - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of license templates (of all products/modules) or null/empty list if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Returns all license templates of a vendor.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Licensetemplateslist + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter string|null + * + * array of license templates (of all products/modules) or null/empty list if nothing found in promise. + * @returns {Promise} + */ + list: function list(context, filter) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - var queryParams = {}; + var queryParams = {}; - if (filter) { - if (!_CheckUtils2.default.isValid(filter)) { - throw new TypeError('filter has bad value ' + filter); - } - queryParams.filter = typeof filter === 'string' ? filter : _FilterUtils2.default.encode(filter); - } + if (filter) { + if (!_CheckUtils2.default.isValid(filter)) { + throw new TypeError('filter has bad value ' + filter); + } + queryParams.filter = typeof filter === 'string' ? filter : _FilterUtils2.default.encode(filter); + } - return _Service2.default.list(context, _Constants2.default.LicenseTemplate.ENDPOINT_PATH, queryParams, _LicenseTemplate2.default); - }, + return _Service2.default.list(context, _Constants2.default.LicenseTemplate.ENDPOINT_PATH, queryParams, _LicenseTemplate2.default); + }, - /** - * Updates license template properties.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Updatelicensetemplate - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license template number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param licenseTemplate NetLicensing.LicenseTemplate - * - * updated license template in promise. - * @returns {Promise} - */ - update: function update(context, number, licenseTemplate) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Updates license template properties.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Updatelicensetemplate + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * license template number + * @param number string + * + * non-null properties will be updated to the provided values, null properties will stay unchanged. + * @param licenseTemplate NetLicensing.LicenseTemplate + * + * updated license template in promise. + * @returns {Promise} + */ + update: function update(context, number, licenseTemplate) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - if (!(licenseTemplate instanceof _LicenseTemplate2.default)) { - throw new TypeError('licenseTemplate must be an instance of LicenseTemplate'); - } + if (!(licenseTemplate instanceof _LicenseTemplate2.default)) { + throw new TypeError('licenseTemplate must be an instance of LicenseTemplate'); + } - _CheckUtils2.default.paramNotEmpty(number, 'number'); + _CheckUtils2.default.paramNotEmpty(number, 'number'); - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - var path = _Constants2.default.LicenseTemplate.ENDPOINT_PATH + '/' + number; + var path = _Constants2.default.LicenseTemplate.ENDPOINT_PATH + '/' + number; - return _Service2.default.post(context, path, licenseTemplate.asPropertiesMap(), _LicenseTemplate2.default); - }, + return _Service2.default.post(context, path, licenseTemplate.asPropertiesMap(), _LicenseTemplate2.default); + }, - /** - * Deletes license template.See NetLicensingAPI JavaDoc for details: - * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Deletelicensetemplate - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * license template number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number, forceCascade) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Deletes license template.See NetLicensingAPI JavaDoc for details: + * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Deletelicensetemplate + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * license template number + * @param number string + * + * if true, any entities that depend on the one being deleted will be deleted too + * @param forceCascade boolean + * + * return boolean state of delete in promise + * @returns {Promise} + */ + delete: function _delete(context, number, forceCascade) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - _CheckUtils2.default.paramNotEmpty(number, 'number'); + _CheckUtils2.default.paramNotEmpty(number, 'number'); - var queryParams = { forceCascade: Boolean(forceCascade) }; + var queryParams = { forceCascade: Boolean(forceCascade) }; - return _Service2.default.delete(context, _Constants2.default.LicenseTemplate.ENDPOINT_PATH + '/' + number, queryParams); - } + return _Service2.default.delete(context, _Constants2.default.LicenseTemplate.ENDPOINT_PATH + '/' + number, queryParams); + } }; module.exports = exports['default']; @@ -5400,7 +5400,7 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); var _Context = __webpack_require__(/*! ../vo/Context */ "./src/vo/Context.js"); @@ -5437,98 +5437,98 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de */ exports.default = { - /** - * Gets payment method by its number.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Getpaymentmethod - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the payment method number - * @param number string - * - * return the payment method in promise - * @returns {Promise} - */ - get: function get(context, number) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Gets payment method by its number.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Getpaymentmethod + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the payment method number + * @param number string + * + * return the payment method in promise + * @returns {Promise} + */ + get: function get(context, number) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - _CheckUtils2.default.paramNotEmpty(number, 'number'); + _CheckUtils2.default.paramNotEmpty(number, 'number'); - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - return _Service2.default.get(context, _Constants2.default.PaymentMethod.ENDPOINT_PATH + '/' + number, {}, _PaymentMethod2.default); - }, + return _Service2.default.get(context, _Constants2.default.PaymentMethod.ENDPOINT_PATH + '/' + number, {}, _PaymentMethod2.default); + }, - /** - * Returns payment methods of a vendor.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Paymentmethodslist - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of payment method entities or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Returns payment methods of a vendor.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Paymentmethodslist + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter string|null + * + * array of payment method entities or empty array if nothing found in promise. + * @returns {Promise} + */ + list: function list(context, filter) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - var queryParams = {}; + var queryParams = {}; - if (filter) { - if (!_CheckUtils2.default.isValid(filter)) { - throw new TypeError('filter has bad value ' + filter); - } - queryParams.filter = typeof filter === 'string' ? filter : _FilterUtils2.default.encode(filter); - } + if (filter) { + if (!_CheckUtils2.default.isValid(filter)) { + throw new TypeError('filter has bad value ' + filter); + } + queryParams.filter = typeof filter === 'string' ? filter : _FilterUtils2.default.encode(filter); + } - return _Service2.default.list(context, _Constants2.default.PaymentMethod.ENDPOINT_PATH, queryParams, _PaymentMethod2.default); - }, + return _Service2.default.list(context, _Constants2.default.PaymentMethod.ENDPOINT_PATH, queryParams, _PaymentMethod2.default); + }, - /** - * Updates payment method properties.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Updatepaymentmethod - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the payment method number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param paymentMethod NetLicensing.PaymentMethod - * - * return updated payment method in promise. - * @returns {Promise} - */ - update: function update(context, number, paymentMethod) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Updates payment method properties.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Updatepaymentmethod + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the payment method number + * @param number string + * + * non-null properties will be updated to the provided values, null properties will stay unchanged. + * @param paymentMethod NetLicensing.PaymentMethod + * + * return updated payment method in promise. + * @returns {Promise} + */ + update: function update(context, number, paymentMethod) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - if (!(paymentMethod instanceof _PaymentMethod2.default)) { - throw new TypeError('paymentMethod must be an instance of PaymentMethod'); - } + if (!(paymentMethod instanceof _PaymentMethod2.default)) { + throw new TypeError('paymentMethod must be an instance of PaymentMethod'); + } - _CheckUtils2.default.paramNotEmpty(number, 'number'); + _CheckUtils2.default.paramNotEmpty(number, 'number'); - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - var path = _Constants2.default.PaymentMethod.ENDPOINT_PATH + '/' + number; + var path = _Constants2.default.PaymentMethod.ENDPOINT_PATH + '/' + number; - return _Service2.default.post(context, path, paymentMethod.asPropertiesMap(), _PaymentMethod2.default); - } + return _Service2.default.post(context, path, paymentMethod.asPropertiesMap(), _PaymentMethod2.default); + } }; module.exports = exports['default']; @@ -5545,7 +5545,7 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); var _Context = __webpack_require__(/*! ../vo/Context */ "./src/vo/Context.js"); @@ -5589,163 +5589,163 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de */ exports.default = { - /** - * Creates new product module object with given properties.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Createproductmodule - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * parent product to which the new product module is to be added - * @param productNumber string - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param productModule NetLicensing.ProductModule - * - * the newly created product module object in promise - * @returns {Promise} - */ - create: function create(context, productNumber, productModule) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Creates new product module object with given properties.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Createproductmodule + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * parent product to which the new product module is to be added + * @param productNumber string + * + * non-null properties will be taken for the new object, null properties will either stay null, or will + * be set to a default value, depending on property. + * @param productModule NetLicensing.ProductModule + * + * the newly created product module object in promise + * @returns {Promise} + */ + create: function create(context, productNumber, productModule) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - if (!(productModule instanceof _ProductModule2.default)) { - throw new TypeError('product must be an instance of ProductModule'); - } + if (!(productModule instanceof _ProductModule2.default)) { + throw new TypeError('product must be an instance of ProductModule'); + } - _CheckUtils2.default.paramNotEmpty(productNumber, 'productNumber'); + _CheckUtils2.default.paramNotEmpty(productNumber, 'productNumber'); - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - productModule.setProperty('productNumber', productNumber); + productModule.setProperty('productNumber', productNumber); - return _Service2.default.post(context, _Constants2.default.ProductModule.ENDPOINT_PATH, productModule.asPropertiesMap(), _ProductModule2.default); - }, + return _Service2.default.post(context, _Constants2.default.ProductModule.ENDPOINT_PATH, productModule.asPropertiesMap(), _ProductModule2.default); + }, - /** - * Gets product module by its number.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Getproductmodule - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the product module number - * @param number string - * - * return the product module object in promise - * @returns {Promise} - */ - get: function get(context, number) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Gets product module by its number.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Getproductmodule + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the product module number + * @param number string + * + * return the product module object in promise + * @returns {Promise} + */ + get: function get(context, number) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - _CheckUtils2.default.paramNotEmpty(number, 'number'); + _CheckUtils2.default.paramNotEmpty(number, 'number'); - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - return _Service2.default.get(context, _Constants2.default.ProductModule.ENDPOINT_PATH + '/' + number, {}, _ProductModule2.default); - }, + return _Service2.default.get(context, _Constants2.default.ProductModule.ENDPOINT_PATH + '/' + number, {}, _ProductModule2.default); + }, - /** - * Returns products of a vendor.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Productslist - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string|null - * - * array of product modules entities or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Returns products of a vendor.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Productslist + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter string|null + * + * array of product modules entities or empty array if nothing found in promise. + * @returns {Promise} + */ + list: function list(context, filter) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - var queryParams = {}; + var queryParams = {}; - if (filter) { - if (!_CheckUtils2.default.isValid(filter)) { - throw new TypeError('filter has bad value ' + filter); - } - queryParams.filter = typeof filter === 'string' ? filter : _FilterUtils2.default.encode(filter); - } + if (filter) { + if (!_CheckUtils2.default.isValid(filter)) { + throw new TypeError('filter has bad value ' + filter); + } + queryParams.filter = typeof filter === 'string' ? filter : _FilterUtils2.default.encode(filter); + } - return _Service2.default.list(context, _Constants2.default.ProductModule.ENDPOINT_PATH, queryParams, _ProductModule2.default); - }, + return _Service2.default.list(context, _Constants2.default.ProductModule.ENDPOINT_PATH, queryParams, _ProductModule2.default); + }, - /** - * Updates product module properties.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Updateproductmodule - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * product module number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param productModule NetLicensing.ProductModule - * - * updated product module in promise. - * @returns {Promise} - */ - update: function update(context, number, productModule) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Updates product module properties.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Updateproductmodule + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * product module number + * @param number string + * + * non-null properties will be updated to the provided values, null properties will stay unchanged. + * @param productModule NetLicensing.ProductModule + * + * updated product module in promise. + * @returns {Promise} + */ + update: function update(context, number, productModule) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - if (!(productModule instanceof _ProductModule2.default)) { - throw new TypeError('product must be an instance of ProductModule'); - } + if (!(productModule instanceof _ProductModule2.default)) { + throw new TypeError('product must be an instance of ProductModule'); + } - _CheckUtils2.default.paramNotEmpty(number, 'number'); + _CheckUtils2.default.paramNotEmpty(number, 'number'); - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - var path = _Constants2.default.ProductModule.ENDPOINT_PATH + '/' + number; + var path = _Constants2.default.ProductModule.ENDPOINT_PATH + '/' + number; - return _Service2.default.post(context, path, productModule.asPropertiesMap(), _ProductModule2.default); - }, + return _Service2.default.post(context, path, productModule.asPropertiesMap(), _ProductModule2.default); + }, - /** - * Deletes product module.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Deleteproductmodule - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * product module number - * @param number string - * - * if true, any entities that depend on the one being deleted will be deleted too - * @param forceCascade boolean - * - * return boolean state of delete in promise - * @returns {Promise} - */ - delete: function _delete(context, number, forceCascade) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Deletes product module.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Deleteproductmodule + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * product module number + * @param number string + * + * if true, any entities that depend on the one being deleted will be deleted too + * @param forceCascade boolean + * + * return boolean state of delete in promise + * @returns {Promise} + */ + delete: function _delete(context, number, forceCascade) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - _CheckUtils2.default.paramNotEmpty(number, 'number'); + _CheckUtils2.default.paramNotEmpty(number, 'number'); - var queryParams = { forceCascade: Boolean(forceCascade) }; + var queryParams = { forceCascade: Boolean(forceCascade) }; - return _Service2.default.delete(context, _Constants2.default.ProductModule.ENDPOINT_PATH + '/' + number, queryParams); - } + return _Service2.default.delete(context, _Constants2.default.ProductModule.ENDPOINT_PATH + '/' + number, queryParams); + } }; module.exports = exports['default']; @@ -6496,7 +6496,7 @@ module.exports = exports['default']; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); var _Context = __webpack_require__(/*! ../vo/Context */ "./src/vo/Context.js"); @@ -6548,127 +6548,127 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de */ exports.default = { - /** - * Creates new transaction object with given properties.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Createtransaction - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * non-null properties will be taken for the new object, null properties will either stay null, or will - * be set to a default value, depending on property. - * @param transaction NetLicensing.Transaction - * - * return the newly created transaction object in promise - * @returns {Promise} - */ - create: function create(context, transaction) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Creates new transaction object with given properties.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Createtransaction + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * non-null properties will be taken for the new object, null properties will either stay null, or will + * be set to a default value, depending on property. + * @param transaction NetLicensing.Transaction + * + * return the newly created transaction object in promise + * @returns {Promise} + */ + create: function create(context, transaction) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - if (!(transaction instanceof _Transaction2.default)) { - throw new TypeError('transaction must be an instance of Transaction'); - } + if (!(transaction instanceof _Transaction2.default)) { + throw new TypeError('transaction must be an instance of Transaction'); + } - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - return _Service2.default.post(context, _Constants2.default.Transaction.ENDPOINT_PATH, transaction.asPropertiesMap(), _Transaction2.default); - }, + return _Service2.default.post(context, _Constants2.default.Transaction.ENDPOINT_PATH, transaction.asPropertiesMap(), _Transaction2.default); + }, - /** - * Gets transaction by its number.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Gettransaction - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * the transaction number - * @param number string - * - * return the transaction in promise - * @returns {Promise} - */ - get: function get(context, number) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Gets transaction by its number.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Gettransaction + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * the transaction number + * @param number string + * + * return the transaction in promise + * @returns {Promise} + */ + get: function get(context, number) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - _CheckUtils2.default.paramNotEmpty(number, 'number'); + _CheckUtils2.default.paramNotEmpty(number, 'number'); - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - return _Service2.default.get(context, _Constants2.default.Transaction.ENDPOINT_PATH + '/' + number, {}, _Transaction2.default); - }, + return _Service2.default.get(context, _Constants2.default.Transaction.ENDPOINT_PATH + '/' + number, {}, _Transaction2.default); + }, - /** - * Returns all transactions of a vendor.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Transactionslist - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * reserved for the future use, must be omitted / set to NULL - * @param filter string - * - * array of transaction entities or empty array if nothing found in promise. - * @returns {Promise} - */ - list: function list(context, filter) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of Context'); - } + /** + * Returns all transactions of a vendor.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Transactionslist + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * reserved for the future use, must be omitted / set to NULL + * @param filter string + * + * array of transaction entities or empty array if nothing found in promise. + * @returns {Promise} + */ + list: function list(context, filter) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of Context'); + } - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - var queryParams = {}; + var queryParams = {}; - if (filter) { - if (!_CheckUtils2.default.isValid(filter)) { - throw new TypeError('filter has bad value ' + filter); - } - queryParams.filter = typeof filter === 'string' ? filter : _FilterUtils2.default.encode(filter); - } + if (filter) { + if (!_CheckUtils2.default.isValid(filter)) { + throw new TypeError('filter has bad value ' + filter); + } + queryParams.filter = typeof filter === 'string' ? filter : _FilterUtils2.default.encode(filter); + } - return _Service2.default.list(context, _Constants2.default.Transaction.ENDPOINT_PATH, queryParams, _Transaction2.default); - }, + return _Service2.default.list(context, _Constants2.default.Transaction.ENDPOINT_PATH, queryParams, _Transaction2.default); + }, - /** - * Updates transaction properties.See NetLicensingAPI for details: - * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Updatetransaction - * - * determines the vendor on whose behalf the call is performed - * @param context NetLicensing.Context - * - * transaction number - * @param number string - * - * non-null properties will be updated to the provided values, null properties will stay unchanged. - * @param transaction NetLicensing.Transaction - * - * return updated transaction in promise. - * @returns {Promise} - */ - update: function update(context, number, transaction) { - if (!(context instanceof _Context2.default)) { - throw new TypeError('context must be an instance of NetLicensing.Context'); - } + /** + * Updates transaction properties.See NetLicensingAPI for details: + * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Updatetransaction + * + * determines the vendor on whose behalf the call is performed + * @param context NetLicensing.Context + * + * transaction number + * @param number string + * + * non-null properties will be updated to the provided values, null properties will stay unchanged. + * @param transaction NetLicensing.Transaction + * + * return updated transaction in promise. + * @returns {Promise} + */ + update: function update(context, number, transaction) { + if (!(context instanceof _Context2.default)) { + throw new TypeError('context must be an instance of NetLicensing.Context'); + } - if (!(transaction instanceof _Transaction2.default)) { - throw new TypeError('transaction must be an instance of NetLicensing.Transaction'); - } + if (!(transaction instanceof _Transaction2.default)) { + throw new TypeError('transaction must be an instance of NetLicensing.Transaction'); + } - _CheckUtils2.default.paramNotEmpty(number, 'number'); + _CheckUtils2.default.paramNotEmpty(number, 'number'); - context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); + context.setSecurityMode(_Constants2.default.BASIC_AUTHENTICATION); - var path = _Constants2.default.Transaction.ENDPOINT_PATH + '/' + number; + var path = _Constants2.default.Transaction.ENDPOINT_PATH + '/' + number; - return _Service2.default.post(context, path, transaction.asPropertiesMap(), _Transaction2.default); - } + return _Service2.default.post(context, path, transaction.asPropertiesMap(), _Transaction2.default); + } }; module.exports = exports['default']; diff --git a/dist/netlicensing-client.js.map b/dist/netlicensing-client.js.map index 5a78415..6968cce 100644 --- a/dist/netlicensing-client.js.map +++ b/dist/netlicensing-client.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://NetLicensing/webpack/universalModuleDefinition","webpack://NetLicensing/webpack/bootstrap","webpack://NetLicensing/./node_modules/axios/index.js","webpack://NetLicensing/./node_modules/axios/lib/adapters/xhr.js","webpack://NetLicensing/./node_modules/axios/lib/axios.js","webpack://NetLicensing/./node_modules/axios/lib/cancel/Cancel.js","webpack://NetLicensing/./node_modules/axios/lib/cancel/CancelToken.js","webpack://NetLicensing/./node_modules/axios/lib/cancel/isCancel.js","webpack://NetLicensing/./node_modules/axios/lib/core/Axios.js","webpack://NetLicensing/./node_modules/axios/lib/core/InterceptorManager.js","webpack://NetLicensing/./node_modules/axios/lib/core/createError.js","webpack://NetLicensing/./node_modules/axios/lib/core/dispatchRequest.js","webpack://NetLicensing/./node_modules/axios/lib/core/enhanceError.js","webpack://NetLicensing/./node_modules/axios/lib/core/settle.js","webpack://NetLicensing/./node_modules/axios/lib/core/transformData.js","webpack://NetLicensing/./node_modules/axios/lib/defaults.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/bind.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/btoa.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/buildURL.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/combineURLs.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/cookies.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/normalizeHeaderName.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/parseHeaders.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/spread.js","webpack://NetLicensing/./node_modules/axios/lib/utils.js","webpack://NetLicensing/./node_modules/is-buffer/index.js","webpack://NetLicensing/./node_modules/process/browser.js","webpack://NetLicensing/./src/Constants.js","webpack://NetLicensing/./src/entities/BaseEntity.js","webpack://NetLicensing/./src/entities/Country.js","webpack://NetLicensing/./src/entities/License.js","webpack://NetLicensing/./src/entities/LicenseTemplate.js","webpack://NetLicensing/./src/entities/LicenseTransactionJoin.js","webpack://NetLicensing/./src/entities/Licensee.js","webpack://NetLicensing/./src/entities/PaymentMethod.js","webpack://NetLicensing/./src/entities/Product.js","webpack://NetLicensing/./src/entities/ProductDiscount.js","webpack://NetLicensing/./src/entities/ProductModule.js","webpack://NetLicensing/./src/entities/Token.js","webpack://NetLicensing/./src/entities/Transaction.js","webpack://NetLicensing/./src/netlicensing-client.js","webpack://NetLicensing/./src/services/LicenseService.js","webpack://NetLicensing/./src/services/LicenseTemplateService.js","webpack://NetLicensing/./src/services/LicenseeService.js","webpack://NetLicensing/./src/services/PaymentMethodService.js","webpack://NetLicensing/./src/services/ProductModuleService.js","webpack://NetLicensing/./src/services/ProductService.js","webpack://NetLicensing/./src/services/Service.js","webpack://NetLicensing/./src/services/TokenService.js","webpack://NetLicensing/./src/services/TransactionService.js","webpack://NetLicensing/./src/services/UtilityService.js","webpack://NetLicensing/./src/util/CastsUtils.js","webpack://NetLicensing/./src/util/CheckUtils.js","webpack://NetLicensing/./src/util/FilterUtils.js","webpack://NetLicensing/./src/vo/Context.js","webpack://NetLicensing/./src/vo/ValidationParameters.js","webpack://NetLicensing/./src/vo/ValidationResults.js"],"names":["BASIC_AUTHENTICATION","APIKEY_IDENTIFICATION","LicensingModel","VALID","TryAndBuy","NAME","Rental","RED_THRESHOLD","YELLOW_THRESHOLD","Subscription","Floating","MultiFeature","PayPerUse","PricingTable","Quota","LicenseTemplate","ENDPOINT_PATH","LicenseType","FEATURE","TIMEVOLUME","FLOATING","QUANTITY","Product","LicenseeSecretMode","DISABLED","PREDEFINED","CLIENT","Token","Type","DEFAULT","SHOP","APIKEY","Transaction","Status","CANCELLED","CLOSED","PENDING","Licensee","ENDPOINT_PATH_VALIDATE","ENDPOINT_PATH_TRANSFER","License","PaymentMethod","ProductModule","Utility","propertiesMap","WeakMap","definedMap","castsMap","readOnlyMap","BaseEntity","properties","casts","readOnly","set","setProperties","property","value","hasProperty","isPropertyReadOnly","TypeError","isValid","castedValue","cast","define","get","setProperty","removeProperties","has","Object","prototype","hasOwnProperty","keys","forEach","key","call","def","assign","removeDefine","propertiesForRemove","removeProperty","indexOf","Boolean","hasDefine","self","descriptors","enumerable","configurable","getProperty","defined","defineProperty","onlyGetter","getProperties","customProperties","Country","code","name","vatPercent","isEu","defines","vat","number","active","price","hidden","parentfeature","timeVolume","startDate","inUse","licenseType","currency","automatic","hideLicenses","maxSessions","quantity","LicenseTransactionJoin","transaction","license","licenseeSecret","markedForTransfer","paypalSubject","discountsMap","discountsTouched","version","description","licensingInfo","licenseeAutoCreate","licenseeSecretMode","discount","discounts","push","Array","isArray","addDiscount","length","map","toString","ProductDiscount","totalPrice","amountFix","amountPercent","getTotalPrice","getCurrency","amount","getAmountFix","getAmountPercent","licensingModel","maxCheckoutValidity","yellowThreshold","redThreshold","licenseTemplate","expirationTime","vendorNumber","tokenType","licenseeNumber","successURL","successURLTitle","cancelURL","cancelURLTitle","shopURL","status","source","grandTotal","dateCreated","dateClosed","paymentMethod","licenseTransactionJoins","licenseTransactionJoin","setLicense","setTransaction","NetLicensing","Constants","Context","ValidationParameters","ValidationResults","Service","LicenseeService","LicenseService","LicenseTemplateService","PaymentMethodService","ProductModuleService","ProductService","TokenService","TransactionService","UtilityService","CastsUtils","CheckUtils","FilterUtils","module","exports","default","create","context","licenseTemplateNumber","transactionNumber","paramNotEmpty","setSecurityMode","post","asPropertiesMap","list","filter","queryParams","encode","update","delete","forceCascade","productModuleNumber","path","productNumber","licensee","validate","validationParameters","getProductNumber","getLicenseeName","licenseeName","getLicenseeSecret","pmIndex","parameters","getParameters","productModuleName","parameter","then","item","data","validationResults","JSON","parse","e","setProductModuleValidation","setTtl","getLastHttpRequestInfo","ttl","transfer","sourceLicenseeNumber","productModule","product","httpXHR","urlTemplate","resultType","request","response","getEntity","items","method","template","String","params","toLowerCase","Error","getBaseUrl","isValidUrl","restUrl","replace","url","responseType","headers","transformRequest","toQueryString","getSecurityMode","getUsername","getPassword","auth","username","password","getApiKey","Authorization","btoa","catch","error","info","infos","id","Promise","resolve","reasonPhrase","reject","lists","entity","setListMethod","charAt","toUpperCase","substr","setListsMethod","console","warn","type","pattern","RegExp","test","prefix","query","k","v","Date","toISOString","encodeURIComponent","join","token","listLicenseTypes","listLicensingModels","listCountries","trim","parseInt","parseFloat","valid","undefined","Number","isFinite","isNaN","paramNotNull","parameterName","FILTER_DELIMITER","FILTER_PAIR_DELIMITER","decode","split","valuesMap","defaultsMap","values","baseUrl","securityMode","setValues","setValue","getValue","apiKey","copedValue","removeValues","keysAr","removeValue","vpMap","productModuleParameters","vr","validators","productModuleValidation","getValidators","stringify"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;ACnEA,6F;;;;;;;;;;;;ACAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;ACnLA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;;;;;;;ACnDA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;;AClBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;ACxDA;;AAEA;AACA;AACA;;;;;;;;;;;;;ACJA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,kCAAkC,cAAc;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAED;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAED;;;;;;;;;;;;;AC9EA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;;;;;;ACnDA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjBA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B;AAC/B,uCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;;;;;;;;;;;;ACrFA;;AAEA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpBA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzBA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,MAAM;AACjB,WAAW,eAAe;AAC1B,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;;;;;;+CCnBA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,OAAO,YAAY;AACnB;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;;;;;;;;;;;;;;AC/FA;;AAEA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACVA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;ACnCA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACjEA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wCAAwC;AACxC,OAAO;;AAEP;AACA,0DAA0D,wBAAwB;AAClF;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,gCAAgC;AAChC,6BAA6B,aAAa,EAAE;AAC5C;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;ACpDA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;ACnEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;ACXA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,eAAe;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;;;;;;ACpDA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1BA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,2BAA2B;AAC3B;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9SA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACpBA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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,SAAL,CAAeH,WAAW7H,mBAAX,CAAf,CAAR;AACH;AACJ,aALD;;AAOAiB,oBAAQ,GAAR;;AAEA,mBAAOA,IAAP;AACH;;;;;;kBAxDgBjD,iB","file":"netlicensing-client.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"NetLicensing\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"NetLicensing\"] = factory();\n\telse\n\t\troot[\"NetLicensing\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/netlicensing-client.js\");\n","module.exports = require('./lib/axios');","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || require('./../helpers/btoa');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n var loadEvent = 'onreadystatechange';\n var xDomain = false;\n\n // For IE 8/9 CORS support\n // Only supports POST and GET calls and doesn't returns the response headers.\n // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n if (process.env.NODE_ENV !== 'test' &&\n typeof window !== 'undefined' &&\n window.XDomainRequest && !('withCredentials' in request) &&\n !isURLSameOrigin(config.url)) {\n request = new window.XDomainRequest();\n loadEvent = 'onload';\n xDomain = true;\n request.onprogress = function handleProgress() {};\n request.ontimeout = function handleTimeout() {};\n }\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request[loadEvent] = function handleLoad() {\n if (!request || (request.readyState !== 4 && !xDomain)) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201)\n status: request.status === 1223 ? 204 : request.status,\n statusText: request.status === 1223 ? 'No Content' : request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar defaults = require('./../defaults');\nvar utils = require('./../utils');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, {method: 'get'}, this.defaults, config);\n config.method = config.method.toLowerCase();\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n this.message = 'String contains an invalid character';\n}\nE.prototype = new Error;\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n var str = String(input);\n var output = '';\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars;\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new E();\n }\n block = block << 8 | charCode;\n }\n return output;\n}\n\nmodule.exports = btoa;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\nvar isBuffer = require('is-buffer');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nexport default {\r\n BASIC_AUTHENTICATION: 'BASIC_AUTH',\r\n APIKEY_IDENTIFICATION: 'APIKEY',\r\n\r\n LicensingModel: {\r\n VALID: 'valid',\r\n TryAndBuy: {\r\n NAME: 'TryAndBuy',\r\n },\r\n Rental: {\r\n NAME: 'Rental',\r\n RED_THRESHOLD: 'redThreshold',\r\n YELLOW_THRESHOLD: 'yellowThreshold',\r\n },\r\n Subscription: {\r\n NAME: 'Subscription',\r\n },\r\n Floating: {\r\n NAME: 'Floating',\r\n },\r\n MultiFeature: {\r\n NAME: 'MultiFeature',\r\n },\r\n PayPerUse: {\r\n NAME: 'PayPerUse',\r\n },\r\n PricingTable: {\r\n NAME: 'PricingTable',\r\n },\r\n Quota: {\r\n NAME: 'Quota',\r\n },\r\n },\r\n\r\n LicenseTemplate: {\r\n ENDPOINT_PATH: 'licensetemplate',\r\n LicenseType: {\r\n FEATURE: 'FEATURE',\r\n TIMEVOLUME: 'TIMEVOLUME',\r\n FLOATING: 'FLOATING',\r\n QUANTITY: 'QUANTITY',\r\n },\r\n },\r\n\r\n Product: {\r\n ENDPOINT_PATH: 'product',\r\n LicenseeSecretMode: {\r\n DISABLED: 'DISABLED',\r\n PREDEFINED: 'PREDEFINED',\r\n CLIENT: 'CLIENT',\r\n },\r\n },\r\n\r\n Token: {\r\n ENDPOINT_PATH: 'token',\r\n Type: {\r\n DEFAULT: 'DEFAULT',\r\n SHOP: 'SHOP',\r\n APIKEY: 'APIKEY',\r\n },\r\n },\r\n\r\n Transaction: {\r\n ENDPOINT_PATH: 'transaction',\r\n Status: {\r\n CANCELLED: 'CANCELLED',\r\n CLOSED: 'CLOSED',\r\n PENDING: 'PENDING',\r\n },\r\n },\r\n\r\n Licensee: {\r\n ENDPOINT_PATH: 'licensee',\r\n ENDPOINT_PATH_VALIDATE: 'validate',\r\n ENDPOINT_PATH_TRANSFER: 'transfer',\r\n },\r\n\r\n License: {\r\n ENDPOINT_PATH: 'license',\r\n },\r\n\r\n PaymentMethod: {\r\n ENDPOINT_PATH: 'paymentmethod',\r\n },\r\n\r\n ProductModule: {\r\n ENDPOINT_PATH: 'productmodule',\r\n },\r\n\r\n Utility: {\r\n ENDPOINT_PATH: 'utility',\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport CastsUtils from '../util/CastsUtils';\r\n\r\n/**\r\n * The entity properties.\r\n * @type {{}}\r\n * @private\r\n */\r\nconst propertiesMap = new WeakMap();\r\n\r\n/**\r\n * List of properties that was defined\r\n * @type {{}}\r\n * @private\r\n */\r\n\r\nconst definedMap = new WeakMap();\r\n\r\n/**\r\n * List of properties that need be casts\r\n * @type {{}}\r\n * @private\r\n */\r\nconst castsMap = new WeakMap();\r\n\r\n/**\r\n * List of properties that has read-only access\r\n * @type {{}}\r\n * @private\r\n */\r\nconst readOnlyMap = new WeakMap();\r\n\r\nexport default class BaseEntity {\r\n constructor({ properties, casts, readOnly }) {\r\n propertiesMap.set(this, {});\r\n definedMap.set(this, {});\r\n castsMap.set(this, casts || []);\r\n readOnlyMap.set(this, readOnly || []);\r\n\r\n if (properties) {\r\n this.setProperties(properties);\r\n }\r\n }\r\n\r\n /**\r\n * Set a given property on the entity.\r\n * @param property\r\n * @param value\r\n * @returns {BaseEntity}\r\n */\r\n setProperty(property, value) {\r\n // if property has read-only access and was initialized at least once\r\n if (this.hasProperty(property) && this.isPropertyReadOnly(property)) {\r\n throw new TypeError(`Property ${property} has read-only access`);\r\n }\r\n\r\n // if property name has bad native type\r\n if (!CheckUtils.isValid(property) || typeof property === 'object') {\r\n throw new TypeError(`Bad property name:${property}`);\r\n }\r\n\r\n // if property value has bad native type\r\n if (!CheckUtils.isValid(value)) {\r\n throw new TypeError(`Property ${property} has bad value ${value}`);\r\n }\r\n\r\n const castedValue = this.cast(property, value);\r\n\r\n // check if property value after cast has bad native type\r\n if (!CheckUtils.isValid(value)) {\r\n throw new TypeError(`Property ${property} has bad cast value ${castedValue}`);\r\n }\r\n\r\n // define to property\r\n this.define(property);\r\n\r\n // save property to propertiesMap\r\n const properties = propertiesMap.get(this);\r\n properties[property] = castedValue;\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Alias for setProperty\r\n * @param property\r\n * @param value\r\n * @returns {BaseEntity}\r\n */\r\n addProperty(property, value) {\r\n return this.setProperty(property, value);\r\n }\r\n\r\n /**\r\n * Set the entity properties.\r\n * @param properties\r\n * @returns {BaseEntity}\r\n */\r\n setProperties(properties) {\r\n this.removeProperties();\r\n\r\n const has = Object.prototype.hasOwnProperty;\r\n\r\n Object.keys(properties).forEach((key) => {\r\n if (has.call(properties, key)) {\r\n this.setProperty(key, properties[key]);\r\n }\r\n });\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Check if we has property\r\n * @param property\r\n * @protected\r\n */\r\n hasProperty(property) {\r\n return Object.prototype.hasOwnProperty.call(propertiesMap.get(this), property);\r\n }\r\n\r\n /**\r\n * Get an property from the entity.\r\n * @param property\r\n * @param def\r\n * @returns {*}\r\n */\r\n getProperty(property, def) {\r\n return Object.prototype.hasOwnProperty.call(propertiesMap.get(this), property)\r\n ? propertiesMap.get(this)[property]\r\n : def;\r\n }\r\n\r\n /**\r\n * Get all of the current properties on the entity.\r\n */\r\n getProperties() {\r\n return Object.assign({}, propertiesMap.get(this));\r\n }\r\n\r\n /**\r\n * Remove property\r\n * @param property\r\n * @returns {BaseEntity}\r\n */\r\n removeProperty(property) {\r\n const properties = propertiesMap.get(this);\r\n delete properties[property];\r\n this.removeDefine(property);\r\n return this;\r\n }\r\n\r\n /**\r\n * Remove properties\r\n * @param properties\r\n */\r\n removeProperties(properties) {\r\n const propertiesForRemove = properties || Object.keys(propertiesMap.get(this));\r\n\r\n propertiesForRemove.forEach((property) => {\r\n this.removeProperty(property);\r\n });\r\n }\r\n\r\n isPropertyReadOnly(property) {\r\n return readOnlyMap.get(this).indexOf(property) >= 0;\r\n }\r\n\r\n cast(property, value) {\r\n if (!castsMap.get(this)[property]) return value;\r\n\r\n return CastsUtils(castsMap.get(this)[property], value);\r\n }\r\n\r\n /**\r\n * Check if property has defined\r\n * @param property\r\n * @protected\r\n */\r\n hasDefine(property) {\r\n return Boolean(definedMap.get(this)[property]);\r\n }\r\n\r\n /**\r\n * Define property getter and setter\r\n * @param property\r\n * @protected\r\n */\r\n define(property) {\r\n if (this.hasDefine(property)) return;\r\n\r\n if (!CheckUtils.isValid(property) || typeof property === 'object') {\r\n throw new TypeError(`Bad property name:${property}`);\r\n }\r\n\r\n const self = this;\r\n\r\n // delete property\r\n delete this[property];\r\n\r\n const descriptors = {\r\n enumerable: true,\r\n configurable: true,\r\n get() {\r\n return self.getProperty(property);\r\n },\r\n };\r\n\r\n if (!this.isPropertyReadOnly(property)) {\r\n descriptors.set = value => self.setProperty(property, value);\r\n }\r\n\r\n const defined = definedMap.get(this);\r\n defined[property] = true;\r\n\r\n Object.defineProperty(this, property, descriptors);\r\n }\r\n\r\n /**\r\n * Remove property getter and setter\r\n * @param property\r\n * @protected\r\n */\r\n removeDefine(property) {\r\n if (!this.hasDefine(property)) return;\r\n\r\n const defined = definedMap.get(this);\r\n delete defined[property];\r\n\r\n delete this[property];\r\n }\r\n\r\n /**\r\n * Define properties getter and setter\r\n * @param properties\r\n * @param onlyGetter\r\n * @protected\r\n */\r\n defines(properties, onlyGetter) {\r\n properties.forEach((property) => {\r\n this.define(property, onlyGetter);\r\n });\r\n }\r\n\r\n /**\r\n * Get properties map\r\n */\r\n asPropertiesMap() {\r\n const properties = this.getProperties();\r\n const customProperties = {};\r\n\r\n const has = Object.prototype.hasOwnProperty;\r\n\r\n Object.keys(this).forEach((key) => {\r\n if (!has.call(this, key)) return;\r\n if (!CheckUtils.isValid(this[key])) return;\r\n\r\n customProperties[key] = this[key];\r\n });\r\n\r\n return Object.assign({}, customProperties, properties);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\n\r\n/**\r\n * Country entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * @property code - Unique code of country.\r\n *\r\n * @property name - Unique name of country\r\n *\r\n * @property vatPercent - Country vat.\r\n *\r\n * @property isEu - is country in EU.\r\n */\r\nexport default class Country extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n code: 'string',\r\n name: 'string',\r\n vatPercent: 'int',\r\n isEu: 'boolean',\r\n },\r\n });\r\n\r\n // define default entity properties\r\n this.defines(['code', 'name', 'vatPercent', 'isEu']);\r\n }\r\n\r\n setCode(code) {\r\n return this.setProperty('code', code);\r\n }\r\n\r\n getCode(def) {\r\n return this.getProperty('code', def);\r\n }\r\n\r\n setName(name) {\r\n return this.setProperty('name', name);\r\n }\r\n\r\n getName(def) {\r\n return this.getProperty('name', def);\r\n }\r\n\r\n setVatPercent(vat) {\r\n return this.setProperty('vatPercent', vat);\r\n }\r\n\r\n getVatPercent(def) {\r\n return this.getProperty('vatPercent', def);\r\n }\r\n\r\n setIsEu(isEu) {\r\n return this.setProperty('isEu', isEu);\r\n }\r\n\r\n getIsEu(def) {\r\n return this.getProperty('isEu', def);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\n\r\n/**\r\n * License entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can\r\n * assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation\r\n * transaction status is set to closed.\r\n * @property string number\r\n *\r\n * Name for the licensed item. Set from license template on creation, if not specified explicitly.\r\n * @property string name\r\n *\r\n * If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled,\r\n * the license is excluded from the validation process.\r\n * @property boolean active\r\n *\r\n * price for the license. If >0, it must always be accompanied by the currency specification. Read-only,\r\n * set from license template on creation.\r\n * @property float price\r\n *\r\n * specifies currency for the license price. Check data types to discover which currencies are\r\n * supported. Read-only, set from license template on creation.\r\n * @property string currency\r\n *\r\n * If set to true, this license is not shown in NetLicensing Shop as purchased license. Set from license\r\n * template on creation, if not specified explicitly.\r\n * @property boolean $hidden\r\n *\r\n * @property string startDate\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each license. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, licenseeNumber,\r\n * licenseTemplateNumber.\r\n */\r\nexport default class License extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n active: 'boolean',\r\n name: 'string',\r\n price: 'float',\r\n hidden: 'boolean',\r\n parentfeature: 'string',\r\n timeVolume: 'int',\r\n startDate: 'date',\r\n inUse: 'boolean',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['inUse', 'currency', 'price'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines([\r\n 'number',\r\n 'active',\r\n 'name',\r\n 'hidden',\r\n 'parentfeature',\r\n 'timeVolume',\r\n 'startDate',\r\n 'inUse',\r\n 'currency',\r\n 'price',\r\n ]);\r\n }\r\n\r\n setNumber(number) {\r\n return this.setProperty('number', number);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setActive(active) {\r\n return this.setProperty('active', active);\r\n }\r\n\r\n getActive(def) {\r\n return this.getProperty('active', def);\r\n }\r\n\r\n setName(name) {\r\n return this.setProperty('name', name);\r\n }\r\n\r\n getName(def) {\r\n return this.getProperty('name', def);\r\n }\r\n\r\n setHidden(hidden) {\r\n return this.setProperty('hidden', hidden);\r\n }\r\n\r\n getHidden(def) {\r\n return this.getProperty('hidden', def);\r\n }\r\n\r\n setParentfeature(parentfeature) {\r\n return this.setProperty('parentfeature', parentfeature);\r\n }\r\n\r\n getParentfeature(def) {\r\n return this.getProperty('parentfeature', def);\r\n }\r\n\r\n setTimeVolume(timeVolume) {\r\n return this.setProperty('timeVolume', timeVolume);\r\n }\r\n\r\n getTimeVolume(def) {\r\n return this.getProperty('timeVolume', def);\r\n }\r\n\r\n setStartDate(startDate) {\r\n return this.setProperty('startDate', startDate);\r\n }\r\n\r\n getStartDate(def) {\r\n return this.getProperty('startDate', def);\r\n }\r\n\r\n getInUse(def) {\r\n return this.getProperty('inUse', def);\r\n }\r\n\r\n getPrice(def) {\r\n return this.getProperty('price', def);\r\n }\r\n\r\n getCurrency(def) {\r\n return this.getProperty('currency', def);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\n\r\n/**\r\n * License template entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the license template. Vendor can\r\n * assign this number when creating a license template or let NetLicensing generate one.\r\n * Read-only after creation of the first license from this license template.\r\n * @property string number\r\n *\r\n * If set to false, the license template is disabled. Licensee can not obtain any new licenses off this\r\n * license template.\r\n * @property boolean active\r\n *\r\n * Name for the licensed item.\r\n * @property string name\r\n *\r\n * Type of licenses created from this license template. Supported types: \"FEATURE\", \"TIMEVOLUME\",\r\n * \"FLOATING\", \"QUANTITY\"\r\n * @property string licenseType\r\n *\r\n * Price for the license. If >0, it must always be accompanied by the currency specification.\r\n * @property double price\r\n *\r\n * Specifies currency for the license price. Check data types to discover which currencies are\r\n * supported.\r\n * @property string currency\r\n *\r\n * If set to true, every new licensee automatically gets one license out of this license template on\r\n * creation. Automatic licenses must have their price set to 0.\r\n * @property boolean automatic\r\n *\r\n * If set to true, this license template is not shown in NetLicensing Shop as offered for purchase.\r\n * @property boolean hidden\r\n *\r\n * If set to true, licenses from this license template are not visible to the end customer, but\r\n * participate in validation.\r\n * @property boolean hideLicenses\r\n *\r\n * Mandatory for 'TIMEVOLUME' license type.\r\n * @property integer timeVolume\r\n *\r\n * Mandatory for 'FLOATING' license type.\r\n * @property integer maxSessions\r\n *\r\n * Mandatory for 'QUANTITY' license type.\r\n * @property integer quantity\r\n *\r\n * @constructor\r\n */\r\nexport default class LicenseTemplate extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n active: 'boolean',\r\n name: 'string',\r\n licenseType: 'string',\r\n price: 'double',\r\n currency: 'string',\r\n automatic: 'boolean',\r\n hidden: 'boolean',\r\n hideLicenses: 'boolean',\r\n timeVolume: 'int',\r\n maxSessions: 'int',\r\n quantity: 'int',\r\n inUse: 'boolean',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['inUse'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines([\r\n 'number',\r\n 'active',\r\n 'name',\r\n 'licenseType',\r\n 'price',\r\n 'currency',\r\n 'automatic',\r\n 'hidden',\r\n 'hideLicenses',\r\n 'timeVolume',\r\n 'maxSessions',\r\n 'quantity',\r\n 'inUse',\r\n ]);\r\n }\r\n\r\n setNumber(number) {\r\n return this.setProperty('number', number);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setActive(active) {\r\n return this.setProperty('active', active);\r\n }\r\n\r\n getActive(def) {\r\n return this.getProperty('active', def);\r\n }\r\n\r\n setName(name) {\r\n return this.setProperty('name', name);\r\n }\r\n\r\n getName(def) {\r\n return this.getProperty('name', def);\r\n }\r\n\r\n setLicenseType(licenseType) {\r\n return this.setProperty('licenseType', licenseType);\r\n }\r\n\r\n getLicenseType(def) {\r\n return this.getProperty('licenseType', def);\r\n }\r\n\r\n setPrice(price) {\r\n return this.setProperty('price', price);\r\n }\r\n\r\n getPrice(def) {\r\n return this.getProperty('price', def);\r\n }\r\n\r\n setCurrency(currency) {\r\n return this.setProperty('currency', currency);\r\n }\r\n\r\n getCurrency(def) {\r\n return this.getProperty('currency', def);\r\n }\r\n\r\n setAutomatic(automatic) {\r\n return this.setProperty('automatic', automatic);\r\n }\r\n\r\n getAutomatic(def) {\r\n return this.getProperty('automatic', def);\r\n }\r\n\r\n setHidden(hidden) {\r\n return this.setProperty('hidden', hidden);\r\n }\r\n\r\n getHidden(def) {\r\n return this.getProperty('hidden', def);\r\n }\r\n\r\n setHideLicenses(hideLicenses) {\r\n return this.setProperty('hideLicenses', hideLicenses);\r\n }\r\n\r\n getHideLicenses(def) {\r\n return this.getProperty('hideLicenses', def);\r\n }\r\n\r\n setTimeVolume(timeVolume) {\r\n return this.setProperty('timeVolume', timeVolume);\r\n }\r\n\r\n getTimeVolume(def) {\r\n return this.getProperty('timeVolume', def);\r\n }\r\n\r\n setMaxSessions(maxSessions) {\r\n return this.setProperty('maxSessions', maxSessions);\r\n }\r\n\r\n getMaxSessions(def) {\r\n return this.getProperty('maxSessions', def);\r\n }\r\n\r\n setQuantity(quantity) {\r\n return this.setProperty('quantity', quantity);\r\n }\r\n\r\n getQuantity(def) {\r\n return this.getProperty('quantity', def);\r\n }\r\n\r\n getInUse(def) {\r\n return this.getProperty('inUse', def);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport Transaction from './Transaction';\r\nimport License from './License';\r\n\r\n// const\r\n\r\nexport default class LicenseTransactionJoin {\r\n constructor(transaction, license) {\r\n this.transaction = transaction;\r\n this.license = license;\r\n }\r\n\r\n setTransaction(transaction) {\r\n if (!(transaction instanceof Transaction)) {\r\n throw new TypeError('context must be an instance of Transaction');\r\n }\r\n\r\n this.transaction = transaction;\r\n return this;\r\n }\r\n\r\n getTransaction(def) {\r\n return this.transaction || def;\r\n }\r\n\r\n setLicense(license) {\r\n if (!(license instanceof License)) {\r\n throw new TypeError('context must be an instance of License');\r\n }\r\n this.license = license;\r\n return this;\r\n }\r\n\r\n getLicense(def) {\r\n return this.license || def;\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\n\r\n/**\r\n * Licensee entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the licensee. Vendor can assign this\r\n * number when creating a licensee or let NetLicensing generate one. Read-only after creation of the first license for\r\n * the licensee.\r\n * @property string number\r\n *\r\n * Licensee name.\r\n * @property string name\r\n *\r\n * If set to false, the licensee is disabled. Licensee can not obtain new licenses, and validation is\r\n * disabled (tbd).\r\n * @property boolean active\r\n *\r\n * Licensee Secret for licensee\r\n * @property string licenseeSecret\r\n *\r\n * Mark licensee for transfer.\r\n * @property boolean markedForTransfer\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each licensee. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, productNumber\r\n *\r\n * @constructor\r\n */\r\nexport default class Licensee extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n active: 'boolean',\r\n name: 'string',\r\n licenseeSecret: 'string',\r\n markedForTransfer: 'boolean',\r\n inUse: 'boolean',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['inUse'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines(['number', 'active', 'name', 'licenseeSecret', 'markedForTransfer', 'inUse']);\r\n }\r\n\r\n setNumber(number) {\r\n return this.setProperty('number', number);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setActive(active) {\r\n return this.setProperty('active', active);\r\n }\r\n\r\n getActive(def) {\r\n return this.getProperty('active', def);\r\n }\r\n\r\n setName(name) {\r\n return this.setProperty('name', name);\r\n }\r\n\r\n getName(def) {\r\n return this.getProperty('name', def);\r\n }\r\n\r\n setLicenseeSecret(licenseeSecret) {\r\n return this.setProperty('licenseeSecret', licenseeSecret);\r\n }\r\n\r\n getLicenseeSecret(def) {\r\n return this.getProperty('licenseeSecret', def);\r\n }\r\n\r\n setMarkedForTransfer(markedForTransfer) {\r\n return this.setProperty('markedForTransfer', markedForTransfer);\r\n }\r\n\r\n getMarkedForTransfer(def) {\r\n return this.getProperty('markedForTransfer', def);\r\n }\r\n\r\n getInUse(def) {\r\n return this.getProperty('inUse', def);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\n\r\n/**\r\n * PaymentMethod entity used internally by NetLicensing.\r\n *\r\n * @property string number\r\n * @property boolean active\r\n *\r\n * @constructor\r\n */\r\nexport default class PaymentMethod extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n active: 'boolean',\r\n 'paypal.subject': 'string',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['inUse'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines(['number', 'active', 'paypal.subject']);\r\n }\r\n\r\n setNumber(number) {\r\n return this.setProperty('number', number);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setActive(active) {\r\n return this.setProperty('active', active);\r\n }\r\n\r\n getActive(def) {\r\n return this.getProperty('active', def);\r\n }\r\n\r\n setPaypalSubject(paypalSubject) {\r\n return this.setProperty('paypal.subject', paypalSubject);\r\n }\r\n\r\n getPaypalSubject(def) {\r\n return this.getProperty('paypal.subject', def);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\nimport ProductDiscount from './ProductDiscount';\r\n\r\n/**\r\n * The discounts map\r\n * @type {{}}\r\n * @private\r\n */\r\nconst discountsMap = new WeakMap();\r\n\r\n/**\r\n * An identifier that show if discounts was touched\r\n * @type {{}}\r\n * @private\r\n */\r\nconst discountsTouched = new WeakMap();\r\n\r\n/**\r\n * NetLicensing Product entity.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number that identifies the product. Vendor can assign this number when creating a product or\r\n * let NetLicensing generate one. Read-only after creation of the first licensee for the product.\r\n * @property string number\r\n *\r\n * If set to false, the product is disabled. No new licensees can be registered for the product,\r\n * existing licensees can not obtain new licenses.\r\n * @property boolean active\r\n *\r\n * Product name. Together with the version identifies the product for the end customer.\r\n * @property string name\r\n *\r\n * Product version. Convenience parameter, additional to the product name.\r\n * @property float version\r\n *\r\n * If set to 'true', non-existing licensees will be created at first validation attempt.\r\n * @property boolean licenseeAutoCreate\r\n *\r\n * Licensee secret mode for product.Supported types: \"DISABLED\", \"PREDEFINED\", \"CLIENT\"\r\n * @property boolean licenseeSecretMode\r\n *\r\n * Product description. Optional.\r\n * @property string description\r\n *\r\n * Licensing information. Optional.\r\n * @property string licensingInfo\r\n *\r\n * @property boolean inUse\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each product. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted.\r\n *\r\n * @constructor\r\n */\r\nexport default class Product extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n active: 'boolean',\r\n name: 'string',\r\n version: 'string',\r\n description: 'string',\r\n licensingInfo: 'string',\r\n licenseeAutoCreate: 'boolean',\r\n licenseeSecretMode: 'string',\r\n inUse: 'boolean',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['inUse'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines([\r\n 'number',\r\n 'active',\r\n 'name',\r\n 'version',\r\n 'description',\r\n 'licensingInfo',\r\n 'licenseeAutoCreate',\r\n 'licenseeSecretMode',\r\n 'inUse',\r\n ]);\r\n\r\n discountsMap.set(this, []);\r\n discountsTouched.set(this, false);\r\n }\r\n\r\n setNumber(number) {\r\n return this.setProperty('number', number);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setActive(active) {\r\n return this.setProperty('active', active);\r\n }\r\n\r\n getActive(def) {\r\n return this.getProperty('active', def);\r\n }\r\n\r\n setName(name) {\r\n return this.setProperty('name', name);\r\n }\r\n\r\n getName(def) {\r\n return this.getProperty('name', def);\r\n }\r\n\r\n setVersion(version) {\r\n return this.setProperty('version', version);\r\n }\r\n\r\n getVersion(def) {\r\n return this.getProperty('version', def);\r\n }\r\n\r\n setLicenseeAutoCreate(licenseeAutoCreate) {\r\n return this.setProperty('licenseeAutoCreate', licenseeAutoCreate);\r\n }\r\n\r\n getLicenseeAutoCreate(def) {\r\n return this.getProperty('licenseeAutoCreate', def);\r\n }\r\n\r\n setLicenseeSecretMode(licenseeSecretMode) {\r\n return this.setProperty('licenseeSecretMode', licenseeSecretMode);\r\n }\r\n\r\n getLicenseeSecretMode(def) {\r\n return this.getProperty('licenseeSecretMode', def);\r\n }\r\n\r\n setDescription(description) {\r\n return this.setProperty('description', description);\r\n }\r\n\r\n getDescription(def) {\r\n return this.getProperty('description', def);\r\n }\r\n\r\n setLicensingInfo(licensingInfo) {\r\n return this.setProperty('licensingInfo', licensingInfo);\r\n }\r\n\r\n getLicensingInfo(def) {\r\n return this.getProperty('licensingInfo', def);\r\n }\r\n\r\n getInUse(def) {\r\n return this.getProperty('inUse', def);\r\n }\r\n\r\n /**\r\n * Add discount to product\r\n *\r\n * @param discount NetLicensing.ProductDiscount\r\n * @returns {NetLicensing.Product}\r\n */\r\n addDiscount(discount) {\r\n if (!(discount instanceof ProductDiscount)) {\r\n throw new TypeError('discount must be an instance of ProductDiscount');\r\n }\r\n\r\n const discounts = discountsMap.get(this);\r\n discounts.push(discount);\r\n discountsMap.set(this, discounts);\r\n discountsTouched.set(this, true);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Set discounts to product\r\n * @param discounts\r\n */\r\n setProductDiscounts(discounts) {\r\n discountsMap.set(this, []);\r\n discountsTouched.set(this, true);\r\n\r\n if (!discounts) return this;\r\n\r\n if (Array.isArray(discounts)) {\r\n discounts.forEach((discount) => {\r\n this.addDiscount(discount);\r\n });\r\n\r\n return this;\r\n }\r\n\r\n this.addDiscount(discounts);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Get array of objects discounts\r\n * @returns {Array}\r\n */\r\n getProductDiscounts() {\r\n return Object.assign([], discountsMap.get(this));\r\n }\r\n\r\n setListDiscount(properties) {\r\n if (!properties) return;\r\n\r\n const discount = new ProductDiscount();\r\n properties.forEach((property) => {\r\n discount.setProperty(property.name, property.value);\r\n });\r\n this.addDiscount(discount);\r\n }\r\n\r\n asPropertiesMap() {\r\n const propertiesMap = super.asPropertiesMap();\r\n\r\n if (discountsMap.get(this).length) {\r\n propertiesMap.discount = discountsMap.get(this).map(discount => discount.toString());\r\n }\r\n\r\n if (!propertiesMap.discount && discountsTouched.get(this)) {\r\n propertiesMap.discount = '';\r\n }\r\n\r\n return propertiesMap;\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport BaseEntity from './BaseEntity';\r\n\r\nexport default class ProductDiscount extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n totalPrice: 'float',\r\n currency: 'string',\r\n amountFix: 'float',\r\n amountPercent: 'int',\r\n },\r\n });\r\n\r\n // define default entity properties\r\n this.defines(['totalPrice', 'currency', 'amountFix', 'amountPercent']);\r\n }\r\n\r\n setTotalPrice(totalPrice) {\r\n return this.setProperty('totalPrice', totalPrice);\r\n }\r\n\r\n getTotalPrice(def) {\r\n return this.getProperty('totalPrice', def);\r\n }\r\n\r\n setCurrency(currency) {\r\n return this.setProperty('currency', currency);\r\n }\r\n\r\n getCurrency(def) {\r\n return this.getProperty('currency', def);\r\n }\r\n\r\n setAmountFix(amountFix) {\r\n return this.setProperty('amountFix', amountFix).removeProperty('amountPercent');\r\n }\r\n\r\n getAmountFix(def) {\r\n return this.getProperty('amountFix', def);\r\n }\r\n\r\n setAmountPercent(amountPercent) {\r\n return this.setProperty('amountPercent', amountPercent).removeProperty('amountFix');\r\n }\r\n\r\n getAmountPercent(def) {\r\n return this.getProperty('amountPercent', def);\r\n }\r\n\r\n toString() {\r\n const totalPrice = this.getTotalPrice();\r\n const currency = this.getCurrency();\r\n let amount = 0;\r\n\r\n if (this.getAmountFix(null)) amount = this.getAmountFix();\r\n if (this.getAmountPercent(null)) amount = `${this.getAmountPercent()}%`;\r\n\r\n return `${totalPrice};${currency};${amount}`;\r\n }\r\n}\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\n\r\n/**\r\n * Product module entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the product module. Vendor can assign\r\n * this number when creating a product module or let NetLicensing generate one. Read-only after creation of the first\r\n * licensee for the product.\r\n * @property string number\r\n *\r\n * If set to false, the product module is disabled. Licensees can not obtain any new licenses for this\r\n * product module.\r\n * @property boolean active\r\n *\r\n * Product module name that is visible to the end customers in NetLicensing Shop.\r\n * @property string name\r\n *\r\n * Licensing model applied to this product module. Defines what license templates can be\r\n * configured for the product module and how licenses for this product module are processed during validation.\r\n * @property string licensingModel\r\n *\r\n * Maximum checkout validity (days). Mandatory for 'Floating' licensing model.\r\n * @property integer maxCheckoutValidity\r\n *\r\n * Remaining time volume for yellow level. Mandatory for 'Rental' licensing model.\r\n * @property integer yellowThreshold\r\n *\r\n * Remaining time volume for red level. Mandatory for 'Rental' licensing model.\r\n * @property integer redThreshold\r\n *\r\n * License template. Mandatory for 'Try & Buy' licensing model. Supported types: \"TIMEVOLUME\", \"FEATURE\".\r\n * @property string licenseTemplate\r\n *\r\n * @constructor\r\n */\r\nexport default class ProductModule extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n active: 'boolean',\r\n name: 'string',\r\n licensingModel: 'string',\r\n maxCheckoutValidity: 'int',\r\n yellowThreshold: 'int',\r\n redThreshold: 'int',\r\n licenseTemplate: 'string',\r\n inUse: 'boolean',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['inUse'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines([\r\n 'number',\r\n 'active',\r\n 'name',\r\n 'licensingModel',\r\n 'maxCheckoutValidity',\r\n 'yellowThreshold',\r\n 'redThreshold',\r\n 'licenseTemplate',\r\n 'inUse',\r\n ]);\r\n }\r\n\r\n setNumber(number) {\r\n return this.setProperty('number', number);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setActive(active) {\r\n return this.setProperty('active', active);\r\n }\r\n\r\n getActive(def) {\r\n return this.getProperty('active', def);\r\n }\r\n\r\n setName(name) {\r\n return this.setProperty('name', name);\r\n }\r\n\r\n getName(def) {\r\n return this.getProperty('name', def);\r\n }\r\n\r\n setLicensingModel(licensingModel) {\r\n return this.setProperty('licensingModel', licensingModel);\r\n }\r\n\r\n getLicensingModel(def) {\r\n return this.getProperty('licensingModel', def);\r\n }\r\n\r\n setMaxCheckoutValidity(maxCheckoutValidity) {\r\n return this.setProperty('maxCheckoutValidity', maxCheckoutValidity);\r\n }\r\n\r\n getMaxCheckoutValidity(def) {\r\n return this.getProperty('maxCheckoutValidity', def);\r\n }\r\n\r\n setYellowThreshold(yellowThreshold) {\r\n return this.setProperty('yellowThreshold', yellowThreshold);\r\n }\r\n\r\n getYellowThreshold(def) {\r\n return this.getProperty('yellowThreshold', def);\r\n }\r\n\r\n setRedThreshold(redThreshold) {\r\n return this.setProperty('redThreshold', redThreshold);\r\n }\r\n\r\n getRedThreshold(def) {\r\n return this.getProperty('redThreshold', def);\r\n }\r\n\r\n setLicenseTemplate(licenseTemplate) {\r\n return this.setProperty('licenseTemplate', licenseTemplate);\r\n }\r\n\r\n getLicenseTemplate(def) {\r\n return this.getProperty('licenseTemplate', def);\r\n }\r\n\r\n getInUse(def) {\r\n return this.getProperty('inUse', def);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\n\r\n/**\r\n * Product module entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number\r\n * @property string number\r\n *\r\n * If set to false, the token is disabled.\r\n * @property boolean active\r\n *\r\n * Expiration Time\r\n * @property string expirationTime\r\n *\r\n * @property string vendorNumber\r\n *\r\n * Token type to be generated.\r\n * DEFAULT - default one-time token (will be expired after first request)\r\n * SHOP - shop token is used to redirect customer to the netlicensingShop(licenseeNumber is mandatory)\r\n * APIKEY - APIKey-token\r\n * @property string tokenType\r\n *\r\n * @property string licenseeNumber\r\n *\r\n * @constructor\r\n */\r\nexport default class Token extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n active: 'boolean',\r\n expirationTime: 'date',\r\n vendorNumber: 'string',\r\n tokenType: 'string',\r\n licenseeNumber: 'string',\r\n successURL: 'string',\r\n successURLTitle: 'string',\r\n cancelURL: 'string',\r\n cancelURLTitle: 'string',\r\n shopURL: 'string',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['number', 'shopURL'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines([\r\n 'number',\r\n 'active',\r\n 'expirationTime',\r\n 'vendorNumber',\r\n 'tokenType',\r\n 'licenseeNumber',\r\n 'successURL',\r\n 'successURLTitle',\r\n 'cancelURL',\r\n 'cancelURLTitle',\r\n 'shopURL',\r\n ]);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setActive(active) {\r\n return this.setProperty('active', active);\r\n }\r\n\r\n getActive(def) {\r\n return this.getProperty('active', def);\r\n }\r\n\r\n setExpirationTime(expirationTime) {\r\n return this.setProperty('expirationTime', expirationTime);\r\n }\r\n\r\n getExpirationTime(def) {\r\n return this.getProperty('expirationTime', def);\r\n }\r\n\r\n setVendorNumber(vendorNumber) {\r\n return this.setProperty('vendorNumber', vendorNumber);\r\n }\r\n\r\n getVendorNumber(def) {\r\n return this.getProperty('vendorNumber', def);\r\n }\r\n\r\n setTokenType(tokenType) {\r\n return this.setProperty('tokenType', tokenType);\r\n }\r\n\r\n getTokenType(def) {\r\n return this.getProperty('tokenType', def);\r\n }\r\n\r\n setLicenseeNumber(licenseeNumber) {\r\n return this.setProperty('licenseeNumber', licenseeNumber);\r\n }\r\n\r\n getLicenseeNumber(def) {\r\n return this.getProperty('licenseeNumber', def);\r\n }\r\n\r\n setSuccessURL(successURL) {\r\n return this.setProperty('successURL', successURL);\r\n }\r\n\r\n getSuccessURL(def) {\r\n return this.getProperty('successURL', def);\r\n }\r\n\r\n setSuccessURLTitle(successURLTitle) {\r\n return this.setProperty('successURLTitle', successURLTitle);\r\n }\r\n\r\n getSuccessURLTitle(def) {\r\n return this.getProperty('successURLTitle', def);\r\n }\r\n\r\n setCancelURL(cancelURL) {\r\n return this.setProperty('cancelURL', cancelURL);\r\n }\r\n\r\n getCancelURL(def) {\r\n return this.getProperty('cancelURL', def);\r\n }\r\n\r\n setCancelURLTitle(cancelURLTitle) {\r\n return this.setProperty('cancelURLTitle', cancelURLTitle);\r\n }\r\n\r\n getCancelURLTitle(def) {\r\n return this.getProperty('cancelURLTitle', def);\r\n }\r\n\r\n getShopURL(def) {\r\n return this.getProperty('shopURL', def);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\nimport LicenseTransactionJoin from './LicenseTransactionJoin';\r\nimport License from './License';\r\n\r\n/**\r\n * Transaction entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the transaction. This number is\r\n * always generated by NetLicensing.\r\n * @property string number\r\n *\r\n * always true for transactions\r\n * @property boolean active\r\n *\r\n * Status of transaction. \"CANCELLED\", \"CLOSED\", \"PENDING\".\r\n * @property string status\r\n *\r\n * \"SHOP\". AUTO transaction for internal use only.\r\n * @property string source\r\n *\r\n * grand total for SHOP transaction (see source).\r\n * @property float grandTotal\r\n *\r\n * discount for SHOP transaction (see source).\r\n * @property float discount\r\n *\r\n * specifies currency for money fields (grandTotal and discount). Check data types to discover which\r\n * @property string currency\r\n *\r\n * Date created. Optional.\r\n * @property string dateCreated\r\n *\r\n * Date closed. Optional.\r\n * @property string dateClosed\r\n *\r\n * @constructor\r\n */\r\nexport default class Transaction extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n name: 'string',\r\n status: 'string',\r\n source: 'string',\r\n grandTotal: 'float',\r\n discount: 'float',\r\n currency: 'string',\r\n dateCreated: 'date',\r\n dateClosed: 'date',\r\n active: 'boolean',\r\n paymentMethod: 'string',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['active'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines([\r\n 'number',\r\n 'name',\r\n 'status',\r\n 'source',\r\n 'grandTotal',\r\n 'discount',\r\n 'currency',\r\n 'dateCreated',\r\n 'dateClosed',\r\n 'paymentMethod',\r\n 'licenseTransactionJoins',\r\n ]);\r\n }\r\n\r\n setNumber(number) {\r\n return this.setProperty('number', number);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setName(name) {\r\n return this.setProperty('name', name);\r\n }\r\n\r\n getName(def) {\r\n return this.getProperty('name', def);\r\n }\r\n\r\n setStatus(status) {\r\n return this.setProperty('status', status);\r\n }\r\n\r\n getStatus(def) {\r\n return this.getProperty('status', def);\r\n }\r\n\r\n setSource(source) {\r\n return this.setProperty('source', source);\r\n }\r\n\r\n getSource(def) {\r\n return this.getProperty('source', def);\r\n }\r\n\r\n setGrandTotal(grandTotal) {\r\n return this.setProperty('grandTotal', grandTotal);\r\n }\r\n\r\n getGrandTotal(def) {\r\n return this.getProperty('grandTotal', def);\r\n }\r\n\r\n setDiscount(discount) {\r\n return this.setProperty('discount', discount);\r\n }\r\n\r\n getDiscount(def) {\r\n return this.getProperty('discount', def);\r\n }\r\n\r\n setCurrency(currency) {\r\n return this.setProperty('currency', currency);\r\n }\r\n\r\n getCurrency(def) {\r\n return this.getProperty('currency', def);\r\n }\r\n\r\n setDateCreated(dateCreated) {\r\n return this.setProperty('dateCreated', dateCreated);\r\n }\r\n\r\n getDateCreated(def) {\r\n return this.getProperty('dateCreated', def);\r\n }\r\n\r\n setDateClosed(dateClosed) {\r\n return this.setProperty('dateClosed', dateClosed);\r\n }\r\n\r\n getDateClosed(def) {\r\n return this.getProperty('dateClosed', def);\r\n }\r\n\r\n setPaymentMethod(paymentMethod) {\r\n return this.setProperty('paymentMethod', paymentMethod);\r\n }\r\n\r\n getPaymentMethod(def) {\r\n return this.getProperty('paymentMethod', def);\r\n }\r\n\r\n setActive() {\r\n return this.setProperty('active', true);\r\n }\r\n\r\n getLicenseTransactionJoins(def) {\r\n return this.getProperty('licenseTransactionJoins', def);\r\n }\r\n\r\n setLicenseTransactionJoins(licenseTransactionJoins) {\r\n return this.setProperty('licenseTransactionJoins', licenseTransactionJoins);\r\n }\r\n\r\n setListLicenseTransactionJoin(properties) {\r\n if (!properties) return;\r\n\r\n const licenseTransactionJoins = this.getProperty('licenseTransactionJoins', []);\r\n const licenseTransactionJoin = new LicenseTransactionJoin();\r\n\r\n properties.forEach((property) => {\r\n if (property.name === 'licenseNumber') {\r\n licenseTransactionJoin.setLicense(new License({ number: property.value }));\r\n }\r\n\r\n if (property.name === 'transactionNumber') {\r\n licenseTransactionJoin.setTransaction(new Transaction({ number: property.value }));\r\n }\r\n });\r\n\r\n licenseTransactionJoins.push(licenseTransactionJoin);\r\n this.setProperty('licenseTransactionJoins', licenseTransactionJoins);\r\n }\r\n}\r\n","// Constants\r\nimport Constants from './Constants';\r\n// VO\r\nimport Context from './vo/Context';\r\n\r\n// Services\r\nimport Service from './services/Service';\r\nimport LicenseeService from './services/LicenseeService';\r\nimport LicenseService from './services/LicenseService';\r\nimport LicenseTemplateService from './services/LicenseTemplateService';\r\nimport PaymentMethodService from './services/PaymentMethodService';\r\nimport ProductModuleService from './services/ProductModuleService';\r\nimport ProductService from './services/ProductService';\r\nimport TokenService from './services/TokenService';\r\nimport TransactionService from './services/TransactionService';\r\nimport UtilityService from './services/UtilityService';\r\n\r\n// Entities\r\nimport Country from './entities/Country';\r\nimport License from './entities/License';\r\nimport Licensee from './entities/Licensee';\r\nimport LicenseTemplate from './entities/LicenseTemplate';\r\nimport PaymentMethod from './entities/PaymentMethod';\r\nimport Product from './entities/Product';\r\nimport ProductDiscount from './entities/ProductDiscount';\r\nimport ProductModule from './entities/ProductModule';\r\nimport Token from './entities/Token';\r\nimport Transaction from './entities/Transaction';\r\nimport LicenseTransactionJoin from './entities/LicenseTransactionJoin';\r\nimport ValidationParameters from './vo/ValidationParameters';\r\nimport ValidationResults from './vo/ValidationResults';\r\n\r\n// Utils\r\nimport CastsUtils from './util/CastsUtils';\r\nimport CheckUtils from './util/CheckUtils';\r\nimport FilterUtils from './util/FilterUtils';\r\n\r\n\r\n// Create the default instance to be exported\r\nconst NetLicensing = {\r\n // Constants\r\n Constants,\r\n\r\n // Expose VO\r\n Context,\r\n ValidationParameters,\r\n ValidationResults,\r\n\r\n // Expose Services\r\n Service,\r\n LicenseeService,\r\n LicenseService,\r\n LicenseTemplateService,\r\n PaymentMethodService,\r\n ProductModuleService,\r\n ProductService,\r\n TokenService,\r\n TransactionService,\r\n UtilityService,\r\n\r\n // Expose Entities\r\n Country,\r\n License,\r\n Licensee,\r\n LicenseTemplate,\r\n PaymentMethod,\r\n Product,\r\n ProductDiscount,\r\n ProductModule,\r\n Token,\r\n Transaction,\r\n LicenseTransactionJoin,\r\n\r\n // Expose Utils\r\n CastsUtils,\r\n CheckUtils,\r\n FilterUtils,\r\n};\r\n\r\nmodule.exports = NetLicensing;\r\n\r\n// Allow use of default import syntax in TypeScript\r\nmodule.exports.default = NetLicensing;\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport License from '../entities/License';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport Constants from '../Constants';\r\nimport Service from './Service';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\n/**\r\n * JS representation of the License Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NLICPUB/License+Services\r\n *\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Creates new license object with given properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Createlicense\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent licensee to which the new license is to be added\r\n * @param licenseeNumber string\r\n *\r\n * license template that the license is created from\r\n * @param licenseTemplateNumber string\r\n *\r\n * For privileged logins specifies transaction for the license creation. For regular logins new\r\n * transaction always created implicitly, and the operation will be in a separate transaction.\r\n * Transaction is generated with the provided transactionNumber, or, if transactionNumber is null, with\r\n * auto-generated number.\r\n * @param transactionNumber null|string\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param license NetLicensing.License\r\n *\r\n * return the newly created license object in promise\r\n * @returns {Promise}\r\n */\r\n create(context, licenseeNumber, licenseTemplateNumber, transactionNumber, license) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(license instanceof License)) {\r\n throw new TypeError('license must be an instance of License');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(licenseeNumber, 'licenseeNumber');\r\n CheckUtils.paramNotEmpty(licenseTemplateNumber, 'licenseTemplateNumber');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n license.setProperty('licenseeNumber', licenseeNumber);\r\n license.setProperty('licenseTemplateNumber', licenseTemplateNumber);\r\n\r\n if (transactionNumber) license.setProperty('transactionNumber', transactionNumber);\r\n\r\n return Service\r\n .post(context, Constants.License.ENDPOINT_PATH, license.asPropertiesMap(), License);\r\n },\r\n\r\n\r\n /**\r\n * Gets license by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Getlicense\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the license number\r\n * @param number string\r\n *\r\n * return the license in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .get(context, `${Constants.License.ENDPOINT_PATH}/${number}`, {}, License);\r\n },\r\n\r\n /**\r\n * Returns licenses of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Licenseslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * return array of licenses (of all products) or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.License.ENDPOINT_PATH, queryParams, License);\r\n },\r\n\r\n /**\r\n * Updates license properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Updatelicense\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license number\r\n * @param number string\r\n *\r\n * transaction for the license update. Created implicitly if transactionNumber is null. In this case the\r\n * operation will be in a separate transaction.\r\n * @param transactionNumber string|null\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param license NetLicensing.License\r\n *\r\n * return updated license in promise.\r\n * @returns {Promise}\r\n */\r\n update(context, number, transactionNumber, license) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(license instanceof License)) {\r\n throw new TypeError('license must be an instance of License');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n if (transactionNumber) license.setProperty('transactionNumber', transactionNumber);\r\n\r\n return Service\r\n .post(context, `${Constants.License.ENDPOINT_PATH}/${number}`, license.asPropertiesMap(), License);\r\n },\r\n\r\n /**\r\n * Deletes license.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Deletelicense\r\n *\r\n * When any license is deleted, corresponding transaction is created automatically.\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(context, number, forceCascade) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n const queryParams = { forceCascade: Boolean(forceCascade) };\r\n\r\n return Service\r\n .delete(context, `${Constants.License.ENDPOINT_PATH}/${number}`, queryParams);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport LicenseTemplate from '../entities/LicenseTemplate';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport Constants from '../Constants';\r\nimport Service from './Service';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\n/**\r\n * JS representation of the ProductModule Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services\r\n *\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Creates new license template object with given properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Createlicensetemplate\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent product module to which the new license template is to be added\r\n * @param productModuleNumber\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param licenseTemplate NetLicensing.LicenseTemplate\r\n *\r\n * the newly created license template object in promise\r\n * @returns {Promise}\r\n */\r\n create(context, productModuleNumber, licenseTemplate) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(licenseTemplate instanceof LicenseTemplate)) {\r\n throw new TypeError('licenseTemplate must be an instance of LicenseTemplate');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(productModuleNumber, 'productModuleNumber');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n licenseTemplate.setProperty('productModuleNumber', productModuleNumber);\r\n\r\n return Service\r\n .post(context, Constants.LicenseTemplate.ENDPOINT_PATH, licenseTemplate.asPropertiesMap(), LicenseTemplate);\r\n },\r\n\r\n /**\r\n * Gets license template by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Getlicensetemplate\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the license template number\r\n * @param number string\r\n *\r\n * return the license template object in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .get(context, `${Constants.LicenseTemplate.ENDPOINT_PATH}/${number}`, {}, LicenseTemplate);\r\n },\r\n\r\n /**\r\n * Returns all license templates of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Licensetemplateslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * array of license templates (of all products/modules) or null/empty list if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.LicenseTemplate.ENDPOINT_PATH, queryParams, LicenseTemplate);\r\n },\r\n\r\n /**\r\n * Updates license template properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Updatelicensetemplate\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license template number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param licenseTemplate NetLicensing.LicenseTemplate\r\n *\r\n * updated license template in promise.\r\n * @returns {Promise}\r\n */\r\n update(context, number, licenseTemplate) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(licenseTemplate instanceof LicenseTemplate)) {\r\n throw new TypeError('licenseTemplate must be an instance of LicenseTemplate');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const path = `${Constants.LicenseTemplate.ENDPOINT_PATH}/${number}`;\r\n\r\n return Service\r\n .post(context, path, licenseTemplate.asPropertiesMap(), LicenseTemplate);\r\n },\r\n\r\n /**\r\n * Deletes license template.See NetLicensingAPI JavaDoc for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Deletelicensetemplate\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license template number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(context, number, forceCascade) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n const queryParams = { forceCascade: Boolean(forceCascade) };\r\n\r\n return Service\r\n .delete(context, `${Constants.LicenseTemplate.ENDPOINT_PATH}/${number}`, queryParams);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport Licensee from '../entities/Licensee';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport FilterUtils from '../util/FilterUtils';\r\nimport Constants from '../Constants';\r\nimport Service from './Service';\r\nimport ValidationParameters from '../vo/ValidationParameters';\r\nimport ValidationResults from '../vo/ValidationResults';\r\n\r\n/**\r\n * JS representation of the Licensee Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services\r\n *\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Creates new licensee object with given properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Createlicensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent product to which the new licensee is to be added\r\n * @param productNumber string\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param licensee NetLicensing.Licensee\r\n *\r\n * return the newly created licensee object in promise\r\n * @returns {Promise}\r\n */\r\n create(context, productNumber, licensee) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(licensee instanceof Licensee)) {\r\n throw new TypeError('licensee must be an instance of Licensee');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(productNumber, 'productNumber');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n licensee.setProperty('productNumber', productNumber);\r\n\r\n return Service\r\n .post(context, Constants.Licensee.ENDPOINT_PATH, licensee.asPropertiesMap(), Licensee);\r\n },\r\n\r\n /**\r\n * Gets licensee by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Getlicensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the licensee number\r\n * @param number string\r\n *\r\n * return the licensee in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n return Service\r\n .get(context, `${Constants.Licensee.ENDPOINT_PATH}/${number}`, {}, Licensee);\r\n },\r\n\r\n /**\r\n * Returns all licensees of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Licenseeslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * array of licensees (of all products) or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.Licensee.ENDPOINT_PATH, queryParams, Licensee);\r\n },\r\n\r\n /**\r\n * Updates licensee properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Updatelicensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * licensee number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param licensee NetLicensing.Licensee\r\n *\r\n * return updated licensee in promise.\r\n * @returns {Promise}\r\n */\r\n update(context, number, licensee) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(licensee instanceof Licensee)) {\r\n throw new TypeError('licensee must be an instance of Licensee');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n return Service\r\n .post(context, `${Constants.Licensee.ENDPOINT_PATH}/${number}`, licensee.asPropertiesMap(), Licensee);\r\n },\r\n\r\n /**\r\n * Deletes licensee.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Deletelicensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * licensee number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(context, number, forceCascade) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n const queryParams = { forceCascade: Boolean(forceCascade) };\r\n\r\n return Service\r\n .delete(context, `${Constants.Licensee.ENDPOINT_PATH}/${number}`, queryParams);\r\n },\r\n\r\n /**\r\n * Validates active licenses of the licensee. See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Validatelicensee\r\n *\r\n * @param context NetLicensing.Context\r\n *\r\n * licensee number\r\n * @param number string\r\n *\r\n * optional validation parameters. See ValidationParameters and licensing model documentation for\r\n * details.\r\n * @param validationParameters NetLicensing.ValidationParameters.\r\n *\r\n * @returns {Promise}\r\n */\r\n validate(context, number, validationParameters) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(validationParameters instanceof ValidationParameters)) {\r\n throw new TypeError('validationParameters must be an instance of ValidationParameters');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n const queryParams = {};\r\n\r\n if (validationParameters.getProductNumber()) {\r\n queryParams.productNumber = validationParameters.getProductNumber();\r\n }\r\n\r\n if (validationParameters.getLicenseeName()) {\r\n queryParams.licenseeName = validationParameters.getLicenseeName();\r\n }\r\n\r\n if (validationParameters.getLicenseeSecret()) {\r\n queryParams.licenseeSecret = validationParameters.getLicenseeSecret();\r\n }\r\n\r\n let pmIndex = 0;\r\n const parameters = validationParameters.getParameters();\r\n\r\n const has = Object.prototype.hasOwnProperty;\r\n\r\n Object.keys(parameters).forEach((productModuleName) => {\r\n queryParams[`productModuleNumber${pmIndex}`] = productModuleName;\r\n if (!has.call(parameters, productModuleName)) return;\r\n\r\n const parameter = parameters[productModuleName];\r\n\r\n Object.keys(parameter).forEach((key) => {\r\n if (has.call(parameter, key)) {\r\n queryParams[key + pmIndex] = parameter[key];\r\n }\r\n });\r\n pmIndex += 1;\r\n });\r\n\r\n const path = `${Constants.Licensee.ENDPOINT_PATH}/${number}/${Constants.Licensee.ENDPOINT_PATH_VALIDATE}`;\r\n\r\n return Service\r\n .post(context, path, queryParams)\r\n .then((item) => {\r\n const data = {};\r\n const validationResults = new ValidationResults();\r\n\r\n item.property.forEach((property) => {\r\n try {\r\n data[property.name] = JSON.parse(property.value);\r\n } catch (e) {\r\n data[property.name] = property.value;\r\n }\r\n });\r\n\r\n validationResults\r\n .setProductModuleValidation(data.productModuleNumber, data)\r\n .setTtl(Service.getLastHttpRequestInfo().data.ttl);\r\n\r\n return validationResults;\r\n });\r\n },\r\n\r\n\r\n /**\r\n * Transfer licenses between licensees.\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Transferlicensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the number of the licensee receiving licenses\r\n * @param number string\r\n *\r\n * the number of the licensee delivering licenses\r\n * @param sourceLicenseeNumber string\r\n *\r\n * @returns {Promise}\r\n */\r\n transfer(context, number, sourceLicenseeNumber) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n CheckUtils.paramNotEmpty(sourceLicenseeNumber, 'sourceLicenseeNumber');\r\n\r\n const queryParams = { sourceLicenseeNumber };\r\n\r\n const path = `${Constants.Licensee.ENDPOINT_PATH}/${number}/${Constants.Licensee.ENDPOINT_PATH_TRANSFER}`;\r\n\r\n return Service\r\n .post(context, path, queryParams);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport PaymentMethod from '../entities/PaymentMethod';\r\nimport Constants from '../Constants';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport Service from './Service';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\nexport default {\r\n /**\r\n * Gets payment method by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Getpaymentmethod\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the payment method number\r\n * @param number string\r\n *\r\n * return the payment method in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .get(context, `${Constants.PaymentMethod.ENDPOINT_PATH}/${number}`, {}, PaymentMethod);\r\n },\r\n\r\n /**\r\n * Returns payment methods of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Paymentmethodslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * array of payment method entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.PaymentMethod.ENDPOINT_PATH, queryParams, PaymentMethod);\r\n },\r\n\r\n /**\r\n * Updates payment method properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Updatepaymentmethod\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the payment method number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param paymentMethod NetLicensing.PaymentMethod\r\n *\r\n * return updated payment method in promise.\r\n * @returns {Promise}\r\n */\r\n update(context, number, paymentMethod) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(paymentMethod instanceof PaymentMethod)) {\r\n throw new TypeError('paymentMethod must be an instance of PaymentMethod');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const path = `${Constants.PaymentMethod.ENDPOINT_PATH}/${number}`;\r\n\r\n return Service\r\n .post(context, path, paymentMethod.asPropertiesMap(), PaymentMethod);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport ProductModule from '../entities/ProductModule';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport Constants from '../Constants';\r\nimport Service from './Service';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\n/**\r\n * JS representation of the ProductModule Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services\r\n *\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Creates new product module object with given properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Createproductmodule\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent product to which the new product module is to be added\r\n * @param productNumber string\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param productModule NetLicensing.ProductModule\r\n *\r\n * the newly created product module object in promise\r\n * @returns {Promise}\r\n */\r\n create(context, productNumber, productModule) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(productModule instanceof ProductModule)) {\r\n throw new TypeError('product must be an instance of ProductModule');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(productNumber, 'productNumber');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n productModule.setProperty('productNumber', productNumber);\r\n\r\n return Service\r\n .post(context, Constants.ProductModule.ENDPOINT_PATH, productModule.asPropertiesMap(), ProductModule);\r\n },\r\n\r\n /**\r\n * Gets product module by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Getproductmodule\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the product module number\r\n * @param number string\r\n *\r\n * return the product module object in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .get(context, `${Constants.ProductModule.ENDPOINT_PATH}/${number}`, {}, ProductModule);\r\n },\r\n\r\n /**\r\n * Returns products of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Productslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * array of product modules entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.ProductModule.ENDPOINT_PATH, queryParams, ProductModule);\r\n },\r\n\r\n /**\r\n * Updates product module properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Updateproductmodule\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product module number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param productModule NetLicensing.ProductModule\r\n *\r\n * updated product module in promise.\r\n * @returns {Promise}\r\n */\r\n update(context, number, productModule) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(productModule instanceof ProductModule)) {\r\n throw new TypeError('product must be an instance of ProductModule');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const path = `${Constants.ProductModule.ENDPOINT_PATH}/${number}`;\r\n\r\n return Service\r\n .post(context, path, productModule.asPropertiesMap(), ProductModule);\r\n },\r\n\r\n /**\r\n * Deletes product module.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Deleteproductmodule\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product module number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(context, number, forceCascade) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n const queryParams = { forceCascade: Boolean(forceCascade) };\r\n\r\n return Service\r\n .delete(context, `${Constants.ProductModule.ENDPOINT_PATH}/${number}`, queryParams);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Service from './Service';\r\nimport Context from '../vo/Context';\r\nimport Product from '../entities/Product';\r\nimport Constants from '../Constants';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\n/**\r\n * JS representation of the Product Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services\r\n *\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Creates new product with given properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Createproduct\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param product NetLicensing.Product\r\n *\r\n * return the newly created product object in promise\r\n * @returns {Promise}\r\n */\r\n\r\n create(context, product) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(product instanceof Product)) {\r\n throw new TypeError('product must be an instance of Product');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .post(context, Constants.Product.ENDPOINT_PATH, product.asPropertiesMap(), Product);\r\n },\r\n\r\n /**\r\n * Gets product by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Getproduct\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the product number\r\n * @param number string\r\n *\r\n * return the product object in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .get(context, `${Constants.Product.ENDPOINT_PATH}/${number}`, {}, Product);\r\n },\r\n\r\n /**\r\n * Returns products of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Productslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * array of product entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.Product.ENDPOINT_PATH, queryParams, Product);\r\n },\r\n\r\n /**\r\n * Updates product properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Updateproduct\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param product NetLicensing.Product\r\n *\r\n * updated product in promise.\r\n * @returns {Promise}\r\n */\r\n update(context, number, product) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(product instanceof Product)) {\r\n throw new TypeError('product must be an instance of Product');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .post(context, `${Constants.Product.ENDPOINT_PATH}/${number}`, product.asPropertiesMap(), Product);\r\n },\r\n\r\n /**\r\n * Deletes product.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Deleteproduct\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(context, number, forceCascade) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n const queryParams = { forceCascade: Boolean(forceCascade) };\r\n\r\n return Service\r\n .delete(context, `${Constants.Product.ENDPOINT_PATH}/${number}`, queryParams);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport axios from 'axios';\r\nimport Context from '../vo/Context';\r\nimport Constants from '../Constants';\r\nimport BaseEntity from '../entities/BaseEntity';\r\n\r\nlet httpXHR = {};\r\n\r\nexport default class Service {\r\n static getLastHttpRequestInfo() {\r\n return httpXHR;\r\n }\r\n\r\n /**\r\n * Helper method for performing GET request to N\r\n etLicensing API services. Finds and returns first suitable item with\r\n * type resultType from the response.\r\n *\r\n * Context for the NetLicensing API call\r\n * @param context\r\n *\r\n * the REST URL template\r\n * @param urlTemplate\r\n *\r\n * The REST query parameters values. May be null if there are no parameters.\r\n * @param queryParams\r\n *\r\n * the type of the result\r\n * @param resultType\r\n *\r\n * @returns {Promise}\r\n */\r\n static get(context, urlTemplate, queryParams, resultType) {\r\n return Service\r\n .request(context, 'get', urlTemplate, queryParams)\r\n .then(response => ((response.data) ? Service.getEntity(resultType, response.data.items.item[0]) : null));\r\n }\r\n\r\n /**\r\n * Helper method for performing GET request to NetLicensing API service that returns page of items with type\r\n * resultType.\r\n *\r\n * context for the NetLicensing API call\r\n * @param context\r\n *\r\n * the REST URL template\r\n * @param urlTemplate\r\n *\r\n * The REST query parameters values. May be null if there are no parameters.\r\n * @param queryParams\r\n *\r\n * the type of the result\r\n * @param resultType\r\n *\r\n *\r\n * @returns {Promise}\r\n */\r\n static list(context, urlTemplate, queryParams, resultType) {\r\n return Service\r\n .request(context, 'get', urlTemplate, queryParams)\r\n .then(response => ((response.data)\r\n ? response.data.items.item.map(item => Service.getEntity(resultType, item))\r\n : []));\r\n }\r\n\r\n /**\r\n * Helper method for performing POST request to NetLicensing API services. Finds and returns first suitable item\r\n * with type resultType from the response.\r\n *\r\n * context for the NetLicensing API call\r\n * @param context\r\n *\r\n * the REST URL template\r\n * @param urlTemplate\r\n *\r\n * The REST query parameters values. May be null if there are no parameters.\r\n * @param queryParams\r\n *\r\n * he type of the result\r\n * @param resultType\r\n *\r\n * @returns {Promise}\r\n */\r\n static post(context, urlTemplate, queryParams, resultType) {\r\n return Service\r\n .request(context, 'post', urlTemplate, queryParams)\r\n .then(response => ((response.data) ? Service.getEntity(resultType, response.data.items.item[0]) : null));\r\n }\r\n\r\n /**\r\n *\r\n * @param context\r\n * @param urlTemplate\r\n * @param queryParams\r\n * @returns {Promise}\r\n */\r\n static delete(context, urlTemplate, queryParams) {\r\n return Service\r\n .request(context, 'delete', urlTemplate, queryParams)\r\n .then(response => (response.status === 204));\r\n }\r\n\r\n /**\r\n * Send request to NetLicensing RestApi\r\n * @param context\r\n * @param method\r\n * @param urlTemplate\r\n * @param queryParams\r\n * @returns {Promise}\r\n */\r\n static request(context, method, urlTemplate, queryParams) {\r\n if (!(context instanceof Context)) throw new TypeError('context must be an instance of NetLicensing.Context');\r\n\r\n const template = String(urlTemplate);\r\n const params = queryParams || {};\r\n\r\n if (!template) throw new TypeError('Url template must be specified');\r\n\r\n // validate http method\r\n if (['get', 'post', 'delete'].indexOf(method.toLowerCase()) < 0) {\r\n throw new Error(`Invalid request type:${method}, allowed requests types: GET, POST, DELETE.`);\r\n }\r\n\r\n // validate context\r\n if (!context.getBaseUrl(null)) {\r\n throw new Error('Base url must be specified');\r\n }\r\n\r\n if (!Service.isValidUrl(String(context.getBaseUrl()))) {\r\n throw new Error(`Base url \"${context.getBaseUrl()}\" is not a valid URL`);\r\n }\r\n\r\n let restUrl = `${context.getBaseUrl()}/${urlTemplate}`;\r\n\r\n restUrl = restUrl.replace(/([^:]\\/)\\/+/g, '$1');\r\n\r\n // validate baseUrl + urlTemplate\r\n if (!Service.isValidUrl(String(restUrl))) {\r\n throw new Error(`Rest url \"${restUrl}\" is not a valid URL`);\r\n }\r\n\r\n const request = {\r\n url: restUrl,\r\n method: method.toLowerCase(),\r\n responseType: 'json',\r\n headers: {},\r\n transformRequest: [(data, headers) => {\r\n if (headers['Content-Type'] === 'application/x-www-form-urlencoded') {\r\n return Service.toQueryString(data);\r\n }\r\n return data;\r\n }],\r\n };\r\n\r\n if (['put', 'post', 'patch'].indexOf(request.method) >= 0) {\r\n if (request.method === 'post') {\r\n request.headers['Content-Type'] = 'application/x-www-form-urlencoded';\r\n }\r\n request.data = params;\r\n } else {\r\n request.params = params;\r\n }\r\n\r\n switch (context.getSecurityMode()) {\r\n // Basic Auth\r\n case Constants.BASIC_AUTHENTICATION:\r\n if (!context.getUsername()) throw new Error('Missing parameter \"username\"');\r\n if (!context.getPassword()) throw new Error('Missing parameter \"password\"');\r\n\r\n request.auth = {\r\n username: context.getUsername(),\r\n password: context.getPassword(),\r\n };\r\n break;\r\n // ApiKey Auth\r\n case Constants.APIKEY_IDENTIFICATION:\r\n if (!context.getApiKey()) throw new Error('Missing parameter \"apiKey\"');\r\n\r\n request.headers.Authorization = `Basic ${btoa(`apiKey:${context.getApiKey()}`)}`;\r\n break;\r\n default:\r\n throw new Error('Unknown security mode');\r\n }\r\n\r\n return axios(request)\r\n .then((response) => {\r\n httpXHR = response;\r\n return response;\r\n })\r\n .catch((error) => {\r\n httpXHR = error;\r\n\r\n if (error.response) {\r\n // The request was made and the server responded with a status code\r\n // that falls out of the range of 2xx\r\n const info = error.response.data.infos.info[0] || null;\r\n\r\n if (info && info.id === 'NotFoundException') {\r\n return Promise.resolve(null);\r\n }\r\n\r\n const reasonPhrase = info.value || 'Unknown';\r\n throw new Error(`Unsupported response status code ${error.response.status}: ${reasonPhrase}`);\r\n }\r\n\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n /**\r\n * Create Entity from item\r\n * @param resultType\r\n * @param item\r\n * @returns {*}\r\n */\r\n static getEntity(resultType, item) {\r\n const properties = item.property || null;\r\n const lists = item.list || null;\r\n\r\n if (!resultType) return item;\r\n\r\n // eslint-disable-next-line new-cap\r\n const entity = new resultType();\r\n\r\n if (!(entity instanceof BaseEntity)) {\r\n throw new Error(`Invalid entity ${resultType}, entity must be instanceof BaseEntity`);\r\n }\r\n\r\n properties.forEach(({ name, value }) => {\r\n entity.setProperty(name, value);\r\n });\r\n\r\n if (lists) {\r\n lists.forEach(({ name, property }) => {\r\n const setListMethod = `setList${name.charAt(0).toUpperCase()}${name.substr(1, name.length - 1)}`;\r\n const setListsMethod = 'setLists';\r\n\r\n if (typeof entity[setListMethod] !== 'function' && typeof entity[setListsMethod] !== 'function') {\r\n // eslint-disable-next-line no-console\r\n console.warn(`Methods: ${setListMethod},${setListsMethod} not found in ${item.type} \r\n for list property ${name}`);\r\n return;\r\n }\r\n\r\n if (typeof entity[setListMethod] === 'function') {\r\n entity[setListMethod](property);\r\n return;\r\n }\r\n\r\n if (typeof entity[setListsMethod] === 'function') {\r\n entity[setListsMethod](name, property);\r\n }\r\n });\r\n }\r\n\r\n return entity;\r\n }\r\n\r\n static isValidUrl(url) {\r\n const pattern = new RegExp('^(https?:\\\\/\\\\/)?' + // protocol\r\n '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.?)+[a-z]{2,}|' + // domain name\r\n '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))' + // OR ip (v4) address\r\n '(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*' + // port and path\r\n '(\\\\?[;&a-z\\\\d%_.~+=-]*)?' + // query string\r\n '(\\\\#[-a-z\\\\d_]*)?$', 'i'); // fragment locator\r\n\r\n return pattern.test(url);\r\n }\r\n\r\n static toQueryString(data, prefix) {\r\n const query = [];\r\n\r\n const has = Object.prototype.hasOwnProperty;\r\n\r\n Object.keys(data).forEach((key) => {\r\n if (has.call(data, key)) {\r\n const k = prefix ? `${prefix}[${key}]` : key;\r\n let v = data[key];\r\n v = (v instanceof Date) ? v.toISOString() : v;\r\n query.push((v !== null && typeof v === 'object') ?\r\n Service.toQueryString(v, k) :\r\n `${encodeURIComponent(k)}=${encodeURIComponent(v)}`);\r\n }\r\n });\r\n\r\n return query.join('&').replace(/%5B[0-9]+%5D=/g, '=');\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport Token from '../entities/Token';\r\nimport Constants from '../Constants';\r\nimport Service from './Service';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\n/**\r\n * JS representation of the Token Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services\r\n *\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Creates new token.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services#TokenServices-Createtoken\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param token NetLicensing.Token\r\n *\r\n * return created token in promise\r\n * @returns {Promise}\r\n */\r\n create(context, token) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(token instanceof Token)) {\r\n throw new TypeError('token must be an instance of Token');\r\n }\r\n\r\n return Service\r\n .post(context, Constants.Token.ENDPOINT_PATH, token.asPropertiesMap(), Token);\r\n },\r\n\r\n /**\r\n * Gets token by its number..See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/conluence/display/NetLicensing PUB/Token+Services#TokenServices-Gettoken\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the token number\r\n * @param number\r\n *\r\n * return the token in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of NetLicensing.Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n return Service\r\n .get(context, `${Constants.Token.ENDPOINT_PATH}/${number}`, {}, Token);\r\n },\r\n\r\n /**\r\n * Returns tokens of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services#TokenServices-Tokenslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * array of token entities or empty array if nothing found.\r\n * @return array\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.Token.ENDPOINT_PATH, queryParams, Token);\r\n },\r\n\r\n /**\r\n * Delete token by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services#TokenServices-Deletetoken\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the token number\r\n * @param number string\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of NetLicensing.Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n return Service\r\n .delete(context, `${Constants.Token.ENDPOINT_PATH}/${number}`);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport Transaction from '../entities/Transaction';\r\nimport Constants from '../Constants';\r\nimport Service from './Service';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\n/**\r\n * JS representation of the Transaction Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services\r\n *\r\n * Transaction is created each time change to LicenseService licenses happens. For instance licenses are\r\n * obtained by a licensee, licenses disabled by vendor, licenses deleted, etc. Transaction is created no matter what\r\n * source has initiated the change to licenses: it can be either a direct purchase of licenses by a licensee via\r\n * NetLicensing Shop, or licenses can be given to a licensee by a vendor. Licenses can also be assigned implicitly by\r\n * NetLicensing if it is defined so by a license model (e.g. evaluation license may be given automatically). All these\r\n * events are reflected in transactions. Of all the transaction handling routines only read-only routines are exposed to\r\n * the public API, as transactions are only allowed to be created and modified by NetLicensing internally.\r\n *\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Creates new transaction object with given properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Createtransaction\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param transaction NetLicensing.Transaction\r\n *\r\n * return the newly created transaction object in promise\r\n * @returns {Promise}\r\n */\r\n create(context, transaction) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(transaction instanceof Transaction)) {\r\n throw new TypeError('transaction must be an instance of Transaction');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .post(context, Constants.Transaction.ENDPOINT_PATH, transaction.asPropertiesMap(), Transaction);\r\n },\r\n\r\n /**\r\n * Gets transaction by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Gettransaction\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the transaction number\r\n * @param number string\r\n *\r\n * return the transaction in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .get(context, `${Constants.Transaction.ENDPOINT_PATH}/${number}`, {}, Transaction);\r\n },\r\n\r\n /**\r\n * Returns all transactions of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Transactionslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string\r\n *\r\n * array of transaction entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.Transaction.ENDPOINT_PATH, queryParams, Transaction);\r\n },\r\n\r\n /**\r\n * Updates transaction properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Updatetransaction\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * transaction number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param transaction NetLicensing.Transaction\r\n *\r\n * return updated transaction in promise.\r\n * @returns {Promise}\r\n */\r\n update(context, number, transaction) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of NetLicensing.Context');\r\n }\r\n\r\n if (!(transaction instanceof Transaction)) {\r\n throw new TypeError('transaction must be an instance of NetLicensing.Transaction');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const path = `${Constants.Transaction.ENDPOINT_PATH}/${number}`;\r\n\r\n return Service\r\n .post(context, path, transaction.asPropertiesMap(), Transaction);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport Constants from '../Constants';\r\nimport Service from './Service';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport Country from '../entities/Country';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\n/**\r\n * JS representation of the Utility Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Utility+Services\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Returns all license types. See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Utility+Services#UtilityServices-LicenseTypeslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * array of available license types or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n listLicenseTypes(context) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .list(context, `${Constants.Utility.ENDPOINT_PATH}/licenseTypes`)\r\n .then(items => items.map(item => item.property[0].value));\r\n },\r\n\r\n /**\r\n * Returns all license models. See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Utility+Services#UtilityServices-LicensingModelslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * array of available license models or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n listLicensingModels(context) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .list(context, `${Constants.Utility.ENDPOINT_PATH}/licensingModels`)\r\n .then(items => items.map(item => item.property[0].value));\r\n },\r\n\r\n /**\r\n * Returns all countries.\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter\r\n *\r\n * collection of available countries or null/empty list if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n listCountries(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, `${Constants.Utility.ENDPOINT_PATH}/countries`, queryParams, Country);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\n// Cast an attribute to a native JS type.\r\nexport default (key, value) => {\r\n switch (key.trim().toLowerCase()) {\r\n case 'str':\r\n case 'string':\r\n return String(value);\r\n case 'int':\r\n case 'integer':\r\n return parseInt(value, 10);\r\n case 'float':\r\n case 'double':\r\n return parseFloat(value);\r\n case 'bool':\r\n case 'boolean':\r\n switch (value) {\r\n case 'true':\r\n case 'TRUE':\r\n return true;\r\n case 'false':\r\n case 'FALSE':\r\n return false;\r\n default:\r\n return Boolean(value);\r\n }\r\n case 'date':\r\n return (value === 'now') ? 'now' : new Date(String(value));\r\n default:\r\n return value;\r\n }\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nexport default {\r\n isValid(value) {\r\n let valid = (value !== undefined && typeof value !== 'function');\r\n if (typeof value === 'number') valid = Number.isFinite(value) && !Number.isNaN(value);\r\n return valid;\r\n },\r\n\r\n paramNotNull(parameter, parameterName) {\r\n if (!this.isValid(parameter)) throw new TypeError(`Parameter ${parameterName} has bad value ${parameter}`);\r\n if (parameter === null) throw new TypeError(`Parameter ${parameterName} cannot be null`);\r\n },\r\n\r\n paramNotEmpty(parameter, parameterName) {\r\n if (!this.isValid(parameter)) throw new TypeError(`Parameter ${parameterName} has bad value ${parameter}`);\r\n if (!parameter) throw new TypeError(`Parameter ${parameterName} cannot be null or empty string`);\r\n },\r\n};\r\n","export default {\r\n FILTER_DELIMITER: ';',\r\n FILTER_PAIR_DELIMITER: '=',\r\n encode(filter = {}) {\r\n const query = [];\r\n const has = Object.prototype.hasOwnProperty;\r\n Object.keys(filter).forEach((key) => {\r\n if (has.call(filter, key)) {\r\n query.push(`${encodeURIComponent(key)}${this.FILTER_PAIR_DELIMITER}${encodeURIComponent(filter[key])}`);\r\n }\r\n });\r\n return query.join(this.FILTER_DELIMITER);\r\n },\r\n decode(query = '') {\r\n const filter = {};\r\n query.split(this.FILTER_DELIMITER).forEach((v) => {\r\n const [name, value] = v.split(this.FILTER_PAIR_DELIMITER);\r\n filter[name] = value;\r\n });\r\n return filter;\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport Constants from '../Constants';\r\nimport CheckUtils from '../util/CheckUtils';\r\n\r\n/**\r\n * The context values.\r\n * @type {{}}\r\n * @private\r\n */\r\nconst valuesMap = new WeakMap();\r\n\r\n/**\r\n * List of values that was defined\r\n * @type {{}}\r\n * @private\r\n */\r\nconst definedMap = new WeakMap();\r\n\r\n/**\r\n * Context defaults\r\n * @type {{baseUrl: string, securityMode}}\r\n * @private\r\n */\r\nconst defaultsMap = new WeakMap();\r\n\r\nexport default class Context {\r\n constructor(values) {\r\n defaultsMap.set(this, {\r\n baseUrl: 'https://go.netlicensing.io/core/v2/rest',\r\n securityMode: Constants.BASIC_AUTHENTICATION,\r\n });\r\n\r\n valuesMap.set(this, {});\r\n\r\n definedMap.set(this, {});\r\n\r\n this.setValues(Object.assign({}, defaultsMap.get(this), values));\r\n }\r\n\r\n setBaseUrl(baseUrl) {\r\n return this.setValue('baseUrl', baseUrl);\r\n }\r\n\r\n getBaseUrl(def) {\r\n return this.getValue('baseUrl', def);\r\n }\r\n\r\n setUsername(username) {\r\n return this.setValue('username', username);\r\n }\r\n\r\n getUsername(def) {\r\n return this.getValue('username', def);\r\n }\r\n\r\n setPassword(password) {\r\n return this.setValue('password', password);\r\n }\r\n\r\n getPassword(def) {\r\n return this.getValue('password', def);\r\n }\r\n\r\n setApiKey(apiKey) {\r\n return this.setValue('apiKey', apiKey);\r\n }\r\n\r\n getApiKey(def) {\r\n return this.getValue('apiKey', def);\r\n }\r\n\r\n setSecurityMode(securityMode) {\r\n return this.setValue('securityMode', securityMode);\r\n }\r\n\r\n getSecurityMode(def) {\r\n return this.getValue('securityMode', def);\r\n }\r\n\r\n setVendorNumber(vendorNumber) {\r\n return this.setValue('vendorNumber', vendorNumber);\r\n }\r\n\r\n getVendorNumber(def) {\r\n return this.getValue('vendorNumber', def);\r\n }\r\n\r\n /**\r\n * Set a given values on the context.\r\n * @param key\r\n * @param value\r\n * @returns {Context}\r\n */\r\n setValue(key, value) {\r\n // check values\r\n if (!CheckUtils.isValid(key) || typeof key === 'object') throw new Error(`Bad value key:${key}`);\r\n if (!CheckUtils.isValid(value)) throw new Error(`Value ${key} has wrong value${value}`);\r\n\r\n // define keys\r\n this.define(key);\r\n\r\n let copedValue = value;\r\n\r\n if (typeof value === 'object') {\r\n copedValue = (Array.isArray(value)) ? Object.assign([], value) : Object.assign({}, value);\r\n }\r\n\r\n const values = valuesMap.get(this);\r\n values[key] = copedValue;\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Set the array of context values.\r\n * @param values\r\n * @returns {Context}\r\n */\r\n setValues(values) {\r\n this.removeValues();\r\n\r\n const has = Object.prototype.hasOwnProperty;\r\n\r\n Object.keys(values).forEach((key) => {\r\n if (has.call(values, key)) {\r\n this.setValue(key, values[key]);\r\n }\r\n });\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Get an value from the context.\r\n * @param key\r\n * @param def\r\n * @returns {*}\r\n */\r\n getValue(key, def) {\r\n return valuesMap.get(this)[key] || def;\r\n }\r\n\r\n /**\r\n * Get all of the current value on the context.\r\n */\r\n getValues() {\r\n return Object.assign({}, valuesMap.get(this));\r\n }\r\n\r\n /**\r\n * Remove value\r\n * @param key\r\n * @returns {Context}\r\n */\r\n removeValue(key) {\r\n const values = valuesMap.get(this);\r\n delete values[key];\r\n\r\n this.removeDefine(key);\r\n return this;\r\n }\r\n\r\n /**\r\n * Remove values\r\n * @param keys\r\n */\r\n removeValues(keys) {\r\n const keysAr = keys || Object.keys(valuesMap.get(this));\r\n keysAr.forEach(key => this.removeValue(key));\r\n }\r\n\r\n /**\r\n * Define value getter and setter\r\n * @param key\r\n * @param onlyGetter\r\n * @private\r\n */\r\n define(key, onlyGetter) {\r\n if (this.hasDefine(key)) return;\r\n\r\n if (!CheckUtils.isValid(key) || typeof property === 'object') {\r\n throw new TypeError(`Bad value name:${key}`);\r\n }\r\n\r\n const self = this;\r\n\r\n // delete property\r\n delete this[key];\r\n\r\n const descriptors = {\r\n enumerable: true,\r\n configurable: true,\r\n get() {\r\n return self.getValue(key);\r\n },\r\n };\r\n\r\n if (!onlyGetter) {\r\n descriptors.set = value => self.setValue(key, value);\r\n }\r\n\r\n const defined = definedMap.get(this);\r\n defined[key] = true;\r\n\r\n Object.defineProperty(this, key, descriptors);\r\n }\r\n\r\n /**\r\n * Check if value has defined\r\n * @param key\r\n * @private\r\n */\r\n hasDefine(key) {\r\n return Boolean(definedMap.get(this)[key]);\r\n }\r\n\r\n /**\r\n * Remove value getter and setter\r\n * @param key\r\n * @private\r\n */\r\n removeDefine(key) {\r\n if (!this.hasDefine(key)) return;\r\n\r\n const defined = definedMap.get(this);\r\n delete defined[key];\r\n\r\n delete this[key];\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\n/**\r\n * Validation parameters map\r\n *\r\n * @type {WeakMap}\r\n */\r\nconst vpMap = new WeakMap();\r\n\r\nexport default class ValidationParameters {\r\n constructor() {\r\n vpMap.set(this, { parameters: {} });\r\n }\r\n\r\n /**\r\n * Sets the target product\r\n *\r\n * optional productNumber, must be provided in case licensee auto-create is enabled\r\n * @param productNumber\r\n * @returns {ValidationParameters}\r\n */\r\n setProductNumber(productNumber) {\r\n vpMap.get(this).productNumber = productNumber;\r\n return this;\r\n }\r\n\r\n /**\r\n * Get the target product\r\n * @returns {*}\r\n */\r\n getProductNumber() {\r\n return vpMap.get(this).productNumber;\r\n }\r\n\r\n /**\r\n * Sets the name for the new licensee\r\n *\r\n * optional human-readable licensee name in case licensee will be auto-created. This parameter must not\r\n * be the name, but can be used to store any other useful string information with new licensees, up to\r\n * 1000 characters.\r\n * @param licenseeName\r\n * @returns {NetLicensing.ValidationParameters}\r\n */\r\n setLicenseeName(licenseeName) {\r\n vpMap.get(this).licenseeName = licenseeName;\r\n return this;\r\n }\r\n\r\n /**\r\n * Get the licensee name\r\n * @returns {*}\r\n */\r\n getLicenseeName() {\r\n return vpMap.get(this).licenseeName;\r\n }\r\n\r\n /**\r\n * Sets the licensee secret\r\n *\r\n * licensee secret stored on the client side. Refer to Licensee Secret documentation for details.\r\n * @param licenseeSecret\r\n * @returns {ValidationParameters}\r\n */\r\n setLicenseeSecret(licenseeSecret) {\r\n vpMap.get(this).licenseeSecret = licenseeSecret;\r\n return this;\r\n }\r\n\r\n /**\r\n * Get the licensee secret\r\n * @returns {*}\r\n */\r\n getLicenseeSecret() {\r\n return vpMap.get(this).licenseeSecret;\r\n }\r\n\r\n /**\r\n * Get validation parameters\r\n * @returns {*}\r\n */\r\n getParameters() {\r\n return Object.assign({}, vpMap.get(this).parameters);\r\n }\r\n\r\n getProductModuleValidationParameters(productModuleNumber) {\r\n return Object.assign({}, vpMap.get(this).parameters[productModuleNumber]);\r\n }\r\n\r\n setProductModuleValidationParameters(productModuleNumber, productModuleParameters) {\r\n const { parameters } = vpMap.get(this);\r\n\r\n if (parameters[productModuleNumber] === undefined || !Object.keys(parameters[productModuleNumber]).length) {\r\n parameters[productModuleNumber] = {};\r\n }\r\n\r\n parameters[productModuleNumber] = Object.assign(parameters[productModuleNumber], productModuleParameters);\r\n\r\n return this;\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport CheckUtils from '../util/CheckUtils';\r\n\r\n/**\r\n * Validation result map\r\n * @type {WeakMap}\r\n */\r\nconst vr = new WeakMap();\r\n\r\nexport default class ValidationResults {\r\n constructor() {\r\n vr.set(this, { validators: {} });\r\n }\r\n\r\n getValidators() {\r\n return Object.assign({}, vr.get(this).validators);\r\n }\r\n\r\n setProductModuleValidation(productModuleNumber, productModuleValidation) {\r\n if (!CheckUtils.isValid(productModuleNumber) || typeof productModuleNumber === 'object') {\r\n throw new TypeError(`Bad productModuleNumber:${productModuleNumber}`);\r\n }\r\n\r\n vr.get(this).validators[productModuleNumber] = productModuleValidation;\r\n\r\n return this;\r\n }\r\n\r\n getProductModuleValidation(productModuleNumber) {\r\n if (!CheckUtils.isValid(productModuleNumber) || typeof productModuleNumber === 'object') {\r\n throw new TypeError(`Bad productModuleNumber:${productModuleNumber}`);\r\n }\r\n\r\n return vr.get(this).validators[productModuleNumber];\r\n }\r\n\r\n setTtl(ttl) {\r\n if (!CheckUtils.isValid(ttl) || typeof ttl === 'object') {\r\n throw new TypeError(`Bad ttl:${ttl}`);\r\n }\r\n vr.get(this).ttl = new Date(String(ttl));\r\n\r\n return this;\r\n }\r\n\r\n getTtl() {\r\n return (vr.get(this).ttl) ? new Date(vr.get(this).ttl) : undefined;\r\n }\r\n\r\n toString() {\r\n let data = 'ValidationResult [';\r\n\r\n const validators = this.getValidators();\r\n const has = Object.prototype.hasOwnProperty;\r\n\r\n Object.keys(validators).forEach((productModuleNumber) => {\r\n data += `ProductModule<${productModuleNumber}>`;\r\n if (has.call(validators, productModuleNumber)) {\r\n data += JSON.stringify(validators[productModuleNumber]);\r\n }\r\n });\r\n\r\n data += ']';\r\n\r\n return data;\r\n }\r\n}\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://NetLicensing/webpack/universalModuleDefinition","webpack://NetLicensing/webpack/bootstrap","webpack://NetLicensing/./node_modules/axios/index.js","webpack://NetLicensing/./node_modules/axios/lib/adapters/xhr.js","webpack://NetLicensing/./node_modules/axios/lib/axios.js","webpack://NetLicensing/./node_modules/axios/lib/cancel/Cancel.js","webpack://NetLicensing/./node_modules/axios/lib/cancel/CancelToken.js","webpack://NetLicensing/./node_modules/axios/lib/cancel/isCancel.js","webpack://NetLicensing/./node_modules/axios/lib/core/Axios.js","webpack://NetLicensing/./node_modules/axios/lib/core/InterceptorManager.js","webpack://NetLicensing/./node_modules/axios/lib/core/createError.js","webpack://NetLicensing/./node_modules/axios/lib/core/dispatchRequest.js","webpack://NetLicensing/./node_modules/axios/lib/core/enhanceError.js","webpack://NetLicensing/./node_modules/axios/lib/core/settle.js","webpack://NetLicensing/./node_modules/axios/lib/core/transformData.js","webpack://NetLicensing/./node_modules/axios/lib/defaults.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/bind.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/btoa.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/buildURL.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/combineURLs.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/cookies.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/normalizeHeaderName.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/parseHeaders.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/spread.js","webpack://NetLicensing/./node_modules/axios/lib/utils.js","webpack://NetLicensing/./node_modules/is-buffer/index.js","webpack://NetLicensing/./node_modules/process/browser.js","webpack://NetLicensing/./src/Constants.js","webpack://NetLicensing/./src/entities/BaseEntity.js","webpack://NetLicensing/./src/entities/Country.js","webpack://NetLicensing/./src/entities/License.js","webpack://NetLicensing/./src/entities/LicenseTemplate.js","webpack://NetLicensing/./src/entities/LicenseTransactionJoin.js","webpack://NetLicensing/./src/entities/Licensee.js","webpack://NetLicensing/./src/entities/PaymentMethod.js","webpack://NetLicensing/./src/entities/Product.js","webpack://NetLicensing/./src/entities/ProductDiscount.js","webpack://NetLicensing/./src/entities/ProductModule.js","webpack://NetLicensing/./src/entities/Token.js","webpack://NetLicensing/./src/entities/Transaction.js","webpack://NetLicensing/./src/netlicensing-client.js","webpack://NetLicensing/./src/services/LicenseService.js","webpack://NetLicensing/./src/services/LicenseTemplateService.js","webpack://NetLicensing/./src/services/LicenseeService.js","webpack://NetLicensing/./src/services/PaymentMethodService.js","webpack://NetLicensing/./src/services/ProductModuleService.js","webpack://NetLicensing/./src/services/ProductService.js","webpack://NetLicensing/./src/services/Service.js","webpack://NetLicensing/./src/services/TokenService.js","webpack://NetLicensing/./src/services/TransactionService.js","webpack://NetLicensing/./src/services/UtilityService.js","webpack://NetLicensing/./src/util/CastsUtils.js","webpack://NetLicensing/./src/util/CheckUtils.js","webpack://NetLicensing/./src/util/FilterUtils.js","webpack://NetLicensing/./src/vo/Context.js","webpack://NetLicensing/./src/vo/ValidationParameters.js","webpack://NetLicensing/./src/vo/ValidationResults.js"],"names":["BASIC_AUTHENTICATION","APIKEY_IDENTIFICATION","LicensingModel","VALID","TryAndBuy","NAME","Rental","RED_THRESHOLD","YELLOW_THRESHOLD","Subscription","Floating","MultiFeature","PayPerUse","PricingTable","Quota","LicenseTemplate","ENDPOINT_PATH","LicenseType","FEATURE","TIMEVOLUME","FLOATING","QUANTITY","Product","LicenseeSecretMode","DISABLED","PREDEFINED","CLIENT","Token","Type","DEFAULT","SHOP","APIKEY","Transaction","Status","CANCELLED","CLOSED","PENDING","Licensee","ENDPOINT_PATH_VALIDATE","ENDPOINT_PATH_TRANSFER","License","PaymentMethod","ProductModule","Utility","propertiesMap","WeakMap","definedMap","castsMap","readOnlyMap","BaseEntity","properties","casts","readOnly","set","setProperties","property","value","hasProperty","isPropertyReadOnly","TypeError","isValid","castedValue","cast","define","get","setProperty","removeProperties","has","Object","prototype","hasOwnProperty","keys","forEach","key","call","def","assign","removeDefine","propertiesForRemove","removeProperty","indexOf","Boolean","hasDefine","self","descriptors","enumerable","configurable","getProperty","defined","defineProperty","onlyGetter","getProperties","customProperties","Country","code","name","vatPercent","isEu","defines","vat","number","active","price","hidden","parentfeature","timeVolume","startDate","inUse","licenseType","currency","automatic","hideLicenses","maxSessions","quantity","LicenseTransactionJoin","transaction","license","licenseeSecret","markedForTransfer","paypalSubject","discountsMap","discountsTouched","version","description","licensingInfo","licenseeAutoCreate","licenseeSecretMode","discount","discounts","push","Array","isArray","addDiscount","length","map","toString","ProductDiscount","totalPrice","amountFix","amountPercent","getTotalPrice","getCurrency","amount","getAmountFix","getAmountPercent","licensingModel","maxCheckoutValidity","yellowThreshold","redThreshold","licenseTemplate","expirationTime","vendorNumber","tokenType","licenseeNumber","successURL","successURLTitle","cancelURL","cancelURLTitle","shopURL","status","source","grandTotal","dateCreated","dateClosed","paymentMethod","licenseTransactionJoins","licenseTransactionJoin","setLicense","setTransaction","NetLicensing","Constants","Context","ValidationParameters","ValidationResults","Service","LicenseeService","LicenseService","LicenseTemplateService","PaymentMethodService","ProductModuleService","ProductService","TokenService","TransactionService","UtilityService","CastsUtils","CheckUtils","FilterUtils","module","exports","default","create","context","licenseTemplateNumber","transactionNumber","paramNotEmpty","setSecurityMode","post","asPropertiesMap","list","filter","queryParams","encode","update","delete","forceCascade","productModuleNumber","path","productNumber","licensee","validate","validationParameters","getProductNumber","getLicenseeName","licenseeName","getLicenseeSecret","pmIndex","parameters","getParameters","productModuleName","parameter","then","item","data","validationResults","JSON","parse","e","setProductModuleValidation","setTtl","getLastHttpRequestInfo","ttl","transfer","sourceLicenseeNumber","productModule","product","httpXHR","urlTemplate","resultType","request","response","getEntity","items","method","template","String","params","toLowerCase","Error","getBaseUrl","isValidUrl","restUrl","replace","url","responseType","headers","transformRequest","toQueryString","getSecurityMode","getUsername","getPassword","auth","username","password","getApiKey","Authorization","btoa","catch","error","info","infos","id","Promise","resolve","reasonPhrase","reject","lists","entity","setListMethod","charAt","toUpperCase","substr","setListsMethod","console","warn","type","pattern","RegExp","test","prefix","query","k","v","Date","toISOString","encodeURIComponent","join","token","listLicenseTypes","listLicensingModels","listCountries","trim","parseInt","parseFloat","valid","undefined","Number","isFinite","isNaN","paramNotNull","parameterName","FILTER_DELIMITER","FILTER_PAIR_DELIMITER","decode","split","valuesMap","defaultsMap","values","baseUrl","securityMode","setValues","setValue","getValue","apiKey","copedValue","removeValues","keysAr","removeValue","vpMap","productModuleParameters","vr","validators","productModuleValidation","getValidators","stringify"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;ACnEA,6F;;;;;;;;;;;;ACAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;ACnLA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;;;;;;;ACnDA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;;AClBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;ACxDA;;AAEA;AACA;AACA;;;;;;;;;;;;;ACJA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,kCAAkC,cAAc;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAED;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;;AAED;;;;;;;;;;;;;AC9EA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;;;;;;;;;;;;ACnDA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjBA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B;AAC/B,uCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;;;;;;;;;;;;ACrFA;;AAEA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpBA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACzBA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,MAAM;AACjB,WAAW,eAAe;AAC1B,aAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;;;;;;+CCnBA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,OAAO,YAAY;AACnB;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;;AAED;;;;;;;;;;;;;;AC/FA;;AAEA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACVA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;ACnCA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACjEA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wCAAwC;AACxC,OAAO;;AAEP;AACA,0DAA0D,wBAAwB;AAClF;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,gCAAgC;AAChC,6BAA6B,aAAa,EAAE;AAC5C;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;ACpDA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACbA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,OAAO;AACrB,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;ACnEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;ACXA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,eAAe;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;;;;;;ACpDA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC1BA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,OAAO;AAC1C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,2BAA2B;AAC3B;AACA;AACA,WAAW,OAAO;AAClB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9SA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACpBA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;;;;;;;;;;;ACvLtC;;;;;;;kBAOe;AACXA,0BAAsB,YADX;AAEXC,2BAAuB,QAFZ;;AAIXC,oBAAgB;AACZC,eAAO,OADK;AAEZC,mBAAW;AACPC,kBAAM;AADC,SAFC;AAKZC,gBAAQ;AACJD,kBAAM,QADF;AAEJE,2BAAe,cAFX;AAGJC,8BAAkB;AAHd,SALI;AAUZC,sBAAc;AACVJ,kBAAM;AADI,SAVF;AAaZK,kBAAU;AACNL,kBAAM;AADA,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AOA,GAAP,yCAAOA,GAAP,OAAe,QAA/C,EAAyD;AACrD,sBAAM,IAAI3K,SAAJ,cAAyB2K,GAAzB,CAAN;AACH;AACDmG,eAAGzQ,GAAH,CAAO,IAAP,EAAasK,GAAb,GAAmB,IAAI8D,IAAJ,CAAShD,OAAOd,GAAP,CAAT,CAAnB;;AAEA,mBAAO,IAAP;AACH;;;iCAEQ;AACL,mBAAQmG,GAAGzQ,GAAH,CAAO,IAAP,EAAasK,GAAd,GAAqB,IAAI8D,IAAJ,CAASqC,GAAGzQ,GAAH,CAAO,IAAP,EAAasK,GAAtB,CAArB,GAAkD0E,SAAzD;AACH;;;mCAEU;AACP,gBAAIlF,OAAO,oBAAX;;AAEA,gBAAM4G,aAAa,KAAKE,aAAL,EAAnB;AACA,gBAAMzQ,MAAMC,OAAOC,SAAP,CAAiBC,cAA7B;;AAEAF,mBAAOG,IAAP,CAAYmQ,UAAZ,EAAwBlQ,OAAxB,CAAgC,UAACqI,mBAAD,EAAyB;AACrDiB,2CAAyBjB,mBAAzB;AACA,oBAAI1I,IAAIO,IAAJ,CAASgQ,UAAT,EAAqB7H,mBAArB,CAAJ,EAA+C;AAC3CiB,4BAAQE,KAAK6G,SAAL,CAAeH,WAAW7H,mBAAX,CAAf,CAAR;AACH;AACJ,aALD;;AAOAiB,oBAAQ,GAAR;;AAEA,mBAAOA,IAAP;AACH;;;;;;kBAxDgBjD,iB","file":"netlicensing-client.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"NetLicensing\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"NetLicensing\"] = factory();\n\telse\n\t\troot[\"NetLicensing\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/netlicensing-client.js\");\n","module.exports = require('./lib/axios');","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || require('./../helpers/btoa');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n var loadEvent = 'onreadystatechange';\n var xDomain = false;\n\n // For IE 8/9 CORS support\n // Only supports POST and GET calls and doesn't returns the response headers.\n // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n if (process.env.NODE_ENV !== 'test' &&\n typeof window !== 'undefined' &&\n window.XDomainRequest && !('withCredentials' in request) &&\n !isURLSameOrigin(config.url)) {\n request = new window.XDomainRequest();\n loadEvent = 'onload';\n xDomain = true;\n request.onprogress = function handleProgress() {};\n request.ontimeout = function handleTimeout() {};\n }\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request[loadEvent] = function handleLoad() {\n if (!request || (request.readyState !== 4 && !xDomain)) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201)\n status: request.status === 1223 ? 204 : request.status,\n statusText: request.status === 1223 ? 'No Content' : request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar defaults = require('./../defaults');\nvar utils = require('./../utils');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, {method: 'get'}, this.defaults, config);\n config.method = config.method.toLowerCase();\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","'use strict';\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n this.message = 'String contains an invalid character';\n}\nE.prototype = new Error;\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n var str = String(input);\n var output = '';\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars;\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new E();\n }\n block = block << 8 | charCode;\n }\n return output;\n}\n\nmodule.exports = btoa;\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\nvar isBuffer = require('is-buffer');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nexport default {\n BASIC_AUTHENTICATION: 'BASIC_AUTH',\n APIKEY_IDENTIFICATION: 'APIKEY',\n\n LicensingModel: {\n VALID: 'valid',\n TryAndBuy: {\n NAME: 'TryAndBuy',\n },\n Rental: {\n NAME: 'Rental',\n RED_THRESHOLD: 'redThreshold',\n YELLOW_THRESHOLD: 'yellowThreshold',\n },\n Subscription: {\n NAME: 'Subscription',\n },\n Floating: {\n NAME: 'Floating',\n },\n MultiFeature: {\n NAME: 'MultiFeature',\n },\n PayPerUse: {\n NAME: 'PayPerUse',\n },\n PricingTable: {\n NAME: 'PricingTable',\n },\n Quota: {\n NAME: 'Quota',\n },\n },\n\n LicenseTemplate: {\n ENDPOINT_PATH: 'licensetemplate',\n LicenseType: {\n FEATURE: 'FEATURE',\n TIMEVOLUME: 'TIMEVOLUME',\n FLOATING: 'FLOATING',\n QUANTITY: 'QUANTITY',\n },\n },\n\n Product: {\n ENDPOINT_PATH: 'product',\n LicenseeSecretMode: {\n DISABLED: 'DISABLED',\n PREDEFINED: 'PREDEFINED',\n CLIENT: 'CLIENT',\n },\n },\n\n Token: {\n ENDPOINT_PATH: 'token',\n Type: {\n DEFAULT: 'DEFAULT',\n SHOP: 'SHOP',\n APIKEY: 'APIKEY',\n },\n },\n\n Transaction: {\n ENDPOINT_PATH: 'transaction',\n Status: {\n CANCELLED: 'CANCELLED',\n CLOSED: 'CLOSED',\n PENDING: 'PENDING',\n },\n },\n\n Licensee: {\n ENDPOINT_PATH: 'licensee',\n ENDPOINT_PATH_VALIDATE: 'validate',\n ENDPOINT_PATH_TRANSFER: 'transfer',\n },\n\n License: {\n ENDPOINT_PATH: 'license',\n },\n\n PaymentMethod: {\n ENDPOINT_PATH: 'paymentmethod',\n },\n\n ProductModule: {\n ENDPOINT_PATH: 'productmodule',\n },\n\n Utility: {\n ENDPOINT_PATH: 'utility',\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport CheckUtils from '../util/CheckUtils';\nimport CastsUtils from '../util/CastsUtils';\n\n/**\n * The entity properties.\n * @type {{}}\n * @private\n */\nconst propertiesMap = new WeakMap();\n\n/**\n * List of properties that was defined\n * @type {{}}\n * @private\n */\n\nconst definedMap = new WeakMap();\n\n/**\n * List of properties that need be casts\n * @type {{}}\n * @private\n */\nconst castsMap = new WeakMap();\n\n/**\n * List of properties that has read-only access\n * @type {{}}\n * @private\n */\nconst readOnlyMap = new WeakMap();\n\nexport default class BaseEntity {\n constructor({ properties, casts, readOnly }) {\n propertiesMap.set(this, {});\n definedMap.set(this, {});\n castsMap.set(this, casts || []);\n readOnlyMap.set(this, readOnly || []);\n\n if (properties) {\n this.setProperties(properties);\n }\n }\n\n /**\n * Set a given property on the entity.\n * @param property\n * @param value\n * @returns {BaseEntity}\n */\n setProperty(property, value) {\n // if property has read-only access and was initialized at least once\n if (this.hasProperty(property) && this.isPropertyReadOnly(property)) {\n throw new TypeError(`Property ${property} has read-only access`);\n }\n\n // if property name has bad native type\n if (!CheckUtils.isValid(property) || typeof property === 'object') {\n throw new TypeError(`Bad property name:${property}`);\n }\n\n // if property value has bad native type\n if (!CheckUtils.isValid(value)) {\n throw new TypeError(`Property ${property} has bad value ${value}`);\n }\n\n const castedValue = this.cast(property, value);\n\n // check if property value after cast has bad native type\n if (!CheckUtils.isValid(value)) {\n throw new TypeError(`Property ${property} has bad cast value ${castedValue}`);\n }\n\n // define to property\n this.define(property);\n\n // save property to propertiesMap\n const properties = propertiesMap.get(this);\n properties[property] = castedValue;\n\n return this;\n }\n\n /**\n * Alias for setProperty\n * @param property\n * @param value\n * @returns {BaseEntity}\n */\n addProperty(property, value) {\n return this.setProperty(property, value);\n }\n\n /**\n * Set the entity properties.\n * @param properties\n * @returns {BaseEntity}\n */\n setProperties(properties) {\n this.removeProperties();\n\n const has = Object.prototype.hasOwnProperty;\n\n Object.keys(properties).forEach((key) => {\n if (has.call(properties, key)) {\n this.setProperty(key, properties[key]);\n }\n });\n\n return this;\n }\n\n /**\n * Check if we has property\n * @param property\n * @protected\n */\n hasProperty(property) {\n return Object.prototype.hasOwnProperty.call(propertiesMap.get(this), property);\n }\n\n /**\n * Get an property from the entity.\n * @param property\n * @param def\n * @returns {*}\n */\n getProperty(property, def) {\n return Object.prototype.hasOwnProperty.call(propertiesMap.get(this), property)\n ? propertiesMap.get(this)[property]\n : def;\n }\n\n /**\n * Get all of the current properties on the entity.\n */\n getProperties() {\n return Object.assign({}, propertiesMap.get(this));\n }\n\n /**\n * Remove property\n * @param property\n * @returns {BaseEntity}\n */\n removeProperty(property) {\n const properties = propertiesMap.get(this);\n delete properties[property];\n this.removeDefine(property);\n return this;\n }\n\n /**\n * Remove properties\n * @param properties\n */\n removeProperties(properties) {\n const propertiesForRemove = properties || Object.keys(propertiesMap.get(this));\n\n propertiesForRemove.forEach((property) => {\n this.removeProperty(property);\n });\n }\n\n isPropertyReadOnly(property) {\n return readOnlyMap.get(this).indexOf(property) >= 0;\n }\n\n cast(property, value) {\n if (!castsMap.get(this)[property]) return value;\n\n return CastsUtils(castsMap.get(this)[property], value);\n }\n\n /**\n * Check if property has defined\n * @param property\n * @protected\n */\n hasDefine(property) {\n return Boolean(definedMap.get(this)[property]);\n }\n\n /**\n * Define property getter and setter\n * @param property\n * @protected\n */\n define(property) {\n if (this.hasDefine(property)) return;\n\n if (!CheckUtils.isValid(property) || typeof property === 'object') {\n throw new TypeError(`Bad property name:${property}`);\n }\n\n const self = this;\n\n // delete property\n delete this[property];\n\n const descriptors = {\n enumerable: true,\n configurable: true,\n get() {\n return self.getProperty(property);\n },\n };\n\n if (!this.isPropertyReadOnly(property)) {\n descriptors.set = value => self.setProperty(property, value);\n }\n\n const defined = definedMap.get(this);\n defined[property] = true;\n\n Object.defineProperty(this, property, descriptors);\n }\n\n /**\n * Remove property getter and setter\n * @param property\n * @protected\n */\n removeDefine(property) {\n if (!this.hasDefine(property)) return;\n\n const defined = definedMap.get(this);\n delete defined[property];\n\n delete this[property];\n }\n\n /**\n * Define properties getter and setter\n * @param properties\n * @param onlyGetter\n * @protected\n */\n defines(properties, onlyGetter) {\n properties.forEach((property) => {\n this.define(property, onlyGetter);\n });\n }\n\n /**\n * Get properties map\n */\n asPropertiesMap() {\n const properties = this.getProperties();\n const customProperties = {};\n\n const has = Object.prototype.hasOwnProperty;\n\n Object.keys(this).forEach((key) => {\n if (!has.call(this, key)) return;\n if (!CheckUtils.isValid(this[key])) return;\n\n customProperties[key] = this[key];\n });\n\n return Object.assign({}, customProperties, properties);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\n\n/**\n * Country entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * @property code - Unique code of country.\n *\n * @property name - Unique name of country\n *\n * @property vatPercent - Country vat.\n *\n * @property isEu - is country in EU.\n */\nexport default class Country extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n code: 'string',\n name: 'string',\n vatPercent: 'int',\n isEu: 'boolean',\n },\n });\n\n // define default entity properties\n this.defines(['code', 'name', 'vatPercent', 'isEu']);\n }\n\n setCode(code) {\n return this.setProperty('code', code);\n }\n\n getCode(def) {\n return this.getProperty('code', def);\n }\n\n setName(name) {\n return this.setProperty('name', name);\n }\n\n getName(def) {\n return this.getProperty('name', def);\n }\n\n setVatPercent(vat) {\n return this.setProperty('vatPercent', vat);\n }\n\n getVatPercent(def) {\n return this.getProperty('vatPercent', def);\n }\n\n setIsEu(isEu) {\n return this.setProperty('isEu', isEu);\n }\n\n getIsEu(def) {\n return this.getProperty('isEu', def);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\n\n/**\n * License entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can\n * assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation\n * transaction status is set to closed.\n * @property string number\n *\n * Name for the licensed item. Set from license template on creation, if not specified explicitly.\n * @property string name\n *\n * If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled,\n * the license is excluded from the validation process.\n * @property boolean active\n *\n * price for the license. If >0, it must always be accompanied by the currency specification. Read-only,\n * set from license template on creation.\n * @property float price\n *\n * specifies currency for the license price. Check data types to discover which currencies are\n * supported. Read-only, set from license template on creation.\n * @property string currency\n *\n * If set to true, this license is not shown in NetLicensing Shop as purchased license. Set from license\n * template on creation, if not specified explicitly.\n * @property boolean $hidden\n *\n * @property string startDate\n *\n * Arbitrary additional user properties of string type may be associated with each license. The name of user property\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, licenseeNumber,\n * licenseTemplateNumber.\n */\nexport default class License extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n active: 'boolean',\n name: 'string',\n price: 'float',\n hidden: 'boolean',\n parentfeature: 'string',\n timeVolume: 'int',\n startDate: 'date',\n inUse: 'boolean',\n },\n // The attributes that should have read-only access.\n readOnly: ['inUse', 'currency', 'price'],\n });\n\n // define default entity properties\n this.defines([\n 'number',\n 'active',\n 'name',\n 'hidden',\n 'parentfeature',\n 'timeVolume',\n 'startDate',\n 'inUse',\n 'currency',\n 'price',\n ]);\n }\n\n setNumber(number) {\n return this.setProperty('number', number);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setActive(active) {\n return this.setProperty('active', active);\n }\n\n getActive(def) {\n return this.getProperty('active', def);\n }\n\n setName(name) {\n return this.setProperty('name', name);\n }\n\n getName(def) {\n return this.getProperty('name', def);\n }\n\n setHidden(hidden) {\n return this.setProperty('hidden', hidden);\n }\n\n getHidden(def) {\n return this.getProperty('hidden', def);\n }\n\n setParentfeature(parentfeature) {\n return this.setProperty('parentfeature', parentfeature);\n }\n\n getParentfeature(def) {\n return this.getProperty('parentfeature', def);\n }\n\n setTimeVolume(timeVolume) {\n return this.setProperty('timeVolume', timeVolume);\n }\n\n getTimeVolume(def) {\n return this.getProperty('timeVolume', def);\n }\n\n setStartDate(startDate) {\n return this.setProperty('startDate', startDate);\n }\n\n getStartDate(def) {\n return this.getProperty('startDate', def);\n }\n\n getInUse(def) {\n return this.getProperty('inUse', def);\n }\n\n getPrice(def) {\n return this.getProperty('price', def);\n }\n\n getCurrency(def) {\n return this.getProperty('currency', def);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\n\n/**\n * License template entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number (across all products of a vendor) that identifies the license template. Vendor can\n * assign this number when creating a license template or let NetLicensing generate one.\n * Read-only after creation of the first license from this license template.\n * @property string number\n *\n * If set to false, the license template is disabled. Licensee can not obtain any new licenses off this\n * license template.\n * @property boolean active\n *\n * Name for the licensed item.\n * @property string name\n *\n * Type of licenses created from this license template. Supported types: \"FEATURE\", \"TIMEVOLUME\",\n * \"FLOATING\", \"QUANTITY\"\n * @property string licenseType\n *\n * Price for the license. If >0, it must always be accompanied by the currency specification.\n * @property double price\n *\n * Specifies currency for the license price. Check data types to discover which currencies are\n * supported.\n * @property string currency\n *\n * If set to true, every new licensee automatically gets one license out of this license template on\n * creation. Automatic licenses must have their price set to 0.\n * @property boolean automatic\n *\n * If set to true, this license template is not shown in NetLicensing Shop as offered for purchase.\n * @property boolean hidden\n *\n * If set to true, licenses from this license template are not visible to the end customer, but\n * participate in validation.\n * @property boolean hideLicenses\n *\n * Mandatory for 'TIMEVOLUME' license type.\n * @property integer timeVolume\n *\n * Mandatory for 'FLOATING' license type.\n * @property integer maxSessions\n *\n * Mandatory for 'QUANTITY' license type.\n * @property integer quantity\n *\n * @constructor\n */\nexport default class LicenseTemplate extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n active: 'boolean',\n name: 'string',\n licenseType: 'string',\n price: 'double',\n currency: 'string',\n automatic: 'boolean',\n hidden: 'boolean',\n hideLicenses: 'boolean',\n timeVolume: 'int',\n maxSessions: 'int',\n quantity: 'int',\n inUse: 'boolean',\n },\n // The attributes that should have read-only access.\n readOnly: ['inUse'],\n });\n\n // define default entity properties\n this.defines([\n 'number',\n 'active',\n 'name',\n 'licenseType',\n 'price',\n 'currency',\n 'automatic',\n 'hidden',\n 'hideLicenses',\n 'timeVolume',\n 'maxSessions',\n 'quantity',\n 'inUse',\n ]);\n }\n\n setNumber(number) {\n return this.setProperty('number', number);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setActive(active) {\n return this.setProperty('active', active);\n }\n\n getActive(def) {\n return this.getProperty('active', def);\n }\n\n setName(name) {\n return this.setProperty('name', name);\n }\n\n getName(def) {\n return this.getProperty('name', def);\n }\n\n setLicenseType(licenseType) {\n return this.setProperty('licenseType', licenseType);\n }\n\n getLicenseType(def) {\n return this.getProperty('licenseType', def);\n }\n\n setPrice(price) {\n return this.setProperty('price', price);\n }\n\n getPrice(def) {\n return this.getProperty('price', def);\n }\n\n setCurrency(currency) {\n return this.setProperty('currency', currency);\n }\n\n getCurrency(def) {\n return this.getProperty('currency', def);\n }\n\n setAutomatic(automatic) {\n return this.setProperty('automatic', automatic);\n }\n\n getAutomatic(def) {\n return this.getProperty('automatic', def);\n }\n\n setHidden(hidden) {\n return this.setProperty('hidden', hidden);\n }\n\n getHidden(def) {\n return this.getProperty('hidden', def);\n }\n\n setHideLicenses(hideLicenses) {\n return this.setProperty('hideLicenses', hideLicenses);\n }\n\n getHideLicenses(def) {\n return this.getProperty('hideLicenses', def);\n }\n\n setTimeVolume(timeVolume) {\n return this.setProperty('timeVolume', timeVolume);\n }\n\n getTimeVolume(def) {\n return this.getProperty('timeVolume', def);\n }\n\n setMaxSessions(maxSessions) {\n return this.setProperty('maxSessions', maxSessions);\n }\n\n getMaxSessions(def) {\n return this.getProperty('maxSessions', def);\n }\n\n setQuantity(quantity) {\n return this.setProperty('quantity', quantity);\n }\n\n getQuantity(def) {\n return this.getProperty('quantity', def);\n }\n\n getInUse(def) {\n return this.getProperty('inUse', def);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nimport Transaction from './Transaction';\nimport License from './License';\n\n// const\n\nexport default class LicenseTransactionJoin {\n constructor(transaction, license) {\n this.transaction = transaction;\n this.license = license;\n }\n\n setTransaction(transaction) {\n if (!(transaction instanceof Transaction)) {\n throw new TypeError('context must be an instance of Transaction');\n }\n\n this.transaction = transaction;\n return this;\n }\n\n getTransaction(def) {\n return this.transaction || def;\n }\n\n setLicense(license) {\n if (!(license instanceof License)) {\n throw new TypeError('context must be an instance of License');\n }\n this.license = license;\n return this;\n }\n\n getLicense(def) {\n return this.license || def;\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\n\n/**\n * Licensee entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number (across all products of a vendor) that identifies the licensee. Vendor can assign this\n * number when creating a licensee or let NetLicensing generate one. Read-only after creation of the first license for\n * the licensee.\n * @property string number\n *\n * Licensee name.\n * @property string name\n *\n * If set to false, the licensee is disabled. Licensee can not obtain new licenses, and validation is\n * disabled (tbd).\n * @property boolean active\n *\n * Licensee Secret for licensee\n * @property string licenseeSecret\n *\n * Mark licensee for transfer.\n * @property boolean markedForTransfer\n *\n * Arbitrary additional user properties of string type may be associated with each licensee. The name of user property\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, productNumber\n *\n * @constructor\n */\nexport default class Licensee extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n active: 'boolean',\n name: 'string',\n licenseeSecret: 'string',\n markedForTransfer: 'boolean',\n inUse: 'boolean',\n },\n // The attributes that should have read-only access.\n readOnly: ['inUse'],\n });\n\n // define default entity properties\n this.defines(['number', 'active', 'name', 'licenseeSecret', 'markedForTransfer', 'inUse']);\n }\n\n setNumber(number) {\n return this.setProperty('number', number);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setActive(active) {\n return this.setProperty('active', active);\n }\n\n getActive(def) {\n return this.getProperty('active', def);\n }\n\n setName(name) {\n return this.setProperty('name', name);\n }\n\n getName(def) {\n return this.getProperty('name', def);\n }\n\n setLicenseeSecret(licenseeSecret) {\n return this.setProperty('licenseeSecret', licenseeSecret);\n }\n\n getLicenseeSecret(def) {\n return this.getProperty('licenseeSecret', def);\n }\n\n setMarkedForTransfer(markedForTransfer) {\n return this.setProperty('markedForTransfer', markedForTransfer);\n }\n\n getMarkedForTransfer(def) {\n return this.getProperty('markedForTransfer', def);\n }\n\n getInUse(def) {\n return this.getProperty('inUse', def);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\n\n/**\n * PaymentMethod entity used internally by NetLicensing.\n *\n * @property string number\n * @property boolean active\n *\n * @constructor\n */\nexport default class PaymentMethod extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n active: 'boolean',\n 'paypal.subject': 'string',\n },\n // The attributes that should have read-only access.\n readOnly: ['inUse'],\n });\n\n // define default entity properties\n this.defines(['number', 'active', 'paypal.subject']);\n }\n\n setNumber(number) {\n return this.setProperty('number', number);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setActive(active) {\n return this.setProperty('active', active);\n }\n\n getActive(def) {\n return this.getProperty('active', def);\n }\n\n setPaypalSubject(paypalSubject) {\n return this.setProperty('paypal.subject', paypalSubject);\n }\n\n getPaypalSubject(def) {\n return this.getProperty('paypal.subject', def);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\nimport ProductDiscount from './ProductDiscount';\n\n/**\n * The discounts map\n * @type {{}}\n * @private\n */\nconst discountsMap = new WeakMap();\n\n/**\n * An identifier that show if discounts was touched\n * @type {{}}\n * @private\n */\nconst discountsTouched = new WeakMap();\n\n/**\n * NetLicensing Product entity.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number that identifies the product. Vendor can assign this number when creating a product or\n * let NetLicensing generate one. Read-only after creation of the first licensee for the product.\n * @property string number\n *\n * If set to false, the product is disabled. No new licensees can be registered for the product,\n * existing licensees can not obtain new licenses.\n * @property boolean active\n *\n * Product name. Together with the version identifies the product for the end customer.\n * @property string name\n *\n * Product version. Convenience parameter, additional to the product name.\n * @property float version\n *\n * If set to 'true', non-existing licensees will be created at first validation attempt.\n * @property boolean licenseeAutoCreate\n *\n * Licensee secret mode for product.Supported types: \"DISABLED\", \"PREDEFINED\", \"CLIENT\"\n * @property boolean licenseeSecretMode\n *\n * Product description. Optional.\n * @property string description\n *\n * Licensing information. Optional.\n * @property string licensingInfo\n *\n * @property boolean inUse\n *\n * Arbitrary additional user properties of string type may be associated with each product. The name of user property\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted.\n *\n * @constructor\n */\nexport default class Product extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n active: 'boolean',\n name: 'string',\n version: 'string',\n description: 'string',\n licensingInfo: 'string',\n licenseeAutoCreate: 'boolean',\n licenseeSecretMode: 'string',\n inUse: 'boolean',\n },\n // The attributes that should have read-only access.\n readOnly: ['inUse'],\n });\n\n // define default entity properties\n this.defines([\n 'number',\n 'active',\n 'name',\n 'version',\n 'description',\n 'licensingInfo',\n 'licenseeAutoCreate',\n 'licenseeSecretMode',\n 'inUse',\n ]);\n\n discountsMap.set(this, []);\n discountsTouched.set(this, false);\n }\n\n setNumber(number) {\n return this.setProperty('number', number);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setActive(active) {\n return this.setProperty('active', active);\n }\n\n getActive(def) {\n return this.getProperty('active', def);\n }\n\n setName(name) {\n return this.setProperty('name', name);\n }\n\n getName(def) {\n return this.getProperty('name', def);\n }\n\n setVersion(version) {\n return this.setProperty('version', version);\n }\n\n getVersion(def) {\n return this.getProperty('version', def);\n }\n\n setLicenseeAutoCreate(licenseeAutoCreate) {\n return this.setProperty('licenseeAutoCreate', licenseeAutoCreate);\n }\n\n getLicenseeAutoCreate(def) {\n return this.getProperty('licenseeAutoCreate', def);\n }\n\n setLicenseeSecretMode(licenseeSecretMode) {\n return this.setProperty('licenseeSecretMode', licenseeSecretMode);\n }\n\n getLicenseeSecretMode(def) {\n return this.getProperty('licenseeSecretMode', def);\n }\n\n setDescription(description) {\n return this.setProperty('description', description);\n }\n\n getDescription(def) {\n return this.getProperty('description', def);\n }\n\n setLicensingInfo(licensingInfo) {\n return this.setProperty('licensingInfo', licensingInfo);\n }\n\n getLicensingInfo(def) {\n return this.getProperty('licensingInfo', def);\n }\n\n getInUse(def) {\n return this.getProperty('inUse', def);\n }\n\n /**\n * Add discount to product\n *\n * @param discount NetLicensing.ProductDiscount\n * @returns {NetLicensing.Product}\n */\n addDiscount(discount) {\n if (!(discount instanceof ProductDiscount)) {\n throw new TypeError('discount must be an instance of ProductDiscount');\n }\n\n const discounts = discountsMap.get(this);\n discounts.push(discount);\n discountsMap.set(this, discounts);\n discountsTouched.set(this, true);\n\n return this;\n }\n\n /**\n * Set discounts to product\n * @param discounts\n */\n setProductDiscounts(discounts) {\n discountsMap.set(this, []);\n discountsTouched.set(this, true);\n\n if (!discounts) return this;\n\n if (Array.isArray(discounts)) {\n discounts.forEach((discount) => {\n this.addDiscount(discount);\n });\n\n return this;\n }\n\n this.addDiscount(discounts);\n\n return this;\n }\n\n /**\n * Get array of objects discounts\n * @returns {Array}\n */\n getProductDiscounts() {\n return Object.assign([], discountsMap.get(this));\n }\n\n setListDiscount(properties) {\n if (!properties) return;\n\n const discount = new ProductDiscount();\n properties.forEach((property) => {\n discount.setProperty(property.name, property.value);\n });\n this.addDiscount(discount);\n }\n\n asPropertiesMap() {\n const propertiesMap = super.asPropertiesMap();\n\n if (discountsMap.get(this).length) {\n propertiesMap.discount = discountsMap.get(this).map(discount => discount.toString());\n }\n\n if (!propertiesMap.discount && discountsTouched.get(this)) {\n propertiesMap.discount = '';\n }\n\n return propertiesMap;\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nimport BaseEntity from './BaseEntity';\n\nexport default class ProductDiscount extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n totalPrice: 'float',\n currency: 'string',\n amountFix: 'float',\n amountPercent: 'int',\n },\n });\n\n // define default entity properties\n this.defines(['totalPrice', 'currency', 'amountFix', 'amountPercent']);\n }\n\n setTotalPrice(totalPrice) {\n return this.setProperty('totalPrice', totalPrice);\n }\n\n getTotalPrice(def) {\n return this.getProperty('totalPrice', def);\n }\n\n setCurrency(currency) {\n return this.setProperty('currency', currency);\n }\n\n getCurrency(def) {\n return this.getProperty('currency', def);\n }\n\n setAmountFix(amountFix) {\n return this.setProperty('amountFix', amountFix).removeProperty('amountPercent');\n }\n\n getAmountFix(def) {\n return this.getProperty('amountFix', def);\n }\n\n setAmountPercent(amountPercent) {\n return this.setProperty('amountPercent', amountPercent).removeProperty('amountFix');\n }\n\n getAmountPercent(def) {\n return this.getProperty('amountPercent', def);\n }\n\n toString() {\n const totalPrice = this.getTotalPrice();\n const currency = this.getCurrency();\n let amount = 0;\n\n if (this.getAmountFix(null)) amount = this.getAmountFix();\n if (this.getAmountPercent(null)) amount = `${this.getAmountPercent()}%`;\n\n return `${totalPrice};${currency};${amount}`;\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\n\n/**\n * Product module entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number (across all products of a vendor) that identifies the product module. Vendor can assign\n * this number when creating a product module or let NetLicensing generate one. Read-only after creation of the first\n * licensee for the product.\n * @property string number\n *\n * If set to false, the product module is disabled. Licensees can not obtain any new licenses for this\n * product module.\n * @property boolean active\n *\n * Product module name that is visible to the end customers in NetLicensing Shop.\n * @property string name\n *\n * Licensing model applied to this product module. Defines what license templates can be\n * configured for the product module and how licenses for this product module are processed during validation.\n * @property string licensingModel\n *\n * Maximum checkout validity (days). Mandatory for 'Floating' licensing model.\n * @property integer maxCheckoutValidity\n *\n * Remaining time volume for yellow level. Mandatory for 'Rental' licensing model.\n * @property integer yellowThreshold\n *\n * Remaining time volume for red level. Mandatory for 'Rental' licensing model.\n * @property integer redThreshold\n *\n * License template. Mandatory for 'Try & Buy' licensing model. Supported types: \"TIMEVOLUME\", \"FEATURE\".\n * @property string licenseTemplate\n *\n * @constructor\n */\nexport default class ProductModule extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n active: 'boolean',\n name: 'string',\n licensingModel: 'string',\n maxCheckoutValidity: 'int',\n yellowThreshold: 'int',\n redThreshold: 'int',\n licenseTemplate: 'string',\n inUse: 'boolean',\n },\n // The attributes that should have read-only access.\n readOnly: ['inUse'],\n });\n\n // define default entity properties\n this.defines([\n 'number',\n 'active',\n 'name',\n 'licensingModel',\n 'maxCheckoutValidity',\n 'yellowThreshold',\n 'redThreshold',\n 'licenseTemplate',\n 'inUse',\n ]);\n }\n\n setNumber(number) {\n return this.setProperty('number', number);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setActive(active) {\n return this.setProperty('active', active);\n }\n\n getActive(def) {\n return this.getProperty('active', def);\n }\n\n setName(name) {\n return this.setProperty('name', name);\n }\n\n getName(def) {\n return this.getProperty('name', def);\n }\n\n setLicensingModel(licensingModel) {\n return this.setProperty('licensingModel', licensingModel);\n }\n\n getLicensingModel(def) {\n return this.getProperty('licensingModel', def);\n }\n\n setMaxCheckoutValidity(maxCheckoutValidity) {\n return this.setProperty('maxCheckoutValidity', maxCheckoutValidity);\n }\n\n getMaxCheckoutValidity(def) {\n return this.getProperty('maxCheckoutValidity', def);\n }\n\n setYellowThreshold(yellowThreshold) {\n return this.setProperty('yellowThreshold', yellowThreshold);\n }\n\n getYellowThreshold(def) {\n return this.getProperty('yellowThreshold', def);\n }\n\n setRedThreshold(redThreshold) {\n return this.setProperty('redThreshold', redThreshold);\n }\n\n getRedThreshold(def) {\n return this.getProperty('redThreshold', def);\n }\n\n setLicenseTemplate(licenseTemplate) {\n return this.setProperty('licenseTemplate', licenseTemplate);\n }\n\n getLicenseTemplate(def) {\n return this.getProperty('licenseTemplate', def);\n }\n\n getInUse(def) {\n return this.getProperty('inUse', def);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\n\n/**\n * Product module entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number\n * @property string number\n *\n * If set to false, the token is disabled.\n * @property boolean active\n *\n * Expiration Time\n * @property string expirationTime\n *\n * @property string vendorNumber\n *\n * Token type to be generated.\n * DEFAULT - default one-time token (will be expired after first request)\n * SHOP - shop token is used to redirect customer to the netlicensingShop(licenseeNumber is mandatory)\n * APIKEY - APIKey-token\n * @property string tokenType\n *\n * @property string licenseeNumber\n *\n * @constructor\n */\nexport default class Token extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n active: 'boolean',\n expirationTime: 'date',\n vendorNumber: 'string',\n tokenType: 'string',\n licenseeNumber: 'string',\n successURL: 'string',\n successURLTitle: 'string',\n cancelURL: 'string',\n cancelURLTitle: 'string',\n shopURL: 'string',\n },\n // The attributes that should have read-only access.\n readOnly: ['number', 'shopURL'],\n });\n\n // define default entity properties\n this.defines([\n 'number',\n 'active',\n 'expirationTime',\n 'vendorNumber',\n 'tokenType',\n 'licenseeNumber',\n 'successURL',\n 'successURLTitle',\n 'cancelURL',\n 'cancelURLTitle',\n 'shopURL',\n ]);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setActive(active) {\n return this.setProperty('active', active);\n }\n\n getActive(def) {\n return this.getProperty('active', def);\n }\n\n setExpirationTime(expirationTime) {\n return this.setProperty('expirationTime', expirationTime);\n }\n\n getExpirationTime(def) {\n return this.getProperty('expirationTime', def);\n }\n\n setVendorNumber(vendorNumber) {\n return this.setProperty('vendorNumber', vendorNumber);\n }\n\n getVendorNumber(def) {\n return this.getProperty('vendorNumber', def);\n }\n\n setTokenType(tokenType) {\n return this.setProperty('tokenType', tokenType);\n }\n\n getTokenType(def) {\n return this.getProperty('tokenType', def);\n }\n\n setLicenseeNumber(licenseeNumber) {\n return this.setProperty('licenseeNumber', licenseeNumber);\n }\n\n getLicenseeNumber(def) {\n return this.getProperty('licenseeNumber', def);\n }\n\n setSuccessURL(successURL) {\n return this.setProperty('successURL', successURL);\n }\n\n getSuccessURL(def) {\n return this.getProperty('successURL', def);\n }\n\n setSuccessURLTitle(successURLTitle) {\n return this.setProperty('successURLTitle', successURLTitle);\n }\n\n getSuccessURLTitle(def) {\n return this.getProperty('successURLTitle', def);\n }\n\n setCancelURL(cancelURL) {\n return this.setProperty('cancelURL', cancelURL);\n }\n\n getCancelURL(def) {\n return this.getProperty('cancelURL', def);\n }\n\n setCancelURLTitle(cancelURLTitle) {\n return this.setProperty('cancelURLTitle', cancelURLTitle);\n }\n\n getCancelURLTitle(def) {\n return this.getProperty('cancelURLTitle', def);\n }\n\n getShopURL(def) {\n return this.getProperty('shopURL', def);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\nimport LicenseTransactionJoin from './LicenseTransactionJoin';\nimport License from './License';\n\n/**\n * Transaction entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number (across all products of a vendor) that identifies the transaction. This number is\n * always generated by NetLicensing.\n * @property string number\n *\n * always true for transactions\n * @property boolean active\n *\n * Status of transaction. \"CANCELLED\", \"CLOSED\", \"PENDING\".\n * @property string status\n *\n * \"SHOP\". AUTO transaction for internal use only.\n * @property string source\n *\n * grand total for SHOP transaction (see source).\n * @property float grandTotal\n *\n * discount for SHOP transaction (see source).\n * @property float discount\n *\n * specifies currency for money fields (grandTotal and discount). Check data types to discover which\n * @property string currency\n *\n * Date created. Optional.\n * @property string dateCreated\n *\n * Date closed. Optional.\n * @property string dateClosed\n *\n * @constructor\n */\nexport default class Transaction extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n name: 'string',\n status: 'string',\n source: 'string',\n grandTotal: 'float',\n discount: 'float',\n currency: 'string',\n dateCreated: 'date',\n dateClosed: 'date',\n active: 'boolean',\n paymentMethod: 'string',\n },\n // The attributes that should have read-only access.\n readOnly: ['active'],\n });\n\n // define default entity properties\n this.defines([\n 'number',\n 'name',\n 'status',\n 'source',\n 'grandTotal',\n 'discount',\n 'currency',\n 'dateCreated',\n 'dateClosed',\n 'paymentMethod',\n 'licenseTransactionJoins',\n ]);\n }\n\n setNumber(number) {\n return this.setProperty('number', number);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setName(name) {\n return this.setProperty('name', name);\n }\n\n getName(def) {\n return this.getProperty('name', def);\n }\n\n setStatus(status) {\n return this.setProperty('status', status);\n }\n\n getStatus(def) {\n return this.getProperty('status', def);\n }\n\n setSource(source) {\n return this.setProperty('source', source);\n }\n\n getSource(def) {\n return this.getProperty('source', def);\n }\n\n setGrandTotal(grandTotal) {\n return this.setProperty('grandTotal', grandTotal);\n }\n\n getGrandTotal(def) {\n return this.getProperty('grandTotal', def);\n }\n\n setDiscount(discount) {\n return this.setProperty('discount', discount);\n }\n\n getDiscount(def) {\n return this.getProperty('discount', def);\n }\n\n setCurrency(currency) {\n return this.setProperty('currency', currency);\n }\n\n getCurrency(def) {\n return this.getProperty('currency', def);\n }\n\n setDateCreated(dateCreated) {\n return this.setProperty('dateCreated', dateCreated);\n }\n\n getDateCreated(def) {\n return this.getProperty('dateCreated', def);\n }\n\n setDateClosed(dateClosed) {\n return this.setProperty('dateClosed', dateClosed);\n }\n\n getDateClosed(def) {\n return this.getProperty('dateClosed', def);\n }\n\n setPaymentMethod(paymentMethod) {\n return this.setProperty('paymentMethod', paymentMethod);\n }\n\n getPaymentMethod(def) {\n return this.getProperty('paymentMethod', def);\n }\n\n setActive() {\n return this.setProperty('active', true);\n }\n\n getLicenseTransactionJoins(def) {\n return this.getProperty('licenseTransactionJoins', def);\n }\n\n setLicenseTransactionJoins(licenseTransactionJoins) {\n return this.setProperty('licenseTransactionJoins', licenseTransactionJoins);\n }\n\n setListLicenseTransactionJoin(properties) {\n if (!properties) return;\n\n const licenseTransactionJoins = this.getProperty('licenseTransactionJoins', []);\n const licenseTransactionJoin = new LicenseTransactionJoin();\n\n properties.forEach((property) => {\n if (property.name === 'licenseNumber') {\n licenseTransactionJoin.setLicense(new License({ number: property.value }));\n }\n\n if (property.name === 'transactionNumber') {\n licenseTransactionJoin.setTransaction(new Transaction({ number: property.value }));\n }\n });\n\n licenseTransactionJoins.push(licenseTransactionJoin);\n this.setProperty('licenseTransactionJoins', licenseTransactionJoins);\n }\n}\n","// Constants\nimport Constants from './Constants';\n// VO\nimport Context from './vo/Context';\n\n// Services\nimport Service from './services/Service';\nimport LicenseeService from './services/LicenseeService';\nimport LicenseService from './services/LicenseService';\nimport LicenseTemplateService from './services/LicenseTemplateService';\nimport PaymentMethodService from './services/PaymentMethodService';\nimport ProductModuleService from './services/ProductModuleService';\nimport ProductService from './services/ProductService';\nimport TokenService from './services/TokenService';\nimport TransactionService from './services/TransactionService';\nimport UtilityService from './services/UtilityService';\n\n// Entities\nimport Country from './entities/Country';\nimport License from './entities/License';\nimport Licensee from './entities/Licensee';\nimport LicenseTemplate from './entities/LicenseTemplate';\nimport PaymentMethod from './entities/PaymentMethod';\nimport Product from './entities/Product';\nimport ProductDiscount from './entities/ProductDiscount';\nimport ProductModule from './entities/ProductModule';\nimport Token from './entities/Token';\nimport Transaction from './entities/Transaction';\nimport LicenseTransactionJoin from './entities/LicenseTransactionJoin';\nimport ValidationParameters from './vo/ValidationParameters';\nimport ValidationResults from './vo/ValidationResults';\n\n// Utils\nimport CastsUtils from './util/CastsUtils';\nimport CheckUtils from './util/CheckUtils';\nimport FilterUtils from './util/FilterUtils';\n\n\n// Create the default instance to be exported\nconst NetLicensing = {\n // Constants\n Constants,\n\n // Expose VO\n Context,\n ValidationParameters,\n ValidationResults,\n\n // Expose Services\n Service,\n LicenseeService,\n LicenseService,\n LicenseTemplateService,\n PaymentMethodService,\n ProductModuleService,\n ProductService,\n TokenService,\n TransactionService,\n UtilityService,\n\n // Expose Entities\n Country,\n License,\n Licensee,\n LicenseTemplate,\n PaymentMethod,\n Product,\n ProductDiscount,\n ProductModule,\n Token,\n Transaction,\n LicenseTransactionJoin,\n\n // Expose Utils\n CastsUtils,\n CheckUtils,\n FilterUtils,\n};\n\nmodule.exports = NetLicensing;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = NetLicensing;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport License from '../entities/License';\nimport CheckUtils from '../util/CheckUtils';\nimport Constants from '../Constants';\nimport Service from './Service';\nimport FilterUtils from '../util/FilterUtils';\n\n/**\n * JS representation of the License Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NLICPUB/License+Services\n *\n * @constructor\n */\n\nexport default {\n /**\n * Creates new license object with given properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Createlicense\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * parent licensee to which the new license is to be added\n * @param licenseeNumber string\n *\n * license template that the license is created from\n * @param licenseTemplateNumber string\n *\n * For privileged logins specifies transaction for the license creation. For regular logins new\n * transaction always created implicitly, and the operation will be in a separate transaction.\n * Transaction is generated with the provided transactionNumber, or, if transactionNumber is null, with\n * auto-generated number.\n * @param transactionNumber null|string\n *\n * non-null properties will be taken for the new object, null properties will either stay null, or will\n * be set to a default value, depending on property.\n * @param license NetLicensing.License\n *\n * return the newly created license object in promise\n * @returns {Promise}\n */\n create(context, licenseeNumber, licenseTemplateNumber, transactionNumber, license) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(license instanceof License)) {\n throw new TypeError('license must be an instance of License');\n }\n\n CheckUtils.paramNotEmpty(licenseeNumber, 'licenseeNumber');\n CheckUtils.paramNotEmpty(licenseTemplateNumber, 'licenseTemplateNumber');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n license.setProperty('licenseeNumber', licenseeNumber);\n license.setProperty('licenseTemplateNumber', licenseTemplateNumber);\n\n if (transactionNumber) license.setProperty('transactionNumber', transactionNumber);\n\n return Service\n .post(context, Constants.License.ENDPOINT_PATH, license.asPropertiesMap(), License);\n },\n\n\n /**\n * Gets license by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Getlicense\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the license number\n * @param number string\n *\n * return the license in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .get(context, `${Constants.License.ENDPOINT_PATH}/${number}`, {}, License);\n },\n\n /**\n * Returns licenses of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Licenseslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string|null\n *\n * return array of licenses (of all products) or empty array if nothing found in promise.\n * @returns {Promise}\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.License.ENDPOINT_PATH, queryParams, License);\n },\n\n /**\n * Updates license properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Updatelicense\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * license number\n * @param number string\n *\n * transaction for the license update. Created implicitly if transactionNumber is null. In this case the\n * operation will be in a separate transaction.\n * @param transactionNumber string|null\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param license NetLicensing.License\n *\n * return updated license in promise.\n * @returns {Promise}\n */\n update(context, number, transactionNumber, license) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(license instanceof License)) {\n throw new TypeError('license must be an instance of License');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n if (transactionNumber) license.setProperty('transactionNumber', transactionNumber);\n\n return Service\n .post(context, `${Constants.License.ENDPOINT_PATH}/${number}`, license.asPropertiesMap(), License);\n },\n\n /**\n * Deletes license.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Deletelicense\n *\n * When any license is deleted, corresponding transaction is created automatically.\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * license number\n * @param number string\n *\n * if true, any entities that depend on the one being deleted will be deleted too\n * @param forceCascade boolean\n *\n * return boolean state of delete in promise\n * @returns {Promise}\n */\n delete(context, number, forceCascade) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n const queryParams = { forceCascade: Boolean(forceCascade) };\n\n return Service\n .delete(context, `${Constants.License.ENDPOINT_PATH}/${number}`, queryParams);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport LicenseTemplate from '../entities/LicenseTemplate';\nimport CheckUtils from '../util/CheckUtils';\nimport Constants from '../Constants';\nimport Service from './Service';\nimport FilterUtils from '../util/FilterUtils';\n\n/**\n * JS representation of the ProductModule Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services\n *\n * @constructor\n */\n\nexport default {\n /**\n * Creates new license template object with given properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Createlicensetemplate\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * parent product module to which the new license template is to be added\n * @param productModuleNumber\n *\n * non-null properties will be taken for the new object, null properties will either stay null, or will\n * be set to a default value, depending on property.\n * @param licenseTemplate NetLicensing.LicenseTemplate\n *\n * the newly created license template object in promise\n * @returns {Promise}\n */\n create(context, productModuleNumber, licenseTemplate) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(licenseTemplate instanceof LicenseTemplate)) {\n throw new TypeError('licenseTemplate must be an instance of LicenseTemplate');\n }\n\n CheckUtils.paramNotEmpty(productModuleNumber, 'productModuleNumber');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n licenseTemplate.setProperty('productModuleNumber', productModuleNumber);\n\n return Service\n .post(context, Constants.LicenseTemplate.ENDPOINT_PATH, licenseTemplate.asPropertiesMap(), LicenseTemplate);\n },\n\n /**\n * Gets license template by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Getlicensetemplate\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the license template number\n * @param number string\n *\n * return the license template object in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .get(context, `${Constants.LicenseTemplate.ENDPOINT_PATH}/${number}`, {}, LicenseTemplate);\n },\n\n /**\n * Returns all license templates of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Licensetemplateslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string|null\n *\n * array of license templates (of all products/modules) or null/empty list if nothing found in promise.\n * @returns {Promise}\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.LicenseTemplate.ENDPOINT_PATH, queryParams, LicenseTemplate);\n },\n\n /**\n * Updates license template properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Updatelicensetemplate\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * license template number\n * @param number string\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param licenseTemplate NetLicensing.LicenseTemplate\n *\n * updated license template in promise.\n * @returns {Promise}\n */\n update(context, number, licenseTemplate) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(licenseTemplate instanceof LicenseTemplate)) {\n throw new TypeError('licenseTemplate must be an instance of LicenseTemplate');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const path = `${Constants.LicenseTemplate.ENDPOINT_PATH}/${number}`;\n\n return Service\n .post(context, path, licenseTemplate.asPropertiesMap(), LicenseTemplate);\n },\n\n /**\n * Deletes license template.See NetLicensingAPI JavaDoc for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Deletelicensetemplate\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * license template number\n * @param number string\n *\n * if true, any entities that depend on the one being deleted will be deleted too\n * @param forceCascade boolean\n *\n * return boolean state of delete in promise\n * @returns {Promise}\n */\n delete(context, number, forceCascade) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n const queryParams = { forceCascade: Boolean(forceCascade) };\n\n return Service\n .delete(context, `${Constants.LicenseTemplate.ENDPOINT_PATH}/${number}`, queryParams);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport Licensee from '../entities/Licensee';\nimport CheckUtils from '../util/CheckUtils';\nimport FilterUtils from '../util/FilterUtils';\nimport Constants from '../Constants';\nimport Service from './Service';\nimport ValidationParameters from '../vo/ValidationParameters';\nimport ValidationResults from '../vo/ValidationResults';\n\n/**\n * JS representation of the Licensee Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services\n *\n * @constructor\n */\n\nexport default {\n /**\n * Creates new licensee object with given properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Createlicensee\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * parent product to which the new licensee is to be added\n * @param productNumber string\n *\n * non-null properties will be taken for the new object, null properties will either stay null, or will\n * be set to a default value, depending on property.\n * @param licensee NetLicensing.Licensee\n *\n * return the newly created licensee object in promise\n * @returns {Promise}\n */\n create(context, productNumber, licensee) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(licensee instanceof Licensee)) {\n throw new TypeError('licensee must be an instance of Licensee');\n }\n\n CheckUtils.paramNotEmpty(productNumber, 'productNumber');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n licensee.setProperty('productNumber', productNumber);\n\n return Service\n .post(context, Constants.Licensee.ENDPOINT_PATH, licensee.asPropertiesMap(), Licensee);\n },\n\n /**\n * Gets licensee by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Getlicensee\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the licensee number\n * @param number string\n *\n * return the licensee in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n return Service\n .get(context, `${Constants.Licensee.ENDPOINT_PATH}/${number}`, {}, Licensee);\n },\n\n /**\n * Returns all licensees of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Licenseeslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string|null\n *\n * array of licensees (of all products) or empty array if nothing found in promise.\n * @returns {Promise}\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.Licensee.ENDPOINT_PATH, queryParams, Licensee);\n },\n\n /**\n * Updates licensee properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Updatelicensee\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * licensee number\n * @param number string\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param licensee NetLicensing.Licensee\n *\n * return updated licensee in promise.\n * @returns {Promise}\n */\n update(context, number, licensee) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(licensee instanceof Licensee)) {\n throw new TypeError('licensee must be an instance of Licensee');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n return Service\n .post(context, `${Constants.Licensee.ENDPOINT_PATH}/${number}`, licensee.asPropertiesMap(), Licensee);\n },\n\n /**\n * Deletes licensee.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Deletelicensee\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * licensee number\n * @param number string\n *\n * if true, any entities that depend on the one being deleted will be deleted too\n * @param forceCascade boolean\n *\n * return boolean state of delete in promise\n * @returns {Promise}\n */\n delete(context, number, forceCascade) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n const queryParams = { forceCascade: Boolean(forceCascade) };\n\n return Service\n .delete(context, `${Constants.Licensee.ENDPOINT_PATH}/${number}`, queryParams);\n },\n\n /**\n * Validates active licenses of the licensee. See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Validatelicensee\n *\n * @param context NetLicensing.Context\n *\n * licensee number\n * @param number string\n *\n * optional validation parameters. See ValidationParameters and licensing model documentation for\n * details.\n * @param validationParameters NetLicensing.ValidationParameters.\n *\n * @returns {Promise}\n */\n validate(context, number, validationParameters) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(validationParameters instanceof ValidationParameters)) {\n throw new TypeError('validationParameters must be an instance of ValidationParameters');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n const queryParams = {};\n\n if (validationParameters.getProductNumber()) {\n queryParams.productNumber = validationParameters.getProductNumber();\n }\n\n if (validationParameters.getLicenseeName()) {\n queryParams.licenseeName = validationParameters.getLicenseeName();\n }\n\n if (validationParameters.getLicenseeSecret()) {\n queryParams.licenseeSecret = validationParameters.getLicenseeSecret();\n }\n\n let pmIndex = 0;\n const parameters = validationParameters.getParameters();\n\n const has = Object.prototype.hasOwnProperty;\n\n Object.keys(parameters).forEach((productModuleName) => {\n queryParams[`productModuleNumber${pmIndex}`] = productModuleName;\n if (!has.call(parameters, productModuleName)) return;\n\n const parameter = parameters[productModuleName];\n\n Object.keys(parameter).forEach((key) => {\n if (has.call(parameter, key)) {\n queryParams[key + pmIndex] = parameter[key];\n }\n });\n pmIndex += 1;\n });\n\n const path = `${Constants.Licensee.ENDPOINT_PATH}/${number}/${Constants.Licensee.ENDPOINT_PATH_VALIDATE}`;\n\n return Service\n .post(context, path, queryParams)\n .then((item) => {\n const data = {};\n const validationResults = new ValidationResults();\n\n item.property.forEach((property) => {\n try {\n data[property.name] = JSON.parse(property.value);\n } catch (e) {\n data[property.name] = property.value;\n }\n });\n\n validationResults\n .setProductModuleValidation(data.productModuleNumber, data)\n .setTtl(Service.getLastHttpRequestInfo().data.ttl);\n\n return validationResults;\n });\n },\n\n\n /**\n * Transfer licenses between licensees.\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Transferlicensee\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the number of the licensee receiving licenses\n * @param number string\n *\n * the number of the licensee delivering licenses\n * @param sourceLicenseeNumber string\n *\n * @returns {Promise}\n */\n transfer(context, number, sourceLicenseeNumber) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n CheckUtils.paramNotEmpty(sourceLicenseeNumber, 'sourceLicenseeNumber');\n\n const queryParams = { sourceLicenseeNumber };\n\n const path = `${Constants.Licensee.ENDPOINT_PATH}/${number}/${Constants.Licensee.ENDPOINT_PATH_TRANSFER}`;\n\n return Service\n .post(context, path, queryParams);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport PaymentMethod from '../entities/PaymentMethod';\nimport Constants from '../Constants';\nimport CheckUtils from '../util/CheckUtils';\nimport Service from './Service';\nimport FilterUtils from '../util/FilterUtils';\n\nexport default {\n /**\n * Gets payment method by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Getpaymentmethod\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the payment method number\n * @param number string\n *\n * return the payment method in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .get(context, `${Constants.PaymentMethod.ENDPOINT_PATH}/${number}`, {}, PaymentMethod);\n },\n\n /**\n * Returns payment methods of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Paymentmethodslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string|null\n *\n * array of payment method entities or empty array if nothing found in promise.\n * @returns {Promise}\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.PaymentMethod.ENDPOINT_PATH, queryParams, PaymentMethod);\n },\n\n /**\n * Updates payment method properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Updatepaymentmethod\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the payment method number\n * @param number string\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param paymentMethod NetLicensing.PaymentMethod\n *\n * return updated payment method in promise.\n * @returns {Promise}\n */\n update(context, number, paymentMethod) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(paymentMethod instanceof PaymentMethod)) {\n throw new TypeError('paymentMethod must be an instance of PaymentMethod');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const path = `${Constants.PaymentMethod.ENDPOINT_PATH}/${number}`;\n\n return Service\n .post(context, path, paymentMethod.asPropertiesMap(), PaymentMethod);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport ProductModule from '../entities/ProductModule';\nimport CheckUtils from '../util/CheckUtils';\nimport Constants from '../Constants';\nimport Service from './Service';\nimport FilterUtils from '../util/FilterUtils';\n\n/**\n * JS representation of the ProductModule Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services\n *\n * @constructor\n */\n\nexport default {\n /**\n * Creates new product module object with given properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Createproductmodule\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * parent product to which the new product module is to be added\n * @param productNumber string\n *\n * non-null properties will be taken for the new object, null properties will either stay null, or will\n * be set to a default value, depending on property.\n * @param productModule NetLicensing.ProductModule\n *\n * the newly created product module object in promise\n * @returns {Promise}\n */\n create(context, productNumber, productModule) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(productModule instanceof ProductModule)) {\n throw new TypeError('product must be an instance of ProductModule');\n }\n\n CheckUtils.paramNotEmpty(productNumber, 'productNumber');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n productModule.setProperty('productNumber', productNumber);\n\n return Service\n .post(context, Constants.ProductModule.ENDPOINT_PATH, productModule.asPropertiesMap(), ProductModule);\n },\n\n /**\n * Gets product module by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Getproductmodule\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the product module number\n * @param number string\n *\n * return the product module object in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .get(context, `${Constants.ProductModule.ENDPOINT_PATH}/${number}`, {}, ProductModule);\n },\n\n /**\n * Returns products of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Productslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string|null\n *\n * array of product modules entities or empty array if nothing found in promise.\n * @returns {Promise}\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.ProductModule.ENDPOINT_PATH, queryParams, ProductModule);\n },\n\n /**\n * Updates product module properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Updateproductmodule\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * product module number\n * @param number string\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param productModule NetLicensing.ProductModule\n *\n * updated product module in promise.\n * @returns {Promise}\n */\n update(context, number, productModule) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(productModule instanceof ProductModule)) {\n throw new TypeError('product must be an instance of ProductModule');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const path = `${Constants.ProductModule.ENDPOINT_PATH}/${number}`;\n\n return Service\n .post(context, path, productModule.asPropertiesMap(), ProductModule);\n },\n\n /**\n * Deletes product module.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Deleteproductmodule\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * product module number\n * @param number string\n *\n * if true, any entities that depend on the one being deleted will be deleted too\n * @param forceCascade boolean\n *\n * return boolean state of delete in promise\n * @returns {Promise}\n */\n delete(context, number, forceCascade) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n const queryParams = { forceCascade: Boolean(forceCascade) };\n\n return Service\n .delete(context, `${Constants.ProductModule.ENDPOINT_PATH}/${number}`, queryParams);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Service from './Service';\nimport Context from '../vo/Context';\nimport Product from '../entities/Product';\nimport Constants from '../Constants';\nimport CheckUtils from '../util/CheckUtils';\nimport FilterUtils from '../util/FilterUtils';\n\n/**\n * JS representation of the Product Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services\n *\n * @constructor\n */\n\nexport default {\n /**\n * Creates new product with given properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Createproduct\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * non-null properties will be taken for the new object, null properties will either stay null, or will\n * be set to a default value, depending on property.\n * @param product NetLicensing.Product\n *\n * return the newly created product object in promise\n * @returns {Promise}\n */\n\n create(context, product) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(product instanceof Product)) {\n throw new TypeError('product must be an instance of Product');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .post(context, Constants.Product.ENDPOINT_PATH, product.asPropertiesMap(), Product);\n },\n\n /**\n * Gets product by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Getproduct\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the product number\n * @param number string\n *\n * return the product object in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .get(context, `${Constants.Product.ENDPOINT_PATH}/${number}`, {}, Product);\n },\n\n /**\n * Returns products of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Productslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string|null\n *\n * array of product entities or empty array if nothing found in promise.\n * @returns {Promise}\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.Product.ENDPOINT_PATH, queryParams, Product);\n },\n\n /**\n * Updates product properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Updateproduct\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * product number\n * @param number string\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param product NetLicensing.Product\n *\n * updated product in promise.\n * @returns {Promise}\n */\n update(context, number, product) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(product instanceof Product)) {\n throw new TypeError('product must be an instance of Product');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .post(context, `${Constants.Product.ENDPOINT_PATH}/${number}`, product.asPropertiesMap(), Product);\n },\n\n /**\n * Deletes product.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Deleteproduct\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * product number\n * @param number string\n *\n * if true, any entities that depend on the one being deleted will be deleted too\n * @param forceCascade boolean\n *\n * return boolean state of delete in promise\n * @returns {Promise}\n */\n delete(context, number, forceCascade) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n const queryParams = { forceCascade: Boolean(forceCascade) };\n\n return Service\n .delete(context, `${Constants.Product.ENDPOINT_PATH}/${number}`, queryParams);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nimport axios from 'axios';\nimport Context from '../vo/Context';\nimport Constants from '../Constants';\nimport BaseEntity from '../entities/BaseEntity';\n\nlet httpXHR = {};\n\nexport default class Service {\n static getLastHttpRequestInfo() {\n return httpXHR;\n }\n\n /**\n * Helper method for performing GET request to N\n etLicensing API services. Finds and returns first suitable item with\n * type resultType from the response.\n *\n * Context for the NetLicensing API call\n * @param context\n *\n * the REST URL template\n * @param urlTemplate\n *\n * The REST query parameters values. May be null if there are no parameters.\n * @param queryParams\n *\n * the type of the result\n * @param resultType\n *\n * @returns {Promise}\n */\n static get(context, urlTemplate, queryParams, resultType) {\n return Service\n .request(context, 'get', urlTemplate, queryParams)\n .then(response => ((response.data) ? Service.getEntity(resultType, response.data.items.item[0]) : null));\n }\n\n /**\n * Helper method for performing GET request to NetLicensing API service that returns page of items with type\n * resultType.\n *\n * context for the NetLicensing API call\n * @param context\n *\n * the REST URL template\n * @param urlTemplate\n *\n * The REST query parameters values. May be null if there are no parameters.\n * @param queryParams\n *\n * the type of the result\n * @param resultType\n *\n *\n * @returns {Promise}\n */\n static list(context, urlTemplate, queryParams, resultType) {\n return Service\n .request(context, 'get', urlTemplate, queryParams)\n .then(response => ((response.data)\n ? response.data.items.item.map(item => Service.getEntity(resultType, item))\n : []));\n }\n\n /**\n * Helper method for performing POST request to NetLicensing API services. Finds and returns first suitable item\n * with type resultType from the response.\n *\n * context for the NetLicensing API call\n * @param context\n *\n * the REST URL template\n * @param urlTemplate\n *\n * The REST query parameters values. May be null if there are no parameters.\n * @param queryParams\n *\n * he type of the result\n * @param resultType\n *\n * @returns {Promise}\n */\n static post(context, urlTemplate, queryParams, resultType) {\n return Service\n .request(context, 'post', urlTemplate, queryParams)\n .then(response => ((response.data) ? Service.getEntity(resultType, response.data.items.item[0]) : null));\n }\n\n /**\n *\n * @param context\n * @param urlTemplate\n * @param queryParams\n * @returns {Promise}\n */\n static delete(context, urlTemplate, queryParams) {\n return Service\n .request(context, 'delete', urlTemplate, queryParams)\n .then(response => (response.status === 204));\n }\n\n /**\n * Send request to NetLicensing RestApi\n * @param context\n * @param method\n * @param urlTemplate\n * @param queryParams\n * @returns {Promise}\n */\n static request(context, method, urlTemplate, queryParams) {\n if (!(context instanceof Context)) throw new TypeError('context must be an instance of NetLicensing.Context');\n\n const template = String(urlTemplate);\n const params = queryParams || {};\n\n if (!template) throw new TypeError('Url template must be specified');\n\n // validate http method\n if (['get', 'post', 'delete'].indexOf(method.toLowerCase()) < 0) {\n throw new Error(`Invalid request type:${method}, allowed requests types: GET, POST, DELETE.`);\n }\n\n // validate context\n if (!context.getBaseUrl(null)) {\n throw new Error('Base url must be specified');\n }\n\n if (!Service.isValidUrl(String(context.getBaseUrl()))) {\n throw new Error(`Base url \"${context.getBaseUrl()}\" is not a valid URL`);\n }\n\n let restUrl = `${context.getBaseUrl()}/${urlTemplate}`;\n\n restUrl = restUrl.replace(/([^:]\\/)\\/+/g, '$1');\n\n // validate baseUrl + urlTemplate\n if (!Service.isValidUrl(String(restUrl))) {\n throw new Error(`Rest url \"${restUrl}\" is not a valid URL`);\n }\n\n const request = {\n url: restUrl,\n method: method.toLowerCase(),\n responseType: 'json',\n headers: {},\n transformRequest: [(data, headers) => {\n if (headers['Content-Type'] === 'application/x-www-form-urlencoded') {\n return Service.toQueryString(data);\n }\n return data;\n }],\n };\n\n if (['put', 'post', 'patch'].indexOf(request.method) >= 0) {\n if (request.method === 'post') {\n request.headers['Content-Type'] = 'application/x-www-form-urlencoded';\n }\n request.data = params;\n } else {\n request.params = params;\n }\n\n switch (context.getSecurityMode()) {\n // Basic Auth\n case Constants.BASIC_AUTHENTICATION:\n if (!context.getUsername()) throw new Error('Missing parameter \"username\"');\n if (!context.getPassword()) throw new Error('Missing parameter \"password\"');\n\n request.auth = {\n username: context.getUsername(),\n password: context.getPassword(),\n };\n break;\n // ApiKey Auth\n case Constants.APIKEY_IDENTIFICATION:\n if (!context.getApiKey()) throw new Error('Missing parameter \"apiKey\"');\n\n request.headers.Authorization = `Basic ${btoa(`apiKey:${context.getApiKey()}`)}`;\n break;\n default:\n throw new Error('Unknown security mode');\n }\n\n return axios(request)\n .then((response) => {\n httpXHR = response;\n return response;\n })\n .catch((error) => {\n httpXHR = error;\n\n if (error.response) {\n // The request was made and the server responded with a status code\n // that falls out of the range of 2xx\n const info = error.response.data.infos.info[0] || null;\n\n if (info && info.id === 'NotFoundException') {\n return Promise.resolve(null);\n }\n\n const reasonPhrase = info.value || 'Unknown';\n throw new Error(`Unsupported response status code ${error.response.status}: ${reasonPhrase}`);\n }\n\n return Promise.reject(error);\n });\n }\n\n /**\n * Create Entity from item\n * @param resultType\n * @param item\n * @returns {*}\n */\n static getEntity(resultType, item) {\n const properties = item.property || null;\n const lists = item.list || null;\n\n if (!resultType) return item;\n\n // eslint-disable-next-line new-cap\n const entity = new resultType();\n\n if (!(entity instanceof BaseEntity)) {\n throw new Error(`Invalid entity ${resultType}, entity must be instanceof BaseEntity`);\n }\n\n properties.forEach(({ name, value }) => {\n entity.setProperty(name, value);\n });\n\n if (lists) {\n lists.forEach(({ name, property }) => {\n const setListMethod = `setList${name.charAt(0).toUpperCase()}${name.substr(1, name.length - 1)}`;\n const setListsMethod = 'setLists';\n\n if (typeof entity[setListMethod] !== 'function' && typeof entity[setListsMethod] !== 'function') {\n // eslint-disable-next-line no-console\n console.warn(`Methods: ${setListMethod},${setListsMethod} not found in ${item.type} \n for list property ${name}`);\n return;\n }\n\n if (typeof entity[setListMethod] === 'function') {\n entity[setListMethod](property);\n return;\n }\n\n if (typeof entity[setListsMethod] === 'function') {\n entity[setListsMethod](name, property);\n }\n });\n }\n\n return entity;\n }\n\n static isValidUrl(url) {\n const pattern = new RegExp('^(https?:\\\\/\\\\/)?' + // protocol\n '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.?)+[a-z]{2,}|' + // domain name\n '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))' + // OR ip (v4) address\n '(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*' + // port and path\n '(\\\\?[;&a-z\\\\d%_.~+=-]*)?' + // query string\n '(\\\\#[-a-z\\\\d_]*)?$', 'i'); // fragment locator\n\n return pattern.test(url);\n }\n\n static toQueryString(data, prefix) {\n const query = [];\n\n const has = Object.prototype.hasOwnProperty;\n\n Object.keys(data).forEach((key) => {\n if (has.call(data, key)) {\n const k = prefix ? `${prefix}[${key}]` : key;\n let v = data[key];\n v = (v instanceof Date) ? v.toISOString() : v;\n query.push((v !== null && typeof v === 'object') ?\n Service.toQueryString(v, k) :\n `${encodeURIComponent(k)}=${encodeURIComponent(v)}`);\n }\n });\n\n return query.join('&').replace(/%5B[0-9]+%5D=/g, '=');\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport Token from '../entities/Token';\nimport Constants from '../Constants';\nimport Service from './Service';\nimport CheckUtils from '../util/CheckUtils';\nimport FilterUtils from '../util/FilterUtils';\n\n/**\n * JS representation of the Token Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services\n *\n * @constructor\n */\n\nexport default {\n /**\n * Creates new token.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services#TokenServices-Createtoken\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param token NetLicensing.Token\n *\n * return created token in promise\n * @returns {Promise}\n */\n create(context, token) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(token instanceof Token)) {\n throw new TypeError('token must be an instance of Token');\n }\n\n return Service\n .post(context, Constants.Token.ENDPOINT_PATH, token.asPropertiesMap(), Token);\n },\n\n /**\n * Gets token by its number..See NetLicensingAPI for details:\n * @see https://www.labs64.de/conluence/display/NetLicensing PUB/Token+Services#TokenServices-Gettoken\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the token number\n * @param number\n *\n * return the token in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of NetLicensing.Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n return Service\n .get(context, `${Constants.Token.ENDPOINT_PATH}/${number}`, {}, Token);\n },\n\n /**\n * Returns tokens of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services#TokenServices-Tokenslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string|null\n *\n * array of token entities or empty array if nothing found.\n * @return array\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.Token.ENDPOINT_PATH, queryParams, Token);\n },\n\n /**\n * Delete token by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services#TokenServices-Deletetoken\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the token number\n * @param number string\n *\n * return boolean state of delete in promise\n * @returns {Promise}\n */\n delete(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of NetLicensing.Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n return Service\n .delete(context, `${Constants.Token.ENDPOINT_PATH}/${number}`);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport Transaction from '../entities/Transaction';\nimport Constants from '../Constants';\nimport Service from './Service';\nimport CheckUtils from '../util/CheckUtils';\nimport FilterUtils from '../util/FilterUtils';\n\n/**\n * JS representation of the Transaction Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services\n *\n * Transaction is created each time change to LicenseService licenses happens. For instance licenses are\n * obtained by a licensee, licenses disabled by vendor, licenses deleted, etc. Transaction is created no matter what\n * source has initiated the change to licenses: it can be either a direct purchase of licenses by a licensee via\n * NetLicensing Shop, or licenses can be given to a licensee by a vendor. Licenses can also be assigned implicitly by\n * NetLicensing if it is defined so by a license model (e.g. evaluation license may be given automatically). All these\n * events are reflected in transactions. Of all the transaction handling routines only read-only routines are exposed to\n * the public API, as transactions are only allowed to be created and modified by NetLicensing internally.\n *\n * @constructor\n */\n\nexport default {\n /**\n * Creates new transaction object with given properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Createtransaction\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * non-null properties will be taken for the new object, null properties will either stay null, or will\n * be set to a default value, depending on property.\n * @param transaction NetLicensing.Transaction\n *\n * return the newly created transaction object in promise\n * @returns {Promise}\n */\n create(context, transaction) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(transaction instanceof Transaction)) {\n throw new TypeError('transaction must be an instance of Transaction');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .post(context, Constants.Transaction.ENDPOINT_PATH, transaction.asPropertiesMap(), Transaction);\n },\n\n /**\n * Gets transaction by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Gettransaction\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the transaction number\n * @param number string\n *\n * return the transaction in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .get(context, `${Constants.Transaction.ENDPOINT_PATH}/${number}`, {}, Transaction);\n },\n\n /**\n * Returns all transactions of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Transactionslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string\n *\n * array of transaction entities or empty array if nothing found in promise.\n * @returns {Promise}\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.Transaction.ENDPOINT_PATH, queryParams, Transaction);\n },\n\n /**\n * Updates transaction properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Updatetransaction\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * transaction number\n * @param number string\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param transaction NetLicensing.Transaction\n *\n * return updated transaction in promise.\n * @returns {Promise}\n */\n update(context, number, transaction) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of NetLicensing.Context');\n }\n\n if (!(transaction instanceof Transaction)) {\n throw new TypeError('transaction must be an instance of NetLicensing.Transaction');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const path = `${Constants.Transaction.ENDPOINT_PATH}/${number}`;\n\n return Service\n .post(context, path, transaction.asPropertiesMap(), Transaction);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport Constants from '../Constants';\nimport Service from './Service';\nimport CheckUtils from '../util/CheckUtils';\nimport Country from '../entities/Country';\nimport FilterUtils from '../util/FilterUtils';\n\n/**\n * JS representation of the Utility Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Utility+Services\n * @constructor\n */\n\nexport default {\n /**\n * Returns all license types. See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Utility+Services#UtilityServices-LicenseTypeslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * array of available license types or empty array if nothing found in promise.\n * @returns {Promise}\n */\n listLicenseTypes(context) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .list(context, `${Constants.Utility.ENDPOINT_PATH}/licenseTypes`)\n .then(items => items.map(item => item.property[0].value));\n },\n\n /**\n * Returns all license models. See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Utility+Services#UtilityServices-LicensingModelslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * array of available license models or empty array if nothing found in promise.\n * @returns {Promise}\n */\n listLicensingModels(context) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .list(context, `${Constants.Utility.ENDPOINT_PATH}/licensingModels`)\n .then(items => items.map(item => item.property[0].value));\n },\n\n /**\n * Returns all countries.\n *\n * determines the vendor on whose behalf the call is performed\n * @param context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter\n *\n * collection of available countries or null/empty list if nothing found in promise.\n * @returns {Promise}\n */\n listCountries(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, `${Constants.Utility.ENDPOINT_PATH}/countries`, queryParams, Country);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\n// Cast an attribute to a native JS type.\nexport default (key, value) => {\n switch (key.trim().toLowerCase()) {\n case 'str':\n case 'string':\n return String(value);\n case 'int':\n case 'integer':\n return parseInt(value, 10);\n case 'float':\n case 'double':\n return parseFloat(value);\n case 'bool':\n case 'boolean':\n switch (value) {\n case 'true':\n case 'TRUE':\n return true;\n case 'false':\n case 'FALSE':\n return false;\n default:\n return Boolean(value);\n }\n case 'date':\n return (value === 'now') ? 'now' : new Date(String(value));\n default:\n return value;\n }\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nexport default {\n isValid(value) {\n let valid = (value !== undefined && typeof value !== 'function');\n if (typeof value === 'number') valid = Number.isFinite(value) && !Number.isNaN(value);\n return valid;\n },\n\n paramNotNull(parameter, parameterName) {\n if (!this.isValid(parameter)) throw new TypeError(`Parameter ${parameterName} has bad value ${parameter}`);\n if (parameter === null) throw new TypeError(`Parameter ${parameterName} cannot be null`);\n },\n\n paramNotEmpty(parameter, parameterName) {\n if (!this.isValid(parameter)) throw new TypeError(`Parameter ${parameterName} has bad value ${parameter}`);\n if (!parameter) throw new TypeError(`Parameter ${parameterName} cannot be null or empty string`);\n },\n};\n","export default {\n FILTER_DELIMITER: ';',\n FILTER_PAIR_DELIMITER: '=',\n encode(filter = {}) {\n const query = [];\n const has = Object.prototype.hasOwnProperty;\n Object.keys(filter).forEach((key) => {\n if (has.call(filter, key)) {\n query.push(`${encodeURIComponent(key)}${this.FILTER_PAIR_DELIMITER}${encodeURIComponent(filter[key])}`);\n }\n });\n return query.join(this.FILTER_DELIMITER);\n },\n decode(query = '') {\n const filter = {};\n query.split(this.FILTER_DELIMITER).forEach((v) => {\n const [name, value] = v.split(this.FILTER_PAIR_DELIMITER);\n filter[name] = value;\n });\n return filter;\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nimport Constants from '../Constants';\nimport CheckUtils from '../util/CheckUtils';\n\n/**\n * The context values.\n * @type {{}}\n * @private\n */\nconst valuesMap = new WeakMap();\n\n/**\n * List of values that was defined\n * @type {{}}\n * @private\n */\nconst definedMap = new WeakMap();\n\n/**\n * Context defaults\n * @type {{baseUrl: string, securityMode}}\n * @private\n */\nconst defaultsMap = new WeakMap();\n\nexport default class Context {\n constructor(values) {\n defaultsMap.set(this, {\n baseUrl: 'https://go.netlicensing.io/core/v2/rest',\n securityMode: Constants.BASIC_AUTHENTICATION,\n });\n\n valuesMap.set(this, {});\n\n definedMap.set(this, {});\n\n this.setValues(Object.assign({}, defaultsMap.get(this), values));\n }\n\n setBaseUrl(baseUrl) {\n return this.setValue('baseUrl', baseUrl);\n }\n\n getBaseUrl(def) {\n return this.getValue('baseUrl', def);\n }\n\n setUsername(username) {\n return this.setValue('username', username);\n }\n\n getUsername(def) {\n return this.getValue('username', def);\n }\n\n setPassword(password) {\n return this.setValue('password', password);\n }\n\n getPassword(def) {\n return this.getValue('password', def);\n }\n\n setApiKey(apiKey) {\n return this.setValue('apiKey', apiKey);\n }\n\n getApiKey(def) {\n return this.getValue('apiKey', def);\n }\n\n setSecurityMode(securityMode) {\n return this.setValue('securityMode', securityMode);\n }\n\n getSecurityMode(def) {\n return this.getValue('securityMode', def);\n }\n\n setVendorNumber(vendorNumber) {\n return this.setValue('vendorNumber', vendorNumber);\n }\n\n getVendorNumber(def) {\n return this.getValue('vendorNumber', def);\n }\n\n /**\n * Set a given values on the context.\n * @param key\n * @param value\n * @returns {Context}\n */\n setValue(key, value) {\n // check values\n if (!CheckUtils.isValid(key) || typeof key === 'object') throw new Error(`Bad value key:${key}`);\n if (!CheckUtils.isValid(value)) throw new Error(`Value ${key} has wrong value${value}`);\n\n // define keys\n this.define(key);\n\n let copedValue = value;\n\n if (typeof value === 'object') {\n copedValue = (Array.isArray(value)) ? Object.assign([], value) : Object.assign({}, value);\n }\n\n const values = valuesMap.get(this);\n values[key] = copedValue;\n\n return this;\n }\n\n /**\n * Set the array of context values.\n * @param values\n * @returns {Context}\n */\n setValues(values) {\n this.removeValues();\n\n const has = Object.prototype.hasOwnProperty;\n\n Object.keys(values).forEach((key) => {\n if (has.call(values, key)) {\n this.setValue(key, values[key]);\n }\n });\n\n return this;\n }\n\n /**\n * Get an value from the context.\n * @param key\n * @param def\n * @returns {*}\n */\n getValue(key, def) {\n return valuesMap.get(this)[key] || def;\n }\n\n /**\n * Get all of the current value on the context.\n */\n getValues() {\n return Object.assign({}, valuesMap.get(this));\n }\n\n /**\n * Remove value\n * @param key\n * @returns {Context}\n */\n removeValue(key) {\n const values = valuesMap.get(this);\n delete values[key];\n\n this.removeDefine(key);\n return this;\n }\n\n /**\n * Remove values\n * @param keys\n */\n removeValues(keys) {\n const keysAr = keys || Object.keys(valuesMap.get(this));\n keysAr.forEach(key => this.removeValue(key));\n }\n\n /**\n * Define value getter and setter\n * @param key\n * @param onlyGetter\n * @private\n */\n define(key, onlyGetter) {\n if (this.hasDefine(key)) return;\n\n if (!CheckUtils.isValid(key) || typeof property === 'object') {\n throw new TypeError(`Bad value name:${key}`);\n }\n\n const self = this;\n\n // delete property\n delete this[key];\n\n const descriptors = {\n enumerable: true,\n configurable: true,\n get() {\n return self.getValue(key);\n },\n };\n\n if (!onlyGetter) {\n descriptors.set = value => self.setValue(key, value);\n }\n\n const defined = definedMap.get(this);\n defined[key] = true;\n\n Object.defineProperty(this, key, descriptors);\n }\n\n /**\n * Check if value has defined\n * @param key\n * @private\n */\n hasDefine(key) {\n return Boolean(definedMap.get(this)[key]);\n }\n\n /**\n * Remove value getter and setter\n * @param key\n * @private\n */\n removeDefine(key) {\n if (!this.hasDefine(key)) return;\n\n const defined = definedMap.get(this);\n delete defined[key];\n\n delete this[key];\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\n/**\n * Validation parameters map\n *\n * @type {WeakMap}\n */\nconst vpMap = new WeakMap();\n\nexport default class ValidationParameters {\n constructor() {\n vpMap.set(this, { parameters: {} });\n }\n\n /**\n * Sets the target product\n *\n * optional productNumber, must be provided in case licensee auto-create is enabled\n * @param productNumber\n * @returns {ValidationParameters}\n */\n setProductNumber(productNumber) {\n vpMap.get(this).productNumber = productNumber;\n return this;\n }\n\n /**\n * Get the target product\n * @returns {*}\n */\n getProductNumber() {\n return vpMap.get(this).productNumber;\n }\n\n /**\n * Sets the name for the new licensee\n *\n * optional human-readable licensee name in case licensee will be auto-created. This parameter must not\n * be the name, but can be used to store any other useful string information with new licensees, up to\n * 1000 characters.\n * @param licenseeName\n * @returns {NetLicensing.ValidationParameters}\n */\n setLicenseeName(licenseeName) {\n vpMap.get(this).licenseeName = licenseeName;\n return this;\n }\n\n /**\n * Get the licensee name\n * @returns {*}\n */\n getLicenseeName() {\n return vpMap.get(this).licenseeName;\n }\n\n /**\n * Sets the licensee secret\n *\n * licensee secret stored on the client side. Refer to Licensee Secret documentation for details.\n * @param licenseeSecret\n * @returns {ValidationParameters}\n */\n setLicenseeSecret(licenseeSecret) {\n vpMap.get(this).licenseeSecret = licenseeSecret;\n return this;\n }\n\n /**\n * Get the licensee secret\n * @returns {*}\n */\n getLicenseeSecret() {\n return vpMap.get(this).licenseeSecret;\n }\n\n /**\n * Get validation parameters\n * @returns {*}\n */\n getParameters() {\n return Object.assign({}, vpMap.get(this).parameters);\n }\n\n getProductModuleValidationParameters(productModuleNumber) {\n return Object.assign({}, vpMap.get(this).parameters[productModuleNumber]);\n }\n\n setProductModuleValidationParameters(productModuleNumber, productModuleParameters) {\n const { parameters } = vpMap.get(this);\n\n if (parameters[productModuleNumber] === undefined || !Object.keys(parameters[productModuleNumber]).length) {\n parameters[productModuleNumber] = {};\n }\n\n parameters[productModuleNumber] = Object.assign(parameters[productModuleNumber], productModuleParameters);\n\n return this;\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport CheckUtils from '../util/CheckUtils';\n\n/**\n * Validation result map\n * @type {WeakMap}\n */\nconst vr = new WeakMap();\n\nexport default class ValidationResults {\n constructor() {\n vr.set(this, { validators: {} });\n }\n\n getValidators() {\n return Object.assign({}, vr.get(this).validators);\n }\n\n setProductModuleValidation(productModuleNumber, productModuleValidation) {\n if (!CheckUtils.isValid(productModuleNumber) || typeof productModuleNumber === 'object') {\n throw new TypeError(`Bad productModuleNumber:${productModuleNumber}`);\n }\n\n vr.get(this).validators[productModuleNumber] = productModuleValidation;\n\n return this;\n }\n\n getProductModuleValidation(productModuleNumber) {\n if (!CheckUtils.isValid(productModuleNumber) || typeof productModuleNumber === 'object') {\n throw new TypeError(`Bad productModuleNumber:${productModuleNumber}`);\n }\n\n return vr.get(this).validators[productModuleNumber];\n }\n\n setTtl(ttl) {\n if (!CheckUtils.isValid(ttl) || typeof ttl === 'object') {\n throw new TypeError(`Bad ttl:${ttl}`);\n }\n vr.get(this).ttl = new Date(String(ttl));\n\n return this;\n }\n\n getTtl() {\n return (vr.get(this).ttl) ? new Date(vr.get(this).ttl) : undefined;\n }\n\n toString() {\n let data = 'ValidationResult [';\n\n const validators = this.getValidators();\n const has = Object.prototype.hasOwnProperty;\n\n Object.keys(validators).forEach((productModuleNumber) => {\n data += `ProductModule<${productModuleNumber}>`;\n if (has.call(validators, productModuleNumber)) {\n data += JSON.stringify(validators[productModuleNumber]);\n }\n });\n\n data += ']';\n\n return data;\n }\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/netlicensing-client.min.js.map b/dist/netlicensing-client.min.js.map index da1f28e..279573e 100644 --- a/dist/netlicensing-client.min.js.map +++ b/dist/netlicensing-client.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://NetLicensing/webpack/universalModuleDefinition","webpack://NetLicensing/webpack/bootstrap","webpack://NetLicensing/./src/util/CheckUtils.js","webpack://NetLicensing/./node_modules/axios/lib/utils.js","webpack://NetLicensing/./src/Constants.js","webpack://NetLicensing/./src/entities/BaseEntity.js","webpack://NetLicensing/./src/vo/Context.js","webpack://NetLicensing/./src/util/FilterUtils.js","webpack://NetLicensing/./src/services/Service.js","webpack://NetLicensing/./src/entities/License.js","webpack://NetLicensing/./src/entities/Transaction.js","webpack://NetLicensing/./node_modules/axios/lib/defaults.js","webpack://NetLicensing/./src/entities/Country.js","webpack://NetLicensing/./src/entities/LicenseTransactionJoin.js","webpack://NetLicensing/./src/entities/Token.js","webpack://NetLicensing/./src/entities/ProductDiscount.js","webpack://NetLicensing/./src/entities/Product.js","webpack://NetLicensing/./src/entities/ProductModule.js","webpack://NetLicensing/./src/entities/PaymentMethod.js","webpack://NetLicensing/./src/entities/LicenseTemplate.js","webpack://NetLicensing/./src/vo/ValidationResults.js","webpack://NetLicensing/./src/vo/ValidationParameters.js","webpack://NetLicensing/./src/entities/Licensee.js","webpack://NetLicensing/./src/util/CastsUtils.js","webpack://NetLicensing/./node_modules/axios/lib/cancel/Cancel.js","webpack://NetLicensing/./node_modules/axios/lib/cancel/isCancel.js","webpack://NetLicensing/./node_modules/axios/lib/core/createError.js","webpack://NetLicensing/./node_modules/axios/lib/adapters/xhr.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/bind.js","webpack://NetLicensing/./src/services/UtilityService.js","webpack://NetLicensing/./src/services/TransactionService.js","webpack://NetLicensing/./src/services/TokenService.js","webpack://NetLicensing/./src/services/ProductService.js","webpack://NetLicensing/./src/services/ProductModuleService.js","webpack://NetLicensing/./src/services/PaymentMethodService.js","webpack://NetLicensing/./src/services/LicenseTemplateService.js","webpack://NetLicensing/./src/services/LicenseService.js","webpack://NetLicensing/./src/services/LicenseeService.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/spread.js","webpack://NetLicensing/./node_modules/axios/lib/cancel/CancelToken.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/combineURLs.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://NetLicensing/./node_modules/axios/lib/core/transformData.js","webpack://NetLicensing/./node_modules/axios/lib/core/dispatchRequest.js","webpack://NetLicensing/./node_modules/axios/lib/core/InterceptorManager.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/cookies.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/btoa.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/parseHeaders.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/buildURL.js","webpack://NetLicensing/./node_modules/axios/lib/core/enhanceError.js","webpack://NetLicensing/./node_modules/axios/lib/core/settle.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/normalizeHeaderName.js","webpack://NetLicensing/./node_modules/process/browser.js","webpack://NetLicensing/./node_modules/axios/lib/core/Axios.js","webpack://NetLicensing/./node_modules/is-buffer/index.js","webpack://NetLicensing/./node_modules/axios/lib/axios.js","webpack://NetLicensing/./node_modules/axios/index.js","webpack://NetLicensing/./src/netlicensing-client.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","isValid","valid","undefined","Number","isFinite","isNaN","paramNotNull","parameter","parameterName","this","TypeError","paramNotEmpty","bind","isBuffer","toString","isArray","val","isObject","isFunction","forEach","obj","fn","length","key","isArrayBuffer","isFormData","FormData","isArrayBufferView","ArrayBuffer","isView","buffer","isString","isNumber","isUndefined","isDate","isFile","isBlob","isStream","pipe","isURLSearchParams","URLSearchParams","isStandardBrowserEnv","navigator","product","document","merge","result","assignValue","arguments","extend","a","b","thisArg","trim","str","replace","BASIC_AUTHENTICATION","APIKEY_IDENTIFICATION","LicensingModel","VALID","TryAndBuy","NAME","Rental","RED_THRESHOLD","YELLOW_THRESHOLD","Subscription","Floating","MultiFeature","PayPerUse","PricingTable","Quota","LicenseTemplate","ENDPOINT_PATH","LicenseType","FEATURE","TIMEVOLUME","FLOATING","QUANTITY","Product","LicenseeSecretMode","DISABLED","PREDEFINED","CLIENT","Token","Type","DEFAULT","SHOP","APIKEY","Transaction","Status","CANCELLED","CLOSED","PENDING","Licensee","ENDPOINT_PATH_VALIDATE","ENDPOINT_PATH_TRANSFER","License","PaymentMethod","ProductModule","Utility","propertiesMap","WeakMap","definedMap","castsMap","readOnlyMap","BaseEntity","_ref","properties","casts","readOnly","_classCallCheck","set","setProperties","hasProperty","isPropertyReadOnly","_CheckUtils2","default","_typeof","castedValue","cast","setProperty","_this","removeProperties","has","keys","def","assign","removeDefine","_this2","removeProperty","indexOf","_CastsUtils2","Boolean","hasDefine","self","descriptors","getProperty","onlyGetter","_this3","_this4","getProperties","customProperties","valuesMap","defaultsMap","Context","values","baseUrl","securityMode","_Constants2","setValues","setValue","getValue","username","password","apiKey","vendorNumber","Error","copedValue","Array","removeValues","removeValue","FILTER_DELIMITER","FILTER_PAIR_DELIMITER","encode","filter","query","push","encodeURIComponent","join","decode","split","v","_v$split","_v$split2","_slicedToArray","httpXHR","Service","context","urlTemplate","queryParams","resultType","request","then","response","data","getEntity","items","item","map","status","method","template","String","params","toLowerCase","getBaseUrl","isValidUrl","restUrl","url","responseType","headers","transformRequest","toQueryString","getSecurityMode","getUsername","getPassword","auth","getApiKey","Authorization","btoa","_axios2","catch","error","info","infos","id","Promise","resolve","reasonPhrase","reject","lists","list","entity","_ref2","setListMethod","charAt","toUpperCase","substr","console","warn","type","RegExp","test","prefix","k","Date","toISOString","_BaseEntity2","_possibleConstructorReturn","__proto__","getPrototypeOf","number","active","price","hidden","parentfeature","timeVolume","startDate","inUse","defines","source","grandTotal","discount","currency","dateCreated","dateClosed","paymentMethod","licenseTransactionJoins","licenseTransactionJoin","_LicenseTransactionJoin2","setLicense","_License2","setTransaction","utils","normalizeHeaderName","DEFAULT_CONTENT_TYPE","Content-Type","setContentTypeIfUnset","adapter","defaults","XMLHttpRequest","process","JSON","stringify","transformResponse","parse","e","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","validateStatus","common","Accept","Country","code","vatPercent","isEu","vat","LicenseTransactionJoin","transaction","license","expirationTime","tokenType","licenseeNumber","successURL","successURLTitle","cancelURL","cancelURLTitle","shopURL","ProductDiscount","totalPrice","amountFix","amountPercent","getTotalPrice","getCurrency","amount","getAmountFix","getAmountPercent","discountsMap","discountsTouched","version","description","licensingInfo","licenseeAutoCreate","licenseeSecretMode","discounts","addDiscount","_ProductDiscount2","licensingModel","maxCheckoutValidity","yellowThreshold","redThreshold","licenseTemplate","paypal.subject","paypalSubject","licenseType","automatic","hideLicenses","maxSessions","quantity","_CheckUtils","vr","ValidationResults","validators","productModuleNumber","productModuleValidation","ttl","getValidators","vpMap","ValidationParameters","parameters","productNumber","licenseeName","licenseeSecret","productModuleParameters","markedForTransfer","parseInt","parseFloat","Cancel","message","__CANCEL__","enhanceError","config","settle","buildURL","parseHeaders","isURLSameOrigin","createError","requestData","requestHeaders","loadEvent","xDomain","XDomainRequest","onprogress","ontimeout","open","paramsSerializer","readyState","responseURL","responseHeaders","getAllResponseHeaders","responseText","statusText","onerror","cookies","xsrfValue","withCredentials","read","setRequestHeader","onDownloadProgress","addEventListener","onUploadProgress","upload","cancelToken","promise","cancel","abort","send","args","apply","listLicenseTypes","setSecurityMode","_Service2","listLicensingModels","listCountries","_FilterUtils2","_Country2","create","post","asPropertiesMap","_Transaction2","update","path","token","_Token2","delete","_Product2","forceCascade","productModule","_ProductModule2","_PaymentMethod2","_LicenseTemplate2","licenseTemplateNumber","transactionNumber","licensee","_Licensee2","validate","validationParameters","getProductNumber","getLicenseeName","getLicenseeSecret","pmIndex","getParameters","productModuleName","validationResults","_ValidationResults2","setProductModuleValidation","setTtl","getLastHttpRequestInfo","transfer","sourceLicenseeNumber","callback","arr","CancelToken","executor","resolvePromise","reason","throwIfRequested","baseURL","relativeURL","fns","transformData","isCancel","isAbsoluteURL","combineURLs","throwIfCancellationRequested","InterceptorManager","handlers","use","fulfilled","rejected","eject","h","write","expires","domain","secure","cookie","toGMTString","match","decodeURIComponent","remove","now","chars","E","input","block","charCode","output","idx","charCodeAt","originURL","msie","userAgent","urlParsingNode","createElement","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","location","requestURL","parsed","ignoreDuplicateOf","line","concat","serializedParams","parts","normalizedName","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","setTimeout","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","len","run","marker","runClearTimeout","Item","array","noop","nextTick","title","browser","env","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","dispatchRequest","Axios","instanceConfig","interceptors","chain","interceptor","unshift","shift","constructor","readFloatLE","slice","isSlowBuffer","_isBuffer","createInstance","defaultConfig","instance","axios","all","promises","spread","NetLicensing","Constants","LicenseeService","LicenseService","LicenseTemplateService","PaymentMethodService","ProductModuleService","ProductService","TokenService","TransactionService","UtilityService","CastsUtils","CheckUtils","FilterUtils"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,OAAA,kBAAAH,GACA,iBAAAC,QACAA,QAAA,aAAAD,IAEAD,EAAA,aAAAC,IARA,CASCK,OAAA,WACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAP,QAGA,IAAAC,EAAAI,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAT,YAUA,OANAU,EAAAH,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAQ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e,EAAA5J,OAAA,SAAA8I,GACA,OAAAW,EAAAhS,EAAA1N,MAAAgO,EAAA+Q,KAIAc,EAAA7M,OAAAxX,EAAA,IACAqkB,EAAAxH,YAAA7c,EAAA,IACAqkB,EAAA/G,SAAAtd,EAAA,IAGAqkB,EAAAC,IAAA,SAAAC,GACA,OAAApV,QAAAmV,IAAAC,IAEAF,EAAAG,OAAAxkB,EAAA,IAEAL,EAAAD,QAAA2kB,EAGA1kB,EAAAD,QAAAqJ,QAAAsb,mBCnDA1kB,EAAAD,QAAAM,EAAA,kCCCA,QAAAA,EAAA,QAEAA,EAAA,QAGAA,EAAA,QACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SAGAA,EAAA,SACAA,EAAA,QACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,QACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SAGAA,EAAA,SACAA,EAAA,QACAA,EAAA,uDAIA,IAAMykB,GAEFC,oBAGA/Z,kBACAoM,+BACAP,4BAGA7J,kBACAgY,0BACAC,yBACAC,iCACAC,+BACAC,+BACAC,yBACAC,uBACAC,6BACAC,yBAGA5R,kBACA5L,kBACAH,mBACAtB,0BACA0B,wBACAnB,kBACA8N,0BACA1M,wBACAf,gBACAK,sBACAyM,iCAGAwR,qBACAC,qBACAC,uBAGJ3lB,EAAOD,QAAU+kB,EAGjB9kB,EAAOD,QAAQqJ,QAAU0b","file":"netlicensing-client.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"NetLicensing\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"NetLicensing\"] = factory();\n\telse\n\t\troot[\"NetLicensing\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 56);\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nexport default {\r\n isValid(value) {\r\n let valid = (value !== undefined && typeof value !== 'function');\r\n if (typeof value === 'number') valid = Number.isFinite(value) && !Number.isNaN(value);\r\n return valid;\r\n },\r\n\r\n paramNotNull(parameter, parameterName) {\r\n if (!this.isValid(parameter)) throw new TypeError(`Parameter ${parameterName} has bad value ${parameter}`);\r\n if (parameter === null) throw new TypeError(`Parameter ${parameterName} cannot be null`);\r\n },\r\n\r\n paramNotEmpty(parameter, parameterName) {\r\n if (!this.isValid(parameter)) throw new TypeError(`Parameter ${parameterName} has bad value ${parameter}`);\r\n if (!parameter) throw new TypeError(`Parameter ${parameterName} cannot be null or empty string`);\r\n },\r\n};\r\n","'use strict';\n\nvar bind = require('./helpers/bind');\nvar isBuffer = require('is-buffer');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nexport default {\r\n BASIC_AUTHENTICATION: 'BASIC_AUTH',\r\n APIKEY_IDENTIFICATION: 'APIKEY',\r\n\r\n LicensingModel: {\r\n VALID: 'valid',\r\n TryAndBuy: {\r\n NAME: 'TryAndBuy',\r\n },\r\n Rental: {\r\n NAME: 'Rental',\r\n RED_THRESHOLD: 'redThreshold',\r\n YELLOW_THRESHOLD: 'yellowThreshold',\r\n },\r\n Subscription: {\r\n NAME: 'Subscription',\r\n },\r\n Floating: {\r\n NAME: 'Floating',\r\n },\r\n MultiFeature: {\r\n NAME: 'MultiFeature',\r\n },\r\n PayPerUse: {\r\n NAME: 'PayPerUse',\r\n },\r\n PricingTable: {\r\n NAME: 'PricingTable',\r\n },\r\n Quota: {\r\n NAME: 'Quota',\r\n },\r\n },\r\n\r\n LicenseTemplate: {\r\n ENDPOINT_PATH: 'licensetemplate',\r\n LicenseType: {\r\n FEATURE: 'FEATURE',\r\n TIMEVOLUME: 'TIMEVOLUME',\r\n FLOATING: 'FLOATING',\r\n QUANTITY: 'QUANTITY',\r\n },\r\n },\r\n\r\n Product: {\r\n ENDPOINT_PATH: 'product',\r\n LicenseeSecretMode: {\r\n DISABLED: 'DISABLED',\r\n PREDEFINED: 'PREDEFINED',\r\n CLIENT: 'CLIENT',\r\n },\r\n },\r\n\r\n Token: {\r\n ENDPOINT_PATH: 'token',\r\n Type: {\r\n DEFAULT: 'DEFAULT',\r\n SHOP: 'SHOP',\r\n APIKEY: 'APIKEY',\r\n },\r\n },\r\n\r\n Transaction: {\r\n ENDPOINT_PATH: 'transaction',\r\n Status: {\r\n CANCELLED: 'CANCELLED',\r\n CLOSED: 'CLOSED',\r\n PENDING: 'PENDING',\r\n },\r\n },\r\n\r\n Licensee: {\r\n ENDPOINT_PATH: 'licensee',\r\n ENDPOINT_PATH_VALIDATE: 'validate',\r\n ENDPOINT_PATH_TRANSFER: 'transfer',\r\n },\r\n\r\n License: {\r\n ENDPOINT_PATH: 'license',\r\n },\r\n\r\n PaymentMethod: {\r\n ENDPOINT_PATH: 'paymentmethod',\r\n },\r\n\r\n ProductModule: {\r\n ENDPOINT_PATH: 'productmodule',\r\n },\r\n\r\n Utility: {\r\n ENDPOINT_PATH: 'utility',\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport CastsUtils from '../util/CastsUtils';\r\n\r\n/**\r\n * The entity properties.\r\n * @type {{}}\r\n * @private\r\n */\r\nconst propertiesMap = new WeakMap();\r\n\r\n/**\r\n * List of properties that was defined\r\n * @type {{}}\r\n * @private\r\n */\r\n\r\nconst definedMap = new WeakMap();\r\n\r\n/**\r\n * List of properties that need be casts\r\n * @type {{}}\r\n * @private\r\n */\r\nconst castsMap = new WeakMap();\r\n\r\n/**\r\n * List of properties that has read-only access\r\n * @type {{}}\r\n * @private\r\n */\r\nconst readOnlyMap = new WeakMap();\r\n\r\nexport default class BaseEntity {\r\n constructor({ properties, casts, readOnly }) {\r\n propertiesMap.set(this, {});\r\n definedMap.set(this, {});\r\n castsMap.set(this, casts || []);\r\n readOnlyMap.set(this, readOnly || []);\r\n\r\n if (properties) {\r\n this.setProperties(properties);\r\n }\r\n }\r\n\r\n /**\r\n * Set a given property on the entity.\r\n * @param property\r\n * @param value\r\n * @returns {BaseEntity}\r\n */\r\n setProperty(property, value) {\r\n // if property has read-only access and was initialized at least once\r\n if (this.hasProperty(property) && this.isPropertyReadOnly(property)) {\r\n throw new TypeError(`Property ${property} has read-only access`);\r\n }\r\n\r\n // if property name has bad native type\r\n if (!CheckUtils.isValid(property) || typeof property === 'object') {\r\n throw new TypeError(`Bad property name:${property}`);\r\n }\r\n\r\n // if property value has bad native type\r\n if (!CheckUtils.isValid(value)) {\r\n throw new TypeError(`Property ${property} has bad value ${value}`);\r\n }\r\n\r\n const castedValue = this.cast(property, value);\r\n\r\n // check if property value after cast has bad native type\r\n if (!CheckUtils.isValid(value)) {\r\n throw new TypeError(`Property ${property} has bad cast value ${castedValue}`);\r\n }\r\n\r\n // define to property\r\n this.define(property);\r\n\r\n // save property to propertiesMap\r\n const properties = propertiesMap.get(this);\r\n properties[property] = castedValue;\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Alias for setProperty\r\n * @param property\r\n * @param value\r\n * @returns {BaseEntity}\r\n */\r\n addProperty(property, value) {\r\n return this.setProperty(property, value);\r\n }\r\n\r\n /**\r\n * Set the entity properties.\r\n * @param properties\r\n * @returns {BaseEntity}\r\n */\r\n setProperties(properties) {\r\n this.removeProperties();\r\n\r\n const has = Object.prototype.hasOwnProperty;\r\n\r\n Object.keys(properties).forEach((key) => {\r\n if (has.call(properties, key)) {\r\n this.setProperty(key, properties[key]);\r\n }\r\n });\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Check if we has property\r\n * @param property\r\n * @protected\r\n */\r\n hasProperty(property) {\r\n return Object.prototype.hasOwnProperty.call(propertiesMap.get(this), property);\r\n }\r\n\r\n /**\r\n * Get an property from the entity.\r\n * @param property\r\n * @param def\r\n * @returns {*}\r\n */\r\n getProperty(property, def) {\r\n return Object.prototype.hasOwnProperty.call(propertiesMap.get(this), property)\r\n ? propertiesMap.get(this)[property]\r\n : def;\r\n }\r\n\r\n /**\r\n * Get all of the current properties on the entity.\r\n */\r\n getProperties() {\r\n return Object.assign({}, propertiesMap.get(this));\r\n }\r\n\r\n /**\r\n * Remove property\r\n * @param property\r\n * @returns {BaseEntity}\r\n */\r\n removeProperty(property) {\r\n const properties = propertiesMap.get(this);\r\n delete properties[property];\r\n this.removeDefine(property);\r\n return this;\r\n }\r\n\r\n /**\r\n * Remove properties\r\n * @param properties\r\n */\r\n removeProperties(properties) {\r\n const propertiesForRemove = properties || Object.keys(propertiesMap.get(this));\r\n\r\n propertiesForRemove.forEach((property) => {\r\n this.removeProperty(property);\r\n });\r\n }\r\n\r\n isPropertyReadOnly(property) {\r\n return readOnlyMap.get(this).indexOf(property) >= 0;\r\n }\r\n\r\n cast(property, value) {\r\n if (!castsMap.get(this)[property]) return value;\r\n\r\n return CastsUtils(castsMap.get(this)[property], value);\r\n }\r\n\r\n /**\r\n * Check if property has defined\r\n * @param property\r\n * @protected\r\n */\r\n hasDefine(property) {\r\n return Boolean(definedMap.get(this)[property]);\r\n }\r\n\r\n /**\r\n * Define property getter and setter\r\n * @param property\r\n * @protected\r\n */\r\n define(property) {\r\n if (this.hasDefine(property)) return;\r\n\r\n if (!CheckUtils.isValid(property) || typeof property === 'object') {\r\n throw new TypeError(`Bad property name:${property}`);\r\n }\r\n\r\n const self = this;\r\n\r\n // delete property\r\n delete this[property];\r\n\r\n const descriptors = {\r\n enumerable: true,\r\n configurable: true,\r\n get() {\r\n return self.getProperty(property);\r\n },\r\n };\r\n\r\n if (!this.isPropertyReadOnly(property)) {\r\n descriptors.set = value => self.setProperty(property, value);\r\n }\r\n\r\n const defined = definedMap.get(this);\r\n defined[property] = true;\r\n\r\n Object.defineProperty(this, property, descriptors);\r\n }\r\n\r\n /**\r\n * Remove property getter and setter\r\n * @param property\r\n * @protected\r\n */\r\n removeDefine(property) {\r\n if (!this.hasDefine(property)) return;\r\n\r\n const defined = definedMap.get(this);\r\n delete defined[property];\r\n\r\n delete this[property];\r\n }\r\n\r\n /**\r\n * Define properties getter and setter\r\n * @param properties\r\n * @param onlyGetter\r\n * @protected\r\n */\r\n defines(properties, onlyGetter) {\r\n properties.forEach((property) => {\r\n this.define(property, onlyGetter);\r\n });\r\n }\r\n\r\n /**\r\n * Get properties map\r\n */\r\n asPropertiesMap() {\r\n const properties = this.getProperties();\r\n const customProperties = {};\r\n\r\n const has = Object.prototype.hasOwnProperty;\r\n\r\n Object.keys(this).forEach((key) => {\r\n if (!has.call(this, key)) return;\r\n if (!CheckUtils.isValid(this[key])) return;\r\n\r\n customProperties[key] = this[key];\r\n });\r\n\r\n return Object.assign({}, customProperties, properties);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport Constants from '../Constants';\r\nimport CheckUtils from '../util/CheckUtils';\r\n\r\n/**\r\n * The context values.\r\n * @type {{}}\r\n * @private\r\n */\r\nconst valuesMap = new WeakMap();\r\n\r\n/**\r\n * List of values that was defined\r\n * @type {{}}\r\n * @private\r\n */\r\nconst definedMap = new WeakMap();\r\n\r\n/**\r\n * Context defaults\r\n * @type {{baseUrl: string, securityMode}}\r\n * @private\r\n */\r\nconst defaultsMap = new WeakMap();\r\n\r\nexport default class Context {\r\n constructor(values) {\r\n defaultsMap.set(this, {\r\n baseUrl: 'https://go.netlicensing.io/core/v2/rest',\r\n securityMode: Constants.BASIC_AUTHENTICATION,\r\n });\r\n\r\n valuesMap.set(this, {});\r\n\r\n definedMap.set(this, {});\r\n\r\n this.setValues(Object.assign({}, defaultsMap.get(this), values));\r\n }\r\n\r\n setBaseUrl(baseUrl) {\r\n return this.setValue('baseUrl', baseUrl);\r\n }\r\n\r\n getBaseUrl(def) {\r\n return this.getValue('baseUrl', def);\r\n }\r\n\r\n setUsername(username) {\r\n return this.setValue('username', username);\r\n }\r\n\r\n getUsername(def) {\r\n return this.getValue('username', def);\r\n }\r\n\r\n setPassword(password) {\r\n return this.setValue('password', password);\r\n }\r\n\r\n getPassword(def) {\r\n return this.getValue('password', def);\r\n }\r\n\r\n setApiKey(apiKey) {\r\n return this.setValue('apiKey', apiKey);\r\n }\r\n\r\n getApiKey(def) {\r\n return this.getValue('apiKey', def);\r\n }\r\n\r\n setSecurityMode(securityMode) {\r\n return this.setValue('securityMode', securityMode);\r\n }\r\n\r\n getSecurityMode(def) {\r\n return this.getValue('securityMode', def);\r\n }\r\n\r\n setVendorNumber(vendorNumber) {\r\n return this.setValue('vendorNumber', vendorNumber);\r\n }\r\n\r\n getVendorNumber(def) {\r\n return this.getValue('vendorNumber', def);\r\n }\r\n\r\n /**\r\n * Set a given values on the context.\r\n * @param key\r\n * @param value\r\n * @returns {Context}\r\n */\r\n setValue(key, value) {\r\n // check values\r\n if (!CheckUtils.isValid(key) || typeof key === 'object') throw new Error(`Bad value key:${key}`);\r\n if (!CheckUtils.isValid(value)) throw new Error(`Value ${key} has wrong value${value}`);\r\n\r\n // define keys\r\n this.define(key);\r\n\r\n let copedValue = value;\r\n\r\n if (typeof value === 'object') {\r\n copedValue = (Array.isArray(value)) ? Object.assign([], value) : Object.assign({}, value);\r\n }\r\n\r\n const values = valuesMap.get(this);\r\n values[key] = copedValue;\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Set the array of context values.\r\n * @param values\r\n * @returns {Context}\r\n */\r\n setValues(values) {\r\n this.removeValues();\r\n\r\n const has = Object.prototype.hasOwnProperty;\r\n\r\n Object.keys(values).forEach((key) => {\r\n if (has.call(values, key)) {\r\n this.setValue(key, values[key]);\r\n }\r\n });\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Get an value from the context.\r\n * @param key\r\n * @param def\r\n * @returns {*}\r\n */\r\n getValue(key, def) {\r\n return valuesMap.get(this)[key] || def;\r\n }\r\n\r\n /**\r\n * Get all of the current value on the context.\r\n */\r\n getValues() {\r\n return Object.assign({}, valuesMap.get(this));\r\n }\r\n\r\n /**\r\n * Remove value\r\n * @param key\r\n * @returns {Context}\r\n */\r\n removeValue(key) {\r\n const values = valuesMap.get(this);\r\n delete values[key];\r\n\r\n this.removeDefine(key);\r\n return this;\r\n }\r\n\r\n /**\r\n * Remove values\r\n * @param keys\r\n */\r\n removeValues(keys) {\r\n const keysAr = keys || Object.keys(valuesMap.get(this));\r\n keysAr.forEach(key => this.removeValue(key));\r\n }\r\n\r\n /**\r\n * Define value getter and setter\r\n * @param key\r\n * @param onlyGetter\r\n * @private\r\n */\r\n define(key, onlyGetter) {\r\n if (this.hasDefine(key)) return;\r\n\r\n if (!CheckUtils.isValid(key) || typeof property === 'object') {\r\n throw new TypeError(`Bad value name:${key}`);\r\n }\r\n\r\n const self = this;\r\n\r\n // delete property\r\n delete this[key];\r\n\r\n const descriptors = {\r\n enumerable: true,\r\n configurable: true,\r\n get() {\r\n return self.getValue(key);\r\n },\r\n };\r\n\r\n if (!onlyGetter) {\r\n descriptors.set = value => self.setValue(key, value);\r\n }\r\n\r\n const defined = definedMap.get(this);\r\n defined[key] = true;\r\n\r\n Object.defineProperty(this, key, descriptors);\r\n }\r\n\r\n /**\r\n * Check if value has defined\r\n * @param key\r\n * @private\r\n */\r\n hasDefine(key) {\r\n return Boolean(definedMap.get(this)[key]);\r\n }\r\n\r\n /**\r\n * Remove value getter and setter\r\n * @param key\r\n * @private\r\n */\r\n removeDefine(key) {\r\n if (!this.hasDefine(key)) return;\r\n\r\n const defined = definedMap.get(this);\r\n delete defined[key];\r\n\r\n delete this[key];\r\n }\r\n}\r\n","export default {\r\n FILTER_DELIMITER: ';',\r\n FILTER_PAIR_DELIMITER: '=',\r\n encode(filter = {}) {\r\n const query = [];\r\n const has = Object.prototype.hasOwnProperty;\r\n Object.keys(filter).forEach((key) => {\r\n if (has.call(filter, key)) {\r\n query.push(`${encodeURIComponent(key)}${this.FILTER_PAIR_DELIMITER}${encodeURIComponent(filter[key])}`);\r\n }\r\n });\r\n return query.join(this.FILTER_DELIMITER);\r\n },\r\n decode(query = '') {\r\n const filter = {};\r\n query.split(this.FILTER_DELIMITER).forEach((v) => {\r\n const [name, value] = v.split(this.FILTER_PAIR_DELIMITER);\r\n filter[name] = value;\r\n });\r\n return filter;\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport axios from 'axios';\r\nimport Context from '../vo/Context';\r\nimport Constants from '../Constants';\r\nimport BaseEntity from '../entities/BaseEntity';\r\n\r\nlet httpXHR = {};\r\n\r\nexport default class Service {\r\n static getLastHttpRequestInfo() {\r\n return httpXHR;\r\n }\r\n\r\n /**\r\n * Helper method for performing GET request to N\r\n etLicensing API services. Finds and returns first suitable item with\r\n * type resultType from the response.\r\n *\r\n * Context for the NetLicensing API call\r\n * @param context\r\n *\r\n * the REST URL template\r\n * @param urlTemplate\r\n *\r\n * The REST query parameters values. May be null if there are no parameters.\r\n * @param queryParams\r\n *\r\n * the type of the result\r\n * @param resultType\r\n *\r\n * @returns {Promise}\r\n */\r\n static get(context, urlTemplate, queryParams, resultType) {\r\n return Service\r\n .request(context, 'get', urlTemplate, queryParams)\r\n .then(response => ((response.data) ? Service.getEntity(resultType, response.data.items.item[0]) : null));\r\n }\r\n\r\n /**\r\n * Helper method for performing GET request to NetLicensing API service that returns page of items with type\r\n * resultType.\r\n *\r\n * context for the NetLicensing API call\r\n * @param context\r\n *\r\n * the REST URL template\r\n * @param urlTemplate\r\n *\r\n * The REST query parameters values. May be null if there are no parameters.\r\n * @param queryParams\r\n *\r\n * the type of the result\r\n * @param resultType\r\n *\r\n *\r\n * @returns {Promise}\r\n */\r\n static list(context, urlTemplate, queryParams, resultType) {\r\n return Service\r\n .request(context, 'get', urlTemplate, queryParams)\r\n .then(response => ((response.data)\r\n ? response.data.items.item.map(item => Service.getEntity(resultType, item))\r\n : []));\r\n }\r\n\r\n /**\r\n * Helper method for performing POST request to NetLicensing API services. Finds and returns first suitable item\r\n * with type resultType from the response.\r\n *\r\n * context for the NetLicensing API call\r\n * @param context\r\n *\r\n * the REST URL template\r\n * @param urlTemplate\r\n *\r\n * The REST query parameters values. May be null if there are no parameters.\r\n * @param queryParams\r\n *\r\n * he type of the result\r\n * @param resultType\r\n *\r\n * @returns {Promise}\r\n */\r\n static post(context, urlTemplate, queryParams, resultType) {\r\n return Service\r\n .request(context, 'post', urlTemplate, queryParams)\r\n .then(response => ((response.data) ? Service.getEntity(resultType, response.data.items.item[0]) : null));\r\n }\r\n\r\n /**\r\n *\r\n * @param context\r\n * @param urlTemplate\r\n * @param queryParams\r\n * @returns {Promise}\r\n */\r\n static delete(context, urlTemplate, queryParams) {\r\n return Service\r\n .request(context, 'delete', urlTemplate, queryParams)\r\n .then(response => (response.status === 204));\r\n }\r\n\r\n /**\r\n * Send request to NetLicensing RestApi\r\n * @param context\r\n * @param method\r\n * @param urlTemplate\r\n * @param queryParams\r\n * @returns {Promise}\r\n */\r\n static request(context, method, urlTemplate, queryParams) {\r\n if (!(context instanceof Context)) throw new TypeError('context must be an instance of NetLicensing.Context');\r\n\r\n const template = String(urlTemplate);\r\n const params = queryParams || {};\r\n\r\n if (!template) throw new TypeError('Url template must be specified');\r\n\r\n // validate http method\r\n if (['get', 'post', 'delete'].indexOf(method.toLowerCase()) < 0) {\r\n throw new Error(`Invalid request type:${method}, allowed requests types: GET, POST, DELETE.`);\r\n }\r\n\r\n // validate context\r\n if (!context.getBaseUrl(null)) {\r\n throw new Error('Base url must be specified');\r\n }\r\n\r\n if (!Service.isValidUrl(String(context.getBaseUrl()))) {\r\n throw new Error(`Base url \"${context.getBaseUrl()}\" is not a valid URL`);\r\n }\r\n\r\n let restUrl = `${context.getBaseUrl()}/${urlTemplate}`;\r\n\r\n restUrl = restUrl.replace(/([^:]\\/)\\/+/g, '$1');\r\n\r\n // validate baseUrl + urlTemplate\r\n if (!Service.isValidUrl(String(restUrl))) {\r\n throw new Error(`Rest url \"${restUrl}\" is not a valid URL`);\r\n }\r\n\r\n const request = {\r\n url: restUrl,\r\n method: method.toLowerCase(),\r\n responseType: 'json',\r\n headers: {},\r\n transformRequest: [(data, headers) => {\r\n if (headers['Content-Type'] === 'application/x-www-form-urlencoded') {\r\n return Service.toQueryString(data);\r\n }\r\n return data;\r\n }],\r\n };\r\n\r\n if (['put', 'post', 'patch'].indexOf(request.method) >= 0) {\r\n if (request.method === 'post') {\r\n request.headers['Content-Type'] = 'application/x-www-form-urlencoded';\r\n }\r\n request.data = params;\r\n } else {\r\n request.params = params;\r\n }\r\n\r\n switch (context.getSecurityMode()) {\r\n // Basic Auth\r\n case Constants.BASIC_AUTHENTICATION:\r\n if (!context.getUsername()) throw new Error('Missing parameter \"username\"');\r\n if (!context.getPassword()) throw new Error('Missing parameter \"password\"');\r\n\r\n request.auth = {\r\n username: context.getUsername(),\r\n password: context.getPassword(),\r\n };\r\n break;\r\n // ApiKey Auth\r\n case Constants.APIKEY_IDENTIFICATION:\r\n if (!context.getApiKey()) throw new Error('Missing parameter \"apiKey\"');\r\n\r\n request.headers.Authorization = `Basic ${btoa(`apiKey:${context.getApiKey()}`)}`;\r\n break;\r\n default:\r\n throw new Error('Unknown security mode');\r\n }\r\n\r\n return axios(request)\r\n .then((response) => {\r\n httpXHR = response;\r\n return response;\r\n })\r\n .catch((error) => {\r\n httpXHR = error;\r\n\r\n if (error.response) {\r\n // The request was made and the server responded with a status code\r\n // that falls out of the range of 2xx\r\n const info = error.response.data.infos.info[0] || null;\r\n\r\n if (info && info.id === 'NotFoundException') {\r\n return Promise.resolve(null);\r\n }\r\n\r\n const reasonPhrase = info.value || 'Unknown';\r\n throw new Error(`Unsupported response status code ${error.response.status}: ${reasonPhrase}`);\r\n }\r\n\r\n return Promise.reject(error);\r\n });\r\n }\r\n\r\n /**\r\n * Create Entity from item\r\n * @param resultType\r\n * @param item\r\n * @returns {*}\r\n */\r\n static getEntity(resultType, item) {\r\n const properties = item.property || null;\r\n const lists = item.list || null;\r\n\r\n if (!resultType) return item;\r\n\r\n // eslint-disable-next-line new-cap\r\n const entity = new resultType();\r\n\r\n if (!(entity instanceof BaseEntity)) {\r\n throw new Error(`Invalid entity ${resultType}, entity must be instanceof BaseEntity`);\r\n }\r\n\r\n properties.forEach(({ name, value }) => {\r\n entity.setProperty(name, value);\r\n });\r\n\r\n if (lists) {\r\n lists.forEach(({ name, property }) => {\r\n const setListMethod = `setList${name.charAt(0).toUpperCase()}${name.substr(1, name.length - 1)}`;\r\n const setListsMethod = 'setLists';\r\n\r\n if (typeof entity[setListMethod] !== 'function' && typeof entity[setListsMethod] !== 'function') {\r\n // eslint-disable-next-line no-console\r\n console.warn(`Methods: ${setListMethod},${setListsMethod} not found in ${item.type} \r\n for list property ${name}`);\r\n return;\r\n }\r\n\r\n if (typeof entity[setListMethod] === 'function') {\r\n entity[setListMethod](property);\r\n return;\r\n }\r\n\r\n if (typeof entity[setListsMethod] === 'function') {\r\n entity[setListsMethod](name, property);\r\n }\r\n });\r\n }\r\n\r\n return entity;\r\n }\r\n\r\n static isValidUrl(url) {\r\n const pattern = new RegExp('^(https?:\\\\/\\\\/)?' + // protocol\r\n '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.?)+[a-z]{2,}|' + // domain name\r\n '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))' + // OR ip (v4) address\r\n '(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*' + // port and path\r\n '(\\\\?[;&a-z\\\\d%_.~+=-]*)?' + // query string\r\n '(\\\\#[-a-z\\\\d_]*)?$', 'i'); // fragment locator\r\n\r\n return pattern.test(url);\r\n }\r\n\r\n static toQueryString(data, prefix) {\r\n const query = [];\r\n\r\n const has = Object.prototype.hasOwnProperty;\r\n\r\n Object.keys(data).forEach((key) => {\r\n if (has.call(data, key)) {\r\n const k = prefix ? `${prefix}[${key}]` : key;\r\n let v = data[key];\r\n v = (v instanceof Date) ? v.toISOString() : v;\r\n query.push((v !== null && typeof v === 'object') ?\r\n Service.toQueryString(v, k) :\r\n `${encodeURIComponent(k)}=${encodeURIComponent(v)}`);\r\n }\r\n });\r\n\r\n return query.join('&').replace(/%5B[0-9]+%5D=/g, '=');\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\n\r\n/**\r\n * License entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can\r\n * assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation\r\n * transaction status is set to closed.\r\n * @property string number\r\n *\r\n * Name for the licensed item. Set from license template on creation, if not specified explicitly.\r\n * @property string name\r\n *\r\n * If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled,\r\n * the license is excluded from the validation process.\r\n * @property boolean active\r\n *\r\n * price for the license. If >0, it must always be accompanied by the currency specification. Read-only,\r\n * set from license template on creation.\r\n * @property float price\r\n *\r\n * specifies currency for the license price. Check data types to discover which currencies are\r\n * supported. Read-only, set from license template on creation.\r\n * @property string currency\r\n *\r\n * If set to true, this license is not shown in NetLicensing Shop as purchased license. Set from license\r\n * template on creation, if not specified explicitly.\r\n * @property boolean $hidden\r\n *\r\n * @property string startDate\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each license. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, licenseeNumber,\r\n * licenseTemplateNumber.\r\n */\r\nexport default class License extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n active: 'boolean',\r\n name: 'string',\r\n price: 'float',\r\n hidden: 'boolean',\r\n parentfeature: 'string',\r\n timeVolume: 'int',\r\n startDate: 'date',\r\n inUse: 'boolean',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['inUse', 'currency', 'price'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines([\r\n 'number',\r\n 'active',\r\n 'name',\r\n 'hidden',\r\n 'parentfeature',\r\n 'timeVolume',\r\n 'startDate',\r\n 'inUse',\r\n 'currency',\r\n 'price',\r\n ]);\r\n }\r\n\r\n setNumber(number) {\r\n return this.setProperty('number', number);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setActive(active) {\r\n return this.setProperty('active', active);\r\n }\r\n\r\n getActive(def) {\r\n return this.getProperty('active', def);\r\n }\r\n\r\n setName(name) {\r\n return this.setProperty('name', name);\r\n }\r\n\r\n getName(def) {\r\n return this.getProperty('name', def);\r\n }\r\n\r\n setHidden(hidden) {\r\n return this.setProperty('hidden', hidden);\r\n }\r\n\r\n getHidden(def) {\r\n return this.getProperty('hidden', def);\r\n }\r\n\r\n setParentfeature(parentfeature) {\r\n return this.setProperty('parentfeature', parentfeature);\r\n }\r\n\r\n getParentfeature(def) {\r\n return this.getProperty('parentfeature', def);\r\n }\r\n\r\n setTimeVolume(timeVolume) {\r\n return this.setProperty('timeVolume', timeVolume);\r\n }\r\n\r\n getTimeVolume(def) {\r\n return this.getProperty('timeVolume', def);\r\n }\r\n\r\n setStartDate(startDate) {\r\n return this.setProperty('startDate', startDate);\r\n }\r\n\r\n getStartDate(def) {\r\n return this.getProperty('startDate', def);\r\n }\r\n\r\n getInUse(def) {\r\n return this.getProperty('inUse', def);\r\n }\r\n\r\n getPrice(def) {\r\n return this.getProperty('price', def);\r\n }\r\n\r\n getCurrency(def) {\r\n return this.getProperty('currency', def);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\nimport LicenseTransactionJoin from './LicenseTransactionJoin';\r\nimport License from './License';\r\n\r\n/**\r\n * Transaction entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the transaction. This number is\r\n * always generated by NetLicensing.\r\n * @property string number\r\n *\r\n * always true for transactions\r\n * @property boolean active\r\n *\r\n * Status of transaction. \"CANCELLED\", \"CLOSED\", \"PENDING\".\r\n * @property string status\r\n *\r\n * \"SHOP\". AUTO transaction for internal use only.\r\n * @property string source\r\n *\r\n * grand total for SHOP transaction (see source).\r\n * @property float grandTotal\r\n *\r\n * discount for SHOP transaction (see source).\r\n * @property float discount\r\n *\r\n * specifies currency for money fields (grandTotal and discount). Check data types to discover which\r\n * @property string currency\r\n *\r\n * Date created. Optional.\r\n * @property string dateCreated\r\n *\r\n * Date closed. Optional.\r\n * @property string dateClosed\r\n *\r\n * @constructor\r\n */\r\nexport default class Transaction extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n name: 'string',\r\n status: 'string',\r\n source: 'string',\r\n grandTotal: 'float',\r\n discount: 'float',\r\n currency: 'string',\r\n dateCreated: 'date',\r\n dateClosed: 'date',\r\n active: 'boolean',\r\n paymentMethod: 'string',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['active'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines([\r\n 'number',\r\n 'name',\r\n 'status',\r\n 'source',\r\n 'grandTotal',\r\n 'discount',\r\n 'currency',\r\n 'dateCreated',\r\n 'dateClosed',\r\n 'paymentMethod',\r\n 'licenseTransactionJoins',\r\n ]);\r\n }\r\n\r\n setNumber(number) {\r\n return this.setProperty('number', number);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setName(name) {\r\n return this.setProperty('name', name);\r\n }\r\n\r\n getName(def) {\r\n return this.getProperty('name', def);\r\n }\r\n\r\n setStatus(status) {\r\n return this.setProperty('status', status);\r\n }\r\n\r\n getStatus(def) {\r\n return this.getProperty('status', def);\r\n }\r\n\r\n setSource(source) {\r\n return this.setProperty('source', source);\r\n }\r\n\r\n getSource(def) {\r\n return this.getProperty('source', def);\r\n }\r\n\r\n setGrandTotal(grandTotal) {\r\n return this.setProperty('grandTotal', grandTotal);\r\n }\r\n\r\n getGrandTotal(def) {\r\n return this.getProperty('grandTotal', def);\r\n }\r\n\r\n setDiscount(discount) {\r\n return this.setProperty('discount', discount);\r\n }\r\n\r\n getDiscount(def) {\r\n return this.getProperty('discount', def);\r\n }\r\n\r\n setCurrency(currency) {\r\n return this.setProperty('currency', currency);\r\n }\r\n\r\n getCurrency(def) {\r\n return this.getProperty('currency', def);\r\n }\r\n\r\n setDateCreated(dateCreated) {\r\n return this.setProperty('dateCreated', dateCreated);\r\n }\r\n\r\n getDateCreated(def) {\r\n return this.getProperty('dateCreated', def);\r\n }\r\n\r\n setDateClosed(dateClosed) {\r\n return this.setProperty('dateClosed', dateClosed);\r\n }\r\n\r\n getDateClosed(def) {\r\n return this.getProperty('dateClosed', def);\r\n }\r\n\r\n setPaymentMethod(paymentMethod) {\r\n return this.setProperty('paymentMethod', paymentMethod);\r\n }\r\n\r\n getPaymentMethod(def) {\r\n return this.getProperty('paymentMethod', def);\r\n }\r\n\r\n setActive() {\r\n return this.setProperty('active', true);\r\n }\r\n\r\n getLicenseTransactionJoins(def) {\r\n return this.getProperty('licenseTransactionJoins', def);\r\n }\r\n\r\n setLicenseTransactionJoins(licenseTransactionJoins) {\r\n return this.setProperty('licenseTransactionJoins', licenseTransactionJoins);\r\n }\r\n\r\n setListLicenseTransactionJoin(properties) {\r\n if (!properties) return;\r\n\r\n const licenseTransactionJoins = this.getProperty('licenseTransactionJoins', []);\r\n const licenseTransactionJoin = new LicenseTransactionJoin();\r\n\r\n properties.forEach((property) => {\r\n if (property.name === 'licenseNumber') {\r\n licenseTransactionJoin.setLicense(new License({ number: property.value }));\r\n }\r\n\r\n if (property.name === 'transactionNumber') {\r\n licenseTransactionJoin.setTransaction(new Transaction({ number: property.value }));\r\n }\r\n });\r\n\r\n licenseTransactionJoins.push(licenseTransactionJoin);\r\n this.setProperty('licenseTransactionJoins', licenseTransactionJoins);\r\n }\r\n}\r\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\n\r\n/**\r\n * Country entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * @property code - Unique code of country.\r\n *\r\n * @property name - Unique name of country\r\n *\r\n * @property vatPercent - Country vat.\r\n *\r\n * @property isEu - is country in EU.\r\n */\r\nexport default class Country extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n code: 'string',\r\n name: 'string',\r\n vatPercent: 'int',\r\n isEu: 'boolean',\r\n },\r\n });\r\n\r\n // define default entity properties\r\n this.defines(['code', 'name', 'vatPercent', 'isEu']);\r\n }\r\n\r\n setCode(code) {\r\n return this.setProperty('code', code);\r\n }\r\n\r\n getCode(def) {\r\n return this.getProperty('code', def);\r\n }\r\n\r\n setName(name) {\r\n return this.setProperty('name', name);\r\n }\r\n\r\n getName(def) {\r\n return this.getProperty('name', def);\r\n }\r\n\r\n setVatPercent(vat) {\r\n return this.setProperty('vatPercent', vat);\r\n }\r\n\r\n getVatPercent(def) {\r\n return this.getProperty('vatPercent', def);\r\n }\r\n\r\n setIsEu(isEu) {\r\n return this.setProperty('isEu', isEu);\r\n }\r\n\r\n getIsEu(def) {\r\n return this.getProperty('isEu', def);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport Transaction from './Transaction';\r\nimport License from './License';\r\n\r\n// const\r\n\r\nexport default class LicenseTransactionJoin {\r\n constructor(transaction, license) {\r\n this.transaction = transaction;\r\n this.license = license;\r\n }\r\n\r\n setTransaction(transaction) {\r\n if (!(transaction instanceof Transaction)) {\r\n throw new TypeError('context must be an instance of Transaction');\r\n }\r\n\r\n this.transaction = transaction;\r\n return this;\r\n }\r\n\r\n getTransaction(def) {\r\n return this.transaction || def;\r\n }\r\n\r\n setLicense(license) {\r\n if (!(license instanceof License)) {\r\n throw new TypeError('context must be an instance of License');\r\n }\r\n this.license = license;\r\n return this;\r\n }\r\n\r\n getLicense(def) {\r\n return this.license || def;\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\n\r\n/**\r\n * Product module entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number\r\n * @property string number\r\n *\r\n * If set to false, the token is disabled.\r\n * @property boolean active\r\n *\r\n * Expiration Time\r\n * @property string expirationTime\r\n *\r\n * @property string vendorNumber\r\n *\r\n * Token type to be generated.\r\n * DEFAULT - default one-time token (will be expired after first request)\r\n * SHOP - shop token is used to redirect customer to the netlicensingShop(licenseeNumber is mandatory)\r\n * APIKEY - APIKey-token\r\n * @property string tokenType\r\n *\r\n * @property string licenseeNumber\r\n *\r\n * @constructor\r\n */\r\nexport default class Token extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n active: 'boolean',\r\n expirationTime: 'date',\r\n vendorNumber: 'string',\r\n tokenType: 'string',\r\n licenseeNumber: 'string',\r\n successURL: 'string',\r\n successURLTitle: 'string',\r\n cancelURL: 'string',\r\n cancelURLTitle: 'string',\r\n shopURL: 'string',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['number', 'shopURL'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines([\r\n 'number',\r\n 'active',\r\n 'expirationTime',\r\n 'vendorNumber',\r\n 'tokenType',\r\n 'licenseeNumber',\r\n 'successURL',\r\n 'successURLTitle',\r\n 'cancelURL',\r\n 'cancelURLTitle',\r\n 'shopURL',\r\n ]);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setActive(active) {\r\n return this.setProperty('active', active);\r\n }\r\n\r\n getActive(def) {\r\n return this.getProperty('active', def);\r\n }\r\n\r\n setExpirationTime(expirationTime) {\r\n return this.setProperty('expirationTime', expirationTime);\r\n }\r\n\r\n getExpirationTime(def) {\r\n return this.getProperty('expirationTime', def);\r\n }\r\n\r\n setVendorNumber(vendorNumber) {\r\n return this.setProperty('vendorNumber', vendorNumber);\r\n }\r\n\r\n getVendorNumber(def) {\r\n return this.getProperty('vendorNumber', def);\r\n }\r\n\r\n setTokenType(tokenType) {\r\n return this.setProperty('tokenType', tokenType);\r\n }\r\n\r\n getTokenType(def) {\r\n return this.getProperty('tokenType', def);\r\n }\r\n\r\n setLicenseeNumber(licenseeNumber) {\r\n return this.setProperty('licenseeNumber', licenseeNumber);\r\n }\r\n\r\n getLicenseeNumber(def) {\r\n return this.getProperty('licenseeNumber', def);\r\n }\r\n\r\n setSuccessURL(successURL) {\r\n return this.setProperty('successURL', successURL);\r\n }\r\n\r\n getSuccessURL(def) {\r\n return this.getProperty('successURL', def);\r\n }\r\n\r\n setSuccessURLTitle(successURLTitle) {\r\n return this.setProperty('successURLTitle', successURLTitle);\r\n }\r\n\r\n getSuccessURLTitle(def) {\r\n return this.getProperty('successURLTitle', def);\r\n }\r\n\r\n setCancelURL(cancelURL) {\r\n return this.setProperty('cancelURL', cancelURL);\r\n }\r\n\r\n getCancelURL(def) {\r\n return this.getProperty('cancelURL', def);\r\n }\r\n\r\n setCancelURLTitle(cancelURLTitle) {\r\n return this.setProperty('cancelURLTitle', cancelURLTitle);\r\n }\r\n\r\n getCancelURLTitle(def) {\r\n return this.getProperty('cancelURLTitle', def);\r\n }\r\n\r\n getShopURL(def) {\r\n return this.getProperty('shopURL', def);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\nimport BaseEntity from './BaseEntity';\r\n\r\nexport default class ProductDiscount extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n totalPrice: 'float',\r\n currency: 'string',\r\n amountFix: 'float',\r\n amountPercent: 'int',\r\n },\r\n });\r\n\r\n // define default entity properties\r\n this.defines(['totalPrice', 'currency', 'amountFix', 'amountPercent']);\r\n }\r\n\r\n setTotalPrice(totalPrice) {\r\n return this.setProperty('totalPrice', totalPrice);\r\n }\r\n\r\n getTotalPrice(def) {\r\n return this.getProperty('totalPrice', def);\r\n }\r\n\r\n setCurrency(currency) {\r\n return this.setProperty('currency', currency);\r\n }\r\n\r\n getCurrency(def) {\r\n return this.getProperty('currency', def);\r\n }\r\n\r\n setAmountFix(amountFix) {\r\n return this.setProperty('amountFix', amountFix).removeProperty('amountPercent');\r\n }\r\n\r\n getAmountFix(def) {\r\n return this.getProperty('amountFix', def);\r\n }\r\n\r\n setAmountPercent(amountPercent) {\r\n return this.setProperty('amountPercent', amountPercent).removeProperty('amountFix');\r\n }\r\n\r\n getAmountPercent(def) {\r\n return this.getProperty('amountPercent', def);\r\n }\r\n\r\n toString() {\r\n const totalPrice = this.getTotalPrice();\r\n const currency = this.getCurrency();\r\n let amount = 0;\r\n\r\n if (this.getAmountFix(null)) amount = this.getAmountFix();\r\n if (this.getAmountPercent(null)) amount = `${this.getAmountPercent()}%`;\r\n\r\n return `${totalPrice};${currency};${amount}`;\r\n }\r\n}\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\nimport ProductDiscount from './ProductDiscount';\r\n\r\n/**\r\n * The discounts map\r\n * @type {{}}\r\n * @private\r\n */\r\nconst discountsMap = new WeakMap();\r\n\r\n/**\r\n * An identifier that show if discounts was touched\r\n * @type {{}}\r\n * @private\r\n */\r\nconst discountsTouched = new WeakMap();\r\n\r\n/**\r\n * NetLicensing Product entity.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number that identifies the product. Vendor can assign this number when creating a product or\r\n * let NetLicensing generate one. Read-only after creation of the first licensee for the product.\r\n * @property string number\r\n *\r\n * If set to false, the product is disabled. No new licensees can be registered for the product,\r\n * existing licensees can not obtain new licenses.\r\n * @property boolean active\r\n *\r\n * Product name. Together with the version identifies the product for the end customer.\r\n * @property string name\r\n *\r\n * Product version. Convenience parameter, additional to the product name.\r\n * @property float version\r\n *\r\n * If set to 'true', non-existing licensees will be created at first validation attempt.\r\n * @property boolean licenseeAutoCreate\r\n *\r\n * Licensee secret mode for product.Supported types: \"DISABLED\", \"PREDEFINED\", \"CLIENT\"\r\n * @property boolean licenseeSecretMode\r\n *\r\n * Product description. Optional.\r\n * @property string description\r\n *\r\n * Licensing information. Optional.\r\n * @property string licensingInfo\r\n *\r\n * @property boolean inUse\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each product. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted.\r\n *\r\n * @constructor\r\n */\r\nexport default class Product extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n active: 'boolean',\r\n name: 'string',\r\n version: 'string',\r\n description: 'string',\r\n licensingInfo: 'string',\r\n licenseeAutoCreate: 'boolean',\r\n licenseeSecretMode: 'string',\r\n inUse: 'boolean',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['inUse'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines([\r\n 'number',\r\n 'active',\r\n 'name',\r\n 'version',\r\n 'description',\r\n 'licensingInfo',\r\n 'licenseeAutoCreate',\r\n 'licenseeSecretMode',\r\n 'inUse',\r\n ]);\r\n\r\n discountsMap.set(this, []);\r\n discountsTouched.set(this, false);\r\n }\r\n\r\n setNumber(number) {\r\n return this.setProperty('number', number);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setActive(active) {\r\n return this.setProperty('active', active);\r\n }\r\n\r\n getActive(def) {\r\n return this.getProperty('active', def);\r\n }\r\n\r\n setName(name) {\r\n return this.setProperty('name', name);\r\n }\r\n\r\n getName(def) {\r\n return this.getProperty('name', def);\r\n }\r\n\r\n setVersion(version) {\r\n return this.setProperty('version', version);\r\n }\r\n\r\n getVersion(def) {\r\n return this.getProperty('version', def);\r\n }\r\n\r\n setLicenseeAutoCreate(licenseeAutoCreate) {\r\n return this.setProperty('licenseeAutoCreate', licenseeAutoCreate);\r\n }\r\n\r\n getLicenseeAutoCreate(def) {\r\n return this.getProperty('licenseeAutoCreate', def);\r\n }\r\n\r\n setLicenseeSecretMode(licenseeSecretMode) {\r\n return this.setProperty('licenseeSecretMode', licenseeSecretMode);\r\n }\r\n\r\n getLicenseeSecretMode(def) {\r\n return this.getProperty('licenseeSecretMode', def);\r\n }\r\n\r\n setDescription(description) {\r\n return this.setProperty('description', description);\r\n }\r\n\r\n getDescription(def) {\r\n return this.getProperty('description', def);\r\n }\r\n\r\n setLicensingInfo(licensingInfo) {\r\n return this.setProperty('licensingInfo', licensingInfo);\r\n }\r\n\r\n getLicensingInfo(def) {\r\n return this.getProperty('licensingInfo', def);\r\n }\r\n\r\n getInUse(def) {\r\n return this.getProperty('inUse', def);\r\n }\r\n\r\n /**\r\n * Add discount to product\r\n *\r\n * @param discount NetLicensing.ProductDiscount\r\n * @returns {NetLicensing.Product}\r\n */\r\n addDiscount(discount) {\r\n if (!(discount instanceof ProductDiscount)) {\r\n throw new TypeError('discount must be an instance of ProductDiscount');\r\n }\r\n\r\n const discounts = discountsMap.get(this);\r\n discounts.push(discount);\r\n discountsMap.set(this, discounts);\r\n discountsTouched.set(this, true);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Set discounts to product\r\n * @param discounts\r\n */\r\n setProductDiscounts(discounts) {\r\n discountsMap.set(this, []);\r\n discountsTouched.set(this, true);\r\n\r\n if (!discounts) return this;\r\n\r\n if (Array.isArray(discounts)) {\r\n discounts.forEach((discount) => {\r\n this.addDiscount(discount);\r\n });\r\n\r\n return this;\r\n }\r\n\r\n this.addDiscount(discounts);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Get array of objects discounts\r\n * @returns {Array}\r\n */\r\n getProductDiscounts() {\r\n return Object.assign([], discountsMap.get(this));\r\n }\r\n\r\n setListDiscount(properties) {\r\n if (!properties) return;\r\n\r\n const discount = new ProductDiscount();\r\n properties.forEach((property) => {\r\n discount.setProperty(property.name, property.value);\r\n });\r\n this.addDiscount(discount);\r\n }\r\n\r\n asPropertiesMap() {\r\n const propertiesMap = super.asPropertiesMap();\r\n\r\n if (discountsMap.get(this).length) {\r\n propertiesMap.discount = discountsMap.get(this).map(discount => discount.toString());\r\n }\r\n\r\n if (!propertiesMap.discount && discountsTouched.get(this)) {\r\n propertiesMap.discount = '';\r\n }\r\n\r\n return propertiesMap;\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\n\r\n/**\r\n * Product module entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the product module. Vendor can assign\r\n * this number when creating a product module or let NetLicensing generate one. Read-only after creation of the first\r\n * licensee for the product.\r\n * @property string number\r\n *\r\n * If set to false, the product module is disabled. Licensees can not obtain any new licenses for this\r\n * product module.\r\n * @property boolean active\r\n *\r\n * Product module name that is visible to the end customers in NetLicensing Shop.\r\n * @property string name\r\n *\r\n * Licensing model applied to this product module. Defines what license templates can be\r\n * configured for the product module and how licenses for this product module are processed during validation.\r\n * @property string licensingModel\r\n *\r\n * Maximum checkout validity (days). Mandatory for 'Floating' licensing model.\r\n * @property integer maxCheckoutValidity\r\n *\r\n * Remaining time volume for yellow level. Mandatory for 'Rental' licensing model.\r\n * @property integer yellowThreshold\r\n *\r\n * Remaining time volume for red level. Mandatory for 'Rental' licensing model.\r\n * @property integer redThreshold\r\n *\r\n * License template. Mandatory for 'Try & Buy' licensing model. Supported types: \"TIMEVOLUME\", \"FEATURE\".\r\n * @property string licenseTemplate\r\n *\r\n * @constructor\r\n */\r\nexport default class ProductModule extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n active: 'boolean',\r\n name: 'string',\r\n licensingModel: 'string',\r\n maxCheckoutValidity: 'int',\r\n yellowThreshold: 'int',\r\n redThreshold: 'int',\r\n licenseTemplate: 'string',\r\n inUse: 'boolean',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['inUse'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines([\r\n 'number',\r\n 'active',\r\n 'name',\r\n 'licensingModel',\r\n 'maxCheckoutValidity',\r\n 'yellowThreshold',\r\n 'redThreshold',\r\n 'licenseTemplate',\r\n 'inUse',\r\n ]);\r\n }\r\n\r\n setNumber(number) {\r\n return this.setProperty('number', number);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setActive(active) {\r\n return this.setProperty('active', active);\r\n }\r\n\r\n getActive(def) {\r\n return this.getProperty('active', def);\r\n }\r\n\r\n setName(name) {\r\n return this.setProperty('name', name);\r\n }\r\n\r\n getName(def) {\r\n return this.getProperty('name', def);\r\n }\r\n\r\n setLicensingModel(licensingModel) {\r\n return this.setProperty('licensingModel', licensingModel);\r\n }\r\n\r\n getLicensingModel(def) {\r\n return this.getProperty('licensingModel', def);\r\n }\r\n\r\n setMaxCheckoutValidity(maxCheckoutValidity) {\r\n return this.setProperty('maxCheckoutValidity', maxCheckoutValidity);\r\n }\r\n\r\n getMaxCheckoutValidity(def) {\r\n return this.getProperty('maxCheckoutValidity', def);\r\n }\r\n\r\n setYellowThreshold(yellowThreshold) {\r\n return this.setProperty('yellowThreshold', yellowThreshold);\r\n }\r\n\r\n getYellowThreshold(def) {\r\n return this.getProperty('yellowThreshold', def);\r\n }\r\n\r\n setRedThreshold(redThreshold) {\r\n return this.setProperty('redThreshold', redThreshold);\r\n }\r\n\r\n getRedThreshold(def) {\r\n return this.getProperty('redThreshold', def);\r\n }\r\n\r\n setLicenseTemplate(licenseTemplate) {\r\n return this.setProperty('licenseTemplate', licenseTemplate);\r\n }\r\n\r\n getLicenseTemplate(def) {\r\n return this.getProperty('licenseTemplate', def);\r\n }\r\n\r\n getInUse(def) {\r\n return this.getProperty('inUse', def);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\n\r\n/**\r\n * PaymentMethod entity used internally by NetLicensing.\r\n *\r\n * @property string number\r\n * @property boolean active\r\n *\r\n * @constructor\r\n */\r\nexport default class PaymentMethod extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n active: 'boolean',\r\n 'paypal.subject': 'string',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['inUse'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines(['number', 'active', 'paypal.subject']);\r\n }\r\n\r\n setNumber(number) {\r\n return this.setProperty('number', number);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setActive(active) {\r\n return this.setProperty('active', active);\r\n }\r\n\r\n getActive(def) {\r\n return this.getProperty('active', def);\r\n }\r\n\r\n setPaypalSubject(paypalSubject) {\r\n return this.setProperty('paypal.subject', paypalSubject);\r\n }\r\n\r\n getPaypalSubject(def) {\r\n return this.getProperty('paypal.subject', def);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\n\r\n/**\r\n * License template entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the license template. Vendor can\r\n * assign this number when creating a license template or let NetLicensing generate one.\r\n * Read-only after creation of the first license from this license template.\r\n * @property string number\r\n *\r\n * If set to false, the license template is disabled. Licensee can not obtain any new licenses off this\r\n * license template.\r\n * @property boolean active\r\n *\r\n * Name for the licensed item.\r\n * @property string name\r\n *\r\n * Type of licenses created from this license template. Supported types: \"FEATURE\", \"TIMEVOLUME\",\r\n * \"FLOATING\", \"QUANTITY\"\r\n * @property string licenseType\r\n *\r\n * Price for the license. If >0, it must always be accompanied by the currency specification.\r\n * @property double price\r\n *\r\n * Specifies currency for the license price. Check data types to discover which currencies are\r\n * supported.\r\n * @property string currency\r\n *\r\n * If set to true, every new licensee automatically gets one license out of this license template on\r\n * creation. Automatic licenses must have their price set to 0.\r\n * @property boolean automatic\r\n *\r\n * If set to true, this license template is not shown in NetLicensing Shop as offered for purchase.\r\n * @property boolean hidden\r\n *\r\n * If set to true, licenses from this license template are not visible to the end customer, but\r\n * participate in validation.\r\n * @property boolean hideLicenses\r\n *\r\n * Mandatory for 'TIMEVOLUME' license type.\r\n * @property integer timeVolume\r\n *\r\n * Mandatory for 'FLOATING' license type.\r\n * @property integer maxSessions\r\n *\r\n * Mandatory for 'QUANTITY' license type.\r\n * @property integer quantity\r\n *\r\n * @constructor\r\n */\r\nexport default class LicenseTemplate extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n active: 'boolean',\r\n name: 'string',\r\n licenseType: 'string',\r\n price: 'double',\r\n currency: 'string',\r\n automatic: 'boolean',\r\n hidden: 'boolean',\r\n hideLicenses: 'boolean',\r\n timeVolume: 'int',\r\n maxSessions: 'int',\r\n quantity: 'int',\r\n inUse: 'boolean',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['inUse'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines([\r\n 'number',\r\n 'active',\r\n 'name',\r\n 'licenseType',\r\n 'price',\r\n 'currency',\r\n 'automatic',\r\n 'hidden',\r\n 'hideLicenses',\r\n 'timeVolume',\r\n 'maxSessions',\r\n 'quantity',\r\n 'inUse',\r\n ]);\r\n }\r\n\r\n setNumber(number) {\r\n return this.setProperty('number', number);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setActive(active) {\r\n return this.setProperty('active', active);\r\n }\r\n\r\n getActive(def) {\r\n return this.getProperty('active', def);\r\n }\r\n\r\n setName(name) {\r\n return this.setProperty('name', name);\r\n }\r\n\r\n getName(def) {\r\n return this.getProperty('name', def);\r\n }\r\n\r\n setLicenseType(licenseType) {\r\n return this.setProperty('licenseType', licenseType);\r\n }\r\n\r\n getLicenseType(def) {\r\n return this.getProperty('licenseType', def);\r\n }\r\n\r\n setPrice(price) {\r\n return this.setProperty('price', price);\r\n }\r\n\r\n getPrice(def) {\r\n return this.getProperty('price', def);\r\n }\r\n\r\n setCurrency(currency) {\r\n return this.setProperty('currency', currency);\r\n }\r\n\r\n getCurrency(def) {\r\n return this.getProperty('currency', def);\r\n }\r\n\r\n setAutomatic(automatic) {\r\n return this.setProperty('automatic', automatic);\r\n }\r\n\r\n getAutomatic(def) {\r\n return this.getProperty('automatic', def);\r\n }\r\n\r\n setHidden(hidden) {\r\n return this.setProperty('hidden', hidden);\r\n }\r\n\r\n getHidden(def) {\r\n return this.getProperty('hidden', def);\r\n }\r\n\r\n setHideLicenses(hideLicenses) {\r\n return this.setProperty('hideLicenses', hideLicenses);\r\n }\r\n\r\n getHideLicenses(def) {\r\n return this.getProperty('hideLicenses', def);\r\n }\r\n\r\n setTimeVolume(timeVolume) {\r\n return this.setProperty('timeVolume', timeVolume);\r\n }\r\n\r\n getTimeVolume(def) {\r\n return this.getProperty('timeVolume', def);\r\n }\r\n\r\n setMaxSessions(maxSessions) {\r\n return this.setProperty('maxSessions', maxSessions);\r\n }\r\n\r\n getMaxSessions(def) {\r\n return this.getProperty('maxSessions', def);\r\n }\r\n\r\n setQuantity(quantity) {\r\n return this.setProperty('quantity', quantity);\r\n }\r\n\r\n getQuantity(def) {\r\n return this.getProperty('quantity', def);\r\n }\r\n\r\n getInUse(def) {\r\n return this.getProperty('inUse', def);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport CheckUtils from '../util/CheckUtils';\r\n\r\n/**\r\n * Validation result map\r\n * @type {WeakMap}\r\n */\r\nconst vr = new WeakMap();\r\n\r\nexport default class ValidationResults {\r\n constructor() {\r\n vr.set(this, { validators: {} });\r\n }\r\n\r\n getValidators() {\r\n return Object.assign({}, vr.get(this).validators);\r\n }\r\n\r\n setProductModuleValidation(productModuleNumber, productModuleValidation) {\r\n if (!CheckUtils.isValid(productModuleNumber) || typeof productModuleNumber === 'object') {\r\n throw new TypeError(`Bad productModuleNumber:${productModuleNumber}`);\r\n }\r\n\r\n vr.get(this).validators[productModuleNumber] = productModuleValidation;\r\n\r\n return this;\r\n }\r\n\r\n getProductModuleValidation(productModuleNumber) {\r\n if (!CheckUtils.isValid(productModuleNumber) || typeof productModuleNumber === 'object') {\r\n throw new TypeError(`Bad productModuleNumber:${productModuleNumber}`);\r\n }\r\n\r\n return vr.get(this).validators[productModuleNumber];\r\n }\r\n\r\n setTtl(ttl) {\r\n if (!CheckUtils.isValid(ttl) || typeof ttl === 'object') {\r\n throw new TypeError(`Bad ttl:${ttl}`);\r\n }\r\n vr.get(this).ttl = new Date(String(ttl));\r\n\r\n return this;\r\n }\r\n\r\n getTtl() {\r\n return (vr.get(this).ttl) ? new Date(vr.get(this).ttl) : undefined;\r\n }\r\n\r\n toString() {\r\n let data = 'ValidationResult [';\r\n\r\n const validators = this.getValidators();\r\n const has = Object.prototype.hasOwnProperty;\r\n\r\n Object.keys(validators).forEach((productModuleNumber) => {\r\n data += `ProductModule<${productModuleNumber}>`;\r\n if (has.call(validators, productModuleNumber)) {\r\n data += JSON.stringify(validators[productModuleNumber]);\r\n }\r\n });\r\n\r\n data += ']';\r\n\r\n return data;\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\n/**\r\n * Validation parameters map\r\n *\r\n * @type {WeakMap}\r\n */\r\nconst vpMap = new WeakMap();\r\n\r\nexport default class ValidationParameters {\r\n constructor() {\r\n vpMap.set(this, { parameters: {} });\r\n }\r\n\r\n /**\r\n * Sets the target product\r\n *\r\n * optional productNumber, must be provided in case licensee auto-create is enabled\r\n * @param productNumber\r\n * @returns {ValidationParameters}\r\n */\r\n setProductNumber(productNumber) {\r\n vpMap.get(this).productNumber = productNumber;\r\n return this;\r\n }\r\n\r\n /**\r\n * Get the target product\r\n * @returns {*}\r\n */\r\n getProductNumber() {\r\n return vpMap.get(this).productNumber;\r\n }\r\n\r\n /**\r\n * Sets the name for the new licensee\r\n *\r\n * optional human-readable licensee name in case licensee will be auto-created. This parameter must not\r\n * be the name, but can be used to store any other useful string information with new licensees, up to\r\n * 1000 characters.\r\n * @param licenseeName\r\n * @returns {NetLicensing.ValidationParameters}\r\n */\r\n setLicenseeName(licenseeName) {\r\n vpMap.get(this).licenseeName = licenseeName;\r\n return this;\r\n }\r\n\r\n /**\r\n * Get the licensee name\r\n * @returns {*}\r\n */\r\n getLicenseeName() {\r\n return vpMap.get(this).licenseeName;\r\n }\r\n\r\n /**\r\n * Sets the licensee secret\r\n *\r\n * licensee secret stored on the client side. Refer to Licensee Secret documentation for details.\r\n * @param licenseeSecret\r\n * @returns {ValidationParameters}\r\n */\r\n setLicenseeSecret(licenseeSecret) {\r\n vpMap.get(this).licenseeSecret = licenseeSecret;\r\n return this;\r\n }\r\n\r\n /**\r\n * Get the licensee secret\r\n * @returns {*}\r\n */\r\n getLicenseeSecret() {\r\n return vpMap.get(this).licenseeSecret;\r\n }\r\n\r\n /**\r\n * Get validation parameters\r\n * @returns {*}\r\n */\r\n getParameters() {\r\n return Object.assign({}, vpMap.get(this).parameters);\r\n }\r\n\r\n getProductModuleValidationParameters(productModuleNumber) {\r\n return Object.assign({}, vpMap.get(this).parameters[productModuleNumber]);\r\n }\r\n\r\n setProductModuleValidationParameters(productModuleNumber, productModuleParameters) {\r\n const { parameters } = vpMap.get(this);\r\n\r\n if (parameters[productModuleNumber] === undefined || !Object.keys(parameters[productModuleNumber]).length) {\r\n parameters[productModuleNumber] = {};\r\n }\r\n\r\n parameters[productModuleNumber] = Object.assign(parameters[productModuleNumber], productModuleParameters);\r\n\r\n return this;\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport BaseEntity from './BaseEntity';\r\n\r\n/**\r\n * Licensee entity used internally by NetLicensing.\r\n *\r\n * Properties visible via NetLicensing API:\r\n *\r\n * Unique number (across all products of a vendor) that identifies the licensee. Vendor can assign this\r\n * number when creating a licensee or let NetLicensing generate one. Read-only after creation of the first license for\r\n * the licensee.\r\n * @property string number\r\n *\r\n * Licensee name.\r\n * @property string name\r\n *\r\n * If set to false, the licensee is disabled. Licensee can not obtain new licenses, and validation is\r\n * disabled (tbd).\r\n * @property boolean active\r\n *\r\n * Licensee Secret for licensee\r\n * @property string licenseeSecret\r\n *\r\n * Mark licensee for transfer.\r\n * @property boolean markedForTransfer\r\n *\r\n * Arbitrary additional user properties of string type may be associated with each licensee. The name of user property\r\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, productNumber\r\n *\r\n * @constructor\r\n */\r\nexport default class Licensee extends BaseEntity {\r\n constructor(properties) {\r\n super({\r\n properties,\r\n // The attributes that should be cast to native types.\r\n casts: {\r\n number: 'string',\r\n active: 'boolean',\r\n name: 'string',\r\n licenseeSecret: 'string',\r\n markedForTransfer: 'boolean',\r\n inUse: 'boolean',\r\n },\r\n // The attributes that should have read-only access.\r\n readOnly: ['inUse'],\r\n });\r\n\r\n // define default entity properties\r\n this.defines(['number', 'active', 'name', 'licenseeSecret', 'markedForTransfer', 'inUse']);\r\n }\r\n\r\n setNumber(number) {\r\n return this.setProperty('number', number);\r\n }\r\n\r\n getNumber(def) {\r\n return this.getProperty('number', def);\r\n }\r\n\r\n setActive(active) {\r\n return this.setProperty('active', active);\r\n }\r\n\r\n getActive(def) {\r\n return this.getProperty('active', def);\r\n }\r\n\r\n setName(name) {\r\n return this.setProperty('name', name);\r\n }\r\n\r\n getName(def) {\r\n return this.getProperty('name', def);\r\n }\r\n\r\n setLicenseeSecret(licenseeSecret) {\r\n return this.setProperty('licenseeSecret', licenseeSecret);\r\n }\r\n\r\n getLicenseeSecret(def) {\r\n return this.getProperty('licenseeSecret', def);\r\n }\r\n\r\n setMarkedForTransfer(markedForTransfer) {\r\n return this.setProperty('markedForTransfer', markedForTransfer);\r\n }\r\n\r\n getMarkedForTransfer(def) {\r\n return this.getProperty('markedForTransfer', def);\r\n }\r\n\r\n getInUse(def) {\r\n return this.getProperty('inUse', def);\r\n }\r\n}\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\n// Cast an attribute to a native JS type.\r\nexport default (key, value) => {\r\n switch (key.trim().toLowerCase()) {\r\n case 'str':\r\n case 'string':\r\n return String(value);\r\n case 'int':\r\n case 'integer':\r\n return parseInt(value, 10);\r\n case 'float':\r\n case 'double':\r\n return parseFloat(value);\r\n case 'bool':\r\n case 'boolean':\r\n switch (value) {\r\n case 'true':\r\n case 'TRUE':\r\n return true;\r\n case 'false':\r\n case 'FALSE':\r\n return false;\r\n default:\r\n return Boolean(value);\r\n }\r\n case 'date':\r\n return (value === 'now') ? 'now' : new Date(String(value));\r\n default:\r\n return value;\r\n }\r\n};\r\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || require('./../helpers/btoa');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n var loadEvent = 'onreadystatechange';\n var xDomain = false;\n\n // For IE 8/9 CORS support\n // Only supports POST and GET calls and doesn't returns the response headers.\n // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n if (process.env.NODE_ENV !== 'test' &&\n typeof window !== 'undefined' &&\n window.XDomainRequest && !('withCredentials' in request) &&\n !isURLSameOrigin(config.url)) {\n request = new window.XDomainRequest();\n loadEvent = 'onload';\n xDomain = true;\n request.onprogress = function handleProgress() {};\n request.ontimeout = function handleTimeout() {};\n }\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request[loadEvent] = function handleLoad() {\n if (!request || (request.readyState !== 4 && !xDomain)) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201)\n status: request.status === 1223 ? 204 : request.status,\n statusText: request.status === 1223 ? 'No Content' : request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport Constants from '../Constants';\r\nimport Service from './Service';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport Country from '../entities/Country';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\n/**\r\n * JS representation of the Utility Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Utility+Services\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Returns all license types. See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Utility+Services#UtilityServices-LicenseTypeslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * array of available license types or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n listLicenseTypes(context) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .list(context, `${Constants.Utility.ENDPOINT_PATH}/licenseTypes`)\r\n .then(items => items.map(item => item.property[0].value));\r\n },\r\n\r\n /**\r\n * Returns all license models. See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Utility+Services#UtilityServices-LicensingModelslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * array of available license models or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n listLicensingModels(context) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .list(context, `${Constants.Utility.ENDPOINT_PATH}/licensingModels`)\r\n .then(items => items.map(item => item.property[0].value));\r\n },\r\n\r\n /**\r\n * Returns all countries.\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter\r\n *\r\n * collection of available countries or null/empty list if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n listCountries(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, `${Constants.Utility.ENDPOINT_PATH}/countries`, queryParams, Country);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport Transaction from '../entities/Transaction';\r\nimport Constants from '../Constants';\r\nimport Service from './Service';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\n/**\r\n * JS representation of the Transaction Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services\r\n *\r\n * Transaction is created each time change to LicenseService licenses happens. For instance licenses are\r\n * obtained by a licensee, licenses disabled by vendor, licenses deleted, etc. Transaction is created no matter what\r\n * source has initiated the change to licenses: it can be either a direct purchase of licenses by a licensee via\r\n * NetLicensing Shop, or licenses can be given to a licensee by a vendor. Licenses can also be assigned implicitly by\r\n * NetLicensing if it is defined so by a license model (e.g. evaluation license may be given automatically). All these\r\n * events are reflected in transactions. Of all the transaction handling routines only read-only routines are exposed to\r\n * the public API, as transactions are only allowed to be created and modified by NetLicensing internally.\r\n *\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Creates new transaction object with given properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Createtransaction\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param transaction NetLicensing.Transaction\r\n *\r\n * return the newly created transaction object in promise\r\n * @returns {Promise}\r\n */\r\n create(context, transaction) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(transaction instanceof Transaction)) {\r\n throw new TypeError('transaction must be an instance of Transaction');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .post(context, Constants.Transaction.ENDPOINT_PATH, transaction.asPropertiesMap(), Transaction);\r\n },\r\n\r\n /**\r\n * Gets transaction by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Gettransaction\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the transaction number\r\n * @param number string\r\n *\r\n * return the transaction in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .get(context, `${Constants.Transaction.ENDPOINT_PATH}/${number}`, {}, Transaction);\r\n },\r\n\r\n /**\r\n * Returns all transactions of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Transactionslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string\r\n *\r\n * array of transaction entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.Transaction.ENDPOINT_PATH, queryParams, Transaction);\r\n },\r\n\r\n /**\r\n * Updates transaction properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Updatetransaction\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * transaction number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param transaction NetLicensing.Transaction\r\n *\r\n * return updated transaction in promise.\r\n * @returns {Promise}\r\n */\r\n update(context, number, transaction) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of NetLicensing.Context');\r\n }\r\n\r\n if (!(transaction instanceof Transaction)) {\r\n throw new TypeError('transaction must be an instance of NetLicensing.Transaction');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const path = `${Constants.Transaction.ENDPOINT_PATH}/${number}`;\r\n\r\n return Service\r\n .post(context, path, transaction.asPropertiesMap(), Transaction);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport Token from '../entities/Token';\r\nimport Constants from '../Constants';\r\nimport Service from './Service';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\n/**\r\n * JS representation of the Token Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services\r\n *\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Creates new token.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services#TokenServices-Createtoken\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param token NetLicensing.Token\r\n *\r\n * return created token in promise\r\n * @returns {Promise}\r\n */\r\n create(context, token) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(token instanceof Token)) {\r\n throw new TypeError('token must be an instance of Token');\r\n }\r\n\r\n return Service\r\n .post(context, Constants.Token.ENDPOINT_PATH, token.asPropertiesMap(), Token);\r\n },\r\n\r\n /**\r\n * Gets token by its number..See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/conluence/display/NetLicensing PUB/Token+Services#TokenServices-Gettoken\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the token number\r\n * @param number\r\n *\r\n * return the token in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of NetLicensing.Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n return Service\r\n .get(context, `${Constants.Token.ENDPOINT_PATH}/${number}`, {}, Token);\r\n },\r\n\r\n /**\r\n * Returns tokens of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services#TokenServices-Tokenslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * array of token entities or empty array if nothing found.\r\n * @return array\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.Token.ENDPOINT_PATH, queryParams, Token);\r\n },\r\n\r\n /**\r\n * Delete token by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services#TokenServices-Deletetoken\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the token number\r\n * @param number string\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of NetLicensing.Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n return Service\r\n .delete(context, `${Constants.Token.ENDPOINT_PATH}/${number}`);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Service from './Service';\r\nimport Context from '../vo/Context';\r\nimport Product from '../entities/Product';\r\nimport Constants from '../Constants';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\n/**\r\n * JS representation of the Product Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services\r\n *\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Creates new product with given properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Createproduct\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param product NetLicensing.Product\r\n *\r\n * return the newly created product object in promise\r\n * @returns {Promise}\r\n */\r\n\r\n create(context, product) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(product instanceof Product)) {\r\n throw new TypeError('product must be an instance of Product');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .post(context, Constants.Product.ENDPOINT_PATH, product.asPropertiesMap(), Product);\r\n },\r\n\r\n /**\r\n * Gets product by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Getproduct\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the product number\r\n * @param number string\r\n *\r\n * return the product object in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .get(context, `${Constants.Product.ENDPOINT_PATH}/${number}`, {}, Product);\r\n },\r\n\r\n /**\r\n * Returns products of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Productslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * array of product entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.Product.ENDPOINT_PATH, queryParams, Product);\r\n },\r\n\r\n /**\r\n * Updates product properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Updateproduct\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param product NetLicensing.Product\r\n *\r\n * updated product in promise.\r\n * @returns {Promise}\r\n */\r\n update(context, number, product) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(product instanceof Product)) {\r\n throw new TypeError('product must be an instance of Product');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .post(context, `${Constants.Product.ENDPOINT_PATH}/${number}`, product.asPropertiesMap(), Product);\r\n },\r\n\r\n /**\r\n * Deletes product.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Deleteproduct\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(context, number, forceCascade) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n const queryParams = { forceCascade: Boolean(forceCascade) };\r\n\r\n return Service\r\n .delete(context, `${Constants.Product.ENDPOINT_PATH}/${number}`, queryParams);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport ProductModule from '../entities/ProductModule';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport Constants from '../Constants';\r\nimport Service from './Service';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\n/**\r\n * JS representation of the ProductModule Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services\r\n *\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Creates new product module object with given properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Createproductmodule\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent product to which the new product module is to be added\r\n * @param productNumber string\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param productModule NetLicensing.ProductModule\r\n *\r\n * the newly created product module object in promise\r\n * @returns {Promise}\r\n */\r\n create(context, productNumber, productModule) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(productModule instanceof ProductModule)) {\r\n throw new TypeError('product must be an instance of ProductModule');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(productNumber, 'productNumber');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n productModule.setProperty('productNumber', productNumber);\r\n\r\n return Service\r\n .post(context, Constants.ProductModule.ENDPOINT_PATH, productModule.asPropertiesMap(), ProductModule);\r\n },\r\n\r\n /**\r\n * Gets product module by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Getproductmodule\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the product module number\r\n * @param number string\r\n *\r\n * return the product module object in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .get(context, `${Constants.ProductModule.ENDPOINT_PATH}/${number}`, {}, ProductModule);\r\n },\r\n\r\n /**\r\n * Returns products of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Productslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * array of product modules entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.ProductModule.ENDPOINT_PATH, queryParams, ProductModule);\r\n },\r\n\r\n /**\r\n * Updates product module properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Updateproductmodule\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product module number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param productModule NetLicensing.ProductModule\r\n *\r\n * updated product module in promise.\r\n * @returns {Promise}\r\n */\r\n update(context, number, productModule) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(productModule instanceof ProductModule)) {\r\n throw new TypeError('product must be an instance of ProductModule');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const path = `${Constants.ProductModule.ENDPOINT_PATH}/${number}`;\r\n\r\n return Service\r\n .post(context, path, productModule.asPropertiesMap(), ProductModule);\r\n },\r\n\r\n /**\r\n * Deletes product module.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Deleteproductmodule\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * product module number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(context, number, forceCascade) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n const queryParams = { forceCascade: Boolean(forceCascade) };\r\n\r\n return Service\r\n .delete(context, `${Constants.ProductModule.ENDPOINT_PATH}/${number}`, queryParams);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport PaymentMethod from '../entities/PaymentMethod';\r\nimport Constants from '../Constants';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport Service from './Service';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\nexport default {\r\n /**\r\n * Gets payment method by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Getpaymentmethod\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the payment method number\r\n * @param number string\r\n *\r\n * return the payment method in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .get(context, `${Constants.PaymentMethod.ENDPOINT_PATH}/${number}`, {}, PaymentMethod);\r\n },\r\n\r\n /**\r\n * Returns payment methods of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Paymentmethodslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * array of payment method entities or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.PaymentMethod.ENDPOINT_PATH, queryParams, PaymentMethod);\r\n },\r\n\r\n /**\r\n * Updates payment method properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Updatepaymentmethod\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the payment method number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param paymentMethod NetLicensing.PaymentMethod\r\n *\r\n * return updated payment method in promise.\r\n * @returns {Promise}\r\n */\r\n update(context, number, paymentMethod) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(paymentMethod instanceof PaymentMethod)) {\r\n throw new TypeError('paymentMethod must be an instance of PaymentMethod');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const path = `${Constants.PaymentMethod.ENDPOINT_PATH}/${number}`;\r\n\r\n return Service\r\n .post(context, path, paymentMethod.asPropertiesMap(), PaymentMethod);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport LicenseTemplate from '../entities/LicenseTemplate';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport Constants from '../Constants';\r\nimport Service from './Service';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\n/**\r\n * JS representation of the ProductModule Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services\r\n *\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Creates new license template object with given properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Createlicensetemplate\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent product module to which the new license template is to be added\r\n * @param productModuleNumber\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param licenseTemplate NetLicensing.LicenseTemplate\r\n *\r\n * the newly created license template object in promise\r\n * @returns {Promise}\r\n */\r\n create(context, productModuleNumber, licenseTemplate) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(licenseTemplate instanceof LicenseTemplate)) {\r\n throw new TypeError('licenseTemplate must be an instance of LicenseTemplate');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(productModuleNumber, 'productModuleNumber');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n licenseTemplate.setProperty('productModuleNumber', productModuleNumber);\r\n\r\n return Service\r\n .post(context, Constants.LicenseTemplate.ENDPOINT_PATH, licenseTemplate.asPropertiesMap(), LicenseTemplate);\r\n },\r\n\r\n /**\r\n * Gets license template by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Getlicensetemplate\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the license template number\r\n * @param number string\r\n *\r\n * return the license template object in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .get(context, `${Constants.LicenseTemplate.ENDPOINT_PATH}/${number}`, {}, LicenseTemplate);\r\n },\r\n\r\n /**\r\n * Returns all license templates of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Licensetemplateslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * array of license templates (of all products/modules) or null/empty list if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.LicenseTemplate.ENDPOINT_PATH, queryParams, LicenseTemplate);\r\n },\r\n\r\n /**\r\n * Updates license template properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Updatelicensetemplate\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license template number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param licenseTemplate NetLicensing.LicenseTemplate\r\n *\r\n * updated license template in promise.\r\n * @returns {Promise}\r\n */\r\n update(context, number, licenseTemplate) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(licenseTemplate instanceof LicenseTemplate)) {\r\n throw new TypeError('licenseTemplate must be an instance of LicenseTemplate');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const path = `${Constants.LicenseTemplate.ENDPOINT_PATH}/${number}`;\r\n\r\n return Service\r\n .post(context, path, licenseTemplate.asPropertiesMap(), LicenseTemplate);\r\n },\r\n\r\n /**\r\n * Deletes license template.See NetLicensingAPI JavaDoc for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Deletelicensetemplate\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license template number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(context, number, forceCascade) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n const queryParams = { forceCascade: Boolean(forceCascade) };\r\n\r\n return Service\r\n .delete(context, `${Constants.LicenseTemplate.ENDPOINT_PATH}/${number}`, queryParams);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport License from '../entities/License';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport Constants from '../Constants';\r\nimport Service from './Service';\r\nimport FilterUtils from '../util/FilterUtils';\r\n\r\n/**\r\n * JS representation of the License Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NLICPUB/License+Services\r\n *\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Creates new license object with given properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Createlicense\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent licensee to which the new license is to be added\r\n * @param licenseeNumber string\r\n *\r\n * license template that the license is created from\r\n * @param licenseTemplateNumber string\r\n *\r\n * For privileged logins specifies transaction for the license creation. For regular logins new\r\n * transaction always created implicitly, and the operation will be in a separate transaction.\r\n * Transaction is generated with the provided transactionNumber, or, if transactionNumber is null, with\r\n * auto-generated number.\r\n * @param transactionNumber null|string\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param license NetLicensing.License\r\n *\r\n * return the newly created license object in promise\r\n * @returns {Promise}\r\n */\r\n create(context, licenseeNumber, licenseTemplateNumber, transactionNumber, license) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(license instanceof License)) {\r\n throw new TypeError('license must be an instance of License');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(licenseeNumber, 'licenseeNumber');\r\n CheckUtils.paramNotEmpty(licenseTemplateNumber, 'licenseTemplateNumber');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n license.setProperty('licenseeNumber', licenseeNumber);\r\n license.setProperty('licenseTemplateNumber', licenseTemplateNumber);\r\n\r\n if (transactionNumber) license.setProperty('transactionNumber', transactionNumber);\r\n\r\n return Service\r\n .post(context, Constants.License.ENDPOINT_PATH, license.asPropertiesMap(), License);\r\n },\r\n\r\n\r\n /**\r\n * Gets license by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Getlicense\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the license number\r\n * @param number string\r\n *\r\n * return the license in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n return Service\r\n .get(context, `${Constants.License.ENDPOINT_PATH}/${number}`, {}, License);\r\n },\r\n\r\n /**\r\n * Returns licenses of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Licenseslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * return array of licenses (of all products) or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.License.ENDPOINT_PATH, queryParams, License);\r\n },\r\n\r\n /**\r\n * Updates license properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Updatelicense\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license number\r\n * @param number string\r\n *\r\n * transaction for the license update. Created implicitly if transactionNumber is null. In this case the\r\n * operation will be in a separate transaction.\r\n * @param transactionNumber string|null\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param license NetLicensing.License\r\n *\r\n * return updated license in promise.\r\n * @returns {Promise}\r\n */\r\n update(context, number, transactionNumber, license) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(license instanceof License)) {\r\n throw new TypeError('license must be an instance of License');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n if (transactionNumber) license.setProperty('transactionNumber', transactionNumber);\r\n\r\n return Service\r\n .post(context, `${Constants.License.ENDPOINT_PATH}/${number}`, license.asPropertiesMap(), License);\r\n },\r\n\r\n /**\r\n * Deletes license.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Deletelicense\r\n *\r\n * When any license is deleted, corresponding transaction is created automatically.\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * license number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(context, number, forceCascade) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n const queryParams = { forceCascade: Boolean(forceCascade) };\r\n\r\n return Service\r\n .delete(context, `${Constants.License.ENDPOINT_PATH}/${number}`, queryParams);\r\n },\r\n};\r\n","/**\r\n * @author Labs64 \r\n * @license Apache-2.0\r\n * @link http://netlicensing.io\r\n * @copyright 2017 Labs64 NetLicensing\r\n */\r\n\r\nimport Context from '../vo/Context';\r\nimport Licensee from '../entities/Licensee';\r\nimport CheckUtils from '../util/CheckUtils';\r\nimport FilterUtils from '../util/FilterUtils';\r\nimport Constants from '../Constants';\r\nimport Service from './Service';\r\nimport ValidationParameters from '../vo/ValidationParameters';\r\nimport ValidationResults from '../vo/ValidationResults';\r\n\r\n/**\r\n * JS representation of the Licensee Service. See NetLicensingAPI for details:\r\n * https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services\r\n *\r\n * @constructor\r\n */\r\n\r\nexport default {\r\n /**\r\n * Creates new licensee object with given properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Createlicensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * parent product to which the new licensee is to be added\r\n * @param productNumber string\r\n *\r\n * non-null properties will be taken for the new object, null properties will either stay null, or will\r\n * be set to a default value, depending on property.\r\n * @param licensee NetLicensing.Licensee\r\n *\r\n * return the newly created licensee object in promise\r\n * @returns {Promise}\r\n */\r\n create(context, productNumber, licensee) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(licensee instanceof Licensee)) {\r\n throw new TypeError('licensee must be an instance of Licensee');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(productNumber, 'productNumber');\r\n\r\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\r\n\r\n licensee.setProperty('productNumber', productNumber);\r\n\r\n return Service\r\n .post(context, Constants.Licensee.ENDPOINT_PATH, licensee.asPropertiesMap(), Licensee);\r\n },\r\n\r\n /**\r\n * Gets licensee by its number.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Getlicensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the licensee number\r\n * @param number string\r\n *\r\n * return the licensee in promise\r\n * @returns {Promise}\r\n */\r\n get(context, number) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n return Service\r\n .get(context, `${Constants.Licensee.ENDPOINT_PATH}/${number}`, {}, Licensee);\r\n },\r\n\r\n /**\r\n * Returns all licensees of a vendor.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Licenseeslist\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * reserved for the future use, must be omitted / set to NULL\r\n * @param filter string|null\r\n *\r\n * array of licensees (of all products) or empty array if nothing found in promise.\r\n * @returns {Promise}\r\n */\r\n list(context, filter) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n const queryParams = {};\r\n\r\n if (filter) {\r\n if (!CheckUtils.isValid(filter)) {\r\n throw new TypeError(`filter has bad value ${filter}`);\r\n }\r\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\r\n }\r\n\r\n return Service\r\n .list(context, Constants.Licensee.ENDPOINT_PATH, queryParams, Licensee);\r\n },\r\n\r\n /**\r\n * Updates licensee properties.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Updatelicensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * licensee number\r\n * @param number string\r\n *\r\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\r\n * @param licensee NetLicensing.Licensee\r\n *\r\n * return updated licensee in promise.\r\n * @returns {Promise}\r\n */\r\n update(context, number, licensee) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(licensee instanceof Licensee)) {\r\n throw new TypeError('licensee must be an instance of Licensee');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n return Service\r\n .post(context, `${Constants.Licensee.ENDPOINT_PATH}/${number}`, licensee.asPropertiesMap(), Licensee);\r\n },\r\n\r\n /**\r\n * Deletes licensee.See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Deletelicensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * licensee number\r\n * @param number string\r\n *\r\n * if true, any entities that depend on the one being deleted will be deleted too\r\n * @param forceCascade boolean\r\n *\r\n * return boolean state of delete in promise\r\n * @returns {Promise}\r\n */\r\n delete(context, number, forceCascade) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n const queryParams = { forceCascade: Boolean(forceCascade) };\r\n\r\n return Service\r\n .delete(context, `${Constants.Licensee.ENDPOINT_PATH}/${number}`, queryParams);\r\n },\r\n\r\n /**\r\n * Validates active licenses of the licensee. See NetLicensingAPI for details:\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Validatelicensee\r\n *\r\n * @param context NetLicensing.Context\r\n *\r\n * licensee number\r\n * @param number string\r\n *\r\n * optional validation parameters. See ValidationParameters and licensing model documentation for\r\n * details.\r\n * @param validationParameters NetLicensing.ValidationParameters.\r\n *\r\n * @returns {Promise}\r\n */\r\n validate(context, number, validationParameters) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n if (!(validationParameters instanceof ValidationParameters)) {\r\n throw new TypeError('validationParameters must be an instance of ValidationParameters');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n\r\n const queryParams = {};\r\n\r\n if (validationParameters.getProductNumber()) {\r\n queryParams.productNumber = validationParameters.getProductNumber();\r\n }\r\n\r\n if (validationParameters.getLicenseeName()) {\r\n queryParams.licenseeName = validationParameters.getLicenseeName();\r\n }\r\n\r\n if (validationParameters.getLicenseeSecret()) {\r\n queryParams.licenseeSecret = validationParameters.getLicenseeSecret();\r\n }\r\n\r\n let pmIndex = 0;\r\n const parameters = validationParameters.getParameters();\r\n\r\n const has = Object.prototype.hasOwnProperty;\r\n\r\n Object.keys(parameters).forEach((productModuleName) => {\r\n queryParams[`productModuleNumber${pmIndex}`] = productModuleName;\r\n if (!has.call(parameters, productModuleName)) return;\r\n\r\n const parameter = parameters[productModuleName];\r\n\r\n Object.keys(parameter).forEach((key) => {\r\n if (has.call(parameter, key)) {\r\n queryParams[key + pmIndex] = parameter[key];\r\n }\r\n });\r\n pmIndex += 1;\r\n });\r\n\r\n const path = `${Constants.Licensee.ENDPOINT_PATH}/${number}/${Constants.Licensee.ENDPOINT_PATH_VALIDATE}`;\r\n\r\n return Service\r\n .post(context, path, queryParams)\r\n .then((item) => {\r\n const data = {};\r\n const validationResults = new ValidationResults();\r\n\r\n item.property.forEach((property) => {\r\n try {\r\n data[property.name] = JSON.parse(property.value);\r\n } catch (e) {\r\n data[property.name] = property.value;\r\n }\r\n });\r\n\r\n validationResults\r\n .setProductModuleValidation(data.productModuleNumber, data)\r\n .setTtl(Service.getLastHttpRequestInfo().data.ttl);\r\n\r\n return validationResults;\r\n });\r\n },\r\n\r\n\r\n /**\r\n * Transfer licenses between licensees.\r\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Transferlicensee\r\n *\r\n * determines the vendor on whose behalf the call is performed\r\n * @param context NetLicensing.Context\r\n *\r\n * the number of the licensee receiving licenses\r\n * @param number string\r\n *\r\n * the number of the licensee delivering licenses\r\n * @param sourceLicenseeNumber string\r\n *\r\n * @returns {Promise}\r\n */\r\n transfer(context, number, sourceLicenseeNumber) {\r\n if (!(context instanceof Context)) {\r\n throw new TypeError('context must be an instance of Context');\r\n }\r\n\r\n CheckUtils.paramNotEmpty(number, 'number');\r\n CheckUtils.paramNotEmpty(sourceLicenseeNumber, 'sourceLicenseeNumber');\r\n\r\n const queryParams = { sourceLicenseeNumber };\r\n\r\n const path = `${Constants.Licensee.ENDPOINT_PATH}/${number}/${Constants.Licensee.ENDPOINT_PATH_TRANSFER}`;\r\n\r\n return Service\r\n .post(context, path, queryParams);\r\n },\r\n};\r\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n this.message = 'String contains an invalid character';\n}\nE.prototype = new Error;\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n var str = String(input);\n var output = '';\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars;\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new E();\n }\n block = block << 8 | charCode;\n }\n return output;\n}\n\nmodule.exports = btoa;\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","'use strict';\n\nvar defaults = require('./../defaults');\nvar utils = require('./../utils');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, {method: 'get'}, this.defaults, config);\n config.method = config.method.toLowerCase();\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","module.exports = require('./lib/axios');","// Constants\r\nimport Constants from './Constants';\r\n// VO\r\nimport Context from './vo/Context';\r\n\r\n// Services\r\nimport Service from './services/Service';\r\nimport LicenseeService from './services/LicenseeService';\r\nimport LicenseService from './services/LicenseService';\r\nimport LicenseTemplateService from './services/LicenseTemplateService';\r\nimport PaymentMethodService from './services/PaymentMethodService';\r\nimport ProductModuleService from './services/ProductModuleService';\r\nimport ProductService from './services/ProductService';\r\nimport TokenService from './services/TokenService';\r\nimport TransactionService from './services/TransactionService';\r\nimport UtilityService from './services/UtilityService';\r\n\r\n// Entities\r\nimport Country from './entities/Country';\r\nimport License from './entities/License';\r\nimport Licensee from './entities/Licensee';\r\nimport LicenseTemplate from './entities/LicenseTemplate';\r\nimport PaymentMethod from './entities/PaymentMethod';\r\nimport Product from './entities/Product';\r\nimport ProductDiscount from './entities/ProductDiscount';\r\nimport ProductModule from './entities/ProductModule';\r\nimport Token from './entities/Token';\r\nimport Transaction from './entities/Transaction';\r\nimport LicenseTransactionJoin from './entities/LicenseTransactionJoin';\r\nimport ValidationParameters from './vo/ValidationParameters';\r\nimport ValidationResults from './vo/ValidationResults';\r\n\r\n// Utils\r\nimport CastsUtils from './util/CastsUtils';\r\nimport CheckUtils from './util/CheckUtils';\r\nimport FilterUtils from './util/FilterUtils';\r\n\r\n\r\n// Create the default instance to be exported\r\nconst NetLicensing = {\r\n // Constants\r\n Constants,\r\n\r\n // Expose VO\r\n Context,\r\n ValidationParameters,\r\n ValidationResults,\r\n\r\n // Expose Services\r\n Service,\r\n LicenseeService,\r\n LicenseService,\r\n LicenseTemplateService,\r\n PaymentMethodService,\r\n ProductModuleService,\r\n ProductService,\r\n TokenService,\r\n TransactionService,\r\n UtilityService,\r\n\r\n // Expose Entities\r\n Country,\r\n License,\r\n Licensee,\r\n LicenseTemplate,\r\n PaymentMethod,\r\n Product,\r\n ProductDiscount,\r\n ProductModule,\r\n Token,\r\n Transaction,\r\n LicenseTransactionJoin,\r\n\r\n // Expose Utils\r\n CastsUtils,\r\n CheckUtils,\r\n FilterUtils,\r\n};\r\n\r\nmodule.exports = NetLicensing;\r\n\r\n// Allow use of default import syntax in TypeScript\r\nmodule.exports.default = NetLicensing;\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://NetLicensing/webpack/universalModuleDefinition","webpack://NetLicensing/webpack/bootstrap","webpack://NetLicensing/./src/util/CheckUtils.js","webpack://NetLicensing/./node_modules/axios/lib/utils.js","webpack://NetLicensing/./src/Constants.js","webpack://NetLicensing/./src/entities/BaseEntity.js","webpack://NetLicensing/./src/vo/Context.js","webpack://NetLicensing/./src/util/FilterUtils.js","webpack://NetLicensing/./src/services/Service.js","webpack://NetLicensing/./src/entities/License.js","webpack://NetLicensing/./src/entities/Transaction.js","webpack://NetLicensing/./node_modules/axios/lib/defaults.js","webpack://NetLicensing/./src/entities/Country.js","webpack://NetLicensing/./src/entities/LicenseTransactionJoin.js","webpack://NetLicensing/./src/entities/Token.js","webpack://NetLicensing/./src/entities/ProductDiscount.js","webpack://NetLicensing/./src/entities/Product.js","webpack://NetLicensing/./src/entities/ProductModule.js","webpack://NetLicensing/./src/entities/PaymentMethod.js","webpack://NetLicensing/./src/entities/LicenseTemplate.js","webpack://NetLicensing/./src/vo/ValidationResults.js","webpack://NetLicensing/./src/vo/ValidationParameters.js","webpack://NetLicensing/./src/entities/Licensee.js","webpack://NetLicensing/./src/util/CastsUtils.js","webpack://NetLicensing/./node_modules/axios/lib/cancel/Cancel.js","webpack://NetLicensing/./node_modules/axios/lib/cancel/isCancel.js","webpack://NetLicensing/./node_modules/axios/lib/core/createError.js","webpack://NetLicensing/./node_modules/axios/lib/adapters/xhr.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/bind.js","webpack://NetLicensing/./src/services/UtilityService.js","webpack://NetLicensing/./src/services/TransactionService.js","webpack://NetLicensing/./src/services/TokenService.js","webpack://NetLicensing/./src/services/ProductService.js","webpack://NetLicensing/./src/services/ProductModuleService.js","webpack://NetLicensing/./src/services/PaymentMethodService.js","webpack://NetLicensing/./src/services/LicenseTemplateService.js","webpack://NetLicensing/./src/services/LicenseService.js","webpack://NetLicensing/./src/services/LicenseeService.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/spread.js","webpack://NetLicensing/./node_modules/axios/lib/cancel/CancelToken.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/combineURLs.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://NetLicensing/./node_modules/axios/lib/core/transformData.js","webpack://NetLicensing/./node_modules/axios/lib/core/dispatchRequest.js","webpack://NetLicensing/./node_modules/axios/lib/core/InterceptorManager.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/cookies.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/btoa.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/parseHeaders.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/buildURL.js","webpack://NetLicensing/./node_modules/axios/lib/core/enhanceError.js","webpack://NetLicensing/./node_modules/axios/lib/core/settle.js","webpack://NetLicensing/./node_modules/axios/lib/helpers/normalizeHeaderName.js","webpack://NetLicensing/./node_modules/process/browser.js","webpack://NetLicensing/./node_modules/axios/lib/core/Axios.js","webpack://NetLicensing/./node_modules/is-buffer/index.js","webpack://NetLicensing/./node_modules/axios/lib/axios.js","webpack://NetLicensing/./node_modules/axios/index.js","webpack://NetLicensing/./src/netlicensing-client.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","isValid","valid","undefined","Number","isFinite","isNaN","paramNotNull","parameter","parameterName","this","TypeError","paramNotEmpty","bind","isBuffer","toString","isArray","val","isObject","isFunction","forEach","obj","fn","length","key","isArrayBuffer","isFormData","FormData","isArrayBufferView","ArrayBuffer","isView","buffer","isString","isNumber","isUndefined","isDate","isFile","isBlob","isStream","pipe","isURLSearchParams","URLSearchParams","isStandardBrowserEnv","navigator","product","document","merge","result","assignValue","arguments","extend","a","b","thisArg","trim","str","replace","BASIC_AUTHENTICATION","APIKEY_IDENTIFICATION","LicensingModel","VALID","TryAndBuy","NAME","Rental","RED_THRESHOLD","YELLOW_THRESHOLD","Subscription","Floating","MultiFeature","PayPerUse","PricingTable","Quota","LicenseTemplate","ENDPOINT_PATH","LicenseType","FEATURE","TIMEVOLUME","FLOATING","QUANTITY","Product","LicenseeSecretMode","DISABLED","PREDEFINED","CLIENT","Token","Type","DEFAULT","SHOP","APIKEY","Transaction","Status","CANCELLED","CLOSED","PENDING","Licensee","ENDPOINT_PATH_VALIDATE","ENDPOINT_PATH_TRANSFER","License","PaymentMethod","ProductModule","Utility","propertiesMap","WeakMap","definedMap","castsMap","readOnlyMap","BaseEntity","_ref","properties","casts","readOnly","_classCallCheck","set","setProperties","hasProperty","isPropertyReadOnly","_CheckUtils2","default","_typeof","castedValue","cast","setProperty","_this","removeProperties","has","keys","def","assign","removeDefine","_this2","removeProperty","indexOf","_CastsUtils2","Boolean","hasDefine","self","descriptors","getProperty","onlyGetter","_this3","_this4","getProperties","customProperties","valuesMap","defaultsMap","Context","values","baseUrl","securityMode","_Constants2","setValues","setValue","getValue","username","password","apiKey","vendorNumber","Error","copedValue","Array","removeValues","removeValue","FILTER_DELIMITER","FILTER_PAIR_DELIMITER","encode","filter","query","push","encodeURIComponent","join","decode","split","v","_v$split","_v$split2","_slicedToArray","httpXHR","Service","context","urlTemplate","queryParams","resultType","request","then","response","data","getEntity","items","item","map","status","method","template","String","params","toLowerCase","getBaseUrl","isValidUrl","restUrl","url","responseType","headers","transformRequest","toQueryString","getSecurityMode","getUsername","getPassword","auth","getApiKey","Authorization","btoa","_axios2","catch","error","info","infos","id","Promise","resolve","reasonPhrase","reject","lists","list","entity","_ref2","setListMethod","charAt","toUpperCase","substr","console","warn","type","RegExp","test","prefix","k","Date","toISOString","_BaseEntity2","_possibleConstructorReturn","__proto__","getPrototypeOf","number","active","price","hidden","parentfeature","timeVolume","startDate","inUse","defines","source","grandTotal","discount","currency","dateCreated","dateClosed","paymentMethod","licenseTransactionJoins","licenseTransactionJoin","_LicenseTransactionJoin2","setLicense","_License2","setTransaction","utils","normalizeHeaderName","DEFAULT_CONTENT_TYPE","Content-Type","setContentTypeIfUnset","adapter","defaults","XMLHttpRequest","process","JSON","stringify","transformResponse","parse","e","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","validateStatus","common","Accept","Country","code","vatPercent","isEu","vat","LicenseTransactionJoin","transaction","license","expirationTime","tokenType","licenseeNumber","successURL","successURLTitle","cancelURL","cancelURLTitle","shopURL","ProductDiscount","totalPrice","amountFix","amountPercent","getTotalPrice","getCurrency","amount","getAmountFix","getAmountPercent","discountsMap","discountsTouched","version","description","licensingInfo","licenseeAutoCreate","licenseeSecretMode","discounts","addDiscount","_ProductDiscount2","licensingModel","maxCheckoutValidity","yellowThreshold","redThreshold","licenseTemplate","paypal.subject","paypalSubject","licenseType","automatic","hideLicenses","maxSessions","quantity","_CheckUtils","vr","ValidationResults","validators","productModuleNumber","productModuleValidation","ttl","getValidators","vpMap","ValidationParameters","parameters","productNumber","licenseeName","licenseeSecret","productModuleParameters","markedForTransfer","parseInt","parseFloat","Cancel","message","__CANCEL__","enhanceError","config","settle","buildURL","parseHeaders","isURLSameOrigin","createError","requestData","requestHeaders","loadEvent","xDomain","XDomainRequest","onprogress","ontimeout","open","paramsSerializer","readyState","responseURL","responseHeaders","getAllResponseHeaders","responseText","statusText","onerror","cookies","xsrfValue","withCredentials","read","setRequestHeader","onDownloadProgress","addEventListener","onUploadProgress","upload","cancelToken","promise","cancel","abort","send","args","apply","listLicenseTypes","setSecurityMode","_Service2","listLicensingModels","listCountries","_FilterUtils2","_Country2","create","post","asPropertiesMap","_Transaction2","update","path","token","_Token2","delete","_Product2","forceCascade","productModule","_ProductModule2","_PaymentMethod2","_LicenseTemplate2","licenseTemplateNumber","transactionNumber","licensee","_Licensee2","validate","validationParameters","getProductNumber","getLicenseeName","getLicenseeSecret","pmIndex","getParameters","productModuleName","validationResults","_ValidationResults2","setProductModuleValidation","setTtl","getLastHttpRequestInfo","transfer","sourceLicenseeNumber","callback","arr","CancelToken","executor","resolvePromise","reason","throwIfRequested","baseURL","relativeURL","fns","transformData","isCancel","isAbsoluteURL","combineURLs","throwIfCancellationRequested","InterceptorManager","handlers","use","fulfilled","rejected","eject","h","write","expires","domain","secure","cookie","toGMTString","match","decodeURIComponent","remove","now","chars","E","input","block","charCode","output","idx","charCodeAt","originURL","msie","userAgent","urlParsingNode","createElement","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","location","requestURL","parsed","ignoreDuplicateOf","line","concat","serializedParams","parts","normalizedName","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","setTimeout","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","len","run","marker","runClearTimeout","Item","array","noop","nextTick","title","browser","env","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","dispatchRequest","Axios","instanceConfig","interceptors","chain","interceptor","unshift","shift","constructor","readFloatLE","slice","isSlowBuffer","_isBuffer","createInstance","defaultConfig","instance","axios","all","promises","spread","NetLicensing","Constants","LicenseeService","LicenseService","LicenseTemplateService","PaymentMethodService","ProductModuleService","ProductService","TokenService","TransactionService","UtilityService","CastsUtils","CheckUtils","FilterUtils"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,OAAA,kBAAAH,GACA,iBAAAC,QACAA,QAAA,aAAAD,IAEAD,EAAA,aAAAC,IARA,CASCK,OAAA,WACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,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AAA+gB,EAAA/hB,UAAAyL,QAAAJ,GAQA,OALAsF,EAAAtN,OAAAwf,EAAAd,EAAA/hB,UAAAqL,GAGAsF,EAAAtN,OAAAwf,EAAAxX,GAEAwX,EAIA,IAAAC,EAAAH,EAAA1R,GAGA6R,EAAAf,QAGAe,EAAA5J,OAAA,SAAA8I,GACA,OAAAW,EAAAhS,EAAA1N,MAAAgO,EAAA+Q,KAIAc,EAAA7M,OAAAxX,EAAA,IACAqkB,EAAAxH,YAAA7c,EAAA,IACAqkB,EAAA/G,SAAAtd,EAAA,IAGAqkB,EAAAC,IAAA,SAAAC,GACA,OAAApV,QAAAmV,IAAAC,IAEAF,EAAAG,OAAAxkB,EAAA,IAEAL,EAAAD,QAAA2kB,EAGA1kB,EAAAD,QAAAqJ,QAAAsb,mBCnDA1kB,EAAAD,QAAAM,EAAA,kCCCA,QAAAA,EAAA,QAEAA,EAAA,QAGAA,EAAA,QACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SAGAA,EAAA,SACAA,EAAA,QACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SACAA,EAAA,QACAA,EAAA,SACAA,EAAA,SACAA,EAAA,SAGAA,EAAA,SACAA,EAAA,QACAA,EAAA,uDAIA,IAAMykB,GAEFC,oBAGA/Z,kBACAoM,+BACAP,4BAGA7J,kBACAgY,0BACAC,yBACAC,iCACAC,+BACAC,+BACAC,yBACAC,uBACAC,6BACAC,yBAGA5R,kBACA5L,kBACAH,mBACAtB,0BACA0B,wBACAnB,kBACA8N,0BACA1M,wBACAf,gBACAK,sBACAyM,iCAGAwR,qBACAC,qBACAC,uBAGJ3lB,EAAOD,QAAU+kB,EAGjB9kB,EAAOD,QAAQqJ,QAAU0b","file":"netlicensing-client.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"NetLicensing\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"NetLicensing\"] = factory();\n\telse\n\t\troot[\"NetLicensing\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 56);\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nexport default {\n isValid(value) {\n let valid = (value !== undefined && typeof value !== 'function');\n if (typeof value === 'number') valid = Number.isFinite(value) && !Number.isNaN(value);\n return valid;\n },\n\n paramNotNull(parameter, parameterName) {\n if (!this.isValid(parameter)) throw new TypeError(`Parameter ${parameterName} has bad value ${parameter}`);\n if (parameter === null) throw new TypeError(`Parameter ${parameterName} cannot be null`);\n },\n\n paramNotEmpty(parameter, parameterName) {\n if (!this.isValid(parameter)) throw new TypeError(`Parameter ${parameterName} has bad value ${parameter}`);\n if (!parameter) throw new TypeError(`Parameter ${parameterName} cannot be null or empty string`);\n },\n};\n","'use strict';\n\nvar bind = require('./helpers/bind');\nvar isBuffer = require('is-buffer');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (typeof result[key] === 'object' && typeof val === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nexport default {\n BASIC_AUTHENTICATION: 'BASIC_AUTH',\n APIKEY_IDENTIFICATION: 'APIKEY',\n\n LicensingModel: {\n VALID: 'valid',\n TryAndBuy: {\n NAME: 'TryAndBuy',\n },\n Rental: {\n NAME: 'Rental',\n RED_THRESHOLD: 'redThreshold',\n YELLOW_THRESHOLD: 'yellowThreshold',\n },\n Subscription: {\n NAME: 'Subscription',\n },\n Floating: {\n NAME: 'Floating',\n },\n MultiFeature: {\n NAME: 'MultiFeature',\n },\n PayPerUse: {\n NAME: 'PayPerUse',\n },\n PricingTable: {\n NAME: 'PricingTable',\n },\n Quota: {\n NAME: 'Quota',\n },\n },\n\n LicenseTemplate: {\n ENDPOINT_PATH: 'licensetemplate',\n LicenseType: {\n FEATURE: 'FEATURE',\n TIMEVOLUME: 'TIMEVOLUME',\n FLOATING: 'FLOATING',\n QUANTITY: 'QUANTITY',\n },\n },\n\n Product: {\n ENDPOINT_PATH: 'product',\n LicenseeSecretMode: {\n DISABLED: 'DISABLED',\n PREDEFINED: 'PREDEFINED',\n CLIENT: 'CLIENT',\n },\n },\n\n Token: {\n ENDPOINT_PATH: 'token',\n Type: {\n DEFAULT: 'DEFAULT',\n SHOP: 'SHOP',\n APIKEY: 'APIKEY',\n },\n },\n\n Transaction: {\n ENDPOINT_PATH: 'transaction',\n Status: {\n CANCELLED: 'CANCELLED',\n CLOSED: 'CLOSED',\n PENDING: 'PENDING',\n },\n },\n\n Licensee: {\n ENDPOINT_PATH: 'licensee',\n ENDPOINT_PATH_VALIDATE: 'validate',\n ENDPOINT_PATH_TRANSFER: 'transfer',\n },\n\n License: {\n ENDPOINT_PATH: 'license',\n },\n\n PaymentMethod: {\n ENDPOINT_PATH: 'paymentmethod',\n },\n\n ProductModule: {\n ENDPOINT_PATH: 'productmodule',\n },\n\n Utility: {\n ENDPOINT_PATH: 'utility',\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport CheckUtils from '../util/CheckUtils';\nimport CastsUtils from '../util/CastsUtils';\n\n/**\n * The entity properties.\n * @type {{}}\n * @private\n */\nconst propertiesMap = new WeakMap();\n\n/**\n * List of properties that was defined\n * @type {{}}\n * @private\n */\n\nconst definedMap = new WeakMap();\n\n/**\n * List of properties that need be casts\n * @type {{}}\n * @private\n */\nconst castsMap = new WeakMap();\n\n/**\n * List of properties that has read-only access\n * @type {{}}\n * @private\n */\nconst readOnlyMap = new WeakMap();\n\nexport default class BaseEntity {\n constructor({ properties, casts, readOnly }) {\n propertiesMap.set(this, {});\n definedMap.set(this, {});\n castsMap.set(this, casts || []);\n readOnlyMap.set(this, readOnly || []);\n\n if (properties) {\n this.setProperties(properties);\n }\n }\n\n /**\n * Set a given property on the entity.\n * @param property\n * @param value\n * @returns {BaseEntity}\n */\n setProperty(property, value) {\n // if property has read-only access and was initialized at least once\n if (this.hasProperty(property) && this.isPropertyReadOnly(property)) {\n throw new TypeError(`Property ${property} has read-only access`);\n }\n\n // if property name has bad native type\n if (!CheckUtils.isValid(property) || typeof property === 'object') {\n throw new TypeError(`Bad property name:${property}`);\n }\n\n // if property value has bad native type\n if (!CheckUtils.isValid(value)) {\n throw new TypeError(`Property ${property} has bad value ${value}`);\n }\n\n const castedValue = this.cast(property, value);\n\n // check if property value after cast has bad native type\n if (!CheckUtils.isValid(value)) {\n throw new TypeError(`Property ${property} has bad cast value ${castedValue}`);\n }\n\n // define to property\n this.define(property);\n\n // save property to propertiesMap\n const properties = propertiesMap.get(this);\n properties[property] = castedValue;\n\n return this;\n }\n\n /**\n * Alias for setProperty\n * @param property\n * @param value\n * @returns {BaseEntity}\n */\n addProperty(property, value) {\n return this.setProperty(property, value);\n }\n\n /**\n * Set the entity properties.\n * @param properties\n * @returns {BaseEntity}\n */\n setProperties(properties) {\n this.removeProperties();\n\n const has = Object.prototype.hasOwnProperty;\n\n Object.keys(properties).forEach((key) => {\n if (has.call(properties, key)) {\n this.setProperty(key, properties[key]);\n }\n });\n\n return this;\n }\n\n /**\n * Check if we has property\n * @param property\n * @protected\n */\n hasProperty(property) {\n return Object.prototype.hasOwnProperty.call(propertiesMap.get(this), property);\n }\n\n /**\n * Get an property from the entity.\n * @param property\n * @param def\n * @returns {*}\n */\n getProperty(property, def) {\n return Object.prototype.hasOwnProperty.call(propertiesMap.get(this), property)\n ? propertiesMap.get(this)[property]\n : def;\n }\n\n /**\n * Get all of the current properties on the entity.\n */\n getProperties() {\n return Object.assign({}, propertiesMap.get(this));\n }\n\n /**\n * Remove property\n * @param property\n * @returns {BaseEntity}\n */\n removeProperty(property) {\n const properties = propertiesMap.get(this);\n delete properties[property];\n this.removeDefine(property);\n return this;\n }\n\n /**\n * Remove properties\n * @param properties\n */\n removeProperties(properties) {\n const propertiesForRemove = properties || Object.keys(propertiesMap.get(this));\n\n propertiesForRemove.forEach((property) => {\n this.removeProperty(property);\n });\n }\n\n isPropertyReadOnly(property) {\n return readOnlyMap.get(this).indexOf(property) >= 0;\n }\n\n cast(property, value) {\n if (!castsMap.get(this)[property]) return value;\n\n return CastsUtils(castsMap.get(this)[property], value);\n }\n\n /**\n * Check if property has defined\n * @param property\n * @protected\n */\n hasDefine(property) {\n return Boolean(definedMap.get(this)[property]);\n }\n\n /**\n * Define property getter and setter\n * @param property\n * @protected\n */\n define(property) {\n if (this.hasDefine(property)) return;\n\n if (!CheckUtils.isValid(property) || typeof property === 'object') {\n throw new TypeError(`Bad property name:${property}`);\n }\n\n const self = this;\n\n // delete property\n delete this[property];\n\n const descriptors = {\n enumerable: true,\n configurable: true,\n get() {\n return self.getProperty(property);\n },\n };\n\n if (!this.isPropertyReadOnly(property)) {\n descriptors.set = value => self.setProperty(property, value);\n }\n\n const defined = definedMap.get(this);\n defined[property] = true;\n\n Object.defineProperty(this, property, descriptors);\n }\n\n /**\n * Remove property getter and setter\n * @param property\n * @protected\n */\n removeDefine(property) {\n if (!this.hasDefine(property)) return;\n\n const defined = definedMap.get(this);\n delete defined[property];\n\n delete this[property];\n }\n\n /**\n * Define properties getter and setter\n * @param properties\n * @param onlyGetter\n * @protected\n */\n defines(properties, onlyGetter) {\n properties.forEach((property) => {\n this.define(property, onlyGetter);\n });\n }\n\n /**\n * Get properties map\n */\n asPropertiesMap() {\n const properties = this.getProperties();\n const customProperties = {};\n\n const has = Object.prototype.hasOwnProperty;\n\n Object.keys(this).forEach((key) => {\n if (!has.call(this, key)) return;\n if (!CheckUtils.isValid(this[key])) return;\n\n customProperties[key] = this[key];\n });\n\n return Object.assign({}, customProperties, properties);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nimport Constants from '../Constants';\nimport CheckUtils from '../util/CheckUtils';\n\n/**\n * The context values.\n * @type {{}}\n * @private\n */\nconst valuesMap = new WeakMap();\n\n/**\n * List of values that was defined\n * @type {{}}\n * @private\n */\nconst definedMap = new WeakMap();\n\n/**\n * Context defaults\n * @type {{baseUrl: string, securityMode}}\n * @private\n */\nconst defaultsMap = new WeakMap();\n\nexport default class Context {\n constructor(values) {\n defaultsMap.set(this, {\n baseUrl: 'https://go.netlicensing.io/core/v2/rest',\n securityMode: Constants.BASIC_AUTHENTICATION,\n });\n\n valuesMap.set(this, {});\n\n definedMap.set(this, {});\n\n this.setValues(Object.assign({}, defaultsMap.get(this), values));\n }\n\n setBaseUrl(baseUrl) {\n return this.setValue('baseUrl', baseUrl);\n }\n\n getBaseUrl(def) {\n return this.getValue('baseUrl', def);\n }\n\n setUsername(username) {\n return this.setValue('username', username);\n }\n\n getUsername(def) {\n return this.getValue('username', def);\n }\n\n setPassword(password) {\n return this.setValue('password', password);\n }\n\n getPassword(def) {\n return this.getValue('password', def);\n }\n\n setApiKey(apiKey) {\n return this.setValue('apiKey', apiKey);\n }\n\n getApiKey(def) {\n return this.getValue('apiKey', def);\n }\n\n setSecurityMode(securityMode) {\n return this.setValue('securityMode', securityMode);\n }\n\n getSecurityMode(def) {\n return this.getValue('securityMode', def);\n }\n\n setVendorNumber(vendorNumber) {\n return this.setValue('vendorNumber', vendorNumber);\n }\n\n getVendorNumber(def) {\n return this.getValue('vendorNumber', def);\n }\n\n /**\n * Set a given values on the context.\n * @param key\n * @param value\n * @returns {Context}\n */\n setValue(key, value) {\n // check values\n if (!CheckUtils.isValid(key) || typeof key === 'object') throw new Error(`Bad value key:${key}`);\n if (!CheckUtils.isValid(value)) throw new Error(`Value ${key} has wrong value${value}`);\n\n // define keys\n this.define(key);\n\n let copedValue = value;\n\n if (typeof value === 'object') {\n copedValue = (Array.isArray(value)) ? Object.assign([], value) : Object.assign({}, value);\n }\n\n const values = valuesMap.get(this);\n values[key] = copedValue;\n\n return this;\n }\n\n /**\n * Set the array of context values.\n * @param values\n * @returns {Context}\n */\n setValues(values) {\n this.removeValues();\n\n const has = Object.prototype.hasOwnProperty;\n\n Object.keys(values).forEach((key) => {\n if (has.call(values, key)) {\n this.setValue(key, values[key]);\n }\n });\n\n return this;\n }\n\n /**\n * Get an value from the context.\n * @param key\n * @param def\n * @returns {*}\n */\n getValue(key, def) {\n return valuesMap.get(this)[key] || def;\n }\n\n /**\n * Get all of the current value on the context.\n */\n getValues() {\n return Object.assign({}, valuesMap.get(this));\n }\n\n /**\n * Remove value\n * @param key\n * @returns {Context}\n */\n removeValue(key) {\n const values = valuesMap.get(this);\n delete values[key];\n\n this.removeDefine(key);\n return this;\n }\n\n /**\n * Remove values\n * @param keys\n */\n removeValues(keys) {\n const keysAr = keys || Object.keys(valuesMap.get(this));\n keysAr.forEach(key => this.removeValue(key));\n }\n\n /**\n * Define value getter and setter\n * @param key\n * @param onlyGetter\n * @private\n */\n define(key, onlyGetter) {\n if (this.hasDefine(key)) return;\n\n if (!CheckUtils.isValid(key) || typeof property === 'object') {\n throw new TypeError(`Bad value name:${key}`);\n }\n\n const self = this;\n\n // delete property\n delete this[key];\n\n const descriptors = {\n enumerable: true,\n configurable: true,\n get() {\n return self.getValue(key);\n },\n };\n\n if (!onlyGetter) {\n descriptors.set = value => self.setValue(key, value);\n }\n\n const defined = definedMap.get(this);\n defined[key] = true;\n\n Object.defineProperty(this, key, descriptors);\n }\n\n /**\n * Check if value has defined\n * @param key\n * @private\n */\n hasDefine(key) {\n return Boolean(definedMap.get(this)[key]);\n }\n\n /**\n * Remove value getter and setter\n * @param key\n * @private\n */\n removeDefine(key) {\n if (!this.hasDefine(key)) return;\n\n const defined = definedMap.get(this);\n delete defined[key];\n\n delete this[key];\n }\n}\n","export default {\n FILTER_DELIMITER: ';',\n FILTER_PAIR_DELIMITER: '=',\n encode(filter = {}) {\n const query = [];\n const has = Object.prototype.hasOwnProperty;\n Object.keys(filter).forEach((key) => {\n if (has.call(filter, key)) {\n query.push(`${encodeURIComponent(key)}${this.FILTER_PAIR_DELIMITER}${encodeURIComponent(filter[key])}`);\n }\n });\n return query.join(this.FILTER_DELIMITER);\n },\n decode(query = '') {\n const filter = {};\n query.split(this.FILTER_DELIMITER).forEach((v) => {\n const [name, value] = v.split(this.FILTER_PAIR_DELIMITER);\n filter[name] = value;\n });\n return filter;\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nimport axios from 'axios';\nimport Context from '../vo/Context';\nimport Constants from '../Constants';\nimport BaseEntity from '../entities/BaseEntity';\n\nlet httpXHR = {};\n\nexport default class Service {\n static getLastHttpRequestInfo() {\n return httpXHR;\n }\n\n /**\n * Helper method for performing GET request to N\n etLicensing API services. Finds and returns first suitable item with\n * type resultType from the response.\n *\n * Context for the NetLicensing API call\n * @param context\n *\n * the REST URL template\n * @param urlTemplate\n *\n * The REST query parameters values. May be null if there are no parameters.\n * @param queryParams\n *\n * the type of the result\n * @param resultType\n *\n * @returns {Promise}\n */\n static get(context, urlTemplate, queryParams, resultType) {\n return Service\n .request(context, 'get', urlTemplate, queryParams)\n .then(response => ((response.data) ? Service.getEntity(resultType, response.data.items.item[0]) : null));\n }\n\n /**\n * Helper method for performing GET request to NetLicensing API service that returns page of items with type\n * resultType.\n *\n * context for the NetLicensing API call\n * @param context\n *\n * the REST URL template\n * @param urlTemplate\n *\n * The REST query parameters values. May be null if there are no parameters.\n * @param queryParams\n *\n * the type of the result\n * @param resultType\n *\n *\n * @returns {Promise}\n */\n static list(context, urlTemplate, queryParams, resultType) {\n return Service\n .request(context, 'get', urlTemplate, queryParams)\n .then(response => ((response.data)\n ? response.data.items.item.map(item => Service.getEntity(resultType, item))\n : []));\n }\n\n /**\n * Helper method for performing POST request to NetLicensing API services. Finds and returns first suitable item\n * with type resultType from the response.\n *\n * context for the NetLicensing API call\n * @param context\n *\n * the REST URL template\n * @param urlTemplate\n *\n * The REST query parameters values. May be null if there are no parameters.\n * @param queryParams\n *\n * he type of the result\n * @param resultType\n *\n * @returns {Promise}\n */\n static post(context, urlTemplate, queryParams, resultType) {\n return Service\n .request(context, 'post', urlTemplate, queryParams)\n .then(response => ((response.data) ? Service.getEntity(resultType, response.data.items.item[0]) : null));\n }\n\n /**\n *\n * @param context\n * @param urlTemplate\n * @param queryParams\n * @returns {Promise}\n */\n static delete(context, urlTemplate, queryParams) {\n return Service\n .request(context, 'delete', urlTemplate, queryParams)\n .then(response => (response.status === 204));\n }\n\n /**\n * Send request to NetLicensing RestApi\n * @param context\n * @param method\n * @param urlTemplate\n * @param queryParams\n * @returns {Promise}\n */\n static request(context, method, urlTemplate, queryParams) {\n if (!(context instanceof Context)) throw new TypeError('context must be an instance of NetLicensing.Context');\n\n const template = String(urlTemplate);\n const params = queryParams || {};\n\n if (!template) throw new TypeError('Url template must be specified');\n\n // validate http method\n if (['get', 'post', 'delete'].indexOf(method.toLowerCase()) < 0) {\n throw new Error(`Invalid request type:${method}, allowed requests types: GET, POST, DELETE.`);\n }\n\n // validate context\n if (!context.getBaseUrl(null)) {\n throw new Error('Base url must be specified');\n }\n\n if (!Service.isValidUrl(String(context.getBaseUrl()))) {\n throw new Error(`Base url \"${context.getBaseUrl()}\" is not a valid URL`);\n }\n\n let restUrl = `${context.getBaseUrl()}/${urlTemplate}`;\n\n restUrl = restUrl.replace(/([^:]\\/)\\/+/g, '$1');\n\n // validate baseUrl + urlTemplate\n if (!Service.isValidUrl(String(restUrl))) {\n throw new Error(`Rest url \"${restUrl}\" is not a valid URL`);\n }\n\n const request = {\n url: restUrl,\n method: method.toLowerCase(),\n responseType: 'json',\n headers: {},\n transformRequest: [(data, headers) => {\n if (headers['Content-Type'] === 'application/x-www-form-urlencoded') {\n return Service.toQueryString(data);\n }\n return data;\n }],\n };\n\n if (['put', 'post', 'patch'].indexOf(request.method) >= 0) {\n if (request.method === 'post') {\n request.headers['Content-Type'] = 'application/x-www-form-urlencoded';\n }\n request.data = params;\n } else {\n request.params = params;\n }\n\n switch (context.getSecurityMode()) {\n // Basic Auth\n case Constants.BASIC_AUTHENTICATION:\n if (!context.getUsername()) throw new Error('Missing parameter \"username\"');\n if (!context.getPassword()) throw new Error('Missing parameter \"password\"');\n\n request.auth = {\n username: context.getUsername(),\n password: context.getPassword(),\n };\n break;\n // ApiKey Auth\n case Constants.APIKEY_IDENTIFICATION:\n if (!context.getApiKey()) throw new Error('Missing parameter \"apiKey\"');\n\n request.headers.Authorization = `Basic ${btoa(`apiKey:${context.getApiKey()}`)}`;\n break;\n default:\n throw new Error('Unknown security mode');\n }\n\n return axios(request)\n .then((response) => {\n httpXHR = response;\n return response;\n })\n .catch((error) => {\n httpXHR = error;\n\n if (error.response) {\n // The request was made and the server responded with a status code\n // that falls out of the range of 2xx\n const info = error.response.data.infos.info[0] || null;\n\n if (info && info.id === 'NotFoundException') {\n return Promise.resolve(null);\n }\n\n const reasonPhrase = info.value || 'Unknown';\n throw new Error(`Unsupported response status code ${error.response.status}: ${reasonPhrase}`);\n }\n\n return Promise.reject(error);\n });\n }\n\n /**\n * Create Entity from item\n * @param resultType\n * @param item\n * @returns {*}\n */\n static getEntity(resultType, item) {\n const properties = item.property || null;\n const lists = item.list || null;\n\n if (!resultType) return item;\n\n // eslint-disable-next-line new-cap\n const entity = new resultType();\n\n if (!(entity instanceof BaseEntity)) {\n throw new Error(`Invalid entity ${resultType}, entity must be instanceof BaseEntity`);\n }\n\n properties.forEach(({ name, value }) => {\n entity.setProperty(name, value);\n });\n\n if (lists) {\n lists.forEach(({ name, property }) => {\n const setListMethod = `setList${name.charAt(0).toUpperCase()}${name.substr(1, name.length - 1)}`;\n const setListsMethod = 'setLists';\n\n if (typeof entity[setListMethod] !== 'function' && typeof entity[setListsMethod] !== 'function') {\n // eslint-disable-next-line no-console\n console.warn(`Methods: ${setListMethod},${setListsMethod} not found in ${item.type} \n for list property ${name}`);\n return;\n }\n\n if (typeof entity[setListMethod] === 'function') {\n entity[setListMethod](property);\n return;\n }\n\n if (typeof entity[setListsMethod] === 'function') {\n entity[setListsMethod](name, property);\n }\n });\n }\n\n return entity;\n }\n\n static isValidUrl(url) {\n const pattern = new RegExp('^(https?:\\\\/\\\\/)?' + // protocol\n '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.?)+[a-z]{2,}|' + // domain name\n '((\\\\d{1,3}\\\\.){3}\\\\d{1,3}))' + // OR ip (v4) address\n '(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*' + // port and path\n '(\\\\?[;&a-z\\\\d%_.~+=-]*)?' + // query string\n '(\\\\#[-a-z\\\\d_]*)?$', 'i'); // fragment locator\n\n return pattern.test(url);\n }\n\n static toQueryString(data, prefix) {\n const query = [];\n\n const has = Object.prototype.hasOwnProperty;\n\n Object.keys(data).forEach((key) => {\n if (has.call(data, key)) {\n const k = prefix ? `${prefix}[${key}]` : key;\n let v = data[key];\n v = (v instanceof Date) ? v.toISOString() : v;\n query.push((v !== null && typeof v === 'object') ?\n Service.toQueryString(v, k) :\n `${encodeURIComponent(k)}=${encodeURIComponent(v)}`);\n }\n });\n\n return query.join('&').replace(/%5B[0-9]+%5D=/g, '=');\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\n\n/**\n * License entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number (across all products/licensees of a vendor) that identifies the license. Vendor can\n * assign this number when creating a license or let NetLicensing generate one. Read-only after corresponding creation\n * transaction status is set to closed.\n * @property string number\n *\n * Name for the licensed item. Set from license template on creation, if not specified explicitly.\n * @property string name\n *\n * If set to false, the license is disabled. License can be re-enabled, but as long as it is disabled,\n * the license is excluded from the validation process.\n * @property boolean active\n *\n * price for the license. If >0, it must always be accompanied by the currency specification. Read-only,\n * set from license template on creation.\n * @property float price\n *\n * specifies currency for the license price. Check data types to discover which currencies are\n * supported. Read-only, set from license template on creation.\n * @property string currency\n *\n * If set to true, this license is not shown in NetLicensing Shop as purchased license. Set from license\n * template on creation, if not specified explicitly.\n * @property boolean $hidden\n *\n * @property string startDate\n *\n * Arbitrary additional user properties of string type may be associated with each license. The name of user property\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, licenseeNumber,\n * licenseTemplateNumber.\n */\nexport default class License extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n active: 'boolean',\n name: 'string',\n price: 'float',\n hidden: 'boolean',\n parentfeature: 'string',\n timeVolume: 'int',\n startDate: 'date',\n inUse: 'boolean',\n },\n // The attributes that should have read-only access.\n readOnly: ['inUse', 'currency', 'price'],\n });\n\n // define default entity properties\n this.defines([\n 'number',\n 'active',\n 'name',\n 'hidden',\n 'parentfeature',\n 'timeVolume',\n 'startDate',\n 'inUse',\n 'currency',\n 'price',\n ]);\n }\n\n setNumber(number) {\n return this.setProperty('number', number);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setActive(active) {\n return this.setProperty('active', active);\n }\n\n getActive(def) {\n return this.getProperty('active', def);\n }\n\n setName(name) {\n return this.setProperty('name', name);\n }\n\n getName(def) {\n return this.getProperty('name', def);\n }\n\n setHidden(hidden) {\n return this.setProperty('hidden', hidden);\n }\n\n getHidden(def) {\n return this.getProperty('hidden', def);\n }\n\n setParentfeature(parentfeature) {\n return this.setProperty('parentfeature', parentfeature);\n }\n\n getParentfeature(def) {\n return this.getProperty('parentfeature', def);\n }\n\n setTimeVolume(timeVolume) {\n return this.setProperty('timeVolume', timeVolume);\n }\n\n getTimeVolume(def) {\n return this.getProperty('timeVolume', def);\n }\n\n setStartDate(startDate) {\n return this.setProperty('startDate', startDate);\n }\n\n getStartDate(def) {\n return this.getProperty('startDate', def);\n }\n\n getInUse(def) {\n return this.getProperty('inUse', def);\n }\n\n getPrice(def) {\n return this.getProperty('price', def);\n }\n\n getCurrency(def) {\n return this.getProperty('currency', def);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\nimport LicenseTransactionJoin from './LicenseTransactionJoin';\nimport License from './License';\n\n/**\n * Transaction entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number (across all products of a vendor) that identifies the transaction. This number is\n * always generated by NetLicensing.\n * @property string number\n *\n * always true for transactions\n * @property boolean active\n *\n * Status of transaction. \"CANCELLED\", \"CLOSED\", \"PENDING\".\n * @property string status\n *\n * \"SHOP\". AUTO transaction for internal use only.\n * @property string source\n *\n * grand total for SHOP transaction (see source).\n * @property float grandTotal\n *\n * discount for SHOP transaction (see source).\n * @property float discount\n *\n * specifies currency for money fields (grandTotal and discount). Check data types to discover which\n * @property string currency\n *\n * Date created. Optional.\n * @property string dateCreated\n *\n * Date closed. Optional.\n * @property string dateClosed\n *\n * @constructor\n */\nexport default class Transaction extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n name: 'string',\n status: 'string',\n source: 'string',\n grandTotal: 'float',\n discount: 'float',\n currency: 'string',\n dateCreated: 'date',\n dateClosed: 'date',\n active: 'boolean',\n paymentMethod: 'string',\n },\n // The attributes that should have read-only access.\n readOnly: ['active'],\n });\n\n // define default entity properties\n this.defines([\n 'number',\n 'name',\n 'status',\n 'source',\n 'grandTotal',\n 'discount',\n 'currency',\n 'dateCreated',\n 'dateClosed',\n 'paymentMethod',\n 'licenseTransactionJoins',\n ]);\n }\n\n setNumber(number) {\n return this.setProperty('number', number);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setName(name) {\n return this.setProperty('name', name);\n }\n\n getName(def) {\n return this.getProperty('name', def);\n }\n\n setStatus(status) {\n return this.setProperty('status', status);\n }\n\n getStatus(def) {\n return this.getProperty('status', def);\n }\n\n setSource(source) {\n return this.setProperty('source', source);\n }\n\n getSource(def) {\n return this.getProperty('source', def);\n }\n\n setGrandTotal(grandTotal) {\n return this.setProperty('grandTotal', grandTotal);\n }\n\n getGrandTotal(def) {\n return this.getProperty('grandTotal', def);\n }\n\n setDiscount(discount) {\n return this.setProperty('discount', discount);\n }\n\n getDiscount(def) {\n return this.getProperty('discount', def);\n }\n\n setCurrency(currency) {\n return this.setProperty('currency', currency);\n }\n\n getCurrency(def) {\n return this.getProperty('currency', def);\n }\n\n setDateCreated(dateCreated) {\n return this.setProperty('dateCreated', dateCreated);\n }\n\n getDateCreated(def) {\n return this.getProperty('dateCreated', def);\n }\n\n setDateClosed(dateClosed) {\n return this.setProperty('dateClosed', dateClosed);\n }\n\n getDateClosed(def) {\n return this.getProperty('dateClosed', def);\n }\n\n setPaymentMethod(paymentMethod) {\n return this.setProperty('paymentMethod', paymentMethod);\n }\n\n getPaymentMethod(def) {\n return this.getProperty('paymentMethod', def);\n }\n\n setActive() {\n return this.setProperty('active', true);\n }\n\n getLicenseTransactionJoins(def) {\n return this.getProperty('licenseTransactionJoins', def);\n }\n\n setLicenseTransactionJoins(licenseTransactionJoins) {\n return this.setProperty('licenseTransactionJoins', licenseTransactionJoins);\n }\n\n setListLicenseTransactionJoin(properties) {\n if (!properties) return;\n\n const licenseTransactionJoins = this.getProperty('licenseTransactionJoins', []);\n const licenseTransactionJoin = new LicenseTransactionJoin();\n\n properties.forEach((property) => {\n if (property.name === 'licenseNumber') {\n licenseTransactionJoin.setLicense(new License({ number: property.value }));\n }\n\n if (property.name === 'transactionNumber') {\n licenseTransactionJoin.setTransaction(new Transaction({ number: property.value }));\n }\n });\n\n licenseTransactionJoins.push(licenseTransactionJoin);\n this.setProperty('licenseTransactionJoins', licenseTransactionJoins);\n }\n}\n","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\n\n/**\n * Country entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * @property code - Unique code of country.\n *\n * @property name - Unique name of country\n *\n * @property vatPercent - Country vat.\n *\n * @property isEu - is country in EU.\n */\nexport default class Country extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n code: 'string',\n name: 'string',\n vatPercent: 'int',\n isEu: 'boolean',\n },\n });\n\n // define default entity properties\n this.defines(['code', 'name', 'vatPercent', 'isEu']);\n }\n\n setCode(code) {\n return this.setProperty('code', code);\n }\n\n getCode(def) {\n return this.getProperty('code', def);\n }\n\n setName(name) {\n return this.setProperty('name', name);\n }\n\n getName(def) {\n return this.getProperty('name', def);\n }\n\n setVatPercent(vat) {\n return this.setProperty('vatPercent', vat);\n }\n\n getVatPercent(def) {\n return this.getProperty('vatPercent', def);\n }\n\n setIsEu(isEu) {\n return this.setProperty('isEu', isEu);\n }\n\n getIsEu(def) {\n return this.getProperty('isEu', def);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nimport Transaction from './Transaction';\nimport License from './License';\n\n// const\n\nexport default class LicenseTransactionJoin {\n constructor(transaction, license) {\n this.transaction = transaction;\n this.license = license;\n }\n\n setTransaction(transaction) {\n if (!(transaction instanceof Transaction)) {\n throw new TypeError('context must be an instance of Transaction');\n }\n\n this.transaction = transaction;\n return this;\n }\n\n getTransaction(def) {\n return this.transaction || def;\n }\n\n setLicense(license) {\n if (!(license instanceof License)) {\n throw new TypeError('context must be an instance of License');\n }\n this.license = license;\n return this;\n }\n\n getLicense(def) {\n return this.license || def;\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\n\n/**\n * Product module entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number\n * @property string number\n *\n * If set to false, the token is disabled.\n * @property boolean active\n *\n * Expiration Time\n * @property string expirationTime\n *\n * @property string vendorNumber\n *\n * Token type to be generated.\n * DEFAULT - default one-time token (will be expired after first request)\n * SHOP - shop token is used to redirect customer to the netlicensingShop(licenseeNumber is mandatory)\n * APIKEY - APIKey-token\n * @property string tokenType\n *\n * @property string licenseeNumber\n *\n * @constructor\n */\nexport default class Token extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n active: 'boolean',\n expirationTime: 'date',\n vendorNumber: 'string',\n tokenType: 'string',\n licenseeNumber: 'string',\n successURL: 'string',\n successURLTitle: 'string',\n cancelURL: 'string',\n cancelURLTitle: 'string',\n shopURL: 'string',\n },\n // The attributes that should have read-only access.\n readOnly: ['number', 'shopURL'],\n });\n\n // define default entity properties\n this.defines([\n 'number',\n 'active',\n 'expirationTime',\n 'vendorNumber',\n 'tokenType',\n 'licenseeNumber',\n 'successURL',\n 'successURLTitle',\n 'cancelURL',\n 'cancelURLTitle',\n 'shopURL',\n ]);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setActive(active) {\n return this.setProperty('active', active);\n }\n\n getActive(def) {\n return this.getProperty('active', def);\n }\n\n setExpirationTime(expirationTime) {\n return this.setProperty('expirationTime', expirationTime);\n }\n\n getExpirationTime(def) {\n return this.getProperty('expirationTime', def);\n }\n\n setVendorNumber(vendorNumber) {\n return this.setProperty('vendorNumber', vendorNumber);\n }\n\n getVendorNumber(def) {\n return this.getProperty('vendorNumber', def);\n }\n\n setTokenType(tokenType) {\n return this.setProperty('tokenType', tokenType);\n }\n\n getTokenType(def) {\n return this.getProperty('tokenType', def);\n }\n\n setLicenseeNumber(licenseeNumber) {\n return this.setProperty('licenseeNumber', licenseeNumber);\n }\n\n getLicenseeNumber(def) {\n return this.getProperty('licenseeNumber', def);\n }\n\n setSuccessURL(successURL) {\n return this.setProperty('successURL', successURL);\n }\n\n getSuccessURL(def) {\n return this.getProperty('successURL', def);\n }\n\n setSuccessURLTitle(successURLTitle) {\n return this.setProperty('successURLTitle', successURLTitle);\n }\n\n getSuccessURLTitle(def) {\n return this.getProperty('successURLTitle', def);\n }\n\n setCancelURL(cancelURL) {\n return this.setProperty('cancelURL', cancelURL);\n }\n\n getCancelURL(def) {\n return this.getProperty('cancelURL', def);\n }\n\n setCancelURLTitle(cancelURLTitle) {\n return this.setProperty('cancelURLTitle', cancelURLTitle);\n }\n\n getCancelURLTitle(def) {\n return this.getProperty('cancelURLTitle', def);\n }\n\n getShopURL(def) {\n return this.getProperty('shopURL', def);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\nimport BaseEntity from './BaseEntity';\n\nexport default class ProductDiscount extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n totalPrice: 'float',\n currency: 'string',\n amountFix: 'float',\n amountPercent: 'int',\n },\n });\n\n // define default entity properties\n this.defines(['totalPrice', 'currency', 'amountFix', 'amountPercent']);\n }\n\n setTotalPrice(totalPrice) {\n return this.setProperty('totalPrice', totalPrice);\n }\n\n getTotalPrice(def) {\n return this.getProperty('totalPrice', def);\n }\n\n setCurrency(currency) {\n return this.setProperty('currency', currency);\n }\n\n getCurrency(def) {\n return this.getProperty('currency', def);\n }\n\n setAmountFix(amountFix) {\n return this.setProperty('amountFix', amountFix).removeProperty('amountPercent');\n }\n\n getAmountFix(def) {\n return this.getProperty('amountFix', def);\n }\n\n setAmountPercent(amountPercent) {\n return this.setProperty('amountPercent', amountPercent).removeProperty('amountFix');\n }\n\n getAmountPercent(def) {\n return this.getProperty('amountPercent', def);\n }\n\n toString() {\n const totalPrice = this.getTotalPrice();\n const currency = this.getCurrency();\n let amount = 0;\n\n if (this.getAmountFix(null)) amount = this.getAmountFix();\n if (this.getAmountPercent(null)) amount = `${this.getAmountPercent()}%`;\n\n return `${totalPrice};${currency};${amount}`;\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\nimport ProductDiscount from './ProductDiscount';\n\n/**\n * The discounts map\n * @type {{}}\n * @private\n */\nconst discountsMap = new WeakMap();\n\n/**\n * An identifier that show if discounts was touched\n * @type {{}}\n * @private\n */\nconst discountsTouched = new WeakMap();\n\n/**\n * NetLicensing Product entity.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number that identifies the product. Vendor can assign this number when creating a product or\n * let NetLicensing generate one. Read-only after creation of the first licensee for the product.\n * @property string number\n *\n * If set to false, the product is disabled. No new licensees can be registered for the product,\n * existing licensees can not obtain new licenses.\n * @property boolean active\n *\n * Product name. Together with the version identifies the product for the end customer.\n * @property string name\n *\n * Product version. Convenience parameter, additional to the product name.\n * @property float version\n *\n * If set to 'true', non-existing licensees will be created at first validation attempt.\n * @property boolean licenseeAutoCreate\n *\n * Licensee secret mode for product.Supported types: \"DISABLED\", \"PREDEFINED\", \"CLIENT\"\n * @property boolean licenseeSecretMode\n *\n * Product description. Optional.\n * @property string description\n *\n * Licensing information. Optional.\n * @property string licensingInfo\n *\n * @property boolean inUse\n *\n * Arbitrary additional user properties of string type may be associated with each product. The name of user property\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted.\n *\n * @constructor\n */\nexport default class Product extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n active: 'boolean',\n name: 'string',\n version: 'string',\n description: 'string',\n licensingInfo: 'string',\n licenseeAutoCreate: 'boolean',\n licenseeSecretMode: 'string',\n inUse: 'boolean',\n },\n // The attributes that should have read-only access.\n readOnly: ['inUse'],\n });\n\n // define default entity properties\n this.defines([\n 'number',\n 'active',\n 'name',\n 'version',\n 'description',\n 'licensingInfo',\n 'licenseeAutoCreate',\n 'licenseeSecretMode',\n 'inUse',\n ]);\n\n discountsMap.set(this, []);\n discountsTouched.set(this, false);\n }\n\n setNumber(number) {\n return this.setProperty('number', number);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setActive(active) {\n return this.setProperty('active', active);\n }\n\n getActive(def) {\n return this.getProperty('active', def);\n }\n\n setName(name) {\n return this.setProperty('name', name);\n }\n\n getName(def) {\n return this.getProperty('name', def);\n }\n\n setVersion(version) {\n return this.setProperty('version', version);\n }\n\n getVersion(def) {\n return this.getProperty('version', def);\n }\n\n setLicenseeAutoCreate(licenseeAutoCreate) {\n return this.setProperty('licenseeAutoCreate', licenseeAutoCreate);\n }\n\n getLicenseeAutoCreate(def) {\n return this.getProperty('licenseeAutoCreate', def);\n }\n\n setLicenseeSecretMode(licenseeSecretMode) {\n return this.setProperty('licenseeSecretMode', licenseeSecretMode);\n }\n\n getLicenseeSecretMode(def) {\n return this.getProperty('licenseeSecretMode', def);\n }\n\n setDescription(description) {\n return this.setProperty('description', description);\n }\n\n getDescription(def) {\n return this.getProperty('description', def);\n }\n\n setLicensingInfo(licensingInfo) {\n return this.setProperty('licensingInfo', licensingInfo);\n }\n\n getLicensingInfo(def) {\n return this.getProperty('licensingInfo', def);\n }\n\n getInUse(def) {\n return this.getProperty('inUse', def);\n }\n\n /**\n * Add discount to product\n *\n * @param discount NetLicensing.ProductDiscount\n * @returns {NetLicensing.Product}\n */\n addDiscount(discount) {\n if (!(discount instanceof ProductDiscount)) {\n throw new TypeError('discount must be an instance of ProductDiscount');\n }\n\n const discounts = discountsMap.get(this);\n discounts.push(discount);\n discountsMap.set(this, discounts);\n discountsTouched.set(this, true);\n\n return this;\n }\n\n /**\n * Set discounts to product\n * @param discounts\n */\n setProductDiscounts(discounts) {\n discountsMap.set(this, []);\n discountsTouched.set(this, true);\n\n if (!discounts) return this;\n\n if (Array.isArray(discounts)) {\n discounts.forEach((discount) => {\n this.addDiscount(discount);\n });\n\n return this;\n }\n\n this.addDiscount(discounts);\n\n return this;\n }\n\n /**\n * Get array of objects discounts\n * @returns {Array}\n */\n getProductDiscounts() {\n return Object.assign([], discountsMap.get(this));\n }\n\n setListDiscount(properties) {\n if (!properties) return;\n\n const discount = new ProductDiscount();\n properties.forEach((property) => {\n discount.setProperty(property.name, property.value);\n });\n this.addDiscount(discount);\n }\n\n asPropertiesMap() {\n const propertiesMap = super.asPropertiesMap();\n\n if (discountsMap.get(this).length) {\n propertiesMap.discount = discountsMap.get(this).map(discount => discount.toString());\n }\n\n if (!propertiesMap.discount && discountsTouched.get(this)) {\n propertiesMap.discount = '';\n }\n\n return propertiesMap;\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\n\n/**\n * Product module entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number (across all products of a vendor) that identifies the product module. Vendor can assign\n * this number when creating a product module or let NetLicensing generate one. Read-only after creation of the first\n * licensee for the product.\n * @property string number\n *\n * If set to false, the product module is disabled. Licensees can not obtain any new licenses for this\n * product module.\n * @property boolean active\n *\n * Product module name that is visible to the end customers in NetLicensing Shop.\n * @property string name\n *\n * Licensing model applied to this product module. Defines what license templates can be\n * configured for the product module and how licenses for this product module are processed during validation.\n * @property string licensingModel\n *\n * Maximum checkout validity (days). Mandatory for 'Floating' licensing model.\n * @property integer maxCheckoutValidity\n *\n * Remaining time volume for yellow level. Mandatory for 'Rental' licensing model.\n * @property integer yellowThreshold\n *\n * Remaining time volume for red level. Mandatory for 'Rental' licensing model.\n * @property integer redThreshold\n *\n * License template. Mandatory for 'Try & Buy' licensing model. Supported types: \"TIMEVOLUME\", \"FEATURE\".\n * @property string licenseTemplate\n *\n * @constructor\n */\nexport default class ProductModule extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n active: 'boolean',\n name: 'string',\n licensingModel: 'string',\n maxCheckoutValidity: 'int',\n yellowThreshold: 'int',\n redThreshold: 'int',\n licenseTemplate: 'string',\n inUse: 'boolean',\n },\n // The attributes that should have read-only access.\n readOnly: ['inUse'],\n });\n\n // define default entity properties\n this.defines([\n 'number',\n 'active',\n 'name',\n 'licensingModel',\n 'maxCheckoutValidity',\n 'yellowThreshold',\n 'redThreshold',\n 'licenseTemplate',\n 'inUse',\n ]);\n }\n\n setNumber(number) {\n return this.setProperty('number', number);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setActive(active) {\n return this.setProperty('active', active);\n }\n\n getActive(def) {\n return this.getProperty('active', def);\n }\n\n setName(name) {\n return this.setProperty('name', name);\n }\n\n getName(def) {\n return this.getProperty('name', def);\n }\n\n setLicensingModel(licensingModel) {\n return this.setProperty('licensingModel', licensingModel);\n }\n\n getLicensingModel(def) {\n return this.getProperty('licensingModel', def);\n }\n\n setMaxCheckoutValidity(maxCheckoutValidity) {\n return this.setProperty('maxCheckoutValidity', maxCheckoutValidity);\n }\n\n getMaxCheckoutValidity(def) {\n return this.getProperty('maxCheckoutValidity', def);\n }\n\n setYellowThreshold(yellowThreshold) {\n return this.setProperty('yellowThreshold', yellowThreshold);\n }\n\n getYellowThreshold(def) {\n return this.getProperty('yellowThreshold', def);\n }\n\n setRedThreshold(redThreshold) {\n return this.setProperty('redThreshold', redThreshold);\n }\n\n getRedThreshold(def) {\n return this.getProperty('redThreshold', def);\n }\n\n setLicenseTemplate(licenseTemplate) {\n return this.setProperty('licenseTemplate', licenseTemplate);\n }\n\n getLicenseTemplate(def) {\n return this.getProperty('licenseTemplate', def);\n }\n\n getInUse(def) {\n return this.getProperty('inUse', def);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\n\n/**\n * PaymentMethod entity used internally by NetLicensing.\n *\n * @property string number\n * @property boolean active\n *\n * @constructor\n */\nexport default class PaymentMethod extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n active: 'boolean',\n 'paypal.subject': 'string',\n },\n // The attributes that should have read-only access.\n readOnly: ['inUse'],\n });\n\n // define default entity properties\n this.defines(['number', 'active', 'paypal.subject']);\n }\n\n setNumber(number) {\n return this.setProperty('number', number);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setActive(active) {\n return this.setProperty('active', active);\n }\n\n getActive(def) {\n return this.getProperty('active', def);\n }\n\n setPaypalSubject(paypalSubject) {\n return this.setProperty('paypal.subject', paypalSubject);\n }\n\n getPaypalSubject(def) {\n return this.getProperty('paypal.subject', def);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\n\n/**\n * License template entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number (across all products of a vendor) that identifies the license template. Vendor can\n * assign this number when creating a license template or let NetLicensing generate one.\n * Read-only after creation of the first license from this license template.\n * @property string number\n *\n * If set to false, the license template is disabled. Licensee can not obtain any new licenses off this\n * license template.\n * @property boolean active\n *\n * Name for the licensed item.\n * @property string name\n *\n * Type of licenses created from this license template. Supported types: \"FEATURE\", \"TIMEVOLUME\",\n * \"FLOATING\", \"QUANTITY\"\n * @property string licenseType\n *\n * Price for the license. If >0, it must always be accompanied by the currency specification.\n * @property double price\n *\n * Specifies currency for the license price. Check data types to discover which currencies are\n * supported.\n * @property string currency\n *\n * If set to true, every new licensee automatically gets one license out of this license template on\n * creation. Automatic licenses must have their price set to 0.\n * @property boolean automatic\n *\n * If set to true, this license template is not shown in NetLicensing Shop as offered for purchase.\n * @property boolean hidden\n *\n * If set to true, licenses from this license template are not visible to the end customer, but\n * participate in validation.\n * @property boolean hideLicenses\n *\n * Mandatory for 'TIMEVOLUME' license type.\n * @property integer timeVolume\n *\n * Mandatory for 'FLOATING' license type.\n * @property integer maxSessions\n *\n * Mandatory for 'QUANTITY' license type.\n * @property integer quantity\n *\n * @constructor\n */\nexport default class LicenseTemplate extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n active: 'boolean',\n name: 'string',\n licenseType: 'string',\n price: 'double',\n currency: 'string',\n automatic: 'boolean',\n hidden: 'boolean',\n hideLicenses: 'boolean',\n timeVolume: 'int',\n maxSessions: 'int',\n quantity: 'int',\n inUse: 'boolean',\n },\n // The attributes that should have read-only access.\n readOnly: ['inUse'],\n });\n\n // define default entity properties\n this.defines([\n 'number',\n 'active',\n 'name',\n 'licenseType',\n 'price',\n 'currency',\n 'automatic',\n 'hidden',\n 'hideLicenses',\n 'timeVolume',\n 'maxSessions',\n 'quantity',\n 'inUse',\n ]);\n }\n\n setNumber(number) {\n return this.setProperty('number', number);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setActive(active) {\n return this.setProperty('active', active);\n }\n\n getActive(def) {\n return this.getProperty('active', def);\n }\n\n setName(name) {\n return this.setProperty('name', name);\n }\n\n getName(def) {\n return this.getProperty('name', def);\n }\n\n setLicenseType(licenseType) {\n return this.setProperty('licenseType', licenseType);\n }\n\n getLicenseType(def) {\n return this.getProperty('licenseType', def);\n }\n\n setPrice(price) {\n return this.setProperty('price', price);\n }\n\n getPrice(def) {\n return this.getProperty('price', def);\n }\n\n setCurrency(currency) {\n return this.setProperty('currency', currency);\n }\n\n getCurrency(def) {\n return this.getProperty('currency', def);\n }\n\n setAutomatic(automatic) {\n return this.setProperty('automatic', automatic);\n }\n\n getAutomatic(def) {\n return this.getProperty('automatic', def);\n }\n\n setHidden(hidden) {\n return this.setProperty('hidden', hidden);\n }\n\n getHidden(def) {\n return this.getProperty('hidden', def);\n }\n\n setHideLicenses(hideLicenses) {\n return this.setProperty('hideLicenses', hideLicenses);\n }\n\n getHideLicenses(def) {\n return this.getProperty('hideLicenses', def);\n }\n\n setTimeVolume(timeVolume) {\n return this.setProperty('timeVolume', timeVolume);\n }\n\n getTimeVolume(def) {\n return this.getProperty('timeVolume', def);\n }\n\n setMaxSessions(maxSessions) {\n return this.setProperty('maxSessions', maxSessions);\n }\n\n getMaxSessions(def) {\n return this.getProperty('maxSessions', def);\n }\n\n setQuantity(quantity) {\n return this.setProperty('quantity', quantity);\n }\n\n getQuantity(def) {\n return this.getProperty('quantity', def);\n }\n\n getInUse(def) {\n return this.getProperty('inUse', def);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport CheckUtils from '../util/CheckUtils';\n\n/**\n * Validation result map\n * @type {WeakMap}\n */\nconst vr = new WeakMap();\n\nexport default class ValidationResults {\n constructor() {\n vr.set(this, { validators: {} });\n }\n\n getValidators() {\n return Object.assign({}, vr.get(this).validators);\n }\n\n setProductModuleValidation(productModuleNumber, productModuleValidation) {\n if (!CheckUtils.isValid(productModuleNumber) || typeof productModuleNumber === 'object') {\n throw new TypeError(`Bad productModuleNumber:${productModuleNumber}`);\n }\n\n vr.get(this).validators[productModuleNumber] = productModuleValidation;\n\n return this;\n }\n\n getProductModuleValidation(productModuleNumber) {\n if (!CheckUtils.isValid(productModuleNumber) || typeof productModuleNumber === 'object') {\n throw new TypeError(`Bad productModuleNumber:${productModuleNumber}`);\n }\n\n return vr.get(this).validators[productModuleNumber];\n }\n\n setTtl(ttl) {\n if (!CheckUtils.isValid(ttl) || typeof ttl === 'object') {\n throw new TypeError(`Bad ttl:${ttl}`);\n }\n vr.get(this).ttl = new Date(String(ttl));\n\n return this;\n }\n\n getTtl() {\n return (vr.get(this).ttl) ? new Date(vr.get(this).ttl) : undefined;\n }\n\n toString() {\n let data = 'ValidationResult [';\n\n const validators = this.getValidators();\n const has = Object.prototype.hasOwnProperty;\n\n Object.keys(validators).forEach((productModuleNumber) => {\n data += `ProductModule<${productModuleNumber}>`;\n if (has.call(validators, productModuleNumber)) {\n data += JSON.stringify(validators[productModuleNumber]);\n }\n });\n\n data += ']';\n\n return data;\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\n/**\n * Validation parameters map\n *\n * @type {WeakMap}\n */\nconst vpMap = new WeakMap();\n\nexport default class ValidationParameters {\n constructor() {\n vpMap.set(this, { parameters: {} });\n }\n\n /**\n * Sets the target product\n *\n * optional productNumber, must be provided in case licensee auto-create is enabled\n * @param productNumber\n * @returns {ValidationParameters}\n */\n setProductNumber(productNumber) {\n vpMap.get(this).productNumber = productNumber;\n return this;\n }\n\n /**\n * Get the target product\n * @returns {*}\n */\n getProductNumber() {\n return vpMap.get(this).productNumber;\n }\n\n /**\n * Sets the name for the new licensee\n *\n * optional human-readable licensee name in case licensee will be auto-created. This parameter must not\n * be the name, but can be used to store any other useful string information with new licensees, up to\n * 1000 characters.\n * @param licenseeName\n * @returns {NetLicensing.ValidationParameters}\n */\n setLicenseeName(licenseeName) {\n vpMap.get(this).licenseeName = licenseeName;\n return this;\n }\n\n /**\n * Get the licensee name\n * @returns {*}\n */\n getLicenseeName() {\n return vpMap.get(this).licenseeName;\n }\n\n /**\n * Sets the licensee secret\n *\n * licensee secret stored on the client side. Refer to Licensee Secret documentation for details.\n * @param licenseeSecret\n * @returns {ValidationParameters}\n */\n setLicenseeSecret(licenseeSecret) {\n vpMap.get(this).licenseeSecret = licenseeSecret;\n return this;\n }\n\n /**\n * Get the licensee secret\n * @returns {*}\n */\n getLicenseeSecret() {\n return vpMap.get(this).licenseeSecret;\n }\n\n /**\n * Get validation parameters\n * @returns {*}\n */\n getParameters() {\n return Object.assign({}, vpMap.get(this).parameters);\n }\n\n getProductModuleValidationParameters(productModuleNumber) {\n return Object.assign({}, vpMap.get(this).parameters[productModuleNumber]);\n }\n\n setProductModuleValidationParameters(productModuleNumber, productModuleParameters) {\n const { parameters } = vpMap.get(this);\n\n if (parameters[productModuleNumber] === undefined || !Object.keys(parameters[productModuleNumber]).length) {\n parameters[productModuleNumber] = {};\n }\n\n parameters[productModuleNumber] = Object.assign(parameters[productModuleNumber], productModuleParameters);\n\n return this;\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport BaseEntity from './BaseEntity';\n\n/**\n * Licensee entity used internally by NetLicensing.\n *\n * Properties visible via NetLicensing API:\n *\n * Unique number (across all products of a vendor) that identifies the licensee. Vendor can assign this\n * number when creating a licensee or let NetLicensing generate one. Read-only after creation of the first license for\n * the licensee.\n * @property string number\n *\n * Licensee name.\n * @property string name\n *\n * If set to false, the licensee is disabled. Licensee can not obtain new licenses, and validation is\n * disabled (tbd).\n * @property boolean active\n *\n * Licensee Secret for licensee\n * @property string licenseeSecret\n *\n * Mark licensee for transfer.\n * @property boolean markedForTransfer\n *\n * Arbitrary additional user properties of string type may be associated with each licensee. The name of user property\n * must not be equal to any of the fixed property names listed above and must be none of id, deleted, productNumber\n *\n * @constructor\n */\nexport default class Licensee extends BaseEntity {\n constructor(properties) {\n super({\n properties,\n // The attributes that should be cast to native types.\n casts: {\n number: 'string',\n active: 'boolean',\n name: 'string',\n licenseeSecret: 'string',\n markedForTransfer: 'boolean',\n inUse: 'boolean',\n },\n // The attributes that should have read-only access.\n readOnly: ['inUse'],\n });\n\n // define default entity properties\n this.defines(['number', 'active', 'name', 'licenseeSecret', 'markedForTransfer', 'inUse']);\n }\n\n setNumber(number) {\n return this.setProperty('number', number);\n }\n\n getNumber(def) {\n return this.getProperty('number', def);\n }\n\n setActive(active) {\n return this.setProperty('active', active);\n }\n\n getActive(def) {\n return this.getProperty('active', def);\n }\n\n setName(name) {\n return this.setProperty('name', name);\n }\n\n getName(def) {\n return this.getProperty('name', def);\n }\n\n setLicenseeSecret(licenseeSecret) {\n return this.setProperty('licenseeSecret', licenseeSecret);\n }\n\n getLicenseeSecret(def) {\n return this.getProperty('licenseeSecret', def);\n }\n\n setMarkedForTransfer(markedForTransfer) {\n return this.setProperty('markedForTransfer', markedForTransfer);\n }\n\n getMarkedForTransfer(def) {\n return this.getProperty('markedForTransfer', def);\n }\n\n getInUse(def) {\n return this.getProperty('inUse', def);\n }\n}\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\n// Cast an attribute to a native JS type.\nexport default (key, value) => {\n switch (key.trim().toLowerCase()) {\n case 'str':\n case 'string':\n return String(value);\n case 'int':\n case 'integer':\n return parseInt(value, 10);\n case 'float':\n case 'double':\n return parseFloat(value);\n case 'bool':\n case 'boolean':\n switch (value) {\n case 'true':\n case 'TRUE':\n return true;\n case 'false':\n case 'FALSE':\n return false;\n default:\n return Boolean(value);\n }\n case 'date':\n return (value === 'now') ? 'now' : new Date(String(value));\n default:\n return value;\n }\n};\n","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar buildURL = require('./../helpers/buildURL');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\nvar btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || require('./../helpers/btoa');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n var loadEvent = 'onreadystatechange';\n var xDomain = false;\n\n // For IE 8/9 CORS support\n // Only supports POST and GET calls and doesn't returns the response headers.\n // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n if (process.env.NODE_ENV !== 'test' &&\n typeof window !== 'undefined' &&\n window.XDomainRequest && !('withCredentials' in request) &&\n !isURLSameOrigin(config.url)) {\n request = new window.XDomainRequest();\n loadEvent = 'onload';\n xDomain = true;\n request.onprogress = function handleProgress() {};\n request.ontimeout = function handleTimeout() {};\n }\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request[loadEvent] = function handleLoad() {\n if (!request || (request.readyState !== 4 && !xDomain)) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n // IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201)\n status: request.status === 1223 ? 204 : request.status,\n statusText: request.status === 1223 ? 'No Content' : request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = require('./../helpers/cookies');\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport Constants from '../Constants';\nimport Service from './Service';\nimport CheckUtils from '../util/CheckUtils';\nimport Country from '../entities/Country';\nimport FilterUtils from '../util/FilterUtils';\n\n/**\n * JS representation of the Utility Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Utility+Services\n * @constructor\n */\n\nexport default {\n /**\n * Returns all license types. See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Utility+Services#UtilityServices-LicenseTypeslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * array of available license types or empty array if nothing found in promise.\n * @returns {Promise}\n */\n listLicenseTypes(context) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .list(context, `${Constants.Utility.ENDPOINT_PATH}/licenseTypes`)\n .then(items => items.map(item => item.property[0].value));\n },\n\n /**\n * Returns all license models. See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Utility+Services#UtilityServices-LicensingModelslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * array of available license models or empty array if nothing found in promise.\n * @returns {Promise}\n */\n listLicensingModels(context) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .list(context, `${Constants.Utility.ENDPOINT_PATH}/licensingModels`)\n .then(items => items.map(item => item.property[0].value));\n },\n\n /**\n * Returns all countries.\n *\n * determines the vendor on whose behalf the call is performed\n * @param context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter\n *\n * collection of available countries or null/empty list if nothing found in promise.\n * @returns {Promise}\n */\n listCountries(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, `${Constants.Utility.ENDPOINT_PATH}/countries`, queryParams, Country);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport Transaction from '../entities/Transaction';\nimport Constants from '../Constants';\nimport Service from './Service';\nimport CheckUtils from '../util/CheckUtils';\nimport FilterUtils from '../util/FilterUtils';\n\n/**\n * JS representation of the Transaction Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services\n *\n * Transaction is created each time change to LicenseService licenses happens. For instance licenses are\n * obtained by a licensee, licenses disabled by vendor, licenses deleted, etc. Transaction is created no matter what\n * source has initiated the change to licenses: it can be either a direct purchase of licenses by a licensee via\n * NetLicensing Shop, or licenses can be given to a licensee by a vendor. Licenses can also be assigned implicitly by\n * NetLicensing if it is defined so by a license model (e.g. evaluation license may be given automatically). All these\n * events are reflected in transactions. Of all the transaction handling routines only read-only routines are exposed to\n * the public API, as transactions are only allowed to be created and modified by NetLicensing internally.\n *\n * @constructor\n */\n\nexport default {\n /**\n * Creates new transaction object with given properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Createtransaction\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * non-null properties will be taken for the new object, null properties will either stay null, or will\n * be set to a default value, depending on property.\n * @param transaction NetLicensing.Transaction\n *\n * return the newly created transaction object in promise\n * @returns {Promise}\n */\n create(context, transaction) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(transaction instanceof Transaction)) {\n throw new TypeError('transaction must be an instance of Transaction');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .post(context, Constants.Transaction.ENDPOINT_PATH, transaction.asPropertiesMap(), Transaction);\n },\n\n /**\n * Gets transaction by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Gettransaction\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the transaction number\n * @param number string\n *\n * return the transaction in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .get(context, `${Constants.Transaction.ENDPOINT_PATH}/${number}`, {}, Transaction);\n },\n\n /**\n * Returns all transactions of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Transactionslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string\n *\n * array of transaction entities or empty array if nothing found in promise.\n * @returns {Promise}\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.Transaction.ENDPOINT_PATH, queryParams, Transaction);\n },\n\n /**\n * Updates transaction properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Transaction+Services#TransactionServices-Updatetransaction\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * transaction number\n * @param number string\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param transaction NetLicensing.Transaction\n *\n * return updated transaction in promise.\n * @returns {Promise}\n */\n update(context, number, transaction) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of NetLicensing.Context');\n }\n\n if (!(transaction instanceof Transaction)) {\n throw new TypeError('transaction must be an instance of NetLicensing.Transaction');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const path = `${Constants.Transaction.ENDPOINT_PATH}/${number}`;\n\n return Service\n .post(context, path, transaction.asPropertiesMap(), Transaction);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport Token from '../entities/Token';\nimport Constants from '../Constants';\nimport Service from './Service';\nimport CheckUtils from '../util/CheckUtils';\nimport FilterUtils from '../util/FilterUtils';\n\n/**\n * JS representation of the Token Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services\n *\n * @constructor\n */\n\nexport default {\n /**\n * Creates new token.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services#TokenServices-Createtoken\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param token NetLicensing.Token\n *\n * return created token in promise\n * @returns {Promise}\n */\n create(context, token) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(token instanceof Token)) {\n throw new TypeError('token must be an instance of Token');\n }\n\n return Service\n .post(context, Constants.Token.ENDPOINT_PATH, token.asPropertiesMap(), Token);\n },\n\n /**\n * Gets token by its number..See NetLicensingAPI for details:\n * @see https://www.labs64.de/conluence/display/NetLicensing PUB/Token+Services#TokenServices-Gettoken\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the token number\n * @param number\n *\n * return the token in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of NetLicensing.Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n return Service\n .get(context, `${Constants.Token.ENDPOINT_PATH}/${number}`, {}, Token);\n },\n\n /**\n * Returns tokens of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services#TokenServices-Tokenslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string|null\n *\n * array of token entities or empty array if nothing found.\n * @return array\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.Token.ENDPOINT_PATH, queryParams, Token);\n },\n\n /**\n * Delete token by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Token+Services#TokenServices-Deletetoken\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the token number\n * @param number string\n *\n * return boolean state of delete in promise\n * @returns {Promise}\n */\n delete(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of NetLicensing.Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n return Service\n .delete(context, `${Constants.Token.ENDPOINT_PATH}/${number}`);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Service from './Service';\nimport Context from '../vo/Context';\nimport Product from '../entities/Product';\nimport Constants from '../Constants';\nimport CheckUtils from '../util/CheckUtils';\nimport FilterUtils from '../util/FilterUtils';\n\n/**\n * JS representation of the Product Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services\n *\n * @constructor\n */\n\nexport default {\n /**\n * Creates new product with given properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Createproduct\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * non-null properties will be taken for the new object, null properties will either stay null, or will\n * be set to a default value, depending on property.\n * @param product NetLicensing.Product\n *\n * return the newly created product object in promise\n * @returns {Promise}\n */\n\n create(context, product) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(product instanceof Product)) {\n throw new TypeError('product must be an instance of Product');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .post(context, Constants.Product.ENDPOINT_PATH, product.asPropertiesMap(), Product);\n },\n\n /**\n * Gets product by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Getproduct\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the product number\n * @param number string\n *\n * return the product object in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .get(context, `${Constants.Product.ENDPOINT_PATH}/${number}`, {}, Product);\n },\n\n /**\n * Returns products of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Productslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string|null\n *\n * array of product entities or empty array if nothing found in promise.\n * @returns {Promise}\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.Product.ENDPOINT_PATH, queryParams, Product);\n },\n\n /**\n * Updates product properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Updateproduct\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * product number\n * @param number string\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param product NetLicensing.Product\n *\n * updated product in promise.\n * @returns {Promise}\n */\n update(context, number, product) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(product instanceof Product)) {\n throw new TypeError('product must be an instance of Product');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .post(context, `${Constants.Product.ENDPOINT_PATH}/${number}`, product.asPropertiesMap(), Product);\n },\n\n /**\n * Deletes product.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Deleteproduct\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * product number\n * @param number string\n *\n * if true, any entities that depend on the one being deleted will be deleted too\n * @param forceCascade boolean\n *\n * return boolean state of delete in promise\n * @returns {Promise}\n */\n delete(context, number, forceCascade) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n const queryParams = { forceCascade: Boolean(forceCascade) };\n\n return Service\n .delete(context, `${Constants.Product.ENDPOINT_PATH}/${number}`, queryParams);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport ProductModule from '../entities/ProductModule';\nimport CheckUtils from '../util/CheckUtils';\nimport Constants from '../Constants';\nimport Service from './Service';\nimport FilterUtils from '../util/FilterUtils';\n\n/**\n * JS representation of the ProductModule Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services\n *\n * @constructor\n */\n\nexport default {\n /**\n * Creates new product module object with given properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Createproductmodule\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * parent product to which the new product module is to be added\n * @param productNumber string\n *\n * non-null properties will be taken for the new object, null properties will either stay null, or will\n * be set to a default value, depending on property.\n * @param productModule NetLicensing.ProductModule\n *\n * the newly created product module object in promise\n * @returns {Promise}\n */\n create(context, productNumber, productModule) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(productModule instanceof ProductModule)) {\n throw new TypeError('product must be an instance of ProductModule');\n }\n\n CheckUtils.paramNotEmpty(productNumber, 'productNumber');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n productModule.setProperty('productNumber', productNumber);\n\n return Service\n .post(context, Constants.ProductModule.ENDPOINT_PATH, productModule.asPropertiesMap(), ProductModule);\n },\n\n /**\n * Gets product module by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Getproductmodule\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the product module number\n * @param number string\n *\n * return the product module object in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .get(context, `${Constants.ProductModule.ENDPOINT_PATH}/${number}`, {}, ProductModule);\n },\n\n /**\n * Returns products of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Services#ProductServices-Productslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string|null\n *\n * array of product modules entities or empty array if nothing found in promise.\n * @returns {Promise}\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.ProductModule.ENDPOINT_PATH, queryParams, ProductModule);\n },\n\n /**\n * Updates product module properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Updateproductmodule\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * product module number\n * @param number string\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param productModule NetLicensing.ProductModule\n *\n * updated product module in promise.\n * @returns {Promise}\n */\n update(context, number, productModule) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(productModule instanceof ProductModule)) {\n throw new TypeError('product must be an instance of ProductModule');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const path = `${Constants.ProductModule.ENDPOINT_PATH}/${number}`;\n\n return Service\n .post(context, path, productModule.asPropertiesMap(), ProductModule);\n },\n\n /**\n * Deletes product module.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Product+Module+Services#ProductModuleServices-Deleteproductmodule\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * product module number\n * @param number string\n *\n * if true, any entities that depend on the one being deleted will be deleted too\n * @param forceCascade boolean\n *\n * return boolean state of delete in promise\n * @returns {Promise}\n */\n delete(context, number, forceCascade) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n const queryParams = { forceCascade: Boolean(forceCascade) };\n\n return Service\n .delete(context, `${Constants.ProductModule.ENDPOINT_PATH}/${number}`, queryParams);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport PaymentMethod from '../entities/PaymentMethod';\nimport Constants from '../Constants';\nimport CheckUtils from '../util/CheckUtils';\nimport Service from './Service';\nimport FilterUtils from '../util/FilterUtils';\n\nexport default {\n /**\n * Gets payment method by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Getpaymentmethod\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the payment method number\n * @param number string\n *\n * return the payment method in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .get(context, `${Constants.PaymentMethod.ENDPOINT_PATH}/${number}`, {}, PaymentMethod);\n },\n\n /**\n * Returns payment methods of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Paymentmethodslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string|null\n *\n * array of payment method entities or empty array if nothing found in promise.\n * @returns {Promise}\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.PaymentMethod.ENDPOINT_PATH, queryParams, PaymentMethod);\n },\n\n /**\n * Updates payment method properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NetLicensing PUB/Payment+Method+Services#PaymentMethodServices-Updatepaymentmethod\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the payment method number\n * @param number string\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param paymentMethod NetLicensing.PaymentMethod\n *\n * return updated payment method in promise.\n * @returns {Promise}\n */\n update(context, number, paymentMethod) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(paymentMethod instanceof PaymentMethod)) {\n throw new TypeError('paymentMethod must be an instance of PaymentMethod');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const path = `${Constants.PaymentMethod.ENDPOINT_PATH}/${number}`;\n\n return Service\n .post(context, path, paymentMethod.asPropertiesMap(), PaymentMethod);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport LicenseTemplate from '../entities/LicenseTemplate';\nimport CheckUtils from '../util/CheckUtils';\nimport Constants from '../Constants';\nimport Service from './Service';\nimport FilterUtils from '../util/FilterUtils';\n\n/**\n * JS representation of the ProductModule Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services\n *\n * @constructor\n */\n\nexport default {\n /**\n * Creates new license template object with given properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Createlicensetemplate\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * parent product module to which the new license template is to be added\n * @param productModuleNumber\n *\n * non-null properties will be taken for the new object, null properties will either stay null, or will\n * be set to a default value, depending on property.\n * @param licenseTemplate NetLicensing.LicenseTemplate\n *\n * the newly created license template object in promise\n * @returns {Promise}\n */\n create(context, productModuleNumber, licenseTemplate) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(licenseTemplate instanceof LicenseTemplate)) {\n throw new TypeError('licenseTemplate must be an instance of LicenseTemplate');\n }\n\n CheckUtils.paramNotEmpty(productModuleNumber, 'productModuleNumber');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n licenseTemplate.setProperty('productModuleNumber', productModuleNumber);\n\n return Service\n .post(context, Constants.LicenseTemplate.ENDPOINT_PATH, licenseTemplate.asPropertiesMap(), LicenseTemplate);\n },\n\n /**\n * Gets license template by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Getlicensetemplate\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the license template number\n * @param number string\n *\n * return the license template object in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .get(context, `${Constants.LicenseTemplate.ENDPOINT_PATH}/${number}`, {}, LicenseTemplate);\n },\n\n /**\n * Returns all license templates of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Licensetemplateslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string|null\n *\n * array of license templates (of all products/modules) or null/empty list if nothing found in promise.\n * @returns {Promise}\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.LicenseTemplate.ENDPOINT_PATH, queryParams, LicenseTemplate);\n },\n\n /**\n * Updates license template properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Updatelicensetemplate\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * license template number\n * @param number string\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param licenseTemplate NetLicensing.LicenseTemplate\n *\n * updated license template in promise.\n * @returns {Promise}\n */\n update(context, number, licenseTemplate) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(licenseTemplate instanceof LicenseTemplate)) {\n throw new TypeError('licenseTemplate must be an instance of LicenseTemplate');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const path = `${Constants.LicenseTemplate.ENDPOINT_PATH}/${number}`;\n\n return Service\n .post(context, path, licenseTemplate.asPropertiesMap(), LicenseTemplate);\n },\n\n /**\n * Deletes license template.See NetLicensingAPI JavaDoc for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Deletelicensetemplate\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * license template number\n * @param number string\n *\n * if true, any entities that depend on the one being deleted will be deleted too\n * @param forceCascade boolean\n *\n * return boolean state of delete in promise\n * @returns {Promise}\n */\n delete(context, number, forceCascade) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n const queryParams = { forceCascade: Boolean(forceCascade) };\n\n return Service\n .delete(context, `${Constants.LicenseTemplate.ENDPOINT_PATH}/${number}`, queryParams);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport License from '../entities/License';\nimport CheckUtils from '../util/CheckUtils';\nimport Constants from '../Constants';\nimport Service from './Service';\nimport FilterUtils from '../util/FilterUtils';\n\n/**\n * JS representation of the License Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NLICPUB/License+Services\n *\n * @constructor\n */\n\nexport default {\n /**\n * Creates new license object with given properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Createlicense\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * parent licensee to which the new license is to be added\n * @param licenseeNumber string\n *\n * license template that the license is created from\n * @param licenseTemplateNumber string\n *\n * For privileged logins specifies transaction for the license creation. For regular logins new\n * transaction always created implicitly, and the operation will be in a separate transaction.\n * Transaction is generated with the provided transactionNumber, or, if transactionNumber is null, with\n * auto-generated number.\n * @param transactionNumber null|string\n *\n * non-null properties will be taken for the new object, null properties will either stay null, or will\n * be set to a default value, depending on property.\n * @param license NetLicensing.License\n *\n * return the newly created license object in promise\n * @returns {Promise}\n */\n create(context, licenseeNumber, licenseTemplateNumber, transactionNumber, license) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(license instanceof License)) {\n throw new TypeError('license must be an instance of License');\n }\n\n CheckUtils.paramNotEmpty(licenseeNumber, 'licenseeNumber');\n CheckUtils.paramNotEmpty(licenseTemplateNumber, 'licenseTemplateNumber');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n license.setProperty('licenseeNumber', licenseeNumber);\n license.setProperty('licenseTemplateNumber', licenseTemplateNumber);\n\n if (transactionNumber) license.setProperty('transactionNumber', transactionNumber);\n\n return Service\n .post(context, Constants.License.ENDPOINT_PATH, license.asPropertiesMap(), License);\n },\n\n\n /**\n * Gets license by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Getlicense\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the license number\n * @param number string\n *\n * return the license in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n return Service\n .get(context, `${Constants.License.ENDPOINT_PATH}/${number}`, {}, License);\n },\n\n /**\n * Returns licenses of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Licenseslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string|null\n *\n * return array of licenses (of all products) or empty array if nothing found in promise.\n * @returns {Promise}\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.License.ENDPOINT_PATH, queryParams, License);\n },\n\n /**\n * Updates license properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Updatelicense\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * license number\n * @param number string\n *\n * transaction for the license update. Created implicitly if transactionNumber is null. In this case the\n * operation will be in a separate transaction.\n * @param transactionNumber string|null\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param license NetLicensing.License\n *\n * return updated license in promise.\n * @returns {Promise}\n */\n update(context, number, transactionNumber, license) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(license instanceof License)) {\n throw new TypeError('license must be an instance of License');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n if (transactionNumber) license.setProperty('transactionNumber', transactionNumber);\n\n return Service\n .post(context, `${Constants.License.ENDPOINT_PATH}/${number}`, license.asPropertiesMap(), License);\n },\n\n /**\n * Deletes license.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/License+Services#LicenseServices-Deletelicense\n *\n * When any license is deleted, corresponding transaction is created automatically.\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * license number\n * @param number string\n *\n * if true, any entities that depend on the one being deleted will be deleted too\n * @param forceCascade boolean\n *\n * return boolean state of delete in promise\n * @returns {Promise}\n */\n delete(context, number, forceCascade) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n const queryParams = { forceCascade: Boolean(forceCascade) };\n\n return Service\n .delete(context, `${Constants.License.ENDPOINT_PATH}/${number}`, queryParams);\n },\n};\n","/**\n * @author Labs64 \n * @license Apache-2.0\n * @link http://netlicensing.io\n * @copyright 2017 Labs64 NetLicensing\n */\n\nimport Context from '../vo/Context';\nimport Licensee from '../entities/Licensee';\nimport CheckUtils from '../util/CheckUtils';\nimport FilterUtils from '../util/FilterUtils';\nimport Constants from '../Constants';\nimport Service from './Service';\nimport ValidationParameters from '../vo/ValidationParameters';\nimport ValidationResults from '../vo/ValidationResults';\n\n/**\n * JS representation of the Licensee Service. See NetLicensingAPI for details:\n * https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services\n *\n * @constructor\n */\n\nexport default {\n /**\n * Creates new licensee object with given properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Createlicensee\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * parent product to which the new licensee is to be added\n * @param productNumber string\n *\n * non-null properties will be taken for the new object, null properties will either stay null, or will\n * be set to a default value, depending on property.\n * @param licensee NetLicensing.Licensee\n *\n * return the newly created licensee object in promise\n * @returns {Promise}\n */\n create(context, productNumber, licensee) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(licensee instanceof Licensee)) {\n throw new TypeError('licensee must be an instance of Licensee');\n }\n\n CheckUtils.paramNotEmpty(productNumber, 'productNumber');\n\n context.setSecurityMode(Constants.BASIC_AUTHENTICATION);\n\n licensee.setProperty('productNumber', productNumber);\n\n return Service\n .post(context, Constants.Licensee.ENDPOINT_PATH, licensee.asPropertiesMap(), Licensee);\n },\n\n /**\n * Gets licensee by its number.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Getlicensee\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the licensee number\n * @param number string\n *\n * return the licensee in promise\n * @returns {Promise}\n */\n get(context, number) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n return Service\n .get(context, `${Constants.Licensee.ENDPOINT_PATH}/${number}`, {}, Licensee);\n },\n\n /**\n * Returns all licensees of a vendor.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Licenseeslist\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * reserved for the future use, must be omitted / set to NULL\n * @param filter string|null\n *\n * array of licensees (of all products) or empty array if nothing found in promise.\n * @returns {Promise}\n */\n list(context, filter) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n const queryParams = {};\n\n if (filter) {\n if (!CheckUtils.isValid(filter)) {\n throw new TypeError(`filter has bad value ${filter}`);\n }\n queryParams.filter = typeof filter === 'string' ? filter : FilterUtils.encode(filter);\n }\n\n return Service\n .list(context, Constants.Licensee.ENDPOINT_PATH, queryParams, Licensee);\n },\n\n /**\n * Updates licensee properties.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Updatelicensee\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * licensee number\n * @param number string\n *\n * non-null properties will be updated to the provided values, null properties will stay unchanged.\n * @param licensee NetLicensing.Licensee\n *\n * return updated licensee in promise.\n * @returns {Promise}\n */\n update(context, number, licensee) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(licensee instanceof Licensee)) {\n throw new TypeError('licensee must be an instance of Licensee');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n return Service\n .post(context, `${Constants.Licensee.ENDPOINT_PATH}/${number}`, licensee.asPropertiesMap(), Licensee);\n },\n\n /**\n * Deletes licensee.See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Deletelicensee\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * licensee number\n * @param number string\n *\n * if true, any entities that depend on the one being deleted will be deleted too\n * @param forceCascade boolean\n *\n * return boolean state of delete in promise\n * @returns {Promise}\n */\n delete(context, number, forceCascade) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n const queryParams = { forceCascade: Boolean(forceCascade) };\n\n return Service\n .delete(context, `${Constants.Licensee.ENDPOINT_PATH}/${number}`, queryParams);\n },\n\n /**\n * Validates active licenses of the licensee. See NetLicensingAPI for details:\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Validatelicensee\n *\n * @param context NetLicensing.Context\n *\n * licensee number\n * @param number string\n *\n * optional validation parameters. See ValidationParameters and licensing model documentation for\n * details.\n * @param validationParameters NetLicensing.ValidationParameters.\n *\n * @returns {Promise}\n */\n validate(context, number, validationParameters) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n if (!(validationParameters instanceof ValidationParameters)) {\n throw new TypeError('validationParameters must be an instance of ValidationParameters');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n\n const queryParams = {};\n\n if (validationParameters.getProductNumber()) {\n queryParams.productNumber = validationParameters.getProductNumber();\n }\n\n if (validationParameters.getLicenseeName()) {\n queryParams.licenseeName = validationParameters.getLicenseeName();\n }\n\n if (validationParameters.getLicenseeSecret()) {\n queryParams.licenseeSecret = validationParameters.getLicenseeSecret();\n }\n\n let pmIndex = 0;\n const parameters = validationParameters.getParameters();\n\n const has = Object.prototype.hasOwnProperty;\n\n Object.keys(parameters).forEach((productModuleName) => {\n queryParams[`productModuleNumber${pmIndex}`] = productModuleName;\n if (!has.call(parameters, productModuleName)) return;\n\n const parameter = parameters[productModuleName];\n\n Object.keys(parameter).forEach((key) => {\n if (has.call(parameter, key)) {\n queryParams[key + pmIndex] = parameter[key];\n }\n });\n pmIndex += 1;\n });\n\n const path = `${Constants.Licensee.ENDPOINT_PATH}/${number}/${Constants.Licensee.ENDPOINT_PATH_VALIDATE}`;\n\n return Service\n .post(context, path, queryParams)\n .then((item) => {\n const data = {};\n const validationResults = new ValidationResults();\n\n item.property.forEach((property) => {\n try {\n data[property.name] = JSON.parse(property.value);\n } catch (e) {\n data[property.name] = property.value;\n }\n });\n\n validationResults\n .setProductModuleValidation(data.productModuleNumber, data)\n .setTtl(Service.getLastHttpRequestInfo().data.ttl);\n\n return validationResults;\n });\n },\n\n\n /**\n * Transfer licenses between licensees.\n * @see https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Transferlicensee\n *\n * determines the vendor on whose behalf the call is performed\n * @param context NetLicensing.Context\n *\n * the number of the licensee receiving licenses\n * @param number string\n *\n * the number of the licensee delivering licenses\n * @param sourceLicenseeNumber string\n *\n * @returns {Promise}\n */\n transfer(context, number, sourceLicenseeNumber) {\n if (!(context instanceof Context)) {\n throw new TypeError('context must be an instance of Context');\n }\n\n CheckUtils.paramNotEmpty(number, 'number');\n CheckUtils.paramNotEmpty(sourceLicenseeNumber, 'sourceLicenseeNumber');\n\n const queryParams = { sourceLicenseeNumber };\n\n const path = `${Constants.Licensee.ENDPOINT_PATH}/${number}/${Constants.Licensee.ENDPOINT_PATH_TRANSFER}`;\n\n return Service\n .post(context, path, queryParams);\n },\n};\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\nvar isAbsoluteURL = require('./../helpers/isAbsoluteURL');\nvar combineURLs = require('./../helpers/combineURLs');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers || {}\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n","'use strict';\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n this.message = 'String contains an invalid character';\n}\nE.prototype = new Error;\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n var str = String(input);\n var output = '';\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars;\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new E();\n }\n block = block << 8 | charCode;\n }\n return output;\n}\n\nmodule.exports = btoa;\n","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%40/gi, '@').\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","'use strict';\n\nvar defaults = require('./../defaults');\nvar utils = require('./../utils');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, {method: 'get'}, this.defaults, config);\n config.method = config.method.toLowerCase();\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n","module.exports = require('./lib/axios');","// Constants\nimport Constants from './Constants';\n// VO\nimport Context from './vo/Context';\n\n// Services\nimport Service from './services/Service';\nimport LicenseeService from './services/LicenseeService';\nimport LicenseService from './services/LicenseService';\nimport LicenseTemplateService from './services/LicenseTemplateService';\nimport PaymentMethodService from './services/PaymentMethodService';\nimport ProductModuleService from './services/ProductModuleService';\nimport ProductService from './services/ProductService';\nimport TokenService from './services/TokenService';\nimport TransactionService from './services/TransactionService';\nimport UtilityService from './services/UtilityService';\n\n// Entities\nimport Country from './entities/Country';\nimport License from './entities/License';\nimport Licensee from './entities/Licensee';\nimport LicenseTemplate from './entities/LicenseTemplate';\nimport PaymentMethod from './entities/PaymentMethod';\nimport Product from './entities/Product';\nimport ProductDiscount from './entities/ProductDiscount';\nimport ProductModule from './entities/ProductModule';\nimport Token from './entities/Token';\nimport Transaction from './entities/Transaction';\nimport LicenseTransactionJoin from './entities/LicenseTransactionJoin';\nimport ValidationParameters from './vo/ValidationParameters';\nimport ValidationResults from './vo/ValidationResults';\n\n// Utils\nimport CastsUtils from './util/CastsUtils';\nimport CheckUtils from './util/CheckUtils';\nimport FilterUtils from './util/FilterUtils';\n\n\n// Create the default instance to be exported\nconst NetLicensing = {\n // Constants\n Constants,\n\n // Expose VO\n Context,\n ValidationParameters,\n ValidationResults,\n\n // Expose Services\n Service,\n LicenseeService,\n LicenseService,\n LicenseTemplateService,\n PaymentMethodService,\n ProductModuleService,\n ProductService,\n TokenService,\n TransactionService,\n UtilityService,\n\n // Expose Entities\n Country,\n License,\n Licensee,\n LicenseTemplate,\n PaymentMethod,\n Product,\n ProductDiscount,\n ProductModule,\n Token,\n Transaction,\n LicenseTransactionJoin,\n\n // Expose Utils\n CastsUtils,\n CheckUtils,\n FilterUtils,\n};\n\nmodule.exports = NetLicensing;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = NetLicensing;\n"],"sourceRoot":""} \ No newline at end of file