@serptech/api 1.0.33 → 1.0.35

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.33",
3
+ "version": "1.0.35",
4
4
  "description": "Library for work with SERP API",
5
5
  "source": "index.js",
6
6
  "main": "./dist/SerpApi.node.js",
@@ -1047,7 +1047,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
1047
1047
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1048
1048
 
1049
1049
  "use strict";
1050
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Licenses\", function() { return Licenses; });\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\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 Licenses = /*#__PURE__*/function (_AuthApi) {\n _inherits(Licenses, _AuthApi);\n\n var _super = _createSuper(Licenses);\n\n function Licenses(settings) {\n var _this;\n\n _classCallCheck(this, Licenses);\n\n _this = _super.call(this, settings);\n _this.getLicenses = _this.getLicenses.bind(_assertThisInitialized(_this));\n _this.uploadLicense = _this.uploadLicense.bind(_assertThisInitialized(_this));\n _this.getLicense = _this.getLicense.bind(_assertThisInitialized(_this));\n _this.createLicense = _this.createLicense.bind(_assertThisInitialized(_this));\n _this.updateLicense = _this.updateLicense.bind(_assertThisInitialized(_this));\n _this.deleteLicense = _this.deleteLicense.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Licenses, [{\n key: \"getLicenses\",\n value: function getLicenses() {\n return this.httpClient.get(this.authURL + Licenses.apiEndpoint);\n }\n }, {\n key: \"uploadLicense\",\n value: function uploadLicense() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n license = _ref.license;\n\n return this.httpClient.post(this.authURL + Licenses.apiEndpoint, {\n license: license\n });\n }\n }, {\n key: \"getLicense\",\n value: function getLicense(licenseId) {\n return this.httpClient.get(this.authURL + \"\".concat(Licenses.apiEndpoint).concat(licenseId, \"/\"));\n }\n }, {\n key: \"createLicense\",\n value: function createLicense() {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n name = _ref2.name,\n entry_storage_days = _ref2.entry_storage_days;\n\n return this.httpClient.post(this.authURL + Licenses.apiEndpoint, {\n name: name,\n entry_storage_days: entry_storage_days\n });\n }\n }, {\n key: \"updateLicense\",\n value: function updateLicense() {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n id = _ref3.id,\n name = _ref3.name,\n entry_storage_days = _ref3.entry_storage_days,\n is_active = _ref3.is_active;\n\n return this.httpClient.put(this.authURL + \"\".concat(Licenses.apiEndpoint).concat(id, \"/\"), {\n name: name,\n entry_storage_days: entry_storage_days,\n is_active: is_active\n });\n }\n }, {\n key: \"deleteLicense\",\n value: function deleteLicense(licenseId) {\n return this.httpClient[\"delete\"](this.authURL + \"\".concat(Licenses.apiEndpoint).concat(licenseId, \"/\"));\n }\n }]);\n\n return Licenses;\n}(_base_auth_api__WEBPACK_IMPORTED_MODULE_0__[\"AuthApi\"]);\n\n_defineProperty(Licenses, \"apiEndpoint\", \"licenses/\");\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/licenses/v1/index.ts?");
1050
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Licenses\", function() { return Licenses; });\n/* harmony import */ var _base_auth_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/auth-api */ \"./src/base/auth-api.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils */ \"./src/utils/index.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\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\n\nvar Licenses = /*#__PURE__*/function (_AuthApi) {\n _inherits(Licenses, _AuthApi);\n\n var _super = _createSuper(Licenses);\n\n function Licenses(settings) {\n var _this;\n\n _classCallCheck(this, Licenses);\n\n _this = _super.call(this, settings);\n _this.getLicenses = _this.getLicenses.bind(_assertThisInitialized(_this));\n _this.uploadLicense = _this.uploadLicense.bind(_assertThisInitialized(_this));\n _this.getLicense = _this.getLicense.bind(_assertThisInitialized(_this));\n _this.createLicense = _this.createLicense.bind(_assertThisInitialized(_this));\n _this.updateLicense = _this.updateLicense.bind(_assertThisInitialized(_this));\n _this.deleteLicense = _this.deleteLicense.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Licenses, [{\n key: \"getLicenses\",\n value: function getLicenses() {\n return this.httpClient.get(this.authURL + Licenses.apiEndpoint);\n }\n }, {\n key: \"uploadLicense\",\n value: function uploadLicense(_ref) {\n var license = _ref.license;\n var data = new FormData();\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addFileToFormData\"])(data, license, \"license\");\n return this.httpClient.post(this.authURL + Licenses.apiEndpoint, data);\n }\n }, {\n key: \"getLicense\",\n value: function getLicense(licenseId) {\n return this.httpClient.get(this.authURL + \"\".concat(Licenses.apiEndpoint).concat(licenseId, \"/\"));\n }\n }, {\n key: \"createLicense\",\n value: function createLicense() {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n name = _ref2.name,\n entry_storage_days = _ref2.entry_storage_days;\n\n return this.httpClient.post(this.authURL + Licenses.apiEndpoint, {\n name: name,\n entry_storage_days: entry_storage_days\n });\n }\n }, {\n key: \"updateLicense\",\n value: function updateLicense() {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n id = _ref3.id,\n name = _ref3.name,\n entry_storage_days = _ref3.entry_storage_days,\n is_active = _ref3.is_active;\n\n return this.httpClient.put(this.authURL + \"\".concat(Licenses.apiEndpoint).concat(id, \"/\"), {\n name: name,\n entry_storage_days: entry_storage_days,\n is_active: is_active\n });\n }\n }, {\n key: \"deleteLicense\",\n value: function deleteLicense(licenseId) {\n return this.httpClient[\"delete\"](this.authURL + \"\".concat(Licenses.apiEndpoint).concat(licenseId, \"/\"));\n }\n }]);\n\n return Licenses;\n}(_base_auth_api__WEBPACK_IMPORTED_MODULE_0__[\"AuthApi\"]);\n\n_defineProperty(Licenses, \"apiEndpoint\", \"licenses/\");\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/licenses/v1/index.ts?");
1051
1051
 
