@serptech/api 1.0.10 → 1.0.12
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/dist/SerpApi.node.js +1 -1
- package/dist/SerpApi.web.js +1 -1
- package/package.json +1 -1
- package/packages/serp-rest-api/dist/index.node.js +1 -1
- package/packages/serp-rest-api/dist/index.web.js +1 -1
- package/packages/serp-rest-api/src/serp-rest-api/api-facade/v1/sources/index.ts +18 -21
- package/packages/serp-rest-api/src/serp-rest-api/features/sources/v1/index.ts +34 -44
package/package.json
CHANGED
@@ -1095,7 +1095,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
1095
1095
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1096
1096
|
|
1097
1097
|
"use strict";
|
1098
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Sources\", function() { return Sources; });\n/* harmony import */ var _base_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/api */ \"./src/base/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 Sources = /*#__PURE__*/function (_Api) {\n _inherits(Sources, _Api);\n\n var _super = _createSuper(Sources);\n\n function Sources(settings) {\n var _this;\n\n _classCallCheck(this, Sources);\n\n _this = _super.call(this, settings);\n _this.getSources = _this.getSources.bind(_assertThisInitialized(_this));\n _this.getSource = _this.getSource.bind(_assertThisInitialized(_this));\n _this.createSource = _this.createSource.bind(_assertThisInitialized(_this));\n _this.updateSource = _this.updateSource.bind(_assertThisInitialized(_this));\n _this.deleteSource = _this.deleteSource.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Sources, [{\n key: \"getSources\",\n value: function getSources() {\n var filters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var getFiltersData = function getFiltersData() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n q = _ref.q,\n limit = _ref.limit,\n offset = _ref.offset,\n spaces_ids = _ref.spaces_ids;\n\n return {\n q: q,\n limit: limit,\n offset: offset,\n spaces_ids: spaces_ids\n };\n };\n\n return this.httpClient.get(Sources.apiEndpoint, getFiltersData(filters));\n }\n }, {\n key: \"getSource\",\n value: function getSource(sourceId) {\n return this.httpClient.get(\"\".concat(Sources.apiEndpoint).concat(sourceId, \"/\"));\n }\n }, {\n key: \"createSource\",\n value: function createSource(data) {\n return this.httpClient.post(Sources.apiEndpoint, Sources.getSourceData(data));\n }\n }, {\n key: \"updateSource\",\n value: function updateSource() {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var id = _ref2.id,\n restData = _objectWithoutProperties(_ref2, _excluded);\n\n return this.httpClient.put(\"\".concat(Sources.apiEndpoint).concat(id, \"/\"), Sources.getSourceData(restData));\n }\n }, {\n key: \"deleteSource\",\n value: function deleteSource(sourceId) {\n return this.httpClient[\"delete\"](\"\".concat(Sources.apiEndpoint).concat(sourceId, \"/\"));\n }\n }]);\n\n return Sources;\n}(_base_api__WEBPACK_IMPORTED_MODULE_0__[\"Api\"]);\n\n_defineProperty(Sources, \"apiEndpoint\", \"origins/\");\n\n_defineProperty(Sources, \"getSourceData\", function () {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n name = _ref3.name,\n
|
1098
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Sources\", function() { return Sources; });\n/* harmony import */ var _base_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/api */ \"./src/base/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 Sources = /*#__PURE__*/function (_Api) {\n _inherits(Sources, _Api);\n\n var _super = _createSuper(Sources);\n\n function Sources(settings) {\n var _this;\n\n _classCallCheck(this, Sources);\n\n _this = _super.call(this, settings);\n _this.getSources = _this.getSources.bind(_assertThisInitialized(_this));\n _this.getSource = _this.getSource.bind(_assertThisInitialized(_this));\n _this.createSource = _this.createSource.bind(_assertThisInitialized(_this));\n _this.updateSource = _this.updateSource.bind(_assertThisInitialized(_this));\n _this.deleteSource = _this.deleteSource.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Sources, [{\n key: \"getSources\",\n value: function getSources() {\n var filters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var getFiltersData = function getFiltersData() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n q = _ref.q,\n limit = _ref.limit,\n offset = _ref.offset,\n spaces_ids = _ref.spaces_ids;\n\n return {\n q: q,\n limit: limit,\n offset: offset,\n spaces_ids: spaces_ids\n };\n };\n\n return this.httpClient.get(Sources.apiEndpoint, getFiltersData(filters));\n }\n }, {\n key: \"getSource\",\n value: function getSource(sourceId) {\n return this.httpClient.get(\"\".concat(Sources.apiEndpoint).concat(sourceId, \"/\"));\n }\n }, {\n key: \"createSource\",\n value: function createSource(data) {\n return this.httpClient.post(Sources.apiEndpoint, Sources.getSourceData(data));\n }\n }, {\n key: \"updateSource\",\n value: function updateSource() {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var id = _ref2.id,\n restData = _objectWithoutProperties(_ref2, _excluded);\n\n return this.httpClient.put(\"\".concat(Sources.apiEndpoint).concat(id, \"/\"), Sources.getSourceData(restData));\n }\n }, {\n key: \"deleteSource\",\n value: function deleteSource(sourceId) {\n return this.httpClient[\"delete\"](\"\".concat(Sources.apiEndpoint).concat(sourceId, \"/\"));\n }\n }]);\n\n return Sources;\n}(_base_api__WEBPACK_IMPORTED_MODULE_0__[\"Api\"]);\n\n_defineProperty(Sources, \"apiEndpoint\", \"origins/\");\n\n_defineProperty(Sources, \"getSourceData\", function () {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n name = _ref3.name,\n min_facesize = _ref3.min_facesize,\n save_img_for_confs = _ref3.save_img_for_confs,\n save_entries_for_confs = _ref3.save_entries_for_confs,\n entry_storage_days = _ref3.entry_storage_days,\n upload_create_ha = _ref3.upload_create_ha,\n upload_create_junk = _ref3.upload_create_junk,\n upload_create_min_facesize = _ref3.upload_create_min_facesize,\n upload_create_profile = _ref3.upload_create_profile,\n upload_identify_asm = _ref3.upload_identify_asm,\n upload_identify_liveness = _ref3.upload_identify_liveness,\n upload_filter_by_face_angle = _ref3.upload_filter_by_face_angle,\n upload_create_filter_blur = _ref3.upload_create_filter_blur,\n upload_create_filter_exp = _ref3.upload_create_filter_exp,\n create_identify_asm = _ref3.create_identify_asm,\n create_min_facesize = _ref3.create_min_facesize,\n create_ha = _ref3.create_ha,\n create_junk = _ref3.create_junk;\n\n return {\n name: name,\n min_facesize: min_facesize,\n save_img_for_confs: save_img_for_confs,\n save_entries_for_confs: save_entries_for_confs,\n entry_storage_days: entry_storage_days,\n upload_create_ha: upload_create_ha,\n upload_create_junk: upload_create_junk,\n upload_create_min_facesize: upload_create_min_facesize,\n upload_create_profile: upload_create_profile,\n upload_identify_asm: upload_identify_asm,\n upload_identify_liveness: upload_identify_liveness,\n upload_filter_by_face_angle: upload_filter_by_face_angle,\n upload_create_filter_blur: upload_create_filter_blur,\n upload_create_filter_exp: upload_create_filter_exp,\n create_identify_asm: create_identify_asm,\n create_min_facesize: create_min_facesize,\n create_ha: create_ha,\n create_junk: create_junk\n };\n});\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/sources/v1/index.ts?");
|
1099
1099
|
|
1100
1100
|
/***/ }),
|
1101
1101
|
|
@@ -851,7 +851,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
851
851
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
852
852
|
|
853
853
|
"use strict";
|
854
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Sources\", function() { return Sources; });\n/* harmony import */ var _base_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/api */ \"./src/base/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 Sources = /*#__PURE__*/function (_Api) {\n _inherits(Sources, _Api);\n\n var _super = _createSuper(Sources);\n\n function Sources(settings) {\n var _this;\n\n _classCallCheck(this, Sources);\n\n _this = _super.call(this, settings);\n _this.getSources = _this.getSources.bind(_assertThisInitialized(_this));\n _this.getSource = _this.getSource.bind(_assertThisInitialized(_this));\n _this.createSource = _this.createSource.bind(_assertThisInitialized(_this));\n _this.updateSource = _this.updateSource.bind(_assertThisInitialized(_this));\n _this.deleteSource = _this.deleteSource.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Sources, [{\n key: \"getSources\",\n value: function getSources() {\n var filters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var getFiltersData = function getFiltersData() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n q = _ref.q,\n limit = _ref.limit,\n offset = _ref.offset,\n spaces_ids = _ref.spaces_ids;\n\n return {\n q: q,\n limit: limit,\n offset: offset,\n spaces_ids: spaces_ids\n };\n };\n\n return this.httpClient.get(Sources.apiEndpoint, getFiltersData(filters));\n }\n }, {\n key: \"getSource\",\n value: function getSource(sourceId) {\n return this.httpClient.get(\"\".concat(Sources.apiEndpoint).concat(sourceId, \"/\"));\n }\n }, {\n key: \"createSource\",\n value: function createSource(data) {\n return this.httpClient.post(Sources.apiEndpoint, Sources.getSourceData(data));\n }\n }, {\n key: \"updateSource\",\n value: function updateSource() {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var id = _ref2.id,\n restData = _objectWithoutProperties(_ref2, _excluded);\n\n return this.httpClient.put(\"\".concat(Sources.apiEndpoint).concat(id, \"/\"), Sources.getSourceData(restData));\n }\n }, {\n key: \"deleteSource\",\n value: function deleteSource(sourceId) {\n return this.httpClient.delete(\"\".concat(Sources.apiEndpoint).concat(sourceId, \"/\"));\n }\n }]);\n\n return Sources;\n}(_base_api__WEBPACK_IMPORTED_MODULE_0__[\"Api\"]);\n\n_defineProperty(Sources, \"apiEndpoint\", \"origins/\");\n\n_defineProperty(Sources, \"getSourceData\", function () {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n name = _ref3.name,\n
|
854
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Sources\", function() { return Sources; });\n/* harmony import */ var _base_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../base/api */ \"./src/base/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 Sources = /*#__PURE__*/function (_Api) {\n _inherits(Sources, _Api);\n\n var _super = _createSuper(Sources);\n\n function Sources(settings) {\n var _this;\n\n _classCallCheck(this, Sources);\n\n _this = _super.call(this, settings);\n _this.getSources = _this.getSources.bind(_assertThisInitialized(_this));\n _this.getSource = _this.getSource.bind(_assertThisInitialized(_this));\n _this.createSource = _this.createSource.bind(_assertThisInitialized(_this));\n _this.updateSource = _this.updateSource.bind(_assertThisInitialized(_this));\n _this.deleteSource = _this.deleteSource.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Sources, [{\n key: \"getSources\",\n value: function getSources() {\n var filters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var getFiltersData = function getFiltersData() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n q = _ref.q,\n limit = _ref.limit,\n offset = _ref.offset,\n spaces_ids = _ref.spaces_ids;\n\n return {\n q: q,\n limit: limit,\n offset: offset,\n spaces_ids: spaces_ids\n };\n };\n\n return this.httpClient.get(Sources.apiEndpoint, getFiltersData(filters));\n }\n }, {\n key: \"getSource\",\n value: function getSource(sourceId) {\n return this.httpClient.get(\"\".concat(Sources.apiEndpoint).concat(sourceId, \"/\"));\n }\n }, {\n key: \"createSource\",\n value: function createSource(data) {\n return this.httpClient.post(Sources.apiEndpoint, Sources.getSourceData(data));\n }\n }, {\n key: \"updateSource\",\n value: function updateSource() {\n var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var id = _ref2.id,\n restData = _objectWithoutProperties(_ref2, _excluded);\n\n return this.httpClient.put(\"\".concat(Sources.apiEndpoint).concat(id, \"/\"), Sources.getSourceData(restData));\n }\n }, {\n key: \"deleteSource\",\n value: function deleteSource(sourceId) {\n return this.httpClient.delete(\"\".concat(Sources.apiEndpoint).concat(sourceId, \"/\"));\n }\n }]);\n\n return Sources;\n}(_base_api__WEBPACK_IMPORTED_MODULE_0__[\"Api\"]);\n\n_defineProperty(Sources, \"apiEndpoint\", \"origins/\");\n\n_defineProperty(Sources, \"getSourceData\", function () {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n name = _ref3.name,\n min_facesize = _ref3.min_facesize,\n save_img_for_confs = _ref3.save_img_for_confs,\n save_entries_for_confs = _ref3.save_entries_for_confs,\n entry_storage_days = _ref3.entry_storage_days,\n upload_create_ha = _ref3.upload_create_ha,\n upload_create_junk = _ref3.upload_create_junk,\n upload_create_min_facesize = _ref3.upload_create_min_facesize,\n upload_create_profile = _ref3.upload_create_profile,\n upload_identify_asm = _ref3.upload_identify_asm,\n upload_identify_liveness = _ref3.upload_identify_liveness,\n upload_filter_by_face_angle = _ref3.upload_filter_by_face_angle,\n upload_create_filter_blur = _ref3.upload_create_filter_blur,\n upload_create_filter_exp = _ref3.upload_create_filter_exp,\n create_identify_asm = _ref3.create_identify_asm,\n create_min_facesize = _ref3.create_min_facesize,\n create_ha = _ref3.create_ha,\n create_junk = _ref3.create_junk;\n\n return {\n name: name,\n min_facesize: min_facesize,\n save_img_for_confs: save_img_for_confs,\n save_entries_for_confs: save_entries_for_confs,\n entry_storage_days: entry_storage_days,\n upload_create_ha: upload_create_ha,\n upload_create_junk: upload_create_junk,\n upload_create_min_facesize: upload_create_min_facesize,\n upload_create_profile: upload_create_profile,\n upload_identify_asm: upload_identify_asm,\n upload_identify_liveness: upload_identify_liveness,\n upload_filter_by_face_angle: upload_filter_by_face_angle,\n upload_create_filter_blur: upload_create_filter_blur,\n upload_create_filter_exp: upload_create_filter_exp,\n create_identify_asm: create_identify_asm,\n create_min_facesize: create_min_facesize,\n create_ha: create_ha,\n create_junk: create_junk\n };\n});\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/sources/v1/index.ts?");
|
855
855
|
|
856
856
|
/***/ }),
|
857
857
|
|
@@ -6,32 +6,29 @@ export interface SourceInterface {
|
|
6
6
|
// read only
|
7
7
|
space_id?: id;
|
8
8
|
name?: string;
|
9
|
-
|
10
|
-
|
11
|
-
identify_facesize_threshold?: number;
|
12
|
-
use_pps_timestamp?: boolean;
|
9
|
+
min_facesize?: number;
|
10
|
+
entry_storage_days?: number;
|
13
11
|
|
14
12
|
// Photo processing
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
create_min_facesize?: number;
|
14
|
+
create_ha?: boolean;
|
15
|
+
create_junk?: boolean;
|
16
|
+
create_identify_asm?: boolean;
|
19
17
|
|
20
18
|
// Processing a video stream
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
auto_create_liveness_only?: boolean;
|
31
|
-
auto_identify_asm?: boolean;
|
19
|
+
upload_create_profile?: boolean;
|
20
|
+
upload_create_min_facesize?: number;
|
21
|
+
upload_create_filter_blur?: boolean;
|
22
|
+
upload_create_filter_exp?: boolean;
|
23
|
+
upload_create_ha?: boolean;
|
24
|
+
upload_create_junk?: boolean;
|
25
|
+
upload_filter_by_face_angle?: boolean;
|
26
|
+
upload_identify_liveness?: boolean;
|
27
|
+
upload_identify_asm?: boolean;
|
32
28
|
|
33
|
-
// Saving images
|
34
|
-
|
29
|
+
// Saving images and entries
|
30
|
+
save_img_for_confs?: Array<number>;
|
31
|
+
save_entries_for_confs?: Array<number>;
|
35
32
|
}
|
36
33
|
|
37
34
|
export interface SourcesFiltersInterface extends Paginatable, Searchable {
|
@@ -20,52 +20,42 @@ class Sources extends Api implements SourcesInterface {
|
|
20
20
|
|
21
21
|
static getSourceData = ({
|
22
22
|
name,
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
auto_identify_asm,
|
41
|
-
|
42
|
-
store_images_for_results,
|
43
|
-
license_id,
|
44
|
-
license,
|
23
|
+
min_facesize,
|
24
|
+
save_img_for_confs,
|
25
|
+
save_entries_for_confs,
|
26
|
+
entry_storage_days,
|
27
|
+
upload_create_ha,
|
28
|
+
upload_create_junk,
|
29
|
+
upload_create_min_facesize,
|
30
|
+
upload_create_profile,
|
31
|
+
upload_identify_asm,
|
32
|
+
upload_identify_liveness,
|
33
|
+
upload_filter_by_face_angle,
|
34
|
+
upload_create_filter_blur,
|
35
|
+
upload_create_filter_exp,
|
36
|
+
create_identify_asm,
|
37
|
+
create_min_facesize,
|
38
|
+
create_ha,
|
39
|
+
create_junk,
|
45
40
|
}: SourceInterface = {}): {} => ({
|
46
41
|
name,
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
auto_identify_asm,
|
65
|
-
|
66
|
-
store_images_for_results,
|
67
|
-
license_id,
|
68
|
-
license,
|
42
|
+
min_facesize,
|
43
|
+
save_img_for_confs,
|
44
|
+
save_entries_for_confs,
|
45
|
+
entry_storage_days,
|
46
|
+
upload_create_ha,
|
47
|
+
upload_create_junk,
|
48
|
+
upload_create_min_facesize,
|
49
|
+
upload_create_profile,
|
50
|
+
upload_identify_asm,
|
51
|
+
upload_identify_liveness,
|
52
|
+
upload_filter_by_face_angle,
|
53
|
+
upload_create_filter_blur,
|
54
|
+
upload_create_filter_exp,
|
55
|
+
create_identify_asm,
|
56
|
+
create_min_facesize,
|
57
|
+
create_ha,
|
58
|
+
create_junk,
|
69
59
|
});
|
70
60
|
|
71
61
|
getSources(filters: SourcesFiltersInterface = {}): Promise<null> {
|