opengate-js 12.2.0 → 12.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/bower.json +1 -1
  2. package/dist/{opengate-api-bower-12.2.0.js → opengate-api-bower-12.2.2.js} +31 -26
  3. package/dist/opengate-api-bower-12.2.2.js.map +1 -0
  4. package/dist/{opengate-api-bower-12.2.0.min.js → opengate-api-bower-12.2.2.min.js} +6 -6
  5. package/dist/opengate-api-bower-12.2.2.min.js.map +1 -0
  6. package/dist/src/searching/builder/DevicesPlansSearchBuilder.js +7 -7
  7. package/dist/src/searching/builder/DevicesPlansSearchBuilder.js.map +1 -1
  8. package/dist/src/searching/builder/PlansSearchBuilder.js +7 -7
  9. package/dist/src/searching/builder/PlansSearchBuilder.js.map +1 -1
  10. package/dist/src/users/Users.js +1 -1
  11. package/dist/src/users/Users.js.map +1 -1
  12. package/dist/src/util/searchingFields/FieldFinder.js +3 -1
  13. package/dist/src/util/searchingFields/FieldFinder.js.map +1 -1
  14. package/dist/src/util/searchingFields/IotFields.js +3 -0
  15. package/dist/src/util/searchingFields/IotFields.js.map +1 -1
  16. package/docs/ast/source/searching/builder/DevicesPlansSearchBuilder.js.json +586 -496
  17. package/docs/ast/source/searching/builder/PlansSearchBuilder.js.json +586 -496
  18. package/docs/ast/source/users/Users.js.json +634 -634
  19. package/docs/ast/source/util/searchingFields/FieldFinder.js.json +20045 -19717
  20. package/docs/ast/source/util/searchingFields/IotFields.js.json +1007 -32
  21. package/docs/class/src/searching/builder/DevicesPlansSearchBuilder.js~DevicesPlansSearchBuilder.html +37 -2
  22. package/docs/class/src/searching/builder/PlansSearchBuilder.js~PlansSearchBuilder.html +37 -2
  23. package/docs/class/src/searching/builder/SearchBuilder.js~SearchBuilder.html +2 -2
  24. package/docs/class/src/searching/builder/SearchWithSummaryBuilder.js~SearchWithSummaryBuilder.html +1 -1
  25. package/docs/class/src/util/searchingFields/FieldFinder.js~FieldFinder.html +6 -6
  26. package/docs/coverage.json +5 -5
  27. package/docs/dump.json +36 -36
  28. package/docs/file/src/searching/builder/DevicesPlansSearchBuilder.js.html +4 -4
  29. package/docs/file/src/searching/builder/PlansSearchBuilder.js.html +4 -4
  30. package/docs/file/src/users/Users.js.html +1 -1
  31. package/docs/file/src/util/searchingFields/FieldFinder.js.html +3 -1
  32. package/docs/file/src/util/searchingFields/IotFields.js.html +13 -0
  33. package/docs/identifiers.html +1 -1
  34. package/docs/manual/index.html +1 -1
  35. package/docs/package.json +1 -1
  36. package/docs/source.html +229 -229
  37. package/docs/variable/index.html +2 -2
  38. package/package.json +1 -1
  39. package/src/searching/builder/DevicesPlansSearchBuilder.js +4 -4
  40. package/src/searching/builder/PlansSearchBuilder.js +4 -4
  41. package/src/users/Users.js +1 -1
  42. package/src/util/searchingFields/FieldFinder.js +3 -1
  43. package/src/util/searchingFields/IotFields.js +13 -0
  44. package/dist/opengate-api-bower-12.2.0.js.map +0 -1
  45. package/dist/opengate-api-bower-12.2.0.min.js.map +0 -1