1052
1052
  /***/ }),
1053
1053
 
@@ -1083,7 +1083,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
1083
1083
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1084
1084
 
1085
1085
  "use strict";
1086
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Persons\", function() { return Persons; });\n/* harmony import */ var _base_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/api */ \"./src/base/api.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils */ \"./src/utils/index.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\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\n\nvar Persons = /*#__PURE__*/function (_Api) {\n _inherits(Persons, _Api);\n\n var _super = _createSuper(Persons);\n\n function Persons(settings) {\n var _this;\n\n _classCallCheck(this, Persons);\n\n _this = _super.call(this, settings);\n _this.searchPersonByImage = _this.searchPersonByImage.bind(_assertThisInitialized(_this));\n _this.createPerson = _this.createPerson.bind(_assertThisInitialized(_this)); // this.createPersonFromEntry = this.createPersonFromEntry.bind(this);\n\n _this.deletePerson = _this.deletePerson.bind(_assertThisInitialized(_this)); // this.reinitializePersonByEntry = this.reinitializePersonByEntry.bind(this);\n\n _this.reinitializePersonByImage = _this.reinitializePersonByImage.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Persons, [{\n key: \"searchPersonByImage\",\n value: function searchPersonByImage(_ref) {\n var image = _ref.image,\n identify_asm = _ref.identify_asm;\n if (!image) return Promise.reject(\"No image provided\");\n var fieldsData = {\n identify_asm: identify_asm\n };\n var data = new FormData();\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addFileToFormData\"])(data, image, \"image\");\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addDataToFormData\"])(data, fieldsData);\n return this.httpClient.post(\"\".concat(Persons.apiEndpoint, \"search/\"), data);\n }\n }, {\n key: \"createPerson\",\n value: function createPerson(_ref2) {\n var image = _ref2.image,\n origin_id = _ref2.origin_id,\n create_min_facesize = _ref2.create_min_facesize,\n create_ha = _ref2.create_ha,\n create_junk = _ref2.create_junk,\n identify_asm = _ref2.identify_asm;\n var fieldsData = {\n origin_id: origin_id,\n create_min_facesize: create_min_facesize,\n create_ha: create_ha,\n create_junk: create_junk,\n identify_asm: identify_asm\n };\n var data = new FormData();\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addFileToFormData\"])(data, image, \"image\");\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addDataToFormData\"])(data, fieldsData);\n return this.httpClient.post(Persons.apiEndpoint, data);\n } // createPersonFromEntry({\n // entryId,\n // create_on_ha,\n // create_on_junk,\n // }: CreatePersonFromEntryParamsInterface): Promise<null> {\n // return this.httpClient.post(`${Persons.apiEndpoint}entry/`, {\n // id: entryId,\n // create_on_ha,\n // create_on_junk,\n // });\n // }\n\n }, {\n key: \"deletePerson\",\n value: function deletePerson(pid) {\n return this.httpClient[\"delete\"](\"\".concat(Persons.apiEndpoint).concat(pid, \"/\"));\n } // reinitializePersonByEntry({\n // entryId,\n // }: ReinitializePersonByEntryParamsInterface): Promise<null> {\n // if (!entryId) return Promise.reject(\"No entry id provided\");\n //\n // return this.httpClient.post(`${Persons.apiEndpoint}reinit/`, {\n // id: entryId,\n // });\n // }\n\n }, {\n key: \"reinitializePersonByImage\",\n value: function reinitializePersonByImage(_ref3) {\n var pid = _ref3.pid,\n image = _ref3.image,\n min_conf = _ref3.min_conf,\n identify_asm = _ref3.identify_asm,\n create_min_facesize = _ref3.create_min_facesize;\n if (!image) return Promise.reject(\"No image provided\");\n var fieldsData = {\n min_conf: min_conf,\n create_min_facesize: create_min_facesize,\n identify_asm: identify_asm\n };\n var data = new FormData();\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addFileToFormData\"])(data, image, \"image\");\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addDataToFormData\"])(data, fieldsData);\n return this.httpClient.post(\"\".concat(Persons.apiEndpoint).concat(pid, \"/reinit/\"), data);\n }\n }]);\n\n return Persons;\n}(_base_api__WEBPACK_IMPORTED_MODULE_0__[\"Api\"]);\n\n_defineProperty(Persons, \"apiEndpoint\", \"profiles/\");\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/persons/v1/index.ts?");
1086
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Persons\", function() { return Persons; });\n/* harmony import */ var _base_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/api */ \"./src/base/api.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils */ \"./src/utils/index.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\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\n\nvar Persons = /*#__PURE__*/function (_Api) {\n _inherits(Persons, _Api);\n\n var _super = _createSuper(Persons);\n\n function Persons(settings) {\n var _this;\n\n _classCallCheck(this, Persons);\n\n _this = _super.call(this, settings);\n _this.searchPersonByImage = _this.searchPersonByImage.bind(_assertThisInitialized(_this));\n _this.createPerson = _this.createPerson.bind(_assertThisInitialized(_this)); // this.createPersonFromEntry = this.createPersonFromEntry.bind(this);\n\n _this.deletePerson = _this.deletePerson.bind(_assertThisInitialized(_this));\n _this.reinitializePersonByEntry = _this.reinitializePersonByEntry.bind(_assertThisInitialized(_this));\n _this.reinitializePersonByImage = _this.reinitializePersonByImage.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Persons, [{\n key: \"searchPersonByImage\",\n value: function searchPersonByImage(_ref) {\n var image = _ref.image,\n identify_asm = _ref.identify_asm;\n if (!image) return Promise.reject(\"No image provided\");\n var fieldsData = {\n identify_asm: identify_asm\n };\n var data = new FormData();\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addFileToFormData\"])(data, image, \"image\");\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addDataToFormData\"])(data, fieldsData);\n return this.httpClient.post(\"\".concat(Persons.apiEndpoint, \"search/\"), data);\n }\n }, {\n key: \"createPerson\",\n value: function createPerson(_ref2) {\n var image = _ref2.image,\n origin_id = _ref2.origin_id,\n create_min_facesize = _ref2.create_min_facesize,\n create_ha = _ref2.create_ha,\n create_junk = _ref2.create_junk,\n identify_asm = _ref2.identify_asm;\n var fieldsData = {\n origin_id: origin_id,\n create_min_facesize: create_min_facesize,\n create_ha: create_ha,\n create_junk: create_junk,\n identify_asm: identify_asm\n };\n var data = new FormData();\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addFileToFormData\"])(data, image, \"image\");\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addDataToFormData\"])(data, fieldsData);\n return this.httpClient.post(Persons.apiEndpoint, data);\n } // createPersonFromEntry({\n // entryId,\n // create_on_ha,\n // create_on_junk,\n // }: CreatePersonFromEntryParamsInterface): Promise<null> {\n // return this.httpClient.post(`${Persons.apiEndpoint}entry/`, {\n // id: entryId,\n // create_on_ha,\n // create_on_junk,\n // });\n // }\n\n }, {\n key: \"deletePerson\",\n value: function deletePerson(pid) {\n return this.httpClient[\"delete\"](\"\".concat(Persons.apiEndpoint).concat(pid, \"/\"));\n }\n }, {\n key: \"reinitializePersonByEntry\",\n value: function reinitializePersonByEntry(_ref3) {\n var entryId = _ref3.entryId;\n if (!entryId) return Promise.reject(\"No entry id provided\");\n return this.httpClient.post(\"\".concat(Persons.apiEndpoint, \"reinit/\"), {\n id: entryId\n });\n }\n }, {\n key: \"reinitializePersonByImage\",\n value: function reinitializePersonByImage(_ref4) {\n var pid = _ref4.pid,\n image = _ref4.image,\n min_conf = _ref4.min_conf,\n identify_asm = _ref4.identify_asm,\n create_min_facesize = _ref4.create_min_facesize;\n if (!image) return Promise.reject(\"No image provided\");\n var fieldsData = {\n min_conf: min_conf,\n create_min_facesize: create_min_facesize,\n identify_asm: identify_asm\n };\n var data = new FormData();\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addFileToFormData\"])(data, image, \"image\");\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addDataToFormData\"])(data, fieldsData);\n return this.httpClient.post(\"\".concat(Persons.apiEndpoint).concat(pid, \"/reinit/\"), data);\n }\n }]);\n\n return Persons;\n}(_base_api__WEBPACK_IMPORTED_MODULE_0__[\"Api\"]);\n\n_defineProperty(Persons, \"apiEndpoint\", \"profiles/\");\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/persons/v1/index.ts?");
1087
1087
 
