@serptech/api 1.0.29 → 1.0.31
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 +3 -3
- package/packages/serp-rest-api/dist/index.web.js +3 -3
- package/packages/serp-rest-api/src/constants/index.js +2 -2
- package/packages/serp-rest-api/src/serp-rest-api/api-facade/v1/licenses/index.ts +1 -1
- package/packages/serp-rest-api/src/serp-rest-api/features/licenses/v1/index.ts +9 -0
- package/packages/serp-rest-api/src/serp-rest-api/index.ts +1 -1
package/package.json
CHANGED
@@ -963,7 +963,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
963
963
|
/*! no static exports found */
|
964
964
|
/***/ (function(module, exports) {
|
965
965
|
|
966
|
-
eval("const apiVersions = [1];\r\n\r\nconst apiEndpoints = {\r\n v1: {\r\n base: \"
|
966
|
+
eval("const apiVersions = [1];\r\n\r\nconst apiEndpoints = {\r\n v1: {\r\n base: \"/\",\r\n auth: \"/\",\r\n },\r\n};\r\n\r\nmodule.exports = {\r\n apiVersions,\r\n apiEndpoints,\r\n};\r\n\n\n//# sourceURL=webpack://SerpREST/./src/constants/index.js?");
|
967
967
|
|
968
968
|
/***/ }),
|
969
969
|
|
@@ -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.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: \"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
|
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?");
|
1051
1051
|
|
1052
1052
|
/***/ }),
|
1053
1053
|
|
@@ -1167,7 +1167,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
1167
1167
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1168
1168
|
|
1169
1169
|
"use strict";
|
1170
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createSerpRestApi\", function() { return createSerpRestApi; });\n/* harmony import */ var isomorphic_form_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! isomorphic-form-data */ \"./node_modules/isomorphic-form-data/lib/index.js\");\n/* harmony import */ var isomorphic_form_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(isomorphic_form_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _http_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../http-client */ \"./src/http-client.ts\");\n/* harmony import */ var _api_facade_v1__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./api-facade/v1 */ \"./src/serp-rest-api/api-facade/v1/index.ts\");\n/* harmony import */ var _features_auth_v1__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./features/auth/v1 */ \"./src/serp-rest-api/features/auth/v1/index.ts\");\n/* harmony import */ var _features_entries_v1__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./features/entries/v1 */ \"./src/serp-rest-api/features/entries/v1/index.ts\");\n/* harmony import */ var _features_notifications_v1__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./features/notifications/v1 */ \"./src/serp-rest-api/features/notifications/v1/index.ts\");\n/* harmony import */ var _features_persons_v1__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./features/persons/v1 */ \"./src/serp-rest-api/features/persons/v1/index.ts\");\n/* harmony import */ var _features_sources_v1__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./features/sources/v1 */ \"./src/serp-rest-api/features/sources/v1/index.ts\");\n/* harmony import */ var _features_tokens_v1__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./features/tokens/v1 */ \"./src/serp-rest-api/features/tokens/v1/index.ts\");\n/* harmony import */ var _features_spaces_v1__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./features/spaces/v1 */ \"./src/serp-rest-api/features/spaces/v1/index.ts\");\n/* harmony import */ var _features_utilities_v1__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./features/utilities/v1 */ \"./src/serp-rest-api/features/utilities/v1/index.ts\");\n/* harmony import */ var _features_persons_groups_v1__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./features/persons-groups/v1 */ \"./src/serp-rest-api/features/persons-groups/v1/index.ts\");\n/* harmony import */ var _features_thresholds_v1__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./features/thresholds/v1 */ \"./src/serp-rest-api/features/thresholds/v1/index.ts\");\n/* harmony import */ var _features_stream_tokens_v1__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./features/stream-tokens/v1 */ \"./src/serp-rest-api/features/stream-tokens/v1/index.ts\");\n/* harmony import */ var _features_licenses_v1__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./features/licenses/v1 */ \"./src/serp-rest-api/features/licenses/v1/index.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../constants */ \"./src/constants/index.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_constants__WEBPACK_IMPORTED_MODULE_16__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction createSerpRestApiV1() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n token = _ref.token;\n\n var HttpClient = Object(_http_client__WEBPACK_IMPORTED_MODULE_2__[\"createHttpClient\"])({\n client: axios__WEBPACK_IMPORTED_MODULE_1___default.a\n });\n var httpClient = new HttpClient({\n baseURL: _constants__WEBPACK_IMPORTED_MODULE_16__[\"apiEndpoints\"].v1.
|
1170
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createSerpRestApi\", function() { return createSerpRestApi; });\n/* harmony import */ var isomorphic_form_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! isomorphic-form-data */ \"./node_modules/isomorphic-form-data/lib/index.js\");\n/* harmony import */ var isomorphic_form_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(isomorphic_form_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _http_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../http-client */ \"./src/http-client.ts\");\n/* harmony import */ var _api_facade_v1__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./api-facade/v1 */ \"./src/serp-rest-api/api-facade/v1/index.ts\");\n/* harmony import */ var _features_auth_v1__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./features/auth/v1 */ \"./src/serp-rest-api/features/auth/v1/index.ts\");\n/* harmony import */ var _features_entries_v1__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./features/entries/v1 */ \"./src/serp-rest-api/features/entries/v1/index.ts\");\n/* harmony import */ var _features_notifications_v1__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./features/notifications/v1 */ \"./src/serp-rest-api/features/notifications/v1/index.ts\");\n/* harmony import */ var _features_persons_v1__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./features/persons/v1 */ \"./src/serp-rest-api/features/persons/v1/index.ts\");\n/* harmony import */ var _features_sources_v1__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./features/sources/v1 */ \"./src/serp-rest-api/features/sources/v1/index.ts\");\n/* harmony import */ var _features_tokens_v1__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./features/tokens/v1 */ \"./src/serp-rest-api/features/tokens/v1/index.ts\");\n/* harmony import */ var _features_spaces_v1__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./features/spaces/v1 */ \"./src/serp-rest-api/features/spaces/v1/index.ts\");\n/* harmony import */ var _features_utilities_v1__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./features/utilities/v1 */ \"./src/serp-rest-api/features/utilities/v1/index.ts\");\n/* harmony import */ var _features_persons_groups_v1__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./features/persons-groups/v1 */ \"./src/serp-rest-api/features/persons-groups/v1/index.ts\");\n/* harmony import */ var _features_thresholds_v1__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./features/thresholds/v1 */ \"./src/serp-rest-api/features/thresholds/v1/index.ts\");\n/* harmony import */ var _features_stream_tokens_v1__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./features/stream-tokens/v1 */ \"./src/serp-rest-api/features/stream-tokens/v1/index.ts\");\n/* harmony import */ var _features_licenses_v1__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./features/licenses/v1 */ \"./src/serp-rest-api/features/licenses/v1/index.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../constants */ \"./src/constants/index.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_constants__WEBPACK_IMPORTED_MODULE_16__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction createSerpRestApiV1() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n token = _ref.token;\n\n var HttpClient = Object(_http_client__WEBPACK_IMPORTED_MODULE_2__[\"createHttpClient\"])({\n client: axios__WEBPACK_IMPORTED_MODULE_1___default.a\n });\n var httpClient = new HttpClient({\n baseURL: _constants__WEBPACK_IMPORTED_MODULE_16__[\"apiEndpoints\"].v1.base,\n token: token\n });\n return new _api_facade_v1__WEBPACK_IMPORTED_MODULE_3__[\"ApiFacadeV1\"]({\n httpClient: httpClient,\n auth: new _features_auth_v1__WEBPACK_IMPORTED_MODULE_4__[\"Auth\"]({\n httpClient: httpClient,\n authURL: _constants__WEBPACK_IMPORTED_MODULE_16__[\"apiEndpoints\"].v1.auth\n }),\n tokens: new _features_tokens_v1__WEBPACK_IMPORTED_MODULE_9__[\"Tokens\"]({\n httpClient: httpClient,\n authURL: _constants__WEBPACK_IMPORTED_MODULE_16__[\"apiEndpoints\"].v1.auth\n }),\n spaces: new _features_spaces_v1__WEBPACK_IMPORTED_MODULE_10__[\"Spaces\"]({\n httpClient: httpClient,\n authURL: _constants__WEBPACK_IMPORTED_MODULE_16__[\"apiEndpoints\"].v1.auth\n }),\n licenses: new _features_licenses_v1__WEBPACK_IMPORTED_MODULE_15__[\"Licenses\"]({\n httpClient: httpClient,\n authURL: _constants__WEBPACK_IMPORTED_MODULE_16__[\"apiEndpoints\"].v1.auth\n }),\n notifications: new _features_notifications_v1__WEBPACK_IMPORTED_MODULE_6__[\"Notifications\"]({\n httpClient: httpClient\n }),\n entries: new _features_entries_v1__WEBPACK_IMPORTED_MODULE_5__[\"Entries\"]({\n httpClient: httpClient\n }),\n persons: new _features_persons_v1__WEBPACK_IMPORTED_MODULE_7__[\"Persons\"]({\n httpClient: httpClient\n }),\n sources: new _features_sources_v1__WEBPACK_IMPORTED_MODULE_8__[\"Sources\"]({\n httpClient: httpClient\n }),\n utilities: new _features_utilities_v1__WEBPACK_IMPORTED_MODULE_11__[\"Utilities\"]({\n httpClient: httpClient\n }),\n personsGroups: new _features_persons_groups_v1__WEBPACK_IMPORTED_MODULE_12__[\"PersonsGroups\"]({\n httpClient: httpClient\n }),\n thresholds: new _features_thresholds_v1__WEBPACK_IMPORTED_MODULE_13__[\"Thresholds\"]({\n httpClient: httpClient\n }),\n streamTokens: new _features_stream_tokens_v1__WEBPACK_IMPORTED_MODULE_14__[\"StreamTokens\"]({\n httpClient: httpClient\n })\n });\n}\n\nfunction createSerpRestApi() {\n var settings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var version = settings.version,\n token = settings.token;\n\n if (!version) {\n throw new Error(\"You did not specify Serp API version.\\n Available versions: \".concat(_constants__WEBPACK_IMPORTED_MODULE_16__[\"apiVersions\"].join(\", \")));\n }\n\n var numVersion = Number(version);\n\n if (!_constants__WEBPACK_IMPORTED_MODULE_16__[\"apiVersions\"].includes(numVersion)) {\n throw new Error(\"You have specified a non-existent version of Serp API: \".concat(version, \".\\n Available versions: \").concat(_constants__WEBPACK_IMPORTED_MODULE_16__[\"apiVersions\"].join(\", \")));\n }\n\n switch (numVersion) {\n case 1:\n return createSerpRestApiV1({\n token: token\n });\n }\n}\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/index.ts?");
|
1171
1171
|
|
1172
1172
|
/***/ }),
|
1173
1173
|
|
@@ -719,7 +719,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
719
719
|
/*! no static exports found */
|
720
720
|
/***/ (function(module, exports) {
|
721
721
|
|
722
|
-
eval("const apiVersions = [1];\r\n\r\nconst apiEndpoints = {\r\n v1: {\r\n base: \"
|
722
|
+
eval("const apiVersions = [1];\r\n\r\nconst apiEndpoints = {\r\n v1: {\r\n base: \"/\",\r\n auth: \"/\",\r\n },\r\n};\r\n\r\nmodule.exports = {\r\n apiVersions,\r\n apiEndpoints,\r\n};\r\n\n\n//# sourceURL=webpack://SerpREST/./src/constants/index.js?");
|
723
723
|
|
724
724
|
/***/ }),
|
725
725
|
|
@@ -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.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: \"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
|
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?");
|
807
807
|
|
808
808
|
/***/ }),
|
809
809
|
|
@@ -923,7 +923,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) *
|
|
923
923
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
924
924
|
|
925
925
|
"use strict";
|
926
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createSerpRestApi\", function() { return createSerpRestApi; });\n/* harmony import */ var isomorphic_form_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! isomorphic-form-data */ \"./node_modules/isomorphic-form-data/lib/browser.js\");\n/* harmony import */ var isomorphic_form_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(isomorphic_form_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _http_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../http-client */ \"./src/http-client.ts\");\n/* harmony import */ var _api_facade_v1__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./api-facade/v1 */ \"./src/serp-rest-api/api-facade/v1/index.ts\");\n/* harmony import */ var _features_auth_v1__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./features/auth/v1 */ \"./src/serp-rest-api/features/auth/v1/index.ts\");\n/* harmony import */ var _features_entries_v1__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./features/entries/v1 */ \"./src/serp-rest-api/features/entries/v1/index.ts\");\n/* harmony import */ var _features_notifications_v1__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./features/notifications/v1 */ \"./src/serp-rest-api/features/notifications/v1/index.ts\");\n/* harmony import */ var _features_persons_v1__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./features/persons/v1 */ \"./src/serp-rest-api/features/persons/v1/index.ts\");\n/* harmony import */ var _features_sources_v1__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./features/sources/v1 */ \"./src/serp-rest-api/features/sources/v1/index.ts\");\n/* harmony import */ var _features_tokens_v1__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./features/tokens/v1 */ \"./src/serp-rest-api/features/tokens/v1/index.ts\");\n/* harmony import */ var _features_spaces_v1__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./features/spaces/v1 */ \"./src/serp-rest-api/features/spaces/v1/index.ts\");\n/* harmony import */ var _features_utilities_v1__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./features/utilities/v1 */ \"./src/serp-rest-api/features/utilities/v1/index.ts\");\n/* harmony import */ var _features_persons_groups_v1__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./features/persons-groups/v1 */ \"./src/serp-rest-api/features/persons-groups/v1/index.ts\");\n/* harmony import */ var _features_thresholds_v1__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./features/thresholds/v1 */ \"./src/serp-rest-api/features/thresholds/v1/index.ts\");\n/* harmony import */ var _features_stream_tokens_v1__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./features/stream-tokens/v1 */ \"./src/serp-rest-api/features/stream-tokens/v1/index.ts\");\n/* harmony import */ var _features_licenses_v1__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./features/licenses/v1 */ \"./src/serp-rest-api/features/licenses/v1/index.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../constants */ \"./src/constants/index.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_constants__WEBPACK_IMPORTED_MODULE_16__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction createSerpRestApiV1() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n token = _ref.token;\n\n var HttpClient = Object(_http_client__WEBPACK_IMPORTED_MODULE_2__[\"createHttpClient\"])({\n client: axios__WEBPACK_IMPORTED_MODULE_1___default.a\n });\n var httpClient = new HttpClient({\n baseURL: _constants__WEBPACK_IMPORTED_MODULE_16__[\"apiEndpoints\"].v1.
|
926
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createSerpRestApi\", function() { return createSerpRestApi; });\n/* harmony import */ var isomorphic_form_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! isomorphic-form-data */ \"./node_modules/isomorphic-form-data/lib/browser.js\");\n/* harmony import */ var isomorphic_form_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(isomorphic_form_data__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _http_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../http-client */ \"./src/http-client.ts\");\n/* harmony import */ var _api_facade_v1__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./api-facade/v1 */ \"./src/serp-rest-api/api-facade/v1/index.ts\");\n/* harmony import */ var _features_auth_v1__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./features/auth/v1 */ \"./src/serp-rest-api/features/auth/v1/index.ts\");\n/* harmony import */ var _features_entries_v1__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./features/entries/v1 */ \"./src/serp-rest-api/features/entries/v1/index.ts\");\n/* harmony import */ var _features_notifications_v1__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./features/notifications/v1 */ \"./src/serp-rest-api/features/notifications/v1/index.ts\");\n/* harmony import */ var _features_persons_v1__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./features/persons/v1 */ \"./src/serp-rest-api/features/persons/v1/index.ts\");\n/* harmony import */ var _features_sources_v1__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./features/sources/v1 */ \"./src/serp-rest-api/features/sources/v1/index.ts\");\n/* harmony import */ var _features_tokens_v1__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./features/tokens/v1 */ \"./src/serp-rest-api/features/tokens/v1/index.ts\");\n/* harmony import */ var _features_spaces_v1__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./features/spaces/v1 */ \"./src/serp-rest-api/features/spaces/v1/index.ts\");\n/* harmony import */ var _features_utilities_v1__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./features/utilities/v1 */ \"./src/serp-rest-api/features/utilities/v1/index.ts\");\n/* harmony import */ var _features_persons_groups_v1__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./features/persons-groups/v1 */ \"./src/serp-rest-api/features/persons-groups/v1/index.ts\");\n/* harmony import */ var _features_thresholds_v1__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./features/thresholds/v1 */ \"./src/serp-rest-api/features/thresholds/v1/index.ts\");\n/* harmony import */ var _features_stream_tokens_v1__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./features/stream-tokens/v1 */ \"./src/serp-rest-api/features/stream-tokens/v1/index.ts\");\n/* harmony import */ var _features_licenses_v1__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./features/licenses/v1 */ \"./src/serp-rest-api/features/licenses/v1/index.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../constants */ \"./src/constants/index.js\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_constants__WEBPACK_IMPORTED_MODULE_16__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction createSerpRestApiV1() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n token = _ref.token;\n\n var HttpClient = Object(_http_client__WEBPACK_IMPORTED_MODULE_2__[\"createHttpClient\"])({\n client: axios__WEBPACK_IMPORTED_MODULE_1___default.a\n });\n var httpClient = new HttpClient({\n baseURL: _constants__WEBPACK_IMPORTED_MODULE_16__[\"apiEndpoints\"].v1.base,\n token: token\n });\n return new _api_facade_v1__WEBPACK_IMPORTED_MODULE_3__[\"ApiFacadeV1\"]({\n httpClient: httpClient,\n auth: new _features_auth_v1__WEBPACK_IMPORTED_MODULE_4__[\"Auth\"]({\n httpClient: httpClient,\n authURL: _constants__WEBPACK_IMPORTED_MODULE_16__[\"apiEndpoints\"].v1.auth\n }),\n tokens: new _features_tokens_v1__WEBPACK_IMPORTED_MODULE_9__[\"Tokens\"]({\n httpClient: httpClient,\n authURL: _constants__WEBPACK_IMPORTED_MODULE_16__[\"apiEndpoints\"].v1.auth\n }),\n spaces: new _features_spaces_v1__WEBPACK_IMPORTED_MODULE_10__[\"Spaces\"]({\n httpClient: httpClient,\n authURL: _constants__WEBPACK_IMPORTED_MODULE_16__[\"apiEndpoints\"].v1.auth\n }),\n licenses: new _features_licenses_v1__WEBPACK_IMPORTED_MODULE_15__[\"Licenses\"]({\n httpClient: httpClient,\n authURL: _constants__WEBPACK_IMPORTED_MODULE_16__[\"apiEndpoints\"].v1.auth\n }),\n notifications: new _features_notifications_v1__WEBPACK_IMPORTED_MODULE_6__[\"Notifications\"]({\n httpClient: httpClient\n }),\n entries: new _features_entries_v1__WEBPACK_IMPORTED_MODULE_5__[\"Entries\"]({\n httpClient: httpClient\n }),\n persons: new _features_persons_v1__WEBPACK_IMPORTED_MODULE_7__[\"Persons\"]({\n httpClient: httpClient\n }),\n sources: new _features_sources_v1__WEBPACK_IMPORTED_MODULE_8__[\"Sources\"]({\n httpClient: httpClient\n }),\n utilities: new _features_utilities_v1__WEBPACK_IMPORTED_MODULE_11__[\"Utilities\"]({\n httpClient: httpClient\n }),\n personsGroups: new _features_persons_groups_v1__WEBPACK_IMPORTED_MODULE_12__[\"PersonsGroups\"]({\n httpClient: httpClient\n }),\n thresholds: new _features_thresholds_v1__WEBPACK_IMPORTED_MODULE_13__[\"Thresholds\"]({\n httpClient: httpClient\n }),\n streamTokens: new _features_stream_tokens_v1__WEBPACK_IMPORTED_MODULE_14__[\"StreamTokens\"]({\n httpClient: httpClient\n })\n });\n}\n\nfunction createSerpRestApi() {\n var settings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var version = settings.version,\n token = settings.token;\n\n if (!version) {\n throw new Error(\"You did not specify Serp API version.\\n Available versions: \".concat(_constants__WEBPACK_IMPORTED_MODULE_16__[\"apiVersions\"].join(\", \")));\n }\n\n var numVersion = Number(version);\n\n if (!_constants__WEBPACK_IMPORTED_MODULE_16__[\"apiVersions\"].includes(numVersion)) {\n throw new Error(\"You have specified a non-existent version of Serp API: \".concat(version, \".\\n Available versions: \").concat(_constants__WEBPACK_IMPORTED_MODULE_16__[\"apiVersions\"].join(\", \")));\n }\n\n switch (numVersion) {\n case 1:\n return createSerpRestApiV1({\n token: token\n });\n }\n}\n\n\n\n//# sourceURL=webpack://SerpREST/./src/serp-rest-api/index.ts?");
|
927
927
|
|
928
928
|
/***/ }),
|
929
929
|
|
@@ -9,6 +9,7 @@ class Licenses extends AuthApi implements LicensesInterface {
|
|
9
9
|
constructor(settings: AuthApiSettingsInterface) {
|
10
10
|
super(settings);
|
11
11
|
this.getLicenses = this.getLicenses.bind(this);
|
12
|
+
this.uploadLicense = this.uploadLicense.bind(this);
|
12
13
|
this.getLicense = this.getLicense.bind(this);
|
13
14
|
this.createLicense = this.createLicense.bind(this);
|
14
15
|
this.updateLicense = this.updateLicense.bind(this);
|
@@ -23,6 +24,14 @@ class Licenses extends AuthApi implements LicensesInterface {
|
|
23
24
|
);
|
24
25
|
}
|
25
26
|
|
27
|
+
uploadLicense({
|
28
|
+
license,
|
29
|
+
}: LicenseInterface = {}): Promise<LicenseInterface> {
|
30
|
+
return this.httpClient.post(this.authURL + Licenses.apiEndpoint, {
|
31
|
+
license,
|
32
|
+
});
|
33
|
+
}
|
34
|
+
|
26
35
|
getLicense(licenseId: id): Promise<LicenseInterface> {
|
27
36
|
return this.httpClient.get(
|
28
37
|
this.authURL + `${Licenses.apiEndpoint}${licenseId}/`
|