@@ -32,9 +32,9 @@ this._subscriberKeys.forEach(function(e){s._obj[e].forEach(function(t){c[t._inde
32
32
  if("number"!=typeof e)throw new Error("Parameter actionsDelay must be a number");return this._actionsDelay=e,this}},{key:"withCondition",value:function(e){return this._condition=e||{},this}},{key:"withActions",value:function(e){return this._actions=e||{},this}},{key:"withParameters",value:function(e){return this._parameters=e||[],this}},{key:"_composeElement",value:function(){return{identifier:this._identifier,name:this._name,active:this._active,mode:this._mode,type:this._type,severity:this._severity,description:this._description?this._description:void 0,parameters:this._parameters,condition:"EASY"===this._mode?this._condition:void 0,actionsDelay:this._actionsDelay,actions:"EASY"===this._mode?this._actions:void 0,javascript:"ADVANCED"===this._mode?this._javascript:void 0}}},{key:"_checkRequiredParameters",value:function(e){if(e){if(void 0===this._identifier||void 0===this._organization||void 0===this._channel||void 0===this._active||void 0===this._mode)throw new Error("Parameters organization, channel, active, mode and identifier must be defined")}else if(void 0===this._name||void 0===this._organization||void 0===this._channel||void 0===this._active||void 0===this._mode)throw new Error("Parameters organization, channel, active, mode and name must be defined")}},{key:"_buildURL",value:function(){return"rules/"+this._resource+"/"+this._organization+"/channels/"+this._channel+"/"}},{key:"create",value:function(){return this._checkRequiredParameters(),this._doNorthPost(this._buildURL(),this._composeElement())}},{key:"update",value:function(){return this._checkRequiredParameters(!0),this._doNorthPut(this._buildURL()+this._identifier,this._composeElement())}},{key:"updateParameters",value:function(e){if(void 0===this._identifier||void 0===this._organization||void 0===this._channel)throw new Error("Parameters organization, channel and identifier must be defined");return this._doNorthPut(this._buildURL()+this._identifier+"/parameters",e||this._parameters||[])}},{key:"delete",value:function(){if(void 0===this._identifier||void 0===this._organization||void 0===this._channel)throw new Error("Parameters organization, channel and name must be defined");var e=h.default.defer(),t=e.promise;return this._ogapi.Napi.delete(this._buildURL()+this._identifier).then(function(t){200===t.statusCode?e.resolve({statusCode:t.statusCode}):e.reject({errors:t.errors,statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}}]),t}(c.default);r.default=p,t.exports=r.default},{"../provision/BaseProvision":235,"./_RuleCondition":255,"./_RuleNotification":256,q:109}],252:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../GenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"rules/catalog","rulesTemplate","Rule templates not found")}return i(t,e),o(t,[{key:"getTemplates",value:function(){return this._execute()}},{key:"_composeUrl",value:function(){return this._baseUrl}}]),t}(s.default);r.default=c,t.exports=r.default},{"../GenericFinder":138}],253:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../GenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"rules/provision/organizations","rules","Rule configurations not found")}return i(t,e),o(t,[{key:"findByOrganizationAndChannelAndName",value:function(e,t,r){var n=this;return n._organization=e,n._channel=t,n._name=r,this._execute()}},{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._organization+"/channels/"+this._channel+"/"+this._name}}]),t}(s.default);r.default=c,t.exports=r.default},{"../GenericFinder":138}],254:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../GenericFinder"),c=n(s),l=e("q"),f=n(l),d=e("http-status-codes"),h=n(d),p=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"rules"),this._jsHeaders={accept:"application/javascript"},this._mdHeaders={accept:"text/markdown"}}return o(t,e),a(t,[{key:"getdDummyFunctions",value:function(){return this._setExtraHeaders(this._jsHeaders),this._id="js/dummyFunctions",this._execute()}},{key:"getDocPrivateJavascriptFunctions",value:function(){return this._setExtraHeaders(this._mdHeaders),this._id="doc/private/javascriptFunctions",this._execute()}},{key:"getDocJavascriptFunctions",value:function(){return this._setExtraHeaders(this._mdHeaders),this._id="doc/javascriptFunctions",this._execute()}},{key:"_execute",value:function(){var e=f.default.defer(),t=e.promise,r=this._error_not_found;return this._api.get(this._composeUrl(),void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(t){204===t.statusCode?e.reject({error:r,statusCode:h.default.NOT_FOUND}):e.resolve({data:t,statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}}]),t}(c.default);r.default=p,t.exports=r.default},{"../GenericFinder":138,"http-status-codes":68,q:109}],255:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("./RuleConfigurations"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),u=function(){function e(t,r){if(n(this,e),t.constructor!==a.default)throw new Error("Parent must be a RuleConfigurations");this._ruleConfiguration=t,this._condition=r}return i(e,[{key:"setDelay",value:function(e){if("number"!=typeof e||typeof e<1)throw new Error("Parameter delay must be typeof number and higher than -1");return void 0===this._condition.delay?console.warn("Parameter delay cannot be setted for this condition"):this._condition.delay=1e3*e,this}},{key:"deactivateDelay",value:function(){return void 0===this._condition.delay?console.warn("Parameter delay cannot be setted for this condition"):this._condition.delay=-1,this}},{key:"setParameterValue",value:function(e,t){var r=this;if(this._condition.parameters&&this._condition.parameters.length>0){for(var n in this._condition.parameters){var i=this._condition.parameters[n];if(i.name===e){if(void 0===i.value)throw new Error("Value not allowed for parameter "+e+" in condition "+this._condition.name);return i.value=t||"",r}}throw new Error("Parameter "+e+" not exists for condition "+this._condition.name)}}},{key:"parent",value:function(){return this._ruleConfiguration}}]),e}();r.default=u,t.exports=r.default},{"./RuleConfigurations":251}],256:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("./RuleConfigurations"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),u=function(){function e(t,r){if(n(this,e),t.constructor!==a.default)throw new Error("Parent must be a RuleConfigurations");this._ruleConfiguration=t,this._notification=r}return i(e,[{key:"setEnabled",value:function(e){if("boolean"!=typeof e)throw new Error("Bearer enabled must be true or false");return this._notification.enabled=e,this}},{key:"setBearerRecipients",value:function(e,t){var r=this;if(this._notification.bearers&&this._notification.bearers.length>0){for(var n in this._notification.bearers){var i=this._notification.bearers[n];if(i.name===e)return i.recipients=t,r}console.warn("Bearer "+e+" not exists for notification "+this._notification.name)}else console.warn("There is no bearers for notification "+this._notification.name);return r}},{key:"enableBearer",value:function(e){var t=this;if(this._notification.bearers&&this._notification.bearers.length>0){for(var r in this._notification.bearers){var n=this._notification.bearers[r];if(n.name===e)return n.enabled=!0,t}console.warn("Bearer "+e+" not exists for notification "+this._notification.name)}else console.warn("There is no bearers for notification "+this._notification.name);return t}},{key:"disableBearer",value:function(e){var t=this;if(this._notification.bearers&&this._notification.bearers.length>0){for(var r in this._notification.bearers){var n=this._notification.bearers[r];if(n.name===e)return n.enabled=!1,t}console.warn("Bearer "+e+" not exists for notification "+this._notification.name)}else console.warn("There is no bearers for notification "+this._notification.name);return t}},{key:"parent",value:function(){return this._ruleConfiguration}}]),e}();r.default=u,t.exports=r.default},{"./RuleConfigurations":251}],257:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./Search"),c=n(s),l=e("q"),f=n(l),d=function(e){function t(e,r,n,o,a,s,c,l,f){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,n,o,a,s,c,l,f)}return o(t,e),a(t,[{key:"execute",value:function(){var e=f.default.defer(),t=e.promise,r=this._getUrlParameters();return this._ogapi.Napi.post(this._resource,this._filter(),this._timeout,this._getExtraHeaders(),r).then(function(t){var r=t.body,n=t.statusCode;200===n&&(r.assets=r.entities,delete r.entities),e.resolve({data:r,statusCode:n})}).catch(function(t){e.reject(t)}),t}}]),t}(c.default);r.default=d,t.exports=r.default},{"./Search":262,q:109}],258:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("q"),u=n(a),s=e("merge"),c=(n(s),function(){function e(t,r,n,o){if(i(this,e),this.constructor===e)throw new Error("Cannot construct Abstract instances directly");if("function"!=typeof this._filter)throw new Error("Must override method: filter");this._timeout="number"!=typeof n?t.Napi._options.timeout:n,this._ogapi=t,this._resource=r,this._headers=void 0,this._urlParameters=void 0,this._serviceBaseURL=o}return o(e,[{key:"_getExtraHeaders",value:function(){return this._headers}},{key:"_setExtraHeaders",value:function(e){if(this._headers)for(var t=Object.keys(e),r=0;r<t.length;r++){var n=t[r];this._headers[n]=e[n]}else this._headers=e}},{key:"_getUrlParameters",value:function(){return this._urlParameters}},{key:"_setUrlParameters",value:function(e){if(this._urlParameters)for(var t=Object.keys(e),r=0;r<t.length;r++){var n=t[r];this._urlParameters[n]=e[n]}else this._urlParameters=e}},{key:"execute",value:function(){var e=u.default.defer(),t=e.promise;return this._ogapi.Napi.post(this._resource,this._filter(),this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(t){var r=t.body,n=t.statusCode;e.resolve({data:r,statusCode:n})}).catch(function(t){e.reject(t)}),t}},{key:"downloadCsv",value:function(){var e=u.default.defer(),t=e.promise,r=this._filter();return r&&r.limit&&delete r.limit,this._setExtraHeaders({Accept:"text/plain"}),this._ogapi.Napi.post(this._resource,r,this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(t){var r=t,n=t.statusCode;e.resolve({data:r,statusCode:n})}).catch(function(t){e.reject(t)}),t}},{key:"_asyncPagingFilter",value:function(){var e=this._filter();return e.limit&&e.limit.size?e.limit.start=1:e.limit={size:1e3,start:1},e}},{key:"cancelAsyncPaging",value:function(e){"string"==typeof e&&e.length>0?this.cancel=e:this.cancel=!0}},{key:"_loadData",value:function(e){function t(){if(r.cancel||"string"==typeof r.cancel){var a="string"==typeof r.cancel?r.cancel:"Cancel process";n.reject({data:a,statusCode:403})}else r._ogapi.Napi.post(r._resource,i,r._timeout,r._getExtraHeaders(),r._getUrlParameters(),r._getServiceBaseURL()).then(function(r){var a=r.statusCode,u=r.body;if(!u&&r.text)try{var s=JSON.parse(r.text);s&&(u=s)}catch(e){console.error("Impossible to parse text from response")}if(200===a||200===a){o=!0;var c=u.data?u.data[e]:u[e];n.notify(c),c.length===i.limit.size?(i.limit.start+=1,t()):n.resolve({data:"DONE",statusCode:200})}else o?n.resolve({data:"DONE",statusCode:200}):n.reject({data:u,statusCode:a})}).catch(function(e){n.reject(e)})}var r=this,n=u.default.defer(),i=r._asyncPagingFilter(),o=!1;return t(),n.promise}},{key:"executeWithAsyncPaging",value:function(e){var t=u.default.defer(),r=t.promise;return this._loadData(e).then(function(e){t.resolve(e)},null,function(e){t.notify(e)}).catch(function(e){t.reject(e)}),r}},{key:"_getServiceBaseURL",value:function(){return this._serviceBaseURL}}]),e}());r.default=c,t.exports=r.default},{merge:104,q:109}],259:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./Search"),c=n(s),l=e("q"),f=n(l),d=function(e){function t(e,r,n,o,a,s,c,l,f){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,n,o,a,s,c,l,f)}return o(t,e),a(t,[{key:"execute",value:function(){var e=f.default.defer(),t=e.promise,r=this._getUrlParameters();return this._ogapi.Napi.post(this._resource,this._filter(),this._timeout,this._getExtraHeaders(),r).then(function(t){var n=t.body,i=t.statusCode;if(200===i&&n.entities){if(n.devices=n.entities,n.devices.length>0){var o=!1,a=r&&r.flattened||!1;for(o=0;o<n.devices.length;o++)if(a){if(n.devices[o]["device.identifier"]){var u=n.devices[o]["device.identifier"];(!u._value||u._value&&!u._value._current)&&delete n.devices[o]["device.identifier"]}}else n.devices[o].device&&n.devices[o].device.identifier&&!n.devices[o].device.identifier._current&&delete n.devices[o].device.identifier}delete n.entities}e.resolve({data:n,statusCode:i})}).catch(function(t){e.reject(t)}),t}}]),t}(c.default);r.default=d,t.exports=r.default},{"./Search":262,q:109}],260:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./Search"),c=n(s),l=e("q"),f=n(l),d=function(e){function t(e,r,n,o,a,s,c,l,f){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,n,o,a,s,c,l,f)}return o(t,e),a(t,[{key:"execute",value:function(){var e=f.default.defer(),t=e.promise,r=this._getUrlParameters();return this._ogapi.Napi.post(this._resource,this._filter(),this._timeout,this._getExtraHeaders(),r).then(function(t){var n=t.body,i=t.statusCode;if(200===i&&n.entities&&n.entities.length>0){var o=!1,a=r&&r.flattened||!1;for(o=0;o<n.entities.length;o++)if(a){if(n.entities[o]["device.identifier"]){var u=n.entities[o]["device.identifier"];(!u._value||u._value&&!u._value._current)&&delete n.entities[o]["device.identifier"]}}else n.entities[o].device&&n.entities[o].device.identifier&&!n.entities[o].device.identifier._current&&delete n.entities[o].device.identifier}e.resolve({data:n,statusCode:i})}).catch(function(t){e.reject(t)}),t}}]),t}(c.default);r.default=d,t.exports=r.default},{"./Search":262,q:109}],261:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("./../util/Expression"),a=(function(e){e&&e.__esModule}(o),function(){function e(){n(this,e),this._filterTemplate={filter:{}}}return i(e,[{key:"or",value:function(){void 0===this._filterTemplate.filter.or&&(this._filterTemplate.filter.or=[]),void 0!==this._filterTemplate.filter.and&&(console.warn('The filter not allow both elements [and,or], the item "and" are going to be removed.'),delete this._filterTemplate.filter.and);for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n=0;n<t.length;n++)this._filterTemplate.filter.or.push(t[n]);return this}},{key:"and",value:function(){void 0===this._filterTemplate.filter.and&&(this._filterTemplate.filter.and=[]),void 0!==this._filterTemplate.filter.or&&(console.warn('The filter not allow both elements [and,or], the item "or" are going to be removed.'),delete this._filterTemplate.filter.or);for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n=0;n<t.length;n++)this._filterTemplate.filter.and.push(t[n]);return this}}]),e}());r.default=a,t.exports=r.default},{"./../util/Expression":337}],262:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./BaseSearch"),c=n(s),l=e("merge"),f=n(l),d=function(e){function t(e,r,n,o,a,s,c,l,d){void 0===o&&(o={limit:{}}),i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"search"+r,l),this._setUrlParameters(d),this._postObj=(0,f.default)(n,o,s,c),"object"==typeof a&&(this._postObj=(0,f.default)(this._postObj,a))}return o(t,e),a(t,[{key:"_filter",value:function(){return this._postObj}}]),t}(c.default);r.default=d,t.exports=r.default},{"./BaseSearch":258,merge:104}],263:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("./../util/SelectElement"),a=(function(e){e&&e.__esModule}(o),function(){function e(){n(this,e),this._selectTemplate={select:[]}}return i(e,[{key:"add",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n=0;n<t.length;n++){var i=t[n],o=this._selectTemplate.select;if(0===o.length)this._selectTemplate.select.push(i);else{for(var a=!1,u=0;u<o.length;u++){var s=o[u];if(s.name===i.name){a=!0;for(var c=i.fields,l=0;l<c.length;l++){for(var f=c[n],d=!1,h=0;h<s.fields.length;h++)s.fields[h].field===f.field&&(d=!0,f.alias&&(s.fields[h].alias=f.alias));d||this._selectTemplate.select[u].fields.push(f)}}}a||this._selectTemplate.select.push(i)}}return this}}]),e}());r.default=a,t.exports=r.default},{"./../util/SelectElement":339}],264:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./Search"),c=n(s),l=e("q"),f=n(l),d=function(e){function t(e,r,n,o,a,s){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/catalog"+r,n,null,null,o),this._contentType=a,this._customFilters=s}return o(t,e),a(t,[{key:"execute",value:function(){var e=this,t=[],r=f.default.defer(),n=r.promise,i=e._content(e._contentType),o=e._customFilters&&e._customFilters.entityType,a=Object.keys(e._customFilters).length,u=a>1||1===a&&!o,s={};switch(o?s[o]=i[o]:s=i,e._contentType){case"operationalStatus":for(var c in s)s[c].forEach(function(r){(!e._customFilters.id||e._customFilters.id&&e._customFilters.id===r)&&t.push({entityType:c,id:r})});break;case"administrativeState":var l=function(e){var r=e;r.entityType=d,t.push(r)};for(var d in s){var h=s[d];for(var p in h)if(u){for(var m in e._customFilters)if(h[p][m]===e._customFilters[m]){l(h[p]);break}}else l(h[p])}break;case"fieldsDefinition":case"communicationsModuleType":var y=u&&e._customFilters.type;if(void 0===y){r.resolve({error:"Filters not allowed",statusCode:400});break}var v=y?s[y]:s;t=v;break;case"userProfile":for(var _ in s)(!e._customFilters.id||e._customFilters.id&&e._customFilters.id===_)&&s[_].length>0&&t.push({id:_,managed:s[_]});break;case"serviceGroups":o&&(t=s[o]);break;case"allowedResourceType":for(var g in s)(!e._customFilters.type||e._customFilters.type&&s[g].types.indexOf(e._customFilters.type)>-1)&&t.push(s[g].resourceType);break;case"ticketSeverity":case"ticketPriority":case"ticketStatus":case"ruleConfigurationSeverity":case"ruleMode":case"ruleType":case"ioTDatastreamPeriod":case"ioTDatastreamAccess":case"resourceType":case"countryCodes":case"timezones":case"userLanguages":case"ioTDatastreamStoragePeriod":if(y){r.resolve({error:"Filters not supported",statuscode:400});break}t=t.concat(s);break;default:r.resolve({data:{},statusCode:400})}if(t&&Object.keys(t).length>0){var b={};b[e._contentType]=t,r.resolve({data:b,statusCode:200})}else r.resolve({data:{},statusCode:204});return n}},{key:"_content",value:function(e){return{ticketSeverity:["CRITICAL","URGENT","WARNING","NORMAL"],ticketPriority:["MAJOR","MINOR","CRITICAL","BLOCKER"],ticketStatus:["CREATED","ASSIGNED","ANSWERED","RESTORED","RESOLVED","CLOSED"],serviceGroups:{ASSET:["noUpdate","emptyServiceGroup","emptyServiceGroup_onSession","emptyServiceGroup_onDemand","level1SecurityServiceGroup","level2SecurityServiceGroup","level3SecurityServiceGroup","trustedNoneSecurityServiceGroup","trustedNoneSecurityServiceGroup_onDemand","trustedLevel1SecurityServiceGroup","trustedLevel2SecurityServiceGroup","trustedLevel3SecurityServiceGroup"],SUBSCRIBER:["emptyServiceGroup"],SUBSCRIPTION:["emptyServiceGroup"],GATEWAY:["noUpdate","emptyServiceGroup","emptyServiceGroup_onSession","emptyServiceGroup_onDemand","level1SecurityServiceGroup","level2SecurityServiceGroup","level3SecurityServiceGroup","trustedNoneSecurityServiceGroup","trustedNoneSecurityServiceGroup_onDemand","trustedLevel1SecurityServiceGroup","trustedLevel2SecurityServiceGroup","trustedLevel3SecurityServiceGroup"]},administrativeState:{ASSET:[{id:"BANNED",description:"Asset banned, It means that received information of this asset is not going to be collected"},{id:"DELETED",description:"Asset removed from available stock"},{id:"IN_MAINTENANCE",description:"Asset in maintenance"},{id:"IN_STOCK",description:"Asset in stock"},{id:"IN_TRANSIT",description:"Asset in transit"},{id:"IN_USE",description:"Asset in use"},{id:"MISSING",description:"Asset missing"},{id:"ORDERED",description:"Asset ordered"},{id:"READY",description:"Asset ready for installation"},{id:"RETIRED",description:"Field entity withdrawal"}],GATEWAY:[{id:"REQUESTED",description:"Entity requested to the supplier"},{id:"READY",description:"Entity ready for installation"},{id:"REPAIR",description:"Entity under repair"},{id:"TESTING",description:"Entity in tests"},{id:"ACTIVE",description:"Field deployed entity"},{id:"SUSPENDED",description:"Suspended its operation"},{id:"DELETED",description:"Entity removed from available stock"},{id:"RETIRED",description:"Field entity withdrawal"},{id:"BANNED",description:"Entity banned, It means that received information of this entity is not going to be collected"}],COMMUNICATIONS_MODULE:[{id:"REQUESTED",description:"Entity requested to the supplier"},{id:"READY",description:"Entity ready for installation"},{id:"REPAIR",description:"Entity under repair"},{id:"TESTING",description:"Entity in tests"},{id:"ACTIVE",description:"Field deployed entity"},{id:"SUSPENDED",description:"Suspended its operation"},{id:"DELETED",description:"Entity removed from available stock"},{id:"RETIRED",description:"Field entity withdrawal"},{id:"BANNED",description:"Entity banned, It means that received information of this entity is not going to be collected"}],SUBSCRIBER:[{id:"REQUESTED",description:"Entity requested to the supplier"},{id:"READY",description:"Entity ready for installation"},{id:"REPAIR",description:"Entity under repair"},{id:"TESTING",description:"Entity in tests"},{id:"ACTIVE",description:"Field deployed entity"},{id:"SUSPENDED",
33
33
  description:"Suspended its operation"},{id:"DELETED",description:"Entity removed from available stock"},{id:"RETIRED",description:"Field entity withdrawal"},{id:"BANNED",description:"Entity banned, It means that received information of this entity is not going to be collected"}],SUBSCRIPTION:[{id:"REQUESTED",description:"Entity requested to the supplier"},{id:"READY",description:"Entity ready for installation"},{id:"REPAIR",description:"Entity under repair"},{id:"TESTING",description:"Entity in tests"},{id:"ACTIVE",description:"Field deployed entity"},{id:"SUSPENDED",description:"Suspended its operation"},{id:"DELETED",description:"Entity removed from available stock"},{id:"RETIRED",description:"Field entity withdrawal"},{id:"BANNED",description:"Entity banned, It means that received information of this entity is not going to be collected"}],CERTIFICATE:[{id:"NOT_ACTIVE",description:"NOT_ACTIVE"},{id:"ACTIVE",description:"ACTIVE"},{id:"REVOKED",description:"REVOKED"},{id:"EXPIRED",description:"EXPIRED"}]},operationalStatus:{ASSET:["UNKNOWN","NORMAL","ALARM","DOWN","SAFE_MODE","TAMPER","TEST"],GATEWAY:["UNKNOWN","NORMAL","ALARM","DOWN","SAFE_MODE","TAMPER","TEST"],COMMUNICATIONS_MODULE:["UNKNOWN","STOPPED","STARTING","RUNNING","STOPPING","ERROR"]},communicationsModuleType:{ADSL:{COMMUNICATIONS_MODULE:{mandatory:["generatedEntityKey"],optional:["IMEI","HARDWARE","SOFTWARE"]},SUBSCRIPTION:{mandatory:[],optional:["generatedEntityKey","subscriptionName","administrativeState","description","ADDRESS","HOME_OPERATOR","LOCATION"]}},CAN:{COMMUNICATIONS_MODULE:{mandatory:["entityKey"],optional:[]}},ETH:{COMMUNICATIONS_MODULE:{mandatory:["generatedEntityKey"],optional:["HARDWARE","SOFTWARE"]},SUBSCRIPTION:{mandatory:["generatedEntityKey"],optional:["subscriptionName","description","administrativeState","ADDRESS"]}},GENERIC:{COMMUNICATIONS_MODULE:{mandatory:["generatedEntityKey"],optional:["IMEI","HARDWARE","SOFTWARE"]},SUBSCRIPTION:{mandatory:[],optional:["generatedEntityKey","subscriptionName","description","administrativeState","IMSI","ADDRESS","HOME_OPERATOR","REGISTER_OPERATOR","MSISDN","LOCATION"]},SUBSCRIBER:{mandatory:[],optional:["generatedEntityKey","subscriberName","description","administrativeState","ICC","SERIAL_NUMBER"]}},GSM:{COMMUNICATIONS_MODULE:{mandatory:["generatedEntityKey"],optional:["IMEI","HARDWARE","SOFTWARE"]},SUBSCRIPTION:{mandatory:[],optional:["generatedEntityKey","subscriptionName","description","administrativeState","IMSI","ADDRESS","HOME_OPERATOR","REGISTER_OPERATOR","MSISDN","LOCATION"]},SUBSCRIBER:{mandatory:[],optional:["generatedEntityKey","subscriberName","description","administrativeState","ICC"]}},HAN:{COMMUNICATIONS_MODULE:{mandatory:["entityKey"],optional:[]}},I2C:{COMMUNICATIONS_MODULE:{mandatory:["entityKey"],optional:[]}},LOWPAN:{COMMUNICATIONS_MODULE:{mandatory:["generatedEntityKey"],optional:["HARDWARE","SOFTWARE"]},SUBSCRIPTION:{mandatory:["generatedEntityKey"],optional:["administrativeState","subscriptionName","description"]}},LTE_M:{COMMUNICATIONS_MODULE:{mandatory:["generatedEntityKey"],optional:["IMEI","HARDWARE","SOFTWARE"]},SUBSCRIPTION:{mandatory:[],optional:["generatedEntityKey","subscriptionName","administrativeState","description","IMSI","ADDRESS","HOME_OPERATOR","REGISTER_OPERATOR","MSISDN","LOCATION","RADIUS_USERNAME","RADIUS_PASSWORD","RADIUS_FRAMED_IP_NETMASK","MSISDN_VOICE"]},SUBSCRIBER:{mandatory:[],optional:["generatedEntityKey","subscriberName","administrativeState","description","ICC"]}},MESH:{COMMUNICATIONS_MODULE:{mandatory:["generatedEntityKey"],optional:["HARDWARE","SOFTWARE"]}},MOBILE:{COMMUNICATIONS_MODULE:{mandatory:["generatedEntityKey"],optional:["IMEI","HARDWARE","SOFTWARE"]},SUBSCRIPTION:{mandatory:[],optional:["generatedEntityKey","subscriptionName","administrativeState","description","IMSI","ADDRESS","HOME_OPERATOR","REGISTER_OPERATOR","MSISDN","LOCATION","RADIUS_USERNAME","RADIUS_PASSWORD","RADIUS_FRAMED_IP_NETMASK","MSISDN_VOICE","SUBSCRIPTION_ICC"]},SUBSCRIBER:{mandatory:[],optional:["generatedEntityKey","subscriberName","administrativeState","description","ICC"]}},MULTIMOBILE:{COMMUNICATIONS_MODULE:{mandatory:["generatedEntityKey"],optional:["IMEI","HARDWARE","SOFTWARE"]},SUBSCRIPTION:{mandatory:[],optional:["generatedEntityKey","subscriptionName","administrativeState","description","IMSI","ADDRESS","HOME_OPERATOR","REGISTER_OPERATOR","MSISDN","LOCATION","RADIUS_USERNAME","RADIUS_PASSWORD","RADIUS_FRAMED_IP_NETMASK","MSISDN_VOICE","SUBSCRIPTION_ICC"]},SUBSCRIBER:{mandatory:[],optional:["generatedEntityKey","subscriberName","administrativeState","description","ICC"]}},NARROWBAND:{COMMUNICATIONS_MODULE:{mandatory:["generatedEntityKey"],optional:["IMEI","HARDWARE","SOFTWARE"]},SUBSCRIPTION:{mandatory:["generatedEntityKey"],optional:["administrativeState","subscriptionName","description","IMSI","ADDRESS","HOME_OPERATOR","REGISTER_OPERATOR","LOCATION"]},SUBSCRIBER:{mandatory:["generatedEntityKey"],optional:["administrativeState","subscriberName","description","ICC"]}},PLC:{COMMUNICATIONS_MODULE:{mandatory:["generatedEntityKey"],optional:["HARDWARE","SOFTWARE"]},SUBSCRIPTION:{mandatory:["generatedEntityKey"],optional:["administrativeState","subscriptionName","description"]}},RS232:{COMMUNICATIONS_MODULE:{mandatory:["entityKey"],optional:[]}},RS422:{COMMUNICATIONS_MODULE:{mandatory:["entityKey"],optional:[]}},RS485:{COMMUNICATIONS_MODULE:{mandatory:["entityKey"],optional:[]}},SIGFOX:{COMMUNICATIONS_MODULE:{mandatory:["entityKey"],optional:["PAC"]},SUBSCRIPTION:{mandatory:["generatedEntityKey","subscriptionName","HOME_OPERATOR","administrativeState","description","SIGFOX_DEVICE_TYPE"]}},ZIGBEE:{COMMUNICATIONS_MODULE:{mandatory:["generatedEntityKey"],optional:["HARDWARE","SOFTWARE"]},SUBSCRIPTION:{mandatory:["generatedEntityKey"],optional:["administrativeState","subscriptionName","description"]}}},ruleMode:["EASY","ADVANCED"],ruleType:["DATASTREAM","OPERATION","EVENT"],ruleConfigurationSeverity:["INFORMATIVE","URGENT","CRITICAL"],userProfile:{root:["admin_domain","admin","advanced","viewer","super_admin_domain"],super_admin_domain:["admin_domain","admin","advanced","viewer"],admin_domain:["admin_domain","admin","advanced","viewer"],admin:["admin","advanced","viewer"],advanced:[],viewer:[]},ioTDatastreamAccess:["READ","WRITE"],ioTDatastreamStoragePeriod:["SECONDS","MINUTES","HOURS","DAYS","MONTHS","YEARS","NEVER"],ioTDatastreamPeriod:["PULSE","CUMULATIVE","INSTANT"],resourceType:[{identifier:"entity.asset"},{identifier:"entity.device"},{identifier:"ticket"}],allowedResourceType:[{resourceType:"entity.asset",types:["entity","asset"]},{resourceType:"entity.device",types:["entity","device"]},{resourceType:"entity.subscriber",types:["entity","subscriber"]},{resourceType:"entity.subscription",types:["entity","subscription"]},{resourceType:"ticket",types:["ticket"]},{resourceType:"organization",types:["organization"]},{resourceType:"channel",types:["channel"]}],fieldsDefinition:{string:{description:"Text based value",subtype:["text","password"]},boolean:{description:"Boolean based value",subtype:[]},calendar:{description:"Format is described in the ISO 8601 or in http://www.w3.org/TR/NOTE-datetime",subtype:["datetime","date","time"]},address:{description:"Network address value",subtype:["ip","ipv4","ipv6","mac48"]},number:{description:"Numeric value",subtype:["integer","float","percentage"]},enumeration:{description:"Choice list values",subtype:["string","number"]},array:{description:"Array of values",subtype:["string","number"]},coordinates:{description:"Object indicating coordinates and timestamp in geotime subtype",subtype:["geo","geotime","geojson"]},topology:{description:"Object indicating relations",subtype:["path","tree (not supported yet)"]},object:{description:"Not yet supported. For future uses only",subtype:[]}},userLanguages:[{code:"es",language:"Español/Spanish"},{code:"en",language:"Inglés/English"}],countryCodes:[{code:"AD",country:"Andorra",zone:"Europe/Andorra"},{code:"AE",country:"United Arab Emirates",zone:"Asia/Dubai"},{code:"AF",country:"Afghanistan",zone:"Asia/Kabul"},{code:"AG",country:"Antigua and Barbuda",zone:"America/Antigua"},{code:"AI",country:"Anguilla",zone:"America/Anguilla"},{code:"AL",country:"Albania",zone:"Europe/Tirane"},{code:"AM",country:"Armenia",zone:"Asia/Yerevan"},{code:"AN",country:"Netherlands Antilles",zone:"Netherlands Antilles"},{code:"AO",country:"Angola",zone:"Africa/Luanda"},{code:"AQ",country:"Antarctica",zone:"Antarctica/McMurdo"},{code:"AR",country:"Argentina",zone:"America/Argentina/Buenos_Aires"},{code:"AS",country:"American Samoa",zone:"Pacific/Pago_Pago"},{code:"AT",country:"Austria",zone:"Europe/Vienna"},{code:"AU",country:"Australia",zone:"Australia/Lord_Howe"},{code:"AW",country:"Aruba",zone:"America/Aruba"},{code:"AX",country:"Aland Islands",zone:"Europe/Mariehamn"},{code:"AZ",country:"Azerbaijan",zone:"Asia/Baku"},{code:"BA",country:"Bosnia and Herzegovina",zone:"Europe/Sarajevo"},{code:"BB",country:"Barbados",zone:"America/Barbados"},{code:"BD",country:"Bangladesh",zone:"Asia/Dhaka"},{code:"BE",country:"Belgium",zone:"Europe/Brussels"},{code:"BF",country:"Burkina Faso",zone:"Africa/Ouagadougou"},{code:"BG",country:"Bulgaria",zone:"Europe/Sofia"},{code:"BH",country:"Bahrain",zone:"Asia/Bahrain"},{code:"BI",country:"Burundi",zone:"Africa/Bujumbura"},{code:"BJ",country:"Benin",zone:"Africa/Porto-Novo"},{code:"BL",country:"Saint Barthélemy",zone:"America/St_Barthelemy"},{code:"BM",country:"Bermuda",zone:"Atlantic/Bermuda"},{code:"BN",country:"Brunei",zone:"Asia/Brunei"},{code:"BO",country:"Bolivia",zone:"America/La_Paz"},{code:"BQ",country:"Bonaire, Saint Eustatius and Saba",zone:"America/Kralendijk"},{code:"BR",country:"Brazil",zone:"America/Noronha"},{code:"BS",country:"Bahamas",zone:"America/Nassau"},{code:"BT",country:"Bhutan",zone:"Asia/Thimphu"},{code:"BV",country:"Bouvet Island",zone:"Bouvet Island"},{code:"BW",country:"Botswana",zone:"Africa/Gaborone"},{code:"BY",country:"Belarus",zone:"Europe/Minsk"},{code:"BZ",country:"Belize",zone:"America/Belize"},{code:"CA",country:"Canada",zone:"America/St_Johns"},{code:"CC",country:"Cocos Islands",zone:"Indian/Cocos"},{code:"CD",country:"Democratic Republic of the Congo",zone:"Africa/Kinshasa"},{code:"CF",country:"Central African Republic",zone:"Africa/Bangui"},{code:"CG",country:"Republic of the Congo",zone:"Africa/Brazzaville"},{code:"CH",country:"Switzerland",zone:"Europe/Zurich"},{code:"CI",country:"Ivory Coast",zone:"Africa/Abidjan"},{code:"CK",country:"Cook Islands",zone:"Pacific/Rarotonga"},{code:"CL",country:"Chile",zone:"America/Santiago"},{code:"CM",country:"Cameroon",zone:"Africa/Douala"},{code:"CN",country:"China",zone:"Asia/Shanghai"},{code:"CO",country:"Colombia",zone:"America/Bogota"},{code:"CR",country:"Costa Rica",zone:"America/Costa_Rica"},{code:"CS",country:"Serbia and Montenegro",zone:"Serbia and Montenegro"},{code:"CU",country:"Cuba",zone:"America/Havana"},{code:"CV",country:"Cape Verde",zone:"Atlantic/Cape_Verde"},{code:"CW",country:"Curaçao",zone:"America/Curacao"},{code:"CX",country:"Christmas Island",zone:"Indian/Christmas"},{code:"CY",country:"Cyprus",zone:"Asia/Nicosia"},{code:"CZ",country:"Czech Republic",zone:"Europe/Prague"},{code:"DE",country:"Germany",zone:"Europe/Berlin"},{code:"DJ",country:"Djibouti",zone:"Africa/Djibouti"},{code:"DK",country:"Denmark",zone:"Europe/Copenhagen"},{code:"DM",country:"Dominica",zone:"America/Dominica"},{code:"DO",country:"Dominican Republic",zone:"America/Santo_Domingo"},{code:"DZ",country:"Algeria",zone:"Africa/Algiers"},{code:"EC",country:"Ecuador",zone:"America/Guayaquil"},{code:"EE",country:"Estonia",zone:"Europe/Tallinn"},{code:"EG",country:"Egypt",zone:"Africa/Cairo"},{code:"EH",country:"Western Sahara",zone:"Africa/El_Aaiun"},{code:"ER",country:"Eritrea",zone:"Africa/Asmara"},{code:"ES",country:"Spain",zone:"Europe/Madrid"},{code:"ET",country:"Ethiopia",zone:"Africa/Addis_Ababa"},{code:"FI",country:"Finland",zone:"Europe/Helsinki"},{code:"FJ",country:"Fiji",zone:"Pacific/Fiji"},{code:"FK",country:"Falkland Islands",zone:"Atlantic/Stanley"},{code:"FM",country:"Micronesia",zone:"Pacific/Chuuk"},{code:"FO",country:"Faroe Islands",zone:"Atlantic/Faroe"},{code:"FR",country:"France",zone:"Europe/Paris"},{code:"GA",country:"Gabon",zone:"Africa/Libreville"},{code:"GB",country:"United Kingdom",zone:"Europe/London"},{code:"GD",country:"Grenada",zone:"America/Grenada"},{code:"GE",country:"Georgia",zone:"Asia/Tbilisi"},{code:"GF",country:"French Guiana",zone:"America/Cayenne"},{code:"GG",country:"Guernsey",zone:"Europe/Guernsey"},{code:"GH",country:"Ghana",zone:"Africa/Accra"},{code:"GI",country:"Gibraltar",zone:"Europe/Gibraltar"},{code:"GL",country:"Greenland",zone:"America/Godthab"},{code:"GM",country:"Gambia",zone:"Africa/Banjul"},{code:"GN",country:"Guinea",zone:"Africa/Conakry"},{code:"GP",country:"Guadeloupe",zone:"America/Guadeloupe"},{code:"GQ",country:"Equatorial Guinea",zone:"Africa/Malabo"},{code:"GR",country:"Greece",zone:"Europe/Athens"},{code:"GS",country:"South Georgia and the South Sandwich Islands",zone:"Atlantic/South_Georgia"},{code:"GT",country:"Guatemala",zone:"America/Guatemala"},{code:"GU",country:"Guam",zone:"Pacific/Guam"},{code:"GW",country:"Guinea-Bissau",zone:"Africa/Bissau"},{code:"GY",country:"Guyana",zone:"America/Guyana"},{code:"HK",country:"Hong Kong",zone:"Asia/Hong_Kong"},{code:"HM",country:"Heard Island and McDonald Islands",zone:"Heard Island and McDonald Islands"},{code:"HN",country:"Honduras",zone:"America/Tegucigalpa"},{code:"HR",country:"Croatia",zone:"Europe/Zagreb"},{code:"HT",country:"Haiti",zone:"America/Port-au-Prince"},{code:"HU",country:"Hungary",zone:"Europe/Budapest"},{code:"ID",country:"Indonesia",zone:"Asia/Jakarta"},{code:"IE",country:"Ireland",zone:"Europe/Dublin"},{code:"IL",country:"Israel",zone:"Asia/Jerusalem"},{code:"IM",country:"Isle of Man",zone:"Europe/Isle_of_Man"},{code:"IN",country:"India",zone:"Asia/Kolkata"},{code:"IO",country:"British Indian Ocean Territory",zone:"Indian/Chagos"},{code:"IQ",country:"Iraq",zone:"Asia/Baghdad"},{code:"IR",country:"Iran",zone:"Asia/Tehran"},{code:"IS",country:"Iceland",zone:"Atlantic/Reykjavik"},{code:"IT",country:"Italy",zone:"Europe/Rome"},{code:"JE",country:"Jersey",zone:"Europe/Jersey"},{code:"JM",country:"Jamaica",zone:"America/Jamaica"},{code:"JO",country:"Jordan",zone:"Asia/Amman"},{code:"JP",country:"Japan",zone:"Asia/Tokyo"},{code:"KE",country:"Kenya",zone:"Africa/Nairobi"},{code:"KG",country:"Kyrgyzstan",zone:"Asia/Bishkek"},{code:"KH",country:"Cambodia",zone:"Asia/Phnom_Penh"},{code:"KI",country:"Kiribati",zone:"Pacific/Tarawa"},{code:"KM",country:"Comoros",zone:"Indian/Comoro"},{code:"KN",country:"Saint Kitts and Nevis",zone:"America/St_Kitts"},{code:"KP",country:"North Korea",zone:"Asia/Pyongyang"},{code:"KR",country:"South Korea",zone:"Asia/Seoul"},{code:"KW",country:"Kuwait",zone:"Asia/Kuwait"},{code:"KY",country:"Cayman Islands",zone:"America/Cayman"},{code:"KZ",country:"Kazakhstan",zone:"Asia/Almaty"},{code:"LA",country:"Laos",zone:"Asia/Vientiane"},{code:"LB",country:"Lebanon",zone:"Asia/Beirut"},{code:"LC",country:"Saint Lucia",zone:"America/St_Lucia"},{code:"LI",country:"Liechtenstein",zone:"Europe/Vaduz"},{code:"LK",country:"Sri Lanka",zone:"Asia/Colombo"},{code:"LR",country:"Liberia",zone:"Africa/Monrovia"},{code:"LS",country:"Lesotho",zone:"Africa/Maseru"},{code:"LT",country:"Lithuania",zone:"Europe/Vilnius"},{code:"LU",country:"Luxembourg",zone:"Europe/Luxembourg"},{code:"LV",country:"Latvia",zone:"Europe/Riga"},{code:"LY",country:"Libya",zone:"Africa/Tripoli"},{code:"MA",country:"Morocco",zone:"Africa/Casablanca"},{code:"MC",country:"Monaco",zone:"Europe/Monaco"},{code:"MD",country:"Moldova",zone:"Europe/Chisinau"},{code:"ME",country:"Montenegro",zone:"Europe/Podgorica"},{code:"MF",country:"Saint Martin",zone:"America/Marigot"},{code:"MG",country:"Madagascar",zone:"Indian/Antananarivo"},{code:"MH",country:"Marshall Islands",zone:"Pacific/Majuro"},{code:"MK",country:"Macedonia",zone:"Europe/Skopje"},{code:"ML",country:"Mali",zone:"Africa/Bamako"},{code:"MM",country:"Myanmar",zone:"Asia/Yangon"},{code:"MN",country:"Mongolia",zone:"Asia/Ulaanbaatar"},{code:"MO",country:"Macao",zone:"Asia/Macau"},{code:"MP",country:"Northern Mariana Islands",zone:"Pacific/Saipan"},{code:"MQ",country:"Martinique",zone:"America/Martinique"},{code:"MR",country:"Mauritania",zone:"Africa/Nouakchott"},{code:"MS",country:"Montserrat",zone:"America/Montserrat"},{code:"MT",country:"Malta",zone:"Europe/Malta"},{code:"MU",country:"Mauritius",zone:"Indian/Mauritius"},{code:"MV",country:"Maldives",zone:"Indian/Maldives"},{code:"MW",country:"Malawi",zone:"Africa/Blantyre"},{code:"MX",country:"Mexico",zone:"America/Mexico_City"},{code:"MY",country:"Malaysia",zone:"Asia/Kuala_Lumpur"},{code:"MZ",country:"Mozambique",zone:"Africa/Maputo"},{code:"NA",country:"Namibia",zone:"Africa/Windhoek"},{code:"NC",country:"New Caledonia",zone:"Pacific/Noumea"},{code:"NE",country:"Niger",zone:"Africa/Niamey"},{code:"NF",country:"Norfolk Island",zone:"Pacific/Norfolk"},{code:"NG",country:"Nigeria",zone:"Africa/Lagos"},{code:"NI",country:"Nicaragua",zone:"America/Managua"},{code:"NL",country:"Netherlands",zone:"Europe/Amsterdam"},{code:"NO",country:"Norway",zone:"Europe/Oslo"},{code:"NP",country:"Nepal",zone:"Asia/Kathmandu"},{code:"NR",country:"Nauru",zone:"Pacific/Nauru"},{code:"NU",country:"Niue",zone:"Pacific/Niue"},{code:"NZ",country:"New Zealand",zone:"Pacific/Auckland"},{code:"OM",country:"Oman",zone:"Asia/Muscat"},{code:"PA",country:"Panama",zone:"America/Panama"},{code:"PE",country:"Peru",zone:"America/Lima"},{code:"PF",country:"French Polynesia",zone:"Pacific/Tahiti"},{code:"PG",country:"Papua New Guinea",zone:"Pacific/Port_Moresby"},{code:"PH",country:"Philippines",zone:"Asia/Manila"},{code:"PK",country:"Pakistan",zone:"Asia/Karachi"},{code:"PL",country:"Poland",zone:"Europe/Warsaw"},{code:"PM",country:"Saint Pierre and Miquelon",zone:"America/Miquelon"},{code:"PN",country:"Pitcairn",zone:"Pacific/Pitcairn"},{code:"PR",country:"Puerto Rico",zone:"America/Puerto_Rico"},{code:"PS",country:"Palestinian Territory",zone:"Asia/Gaza"},{code:"PT",country:"Portugal",zone:"Europe/Lisbon"},{code:"PW",country:"Palau",zone:"Pacific/Palau"},{code:"PY",country:"Paraguay",zone:"America/Asuncion"},{code:"QA",country:"Qatar",zone:"Asia/Qatar"},{code:"RE",country:"Reunion",zone:"Indian/Reunion"},{code:"RO",country:"Romania",zone:"Europe/Bucharest"},{code:"RS",country:"Serbia",zone:"Europe/Belgrade"},{code:"RU",country:"Russia",zone:"Europe/Kaliningrad"},{code:"RW",country:"Rwanda",zone:"Africa/Kigali"},{code:"SA",country:"Saudi Arabia",zone:"Asia/Riyadh"},{code:"SB",country:"Solomon Islands",zone:"Pacific/Guadalcanal"},{code:"SC",country:"Seychelles",zone:"Indian/Mahe"},{code:"SD",country:"Sudan",zone:"Africa/Khartoum"},{code:"SE",country:"Sweden",zone:"Europe/Stockholm"},{code:"SG",country:"Singapore",zone:"Asia/Singapore"},{code:"SH",country:"Saint Helena",zone:"Atlantic/St_Helena"},{code:"SI",country:"Slovenia",zone:"Europe/Ljubljana"},{code:"SJ",country:"Svalbard and Jan Mayen",zone:"Arctic/Longyearbyen"},{code:"SK",country:"Slovakia",zone:"Europe/Bratislava"},{code:"SL",country:"Sierra Leone",zone:"Africa/Freetown"},{code:"SM",country:"San Marino",zone:"Europe/San_Marino"},{code:"SN",country:"Senegal",zone:"Africa/Dakar"},{code:"SO",country:"Somalia",zone:"Africa/Mogadishu"},{code:"SR",country:"Suriname",zone:"America/Paramaribo"},{code:"SS",country:"South Sudan",zone:"Africa/Juba"},{code:"ST",country:"Sao Tome and Principe",zone:"Africa/Sao_Tome"},{code:"SV",country:"El Salvador",zone:"America/El_Salvador"},{code:"SX",country:"Sint Maarten",zone:"America/Lower_Princes"},{code:"SY",country:"Syria",zone:"Asia/Damascus"},{code:"SZ",country:"Swaziland",zone:"Africa/Mbabane"},{code:"TC",country:"Turks and Caicos Islands",zone:"America/Grand_Turk"},{code:"TD",country:"Chad",zone:"Africa/Ndjamena"},{code:"TF",country:"French Southern Territories",zone:"Indian/Kerguelen"},{code:"TG",country:"Togo",zone:"Africa/Lome"},{code:"TH",country:"Thailand",zone:"Asia/Bangkok"},{code:"TJ",country:"Tajikistan",zone:"Asia/Dushanbe"},{code:"TK",country:"Tokelau",zone:"Pacific/Fakaofo"},{code:"TL",country:"East Timor",zone:"Asia/Dili"},{code:"TM",country:"Turkmenistan",zone:"Asia/Ashgabat"},{code:"TN",country:"Tunisia",zone:"Africa/Tunis"},{code:"TO",country:"Tonga",zone:"Pacific/Tongatapu"},{code:"TR",country:"Turkey",zone:"Europe/Istanbul"},{code:"TT",country:"Trinidad and Tobago",zone:"America/Port_of_Spain"},{code:"TV",country:"Tuvalu",zone:"Pacific/Funafuti"},{code:"TW",country:"Taiwan",zone:"Asia/Taipei"},{code:"TZ",country:"Tanzania",zone:"Africa/Dar_es_Salaam"},{code:"UA",country:"Ukraine",zone:"Europe/Kiev"},{code:"UG",country:"Uganda",zone:"Africa/Kampala"},{code:"UM",country:"United States Minor Outlying Islands",zone:"Pacific/Midway"},{code:"US",country:"United States",zone:"America/New_York"},{code:"UY",country:"Uruguay",zone:"America/Montevideo"},{code:"UZ",country:"Uzbekistan",zone:"Asia/Samarkand"},{code:"VA",country:"Vatican",zone:"Europe/Vatican"},{code:"VC",country:"Saint Vincent and the Grenadines",zone:"America/St_Vincent"},{code:"VE",country:"Venezuela",zone:"America/Caracas"},{code:"VG",country:"British Virgin Islands",zone:"America/Tortola"},{code:"VI",country:"U.S. Virgin Islands",zone:"America/St_Thomas"},{code:"VN",country:"Vietnam",zone:"Asia/Ho_Chi_Minh"},{code:"VU",country:"Vanuatu",zone:"Pacific/Efate"},{code:"WF",country:"Wallis and Futuna",zone:"Pacific/Wallis"},{code:"WS",country:"Samoa",zone:"Pacific/Apia"},{code:"XK",country:"Kosovo",zone:"Kosovo"},{code:"YE",country:"Yemen",zone:"Asia/Aden"},{code:"YT",country:"Mayotte",zone:"Indian/Mayotte"},{code:"ZA",country:"South Africa",zone:"Africa/Johannesburg"},{code:"ZM",country:"Zambia",zone:"Africa/Lusaka"},{code:"ZW",country:"Zimbabwe",zone:"Africa/Harare"}],timezones:["ACT","AET","Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Timbuktu","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","AGT","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/ComodRivadavia","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Atka","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Ensenada","America/Fort_Nelson","America/Fort_Wayne","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Knox_IN","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port_of_Spain","America/Port-au-Prince","America/Porto_Acre","America/Porto_Velho","America/Puerto_Rico","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Rosario","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Shiprock","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Virgin","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/South_Pole","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","ART","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Chongqing","Asia/Chungking","Asia/Colombo","Asia/Dacca","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Gaza","Asia/Harbin","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Istanbul","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kashgar","Asia/Kathmandu","Asia/Katmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macao","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Tel_Aviv","Asia/Thimbu","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ujung_Pandang","Asia/Ulaanbaatar","Asia/Ulan_Bator","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","AST","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Jan_Mayen","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/ACT","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Canberra","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/LHI","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/North","Australia/NSW","Australia/Perth","Australia/Queensland","Australia/South","Australia/Sydney","Australia/Tasmania","Australia/Victoria","Australia/West","Australia/Yancowinna","BET","Brazil/Acre","Brazil/DeNoronha","Brazil/East","Brazil/West","BST","Canada/Atlantic","Canada/Central","Canada/East-Saskatchewan","Canada/Eastern","Canada/Mountain","Canada/Newfoundland","Canada/Pacific","Canada/Saskatchewan","Canada/Yukon","CAT","CET","Chile/Continental","Chile/EasterIsland","CNT","CST","CST6CDT","CTT","Cuba","EAT","ECT","EET","Egypt","Eire","EST","EST5EDT","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belfast","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Tiraspol","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","GB","GB-Eire","GMT","GMT0","Greenwich","Hongkong","HST","Iceland","IET","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Iran","Israel","IST","Jamaica","Japan","JST","Kwajalein","Libya","MET","Mexico/BajaNorte","Mexico/BajaSur","Mexico/General","MIT","MST","MST7MDT","Navajo","NET","NST","NZ","NZ-CHAT","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Samoa","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis","Pacific/Yap","PLT","PNT","Poland","Portugal","PRC","PRT","PST","PST8PDT","ROK","Singapore","SST","SystemV/AST4","SystemV/AST4ADT","SystemV/CST6","SystemV/CST6CDT","SystemV/EST5","SystemV/EST5EDT","SystemV/HST10","SystemV/MST7","SystemV/MST7MDT","SystemV/PST8","SystemV/PST8PDT","SystemV/YST9","SystemV/YST9YDT","Turkey","UCT","Universal","US/Alaska","US/Aleutian","US/Arizona","US/Central","US/East-Indiana","US/Eastern","US/Hawaii","US/Indiana-Starke","US/Michigan","US/Mountain","US/Pacific","US/Pacific-New","US/Samoa","UTC","VST","W-SU","WET","Zulu"]}[e]}
