@serptech/api 1.0.5 → 1.0.7

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.5",
3
+ "version": "1.0.7",
4
4
  "description": "Library for work with SERP API",
5
5
  "source": "index.js",
6
6
  "main": "./dist/SerpApi.node.js",
@@ -1059,7 +1059,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
1059
1059
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
1060
1060
 
1061
1061
  "use strict";
1062
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Notifications\", function() { return Notifications; });\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 Notifications = /*#__PURE__*/function (_Api) {\n _inherits(Notifications, _Api);\n\n var _super = _createSuper(Notifications);\n\n function Notifications(settings) {\n var _this;\n\n _classCallCheck(this, Notifications);\n\n _this = _super.call(this, settings);\n _this.getNotifications = _this.getNotifications.bind(_assertThisInitialized(_this));\n _this.getNotification = _this.getNotification.bind(_assertThisInitialized(_this));\n _this.createNotification = _this.createNotification.bind(_assertThisInitialized(_this));\n _this.updateNotification = _this.updateNotification.bind(_assertThisInitialized(_this));\n _this.deleteNotification = _this.deleteNotification.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Notifications, [{\n key: \"getNotifications\",\n value: function getNotifications() {\n var filters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var getFiltersData = function getFiltersData(_ref) {\n var q = _ref.q,\n limit = _ref.limit,\n offset = _ref.offset,\n spaces_ids = _ref.spaces_ids;\n return {\n q: q,\n limit: limit,\n offset: offset,\n spaces_ids: spaces_ids\n };\n };\n\n return this.httpClient.get(Notifications.apiEndpoint, getFiltersData(filters));\n }\n }, {\n key: \"getNotification\",\n value: function getNotification(notificationId) {\n return this.httpClient.get(\"\".concat(Notifications.apiEndpoint).concat(notificationId, \"/\"));\n }\n }, {\n key: \"createNotification\",\n value: function createNotification(data) {\n return this.httpClient.post(Notifications.apiEndpoint, Notifications.getNotificationData(data));\n }\n }, {\n key: \"updateNotification\",\n value: function updateNotification() {\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(Notifications.apiEndpoint).concat(id, \"/\"), Notifications.getNotificationData(restData));\n }\n }, {\n key: \"deleteNotification\",\n value: function deleteNotification(notificationId) {\n return this.httpClient[\"delete\"](\"\".concat(Notifications.apiEndpoint).concat(notificationId, \"/\"));\n }\n }]);\n\n return Notifications;\n}(_base_api__WEBPACK_IMPORTED_MODULE_0__[\"Api\"]);\n\n_defineProperty(Notifications, \"apiEndpoint\", \"notification_settings/\");\n\n_defineProperty(Notifications, \"getNotificationData\", function () {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n name = _ref3.name,\n is_active = _ref3.is_active,\n http_method = _ref3.http_method,\n destination_url = _ref3.destination_url,\n results = _ref3.results,\n age_from = _ref3.age_from,\n age_to = _ref3.age_to,\n sex = _ref3.sex,\n moods = _ref3.moods,\n sources = _ref3.sources,\n persons_groups = _ref3.persons_groups,\n liveness = _ref3.liveness;\n\n return {\n name: name,\n is_active: is_active,\n http_method: http_method,\n destination_url: destination_url,\n results: results,\n age_from: age_from,\n age_to: age_to,\n sex: sex,\n moods: moods,\n sources: sources,\n persons_groups: persons_groups,\n liveness: liveness\n };\n});\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/notifications/v1/index.ts?");
1062
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Notifications\", function() { return Notifications; });\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 Notifications = /*#__PURE__*/function (_Api) {\n _inherits(Notifications, _Api);\n\n var _super = _createSuper(Notifications);\n\n function Notifications(settings) {\n var _this;\n\n _classCallCheck(this, Notifications);\n\n _this = _super.call(this, settings);\n _this.getNotifications = _this.getNotifications.bind(_assertThisInitialized(_this));\n _this.getNotification = _this.getNotification.bind(_assertThisInitialized(_this));\n _this.createNotification = _this.createNotification.bind(_assertThisInitialized(_this));\n _this.updateNotification = _this.updateNotification.bind(_assertThisInitialized(_this));\n _this.deleteNotification = _this.deleteNotification.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Notifications, [{\n key: \"getNotifications\",\n value: function getNotifications() {\n var filters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var getFiltersData = function getFiltersData(_ref) {\n var q = _ref.q,\n limit = _ref.limit,\n offset = _ref.offset,\n spaces_ids = _ref.spaces_ids;\n return {\n q: q,\n limit: limit,\n offset: offset,\n spaces_ids: spaces_ids\n };\n };\n\n return this.httpClient.get(Notifications.apiEndpoint, getFiltersData(filters));\n }\n }, {\n key: \"getNotification\",\n value: function getNotification(notificationId) {\n return this.httpClient.get(\"\".concat(Notifications.apiEndpoint).concat(notificationId, \"/\"));\n }\n }, {\n key: \"createNotification\",\n value: function createNotification(data) {\n return this.httpClient.post(Notifications.apiEndpoint, Notifications.getNotificationData(data));\n }\n }, {\n key: \"updateNotification\",\n value: function updateNotification() {\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(Notifications.apiEndpoint).concat(id, \"/\"), Notifications.getNotificationData(restData));\n }\n }, {\n key: \"deleteNotification\",\n value: function deleteNotification(notificationId) {\n return this.httpClient[\"delete\"](\"\".concat(Notifications.apiEndpoint).concat(notificationId, \"/\"));\n }\n }]);\n\n return Notifications;\n}(_base_api__WEBPACK_IMPORTED_MODULE_0__[\"Api\"]);\n\n_defineProperty(Notifications, \"apiEndpoint\", \"notification_settings/\");\n\n_defineProperty(Notifications, \"getNotificationData\", function () {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n transport = _ref3.transport,\n name = _ref3.name,\n http_method = _ref3.http_method,\n url = _ref3.url,\n mood = _ref3.mood,\n conf = _ref3.conf,\n liveness_check = _ref3.liveness_check,\n age_from = _ref3.age_from,\n age_to = _ref3.age_to,\n sex = _ref3.sex,\n origin_ids = _ref3.origin_ids;\n\n return {\n transport: transport,\n name: name,\n http_method: http_method,\n url: url,\n mood: mood,\n conf: conf,\n liveness_check: liveness_check,\n age_from: age_from,\n age_to: age_to,\n sex: sex,\n origin_ids: origin_ids\n };\n});\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/notifications/v1/index.ts?");
1063
1063
 
