@serptech/api 1.0.18 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serptech/api",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "description": "Library for work with SERP API",
5
5
  "source": "index.js",
6
6
  "main": "./dist/SerpApi.node.js",
@@ -1107,7 +1107,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
1107
1107
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1108
1108
 
1109
1109
  "use strict";
1110
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Spaces\", function() { return Spaces; });\n/* harmony import */ var _base_auth_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/auth-api */ \"./src/base/auth-api.ts\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar _excluded = [\"id\"];\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\nvar Spaces = /*#__PURE__*/function (_AuthApi) {\n _inherits(Spaces, _AuthApi);\n\n var _super = _createSuper(Spaces);\n\n function Spaces(settings) {\n var _this;\n\n _classCallCheck(this, Spaces);\n\n _this = _super.call(this, settings);\n _this.getSpaces = _this.getSpaces.bind(_assertThisInitialized(_this));\n _this.getSpace = _this.getSpace.bind(_assertThisInitialized(_this));\n _this.createSpace = _this.createSpace.bind(_assertThisInitialized(_this));\n _this.updateSpace = _this.updateSpace.bind(_assertThisInitialized(_this));\n _this.deleteSpace = _this.deleteSpace.bind(_assertThisInitialized(_this));\n _this.createToken = _this.createToken.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Spaces, [{\n key: \"getSpaces\",\n value: function getSpaces(params) {\n return this.httpClient.get(this.authURL + Spaces.apiEndpoint, params);\n }\n }, {\n key: \"getSpace\",\n value: function getSpace(id) {\n return this.httpClient.get(this.authURL + \"\".concat(Spaces.apiEndpoint).concat(id, \"/\"));\n }\n }, {\n key: \"createSpace\",\n value: function createSpace(data) {\n return this.httpClient.post(this.authURL + Spaces.apiEndpoint, Spaces.getSpaceData(data));\n }\n }, {\n key: \"updateSpace\",\n value: function updateSpace(data) {\n return this.httpClient.put(this.authURL + \"\".concat(Spaces.apiEndpoint).concat(data.id, \"/\"), Spaces.getSpaceData(data));\n }\n }, {\n key: \"deleteSpace\",\n value: function deleteSpace(id) {\n return this.httpClient[\"delete\"](this.authURL + \"\".concat(Spaces.apiEndpoint).concat(id, \"/\"));\n }\n }, {\n key: \"createToken\",\n value: function createToken(data) {\n var id = data.id,\n restData = _objectWithoutProperties(data, _excluded);\n\n return this.httpClient.post(this.authURL + \"\".concat(Spaces.apiEndpoint).concat(id, \"/tokens/access/\"), restData);\n }\n }]);\n\n return Spaces;\n}(_base_auth_api__WEBPACK_IMPORTED_MODULE_0__[\"AuthApi\"]);\n\n_defineProperty(Spaces, \"apiEndpoint\", \"spaces/\");\n\n_defineProperty(Spaces, \"getSpaceData\", function (_ref) {\n var name = _ref.name;\n return {\n name: name\n };\n});\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/spaces/v1/index.ts?");
1110
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Spaces\", function() { return Spaces; });\n/* harmony import */ var _base_auth_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/auth-api */ \"./src/base/auth-api.ts\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar _excluded = [\"id\"];\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\nvar Spaces = /*#__PURE__*/function (_AuthApi) {\n _inherits(Spaces, _AuthApi);\n\n var _super = _createSuper(Spaces);\n\n function Spaces(settings) {\n var _this;\n\n _classCallCheck(this, Spaces);\n\n _this = _super.call(this, settings);\n _this.getSpaces = _this.getSpaces.bind(_assertThisInitialized(_this));\n _this.getSpace = _this.getSpace.bind(_assertThisInitialized(_this));\n _this.createSpace = _this.createSpace.bind(_assertThisInitialized(_this));\n _this.updateSpace = _this.updateSpace.bind(_assertThisInitialized(_this));\n _this.deleteSpace = _this.deleteSpace.bind(_assertThisInitialized(_this));\n _this.createToken = _this.createToken.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Spaces, [{\n key: \"getSpaces\",\n value: function getSpaces(params) {\n return this.httpClient.get(this.authURL + Spaces.apiEndpoint, params);\n }\n }, {\n key: \"getSpace\",\n value: function getSpace(id) {\n return this.httpClient.get(this.authURL + \"\".concat(Spaces.apiEndpoint).concat(id, \"/\"));\n }\n }, {\n key: \"createSpace\",\n value: function createSpace(data) {\n return this.httpClient.post(this.authURL + Spaces.apiEndpoint, Spaces.getSpaceData(data));\n }\n }, {\n key: \"updateSpace\",\n value: function updateSpace(data) {\n return this.httpClient.put(this.authURL + \"\".concat(Spaces.apiEndpoint).concat(data.id, \"/\"), Spaces.getSpaceDataUpdate(data));\n }\n }, {\n key: \"deleteSpace\",\n value: function deleteSpace(id) {\n return this.httpClient[\"delete\"](this.authURL + \"\".concat(Spaces.apiEndpoint).concat(id, \"/\"));\n }\n }, {\n key: \"createToken\",\n value: function createToken(data) {\n var id = data.id,\n restData = _objectWithoutProperties(data, _excluded);\n\n return this.httpClient.post(this.authURL + \"\".concat(Spaces.apiEndpoint).concat(id, \"/tokens/access/\"), restData);\n }\n }]);\n\n return Spaces;\n}(_base_auth_api__WEBPACK_IMPORTED_MODULE_0__[\"AuthApi\"]);\n\n_defineProperty(Spaces, \"apiEndpoint\", \"spaces/\");\n\n_defineProperty(Spaces, \"getSpaceData\", function (_ref) {\n var name = _ref.name;\n return {\n name: name\n };\n});\n\n_defineProperty(Spaces, \"getSpaceDataUpdate\", function (data) {\n return {\n name: data.name,\n ha_threshold: data.ha_threshold,\n junk_threshold: data.junk_threshold,\n search_threshold: data.search_threshold,\n entry_storage_days: data.entry_storage_days,\n blur_min: data.blur_min,\n blur_max: data.blur_max,\n exp_min: data.exp_min,\n exp_max: data.exp_max,\n tilt_min: data.tilt_min,\n tilt_max: data.tilt_max,\n pan_min: data.pan_min,\n pan_max: data.pan_max\n };\n});\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/spaces/v1/index.ts?");
1111
1111
 