34
34
  }]),t}(c.default);r.default=d,t.exports=r.default},{"./Search":262,q:109}],265:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./BaseSearch"),c=n(s),l=e("merge"),f=n(l),d=e("q"),h=n(d),p=function(e){function t(e,r,n,o,a,s,c,l,d){void 0===o&&(o={limit:{}}),i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,l),this._setUrlParameters(d),this._postObj=(0,f.default)(n,o,s,c),"object"==typeof a&&(this._postObj=(0,f.default)(this._postObj,a))}return o(t,e),a(t,[{key:"_filter",value:function(){return this._postObj}},{key:"_loadData",value:function(e){function t(){if(r.cancel||"string"==typeof r.cancel){var e="string"==typeof r.cancel?r.cancel:"Cancel process";n.reject({data:e,statusCode:403})}else r._ogapi.Napi.post(r._resource,i,r._timeout,r._getExtraHeaders(),r._getUrlParameters()).then(function(e){var r=e.statusCode,a=e.body;if(!a&&e.text)try{var u=JSON.parse(e.text);u&&(a=u)}catch(t){console.warn("Impossible to parse text from response: "+e.text)}200===r?(o=!0,n.notify(a),a.data.length===i.limit.size?(i.limit.start+=1,t()):n.resolve({data:"DONE",statusCode:200})):o?n.resolve({data:"DONE",statusCode:200}):n.reject({data:a,statusCode:r})}).catch(function(e){n.reject(e)})}var r=this,n=h.default.defer(),i=r._asyncPagingFilter(),o=!1;return t(),n.promise}}]),t}(c.default);r.default=p,t.exports=r.default},{"./BaseSearch":258,merge:104,q:109}],266:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/administrativeState",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._builderParams.timeout,"administrativeState",this.customFilters)}},{key:"withId",value:function(e){if("string"!=typeof e)throw new Error("Parameter id must be a string");return this.customFilters.id=e,this}},{key:"withEntityType",value:function(e){if("string"!=typeof e)throw new Error("Parameter entityType must be a string");return this.customFilters.entityType=e,this}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],267:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchWithSummaryBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="$_token";r.TOKEN_URL=d;var h=function(e){function t(e){var r=arguments.length<=1||void 0===arguments[1]?new f.default(e,"/alarms"):arguments[1];return function(){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{onDevices:"/devices",onSubscriptions:"/subscriptions"},r),this._url="/entities"+d+"/alarms"}.apply(this,arguments)}return o(t,e),a(t,[{key:"_buildUrl",value:function(){for(var e in this._routes)this._builderParams[e]&&(this._url=this._url.replace(d,this._routes[e]));return this._url=this._url.replace(d,""),u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}}]),t}(c.default);r.default=h},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],268:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/allowedResourceType",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),null,this._builderParams.timeout,"allowedResourceType",this.customFilters)}},{key:"withType",value:function(e){if("string"!=typeof e)throw new Error("Parameter type must be a string");return this.customFilters.type=e.toLowerCase(),this}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],269:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/areas",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],270:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./PreFilteredSearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d=e("../AssetSearch"),h=n(d),p="/entities",m=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,p)),this._url=p}return o(t,e),a(t,[{key:"summary",value:function(){return this._url=this._url+"/summary",this}},{key:"_buildFilter",value:function(){var e={and:[{exists:{"provision.asset.identifier":!0}}]};if(this._builderParams.filter&&Object.keys(this._builderParams.filter).length>0){var t=this._builderParams.filter;void 0!==t._filterTemplate?e.and.push(t._filterTemplate.filter):e.and.push(t)}return{filter:e}}},{key:"group",value:function(e){return this._builderParams.group=e||{},this}},{key:"build",value:function(){return new h.default(this._parent,this._buildUrl(),this._buildFilter(),this._buildLimit(),this._buildSort(),this._buildGroup(),this._buildSelect(),this._builderParams.timeout,this._urlParams)}},{key:"select",value:function(e){return this._builderParams.select=e||void 0,this}}]),t}(c.default);r.default=m,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"../AssetSearch":257,"./PreFilteredSearchBuilder":303}],271:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("q"),u=n(a),s=e("merge"),c=(n(s),e("jsonpath")),l=n(c),f=function(){function e(t,r){i(this,e),this._ogapi=t,this._resource="resources/schemaTypes/og_basic_types",this._headers=void 0,this._og_basic_types={},this.publicParameters=!1,this._urlParameters=void 0}return o(e,[{key:"_getExtraHeaders",value:function(){return this._headers}},{key:"_setExtraHeaders",value:function(e){if(this._headers)for(var t=Object.keys(e),r=0;r<t.length;r++){var n=t[r];this._headers[n]=e[n]}else this._headers=e}},{key:"_getUrlParameters",value:function(){return this._urlParameters}},{key:"_setUrlParameters",value:function(e){if(this.parameters)for(var t=Object.keys(e),r=0;r<t.length;r++){var n=t[r];this._urlParameters[n]=e[n]}else this._urlParameters=e}},{key:"execute",value:function(){var e=this,t=u.default.defer(),r=t.promise;return this._setExtraHeaders({Accept:"application/json"}),this._ogapi.Napi.get(this._resource,this._timeout,this._getExtraHeaders(),this._getUrlParameters()).then(function(r){var n=r.body,i=r.statusCode;if(e._og_basic_types=n,l.default.apply(e._og_basic_types,"$..['$ref']",function(e,t){var r="$.."+e.replace("#/definitions/","");return l.default.query(n,r)[0]}).forEach(function(e){var t=l.default.stringify(e.path);l.default.value(n,t,e.value)}),e.path){var o=e.path.includes("$")?e.path:"$.."+e.path,a=l.default.query(n,o)[0]||{msg:"not Found"};t.resolve({data:a,statusCode:i})}else{if(e.publicParameters)for(var u in n.definitions)n.definitions[u].public&&!1!==n.definitions[u].public||delete n.definitions[u];t.resolve({data:n,statusCode:i})}}).catch(function(e){t.reject(e)}),r}},{key:"withPath",value:function(e){return this.path=e,this}},{key:"withPublicParameters",value:function(e){return this.publicParameters=e,this}},{key:"build",value:function(){return this}}]),e}();r.default=f,t.exports=r.default},{jsonpath:95,merge:104,q:109}],272:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d=e("../WPSearch"),h=n(d),p="provisionProcessors/bulk/search",m=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,p)),this._url=p}return o(t,e),a(t,[{key:"build",value:function(){return new h.default(this._parent,this._buildUrl(),this._buildFilter(),this._buildLimit(),this._buildSort(),this._buildGroup(),this._buildSelect(),this._builderParams.timeout,this._urlParams)}}]),t}(c.default);r.default=m,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"../WPSearch":265,"./SearchBuilder":307}],273:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/bulk/async",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],274:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/bundles",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],275:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/certificates",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d,this._fetch=!1,this._assignable=!1}return o(t,e),a(t,[{key:"assignable",value:function(){return this._assignable=!0,this}},{key:"administrable",value:function(){return this._assignable=!1,this}},{key:"withFetch",value:function(e){if(!0!==e&&!1!==e)throw new Error("Flag fecth incorrect");return this._fetch=e,this}},{key:"_buildUrl",value:function(){var e=this._url;return!0===this._fetch&&(this._urlParams.fetch=1),!0===this._assignable&&(this._urlParams.visibility="assignable"),e}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],276:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchWithSummaryBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/channels",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d,this._summary=!1}return o(t,e),a(t,[{key:"disableDefaultSorted",value:function(){return this._urlParams.defaultSorted=!1,this}},{key:"summary",value:function(){return this._summary=!0,this}},{key:"_buildUrl",value:function(){return this._summary&&(this._url=this._url+"/summary"),u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],277:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/communicationsModuleType",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._builderParams.timeout,"communicationsModuleType",this.customFilters)}},{key:"withType",value:function(e){if("string"!=typeof e)throw new Error("Parameter type must be a string");return this.customFilters.type=e,this}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],278:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/countryCodes",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._builderParams.timeout,"countryCodes",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],279:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/datamodels",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],280:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("merge"),f=n(l),d=e("moment"),h=n(d),p=e("../../util/searchingFields/FieldFinder"),m=n(p),y=e("../../util/DATE_FORMAT"),v="/datapoints",_=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new m.default(e,v)),this._url=v,this.fluentFilter=e.newFilterBuilder(),this.tagsFilter=[]}return o(t,e),a(t,[{key:"withDeviceId",value:function(e){if("string"!=typeof e)throw new Error("Parameter deviceId must be a string");return this.fluentFilter.and(this._parent.EX.eq("datapoint.device",e)),this}},{key:"withDatastream",value:function(e){if("string"!=typeof e)throw new Error("Parameter datastreamId must be a string");return this.fluentFilter.and(this._parent.EX.eq("datapoint.datastream",e)),this}},{key:"withFeed",value:function(e){if("string"!=typeof e)throw new Error("Parameter feedId must be a string");return this.fluentFilter.and(this._parent.EX.eq("datapoint.feed",e)),this}},{key:"betweenDates",value:function(e,t){if("object"!=typeof e||e.constructor!==Date)throw new Error("Parameter fromDate must be a Date");if(this.fluentFilter.and(this._parent.EX.gt("datapoint.at",(0,h.default)(e).format(y.DATE_FORMAT))),void 0!==t){if(t.constructor!==Date)throw new Error("Parameter toDate must be a Date");this.fluentFilter.and(this._parent.EX.lt("datapoint.at",(0,h.default)(t).format(y.DATE_FORMAT)))}return this}},{key:"_buildFilter",value:function(){var e={filter:{}},t=(0,f.default)(!0,this.fluentFilter),r=this._builderParams.filter;if(t=t._filterTemplate.filter,"object"==typeof r._filterTemplate&&(r=r._filterTemplate.filter),void 0!==r&&Object.keys(r).length>0&&void 0!==t&&Object.keys(t).length>0)throw new Error("Incompatible filters. You only can create a filter using fluent mode [betweenDates, addTag, withDatastreamId, withDeviceId] methods or custom filter [filter] method");return void 0!==r&&Object.keys(r).length>0?e.filter=r:void 0!==t&&Object.keys(t).length>0&&(e.filter=t),e}},{key:"select",value:function(e){return this._builderParams.select=e,this}}]),t}(c.default);r.default=_,t.exports=r.default},{"../../util/DATE_FORMAT":336,"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307,merge:104,moment:105}],281:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchWithSummaryBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d=e("../EntitySearch"),h=n(d),p="$_token";r.TOKEN_URL=p;var m=function(e){function t(e,r,n){var o=arguments.length<=3||void 0===arguments[3]?new f.default(e,"/entities"):arguments[3];return function(){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{onDevices:"/"},o),this._url="/organizations/"+r+"/datasets/"+n+p}.apply(this,arguments)}return o(t,e),a(t,[{key:"flattened",value:function(){return this._urlParams.flattened=!0,this}},{key:"disableDefaultSorted",value:function(){return this._urlParams.defaultSorted=!1,this}},{key:"disableCaseSensitive",value:function(e){return this._urlParams.caseSensitive=e||!1,this}},{key:"removeCaseSensitive",value:function(){return this._urlParams&&delete this._urlParams.caseSensitive,this}},{key:"_buildUrl",value:function(){for(var e in this._routes)this._builderParams[e]&&(this._url=this._url.replace(p,this._routes[e]));return this._url=this._url.replace(p,""),
35
- u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}},{key:"group",value:function(e){return this._builderParams.group=e||{},this}},{key:"select",value:function(e){return this._builderParams.select=e||[],this}},{key:"build",value:function(){return new h.default(this._parent,this._buildUrl(),this._buildFilter(),this._buildLimit(),this._buildSort(),this._buildGroup(),this._buildSelect(),this._builderParams.timeout,this._urlParams)}}]),t}(c.default);r.default=m},{"../../util/searchingFields/FieldFinder":342,"../EntitySearch":260,"./SearchWithSummaryBuilder":308}],282:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d=e("../WPSearch"),h=n(d),p="datasets";r.BASE_URL=p;var m=function(e){function t(e,r,n){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,p,{organization:r,dataset:n})),this._url=p+"/provision/organizations/"+r+"/"+n+"/data"}return o(t,e),a(t,[{key:"group",value:function(e){return this._builderParams.group=e||{},this}},{key:"select",value:function(e){return this._builderParams.select=e||[],this}},{key:"build",value:function(){return new h.default(this._parent,this._buildUrl(),this._buildFilter(),this._buildLimit(),this._buildSort(),this._buildGroup(),this._buildSelect(),this._builderParams.timeout,this._urlParams)}}]),t}(c.default);r.default=m},{"../../util/searchingFields/FieldFinder":342,"../WPSearch":265,"./SearchBuilder":307}],283:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/catalog/datasets",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],284:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../Search"),l=(n(c),e("../../util/searchingFields/FieldFinder")),f=n(l),d="/datastreams",h=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d}return o(t,e),t}(s.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"../Search":262,"./SearchBuilder":307}],285:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/catalog/plans/device?",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d}return o(t,e),a(t,[{key:"withDomain",value:function(e){if("string"!=typeof e)throw new Error("Parameter domainName must be a string");return this._domainName=e,this}},{key:"_buildUrl",value:function(){if(!this._domainName)throw new Error("Parameter domainName must be defined");return this._url=d+this._domainName,u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],286:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./PreFilteredSearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/entities",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d}return o(t,e),a(t,[{key:"summary",value:function(){return this._url=this._url+"/summary",this}},{key:"_buildFilter",value:function(){var e={and:[{exists:{"provision.device.identifier":!0}}]};if(this._builderParams.filter&&Object.keys(this._builderParams.filter).length>0){var t=this._builderParams.filter;void 0!==t._filterTemplate?e.and.push(t._filterTemplate.filter):e.and.push(t)}return{filter:e}}},{key:"group",value:function(e){return this._builderParams.group=e||{},this}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./PreFilteredSearchBuilder":303}],287:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchWithSummaryBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/domains",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d,this._summary=!1}return o(t,e),a(t,[{key:"summary",value:function(){return this._summary=!0,this}},{key:"_buildUrl",value:function(){return this._summary&&(this._url=this._url+"/summary"),u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],288:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchWithSummaryBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d=e("../EntitySearch"),h=n(d),p="$_token";r.TOKEN_URL=p;var m=function(e){function t(e){var r=arguments.length<=1||void 0===arguments[1]?new f.default(e,"/entities"):arguments[1];return function(){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{onDevices:"/devices"},r),this._url="/entities"+p}.apply(this,arguments)}return o(t,e),a(t,[{key:"flattened",value:function(){return this._urlParams.flattened=!0,this}},{key:"disableDefaultSorted",value:function(){return this._urlParams.defaultSorted=!1,this}},{key:"disableCaseSensitive",value:function(e){return this._urlParams.caseSensitive=e||!1,this}},{key:"removeCaseSensitive",value:function(){return this._urlParams&&delete this._urlParams.caseSensitive,this}},{key:"_buildUrl",value:function(){for(var e in this._routes)this._builderParams[e]&&(this._url=this._url.replace(p,this._routes[e]));return this._url=this._url.replace(p,""),u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}},{key:"group",value:function(e){return this._builderParams.group=e||{},this}},{key:"select",value:function(e){return this._builderParams.select=e||[],this}},{key:"build",value:function(){return new h.default(this._parent,this._buildUrl(),this._buildFilter(),this._buildLimit(),this._buildSort(),this._buildGroup(),this._buildSelect(),this._builderParams.timeout,this._urlParams)}}]),t}(c.default);r.default=m},{"../../util/searchingFields/FieldFinder":342,"../EntitySearch":260,"./SearchWithSummaryBuilder":308}],289:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchWithSummaryBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/operations/history",d=function(e){function t(e){var r=arguments.length<=1||void 0===arguments[1]?new l.default(e,"/operations/history"):arguments[1];return function(){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},r),this._url="/entities"+f}.apply(this,arguments)}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],290:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchWithSummaryBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="$_token";r.TOKEN_URL=d;var h=function(e){function t(e){var r=arguments.length<=1||void 0===arguments[1]?new f.default(e,"/operations"):arguments[1];return function(){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{onDevices:"/devices",onSubscribers:"/subscribers",onSubscriptions:"/subscriptions",onCommunicationsModules:"/communicationsModules"},r),this._url="/entities"+d+"/operations"}.apply(this,arguments)}return o(t,e),a(t,[{key:"_buildUrl",value:function(){this._checkConstraintRoutes();for(var e in this._routes)this._builderParams[e]&&(this._url=this._url.replace(d,this._routes[e]));return u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}}]),t}(c.default);r.default=h},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],291:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/feeds",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],292:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/fieldsDefinition",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._builderParams.timeout,"fieldsDefinition",this.customFilters)}},{key:"withType",value:function(e){if("string"!=typeof e)throw new Error("Parameter type must be a string");return this.customFilters.type=e,this}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],293:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../DeviceSearch"),f=n(l),d=function(e){function t(e,r,n){if(i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,n),this.constructor===t)throw new Error("Cannot construct Abstract instances directly")}return o(t,e),a(t,[{key:"flattened",value:function(){return this._urlParams.flattened=!0,this}},{key:"_buildUrl",value:function(){return u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}},{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._buildLimit(),this._buildSort(),this._buildGroup(),this._buildSelect(),this._builderParams.timeout,this._urlParams)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../DeviceSearch":259,"./SearchBuilder":307}],294:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchWithSummaryBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/catalog/hardwares",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d}return o(t,e),a(t,[{key:"group",value:function(e){return this._builderParams.group=e||{},this}},{key:"select",value:function(e){return this._builderParams.select=e,this}},{key:"flattened",value:function(){return this._urlParams.flattened=!0,this}},{key:"disableDefaultSorted",value:function(){return this._urlParams.defaultSorted=!1,this}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],295:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/ioTDatastreamAccess",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),null,this._builderParams.timeout,"ioTDatastreamAccess",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],296:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/ioTDatastreamPeriod",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),null,this._builderParams.timeout,"ioTDatastreamPeriod",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],297:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/ioTDatastreamStoragePeriod",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),null,this._builderParams.timeout,"ioTDatastreamStoragePeriod",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],298:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/catalog/operators",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],299:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/operationTypes",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],300:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/operationalStatus",this.customFilters={}}return o(t,e),a(t,[{
36
- key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._builderParams.timeout,"operationalStatus",this.customFilters)}},{key:"withId",value:function(e){if("string"!=typeof e)throw new Error("Parameter id must be a string");return this.customFilters.id=e,this}},{key:"withEntityType",value:function(e){if("string"!=typeof e)throw new Error("Parameter entityType must be a string");return this.customFilters.entityType=e,this}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],301:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchWithSummaryBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/jobs",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],302:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/catalog/plans/organization?",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d}return o(t,e),a(t,[{key:"withDomain",value:function(e){if("string"!=typeof e)throw new Error("Parameter domainName must be a string");return this._domainName=e,this}},{key:"_buildUrl",value:function(){if(!this._domainName)throw new Error("Parameter domainName must be defined");return this._url=d+this._domainName,u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],303:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./FlattenedSearchBuilder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e,r,i){if(n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,i),this.constructor===t)throw new Error("Cannot construct Abstract instances directly")}return i(t,e),o(t,[{key:"provisioned",value:function(){return this._provisioned=!0,this}},{key:"collected",value:function(){return this._collected=!0,this}},{key:"select",value:function(e){return this._builderParams.select=e||[],this}},{key:"disableDefaultSorted",value:function(){return this._urlParams.defaultSorted=!1,this}},{key:"disableCaseSensitive",value:function(e){return this._urlParams.caseSensitive=e||!1,this}},{key:"removeCaseSensitive",value:function(){return this._urlParams&&delete this._urlParams.caseSensitive,this}}]),t}(s.default);r.default=c,t.exports=r.default},{"./FlattenedSearchBuilder":293}],304:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=(e("./SearchBuilder"),e("../Search")),a=function(e){return e&&e.__esModule?e:{default:e}}(o),u=function(){function e(t){n(this,e),this._api=t}return i(e,[{key:"from",value:function(e){if("string"!=typeof e)throw new Error("Url parameter is mandatory and must be a string");return this._url=e,this}},{key:"filter",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return this._filter={filter:e},this}},{key:"limit",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return this._limit={limit:e},this}},{key:"build",value:function(){if("string"!=typeof this._url)throw new Error("Url parameter is mandatory and must be a string");return new a.default(this._api,this._url,this._filter,this._limit,{})}}]),e}();r.default=u,t.exports=r.default},{"../Search":262,"./SearchBuilder":307}],305:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/resourceType",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),null,this._builderParams.timeout,"resourceType",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],306:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/rules",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],307:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("../Search"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),u=function(){function e(t,r,i){var o=this;if(n(this,e),this.constructor===e)throw new Error("Cannot construct Abstract instances directly");this._url="",this._fieldFinder=i,this._parent=t,this._routes=r,this._routesName=[],this._builderParams={summary:!1,sort:[],filter:{},limit:void 0,group:void 0,select:void 0};for(var a in this._routes)!function(e){o._routesName.push(e),o._builderParams[e]=!1,o[e]=function(){var t=arguments.length<=0||void 0===arguments[0]?e:arguments[0];return o._builderParams[t]=!0,o}}(a);this._urlParams={}}return i(e,[{key:"findFields",value:function(e){return this._fieldFinder.find(e)}},{key:"findAllFields",value:function(e){return this._fieldFinder.findAll(e)}},{key:"findFieldPath",value:function(e){return this._fieldFinder.findFieldPath(e)}},{key:"withTimeout",value:function(){var e=arguments.length<=0||void 0===arguments[0]?2e3:arguments[0];if("number"!=typeof e)throw new Error("Parameter ms must be a number");return this._builderParams.timeout=e,this}},{key:"filter",value:function(e){return this._builderParams.filter=e||{},this}},{key:"addSortAscendingBy",value:function(e){return this.addSortBy(e,"ASCENDING")}},{key:"addSortDescendingBy",value:function(e){return this.addSortBy(e,"DESCENDING")}},{key:"addSortBy",value:function(e,t){if(e&&t)if(this._builderParams.sort.length>0){var r=0,n=!1;for(r=0;r<this._builderParams.sort.length;r++)this._builderParams.sort[r].name===e&&(this._builderParams.sort[r].type=t,n=!0);n||this._builderParams.sort.push({name:e,type:t})}else this._builderParams.sort.push({name:e,type:t});return this}},{key:"removeSortBy",value:function(e){if(e){if(this._builderParams.sort.length>0){var t=0;for(t=0;t<this._builderParams.sort.length;t++)this._builderParams.sort[t].name===e&&(this._builderParams.sort.splice(t,t+1),t--)}}else this._builderParams.sort=[];return this}},{key:"limit",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1];if("number"!=typeof e)throw new Error("size parameter must be a number");return("number"!=typeof t||t<1)&&(t=1),this._builderParams.limit={size:e,start:t},this}},{key:"build",value:function(){try{return new a.default(this._parent,this._buildUrl(),this._buildFilter(),this._buildLimit(),this._buildSort(),this._buildGroup(),this._buildSelect(),this._builderParams.timeout,this._urlParams)}catch(e){console.error("!errrrror!!!!!!",e)}}},{key:"_buildFilter",value:function(){var e=this._builderParams.filter;return void 0!==e._filterTemplate?e._filterTemplate:{filter:e}}},{key:"_buildSelect",value:function(){var e=this._builderParams.select;return void 0!==e&&void 0!==e._selectTemplate?e._selectTemplate:{select:e}}},{key:"_buildGroup",value:function(){var e=this._builderParams.group;return void 0!==e&&void 0!==e._groupTemplate?e._groupTemplate:{group:e}}},{key:"_buildLimit",value:function(){return void 0===this._builderParams.limit?{limit:{size:1e3,start:1}}:{limit:this._builderParams.limit}}},{key:"_buildSort",value:function(){if(0!==this._builderParams.sort.length)return{sort:{parameters:this._builderParams.sort}}}},{key:"_buildUrl",value:function(){if("string"!=typeof this._url||0===this._url.trim().length)throw new Error("Error on extends SearchBuilder, this._url is not defined.");return this._url}},{key:"_checkConstraintRoutes",value:function(){var e=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],t=!1;for(var r in this._routes){if(t&&this._builderParams[r]&&!e)throw new Error("Must select only one of this:"+JSON.stringify(this._routesName));t=t||this._builderParams[r]}if(!t)throw new Error("Must select one at least: "+JSON.stringify(this._routesName))}}]),e}();r.default=u,t.exports=r.default},{"../Search":262}],308:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e,r,i){if(n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,i),this.constructor===t)throw new Error("Cannot construct Abstract instances directly")}return i(t,e),o(t,[{key:"summary",value:function(){return this._url=this._url+"/summary",this}}]),t}(s.default);r.default=c,t.exports=r.default},{"./SearchBuilder":307}],309:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d="serviceGroups",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/"+d,this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._builderParams.timeout,d,this.customFilters)}},{key:"withEntityType",value:function(e){if("string"!=typeof e)throw new Error("Parameter entityType must be a string");return this.customFilters.entityType=e,this}}]),t}(c.default);r.default=h,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],310:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchWithSummaryBuilder"),c=n(s),l=e("merge"),f=n(l),d=e("../../util/searchingFields/FieldFinder"),h=n(d),p=["SOFTWARE","FIRMWARE"];r.SOFTWARE_TYPES_ENUM=p;var m="/catalog/softwares",y=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new h.default(e,m)),this._url=m,this.fluentFilter=e.newFilterBuilder(),this.tagsFilter=[]}return o(t,e),a(t,[{key:"withId",value:function(e){if("string"!=typeof e)throw new Error("Parameter softwareId must be a string");return this.fluentFilter.and(this._parent.EX.eq("softwareId",e)),this}},{key:"withName",value:function(e){if("string"!=typeof e)throw new Error("Parameter softwareName must be a string");return this.fluentFilter.and(this._parent.EX.eq("softwareName",e)),this}},{key:"withType",value:function(e){if("string"!=typeof e)throw new Error("Parameter version must be a string");var t="";if(void 0===p.find(function(e){return e==this},e)&&(t=e),""!==t)throw new Error("Parameter in TYPE is not allowed. Parameter value '"+JSON.stringify(t)+"', parameters allowed in administrativeState are: '"+JSON.stringify(p)+"'");return this.fluentFilter.and(this._parent.EX.eq("softwareType",e)),this}},{key:"withVersion",value:function(e){if("string"!=typeof e)throw new Error("Parameter version must be a string");return this.fluentFilter.and(this._parent.EX.eq("softwareVersion",e)),this}},{key:"withHardwareId",value:function(e){if("string"!=typeof e)throw new Error("Parameter hardwareId must be a string");return this.fluentFilter.and(this._parent.EX.eq("hardwareId",e)),this}},{key:"withModel",value:function(e){if("string"!=typeof e)throw new Error("Parameter modelName must be a string");return this.fluentFilter.and(this._parent.EX.eq("modelName",e)),this}},{key:"withModelVersion",value:function(e){if("string"!=typeof e)throw new Error("Parameter modelVersion must be a string");return this.fluentFilter.and(this._parent.EX.eq("modelVersion",e)),this}},{key:"withManufacturer",value:function(e){if("string"!=typeof e)throw new Error("Parameter manufacturerName must be a string");return this.fluentFilter.and(this._parent.EX.eq("manufacturerName",e)),this}},{key:"_buildFilter",value:function(){var e={filter:{}},t=(0,f.default)(!0,this.fluentFilter),r=this._builderParams.filter;if(t=t._filterTemplate.filter,"object"==typeof r._filterTemplate&&(r=r._filterTemplate.filter),void 0!==r&&Object.keys(r).length>0&&void 0!==t&&Object.keys(t).length>0)throw new Error("Incompatible filters. You only can create a filter using fluent mode [withId, withName, withVersion, withType, withHardwareId, withModel, withModelVersion, withManufacturer] methods or custom filter [filter] method");return void 0!==r&&Object.keys(r).length>0?e.filter=r:void 0!==t&&Object.keys(t).length>0&&(e.filter=t),e}}]),t}(c.default);r.default=y},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308,merge:104}],311:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./PreFilteredSearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/entities",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,"/subscribers")),this._url=d}return o(t,e),a(t,[{key:"_buildFilter",value:function(){var e={and:[{or:[]}]};if(!this._provisioned&&this._collected||e.and[0].or.push({exists:{"provision.device.communicationModules[].subscriber.identifier":!0}}),!this._collected&&this._provisioned||e.and[0].or.push({exists:{"device.communicationModules[].subscriber.identifier":!0}}),this._builderParams.filter&&Object.keys(this._builderParams.filter).length>0){var t=this._builderParams.filter;void 0!==t._filterTemplate?e.and.push(t._filterTemplate.filter):e.and.push(t)}return{filter:e}}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./PreFilteredSearchBuilder":303}],312:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./PreFilteredSearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/entities",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,"/subscriptions")),this._url=d}return o(t,e),a(t,[{key:"_buildFilter",value:function(){var e={and:[{or:[]}]};if(!this._provisioned&&this._collected||e.and[0].or.push({exists:{"provision.device.communicationModules[].subscription.identifier":!0}}),!this._collected&&this._provisioned||e.and[0].or.push({exists:{"device.communicationModules[].subscription.identifier":!0}}),this._builderParams.filter&&Object.keys(this._builderParams.filter).length>0){var t=this._builderParams.filter;void 0!==t._filterTemplate?e.and.push(t._filterTemplate.filter):e.and.push(t)}return{filter:e}}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./PreFilteredSearchBuilder":303}],313:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchWithSummaryBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/tasks",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],314:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/ticketPriority",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),null,this._builderParams.timeout,"ticketPriority",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],315:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/ticketSeverity",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),null,this._builderParams.timeout,"ticketSeverity",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],316:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/ticketStatus",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),null,this._builderParams.timeout,"ticketStatus",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],317:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}
37
- return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/tickets",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d}return o(t,e),a(t,[{key:"summary",value:function(){return this._url=this._url+"/summary",this}},{key:"group",value:function(e){return this._builderParams.group=e||{},this}},{key:"select",value:function(e){return this._builderParams.select=e,this}},{key:"flattened",value:function(){return this._urlParams.flattened=!0,this}},{key:"disableDefaultSorted",value:function(){return this._urlParams.defaultSorted=!1,this}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],318:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d=e("../WPSearch"),h=n(d),p="timeseries";r.BASE_URL=p;var m=function(e){function t(e,r,n){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,p,{organization:r,timeserie:n})),this._url=p+"/provision/organizations/"+r+"/"+n+"/data"}return o(t,e),a(t,[{key:"group",value:function(e){return this._builderParams.group=e||{},this}},{key:"select",value:function(e){return this._builderParams.select=e||[],this}},{key:"build",value:function(){return new h.default(this._parent,this._buildUrl(),this._buildFilter(),this._buildLimit(),this._buildSort(),this._buildGroup(),this._buildSelect(),this._builderParams.timeout,this._urlParams)}}]),t}(c.default);r.default=m},{"../../util/searchingFields/FieldFinder":342,"../WPSearch":265,"./SearchBuilder":307}],319:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/timezones",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._builderParams.timeout,"timezones",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],320:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/userLanguages",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._builderParams.timeout,"userLanguages",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],321:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/userProfile",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._builderParams.timeout,"userProfile",this.customFilters)}},{key:"withId",value:function(e){if("string"!=typeof e)throw new Error("Parameter id must be a string");return this.customFilters.id=e,this}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],322:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchWithSummaryBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/users",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],323:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchWithSummaryBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/workgroups",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],324:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["NOT_ACTIVE","ACTIVE","REVOKED","EXPIRED"];r.ADMINISTRATIVE_STATE_ENUM=n},{}],325:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../ProvisionGenericFinder"),c=n(s),l=e("q"),f=n(l),d=e("http-status-codes"),h=n(d),p=e("./MIME_TYPES_ENUM"),m=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"security/certificates","certificate","Certificate not found")}return o(t,e),a(t,[{key:"findById",value:function(e){return this._id=e,this._execute()}},{key:"_downloadUrl",value:function(){return this._setUrlParameters({format:this._type}),this._composeUrl()}},{key:"findByIdAndFormat",value:function(e,t){var r="";if(void 0===p.MIME_TYPES_ENUM.find(function(e){return e==this},t)&&(r=t),""!==r)throw new Error("Parameter mimetype is not allowed. Parameter value <'"+JSON.stringify(r)+"'>, mimetype allowed <'"+JSON.stringify(p.MIME_TYPES_ENUM)+"'>");return this._id=e,this._type=t,this._download()}},{key:"_download",value:function(){var e=f.default.defer(),t=e.promise,r=this._error_not_found;return this._api.get(this._downloadUrl(),void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(t){204===t.statusCode?e.reject({data:r,statusCode:h.default.NOT_FOUND}):e.resolve({data:t,statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}}]),t}(c.default);r.default=m,t.exports=r.default},{"../ProvisionGenericFinder":140,"./MIME_TYPES_ENUM":327,"http-status-codes":68,q:109}],326:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_get=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},_Security2=require("./Security"),_Security3=_interopRequireDefault(_Security2),_q=require("q"),_q2=_interopRequireDefault(_q),_ADMINISTRATIVE_STATE_ENUM=require("./ADMINISTRATIVE_STATE_ENUM"),_USAGES_ENUM=require("./USAGES_ENUM"),max_length_name=50,max_length_id=50,max_length_description=200,Certificates=function(_Security){function Certificates(e){_classCallCheck(this,Certificates),_get(Object.getPrototypeOf(Certificates.prototype),"constructor",this).call(this,e,"/certificates")}return _inherits(Certificates,_Security),_createClass(Certificates,[{key:"withId",value:function(e){if("string"!=typeof e||0===e.length||e.length>max_length_id)throw new Error("Parameter id must be a string, cannot be empty and has a maximum length of "+max_length_id);return this._id=e,this}},{key:"withName",value:function(e){if("string"!=typeof e||0===e.length||e.length>max_length_name)throw new Error("Parameter name must be a string, cannot be empty and has a maximum length of "+max_length_name);return this._name=e,this}},{key:"withDescription",value:function(e){if("string"!=typeof e||0===e.length||e.length>max_length_description)throw new Error("Parameter description must be a string, cannot be empty and has a maximum length of "+max_length_description);return this._description=e,this}},{key:"withAdministrativeState",value:function(e){if("string"!=typeof e||e.length<=0)throw new Error("Parameter administrativeState must be typeof string and cannot be empty");var t="";if(void 0===_ADMINISTRATIVE_STATE_ENUM.ADMINISTRATIVE_STATE_ENUM.find(function(e){return e==this},e)&&(t=e),""!==t)throw new Error("Parameter in administrativeState is not allowed. Parameter value '"+JSON.stringify(t)+"', parameters allowed in administrativeState are: '"+JSON.stringify(_ADMINISTRATIVE_STATE_ENUM.ADMINISTRATIVE_STATE_ENUM)+"'");return this._administrativeState=e,this}},{key:"withUsages",value:function(e){if(void 0===e||e.constructor!==Array||0===e.length)throw new Error("Parameter usages must be typeof Array and cannot be empty");for(var t=[],r=0;r<e.length;r++){void 0===_USAGES_ENUM.USAGES_ENUM.find(function(e){return e==this},e[r])&&t.push(e[r])}if(0!==t.length)throw new Error("There are not any parameters allowed. Parameters value: '"+JSON.stringify(t)+"'. Usages parameters allowed are: '"+JSON.stringify(_USAGES_ENUM.USAGES_ENUM)+"'");return this._usages=e,this}},{key:"withHardware",value:function(e){var t=[];if(void 0===e||e.constructor!==Array||0===e.length)throw new Error("Parameter hardwares must be typeof Array and cannot be empty");for(var r=0;r<e.length;r++)if(this._checkHardware(e[r]))try{e[r]=JSON.parse(e[r])}catch(e){}else t.push(r+1);if(0!==t.length)throw new Error("The hardware attribute is not well formed, the message "+JSON.stringify(t)+" not correct. Remember: hardwareId or [manufacturer, model and modelVersion] must be defined");return this._hardware=e,this}},{key:"_checkHardware",value:function _checkHardware(hardware){"string"==typeof hardware&&(hardware=eval("("+hardware+")"));var length=Object.keys(hardware).length,valid=!1;return 1===length&&hardware.hardwareId&&"string"==typeof hardware.hardwareId&&hardware.hardwareId.length>0?valid=!0:3===length&&hardware.manufacturer&&hardware.model&&hardware.modelVersion&&"string"==typeof hardware.manufacturer&&"string"==typeof hardware.model&&"string"==typeof hardware.modelVersion&&hardware.manufacturer.length>0&&hardware.model.length>0&&hardware.modelVersion.length>0&&(valid=!0),valid}},{key:"withTags",value:function(e){if(void 0===e||e.constructor!==Array||e.length<=0)throw new Error("Parameter tags must be typeof Array and cannot be empty");for(var t=[],r=0;r<e.length;r++)(void 0===e[r]||"string"!=typeof e[r]||typeof e[r].length<=0)&&t.push(e[r]);if(0!==t.length)throw new Error("The following tags values are not allowed:"+JSON.stringify(t));return this._tags=e,this}},{key:"withParameters",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter parameters must be a string, cannot be empty");return this._parameters=e,this}},{key:"withDomains",value:function(e){if(void 0===e||e.constructor!==Array||e.length<=0)throw new Error("Parameter domains must be typeof Array and cannot be empty");for(var t=[],r=0;r<e.length;r++)(void 0===e[r]||"string"!=typeof e[r]||typeof e[r].length<=0)&&t.push(e[r]);if(0!==t.length)throw new Error("The following domains values are not allowed:"+JSON.stringify(t));return this._domains=e,this}},{key:"_composeElement",value:function(){if(void 0===this._name||void 0===this._administrativeState||void 0===this._usages)throw new Error("Parameters name, usages, administrativeState must be defined");return{certificate:{id:this._id||void 0,name:this._name||void 0,description:this._description||void 0,administrativeState:this._administrativeState||void 0,usages:this._usages||void 0,hardware:this._hardware||void 0,tags:this._tags||void 0,parameters:this._parameters||void 0,domains:this._domains||void 0}}}},{key:"create",value:function(e){var t=this,r=void 0;if("string"!=typeof e){r=new FormData;var n=new Blob([JSON.stringify(this._composeElement())],{type:"application/json"});r.append("json",n);var i=new Blob([e],{type:"application/x-pem-file"});e&&r.append("certificate",i)}else r={},r.json=JSON.stringify(this._composeElement()),r.certificate=e;var o=_q2.default.defer(),a=o.promise;return this._ogapi.Napi.post_multipart(this._resource,r,{},this._timeout,this._getExtraHeaders(),this._getUrlParameters()).then(function(e){var r=e.statusCode;201===r?("function"==typeof t._onCreated&&t._onCreated(e.header.location),o.resolve({location:e.header.location,statusCode:r})):o.reject({errors:e.errors,statusCode:r})}).catch(function(e){o.reject(e)}),a}},{key:"_onCreated",value:function(e){var t=e.split("/").pop(-1);this.withId(t)}},{key:"update",value:function(){var e=this._composeElement();delete e.certificate.id;var t=_q2.default.defer(),r=t.promise;return this._ogapi.Napi.put(this._buildURL(),e,void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(e){var r=e.body;void 0===r?t.reject("Cannot update the certificate"):t.resolve(r,e.statusCode)}).catch(function(e){t.reject(e)}),r}},{key:"_buildURL",value:function(){if(void 0===this._id)throw new Error("Parameters id must be defined");return this._resource+"/"+this._id}}]),Certificates}(_Security3.default);exports.default=Certificates,module.exports=exports.default},{"./ADMINISTRATIVE_STATE_ENUM":324,"./Security":328,"./USAGES_ENUM":329,q:109}],327:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["x-pem-file","pkcs7-mime","raw","text/plain"];r.MIME_TYPES_ENUM=n},{}],328:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},a=e("../provision/BaseProvision"),u=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(e){function t(e,r,i){n(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/security"+(void 0===r?"":r),i)}return i(t,e),t}(u.default);r.default=s,t.exports=r.default},{"../provision/BaseProvision":235}],329:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["FILE_VALIDATION","DEVICE_COMMUNICATIONS","DEVICE_ACCESS","CERT_SIGN"];r.USAGES_ENUM=n},{}],330:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../provision/BaseProvision"),c=n(s),l=e("../util/formats/check_types"),f=n(l),d="timeseries/provision/organizations/";r.URL=d;var h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/organizations/",void 0,["name","organization","timeBucket","identifierColumn"])}return o(t,e),a(t,[{key:"_buildURL",value:function(){return d+this._organization+"/"+this._identifier}},{key:"withOrganization",value:function(e){return f.default._checkStringAndLength(e,50,"organization"),this._organization=e,this}},{key:"withIdentifier",value:function(e){return f.default._checkString(e,"identifier"),this._identifier=e,this}},{key:"withName",value:function(e){return f.default._checkStringAndPattern(e,"^[a-zA-Z0-9_@.-]*$","name"),this._name=e,this}},{key:"withIdentifierColumn",value:function(e){return f.default._checkString(e,"identifierColumn"),this._identifierColumn=e,this}},{key:"withTimeBucket",value:function(e){return f.default._checkNumber(e,"timeBucket"),this._timeBucket=e,this}},{key:"withDescription",value:function(e){return e&&f.default._checkString(e,"description"),this._description=e,this}},{key:"withColumns",value:function(e){return f.default._checkArray(e,"columns"),this._columns=e,this}},{key:"withBucketColumn",value:function(e){return f.default._checkStringAndPattern(e,"^[a-zA-Z0-9 _-]*$","bucketColumn"),this._bucketColumn=e,this}},{key:"withRetention",value:function(e){return f.default._checkNumber(e,"retention"),this._retention=e,this}},{key:"withOrigin",value:function(e){return f.default._checkISODateTime(e,"origin"),this._origin=e,this}},{key:"withContext",value:function(e){return f.default._checkArray(e,"context"),this._context=e,this}},{key:"_composeElement",value:function(){return this._resource=d+this._organization,this._timeBucket>0&&f.default._checkStringAndPattern(this._bucketColumn,"^[a-zA-Z0-9 _-]*$","bucketColumn"),{name:this._name,description:this._description,timeBucket:this._timeBucket,bucketColumn:this._timeBucket?this._bucketColumn:void 0,retention:this._retention,origin:this._origin,context:this._context||[],identifierColumn:this._identifierColumn,columns:this._columns||[]}}},{key:"update",value:function(){throw new Error("OGAPI_TIMESERIES_NOT_UPDATED")}}]),t}(c.default);r.default=h},{"../provision/BaseProvision":235,"../util/formats/check_types":341}],331:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../GenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"timeseries/provision/organizations","timeseries")}return i(t,e),o(t,[{key:"findByOrganization",value:function(e){return this._withId(e),this._execute()}},{key:"findByOrganizationAndTimeserieId",value:function(e,t){return this._withId(e+"/"+t),this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../GenericFinder":138}],332:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../GenericFinder"),c=n(s),l=e("q"),f=(n(l),e("http-status-codes")),d=(n(f),function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"ai","list","Transformer not found","north")}return o(t,e),a(t,[{key:"findByOrganization",value:function(e){return this._organization=e,this._execute()}},{key:"findByOrganizationAndIdentifier",value:function(e,t){return this._organization=e,this._identifier=t,this._execute()}},{key:"downloadByOrganizationAndIdentifierAndFilename",value:function(e,t,r){return this._organization=e,this._identifier=t,this._filename=r,this._download()}},{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._organization+"/transformers"+(this._identifier?"/"+this._identifier+(this._filename?"/"+this._filename:""):"")}}]),t}(c.default));r.default=d,t.exports=r.default},{"../GenericFinder":138,"http-status-codes":68,q:109}],333:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("q"),c=n(s),l=e("../provision/BaseProvision"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/organizations",void 0,["organization","files"],"north/ai"),this._ogapi=e}return o(t,e),a(t,[{key:"_buildURL",value:function(){return this._organization+"/transformers/"+this._identifier}},{key:"withIdentifier",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"identifier"});return this._identifier=e,this}},{key:"withOrganization",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"organization"});return this._organization=e,this}},{key:"addFile",value:function(e){this._files||(this._files=[]),this._files.push(e)}},{key:"withFiles",value:function(e){if(!(e instanceof Array))throw new Error({message:"Parameter files requires an array",parameter:"files"});this._files=e}},{key:"_composeElement",value:function(){return this._checkRequiredParameters(),this._resource=this._organization+"/transformers",{files:this._files||void 0}}},{key:"_composeUpdateElement",value:function(){var e=u(Object.getPrototypeOf(t.prototype),"_composeUpdateElement",this).call(this);return delete e.name,e}},{key:"performTest",value:function(e){var t=c.default.defer(),r=t.promise;return this._ogapi.Napi.post(this._buildURL()+"/transform",e,this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(e){t.resolve({statusCode:e.statusCode,body:e.body
38
- })}).catch(function(e){t.reject(e)}),r}},{key:"create",value:function(){var e=this._composeElement(),t=c.default.defer();return this._ogapi.Napi.post_multipart(this._resource,{files:e.files},{},this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(e){switch(e.statusCode){case 200:var r=""!=e.text?JSON.parse(e.text):{},n=e.status;t.resolve({data:r,statusCode:n});break;case 201:var n=e.status,i=e.header&&e.header.location;t.resolve({location:i,statusCode:n});break;case 204:t.resolve(e);break;default:t.reject({errors:e.data.errors,statusCode:e.statusCode})}}).catch(function(e){t.reject(e)}),t.promise}},{key:"update",value:function(){var e=this._composeElement(),t=c.default.defer();return this._ogapi.Napi.put_multipart(this._buildURL(),{files:e.files},{},this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(e){switch(e.statusCode){case 200:var r=""!=e.text?JSON.parse(e.text):{},n=e.status;t.resolve({data:r,statusCode:n});break;default:t.reject({errors:e.data.errors,statusCode:e.statusCode})}}).catch(function(e){t.reject(e)}),t.promise}}]),t}(f.default);r.default=d,t.exports=r.default},{"../provision/BaseProvision":235,q:109}],334:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"users","user","User not found")}return i(t,e),o(t,[{key:"findByEmail",value:function(e){return this._id=e,this._execute()}},{key:"findByEmailAndPassword",value:function(e,t){return this._id=e,this._setExtraHeaders({"X-ApiPass":t}),this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],335:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../provision/BaseProvision"),c=n(s),l=e("q"),f=n(l),d=e("lodash"),h=n(d),p=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/users",void 0,["email","workgroup","domain","profile","countryCode","langCode"])}return o(t,e),a(t,[{key:"withName",value:function(e){if("string"!=typeof e||e.length>100)throw new Error("Parameter name must be a string and has a maximum length of 100");return this._name=e,this}},{key:"withSurname",value:function(e){if("string"!=typeof e||e.length>100)throw new Error("Parameter surname must be a string and has a maximum length of 100");return this._surname=e,this}},{key:"withEmail",value:function(e){if("string"!=typeof e||e.length>100)throw new Error("Parameter email must be a string and has a maximum length of 100");return this._email=e,this}},{key:"withPassword",value:function(e){if("string"!=typeof e||e.length>50)throw new Error("Parameter password must be a string and has a maximum length of 50");return this._password=e,this}},{key:"withWorkgroup",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_WORKGROUP");return this._workgroup=e,this}},{key:"withDomain",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_DOMAIN");return this._domain=e,this}},{key:"withProfile",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_PROFILE");return this._profile=e,this}},{key:"withCountryCode",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_COUNTRY_CODE");return this._countryCode=e,this}},{key:"withLangCode",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_LANGUAGE");return this._langCode=e,this}},{key:"withDescription",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_DESCRIPTION");return this._description=e,this}},{key:"withTimezone",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_TIMEZONE");return this._timezone=e,this}},{key:"_buildURL",value:function(){if(void 0===this._email)throw new Error("OGAPI_EMAIL_MUST_BE_DEFINED");return this._resource+"/"+this._email}},{key:"_composeElement",value:function(){return{user:{name:this._name||void 0,surname:this._surname||void 0,password:this._password||void 0,description:this._description||void 0,email:this._email||void 0,workgroup:this._workgroup||void 0,domain:this._domain||void 0,profile:this._profile||void 0,countryCode:this._countryCode||void 0,langCode:this._langCode||void 0,timezone:this._timezone||void 0}}}},{key:"_composeUpdateElement",value:function(){if(this._password)throw new Error("OGAPI_PASSWORD_NOT_ALLOWED");if(void 0===this._email)throw new Error("OGAPI_USER_UPDATE_PARAMETER_MUST_BE_DEFINED");return{user:{name:this._name||void 0,surname:this._surname||void 0,description:this._description||void 0,email:this._email||void 0,workgroup:this._workgroup||void 0,domain:this._domain||void 0,profile:this._profile||void 0,countryCode:this._countryCode||void 0,langCode:this._langCode||void 0,timezone:this._timezone||void 0}}}},{key:"_post",value:function(e,t){var r=f.default.defer(),n=r.promise;return this._ogapi.Napi.post(e,t,void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(e){200===e.statusCode?r.resolve({statusCode:e.statusCode}):200===e.status?r.resolve({statusCode:e.status}):r.reject({errors:e.errors,statusCode:e.statusCode})}).catch(function(e){r.reject(e)}),n}},{key:"changePassword",value:function(e){if(this._newPassword=e,h.default.isEmpty(this._email)||h.default.isEmpty(this._password)||h.default.isEmpty(this._newPassword))throw new Error("OGAPI_USER_UPDATE_PASSWORD_PARAMETER_MUST_BE_DEFINED");var t={user:{password:this._newPassword}};return this._setExtraHeaders({"X-ApiPass":this._password}),this._doNorthPost(this._buildURL(),t)}},{key:"requestResetPassword",value:function(){if(h.default.isEmpty(this._email))throw new Error("OGAPI_USER_MAIL_RESET_PASSWORD_PARAMETER_MUST_BE_DEFINED");var e=this._buildURL()+"/reset";return this._doNorthPost(e)}},{key:"updatePassword",value:function(e,t){if(this._newPassword=e,this._tokenId=t,h.default.isEmpty(this._email))throw new Error("OGAPI_USER_MAIL_RESET_PASSWORD_PARAMETER_MUST_BE_DEFINED");if(h.default.isEmpty(this._newPassword))throw new Error("OGAPI_USER_PASSWORD_RESET_PASSWORD_PARAMETER_MUST_BE_DEFINED");if(h.default.isEmpty(t))throw new Error("OGAPI_USER_TOKENID_RESET_PASSWORD_PARAMETER_MUST_BE_DEFINED");var r={password:this._newPassword},n=this._buildURL()+"/reset/"+t;return this._doNorthPost(n,r)}}]),t}(c.default);r.default=p,t.exports=r.default},{"../provision/BaseProvision":235,lodash:103,q:109}],336:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.DATE_FORMAT="";r.TIME_FORMAT="HH:mm:ssZ"},{}],337:[function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(){function e(){i(this,e)}return o(e,null,[{key:"eq",value:function(e,t){return{eq:n({},e,t)}}},{key:"neq",value:function(e,t){return{neq:n({},e,t)}}},{key:"like",value:function(e,t){return{like:n({},e,t)}}},{key:"gt",value:function(e,t){return{gt:n({},e,t)}}},{key:"lt",value:function(e,t){return{lt:n({},e,t)}}},{key:"gte",value:function(e,t){return{gte:n({},e,t)}}},{key:"lte",value:function(e,t){return{lte:n({},e,t)}}},{key:"in",value:function(e,t){return{in:n({},e,t)}}},{key:"or",value:function(){for(var e={or:[]},t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var i=0;i<r.length;i++)e.or.push(r[i]);return e}},{key:"and",value:function(){for(var e={and:[]},t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var i=0;i<r.length;i++)e.and.push(r[i]);return e}}]),e}();r.default=a,t.exports=r.default},{}],338:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("merge"),u=n(a),s=e("urlencode"),c=n(s),l=e("superagent"),f=n(l),d=e("q"),h=n(d),p=e("lodash"),m=n(p),y=e("superagent-mocker"),v=n(y),_=(0,v.default)(f.default),g=function(){function e(t,r){i(this,e),this._options=u.default.recursive(!0,this.default(),t),this._headers=r,m.default.isEmpty(t.mocks)||this._applyMocks(t.mocks)}return o(e,[{key:"_applyMocks",value:function(e){var t=this;Object.keys(e).filter(function(t){return!m.default.isEmpty(e[t])}).forEach(function(r){console.log("Mocking "+r.toLocaleUpperCase()+" requests"),Object.keys(e[r]).forEach(function(n){console.log("Mocking url:",n);var i=e[r][n];_[r](t._options.url+n,function(t){if("function"==typeof i)return console.log("Function returned"),i(t);var o=e[r][n];return console.log("Data returned:",o),o.headers||(o.headers={}),o})})})}},{key:"default",value:function(){return{timeout:5e3}}},{key:"_url",value:function(e){return e.url}},{key:"get",value:function(e,t,r,n,i,o){var a=this._createUrl(e,n,o);console.info("GET",a);var u=f.default.get(a);return this._createPromiseRequest(u,null,t,r,i)}},{key:"patch",value:function(e,t,r,n,i,o){var a=this._createUrl(e,i,o);console.info("PATCH",a);var u=f.default.patch(a).send(t);return this._createPromiseRequest(u,null,r,n)}},{key:"post",value:function(e,t,r,n,i,o){var a=this._createUrl(e,i,o);console.info("POST",a);var u=f.default.post(a).send(t);return this._createPromiseRequest(u,null,r,n)}},{key:"post_multipart",value:function(e,t,r,n,i,o,a){var u=this._createUrl(e,o,a);console.info("POST_MULTIPART",u);var s=f.default.post(u),c=!0;return Object.keys(t).forEach(function(e){switch(e){case"meta":case"json":case"file":s.field(e,t[e]),delete t[e];break;case"hardwareMedia":case"certificate":case"processorBulkFile":s.attach("file",t[e]),c=!1;break;case"files":t[e].forEach(function(t,r){console.log(t.name),s.attach(e,t)}),delete t[e],c=!1;break;case"modelFile":s.field(e,t[e]),delete t[e],c=!1;break;case"bulkFile":s.set("Content-Type",t.ext),t=t.bulkFile}}),c&&s.send(t),this._createPromiseRequest(s,r,n,i)}},{key:"put",value:function(e,t,r,n,i,o){var a=this._createUrl(e,i,o);console.info("PUT",a);var u=f.default.put(a).send(t);return n?n["Content-Type"]="application/json":n={"Content-Type":"application/json"},this._createPromiseRequest(u,null,r,n)}},{key:"put_multipart",value:function(e,t,r,n,i,o,a){var u=this._createUrl(e,o,a);console.info("PUT_MULTIPART",u);var s=f.default.put(u),c=!0;return Object.keys(t).forEach(function(e){switch(e){case"meta":case"json":case"file":s.field(e,t[e]),delete t[e];break;case"hardwareMedia":case"certificate":case"processorBulkFile":s.attach("file",t[e]),c=!1;break;case"files":t[e].forEach(function(t,r){console.log(t.name),s.attach(e,t)}),delete t[e],c=!1;break;case"modelFile":s.field(e,t[e]),delete t[e],c=!1;break;case"bulkFile":s.set("Content-Type",t.ext),t=t.bulkFile}}),c&&s.send(t),this._createPromiseRequest(s,r,n,i)}},{key:"delete",value:function(e,t,r,n,i,o){var a=this._createUrl(e,n,o);console.info("DELETE",a);var u;return u=i?f.default.del(a).send(i):f.default.del(a),this._createPromiseRequest(u,null,t,r)}},{key:"_createUrl",value:function(e,t,r){var n=[];if(t)for(var i=Object.keys(t),o=0;o<i.length;o++){var a=i[o],u=a+"="+t[a];e=0===o?e+"?"+u:e+"&"+u}var s=e.split("/"),l=s.length;return s.forEach(function(e,t){if(t===l-1&&e.indexOf("?")>0){var r=e.substring(e.indexOf("?"),e.length),i=e.substring(0,e.indexOf("?"));n.push((0,c.default)(i)+r)}else n.push((0,c.default)(e))}),this._url(this._options)+"/"+this._getDefaultBaseURL(r)+"/"+n.join("/")}},{key:"_getDefaultBaseURL",value:function(e){return e||(this._isSouth?"v80":"north/v80")}},{key:"_createPromiseRequest",value:function(e,t,r,n,i){var o=r;void 0!==o&&null!==o||(o=this._options.timeout);var a=h.default.defer(),u=a.promise,s=this._options.apiKey,c=-1===o?e:e.timeout(o);if(s&&(c=c.set("X-ApiKey",this._options.apiKey)),n)for(var l=Object.keys(n),f=0;f<l.length;f++){var d=l[f];void 0!==n[d]&&(c=c.set(d,n[d]))}if(t)for(var p in t)c=c.on(p,t[p]);return i&&e.responseType("blob"),c=c.end(function(e,t){if(null!==e){console.error("OGAPI ERROR: "),console.error(e);var r=void 0,n=e.status?e.status:void 0,i={errors:[{code:n,message:"OGAPI: Something is broken. Please contact with your administrator."}]};void 0!==e.response?(r=e.response.body?e.response.body:i,n=e.status):n?(r=e.message,n=408):(r=i,n=500),a.reject({statusCode:n,data:r})}else a.resolve(t)}),u}}]),e}();r.default=g,t.exports=r.default},{lodash:103,merge:104,q:109,superagent:129,"superagent-mocker":127,urlencode:135}],339:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function(){function e(){n(this,e)}return i(e,null,[{key:"element",value:function(e,t){return{name:e,fields:t}}}]),e}();r.default=o,t.exports=r.default},{}],340:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./NorthAmpliaREST"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e,r){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r),this._isSouth=!0}return i(t,e),o(t,[{key:"_url",value:function(e){return e.south.url}}]),t}(s.default);r.default=c,t.exports=r.default},{"./NorthAmpliaREST":338}],341:[function(e,t,r){"use strict";t.exports={_checkType:function(e,t){var r=[];if(void 0===t.find(function(e){return e==this},e)&&r.push(e),0!==r.length)throw new Error({message:"OGAPI_NOT_ALLOWED_PARAMETER",parameter:JSON.stringify(r),allowed:JSON.stringify(t)});return e},_checkISODateTime:function(e,t){if("string"!=typeof e||new RegExp("\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d+(Z|[+-]\\d{2}:\\d{2})").test(e))throw new Error([{message:"OGAPI_ISO_DATE_TIME_PARAMETER",parameter:t},{message:"OGAPI_STRING_PATTERN",parameter:t}]);try{new Date(e)}catch(e){throw new Error([{message:"OGAPI_ISO_DATE_TIME_PARAMETER",parameter:t},{message:"OGAPI_STRING_PATTERN",parameter:t}])}},_checkStringAndPattern:function(e,t,r){if("string"!=typeof e||!new RegExp(t).test(e))throw new Error([{message:"OGAPI_STRING_PARAMETER",parameter:r},{message:"OGAPI_STRING_PATTERN",parameter:r,pattern:t}])},_checkStringAndLength:function(e,t,r){if("string"!=typeof e||e.length>t)throw new Error([{message:"OGAPI_STRING_PARAMETER",parameter:r},{message:"OGAPI_MAX_LENGTH",parameter:t}])},_checkString:function(e,t){if("string"!=typeof e)throw new Error([{message:"OGAPI_STRING_PARAMETER",parameter:t}])},_checkNumber:function(e,t){if("number"!=typeof e)throw new Error([{message:"OGAPI_NUMBER_PARAMETER",parameter:t}])},_checkArray:function(e,t){if(!Array.isArray(e)||0===e.length)throw new Error({message:"OGAPI_ARRAY_PARAMETER",parameter:t})},_checkObject:function(e,t){if("object"!=typeof e)throw new Error({message:"OGAPI_OBJECT_PARAMETER",parameter:t})}}},{}],342:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(r,"__esModule",{value:!0});var a,u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=e("q"),c=n(s),l=e("lodash"),f=n(l),d=e("./source-precompiled/Fields"),h=e("./IotFields"),p=d.GENERATED_FIELDS;for(var m in h.IOT_FIELDS)if(p[m])for(var y in h.IOT_FIELDS[m])p[m][y]=h.IOT_FIELDS[m][y];else p[m]=h.IOT_FIELDS[m];var v=new RegExp("^(.+)._current\\.?(.+)?$"),_=new RegExp("\\[[0-9]+\\]"),g=(new RegExp("value\\.?"),{"/jobs":"JOB","/tasks":"TASKS","/alarms":"ENTITY_ALARM","/operations":"ENTITY_OPERATION","/operations/history":"ENTITY_OPERATION_HISTORY","/certificates":"CERTIFICATE","/bundles":"UPDATE_BUNDLE_VERSION","/datapoints":"DATAPOINTS","/datastreams":"DATASTREAMS","/datamodels":"DATAMODELS","/dmmQRating":"DMMQRATING","/iotQRating":"IOTQRATING","/catalog/softwares":"SOFTWARE_VERSION","/catalog/hardwares":"MANUFACTURER","/catalog/operators":"OPERATORS","/domains":"DOMAIN","/users":"USER","/areas":"AREAS","/bulk/async":"LEGACY_BULK","provisionProcessors/bulk/search":"BULK","/devices":"SearchOnDatamodel","/subscriptions":"SearchOnDatamodel","/subscribers":"SearchOnDatamodel","/entities":"SearchOnDatamodel","entity-asset":"SearchOnDatamodel","/tickets":"SearchOnDatamodel","/channels":"SearchOnDatamodel",datasets:"SearchOnDataset",timeseries:"SearchOnTimeseries"}),b={ENTITY_ALARM:"alarm",UPDATE_BUNDLE_VERSION:"bundle",DATAPOINTS:"datapoints",ENTITY_OPERATION:["operation","job"]},w={get:function(e){switch(e){case"entity-asset":return["entity.asset"];case"/tickets":return["ticket"];case"/channels":return["channel"];default:return}}},E={subscriber:"DEVICE_PART_SUBSCRIBER",subscription:"DEVICE_PART_SUBSCRIPTION",communicationsModule:"DEVICE_PART_COMMSMODULE",device:"DEVICE_PART_DEVICE"},A={DEVICE_PART_SUBSCRIBER:"subscriber",DEVICE_PART_SUBSCRIPTION:"subscription",DEVICE_PART_COMMSMODULE:"communicationsModule",DEVICE_PART_DEVICE:"device"},O=["relColl","relProv"],S=["DEVICE_PART_SUBSCRIBER","DEVICE_PART_SUBSCRIPTION","DEVICE_PART_COMMSMODULE","DEVICE_PART_DEVICE"],P=["subscriber","subscription","communicationsModule","device"],D="search",C={get:function(e){if(S.indexOf(g[e])>=0)return"complex";switch(g[e]){case"SearchOnDatamodel":return D;case"SearchOnDataset":return"dataset";case"SearchOnTimeseries":return"timeserie";default:return"simple"}}},k=function(e,t){function r(e){for(var t=!0;t;){var r=e;t=!1;{if(!(r.length>0&&r[0].constructor===Array))return r;r=r.reduce(function(e,t){return e.concat(t)}),e=r,t=!0}}}var n=c.default.defer(),i=t.selectedField,o=t.selectAll,a=t.extraData&&t.extraData.organization,u=e._ogapi.datamodelsSearchBuilder(),s={and:[]};return e._resourceTypes&&s.and.push({in:{"datamodels.allowedResourceTypes":e._resourceTypes}}),a&&s.and.push({eq:{"datamodels.organizationName":a}}),i&&s.and.push({eq:{"datamodels.categories.datastreams.identifier":i}}),s.and.length>0&&u.filter(s),u.build().execute().then(function(e){var t=[];200===e.statusCode&&(t=e.data.datamodels.map(function(e){return(e.categories||[]).map(function(e){return(e.datastreams||[]).map(function(e){return i||o?e:e.identifier})})}),t=r(t)),i?n.resolve(t.find(function(e){return i===e.identifier})):n.resolve(t)}).catch(function(e){n.reject(e)}),n.promise},T=function(e,t,r,n){var i=r.selectedField,o=[],a=r.extraData.organization,u=r.extraData[t.entity];e._ogapi[t.api]()[t.method](a,u).then(function(t){if(200===t.statusCode){t.data.identifierColumn&&o.push({identifier:t.data.identifierColumn,name:t.data.identifierColumn,path:"provision.administration.identifier._current.value",indexed:!0,sort:!0,notFilterable:!1,filter:"YES",type:"string",schema:{type:"string"}}),t.data.bucketColumn&&o.push({identifier:t.data.bucketColumn,name:t.data.bucketColumn,path:"provision.administration.identifier._current.at",indexed:!0,sort:!0,notFilterable:!1,filter:"YES",type:"date-time",schema:{type:"string",format:"datetime"}});var a=f.default.concat(t.data.columns||[],t.data.context||[]);e._ogapi.basicTypesSearchBuilder().withPath("$").build().execute().then(function(t){t.data.definitions;if(r.selectAll=!0,i){a=a.filter(function(e){return i===(e.name||e.alias)});var u=a[0],s=u.path.match(v),c=s[1].replace(_,"[]");r.selectedField=c}k(e,r).then(function(e){a.forEach(function(t){"date-time"!==t.type?t.schema={type:t.type}:t.schema={type:"string",format:"datetime"},t.path.endsWith("._current.value")&&function(){var r=t.path.substring(0,t.path.indexOf("._current.value"));Array.isArray(e)&&e.find(function(e){return r===e.identifier})}(),t.identifier=t.name||t.alias,t.indexed="NO"!==t.filter,t.notFilterable="NO"===t.filter,o.push(t)}),n.resolve(o)}).catch(function(e){console.error(e),n.reject(e)})}).catch(function(e){console.error(e),n.reject(e)})}}).catch(function(e){console.error(e),n.reject(e)})},F=(a={},o(a,D,function(e,t){k(this,e).then(function(e){t.resolve(e)}).catch(function(e){t.reject(e)})}),o(a,"simple",function(e,t){var r=e.context,n=e.primaryType,i=e.selectedField,o=[];if(r[n]instanceof Array)i?function(){var e=0,t=null;for(e=0;null===t&&e<r[n].length;e++)!function(){var o=r[n][e];o.toLowerCase()===i.toLowerCase()||o.toLowerCase()===i.toLowerCase()+"name"?t=o:b[n]&&(b[n]instanceof Array?b[n].forEach(function(e){o.toLowerCase()!==e+i.toLowerCase()&&o.toLowerCase()!==e+"."+i.toLowerCase()&&o.toLowerCase()!==e+i.toLowerCase()+"name"&&o.toLowerCase()!==e+"."+i.toLowerCase()+"name"||t||(t=o)}):o.toLowerCase()!==b[n]+i.toLowerCase()&&o.toLowerCase()!==b[n]+"."+i.toLowerCase()&&o.toLowerCase()!==b[n]+i.toLowerCase()+"name"&&o.toLowerCase()!==b[n]+"."+i.toLowerCase()+"name"||(t=o))}();t&&o.push(t)}():o=r[n].slice();else if(i)if(r[n][i])o.push(r[n][i]);else for(var a=Object.keys(r[n]),u=0;u<a.length;u++)r[n][a[u]].toLowerCase().indexOf(i.toLowerCase())>-1&&o.push(r[n][a[u]]);else for(var a=Object.keys(r[n]),u=0;u<a.length;u++)o.push(r[n][a[u]]);t.resolve(o.slice())}),o(a,"complex",function(e,t){function r(e,t){var n=void 0;if(!(r=E[e])||!(n=t[r]))throw new Error("Invalid primaryType: "+e);return n.slice()}function n(e){return e!=this}function i(e,t){var r=[];return t.forEach(function(t){var n=e.slice(0,-1);n.push(t),r.push(n.join("."))}),r}var o=e.states,a=e.context,u=e.primaryType,s={1:function(e,t){return t[u].concat(P.filter(n,A[u]))},2:function(e,t){try{return i(e,r(e[0],t).concat(O))}catch(e){return[]}},3:function(e,t){var n=e[1];if(-1===O.indexOf(n))return[];try{return i(e,r(e[0],t))}catch(e){return[]}}},c=o.length,l=s[c];return void 0===l?t.resolve([]):t.resolve(l(o,a))}),o(a,"dataset",function(e,t){T(this,{api:"newDatasetFinder",method:"findByOrganizationAndDatasetId",entity:"dataset"},e,t)}),o(a,"timeserie",function(e,t){T(this,{api:"newTimeserieFinder",method:"findByOrganizationAndTimeserieId",entity:"timeserie"},e,t)}),a),j=function(){function e(t,r,n){i(this,e),this._ogapi=t,this._url=r,this._type=C.get(r),this._extraData=n,this._type===D&&(this._resourceTypes=w.get(r))}return u(e,[{key:"find",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=c.default.defer(),r={states:e.split("."),context:p[g[this._url]],primaryType:g[this._url],extraData:this._extraData};return F[this._type].call(this,r,t),t.promise}},{key:"findAll",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=c.default.defer(),r={states:e.split("."),context:p[g[this._url]],primaryType:g[this._url],selectAll:!0,extraData:this._extraData};return F[this._type].call(this,r,t),t.promise}},{key:"findFieldPath",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=c.default.defer(),r={states:e,context:p[g[this._url]],primaryType:g[this._url],selectedField:e,extraData:this._extraData};return F[this._type].call(this,r,t),t.promise}}]),e}();r.default=j,t.exports=r.default},{"./IotFields":343,"./source-precompiled/Fields":344,lodash:103,q:109}],343:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DATAPOINTS:{DATAPOINTS:["datapoints.organization","datapoints.channel","datapoints.datastreamId","datapoints.entityIdentifier","datapoints.subEntityIdentifier","datapoints.entityRelated","datapoints._current.feedId","datapoints._current.date","datapoints._current.at","datapoints._current.value","datapoints._current.tags","datapoints._current.scoring.performance","datapoints._current.scoring.qrating.min_required.value","datapoints._current.scoring.qrating.min_required.label","datapoints._current.scoring.qrating.min_desired.value","datapoints._current.scoring.qrating.min_desired.label","datapoints._current.scoring.qrating.ideal.value","datapoints._current.scoring.qrating.ideal.label","datapoints._current.scoring.qrating.max_desired.value","datapoints._current.scoring.qrating.max_desired.label","datapoints._current.scoring.qrating.max_allowed.value","datapoints._current.scoring.qrating.max_allowed.label","datapoints._current.scoring.qrating.max_score","datapoints._current.scoring.qrating.cumulative_period_divisor","datapoints._current.scoring.qrating.conversion_matrix","datapoints._current.scoring.qrating.version"]},DATAMODELS:{DATAMODELS:["datamodels.organizationName","datamodels.identifier","datamodels.name","datamodels.description","datamodels.version","datamodels.categories.name","datamodels.categories.identifier","datamodels.categories.datastreams.identifier","datamodels.categories.datastreams.name","datamodels.categories.datastreams.description","datamodels.categories.datastreams.hardwareIds","datamodels.categories.datastreams.unit","datamodels.categories.datastreams.unit.type","datamodels.categories.datastreams.unit.label","datamodels.categories.datastreams.unit.symbol","datamodels.categories.datastreams.period","datamodels.categories.datastreams.access","datamodels.categories.datastreams.schema","datamodels.categories.datastreams.storage","datamodels.categories.datastreams.storage.period","datamodels.categories.datastreams.storage.total","datamodels.categories.datastreams.tags","datamodels.categories.datastreams.views","datamodels.categories.datastreams.icon","datamodels.categories.datastreams.modifiable","datamodels.categories.datastreams.required","datamodels.categories.datastreams.qrating.min_required.value","datamodels.categories.datastreams.qrating.min_required.label","datamodels.categories.datastreams.qrating.min_desired.value","datamodels.categories.datastreams.qrating.min_desired.label","datamodels.categories.datastreams.qrating.ideal.value","datamodels.categories.datastreams.qrating.ideal.label","datamodels.categories.datastreams.qrating.max_desired.value","datamodels.categories.datastreams.qrating.max_desired.label","datamodels.categories.datastreams.qrating.max_allowed.value","datamodels.categories.datastreams.qrating.max_allowed.label","datamodels.categories.datastreams.qrating.max_score","datamodels.categories.datastreams.qrating.cumulative_period_divisor","datamodels.categories.datastreams.qrating.conversion_matrix","datamodels.categories.datastreams.qrating.version"]},DATASTREAMS:{DATASTREAMS:["datastreams.datastreamId","datastreams.name","datastreams.description","datastreams.unit.type","datastreams.unit.label","datastreams.unit.symbol","datastreams.period","datastreams._current.tags","datastreams._current.date","datastreams._current.value","datastreams.categoryId","datastreams.datamodelId","datastreams.access","datastreams.channel","datastreams.organization","datastreams.entityIdentifier","feeds.entityIdentifier","datastreams._id.subEntityIdentifier","datastreams._current.scoring.qrating.min_required.value","datastreams._current.scoring.qrating.min_required.label","datastreams._current.scoring.qrating.min_desired.value","datastreams._current.scoring.qrating.min_desired.label","datastreams._current.scoring.qrating.ideal.value","datastreams._current.scoring.qrating.ideal.label","datastreams._current.scoring.qrating.max_desired.value","datastreams._current.scoring.qrating.max_desired.label","datastreams._current.scoring.qrating.max_allowed.value","datastreams._current.scoring.qrating.max_allowed.label","datastreams._current.scoring.qrating.max_score","datastreams._current.scoring.qrating.cumulative_period_divisor","datastreams._current.scoring.qrating.max_score","datastreams._current.scoring.qrating.conversion_matrix","datastreams.version","feeds.identifier","datastreams._current.scoring.qrating.version","datastreams._current.scoring.scoringPerformance"]},DEVICE_PART_DEVICE:{
39
- IOT:["datastream.id","datastream.name","datastream.feed","datastream.device","datastream.description","datastream.unit.type","datastream.unit.label","datastream.unit.symbol","datastream.period","datastream.tags","datastream.updated","datastream.minValue","datastream.maxValue","datastream.currentValue","datastream.categoryName","datastream.profileId","datastream.profileName","datastream.profileDescription","datastream.profileVersion","datastream.qratingScoringQValue","datastream.qratingScoringQScore","datastream.qratingScoringQuality","datastream.qratingScoringPerformance","datastream.qratingMinRequiredValue","datastream.qratingMinRequiredLabel","datastream.qratingMinDesiredValue","datastream.qratingMinDesiredLabel","datastream.qratingIdealValue","datastream.qratingIdealLabel","datastream.qratingMaxDesiredValue","datastream.qratingMaxDesiredLabel","datastream.qratingMaxAllowedValue","datastream.qratingMaxAllowedLabel","datastream.qratingMaxScore","deviceId","feedId","deviceOrganization","profile.Name","profile.Description","profile.Version","profile.Score","profile.MaxScore","profile.Performance","profile.AvgPerformance","profile.Quality","category.Name","category.Score","category.MaxScore","category.Performance","category.AvgPerformance","category.Quality","device.Score","device.MaxScore","device.Performance","device.AvgPerformance","device.Quality","device.Channel","device.EntityType"]},USER:{USER:{email:"user.email",description:"user.description",workgroup:"workgroup.name",domain:"domain.name",profile:"profile.name",name:"user.name",surname:"user.surname",countryCode:"country.code",langCode:"language.code",timezone:"user.timezone"}},DOMAIN:{DOMAIN:["domain.name","domain.description"]},AREAS:{AREAS:{identifier:"areas.identifier",name:"areas.name",description:"areas.description",entities:"areas.entities",geometry:"areas.geometry",color:"areas.color",organization:"areas.organization"}},TASKS:{TASKS:["tasks.id","tasks.name","tasks.description","tasks.state","tasks.domain","tasks.workgroup","tasks.job.request.user"]},LEGACY_BULK:{LEGACY_BULK:{identifier:"bulks.identifier",organization:"bulks.organization",fileName:"bulks.request.fileName",userEmail:"bulks.request.userEmail",headerAccept:"bulks.request.header.accept",contentType:"bulks.request.header.contentType",headerCsvFormat:"bulks.request.header.csvFormat",paramsFlattened:"bulks.request.params.flattened",paramsAction:"bulks.request.params.action",paramsFull:"bulks.request.params.full",paramsType:"bulks.request.params.type",status:"bulks.status",startedDate:"bulks.startedDate",finishedDate:"bulks.finishedDate",processed:"bulks.summary.processed",successful:"bulks.summary.successful",error:"bulks.summary.error"}},BULK:{BULK:{identifier:"bulks.identifier",provisionProcessorId:"bulks.provisionProcessorId",organization:"bulks.organization",userEmail:"bulks.request.userEmail",fileName:"bulks.request.fileName",headerAccept:"bulks.request.header.accept",contentType:"bulks.request.header.contentType",status:"bulks.status",startedDate:"bulks.startedDate",finishedDate:"bulks.finishedDate",processed:"bulks.summary.processed",successful:"bulks.summary.successful",error:"bulks.summary.error"}},RULE:{RULE:{organizationId:"rule.organizationId",channelId:"rule.channelId",name:"rule.name",active:"rule.active"}},ENTITY_ALARM:{ENTITY_ALARM:{alarmId:"alarm.identifier",alarmSubEntityIdentifier:"alarm.subEntityIdentifier",entityId:"alarm.entityIdentifier",entityType:"alarm.resourceType",organizationName:"alarm.organization",channelName:"alarm.channel",alarmRuleName:"alarm.rule",alarmName:"alarm.name",alarmSeverity:"alarm.severity",alarmPriority:"alarm.priority",alarmDescription:"alarm.description",alarmStatus:"alarm.status",alarmOpenDate:"alarm.openingDate",alarmAttentionDate:"alarm.attentionDate",alarmAttentionUser:"alarm.attentionUser",alarmAttentionNote:"alarm.attentionNote",alarmClosureDate:"alarm.closureDate",alarmClosureUser:"alarm.closureUser",alarmClosureNote:"alarm.closureNote"}},GENERAL:{GENERAL:[]},EMPTY:{EMPTY:[]},OPERATORS:{OPERATORS:["operator.name"]}};r.IOT_FIELDS=n},{}],344:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={ENTITY_OPERATION_HISTORY:{ENTITY_OPERATION_HISTORY:["applicationEmail","entityId","entityType","jobActivatedDate","jobId","jobUserNotes","operationAttemptCurrent","operationAttemptMax","operationDate","operationDetails","operationEndDate","operationId","operationInitDate","operationName","operationNotify","operationParameters","operationResult","operationStatus","operationSteps"]},ENTITY_OPERATION:{ENTITY_OPERATION:["applicationEmail","channelKey","channelName","domainKey","entityId","entityType","entityUk","jobActivatedDate","jobEntityTotal","jobErrorCode","jobErrorDescription","jobFinishedCancelledByEngine","jobFinishedCancelledByExternal","jobFinishedCancelledByExternalTimeout","jobFinishedCancelledByTimeout","jobFinishedCancelledByUser","jobFinishedCancelledTotal","jobFinishedDate","jobFinishedError","jobFinishedOotError","jobFinishedOotSuccessful","jobFinishedOotTotal","jobFinishedSuccessful","jobFinishedTotal","jobId","jobInProgressPendingExecution","jobInProgressScheduled","jobInProgressStarted","jobInProgressTotal","jobInProgressWaitingForConnection","jobJson","jobStartedDate","jobState","jobStatus","jobTotal","jobUser","jobUserNotes","notDeletable","operationAttemptCurrent","operationAttemptMax","operationDate","operationDetails","operationEndDate","operationId","operationInitDate","operationJson","operationName","operationNotify","operationResult","operationScheduleTimestamp","operationStatus","operationStatusKey","operationStepDescription","operationStepName","operationStepResponse","operationStepResult","operationStepTimestamp","operationTimeoutTimestamp","operationUserNotes","organizationKey","organizationName","profileKey","provAdministrativeState","provAdministrativeStateKey","provDefaultFeed","serviceGroupName","tag","taskEmpty_null","taskId","taskKey","taskName","taskState","taskStatus","workgroupKey","workgroupName"]},MANUFACTURER:{MANUFACTURER:["manufacturerAddress","manufacturerDescription","manufacturerEmail","manufacturerFax","manufacturerIdentifier","manufacturerMediaFileName","manufacturerMediaHeight","manufacturerMediaIdentifier","manufacturerMediaName","manufacturerMediaSize","manufacturerMediaTypeName","manufacturerMediaWidth","manufacturerName","manufacturerNotes","manufacturerTelephone","manufacturerUrl","modelDescription","modelIdentifier","modelMediaFileName","modelMediaHeight","modelMediaIdentifier","modelMediaName","modelMediaSize","modelMediaTypeName","modelMediaWidth","modelName","modelNotes","modelUrl","modelVersion"]},MODEL:{MODEL:["modelDescription","modelIdentifier","modelName","modelNotes","modelUrl","modelVersion"]},JOB:{JOB:["jobActivatedDate","jobActivatedTime","jobCallback","jobEntityTotal","jobErrorCode","jobErrorDescription","jobFinishedCancelledByEngine","jobFinishedCancelledByExternal","jobFinishedCancelledByExternalTimeout","jobFinishedCancelledByTimeout","jobFinishedCancelledByUser","jobFinishedCancelledTotal","jobFinishedDate","jobFinishedError","jobFinishedOotError","jobFinishedOotSuccessful","jobFinishedOotTotal","jobFinishedSuccessful","jobFinishedTime","jobFinishedTotal","jobId","jobInProgressPendingExecution","jobInProgressScheduled","jobInProgressStarted","jobInProgressTotal","jobInProgressWaitingForConnection","jobJson","jobOperationName","jobScheduledTime","jobStartedDate","jobState","jobStatus","jobTotal","jobTrap","jobUser","jobUserNotes","jobVisible","operationId","operationName","operationResult","operationStatusKey","taskCoremessage","taskId","taskKey","taskName","taskNextExecution","taskState","taskStatus"]},SOFTWARE_VERSION:{SOFTWARE_VERSION:["manufacturerAddress","manufacturerDescription","manufacturerEmail","manufacturerFax","manufacturerIdentifier","manufacturerName","manufacturerNotes","manufacturerTelephone","manufacturerUrl","modelDescription","modelIdentifier","modelName","modelNotes","modelUrl","modelVersion","softwareId","softwareName","softwareType","softwareVersion"]},UPDATE_BUNDLE_VERSION:{UPDATE_BUNDLE_VERSION:["bundleActionDef","bundleActionOrder","bundleActionType","bundleActive","bundleConstrained","bundleCreationDate","bundleDeploymentElementDownloadUrl","bundleDeploymentElementId","bundleDeploymentElementName","bundleDeploymentElementOperation","bundleDeploymentElementOption","bundleDeploymentElementOrder","bundleDeploymentElementPath","bundleDeploymentElementSize","bundleDeploymentElementType","bundleDeploymentElementValidators","bundleDeploymentElementVersion","bundleDescription","bundleHardware","bundleId","bundleName","bundleUserNotes","bundleVersion","bundleWorkgroup","updateBundleDate","updateBundleManufacturer","updateBundleModel","updateBundleName","updateBundleVersion","updateBundleVersionUuid","updateDescription"]},CERTIFICATE:{CERTIFICATE:["certificateAdministrativeState","certificateDescription","certificateDomain","certificateId","certificateIssuer","certificateManufacturer","certificateModel","certificateModelIdentifier","certificateModelVersion","certificateName","certificatePublicKeyAlgorithm","certificatePublicKeyFormat","certificatePublicKeySize","certificateSerialNumber","certificateSubject","certificateTag","certificateTrustChain","certificateUsage","certificateValidFrom","certificateValidUntil","certificateVersion"]}};r.GENERATED_FIELDS=n},{}],345:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"domains","workgroup","Workgroup not found")}return i(t,e),o(t,[{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._domain+"/workgroups/"+this._name}},{key:"findByDomainAndName",value:function(e,t){return this._domain=e,this._name=t,this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],346:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../provision/BaseProvision"),c=n(s),l=e("./Workgroups"),f=n(l),d=e("../channels/Channels"),h=n(d),p=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/domains",void 0,["workgroup","channels"]),this._ogapi=e,this._action="CREATE"}return o(t,e),a(t,[{key:"withWorkgroup",value:function(e){if(e.constructor.prototype!=f.default.prototype)throw new Error("Parameter workgroup must be a workgroup");return this._workgroup=e,this}},{key:"withChannel",value:function(e){if(e.constructor.prototype!=h.default.prototype)throw new Error("Parameter channel must be a channel");return this._channels||(this._channels=[]),this._channels.push({organization:e._organization,channel:e._name}),this}},{key:"_composeElement",value:function(){return this._checkRequiredParameters(),this._resource="provision/domains/"+this._workgroup._domainName+"/workgroups/"+this._workgroup._name+"/relations",{workgroupRelation:{channels:this._channels?this._channels:void 0}}}},{key:"_buildURL",value:function(){return"provision/domains/"+this._workgroup._domainName+"/workgroups/"+this._workgroup._name+"/relations"}},{key:"create",value:function(){var e=this._composeElement(),t=this._resource;return this._setUrlParameters({action:"CREATE"}),this._doNorthPost(t,e)}},{key:"delete",value:function(){this._setUrlParameters({action:"DELETE"});var e=this._buildURL();if(this._channels){var t=this._composeElement();return this._doNorthPost(e,t)}return this._doNorthPost(e,{workgroupRelation:{channels:[]}})}},{key:"update",value:function(){throw new Error("Workgroup relation update not allowed")}}]),t}(c.default);r.default=p,t.exports=r.default},{"../channels/Channels":161,"../provision/BaseProvision":235,"./Workgroups":348}],347:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"domains","workgroup","Workgroup relation not found")}return i(t,e),o(t,[{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._domain+"/workgroups/"+this._name+"/relations"}},{key:"findByDomainAndName",value:function(e,t){return this._domain=e,this._name=t,this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],348:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("q"),c=n(s),l=e("../provision/BaseProvision"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/domains",void 0,["name","domainName"]),this._ogapi=e}return o(t,e),a(t,[{key:"withName",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"name"});return this._name=e,this}},{key:"withDescription",value:function(e){if("string"!=typeof e||e.length>250)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_250",parameter:"description"});return this._description=e,this}},{key:"withAdministrative",value:function(e){return this._administrative=e,this}},{key:"withDomainName",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"domainName"});return this._domainName=e,this}},{key:"_composeElement",value:function(){return this._checkRequiredParameters(),this._resource="provision/domains/"+this._domainName+"/workgroups",{workgroup:{name:this._name||void 0,description:this._description||void 0,administrative:this._administrative||!1}}}},{key:"_composeElementUpdate",value:function(){return this._checkRequiredParameters(),this._resource="provision/domains/"+this._domainName+"/workgroups",{workgroup:{description:this._description||void 0}}}},{key:"_buildURL",value:function(){return"provision/domains/"+this._domainName+"/workgroups/"+this._name}},{key:"update",value:function(){var e=c.default.defer(),t=e.promise;return this._ogapi.Napi.put(this._buildURL(),this._composeElementUpdate(),void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(t){200===t.statusCode?e.resolve({statusCode:t.statusCode}):200===t.status?e.resolve({statusCode:t.status}):e.reject({errors:t.errors,statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}}]),t}(f.default);r.default=d,t.exports=r.default},{"../provision/BaseProvision":235,q:109}]},{},[1]);
40
- //# sourceMappingURL=opengate-api-bower-12.2.0.min.js.map
35
+ u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}},{key:"group",value:function(e){return this._builderParams.group=e||{},this}},{key:"select",value:function(e){return this._builderParams.select=e||[],this}},{key:"build",value:function(){return new h.default(this._parent,this._buildUrl(),this._buildFilter(),this._buildLimit(),this._buildSort(),this._buildGroup(),this._buildSelect(),this._builderParams.timeout,this._urlParams)}}]),t}(c.default);r.default=m},{"../../util/searchingFields/FieldFinder":342,"../EntitySearch":260,"./SearchWithSummaryBuilder":308}],282:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d=e("../WPSearch"),h=n(d),p="datasets";r.BASE_URL=p;var m=function(e){function t(e,r,n){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,p,{organization:r,dataset:n})),this._url=p+"/provision/organizations/"+r+"/"+n+"/data"}return o(t,e),a(t,[{key:"group",value:function(e){return this._builderParams.group=e||{},this}},{key:"select",value:function(e){return this._builderParams.select=e||[],this}},{key:"build",value:function(){return new h.default(this._parent,this._buildUrl(),this._buildFilter(),this._buildLimit(),this._buildSort(),this._buildGroup(),this._buildSelect(),this._builderParams.timeout,this._urlParams)}}]),t}(c.default);r.default=m},{"../../util/searchingFields/FieldFinder":342,"../WPSearch":265,"./SearchBuilder":307}],283:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/catalog/datasets",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],284:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../Search"),l=(n(c),e("../../util/searchingFields/FieldFinder")),f=n(l),d="/datastreams",h=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d}return o(t,e),t}(s.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"../Search":262,"./SearchBuilder":307}],285:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchWithSummaryBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/catalog/plans/device",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d}return o(t,e),a(t,[{key:"withDomain",value:function(e){if("string"!=typeof e)throw new Error("Parameter domainName must be a string");return this._domainName=e,this}},{key:"_buildUrl",value:function(){if(!this._domainName)throw new Error("Parameter domainName must be defined");return this._url=d+"?domainName="+this._domainName,u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],286:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./PreFilteredSearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/entities",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d}return o(t,e),a(t,[{key:"summary",value:function(){return this._url=this._url+"/summary",this}},{key:"_buildFilter",value:function(){var e={and:[{exists:{"provision.device.identifier":!0}}]};if(this._builderParams.filter&&Object.keys(this._builderParams.filter).length>0){var t=this._builderParams.filter;void 0!==t._filterTemplate?e.and.push(t._filterTemplate.filter):e.and.push(t)}return{filter:e}}},{key:"group",value:function(e){return this._builderParams.group=e||{},this}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./PreFilteredSearchBuilder":303}],287:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchWithSummaryBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/domains",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d,this._summary=!1}return o(t,e),a(t,[{key:"summary",value:function(){return this._summary=!0,this}},{key:"_buildUrl",value:function(){return this._summary&&(this._url=this._url+"/summary"),u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],288:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchWithSummaryBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d=e("../EntitySearch"),h=n(d),p="$_token";r.TOKEN_URL=p;var m=function(e){function t(e){var r=arguments.length<=1||void 0===arguments[1]?new f.default(e,"/entities"):arguments[1];return function(){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{onDevices:"/devices"},r),this._url="/entities"+p}.apply(this,arguments)}return o(t,e),a(t,[{key:"flattened",value:function(){return this._urlParams.flattened=!0,this}},{key:"disableDefaultSorted",value:function(){return this._urlParams.defaultSorted=!1,this}},{key:"disableCaseSensitive",value:function(e){return this._urlParams.caseSensitive=e||!1,this}},{key:"removeCaseSensitive",value:function(){return this._urlParams&&delete this._urlParams.caseSensitive,this}},{key:"_buildUrl",value:function(){for(var e in this._routes)this._builderParams[e]&&(this._url=this._url.replace(p,this._routes[e]));return this._url=this._url.replace(p,""),u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}},{key:"group",value:function(e){return this._builderParams.group=e||{},this}},{key:"select",value:function(e){return this._builderParams.select=e||[],this}},{key:"build",value:function(){return new h.default(this._parent,this._buildUrl(),this._buildFilter(),this._buildLimit(),this._buildSort(),this._buildGroup(),this._buildSelect(),this._builderParams.timeout,this._urlParams)}}]),t}(c.default);r.default=m},{"../../util/searchingFields/FieldFinder":342,"../EntitySearch":260,"./SearchWithSummaryBuilder":308}],289:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchWithSummaryBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/operations/history",d=function(e){function t(e){var r=arguments.length<=1||void 0===arguments[1]?new l.default(e,"/operations/history"):arguments[1];return function(){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},r),this._url="/entities"+f}.apply(this,arguments)}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],290:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchWithSummaryBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="$_token";r.TOKEN_URL=d;var h=function(e){function t(e){var r=arguments.length<=1||void 0===arguments[1]?new f.default(e,"/operations"):arguments[1];return function(){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{onDevices:"/devices",onSubscribers:"/subscribers",onSubscriptions:"/subscriptions",onCommunicationsModules:"/communicationsModules"},r),this._url="/entities"+d+"/operations"}.apply(this,arguments)}return o(t,e),a(t,[{key:"_buildUrl",value:function(){this._checkConstraintRoutes();for(var e in this._routes)this._builderParams[e]&&(this._url=this._url.replace(d,this._routes[e]));return u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}}]),t}(c.default);r.default=h},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],291:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/feeds",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],292:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/fieldsDefinition",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._builderParams.timeout,"fieldsDefinition",this.customFilters)}},{key:"withType",value:function(e){if("string"!=typeof e)throw new Error("Parameter type must be a string");return this.customFilters.type=e,this}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],293:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../DeviceSearch"),f=n(l),d=function(e){function t(e,r,n){if(i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,n),this.constructor===t)throw new Error("Cannot construct Abstract instances directly")}return o(t,e),a(t,[{key:"flattened",value:function(){return this._urlParams.flattened=!0,this}},{key:"_buildUrl",value:function(){return u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}},{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._buildLimit(),this._buildSort(),this._buildGroup(),this._buildSelect(),this._builderParams.timeout,this._urlParams)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../DeviceSearch":259,"./SearchBuilder":307}],294:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchWithSummaryBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/catalog/hardwares",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d}return o(t,e),a(t,[{key:"group",value:function(e){return this._builderParams.group=e||{},this}},{key:"select",value:function(e){return this._builderParams.select=e,this}},{key:"flattened",value:function(){return this._urlParams.flattened=!0,this}},{key:"disableDefaultSorted",value:function(){return this._urlParams.defaultSorted=!1,this}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],295:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/ioTDatastreamAccess",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),null,this._builderParams.timeout,"ioTDatastreamAccess",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],296:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/ioTDatastreamPeriod",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),null,this._builderParams.timeout,"ioTDatastreamPeriod",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],297:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/ioTDatastreamStoragePeriod",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),null,this._builderParams.timeout,"ioTDatastreamStoragePeriod",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],298:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/catalog/operators",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],299:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/operationTypes",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],300:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/operationalStatus",
36
+ this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._builderParams.timeout,"operationalStatus",this.customFilters)}},{key:"withId",value:function(e){if("string"!=typeof e)throw new Error("Parameter id must be a string");return this.customFilters.id=e,this}},{key:"withEntityType",value:function(e){if("string"!=typeof e)throw new Error("Parameter entityType must be a string");return this.customFilters.entityType=e,this}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],301:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchWithSummaryBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/jobs",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],302:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchWithSummaryBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/catalog/plans/organization",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d}return o(t,e),a(t,[{key:"withDomain",value:function(e){if("string"!=typeof e)throw new Error("Parameter domainName must be a string");return this._domainName=e,this}},{key:"_buildUrl",value:function(){if(!this._domainName)throw new Error("Parameter domainName must be defined");return this._url=d+"?domainName="+this._domainName,u(Object.getPrototypeOf(t.prototype),"_buildUrl",this).call(this)}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],303:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./FlattenedSearchBuilder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e,r,i){if(n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,i),this.constructor===t)throw new Error("Cannot construct Abstract instances directly")}return i(t,e),o(t,[{key:"provisioned",value:function(){return this._provisioned=!0,this}},{key:"collected",value:function(){return this._collected=!0,this}},{key:"select",value:function(e){return this._builderParams.select=e||[],this}},{key:"disableDefaultSorted",value:function(){return this._urlParams.defaultSorted=!1,this}},{key:"disableCaseSensitive",value:function(e){return this._urlParams.caseSensitive=e||!1,this}},{key:"removeCaseSensitive",value:function(){return this._urlParams&&delete this._urlParams.caseSensitive,this}}]),t}(s.default);r.default=c,t.exports=r.default},{"./FlattenedSearchBuilder":293}],304:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=(e("./SearchBuilder"),e("../Search")),a=function(e){return e&&e.__esModule?e:{default:e}}(o),u=function(){function e(t){n(this,e),this._api=t}return i(e,[{key:"from",value:function(e){if("string"!=typeof e)throw new Error("Url parameter is mandatory and must be a string");return this._url=e,this}},{key:"filter",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return this._filter={filter:e},this}},{key:"limit",value:function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];return this._limit={limit:e},this}},{key:"build",value:function(){if("string"!=typeof this._url)throw new Error("Url parameter is mandatory and must be a string");return new a.default(this._api,this._url,this._filter,this._limit,{})}}]),e}();r.default=u,t.exports=r.default},{"../Search":262,"./SearchBuilder":307}],305:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/resourceType",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),null,this._builderParams.timeout,"resourceType",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],306:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/rules",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],307:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=e("../Search"),a=function(e){return e&&e.__esModule?e:{default:e}}(o),u=function(){function e(t,r,i){var o=this;if(n(this,e),this.constructor===e)throw new Error("Cannot construct Abstract instances directly");this._url="",this._fieldFinder=i,this._parent=t,this._routes=r,this._routesName=[],this._builderParams={summary:!1,sort:[],filter:{},limit:void 0,group:void 0,select:void 0};for(var a in this._routes)!function(e){o._routesName.push(e),o._builderParams[e]=!1,o[e]=function(){var t=arguments.length<=0||void 0===arguments[0]?e:arguments[0];return o._builderParams[t]=!0,o}}(a);this._urlParams={}}return i(e,[{key:"findFields",value:function(e){return this._fieldFinder.find(e)}},{key:"findAllFields",value:function(e){return this._fieldFinder.findAll(e)}},{key:"findFieldPath",value:function(e){return this._fieldFinder.findFieldPath(e)}},{key:"withTimeout",value:function(){var e=arguments.length<=0||void 0===arguments[0]?2e3:arguments[0];if("number"!=typeof e)throw new Error("Parameter ms must be a number");return this._builderParams.timeout=e,this}},{key:"filter",value:function(e){return this._builderParams.filter=e||{},this}},{key:"addSortAscendingBy",value:function(e){return this.addSortBy(e,"ASCENDING")}},{key:"addSortDescendingBy",value:function(e){return this.addSortBy(e,"DESCENDING")}},{key:"addSortBy",value:function(e,t){if(e&&t)if(this._builderParams.sort.length>0){var r=0,n=!1;for(r=0;r<this._builderParams.sort.length;r++)this._builderParams.sort[r].name===e&&(this._builderParams.sort[r].type=t,n=!0);n||this._builderParams.sort.push({name:e,type:t})}else this._builderParams.sort.push({name:e,type:t});return this}},{key:"removeSortBy",value:function(e){if(e){if(this._builderParams.sort.length>0){var t=0;for(t=0;t<this._builderParams.sort.length;t++)this._builderParams.sort[t].name===e&&(this._builderParams.sort.splice(t,t+1),t--)}}else this._builderParams.sort=[];return this}},{key:"limit",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?1:arguments[1];if("number"!=typeof e)throw new Error("size parameter must be a number");return("number"!=typeof t||t<1)&&(t=1),this._builderParams.limit={size:e,start:t},this}},{key:"build",value:function(){try{return new a.default(this._parent,this._buildUrl(),this._buildFilter(),this._buildLimit(),this._buildSort(),this._buildGroup(),this._buildSelect(),this._builderParams.timeout,this._urlParams)}catch(e){console.error("!errrrror!!!!!!",e)}}},{key:"_buildFilter",value:function(){var e=this._builderParams.filter;return void 0!==e._filterTemplate?e._filterTemplate:{filter:e}}},{key:"_buildSelect",value:function(){var e=this._builderParams.select;return void 0!==e&&void 0!==e._selectTemplate?e._selectTemplate:{select:e}}},{key:"_buildGroup",value:function(){var e=this._builderParams.group;return void 0!==e&&void 0!==e._groupTemplate?e._groupTemplate:{group:e}}},{key:"_buildLimit",value:function(){return void 0===this._builderParams.limit?{limit:{size:1e3,start:1}}:{limit:this._builderParams.limit}}},{key:"_buildSort",value:function(){if(0!==this._builderParams.sort.length)return{sort:{parameters:this._builderParams.sort}}}},{key:"_buildUrl",value:function(){if("string"!=typeof this._url||0===this._url.trim().length)throw new Error("Error on extends SearchBuilder, this._url is not defined.");return this._url}},{key:"_checkConstraintRoutes",value:function(){var e=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],t=!1;for(var r in this._routes){if(t&&this._builderParams[r]&&!e)throw new Error("Must select only one of this:"+JSON.stringify(this._routesName));t=t||this._builderParams[r]}if(!t)throw new Error("Must select one at least: "+JSON.stringify(this._routesName))}}]),e}();r.default=u,t.exports=r.default},{"../Search":262}],308:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchBuilder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e,r,i){if(n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r,i),this.constructor===t)throw new Error("Cannot construct Abstract instances directly")}return i(t,e),o(t,[{key:"summary",value:function(){return this._url=this._url+"/summary",this}}]),t}(s.default);r.default=c,t.exports=r.default},{"./SearchBuilder":307}],309:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d="serviceGroups",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/"+d,this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._builderParams.timeout,d,this.customFilters)}},{key:"withEntityType",value:function(e){if("string"!=typeof e)throw new Error("Parameter entityType must be a string");return this.customFilters.entityType=e,this}}]),t}(c.default);r.default=h,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],310:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchWithSummaryBuilder"),c=n(s),l=e("merge"),f=n(l),d=e("../../util/searchingFields/FieldFinder"),h=n(d),p=["SOFTWARE","FIRMWARE"];r.SOFTWARE_TYPES_ENUM=p;var m="/catalog/softwares",y=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new h.default(e,m)),this._url=m,this.fluentFilter=e.newFilterBuilder(),this.tagsFilter=[]}return o(t,e),a(t,[{key:"withId",value:function(e){if("string"!=typeof e)throw new Error("Parameter softwareId must be a string");return this.fluentFilter.and(this._parent.EX.eq("softwareId",e)),this}},{key:"withName",value:function(e){if("string"!=typeof e)throw new Error("Parameter softwareName must be a string");return this.fluentFilter.and(this._parent.EX.eq("softwareName",e)),this}},{key:"withType",value:function(e){if("string"!=typeof e)throw new Error("Parameter version must be a string");var t="";if(void 0===p.find(function(e){return e==this},e)&&(t=e),""!==t)throw new Error("Parameter in TYPE is not allowed. Parameter value '"+JSON.stringify(t)+"', parameters allowed in administrativeState are: '"+JSON.stringify(p)+"'");return this.fluentFilter.and(this._parent.EX.eq("softwareType",e)),this}},{key:"withVersion",value:function(e){if("string"!=typeof e)throw new Error("Parameter version must be a string");return this.fluentFilter.and(this._parent.EX.eq("softwareVersion",e)),this}},{key:"withHardwareId",value:function(e){if("string"!=typeof e)throw new Error("Parameter hardwareId must be a string");return this.fluentFilter.and(this._parent.EX.eq("hardwareId",e)),this}},{key:"withModel",value:function(e){if("string"!=typeof e)throw new Error("Parameter modelName must be a string");return this.fluentFilter.and(this._parent.EX.eq("modelName",e)),this}},{key:"withModelVersion",value:function(e){if("string"!=typeof e)throw new Error("Parameter modelVersion must be a string");return this.fluentFilter.and(this._parent.EX.eq("modelVersion",e)),this}},{key:"withManufacturer",value:function(e){if("string"!=typeof e)throw new Error("Parameter manufacturerName must be a string");return this.fluentFilter.and(this._parent.EX.eq("manufacturerName",e)),this}},{key:"_buildFilter",value:function(){var e={filter:{}},t=(0,f.default)(!0,this.fluentFilter),r=this._builderParams.filter;if(t=t._filterTemplate.filter,"object"==typeof r._filterTemplate&&(r=r._filterTemplate.filter),void 0!==r&&Object.keys(r).length>0&&void 0!==t&&Object.keys(t).length>0)throw new Error("Incompatible filters. You only can create a filter using fluent mode [withId, withName, withVersion, withType, withHardwareId, withModel, withModelVersion, withManufacturer] methods or custom filter [filter] method");return void 0!==r&&Object.keys(r).length>0?e.filter=r:void 0!==t&&Object.keys(t).length>0&&(e.filter=t),e}}]),t}(c.default);r.default=y},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308,merge:104}],311:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./PreFilteredSearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/entities",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,"/subscribers")),this._url=d}return o(t,e),a(t,[{key:"_buildFilter",value:function(){var e={and:[{or:[]}]};if(!this._provisioned&&this._collected||e.and[0].or.push({exists:{"provision.device.communicationModules[].subscriber.identifier":!0}}),!this._collected&&this._provisioned||e.and[0].or.push({exists:{"device.communicationModules[].subscriber.identifier":!0}}),this._builderParams.filter&&Object.keys(this._builderParams.filter).length>0){var t=this._builderParams.filter;void 0!==t._filterTemplate?e.and.push(t._filterTemplate.filter):e.and.push(t)}return{filter:e}}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./PreFilteredSearchBuilder":303}],312:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./PreFilteredSearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/entities",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,"/subscriptions")),this._url=d}return o(t,e),a(t,[{key:"_buildFilter",value:function(){var e={and:[{or:[]}]};if(!this._provisioned&&this._collected||e.and[0].or.push({exists:{"provision.device.communicationModules[].subscription.identifier":!0}}),!this._collected&&this._provisioned||e.and[0].or.push({exists:{"device.communicationModules[].subscription.identifier":!0}}),this._builderParams.filter&&Object.keys(this._builderParams.filter).length>0){var t=this._builderParams.filter;void 0!==t._filterTemplate?e.and.push(t._filterTemplate.filter):e.and.push(t)}return{filter:e}}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./PreFilteredSearchBuilder":303}],313:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchWithSummaryBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/tasks",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],314:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/ticketPriority",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),null,this._builderParams.timeout,"ticketPriority",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],315:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/ticketSeverity",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),null,this._builderParams.timeout,"ticketSeverity",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],316:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/ticketStatus",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),null,this._builderParams.timeout,"ticketStatus",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],317:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,
37
+ n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d="/tickets",h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,d)),this._url=d}return o(t,e),a(t,[{key:"summary",value:function(){return this._url=this._url+"/summary",this}},{key:"group",value:function(e){return this._builderParams.group=e||{},this}},{key:"select",value:function(e){return this._builderParams.select=e,this}},{key:"flattened",value:function(){return this._urlParams.flattened=!0,this}},{key:"disableDefaultSorted",value:function(){return this._urlParams.defaultSorted=!1,this}}]),t}(c.default);r.default=h,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchBuilder":307}],318:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../../util/searchingFields/FieldFinder"),f=n(l),d=e("../WPSearch"),h=n(d),p="timeseries";r.BASE_URL=p;var m=function(e){function t(e,r,n){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new f.default(e,p,{organization:r,timeserie:n})),this._url=p+"/provision/organizations/"+r+"/"+n+"/data"}return o(t,e),a(t,[{key:"group",value:function(e){return this._builderParams.group=e||{},this}},{key:"select",value:function(e){return this._builderParams.select=e||[],this}},{key:"build",value:function(){return new h.default(this._parent,this._buildUrl(),this._buildFilter(),this._buildLimit(),this._buildSort(),this._buildGroup(),this._buildSelect(),this._builderParams.timeout,this._urlParams)}}]),t}(c.default);r.default=m},{"../../util/searchingFields/FieldFinder":342,"../WPSearch":265,"./SearchBuilder":307}],319:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/timezones",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._builderParams.timeout,"timezones",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],320:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/userLanguages",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._builderParams.timeout,"userLanguages",this.customFilters)}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],321:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("./SearchBuilder"),c=n(s),l=e("../StaticSearch"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{}),this._url="/userProfile",this.customFilters={}}return o(t,e),a(t,[{key:"build",value:function(){return new f.default(this._parent,this._buildUrl(),this._buildFilter(),this._builderParams.timeout,"userProfile",this.customFilters)}},{key:"withId",value:function(e){if("string"!=typeof e)throw new Error("Parameter id must be a string");return this.customFilters.id=e,this}}]),t}(c.default);r.default=d,t.exports=r.default},{"../StaticSearch":264,"./SearchBuilder":307}],322:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchWithSummaryBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/users",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],323:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./SearchWithSummaryBuilder"),s=n(u),c=e("../../util/searchingFields/FieldFinder"),l=n(c),f="/workgroups",d=function(e){function t(e){i(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,{},new l.default(e,f)),this._url=f}return o(t,e),t}(s.default);r.default=d,t.exports=r.default},{"../../util/searchingFields/FieldFinder":342,"./SearchWithSummaryBuilder":308}],324:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["NOT_ACTIVE","ACTIVE","REVOKED","EXPIRED"];r.ADMINISTRATIVE_STATE_ENUM=n},{}],325:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../ProvisionGenericFinder"),c=n(s),l=e("q"),f=n(l),d=e("http-status-codes"),h=n(d),p=e("./MIME_TYPES_ENUM"),m=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"security/certificates","certificate","Certificate not found")}return o(t,e),a(t,[{key:"findById",value:function(e){return this._id=e,this._execute()}},{key:"_downloadUrl",value:function(){return this._setUrlParameters({format:this._type}),this._composeUrl()}},{key:"findByIdAndFormat",value:function(e,t){var r="";if(void 0===p.MIME_TYPES_ENUM.find(function(e){return e==this},t)&&(r=t),""!==r)throw new Error("Parameter mimetype is not allowed. Parameter value <'"+JSON.stringify(r)+"'>, mimetype allowed <'"+JSON.stringify(p.MIME_TYPES_ENUM)+"'>");return this._id=e,this._type=t,this._download()}},{key:"_download",value:function(){var e=f.default.defer(),t=e.promise,r=this._error_not_found;return this._api.get(this._downloadUrl(),void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(t){204===t.statusCode?e.reject({data:r,statusCode:h.default.NOT_FOUND}):e.resolve({data:t,statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}}]),t}(c.default);r.default=m,t.exports=r.default},{"../ProvisionGenericFinder":140,"./MIME_TYPES_ENUM":327,"http-status-codes":68,q:109}],326:[function(require,module,exports){"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_get=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},_Security2=require("./Security"),_Security3=_interopRequireDefault(_Security2),_q=require("q"),_q2=_interopRequireDefault(_q),_ADMINISTRATIVE_STATE_ENUM=require("./ADMINISTRATIVE_STATE_ENUM"),_USAGES_ENUM=require("./USAGES_ENUM"),max_length_name=50,max_length_id=50,max_length_description=200,Certificates=function(_Security){function Certificates(e){_classCallCheck(this,Certificates),_get(Object.getPrototypeOf(Certificates.prototype),"constructor",this).call(this,e,"/certificates")}return _inherits(Certificates,_Security),_createClass(Certificates,[{key:"withId",value:function(e){if("string"!=typeof e||0===e.length||e.length>max_length_id)throw new Error("Parameter id must be a string, cannot be empty and has a maximum length of "+max_length_id);return this._id=e,this}},{key:"withName",value:function(e){if("string"!=typeof e||0===e.length||e.length>max_length_name)throw new Error("Parameter name must be a string, cannot be empty and has a maximum length of "+max_length_name);return this._name=e,this}},{key:"withDescription",value:function(e){if("string"!=typeof e||0===e.length||e.length>max_length_description)throw new Error("Parameter description must be a string, cannot be empty and has a maximum length of "+max_length_description);return this._description=e,this}},{key:"withAdministrativeState",value:function(e){if("string"!=typeof e||e.length<=0)throw new Error("Parameter administrativeState must be typeof string and cannot be empty");var t="";if(void 0===_ADMINISTRATIVE_STATE_ENUM.ADMINISTRATIVE_STATE_ENUM.find(function(e){return e==this},e)&&(t=e),""!==t)throw new Error("Parameter in administrativeState is not allowed. Parameter value '"+JSON.stringify(t)+"', parameters allowed in administrativeState are: '"+JSON.stringify(_ADMINISTRATIVE_STATE_ENUM.ADMINISTRATIVE_STATE_ENUM)+"'");return this._administrativeState=e,this}},{key:"withUsages",value:function(e){if(void 0===e||e.constructor!==Array||0===e.length)throw new Error("Parameter usages must be typeof Array and cannot be empty");for(var t=[],r=0;r<e.length;r++){void 0===_USAGES_ENUM.USAGES_ENUM.find(function(e){return e==this},e[r])&&t.push(e[r])}if(0!==t.length)throw new Error("There are not any parameters allowed. Parameters value: '"+JSON.stringify(t)+"'. Usages parameters allowed are: '"+JSON.stringify(_USAGES_ENUM.USAGES_ENUM)+"'");return this._usages=e,this}},{key:"withHardware",value:function(e){var t=[];if(void 0===e||e.constructor!==Array||0===e.length)throw new Error("Parameter hardwares must be typeof Array and cannot be empty");for(var r=0;r<e.length;r++)if(this._checkHardware(e[r]))try{e[r]=JSON.parse(e[r])}catch(e){}else t.push(r+1);if(0!==t.length)throw new Error("The hardware attribute is not well formed, the message "+JSON.stringify(t)+" not correct. Remember: hardwareId or [manufacturer, model and modelVersion] must be defined");return this._hardware=e,this}},{key:"_checkHardware",value:function _checkHardware(hardware){"string"==typeof hardware&&(hardware=eval("("+hardware+")"));var length=Object.keys(hardware).length,valid=!1;return 1===length&&hardware.hardwareId&&"string"==typeof hardware.hardwareId&&hardware.hardwareId.length>0?valid=!0:3===length&&hardware.manufacturer&&hardware.model&&hardware.modelVersion&&"string"==typeof hardware.manufacturer&&"string"==typeof hardware.model&&"string"==typeof hardware.modelVersion&&hardware.manufacturer.length>0&&hardware.model.length>0&&hardware.modelVersion.length>0&&(valid=!0),valid}},{key:"withTags",value:function(e){if(void 0===e||e.constructor!==Array||e.length<=0)throw new Error("Parameter tags must be typeof Array and cannot be empty");for(var t=[],r=0;r<e.length;r++)(void 0===e[r]||"string"!=typeof e[r]||typeof e[r].length<=0)&&t.push(e[r]);if(0!==t.length)throw new Error("The following tags values are not allowed:"+JSON.stringify(t));return this._tags=e,this}},{key:"withParameters",value:function(e){if("string"!=typeof e||0===e.length)throw new Error("Parameter parameters must be a string, cannot be empty");return this._parameters=e,this}},{key:"withDomains",value:function(e){if(void 0===e||e.constructor!==Array||e.length<=0)throw new Error("Parameter domains must be typeof Array and cannot be empty");for(var t=[],r=0;r<e.length;r++)(void 0===e[r]||"string"!=typeof e[r]||typeof e[r].length<=0)&&t.push(e[r]);if(0!==t.length)throw new Error("The following domains values are not allowed:"+JSON.stringify(t));return this._domains=e,this}},{key:"_composeElement",value:function(){if(void 0===this._name||void 0===this._administrativeState||void 0===this._usages)throw new Error("Parameters name, usages, administrativeState must be defined");return{certificate:{id:this._id||void 0,name:this._name||void 0,description:this._description||void 0,administrativeState:this._administrativeState||void 0,usages:this._usages||void 0,hardware:this._hardware||void 0,tags:this._tags||void 0,parameters:this._parameters||void 0,domains:this._domains||void 0}}}},{key:"create",value:function(e){var t=this,r=void 0;if("string"!=typeof e){r=new FormData;var n=new Blob([JSON.stringify(this._composeElement())],{type:"application/json"});r.append("json",n);var i=new Blob([e],{type:"application/x-pem-file"});e&&r.append("certificate",i)}else r={},r.json=JSON.stringify(this._composeElement()),r.certificate=e;var o=_q2.default.defer(),a=o.promise;return this._ogapi.Napi.post_multipart(this._resource,r,{},this._timeout,this._getExtraHeaders(),this._getUrlParameters()).then(function(e){var r=e.statusCode;201===r?("function"==typeof t._onCreated&&t._onCreated(e.header.location),o.resolve({location:e.header.location,statusCode:r})):o.reject({errors:e.errors,statusCode:r})}).catch(function(e){o.reject(e)}),a}},{key:"_onCreated",value:function(e){var t=e.split("/").pop(-1);this.withId(t)}},{key:"update",value:function(){var e=this._composeElement();delete e.certificate.id;var t=_q2.default.defer(),r=t.promise;return this._ogapi.Napi.put(this._buildURL(),e,void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(e){var r=e.body;void 0===r?t.reject("Cannot update the certificate"):t.resolve(r,e.statusCode)}).catch(function(e){t.reject(e)}),r}},{key:"_buildURL",value:function(){if(void 0===this._id)throw new Error("Parameters id must be defined");return this._resource+"/"+this._id}}]),Certificates}(_Security3.default);exports.default=Certificates,module.exports=exports.default},{"./ADMINISTRATIVE_STATE_ENUM":324,"./Security":328,"./USAGES_ENUM":329,q:109}],327:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["x-pem-file","pkcs7-mime","raw","text/plain"];r.MIME_TYPES_ENUM=n},{}],328:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},a=e("../provision/BaseProvision"),u=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(e){function t(e,r,i){n(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/security"+(void 0===r?"":r),i)}return i(t,e),t}(u.default);r.default=s,t.exports=r.default},{"../provision/BaseProvision":235}],329:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=["FILE_VALIDATION","DEVICE_COMMUNICATIONS","DEVICE_ACCESS","CERT_SIGN"];r.USAGES_ENUM=n},{}],330:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../provision/BaseProvision"),c=n(s),l=e("../util/formats/check_types"),f=n(l),d="timeseries/provision/organizations/";r.URL=d;var h=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/organizations/",void 0,["name","organization","timeBucket","identifierColumn"])}return o(t,e),a(t,[{key:"_buildURL",value:function(){return d+this._organization+"/"+this._identifier}},{key:"withOrganization",value:function(e){return f.default._checkStringAndLength(e,50,"organization"),this._organization=e,this}},{key:"withIdentifier",value:function(e){return f.default._checkString(e,"identifier"),this._identifier=e,this}},{key:"withName",value:function(e){return f.default._checkStringAndPattern(e,"^[a-zA-Z0-9_@.-]*$","name"),this._name=e,this}},{key:"withIdentifierColumn",value:function(e){return f.default._checkString(e,"identifierColumn"),this._identifierColumn=e,this}},{key:"withTimeBucket",value:function(e){return f.default._checkNumber(e,"timeBucket"),this._timeBucket=e,this}},{key:"withDescription",value:function(e){return e&&f.default._checkString(e,"description"),this._description=e,this}},{key:"withColumns",value:function(e){return f.default._checkArray(e,"columns"),this._columns=e,this}},{key:"withBucketColumn",value:function(e){return f.default._checkStringAndPattern(e,"^[a-zA-Z0-9 _-]*$","bucketColumn"),this._bucketColumn=e,this}},{key:"withRetention",value:function(e){return f.default._checkNumber(e,"retention"),this._retention=e,this}},{key:"withOrigin",value:function(e){return f.default._checkISODateTime(e,"origin"),this._origin=e,this}},{key:"withContext",value:function(e){return f.default._checkArray(e,"context"),this._context=e,this}},{key:"_composeElement",value:function(){return this._resource=d+this._organization,this._timeBucket>0&&f.default._checkStringAndPattern(this._bucketColumn,"^[a-zA-Z0-9 _-]*$","bucketColumn"),{name:this._name,description:this._description,timeBucket:this._timeBucket,bucketColumn:this._timeBucket?this._bucketColumn:void 0,retention:this._retention,origin:this._origin,context:this._context||[],identifierColumn:this._identifierColumn,columns:this._columns||[]}}},{key:"update",value:function(){throw new Error("OGAPI_TIMESERIES_NOT_UPDATED")}}]),t}(c.default);r.default=h},{"../provision/BaseProvision":235,"../util/formats/check_types":341}],331:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../GenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"timeseries/provision/organizations","timeseries")}return i(t,e),o(t,[{key:"findByOrganization",value:function(e){return this._withId(e),this._execute()}},{key:"findByOrganizationAndTimeserieId",value:function(e,t){return this._withId(e+"/"+t),this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../GenericFinder":138}],332:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../GenericFinder"),c=n(s),l=e("q"),f=(n(l),e("http-status-codes")),d=(n(f),function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"ai","list","Transformer not found","north")}return o(t,e),a(t,[{key:"findByOrganization",value:function(e){return this._organization=e,this._execute()}},{key:"findByOrganizationAndIdentifier",value:function(e,t){return this._organization=e,this._identifier=t,this._execute()}},{key:"downloadByOrganizationAndIdentifierAndFilename",value:function(e,t,r){return this._organization=e,this._identifier=t,this._filename=r,this._download()}},{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._organization+"/transformers"+(this._identifier?"/"+this._identifier+(this._filename?"/"+this._filename:""):"")}}]),t}(c.default));r.default=d,t.exports=r.default},{"../GenericFinder":138,"http-status-codes":68,q:109}],333:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("q"),c=n(s),l=e("../provision/BaseProvision"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/organizations",void 0,["organization","files"],"north/ai"),this._ogapi=e}return o(t,e),a(t,[{key:"_buildURL",value:function(){return this._organization+"/transformers/"+this._identifier}},{key:"withIdentifier",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"identifier"});return this._identifier=e,this}},{key:"withOrganization",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"organization"});return this._organization=e,this}},{key:"addFile",value:function(e){this._files||(this._files=[]),this._files.push(e)}},{key:"withFiles",value:function(e){if(!(e instanceof Array))throw new Error({message:"Parameter files requires an array",parameter:"files"});this._files=e}},{key:"_composeElement",value:function(){return this._checkRequiredParameters(),this._resource=this._organization+"/transformers",{files:this._files||void 0}}},{key:"_composeUpdateElement",value:function(){var e=u(Object.getPrototypeOf(t.prototype),"_composeUpdateElement",this).call(this);return delete e.name,e}},{key:"performTest",value:function(e){var t=c.default.defer(),r=t.promise
38
+ ;return this._ogapi.Napi.post(this._buildURL()+"/transform",e,this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(e){t.resolve({statusCode:e.statusCode,body:e.body})}).catch(function(e){t.reject(e)}),r}},{key:"create",value:function(){var e=this._composeElement(),t=c.default.defer();return this._ogapi.Napi.post_multipart(this._resource,{files:e.files},{},this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(e){switch(e.statusCode){case 200:var r=""!=e.text?JSON.parse(e.text):{},n=e.status;t.resolve({data:r,statusCode:n});break;case 201:var n=e.status,i=e.header&&e.header.location;t.resolve({location:i,statusCode:n});break;case 204:t.resolve(e);break;default:t.reject({errors:e.data.errors,statusCode:e.statusCode})}}).catch(function(e){t.reject(e)}),t.promise}},{key:"update",value:function(){var e=this._composeElement(),t=c.default.defer();return this._ogapi.Napi.put_multipart(this._buildURL(),{files:e.files},{},this._timeout,this._getExtraHeaders(),this._getUrlParameters(),this._getServiceBaseURL()).then(function(e){switch(e.statusCode){case 200:var r=""!=e.text?JSON.parse(e.text):{},n=e.status;t.resolve({data:r,statusCode:n});break;default:t.reject({errors:e.data.errors,statusCode:e.statusCode})}}).catch(function(e){t.reject(e)}),t.promise}}]),t}(f.default);r.default=d,t.exports=r.default},{"../provision/BaseProvision":235,q:109}],334:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"users","user","User not found")}return i(t,e),o(t,[{key:"findByEmail",value:function(e){return this._id=e,this._execute()}},{key:"findByEmailAndPassword",value:function(e,t){return this._id=e,this._setExtraHeaders({"X-ApiPass":t}),this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],335:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../provision/BaseProvision"),c=n(s),l=e("q"),f=n(l),d=e("lodash"),h=n(d),p=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/users",void 0,["email","workgroup","domain","profile","countryCode","langCode"])}return o(t,e),a(t,[{key:"withName",value:function(e){if("string"!=typeof e||e.length>100)throw new Error("Parameter name must be a string and has a maximum length of 100");return this._name=e,this}},{key:"withSurname",value:function(e){if("string"!=typeof e||e.length>100)throw new Error("Parameter surname must be a string and has a maximum length of 100");return this._surname=e,this}},{key:"withEmail",value:function(e){if("string"!=typeof e||e.length>100)throw new Error("Parameter email must be a string and has a maximum length of 100");return this._email=e,this}},{key:"withPassword",value:function(e){if("string"!=typeof e||e.length>50)throw new Error("Parameter password must be a string and has a maximum length of 50");return this._password=e,this}},{key:"withWorkgroup",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_WORKGROUP");return this._workgroup=e,this}},{key:"withDomain",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_DOMAIN");return this._domain=e,this}},{key:"withProfile",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_PROFILE");return this._profile=e,this}},{key:"withCountryCode",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_COUNTRY_CODE");return this._countryCode=e,this}},{key:"withLangCode",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_LANGUAGE");return this._langCode=e,this}},{key:"withDescription",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_DESCRIPTION");return this._description=e,this}},{key:"withTimezone",value:function(e){if("string"!=typeof e)throw new Error("OGAPI_STRING_PARAMETER_TIMEZONE");return this._timezone=e,this}},{key:"_buildURL",value:function(){if(void 0===this._email)throw new Error("OGAPI_EMAIL_MUST_BE_DEFINED");return this._resource+"/"+this._email}},{key:"_composeElement",value:function(){return{user:{name:this._name||void 0,surname:this._surname||void 0,password:this._password||void 0,description:this._description||void 0,email:this._email||void 0,workgroup:this._workgroup||void 0,domain:this._domain||void 0,profile:this._profile||void 0,countryCode:this._countryCode||void 0,langCode:this._langCode||void 0,timezone:this._timezone||void 0}}}},{key:"_composeUpdateElement",value:function(){if(this._password)throw new Error("OGAPI_PASSWORD_NOT_ALLOWED");if(void 0===this._email)throw new Error("OGAPI_USER_UPDATE_PARAMETER_MUST_BE_DEFINED");return{user:{name:this._name||void 0,surname:this._surname||void 0,description:this._description||void 0,email:this._email||void 0,workgroup:this._workgroup||void 0,domain:this._domain||void 0,profile:this._profile||void 0,countryCode:this._countryCode||void 0,langCode:this._langCode||void 0,timezone:this._timezone||void 0}}}},{key:"_post",value:function(e,t){var r=f.default.defer(),n=r.promise;return this._ogapi.Napi.post(e,t,void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(e){200===e.statusCode?r.resolve({statusCode:e.statusCode}):200===e.status?r.resolve({statusCode:e.status}):r.reject({errors:e.errors,statusCode:e.statusCode})}).catch(function(e){r.reject(e)}),n}},{key:"changePassword",value:function(e){if(this._newPassword=e,h.default.isEmpty(this._email)||h.default.isEmpty(this._password)||h.default.isEmpty(this._newPassword))throw new Error("OGAPI_USER_UPDATE_PASSWORD_PARAMETER_MUST_BE_DEFINED");var t={user:{password:this._newPassword}};return this._setExtraHeaders({"X-ApiPass":this._password}),this._doNorthPut(this._buildURL(),t)}},{key:"requestResetPassword",value:function(){if(h.default.isEmpty(this._email))throw new Error("OGAPI_USER_MAIL_RESET_PASSWORD_PARAMETER_MUST_BE_DEFINED");var e=this._buildURL()+"/reset";return this._doNorthPost(e)}},{key:"updatePassword",value:function(e,t){if(this._newPassword=e,this._tokenId=t,h.default.isEmpty(this._email))throw new Error("OGAPI_USER_MAIL_RESET_PASSWORD_PARAMETER_MUST_BE_DEFINED");if(h.default.isEmpty(this._newPassword))throw new Error("OGAPI_USER_PASSWORD_RESET_PASSWORD_PARAMETER_MUST_BE_DEFINED");if(h.default.isEmpty(t))throw new Error("OGAPI_USER_TOKENID_RESET_PASSWORD_PARAMETER_MUST_BE_DEFINED");var r={password:this._newPassword},n=this._buildURL()+"/reset/"+t;return this._doNorthPost(n,r)}}]),t}(c.default);r.default=p,t.exports=r.default},{"../provision/BaseProvision":235,lodash:103,q:109}],336:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.DATE_FORMAT="";r.TIME_FORMAT="HH:mm:ssZ"},{}],337:[function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(){function e(){i(this,e)}return o(e,null,[{key:"eq",value:function(e,t){return{eq:n({},e,t)}}},{key:"neq",value:function(e,t){return{neq:n({},e,t)}}},{key:"like",value:function(e,t){return{like:n({},e,t)}}},{key:"gt",value:function(e,t){return{gt:n({},e,t)}}},{key:"lt",value:function(e,t){return{lt:n({},e,t)}}},{key:"gte",value:function(e,t){return{gte:n({},e,t)}}},{key:"lte",value:function(e,t){return{lte:n({},e,t)}}},{key:"in",value:function(e,t){return{in:n({},e,t)}}},{key:"or",value:function(){for(var e={or:[]},t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var i=0;i<r.length;i++)e.or.push(r[i]);return e}},{key:"and",value:function(){for(var e={and:[]},t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var i=0;i<r.length;i++)e.and.push(r[i]);return e}}]),e}();r.default=a,t.exports=r.default},{}],338:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=e("merge"),u=n(a),s=e("urlencode"),c=n(s),l=e("superagent"),f=n(l),d=e("q"),h=n(d),p=e("lodash"),m=n(p),y=e("superagent-mocker"),v=n(y),_=(0,v.default)(f.default),g=function(){function e(t,r){i(this,e),this._options=u.default.recursive(!0,this.default(),t),this._headers=r,m.default.isEmpty(t.mocks)||this._applyMocks(t.mocks)}return o(e,[{key:"_applyMocks",value:function(e){var t=this;Object.keys(e).filter(function(t){return!m.default.isEmpty(e[t])}).forEach(function(r){console.log("Mocking "+r.toLocaleUpperCase()+" requests"),Object.keys(e[r]).forEach(function(n){console.log("Mocking url:",n);var i=e[r][n];_[r](t._options.url+n,function(t){if("function"==typeof i)return console.log("Function returned"),i(t);var o=e[r][n];return console.log("Data returned:",o),o.headers||(o.headers={}),o})})})}},{key:"default",value:function(){return{timeout:5e3}}},{key:"_url",value:function(e){return e.url}},{key:"get",value:function(e,t,r,n,i,o){var a=this._createUrl(e,n,o);console.info("GET",a);var u=f.default.get(a);return this._createPromiseRequest(u,null,t,r,i)}},{key:"patch",value:function(e,t,r,n,i,o){var a=this._createUrl(e,i,o);console.info("PATCH",a);var u=f.default.patch(a).send(t);return this._createPromiseRequest(u,null,r,n)}},{key:"post",value:function(e,t,r,n,i,o){var a=this._createUrl(e,i,o);console.info("POST",a);var u=f.default.post(a).send(t);return this._createPromiseRequest(u,null,r,n)}},{key:"post_multipart",value:function(e,t,r,n,i,o,a){var u=this._createUrl(e,o,a);console.info("POST_MULTIPART",u);var s=f.default.post(u),c=!0;return Object.keys(t).forEach(function(e){switch(e){case"meta":case"json":case"file":s.field(e,t[e]),delete t[e];break;case"hardwareMedia":case"certificate":case"processorBulkFile":s.attach("file",t[e]),c=!1;break;case"files":t[e].forEach(function(t,r){console.log(t.name),s.attach(e,t)}),delete t[e],c=!1;break;case"modelFile":s.field(e,t[e]),delete t[e],c=!1;break;case"bulkFile":s.set("Content-Type",t.ext),t=t.bulkFile}}),c&&s.send(t),this._createPromiseRequest(s,r,n,i)}},{key:"put",value:function(e,t,r,n,i,o){var a=this._createUrl(e,i,o);console.info("PUT",a);var u=f.default.put(a).send(t);return n?n["Content-Type"]="application/json":n={"Content-Type":"application/json"},this._createPromiseRequest(u,null,r,n)}},{key:"put_multipart",value:function(e,t,r,n,i,o,a){var u=this._createUrl(e,o,a);console.info("PUT_MULTIPART",u);var s=f.default.put(u),c=!0;return Object.keys(t).forEach(function(e){switch(e){case"meta":case"json":case"file":s.field(e,t[e]),delete t[e];break;case"hardwareMedia":case"certificate":case"processorBulkFile":s.attach("file",t[e]),c=!1;break;case"files":t[e].forEach(function(t,r){console.log(t.name),s.attach(e,t)}),delete t[e],c=!1;break;case"modelFile":s.field(e,t[e]),delete t[e],c=!1;break;case"bulkFile":s.set("Content-Type",t.ext),t=t.bulkFile}}),c&&s.send(t),this._createPromiseRequest(s,r,n,i)}},{key:"delete",value:function(e,t,r,n,i,o){var a=this._createUrl(e,n,o);console.info("DELETE",a);var u;return u=i?f.default.del(a).send(i):f.default.del(a),this._createPromiseRequest(u,null,t,r)}},{key:"_createUrl",value:function(e,t,r){var n=[];if(t)for(var i=Object.keys(t),o=0;o<i.length;o++){var a=i[o],u=a+"="+t[a];e=0===o?e+"?"+u:e+"&"+u}var s=e.split("/"),l=s.length;return s.forEach(function(e,t){if(t===l-1&&e.indexOf("?")>0){var r=e.substring(e.indexOf("?"),e.length),i=e.substring(0,e.indexOf("?"));n.push((0,c.default)(i)+r)}else n.push((0,c.default)(e))}),this._url(this._options)+"/"+this._getDefaultBaseURL(r)+"/"+n.join("/")}},{key:"_getDefaultBaseURL",value:function(e){return e||(this._isSouth?"v80":"north/v80")}},{key:"_createPromiseRequest",value:function(e,t,r,n,i){var o=r;void 0!==o&&null!==o||(o=this._options.timeout);var a=h.default.defer(),u=a.promise,s=this._options.apiKey,c=-1===o?e:e.timeout(o);if(s&&(c=c.set("X-ApiKey",this._options.apiKey)),n)for(var l=Object.keys(n),f=0;f<l.length;f++){var d=l[f];void 0!==n[d]&&(c=c.set(d,n[d]))}if(t)for(var p in t)c=c.on(p,t[p]);return i&&e.responseType("blob"),c=c.end(function(e,t){if(null!==e){console.error("OGAPI ERROR: "),console.error(e);var r=void 0,n=e.status?e.status:void 0,i={errors:[{code:n,message:"OGAPI: Something is broken. Please contact with your administrator."}]};void 0!==e.response?(r=e.response.body?e.response.body:i,n=e.status):n?(r=e.message,n=408):(r=i,n=500),a.reject({statusCode:n,data:r})}else a.resolve(t)}),u}}]),e}();r.default=g,t.exports=r.default},{lodash:103,merge:104,q:109,superagent:129,"superagent-mocker":127,urlencode:135}],339:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=function(){function e(){n(this,e)}return i(e,null,[{key:"element",value:function(e,t){return{name:e,fields:t}}}]),e}();r.default=o,t.exports=r.default},{}],340:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("./NorthAmpliaREST"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e,r){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,r),this._isSouth=!0}return i(t,e),o(t,[{key:"_url",value:function(e){return e.south.url}}]),t}(s.default);r.default=c,t.exports=r.default},{"./NorthAmpliaREST":338}],341:[function(e,t,r){"use strict";t.exports={_checkType:function(e,t){var r=[];if(void 0===t.find(function(e){return e==this},e)&&r.push(e),0!==r.length)throw new Error({message:"OGAPI_NOT_ALLOWED_PARAMETER",parameter:JSON.stringify(r),allowed:JSON.stringify(t)});return e},_checkISODateTime:function(e,t){if("string"!=typeof e||new RegExp("\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d+(Z|[+-]\\d{2}:\\d{2})").test(e))throw new Error([{message:"OGAPI_ISO_DATE_TIME_PARAMETER",parameter:t},{message:"OGAPI_STRING_PATTERN",parameter:t}]);try{new Date(e)}catch(e){throw new Error([{message:"OGAPI_ISO_DATE_TIME_PARAMETER",parameter:t},{message:"OGAPI_STRING_PATTERN",parameter:t}])}},_checkStringAndPattern:function(e,t,r){if("string"!=typeof e||!new RegExp(t).test(e))throw new Error([{message:"OGAPI_STRING_PARAMETER",parameter:r},{message:"OGAPI_STRING_PATTERN",parameter:r,pattern:t}])},_checkStringAndLength:function(e,t,r){if("string"!=typeof e||e.length>t)throw new Error([{message:"OGAPI_STRING_PARAMETER",parameter:r},{message:"OGAPI_MAX_LENGTH",parameter:t}])},_checkString:function(e,t){if("string"!=typeof e)throw new Error([{message:"OGAPI_STRING_PARAMETER",parameter:t}])},_checkNumber:function(e,t){if("number"!=typeof e)throw new Error([{message:"OGAPI_NUMBER_PARAMETER",parameter:t}])},_checkArray:function(e,t){if(!Array.isArray(e)||0===e.length)throw new Error({message:"OGAPI_ARRAY_PARAMETER",parameter:t})},_checkObject:function(e,t){if("object"!=typeof e)throw new Error({message:"OGAPI_OBJECT_PARAMETER",parameter:t})}}},{}],342:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(r,"__esModule",{value:!0});var a,u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=e("q"),c=n(s),l=e("lodash"),f=n(l),d=e("./source-precompiled/Fields"),h=e("./IotFields"),p=d.GENERATED_FIELDS;for(var m in h.IOT_FIELDS)if(p[m])for(var y in h.IOT_FIELDS[m])p[m][y]=h.IOT_FIELDS[m][y];else p[m]=h.IOT_FIELDS[m];var v=new RegExp("^(.+)._current\\.?(.+)?$"),_=new RegExp("\\[[0-9]+\\]"),g=(new RegExp("value\\.?"),{"/jobs":"JOB","/tasks":"TASKS","/alarms":"ENTITY_ALARM","/operations":"ENTITY_OPERATION","/operations/history":"ENTITY_OPERATION_HISTORY","/certificates":"CERTIFICATE","/bundles":"UPDATE_BUNDLE_VERSION","/datapoints":"DATAPOINTS","/datastreams":"DATASTREAMS","/datamodels":"DATAMODELS","/dmmQRating":"DMMQRATING","/iotQRating":"IOTQRATING","/catalog/softwares":"SOFTWARE_VERSION","/catalog/hardwares":"MANUFACTURER","/catalog/operators":"OPERATORS","/domains":"DOMAIN","/users":"USER","/areas":"AREAS","/bulk/async":"LEGACY_BULK","provisionProcessors/bulk/search":"BULK","/devices":"SearchOnDatamodel","/subscriptions":"SearchOnDatamodel","/subscribers":"SearchOnDatamodel","/entities":"SearchOnDatamodel","entity-asset":"SearchOnDatamodel","/tickets":"SearchOnDatamodel","/channels":"SearchOnDatamodel",datasets:"SearchOnDataset",timeseries:"SearchOnTimeseries","/catalog/plans/organization":"PLANS","/catalog/plans/device":"PLANS"}),b={ENTITY_ALARM:"alarm",UPDATE_BUNDLE_VERSION:"bundle",DATAPOINTS:"datapoints",ENTITY_OPERATION:["operation","job"]},w={get:function(e){switch(e){case"entity-asset":return["entity.asset"];case"/tickets":return["ticket"];case"/channels":return["channel"];default:return}}},E={subscriber:"DEVICE_PART_SUBSCRIBER",subscription:"DEVICE_PART_SUBSCRIPTION",communicationsModule:"DEVICE_PART_COMMSMODULE",device:"DEVICE_PART_DEVICE"},A={DEVICE_PART_SUBSCRIBER:"subscriber",DEVICE_PART_SUBSCRIPTION:"subscription",DEVICE_PART_COMMSMODULE:"communicationsModule",DEVICE_PART_DEVICE:"device"},O=["relColl","relProv"],S=["DEVICE_PART_SUBSCRIBER","DEVICE_PART_SUBSCRIPTION","DEVICE_PART_COMMSMODULE","DEVICE_PART_DEVICE"],P=["subscriber","subscription","communicationsModule","device"],D="search",C={get:function(e){if(S.indexOf(g[e])>=0)return"complex";switch(g[e]){case"SearchOnDatamodel":return D;case"SearchOnDataset":return"dataset";case"SearchOnTimeseries":return"timeserie";default:return"simple"}}},k=function(e,t){function r(e){for(var t=!0;t;){var r=e;t=!1;{if(!(r.length>0&&r[0].constructor===Array))return r;r=r.reduce(function(e,t){return e.concat(t)}),e=r,t=!0}}}var n=c.default.defer(),i=t.selectedField,o=t.selectAll,a=t.extraData&&t.extraData.organization,u=e._ogapi.datamodelsSearchBuilder(),s={and:[]};return e._resourceTypes&&s.and.push({in:{"datamodels.allowedResourceTypes":e._resourceTypes}}),a&&s.and.push({eq:{"datamodels.organizationName":a}}),i&&s.and.push({eq:{"datamodels.categories.datastreams.identifier":i}}),s.and.length>0&&u.filter(s),u.build().execute().then(function(e){var t=[];200===e.statusCode&&(t=e.data.datamodels.map(function(e){return(e.categories||[]).map(function(e){return(e.datastreams||[]).map(function(e){return i||o?e:e.identifier})})}),t=r(t)),i?n.resolve(t.find(function(e){return i===e.identifier})):n.resolve(t)}).catch(function(e){n.reject(e)}),n.promise},T=function(e,t,r,n){var i=r.selectedField,o=[],a=r.extraData.organization,u=r.extraData[t.entity];e._ogapi[t.api]()[t.method](a,u).then(function(t){if(200===t.statusCode){t.data.identifierColumn&&o.push({identifier:t.data.identifierColumn,name:t.data.identifierColumn,path:"provision.administration.identifier._current.value",indexed:!0,sort:!0,notFilterable:!1,filter:"YES",type:"string",schema:{type:"string"}}),t.data.bucketColumn&&o.push({identifier:t.data.bucketColumn,name:t.data.bucketColumn,path:"provision.administration.identifier._current.at",indexed:!0,sort:!0,notFilterable:!1,filter:"YES",type:"date-time",schema:{type:"string",format:"datetime"}});var a=f.default.concat(t.data.columns||[],t.data.context||[]);e._ogapi.basicTypesSearchBuilder().withPath("$").build().execute().then(function(t){t.data.definitions;if(r.selectAll=!0,i){a=a.filter(function(e){return i===(e.name||e.alias)});var u=a[0],s=u.path.match(v),c=s[1].replace(_,"[]");r.selectedField=c}k(e,r).then(function(e){a.forEach(function(t){"date-time"!==t.type?t.schema={type:t.type}:t.schema={type:"string",format:"datetime"},t.path.endsWith("._current.value")&&function(){var r=t.path.substring(0,t.path.indexOf("._current.value"));Array.isArray(e)&&e.find(function(e){return r===e.identifier})}(),t.identifier=t.name||t.alias,t.indexed="NO"!==t.filter,t.notFilterable="NO"===t.filter,o.push(t)}),n.resolve(o)}).catch(function(e){console.error(e),n.reject(e)})}).catch(function(e){console.error(e),n.reject(e)})}}).catch(function(e){console.error(e),n.reject(e)})},F=(a={},o(a,D,function(e,t){k(this,e).then(function(e){t.resolve(e)}).catch(function(e){t.reject(e)})}),o(a,"simple",function(e,t){var r=e.context,n=e.primaryType,i=e.selectedField,o=[];if(r[n]instanceof Array)i?function(){var e=0,t=null;for(e=0;null===t&&e<r[n].length;e++)!function(){var o=r[n][e];o.toLowerCase()===i.toLowerCase()||o.toLowerCase()===i.toLowerCase()+"name"?t=o:b[n]&&(b[n]instanceof Array?b[n].forEach(function(e){o.toLowerCase()!==e+i.toLowerCase()&&o.toLowerCase()!==e+"."+i.toLowerCase()&&o.toLowerCase()!==e+i.toLowerCase()+"name"&&o.toLowerCase()!==e+"."+i.toLowerCase()+"name"||t||(t=o)}):o.toLowerCase()!==b[n]+i.toLowerCase()&&o.toLowerCase()!==b[n]+"."+i.toLowerCase()&&o.toLowerCase()!==b[n]+i.toLowerCase()+"name"&&o.toLowerCase()!==b[n]+"."+i.toLowerCase()+"name"||(t=o))}();t&&o.push(t)}():o=r[n].slice();else if(i)if(r[n][i])o.push(r[n][i]);else for(var a=Object.keys(r[n]),u=0;u<a.length;u++)r[n][a[u]].toLowerCase().indexOf(i.toLowerCase())>-1&&o.push(r[n][a[u]]);else for(var a=Object.keys(r[n]),u=0;u<a.length;u++)o.push(r[n][a[u]]);t.resolve(o.slice())}),o(a,"complex",function(e,t){function r(e,t){var n=void 0;if(!(r=E[e])||!(n=t[r]))throw new Error("Invalid primaryType: "+e);return n.slice()}function n(e){return e!=this}function i(e,t){var r=[];return t.forEach(function(t){var n=e.slice(0,-1);n.push(t),r.push(n.join("."))}),r}var o=e.states,a=e.context,u=e.primaryType,s={1:function(e,t){return t[u].concat(P.filter(n,A[u]))},2:function(e,t){try{return i(e,r(e[0],t).concat(O))}catch(e){return[]}},3:function(e,t){var n=e[1];if(-1===O.indexOf(n))return[];try{return i(e,r(e[0],t))}catch(e){return[]}}},c=o.length,l=s[c];return void 0===l?t.resolve([]):t.resolve(l(o,a))}),o(a,"dataset",function(e,t){T(this,{api:"newDatasetFinder",method:"findByOrganizationAndDatasetId",entity:"dataset"},e,t)}),o(a,"timeserie",function(e,t){T(this,{api:"newTimeserieFinder",method:"findByOrganizationAndTimeserieId",entity:"timeserie"},e,t)}),a),j=function(){function e(t,r,n){i(this,e),this._ogapi=t,this._url=r,this._type=C.get(r),this._extraData=n,this._type===D&&(this._resourceTypes=w.get(r))}return u(e,[{key:"find",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=c.default.defer(),r={states:e.split("."),context:p[g[this._url]],primaryType:g[this._url],extraData:this._extraData};return F[this._type].call(this,r,t),t.promise}},{key:"findAll",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=c.default.defer(),r={states:e.split("."),context:p[g[this._url]],primaryType:g[this._url],selectAll:!0,extraData:this._extraData};return F[this._type].call(this,r,t),t.promise}},{key:"findFieldPath",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=c.default.defer(),r={states:e,context:p[g[this._url]],primaryType:g[this._url],selectedField:e,extraData:this._extraData};return F[this._type].call(this,r,t),t.promise}}]),e}();r.default=j,t.exports=r.default},{"./IotFields":343,"./source-precompiled/Fields":344,lodash:103,q:109}],343:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DATAPOINTS:{DATAPOINTS:["datapoints.organization","datapoints.channel","datapoints.datastreamId","datapoints.entityIdentifier","datapoints.subEntityIdentifier","datapoints.entityRelated","datapoints._current.feedId","datapoints._current.date","datapoints._current.at","datapoints._current.value","datapoints._current.tags","datapoints._current.scoring.performance","datapoints._current.scoring.qrating.min_required.value","datapoints._current.scoring.qrating.min_required.label","datapoints._current.scoring.qrating.min_desired.value","datapoints._current.scoring.qrating.min_desired.label","datapoints._current.scoring.qrating.ideal.value","datapoints._current.scoring.qrating.ideal.label","datapoints._current.scoring.qrating.max_desired.value","datapoints._current.scoring.qrating.max_desired.label","datapoints._current.scoring.qrating.max_allowed.value","datapoints._current.scoring.qrating.max_allowed.label","datapoints._current.scoring.qrating.max_score","datapoints._current.scoring.qrating.cumulative_period_divisor","datapoints._current.scoring.qrating.conversion_matrix","datapoints._current.scoring.qrating.version"]},DATAMODELS:{DATAMODELS:["datamodels.organizationName","datamodels.identifier","datamodels.name","datamodels.description","datamodels.version","datamodels.categories.name","datamodels.categories.identifier","datamodels.categories.datastreams.identifier","datamodels.categories.datastreams.name","datamodels.categories.datastreams.description","datamodels.categories.datastreams.hardwareIds","datamodels.categories.datastreams.unit","datamodels.categories.datastreams.unit.type","datamodels.categories.datastreams.unit.label","datamodels.categories.datastreams.unit.symbol","datamodels.categories.datastreams.period","datamodels.categories.datastreams.access","datamodels.categories.datastreams.schema","datamodels.categories.datastreams.storage","datamodels.categories.datastreams.storage.period","datamodels.categories.datastreams.storage.total","datamodels.categories.datastreams.tags","datamodels.categories.datastreams.views","datamodels.categories.datastreams.icon","datamodels.categories.datastreams.modifiable","datamodels.categories.datastreams.required","datamodels.categories.datastreams.qrating.min_required.value","datamodels.categories.datastreams.qrating.min_required.label","datamodels.categories.datastreams.qrating.min_desired.value","datamodels.categories.datastreams.qrating.min_desired.label","datamodels.categories.datastreams.qrating.ideal.value","datamodels.categories.datastreams.qrating.ideal.label","datamodels.categories.datastreams.qrating.max_desired.value","datamodels.categories.datastreams.qrating.max_desired.label","datamodels.categories.datastreams.qrating.max_allowed.value","datamodels.categories.datastreams.qrating.max_allowed.label","datamodels.categories.datastreams.qrating.max_score","datamodels.categories.datastreams.qrating.cumulative_period_divisor","datamodels.categories.datastreams.qrating.conversion_matrix","datamodels.categories.datastreams.qrating.version"]},DATASTREAMS:{DATASTREAMS:["datastreams.datastreamId","datastreams.name","datastreams.description","datastreams.unit.type","datastreams.unit.label","datastreams.unit.symbol","datastreams.period","datastreams._current.tags","datastreams._current.date","datastreams._current.value","datastreams.categoryId","datastreams.datamodelId","datastreams.access","datastreams.channel","datastreams.organization","datastreams.entityIdentifier","feeds.entityIdentifier","datastreams._id.subEntityIdentifier","datastreams._current.scoring.qrating.min_required.value","datastreams._current.scoring.qrating.min_required.label","datastreams._current.scoring.qrating.min_desired.value","datastreams._current.scoring.qrating.min_desired.label","datastreams._current.scoring.qrating.ideal.value","datastreams._current.scoring.qrating.ideal.label","datastreams._current.scoring.qrating.max_desired.value","datastreams._current.scoring.qrating.max_desired.label","datastreams._current.scoring.qrating.max_allowed.value","datastreams._current.scoring.qrating.max_allowed.label","datastreams._current.scoring.qrating.max_score","datastreams._current.scoring.qrating.cumulative_period_divisor","datastreams._current.scoring.qrating.max_score","datastreams._current.scoring.qrating.conversion_matrix","datastreams.version","feeds.identifier","datastreams._current.scoring.qrating.version","datastreams._current.scoring.scoringPerformance"]},DEVICE_PART_DEVICE:{
39
+ IOT:["datastream.id","datastream.name","datastream.feed","datastream.device","datastream.description","datastream.unit.type","datastream.unit.label","datastream.unit.symbol","datastream.period","datastream.tags","datastream.updated","datastream.minValue","datastream.maxValue","datastream.currentValue","datastream.categoryName","datastream.profileId","datastream.profileName","datastream.profileDescription","datastream.profileVersion","datastream.qratingScoringQValue","datastream.qratingScoringQScore","datastream.qratingScoringQuality","datastream.qratingScoringPerformance","datastream.qratingMinRequiredValue","datastream.qratingMinRequiredLabel","datastream.qratingMinDesiredValue","datastream.qratingMinDesiredLabel","datastream.qratingIdealValue","datastream.qratingIdealLabel","datastream.qratingMaxDesiredValue","datastream.qratingMaxDesiredLabel","datastream.qratingMaxAllowedValue","datastream.qratingMaxAllowedLabel","datastream.qratingMaxScore","deviceId","feedId","deviceOrganization","profile.Name","profile.Description","profile.Version","profile.Score","profile.MaxScore","profile.Performance","profile.AvgPerformance","profile.Quality","category.Name","category.Score","category.MaxScore","category.Performance","category.AvgPerformance","category.Quality","device.Score","device.MaxScore","device.Performance","device.AvgPerformance","device.Quality","device.Channel","device.EntityType"]},USER:{USER:{email:"user.email",description:"user.description",workgroup:"workgroup.name",domain:"domain.name",profile:"profile.name",name:"user.name",surname:"user.surname",countryCode:"country.code",langCode:"language.code",timezone:"user.timezone"}},DOMAIN:{DOMAIN:["domain.name","domain.description"]},AREAS:{AREAS:{identifier:"areas.identifier",name:"areas.name",description:"areas.description",entities:"areas.entities",geometry:"areas.geometry",color:"areas.color",organization:"areas.organization"}},TASKS:{TASKS:["tasks.id","tasks.name","tasks.description","tasks.state","tasks.domain","tasks.workgroup","tasks.job.request.user"]},LEGACY_BULK:{LEGACY_BULK:{identifier:"bulks.identifier",organization:"bulks.organization",fileName:"bulks.request.fileName",userEmail:"bulks.request.userEmail",headerAccept:"bulks.request.header.accept",contentType:"bulks.request.header.contentType",headerCsvFormat:"bulks.request.header.csvFormat",paramsFlattened:"bulks.request.params.flattened",paramsAction:"bulks.request.params.action",paramsFull:"bulks.request.params.full",paramsType:"bulks.request.params.type",status:"bulks.status",startedDate:"bulks.startedDate",finishedDate:"bulks.finishedDate",processed:"bulks.summary.processed",successful:"bulks.summary.successful",error:"bulks.summary.error"}},BULK:{BULK:{identifier:"bulks.identifier",provisionProcessorId:"bulks.provisionProcessorId",organization:"bulks.organization",userEmail:"bulks.request.userEmail",fileName:"bulks.request.fileName",headerAccept:"bulks.request.header.accept",contentType:"bulks.request.header.contentType",status:"bulks.status",startedDate:"bulks.startedDate",finishedDate:"bulks.finishedDate",processed:"bulks.summary.processed",successful:"bulks.summary.successful",error:"bulks.summary.error"}},RULE:{RULE:{organizationId:"rule.organizationId",channelId:"rule.channelId",name:"rule.name",active:"rule.active"}},ENTITY_ALARM:{ENTITY_ALARM:{alarmId:"alarm.identifier",alarmSubEntityIdentifier:"alarm.subEntityIdentifier",entityId:"alarm.entityIdentifier",entityType:"alarm.resourceType",organizationName:"alarm.organization",channelName:"alarm.channel",alarmRuleName:"alarm.rule",alarmName:"alarm.name",alarmSeverity:"alarm.severity",alarmPriority:"alarm.priority",alarmDescription:"alarm.description",alarmStatus:"alarm.status",alarmOpenDate:"alarm.openingDate",alarmAttentionDate:"alarm.attentionDate",alarmAttentionUser:"alarm.attentionUser",alarmAttentionNote:"alarm.attentionNote",alarmClosureDate:"alarm.closureDate",alarmClosureUser:"alarm.closureUser",alarmClosureNote:"alarm.closureNote"}},GENERAL:{GENERAL:[]},EMPTY:{EMPTY:[]},OPERATORS:{OPERATORS:["operator.name"]},PLANS:{PLANS:["plan.identifier","plan.name","plan.flowRate.value","plan.flowRate.unit","plan.maxDeviceAmount","plan.maxStorageLifeTime.period","plan.maxStorageLifeTime.total","plan.defaultAssigned","plan.defaultProvision"]}};r.IOT_FIELDS=n},{}],344:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={ENTITY_OPERATION_HISTORY:{ENTITY_OPERATION_HISTORY:["applicationEmail","entityId","entityType","jobActivatedDate","jobId","jobUserNotes","operationAttemptCurrent","operationAttemptMax","operationDate","operationDetails","operationEndDate","operationId","operationInitDate","operationName","operationNotify","operationParameters","operationResult","operationStatus","operationSteps"]},ENTITY_OPERATION:{ENTITY_OPERATION:["applicationEmail","channelKey","channelName","domainKey","entityId","entityType","entityUk","jobActivatedDate","jobEntityTotal","jobErrorCode","jobErrorDescription","jobFinishedCancelledByEngine","jobFinishedCancelledByExternal","jobFinishedCancelledByExternalTimeout","jobFinishedCancelledByTimeout","jobFinishedCancelledByUser","jobFinishedCancelledTotal","jobFinishedDate","jobFinishedError","jobFinishedOotError","jobFinishedOotSuccessful","jobFinishedOotTotal","jobFinishedSuccessful","jobFinishedTotal","jobId","jobInProgressPendingExecution","jobInProgressScheduled","jobInProgressStarted","jobInProgressTotal","jobInProgressWaitingForConnection","jobJson","jobStartedDate","jobState","jobStatus","jobTotal","jobUser","jobUserNotes","notDeletable","operationAttemptCurrent","operationAttemptMax","operationDate","operationDetails","operationEndDate","operationId","operationInitDate","operationJson","operationName","operationNotify","operationResult","operationScheduleTimestamp","operationStatus","operationStatusKey","operationStepDescription","operationStepName","operationStepResponse","operationStepResult","operationStepTimestamp","operationTimeoutTimestamp","operationUserNotes","organizationKey","organizationName","profileKey","provAdministrativeState","provAdministrativeStateKey","provDefaultFeed","serviceGroupName","tag","taskEmpty_null","taskId","taskKey","taskName","taskState","taskStatus","workgroupKey","workgroupName"]},MANUFACTURER:{MANUFACTURER:["manufacturerAddress","manufacturerDescription","manufacturerEmail","manufacturerFax","manufacturerIdentifier","manufacturerMediaFileName","manufacturerMediaHeight","manufacturerMediaIdentifier","manufacturerMediaName","manufacturerMediaSize","manufacturerMediaTypeName","manufacturerMediaWidth","manufacturerName","manufacturerNotes","manufacturerTelephone","manufacturerUrl","modelDescription","modelIdentifier","modelMediaFileName","modelMediaHeight","modelMediaIdentifier","modelMediaName","modelMediaSize","modelMediaTypeName","modelMediaWidth","modelName","modelNotes","modelUrl","modelVersion"]},MODEL:{MODEL:["modelDescription","modelIdentifier","modelName","modelNotes","modelUrl","modelVersion"]},JOB:{JOB:["jobActivatedDate","jobActivatedTime","jobCallback","jobEntityTotal","jobErrorCode","jobErrorDescription","jobFinishedCancelledByEngine","jobFinishedCancelledByExternal","jobFinishedCancelledByExternalTimeout","jobFinishedCancelledByTimeout","jobFinishedCancelledByUser","jobFinishedCancelledTotal","jobFinishedDate","jobFinishedError","jobFinishedOotError","jobFinishedOotSuccessful","jobFinishedOotTotal","jobFinishedSuccessful","jobFinishedTime","jobFinishedTotal","jobId","jobInProgressPendingExecution","jobInProgressScheduled","jobInProgressStarted","jobInProgressTotal","jobInProgressWaitingForConnection","jobJson","jobOperationName","jobScheduledTime","jobStartedDate","jobState","jobStatus","jobTotal","jobTrap","jobUser","jobUserNotes","jobVisible","operationId","operationName","operationResult","operationStatusKey","taskCoremessage","taskId","taskKey","taskName","taskNextExecution","taskState","taskStatus"]},SOFTWARE_VERSION:{SOFTWARE_VERSION:["manufacturerAddress","manufacturerDescription","manufacturerEmail","manufacturerFax","manufacturerIdentifier","manufacturerName","manufacturerNotes","manufacturerTelephone","manufacturerUrl","modelDescription","modelIdentifier","modelName","modelNotes","modelUrl","modelVersion","softwareId","softwareName","softwareType","softwareVersion"]},UPDATE_BUNDLE_VERSION:{UPDATE_BUNDLE_VERSION:["bundleActionDef","bundleActionOrder","bundleActionType","bundleActive","bundleConstrained","bundleCreationDate","bundleDeploymentElementDownloadUrl","bundleDeploymentElementId","bundleDeploymentElementName","bundleDeploymentElementOperation","bundleDeploymentElementOption","bundleDeploymentElementOrder","bundleDeploymentElementPath","bundleDeploymentElementSize","bundleDeploymentElementType","bundleDeploymentElementValidators","bundleDeploymentElementVersion","bundleDescription","bundleHardware","bundleId","bundleName","bundleUserNotes","bundleVersion","bundleWorkgroup","updateBundleDate","updateBundleManufacturer","updateBundleModel","updateBundleName","updateBundleVersion","updateBundleVersionUuid","updateDescription"]},CERTIFICATE:{CERTIFICATE:["certificateAdministrativeState","certificateDescription","certificateDomain","certificateId","certificateIssuer","certificateManufacturer","certificateModel","certificateModelIdentifier","certificateModelVersion","certificateName","certificatePublicKeyAlgorithm","certificatePublicKeyFormat","certificatePublicKeySize","certificateSerialNumber","certificateSubject","certificateTag","certificateTrustChain","certificateUsage","certificateValidFrom","certificateValidUntil","certificateVersion"]}};r.GENERATED_FIELDS=n},{}],345:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"domains","workgroup","Workgroup not found")}return i(t,e),o(t,[{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._domain+"/workgroups/"+this._name}},{key:"findByDomainAndName",value:function(e,t){return this._domain=e,this._name=t,this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],346:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("../provision/BaseProvision"),c=n(s),l=e("./Workgroups"),f=n(l),d=e("../channels/Channels"),h=n(d),p=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/domains",void 0,["workgroup","channels"]),this._ogapi=e,this._action="CREATE"}return o(t,e),a(t,[{key:"withWorkgroup",value:function(e){if(e.constructor.prototype!=f.default.prototype)throw new Error("Parameter workgroup must be a workgroup");return this._workgroup=e,this}},{key:"withChannel",value:function(e){if(e.constructor.prototype!=h.default.prototype)throw new Error("Parameter channel must be a channel");return this._channels||(this._channels=[]),this._channels.push({organization:e._organization,channel:e._name}),this}},{key:"_composeElement",value:function(){return this._checkRequiredParameters(),this._resource="provision/domains/"+this._workgroup._domainName+"/workgroups/"+this._workgroup._name+"/relations",{workgroupRelation:{channels:this._channels?this._channels:void 0}}}},{key:"_buildURL",value:function(){return"provision/domains/"+this._workgroup._domainName+"/workgroups/"+this._workgroup._name+"/relations"}},{key:"create",value:function(){var e=this._composeElement(),t=this._resource;return this._setUrlParameters({action:"CREATE"}),this._doNorthPost(t,e)}},{key:"delete",value:function(){this._setUrlParameters({action:"DELETE"});var e=this._buildURL();if(this._channels){var t=this._composeElement();return this._doNorthPost(e,t)}return this._doNorthPost(e,{workgroupRelation:{channels:[]}})}},{key:"update",value:function(){throw new Error("Workgroup relation update not allowed")}}]),t}(c.default);r.default=p,t.exports=r.default},{"../channels/Channels":161,"../provision/BaseProvision":235,"./Workgroups":348}],347:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},u=e("../ProvisionGenericFinder"),s=function(e){return e&&e.__esModule?e:{default:e}}(u),c=function(e){function t(e){n(this,t),a(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"domains","workgroup","Workgroup relation not found")}return i(t,e),o(t,[{key:"_composeUrl",value:function(){return this._baseUrl+"/"+this._domain+"/workgroups/"+this._name+"/relations"}},{key:"findByDomainAndName",value:function(e,t){return this._domain=e,this._name=t,this._execute()}}]),t}(s.default);r.default=c,t.exports=r.default},{"../ProvisionGenericFinder":140}],348:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(r,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=function(e,t,r){for(var n=!0;n;){var i=e,o=t,a=r;n=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(i);if(null===c)return;e=c,t=o,r=a,n=!0,u=c=void 0}},s=e("q"),c=n(s),l=e("../provision/BaseProvision"),f=n(l),d=function(e){function t(e){i(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,"/domains",void 0,["name","domainName"]),this._ogapi=e}return o(t,e),a(t,[{key:"withName",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"name"});return this._name=e,this}},{key:"withDescription",value:function(e){if("string"!=typeof e||e.length>250)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_250",parameter:"description"});return this._description=e,this}},{key:"withAdministrative",value:function(e){return this._administrative=e,this}},{key:"withDomainName",value:function(e){if("string"!=typeof e||e.length>50)throw new Error({message:"OGAPI_STRING_PARAMETER_MAX_LENGTH_50",parameter:"domainName"});return this._domainName=e,this}},{key:"_composeElement",value:function(){return this._checkRequiredParameters(),this._resource="provision/domains/"+this._domainName+"/workgroups",{workgroup:{name:this._name||void 0,description:this._description||void 0,administrative:this._administrative||!1}}}},{key:"_composeElementUpdate",value:function(){return this._checkRequiredParameters(),this._resource="provision/domains/"+this._domainName+"/workgroups",{workgroup:{description:this._description||void 0}}}},{key:"_buildURL",value:function(){return"provision/domains/"+this._domainName+"/workgroups/"+this._name}},{key:"update",value:function(){var e=c.default.defer(),t=e.promise;return this._ogapi.Napi.put(this._buildURL(),this._composeElementUpdate(),void 0,this._getExtraHeaders(),this._getUrlParameters()).then(function(t){200===t.statusCode?e.resolve({statusCode:t.statusCode}):200===t.status?e.resolve({statusCode:t.status}):e.reject({errors:t.errors,statusCode:t.statusCode})}).catch(function(t){e.reject(t)}),t}}]),t}(f.default);r.default=d,t.exports=r.default},{"../provision/BaseProvision":235,q:109}]},{},[1]);
40
+ //# sourceMappingURL=opengate-api-bower-12.2.2.min.js.map