1064
1064
  /***/ }),
1065
1065
 
@@ -815,7 +815,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
815
815
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
816
816
 
817
817
  "use strict";
818
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Notifications\", function() { return Notifications; });\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 Notifications = /*#__PURE__*/function (_Api) {\n _inherits(Notifications, _Api);\n\n var _super = _createSuper(Notifications);\n\n function Notifications(settings) {\n var _this;\n\n _classCallCheck(this, Notifications);\n\n _this = _super.call(this, settings);\n _this.getNotifications = _this.getNotifications.bind(_assertThisInitialized(_this));\n _this.getNotification = _this.getNotification.bind(_assertThisInitialized(_this));\n _this.createNotification = _this.createNotification.bind(_assertThisInitialized(_this));\n _this.updateNotification = _this.updateNotification.bind(_assertThisInitialized(_this));\n _this.deleteNotification = _this.deleteNotification.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Notifications, [{\n key: \"getNotifications\",\n value: function getNotifications() {\n var filters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var getFiltersData = function getFiltersData(_ref) {\n var q = _ref.q,\n limit = _ref.limit,\n offset = _ref.offset,\n spaces_ids = _ref.spaces_ids;\n return {\n q: q,\n limit: limit,\n offset: offset,\n spaces_ids: spaces_ids\n };\n };\n\n return this.httpClient.get(Notifications.apiEndpoint, getFiltersData(filters));\n }\n }, {\n key: \"getNotification\",\n value: function getNotification(notificationId) {\n return this.httpClient.get(\"\".concat(Notifications.apiEndpoint).concat(notificationId, \"/\"));\n }\n }, {\n key: \"createNotification\",\n value: function createNotification(data) {\n return this.httpClient.post(Notifications.apiEndpoint, Notifications.getNotificationData(data));\n }\n }, {\n key: \"updateNotification\",\n value: function updateNotification() {\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(Notifications.apiEndpoint).concat(id, \"/\"), Notifications.getNotificationData(restData));\n }\n }, {\n key: \"deleteNotification\",\n value: function deleteNotification(notificationId) {\n return this.httpClient.delete(\"\".concat(Notifications.apiEndpoint).concat(notificationId, \"/\"));\n }\n }]);\n\n return Notifications;\n}(_base_api__WEBPACK_IMPORTED_MODULE_0__[\"Api\"]);\n\n_defineProperty(Notifications, \"apiEndpoint\", \"notification_settings/\");\n\n_defineProperty(Notifications, \"getNotificationData\", function () {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n name = _ref3.name,\n is_active = _ref3.is_active,\n http_method = _ref3.http_method,\n destination_url = _ref3.destination_url,\n results = _ref3.results,\n age_from = _ref3.age_from,\n age_to = _ref3.age_to,\n sex = _ref3.sex,\n moods = _ref3.moods,\n sources = _ref3.sources,\n persons_groups = _ref3.persons_groups,\n liveness = _ref3.liveness;\n\n return {\n name: name,\n is_active: is_active,\n http_method: http_method,\n destination_url: destination_url,\n results: results,\n age_from: age_from,\n age_to: age_to,\n sex: sex,\n moods: moods,\n sources: sources,\n persons_groups: persons_groups,\n liveness: liveness\n };\n});\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/notifications/v1/index.ts?");
818
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Notifications\", function() { return Notifications; });\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 Notifications = /*#__PURE__*/function (_Api) {\n _inherits(Notifications, _Api);\n\n var _super = _createSuper(Notifications);\n\n function Notifications(settings) {\n var _this;\n\n _classCallCheck(this, Notifications);\n\n _this = _super.call(this, settings);\n _this.getNotifications = _this.getNotifications.bind(_assertThisInitialized(_this));\n _this.getNotification = _this.getNotification.bind(_assertThisInitialized(_this));\n _this.createNotification = _this.createNotification.bind(_assertThisInitialized(_this));\n _this.updateNotification = _this.updateNotification.bind(_assertThisInitialized(_this));\n _this.deleteNotification = _this.deleteNotification.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Notifications, [{\n key: \"getNotifications\",\n value: function getNotifications() {\n var filters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var getFiltersData = function getFiltersData(_ref) {\n var q = _ref.q,\n limit = _ref.limit,\n offset = _ref.offset,\n spaces_ids = _ref.spaces_ids;\n return {\n q: q,\n limit: limit,\n offset: offset,\n spaces_ids: spaces_ids\n };\n };\n\n return this.httpClient.get(Notifications.apiEndpoint, getFiltersData(filters));\n }\n }, {\n key: \"getNotification\",\n value: function getNotification(notificationId) {\n return this.httpClient.get(\"\".concat(Notifications.apiEndpoint).concat(notificationId, \"/\"));\n }\n }, {\n key: \"createNotification\",\n value: function createNotification(data) {\n return this.httpClient.post(Notifications.apiEndpoint, Notifications.getNotificationData(data));\n }\n }, {\n key: \"updateNotification\",\n value: function updateNotification() {\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(Notifications.apiEndpoint).concat(id, \"/\"), Notifications.getNotificationData(restData));\n }\n }, {\n key: \"deleteNotification\",\n value: function deleteNotification(notificationId) {\n return this.httpClient.delete(\"\".concat(Notifications.apiEndpoint).concat(notificationId, \"/\"));\n }\n }]);\n\n return Notifications;\n}(_base_api__WEBPACK_IMPORTED_MODULE_0__[\"Api\"]);\n\n_defineProperty(Notifications, \"apiEndpoint\", \"notification_settings/\");\n\n_defineProperty(Notifications, \"getNotificationData\", function () {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n transport = _ref3.transport,\n name = _ref3.name,\n http_method = _ref3.http_method,\n url = _ref3.url,\n mood = _ref3.mood,\n conf = _ref3.conf,\n liveness_check = _ref3.liveness_check,\n age_from = _ref3.age_from,\n age_to = _ref3.age_to,\n sex = _ref3.sex,\n origin_ids = _ref3.origin_ids;\n\n return {\n transport: transport,\n name: name,\n http_method: http_method,\n url: url,\n mood: mood,\n conf: conf,\n liveness_check: liveness_check,\n age_from: age_from,\n age_to: age_to,\n sex: sex,\n origin_ids: origin_ids\n };\n});\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/features/notifications/v1/index.ts?");
819
819
 