1088
1088
  /***/ }),
1089
1089
 
@@ -803,7 +803,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
803
803
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
804
804
 
805
805
  "use strict";
806
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Licenses\", function() { return Licenses; });\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\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 Licenses = /*#__PURE__*/function (_AuthApi) {\n _inherits(Licenses, _AuthApi);\n\n var _super = _createSuper(Licenses);\n\n function Licenses(settings) {\n var _this;\n\n _classCallCheck(this, Licenses);\n\n _this = _super.call(this, settings);\n _this.getLicenses = _this.getLicenses.bind(_assertThisInitialized(_this));\n _this.uploadLicense = _this.uploadLicense.bind(_assertThisInitialized(_this));\n _this.getLicense = _this.getLicense.bind(_assertThisInitialized(_this));\n _this.createLicense = _this.createLicense.bind(_assertThisInitialized(_this));\n _this.updateLicense = _this.updateLicense.bind(_assertThisInitialized(_this));\n _this.deleteLicense = _this.deleteLicense.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Licenses, [{\n key: \"getLicenses\",\n value: function getLicenses() {\n return this.httpClient.get(this.authURL + Licenses.apiEndpoint);\n }\n }, {\n key: \"uploadLicense\",\n value: function uploadLicense() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n license = _ref.license;\n\n return this.httpClient.post(this.authURL + Licenses.apiEndpoint, {\n license: license\n });\n }\n }, {\n key: \"getLicense\",\n value: function getLicense(licenseId) {\n return this.httpClient.get(this.authURL + \"\".concat(Licenses.apiEndpoint).concat(licenseId, \"/\"));\n }\n }, {\n key: \"createLicense\",\n value: function createLicense() {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n name = _ref2.name,\n entry_storage_days = _ref2.entry_storage_days;\n\n return this.httpClient.post(this.authURL + Licenses.apiEndpoint, {\n name: name,\n entry_storage_days: entry_storage_days\n });\n }\n }, {\n key: \"updateLicense\",\n value: function updateLicense() {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n id = _ref3.id,\n name = _ref3.name,\n entry_storage_days = _ref3.entry_storage_days,\n is_active = _ref3.is_active;\n\n return this.httpClient.put(this.authURL + \"\".concat(Licenses.apiEndpoint).concat(id, \"/\"), {\n name: name,\n entry_storage_days: entry_storage_days,\n is_active: is_active\n });\n }\n }, {\n key: \"deleteLicense\",\n value: function deleteLicense(licenseId) {\n return this.httpClient.delete(this.authURL + \"\".concat(Licenses.apiEndpoint).concat(licenseId, \"/\"));\n }\n }]);\n\n return Licenses;\n}(_base_auth_api__WEBPACK_IMPORTED_MODULE_0__[\"AuthApi\"]);\n\n_defineProperty(Licenses, \"apiEndpoint\", \"licenses/\");\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/licenses/v1/index.ts?");
806
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Licenses\", function() { return Licenses; });\n/* harmony import */ var _base_auth_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/auth-api */ \"./src/base/auth-api.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils */ \"./src/utils/index.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\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\n\nvar Licenses = /*#__PURE__*/function (_AuthApi) {\n _inherits(Licenses, _AuthApi);\n\n var _super = _createSuper(Licenses);\n\n function Licenses(settings) {\n var _this;\n\n _classCallCheck(this, Licenses);\n\n _this = _super.call(this, settings);\n _this.getLicenses = _this.getLicenses.bind(_assertThisInitialized(_this));\n _this.uploadLicense = _this.uploadLicense.bind(_assertThisInitialized(_this));\n _this.getLicense = _this.getLicense.bind(_assertThisInitialized(_this));\n _this.createLicense = _this.createLicense.bind(_assertThisInitialized(_this));\n _this.updateLicense = _this.updateLicense.bind(_assertThisInitialized(_this));\n _this.deleteLicense = _this.deleteLicense.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Licenses, [{\n key: \"getLicenses\",\n value: function getLicenses() {\n return this.httpClient.get(this.authURL + Licenses.apiEndpoint);\n }\n }, {\n key: \"uploadLicense\",\n value: function uploadLicense(_ref) {\n var license = _ref.license;\n var data = new FormData();\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addFileToFormData\"])(data, license, \"license\");\n return this.httpClient.post(this.authURL + Licenses.apiEndpoint, data);\n }\n }, {\n key: \"getLicense\",\n value: function getLicense(licenseId) {\n return this.httpClient.get(this.authURL + \"\".concat(Licenses.apiEndpoint).concat(licenseId, \"/\"));\n }\n }, {\n key: \"createLicense\",\n value: function createLicense() {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n name = _ref2.name,\n entry_storage_days = _ref2.entry_storage_days;\n\n return this.httpClient.post(this.authURL + Licenses.apiEndpoint, {\n name: name,\n entry_storage_days: entry_storage_days\n });\n }\n }, {\n key: \"updateLicense\",\n value: function updateLicense() {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n id = _ref3.id,\n name = _ref3.name,\n entry_storage_days = _ref3.entry_storage_days,\n is_active = _ref3.is_active;\n\n return this.httpClient.put(this.authURL + \"\".concat(Licenses.apiEndpoint).concat(id, \"/\"), {\n name: name,\n entry_storage_days: entry_storage_days,\n is_active: is_active\n });\n }\n }, {\n key: \"deleteLicense\",\n value: function deleteLicense(licenseId) {\n return this.httpClient.delete(this.authURL + \"\".concat(Licenses.apiEndpoint).concat(licenseId, \"/\"));\n }\n }]);\n\n return Licenses;\n}(_base_auth_api__WEBPACK_IMPORTED_MODULE_0__[\"AuthApi\"]);\n\n_defineProperty(Licenses, \"apiEndpoint\", \"licenses/\");\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/licenses/v1/index.ts?");
807
807
 