1112
1112
  /***/ }),
1113
1113
 
@@ -863,7 +863,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
863
863
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
864
864
 
865
865
  "use strict";
866
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Spaces\", function() { return Spaces; });\n/* harmony import */ var _base_auth_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/auth-api */ \"./src/base/auth-api.ts\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar _excluded = [\"id\"];\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\nvar Spaces = /*#__PURE__*/function (_AuthApi) {\n _inherits(Spaces, _AuthApi);\n\n var _super = _createSuper(Spaces);\n\n function Spaces(settings) {\n var _this;\n\n _classCallCheck(this, Spaces);\n\n _this = _super.call(this, settings);\n _this.getSpaces = _this.getSpaces.bind(_assertThisInitialized(_this));\n _this.getSpace = _this.getSpace.bind(_assertThisInitialized(_this));\n _this.createSpace = _this.createSpace.bind(_assertThisInitialized(_this));\n _this.updateSpace = _this.updateSpace.bind(_assertThisInitialized(_this));\n _this.deleteSpace = _this.deleteSpace.bind(_assertThisInitialized(_this));\n _this.createToken = _this.createToken.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Spaces, [{\n key: \"getSpaces\",\n value: function getSpaces(params) {\n return this.httpClient.get(this.authURL + Spaces.apiEndpoint, params);\n }\n }, {\n key: \"getSpace\",\n value: function getSpace(id) {\n return this.httpClient.get(this.authURL + \"\".concat(Spaces.apiEndpoint).concat(id, \"/\"));\n }\n }, {\n key: \"createSpace\",\n value: function createSpace(data) {\n return this.httpClient.post(this.authURL + Spaces.apiEndpoint, Spaces.getSpaceData(data));\n }\n }, {\n key: \"updateSpace\",\n value: function updateSpace(data) {\n return this.httpClient.put(this.authURL + \"\".concat(Spaces.apiEndpoint).concat(data.id, \"/\"), Spaces.getSpaceData(data));\n }\n }, {\n key: \"deleteSpace\",\n value: function deleteSpace(id) {\n return this.httpClient.delete(this.authURL + \"\".concat(Spaces.apiEndpoint).concat(id, \"/\"));\n }\n }, {\n key: \"createToken\",\n value: function createToken(data) {\n var id = data.id,\n restData = _objectWithoutProperties(data, _excluded);\n\n return this.httpClient.post(this.authURL + \"\".concat(Spaces.apiEndpoint).concat(id, \"/tokens/access/\"), restData);\n }\n }]);\n\n return Spaces;\n}(_base_auth_api__WEBPACK_IMPORTED_MODULE_0__[\"AuthApi\"]);\n\n_defineProperty(Spaces, \"apiEndpoint\", \"spaces/\");\n\n_defineProperty(Spaces, \"getSpaceData\", function (_ref) {\n var name = _ref.name;\n return {\n name: name\n };\n});\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/spaces/v1/index.ts?");
866
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Spaces\", function() { return Spaces; });\n/* harmony import */ var _base_auth_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/auth-api */ \"./src/base/auth-api.ts\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar _excluded = [\"id\"];\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\nvar Spaces = /*#__PURE__*/function (_AuthApi) {\n _inherits(Spaces, _AuthApi);\n\n var _super = _createSuper(Spaces);\n\n function Spaces(settings) {\n var _this;\n\n _classCallCheck(this, Spaces);\n\n _this = _super.call(this, settings);\n _this.getSpaces = _this.getSpaces.bind(_assertThisInitialized(_this));\n _this.getSpace = _this.getSpace.bind(_assertThisInitialized(_this));\n _this.createSpace = _this.createSpace.bind(_assertThisInitialized(_this));\n _this.updateSpace = _this.updateSpace.bind(_assertThisInitialized(_this));\n _this.deleteSpace = _this.deleteSpace.bind(_assertThisInitialized(_this));\n _this.createToken = _this.createToken.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Spaces, [{\n key: \"getSpaces\",\n value: function getSpaces(params) {\n return this.httpClient.get(this.authURL + Spaces.apiEndpoint, params);\n }\n }, {\n key: \"getSpace\",\n value: function getSpace(id) {\n return this.httpClient.get(this.authURL + \"\".concat(Spaces.apiEndpoint).concat(id, \"/\"));\n }\n }, {\n key: \"createSpace\",\n value: function createSpace(data) {\n return this.httpClient.post(this.authURL + Spaces.apiEndpoint, Spaces.getSpaceData(data));\n }\n }, {\n key: \"updateSpace\",\n value: function updateSpace(data) {\n return this.httpClient.put(this.authURL + \"\".concat(Spaces.apiEndpoint).concat(data.id, \"/\"), Spaces.getSpaceDataUpdate(data));\n }\n }, {\n key: \"deleteSpace\",\n value: function deleteSpace(id) {\n return this.httpClient.delete(this.authURL + \"\".concat(Spaces.apiEndpoint).concat(id, \"/\"));\n }\n }, {\n key: \"createToken\",\n value: function createToken(data) {\n var id = data.id,\n restData = _objectWithoutProperties(data, _excluded);\n\n return this.httpClient.post(this.authURL + \"\".concat(Spaces.apiEndpoint).concat(id, \"/tokens/access/\"), restData);\n }\n }]);\n\n return Spaces;\n}(_base_auth_api__WEBPACK_IMPORTED_MODULE_0__[\"AuthApi\"]);\n\n_defineProperty(Spaces, \"apiEndpoint\", \"spaces/\");\n\n_defineProperty(Spaces, \"getSpaceData\", function (_ref) {\n var name = _ref.name;\n return {\n name: name\n };\n});\n\n_defineProperty(Spaces, \"getSpaceDataUpdate\", function (data) {\n return {\n name: data.name,\n ha_threshold: data.ha_threshold,\n junk_threshold: data.junk_threshold,\n search_threshold: data.search_threshold,\n entry_storage_days: data.entry_storage_days,\n blur_min: data.blur_min,\n blur_max: data.blur_max,\n exp_min: data.exp_min,\n exp_max: data.exp_max,\n tilt_min: data.tilt_min,\n tilt_max: data.tilt_max,\n pan_min: data.pan_min,\n pan_max: data.pan_max\n };\n});\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/spaces/v1/index.ts?");
867
867
 