820
820
  /***/ }),
821
821
 
@@ -10,20 +10,17 @@ import {
10
10
 
11
11
  export interface NotificationInterface {
12
12
  id?: id;
13
- // read only
14
- space_id?: id;
15
13
  name?: string;
16
- is_active?: boolean;
14
+ transport?: number;
17
15
  http_method?: number;
18
- destination_url?: string;
19
- results?: Array<Result>;
16
+ url?: string;
17
+ mood?: Array<Mood>;
18
+ conf?: Array<Result>;
19
+ liveness_check?: Array<Liveness>;
20
20
  age_from?: number;
21
21
  age_to?: number;
22
22
  sex?: Array<Sex>;
23
- moods?: Array<Mood>;
24
- sources?: Array<string>;
25
- persons_groups?: Array<id>;
26
- liveness?: Array<Liveness>;
23
+ origin_ids?: Array<id>;
27
24
  }
28
25
 
29
26
  export interface NotificationsFiltersInterface extends Paginatable, Searchable {
@@ -20,31 +20,29 @@ class Notifications extends Api implements NotificationsInterface {
20
20
  static apiEndpoint = "notification_settings/";
21
21
 
22
22
  static getNotificationData = ({
23
+ transport,
23
24
  name,
24
- is_active,
25
25
  http_method,
26
- destination_url,
27
- results,
26
+ url,
27
+ mood,
28
+ conf,
29
+ liveness_check,
28
30
  age_from,
29
31
  age_to,
30
32
  sex,
31
- moods,
32
- sources,
33
- persons_groups,
34
- liveness,
33
+ origin_ids,
35
34
  }: NotificationInterface = {}): {} => ({
35
+ transport,
36
36
  name,
37
- is_active,
38
37
  http_method,
39
- destination_url,
40
- results,
38
+ url,
39
+ mood,
40
+ conf,
41
+ liveness_check,
41
42
  age_from,
42
43
  age_to,
43
44
  sex,
44
- moods,
45
- sources,
46
- persons_groups,
47
- liveness,
45
+ origin_ids,
48
46
  });
49
47
 
50
48
  getNotifications(filters: NotificationsFiltersInterface = {}): Promise<null> {