808
808
  /***/ }),
809
809
 
@@ -839,7 +839,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
839
839
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
840
840
 
841
841
  "use strict";
842
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Persons\", function() { return Persons; });\n/* harmony import */ var _base_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/api */ \"./src/base/api.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils */ \"./src/utils/index.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\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\n\nvar Persons = /*#__PURE__*/function (_Api) {\n _inherits(Persons, _Api);\n\n var _super = _createSuper(Persons);\n\n function Persons(settings) {\n var _this;\n\n _classCallCheck(this, Persons);\n\n _this = _super.call(this, settings);\n _this.searchPersonByImage = _this.searchPersonByImage.bind(_assertThisInitialized(_this));\n _this.createPerson = _this.createPerson.bind(_assertThisInitialized(_this)); // this.createPersonFromEntry = this.createPersonFromEntry.bind(this);\n\n _this.deletePerson = _this.deletePerson.bind(_assertThisInitialized(_this)); // this.reinitializePersonByEntry = this.reinitializePersonByEntry.bind(this);\n\n _this.reinitializePersonByImage = _this.reinitializePersonByImage.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Persons, [{\n key: \"searchPersonByImage\",\n value: function searchPersonByImage(_ref) {\n var image = _ref.image,\n identify_asm = _ref.identify_asm;\n if (!image) return Promise.reject(\"No image provided\");\n var fieldsData = {\n identify_asm: identify_asm\n };\n var data = new FormData();\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addFileToFormData\"])(data, image, \"image\");\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addDataToFormData\"])(data, fieldsData);\n return this.httpClient.post(\"\".concat(Persons.apiEndpoint, \"search/\"), data);\n }\n }, {\n key: \"createPerson\",\n value: function createPerson(_ref2) {\n var image = _ref2.image,\n origin_id = _ref2.origin_id,\n create_min_facesize = _ref2.create_min_facesize,\n create_ha = _ref2.create_ha,\n create_junk = _ref2.create_junk,\n identify_asm = _ref2.identify_asm;\n var fieldsData = {\n origin_id: origin_id,\n create_min_facesize: create_min_facesize,\n create_ha: create_ha,\n create_junk: create_junk,\n identify_asm: identify_asm\n };\n var data = new FormData();\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addFileToFormData\"])(data, image, \"image\");\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addDataToFormData\"])(data, fieldsData);\n return this.httpClient.post(Persons.apiEndpoint, data);\n } // createPersonFromEntry({\n // entryId,\n // create_on_ha,\n // create_on_junk,\n // }: CreatePersonFromEntryParamsInterface): Promise<null> {\n // return this.httpClient.post(`${Persons.apiEndpoint}entry/`, {\n // id: entryId,\n // create_on_ha,\n // create_on_junk,\n // });\n // }\n\n }, {\n key: \"deletePerson\",\n value: function deletePerson(pid) {\n return this.httpClient.delete(\"\".concat(Persons.apiEndpoint).concat(pid, \"/\"));\n } // reinitializePersonByEntry({\n // entryId,\n // }: ReinitializePersonByEntryParamsInterface): Promise<null> {\n // if (!entryId) return Promise.reject(\"No entry id provided\");\n //\n // return this.httpClient.post(`${Persons.apiEndpoint}reinit/`, {\n // id: entryId,\n // });\n // }\n\n }, {\n key: \"reinitializePersonByImage\",\n value: function reinitializePersonByImage(_ref3) {\n var pid = _ref3.pid,\n image = _ref3.image,\n min_conf = _ref3.min_conf,\n identify_asm = _ref3.identify_asm,\n create_min_facesize = _ref3.create_min_facesize;\n if (!image) return Promise.reject(\"No image provided\");\n var fieldsData = {\n min_conf: min_conf,\n create_min_facesize: create_min_facesize,\n identify_asm: identify_asm\n };\n var data = new FormData();\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addFileToFormData\"])(data, image, \"image\");\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addDataToFormData\"])(data, fieldsData);\n return this.httpClient.post(\"\".concat(Persons.apiEndpoint).concat(pid, \"/reinit/\"), data);\n }\n }]);\n\n return Persons;\n}(_base_api__WEBPACK_IMPORTED_MODULE_0__[\"Api\"]);\n\n_defineProperty(Persons, \"apiEndpoint\", \"profiles/\");\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/persons/v1/index.ts?");
842
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Persons\", function() { return Persons; });\n/* harmony import */ var _base_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/api */ \"./src/base/api.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../utils */ \"./src/utils/index.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\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\n\nvar Persons = /*#__PURE__*/function (_Api) {\n _inherits(Persons, _Api);\n\n var _super = _createSuper(Persons);\n\n function Persons(settings) {\n var _this;\n\n _classCallCheck(this, Persons);\n\n _this = _super.call(this, settings);\n _this.searchPersonByImage = _this.searchPersonByImage.bind(_assertThisInitialized(_this));\n _this.createPerson = _this.createPerson.bind(_assertThisInitialized(_this)); // this.createPersonFromEntry = this.createPersonFromEntry.bind(this);\n\n _this.deletePerson = _this.deletePerson.bind(_assertThisInitialized(_this));\n _this.reinitializePersonByEntry = _this.reinitializePersonByEntry.bind(_assertThisInitialized(_this));\n _this.reinitializePersonByImage = _this.reinitializePersonByImage.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Persons, [{\n key: \"searchPersonByImage\",\n value: function searchPersonByImage(_ref) {\n var image = _ref.image,\n identify_asm = _ref.identify_asm;\n if (!image) return Promise.reject(\"No image provided\");\n var fieldsData = {\n identify_asm: identify_asm\n };\n var data = new FormData();\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addFileToFormData\"])(data, image, \"image\");\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addDataToFormData\"])(data, fieldsData);\n return this.httpClient.post(\"\".concat(Persons.apiEndpoint, \"search/\"), data);\n }\n }, {\n key: \"createPerson\",\n value: function createPerson(_ref2) {\n var image = _ref2.image,\n origin_id = _ref2.origin_id,\n create_min_facesize = _ref2.create_min_facesize,\n create_ha = _ref2.create_ha,\n create_junk = _ref2.create_junk,\n identify_asm = _ref2.identify_asm;\n var fieldsData = {\n origin_id: origin_id,\n create_min_facesize: create_min_facesize,\n create_ha: create_ha,\n create_junk: create_junk,\n identify_asm: identify_asm\n };\n var data = new FormData();\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addFileToFormData\"])(data, image, \"image\");\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addDataToFormData\"])(data, fieldsData);\n return this.httpClient.post(Persons.apiEndpoint, data);\n } // createPersonFromEntry({\n // entryId,\n // create_on_ha,\n // create_on_junk,\n // }: CreatePersonFromEntryParamsInterface): Promise<null> {\n // return this.httpClient.post(`${Persons.apiEndpoint}entry/`, {\n // id: entryId,\n // create_on_ha,\n // create_on_junk,\n // });\n // }\n\n }, {\n key: \"deletePerson\",\n value: function deletePerson(pid) {\n return this.httpClient.delete(\"\".concat(Persons.apiEndpoint).concat(pid, \"/\"));\n }\n }, {\n key: \"reinitializePersonByEntry\",\n value: function reinitializePersonByEntry(_ref3) {\n var entryId = _ref3.entryId;\n if (!entryId) return Promise.reject(\"No entry id provided\");\n return this.httpClient.post(\"\".concat(Persons.apiEndpoint, \"reinit/\"), {\n id: entryId\n });\n }\n }, {\n key: \"reinitializePersonByImage\",\n value: function reinitializePersonByImage(_ref4) {\n var pid = _ref4.pid,\n image = _ref4.image,\n min_conf = _ref4.min_conf,\n identify_asm = _ref4.identify_asm,\n create_min_facesize = _ref4.create_min_facesize;\n if (!image) return Promise.reject(\"No image provided\");\n var fieldsData = {\n min_conf: min_conf,\n create_min_facesize: create_min_facesize,\n identify_asm: identify_asm\n };\n var data = new FormData();\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addFileToFormData\"])(data, image, \"image\");\n Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addDataToFormData\"])(data, fieldsData);\n return this.httpClient.post(\"\".concat(Persons.apiEndpoint).concat(pid, \"/reinit/\"), data);\n }\n }]);\n\n return Persons;\n}(_base_api__WEBPACK_IMPORTED_MODULE_0__[\"Api\"]);\n\n_defineProperty(Persons, \"apiEndpoint\", \"profiles/\");\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/persons/v1/index.ts?");
843
843
 