868
868
  /***/ }),
869
869
 
@@ -21,7 +21,7 @@ export interface LicensesFiltersInterface extends Paginatable, Searchable {
21
21
  }
22
22
 
23
23
  export interface LicensesInterface extends AuthApiInterface {
24
- getLicenses(filters: LicensesFiltersInterface): Promise<LicenseInterface[]>;
24
+ getLicenses(): Promise<LicenseInterface>;
25
25
  getLicense(licenseId: id): Promise<LicenseInterface>;
26
26
  createLicense(license: LicenseInterface): Promise<LicenseInterface>;
27
27
  deleteLicense(licenseId: id): Promise<null>;
@@ -5,10 +5,34 @@ import { GetTokenInterface, TokenInterface } from "../tokens";
5
5
  export interface SpaceInterface {
6
6
  id: id;
7
7
  name: string;
8
+ ha_threshold?: number,
9
+ junk_threshold?: number,
10
+ search_threshold?: number,
11
+ entry_storage_days?: number,
12
+ blur_min?: number,
13
+ blur_max?: number,
14
+ exp_min?: number,
15
+ exp_max?: number,
16
+ tilt_min?: number,
17
+ tilt_max?: number,
18
+ pan_min?: number,
19
+ pan_max?: number,
8
20
  }
9
21
 
10
22
  export interface SpaceDataInterface {
11
23
  name: string;
24
+ ha_threshold?: number,
25
+ junk_threshold?: number,
26
+ search_threshold?: number,
27
+ entry_storage_days?: number,
28
+ blur_min?: number,
29
+ blur_max?: number,
30
+ exp_min?: number,
31
+ exp_max?: number,
32
+ tilt_min?: number,
33
+ tilt_max?: number,
34
+ pan_min?: number,
35
+ pan_max?: number,
12
36
  }
13
37
 
14
38
  export interface GetSpacesParamsInterface extends Paginatable, Searchable {}
@@ -17,7 +17,7 @@ class Licenses extends AuthApi implements LicensesInterface {
17
17
 
18
18
  static apiEndpoint = "licenses/";
19
19
 
20
- getLicenses(): Promise<LicenseInterface[]> {
20
+ getLicenses(): Promise<LicenseInterface> {
21
21
  return this.httpClient.get(
22
22
  this.authURL + Licenses.apiEndpoint
23
23
  );
@@ -26,6 +26,22 @@ class Spaces extends AuthApi implements SpacesInterface {
26
26
  name,
27
27
  });
28
28
 
29
+ static getSpaceDataUpdate = (data: SpaceInterface): SpaceDataInterface => ({
30
+ name: data.name,
31
+ ha_threshold: data.ha_threshold,
32
+ junk_threshold: data.junk_threshold,
33
+ search_threshold: data.search_threshold,
34
+ entry_storage_days: data.entry_storage_days,
35
+ blur_min: data.blur_min,
36
+ blur_max: data.blur_max,
37
+ exp_min: data.exp_min,
38
+ exp_max: data.exp_max,
39
+ tilt_min: data.tilt_min,
40
+ tilt_max: data.tilt_max,
41
+ pan_min: data.pan_min,
42
+ pan_max: data.pan_max,
43
+ });
44
+
29
45
  getSpaces(params: GetSpacesParamsInterface): Promise<Array<SpaceInterface>> {
30
46
  return this.httpClient.get(this.authURL + Spaces.apiEndpoint, params);
31
47
  }
@@ -44,7 +60,7 @@ class Spaces extends AuthApi implements SpacesInterface {
44
60
  updateSpace(data: SpaceInterface): Promise<SpaceInterface> {
45
61
  return this.httpClient.put(
46
62
  this.authURL + `${Spaces.apiEndpoint}${data.id}/`,
47
- Spaces.getSpaceData(data)
63
+ Spaces.getSpaceDataUpdate(data)
48
64
  );
49
65
  }
50
66