844
844
  /***/ }),
845
845
 
@@ -14,6 +14,10 @@ export interface LicenseInterface {
14
14
  is_active?: boolean;
15
15
  }
16
16
 
17
+ export interface LicenseUploadInterface {
18
+ license: File;
19
+ }
20
+
17
21
  export interface LicensesFiltersInterface extends Paginatable, Searchable {
18
22
  date_from?: string;
19
23
  date_to?: string;
@@ -25,5 +29,5 @@ export interface LicensesInterface extends AuthApiInterface {
25
29
  getLicense(licenseId: id): Promise<LicenseInterface>;
26
30
  createLicense(license: LicenseInterface): Promise<LicenseInterface>;
27
31
  deleteLicense(licenseId: id): Promise<null>;
28
- uploadLicense(license: LicenseInterface): Promise<LicenseInterface>;
32
+ uploadLicense(license: LicenseUploadInterface): Promise<LicenseUploadInterface>;
29
33
  }
@@ -1,4 +1,4 @@
1
- import { Result, Sex, Mood } from "../../../../base/types";
1
+ import { id, Result, Sex, Mood } from "../../../../base/types";
2
2
 
3
3
  export interface PersonResponseIterface {
4
4
  result: Result;
@@ -28,9 +28,9 @@ export interface CreatePersonParamsInterface {
28
28
  // create_on_junk?: boolean;
29
29
  // }
30
30
 
31
- // export interface ReinitializePersonByEntryParamsInterface {
32
- // entryId: id;
33
- // }
31
+ export interface ReinitializePersonByEntryParamsInterface {
32
+ entryId: id;
33
+ }
34
34
 
35
35
  export interface ReinitializePersonByImageParamsInterface {
36
36
  pid: string;
@@ -51,9 +51,9 @@ export interface PersonsInterface {
51
51
  // person: CreatePersonFromEntryParamsInterface
52
52
  // ): Promise<null>;
53
53
  deletePerson(pid: string): Promise<null>;
54
- // reinitializePersonByEntry(
55
- // params: ReinitializePersonByEntryParamsInterface
56
- // ): Promise<null>;
54
+ reinitializePersonByEntry(
55
+ params: ReinitializePersonByEntryParamsInterface
56
+ ): Promise<null>;
57
57
  reinitializePersonByImage(
58
58
  params: ReinitializePersonByImageParamsInterface
59
59
  ): Promise<null>;
@@ -1,9 +1,10 @@
1
1
  import { AuthApi, AuthApiSettingsInterface } from "../../../../base/auth-api";
2
2
  import {
3
3
  LicensesInterface,
4
- LicenseInterface,
4
+ LicenseInterface, LicenseUploadInterface,
5
5
  } from "../../../api-facade/v1/licenses";
6
6
  import { id } from "../../../../base/types";
7
+ import { addFileToFormData } from "../../../../utils";
7
8
 
8
9
  class Licenses extends AuthApi implements LicensesInterface {
9
10
  constructor(settings: AuthApiSettingsInterface) {
@@ -26,10 +27,11 @@ class Licenses extends AuthApi implements LicensesInterface {
26
27
 
27
28
  uploadLicense({
28
29
  license,
29
- }: LicenseInterface = {}): Promise<LicenseInterface> {
30
- return this.httpClient.post(this.authURL + Licenses.apiEndpoint, {
31
- license,
32
- });
30
+ }: LicenseUploadInterface): Promise<LicenseUploadInterface> {
31
+ const data = new FormData();
32
+
33
+ addFileToFormData(data, license, "license");
34
+ return this.httpClient.post(this.authURL + Licenses.apiEndpoint, data);
33
35
  }
34
36
 
35
37
  getLicense(licenseId: id): Promise<LicenseInterface> {
@@ -5,7 +5,7 @@ import {
5
5
  SearchPersonByImageParamsInterface,
6
6
  PersonsInterface,
7
7
  CreatePersonParamsInterface,
8
- // ReinitializePersonByEntryParamsInterface,
8
+ ReinitializePersonByEntryParamsInterface,
9
9
  ReinitializePersonByImageParamsInterface,
10
10
  // CreatePersonFromEntryParamsInterface,
11
11
  PersonResponseIterface,
@@ -18,7 +18,7 @@ class Persons extends Api implements PersonsInterface {
18
18
  this.createPerson = this.createPerson.bind(this);
19
19
  // this.createPersonFromEntry = this.createPersonFromEntry.bind(this);
20
20
  this.deletePerson = this.deletePerson.bind(this);
21
- // this.reinitializePersonByEntry = this.reinitializePersonByEntry.bind(this);
21
+ this.reinitializePersonByEntry = this.reinitializePersonByEntry.bind(this);
22
22
  this.reinitializePersonByImage = this.reinitializePersonByImage.bind(this);
23
23
  }
24
24
 
@@ -78,15 +78,15 @@ class Persons extends Api implements PersonsInterface {
78
78
  return this.httpClient.delete(`${Persons.apiEndpoint}${pid}/`);
79
79
  }
80
80
 
81
- // reinitializePersonByEntry({
82
- // entryId,
83
- // }: ReinitializePersonByEntryParamsInterface): Promise<null> {
84
- // if (!entryId) return Promise.reject("No entry id provided");
85
- //
86
- // return this.httpClient.post(`${Persons.apiEndpoint}reinit/`, {
87
- // id: entryId,
88
- // });
89
- // }
81
+ reinitializePersonByEntry({
82
+ entryId,
83
+ }: ReinitializePersonByEntryParamsInterface): Promise<null> {
84
+ if (!entryId) return Promise.reject("No entry id provided");
85
+
86
+ return this.httpClient.post(`${Persons.apiEndpoint}reinit/`, {
87
+ id: entryId,
88
+ });
89
+ }
90
90
 
91
91
  reinitializePersonByImage({
92
92
  pid,