diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 00000000..41ebac53 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +npm run pretty-quick -- --check diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..e6bb0525 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,10 @@ +node_modules + +/dist +/doc +/lib +/package.json +/package-lock.json + +/.vscode +/.idea diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..1d01da02 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "singleQuote": true, + "endOfLine": "lf" +} diff --git a/dist/typesense.js b/dist/typesense.js index b4bb6fd4..ac65711b 100644 --- a/dist/typesense.js +++ b/dist/typesense.js @@ -100,7 +100,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/aliases"; +var RESOURCEPATH = '/aliases'; var Aliases = /*#__PURE__*/function () { function Aliases(apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Aliases); @@ -184,7 +184,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/analytics"; +var RESOURCEPATH = '/analytics'; var Analytics = /*#__PURE__*/function () { function Analytics(apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, Analytics); @@ -243,7 +243,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/analytics/events"; +var RESOURCEPATH = '/analytics/events'; var AnalyticsEvents = /*#__PURE__*/function () { function AnalyticsEvents(apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, AnalyticsEvents); @@ -272,7 +272,7 @@ var AnalyticsEvents = /*#__PURE__*/function () { }, { key: "endpointPath", value: function endpointPath(operation) { - return "".concat(AnalyticsEvents.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(AnalyticsEvents.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); } }], [{ key: "RESOURCEPATH", @@ -384,7 +384,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/analytics/rules"; +var RESOURCEPATH = '/analytics/rules'; var AnalyticsRules = /*#__PURE__*/function () { function AnalyticsRules(apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, AnalyticsRules); @@ -432,7 +432,7 @@ var AnalyticsRules = /*#__PURE__*/function () { }, { key: "endpointPath", value: function endpointPath(operation) { - return "".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); } }], [{ key: "RESOURCEPATH", @@ -480,7 +480,7 @@ __webpack_require__.r(__webpack_exports__); -var APIKEYHEADERNAME = "X-TYPESENSE-API-KEY"; +var APIKEYHEADERNAME = 'X-TYPESENSE-API-KEY'; var HEALTHY = true; var UNHEALTHY = false; var ApiCall = /*#__PURE__*/function () { @@ -516,7 +516,7 @@ var ApiCall = /*#__PURE__*/function () { case 0: queryParameters = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}; _ref = _args.length > 2 && _args[2] !== undefined ? _args[2] : {}, _ref$abortSignal = _ref.abortSignal, abortSignal = _ref$abortSignal === void 0 ? null : _ref$abortSignal, _ref$responseType = _ref.responseType, responseType = _ref$responseType === void 0 ? undefined : _ref$responseType; - return _context.abrupt("return", this.performRequest("get", endpoint, { + return _context.abrupt("return", this.performRequest('get', endpoint, { queryParameters: queryParameters, abortSignal: abortSignal, responseType: responseType @@ -542,7 +542,7 @@ var ApiCall = /*#__PURE__*/function () { while (1) switch (_context2.prev = _context2.next) { case 0: queryParameters = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : {}; - return _context2.abrupt("return", this.performRequest("delete", endpoint, { + return _context2.abrupt("return", this.performRequest('delete', endpoint, { queryParameters: queryParameters })); case 2: @@ -570,7 +570,7 @@ var ApiCall = /*#__PURE__*/function () { bodyParameters = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : {}; queryParameters = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : {}; additionalHeaders = _args3.length > 3 && _args3[3] !== undefined ? _args3[3] : {}; - return _context3.abrupt("return", this.performRequest("post", endpoint, { + return _context3.abrupt("return", this.performRequest('post', endpoint, { queryParameters: queryParameters, bodyParameters: bodyParameters, additionalHeaders: additionalHeaders @@ -598,7 +598,7 @@ var ApiCall = /*#__PURE__*/function () { case 0: bodyParameters = _args4.length > 1 && _args4[1] !== undefined ? _args4[1] : {}; queryParameters = _args4.length > 2 && _args4[2] !== undefined ? _args4[2] : {}; - return _context4.abrupt("return", this.performRequest("put", endpoint, { + return _context4.abrupt("return", this.performRequest('put', endpoint, { queryParameters: queryParameters, bodyParameters: bodyParameters })); @@ -625,7 +625,7 @@ var ApiCall = /*#__PURE__*/function () { case 0: bodyParameters = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {}; queryParameters = _args5.length > 2 && _args5[2] !== undefined ? _args5[2] : {}; - return _context5.abrupt("return", this.performRequest("patch", endpoint, { + return _context5.abrupt("return", this.performRequest('patch', endpoint, { queryParameters: queryParameters, bodyParameters: bodyParameters })); @@ -665,7 +665,7 @@ var ApiCall = /*#__PURE__*/function () { break; } return _context6.abrupt("return", { - v: Promise.reject(new Error("Request aborted by caller.")) + v: Promise.reject(new Error('Request aborted by caller.')) }); case 4: _context6.prev = 4; @@ -685,7 +685,7 @@ var ApiCall = /*#__PURE__*/function () { }, transformResponse: [function (data, headers) { var transformedData = data; - if (headers !== undefined && typeof data === "string" && headers["content-type"] && headers["content-type"].startsWith("application/json")) { + if (headers !== undefined && typeof data === 'string' && headers['content-type'] && headers['content-type'].startsWith('application/json')) { transformedData = JSON.parse(data); } return transformedData; @@ -699,7 +699,7 @@ var ApiCall = /*#__PURE__*/function () { } if (_this.sendApiKeyAsQueryParam) { requestOptions.params = requestOptions.params || {}; - requestOptions.params["x-typesense-api-key"] = _this.apiKey; + requestOptions.params['x-typesense-api-key'] = _this.apiKey; } if (_this.configuration.httpAgent) { _this.logger.debug("Request #".concat(requestNumber, ": Using custom httpAgent")); @@ -723,7 +723,7 @@ var ApiCall = /*#__PURE__*/function () { _this.logger.debug("Request #".concat(requestNumber, ": Using custom paramsSerializer")); requestOptions.paramsSerializer = _this.configuration.paramsSerializer; } - if (bodyParameters && (typeof bodyParameters === "string" && bodyParameters.length !== 0 || (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(bodyParameters) === "object" && Object.keys(bodyParameters).length !== 0)) { + if (bodyParameters && (typeof bodyParameters === 'string' && bodyParameters.length !== 0 || (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(bodyParameters) === 'object' && Object.keys(bodyParameters).length !== 0)) { requestOptions.data = bodyParameters; } @@ -734,7 +734,7 @@ var ApiCall = /*#__PURE__*/function () { abortListener = function abortListener() { return source.cancel(); }; - abortSignal.addEventListener("abort", abortListener); + abortSignal.addEventListener('abort', abortListener); requestOptions.cancelToken = source.token; } _context6.next = 16; @@ -773,7 +773,7 @@ var ApiCall = /*#__PURE__*/function () { // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts _this.setNodeHealthcheck(node, UNHEALTHY); lastException = _context6.t0; - _this.logger.warn("Request #".concat(requestNumber, ": Request to Node ").concat(node.index, " failed due to \"").concat(_context6.t0.code, " ").concat(_context6.t0.message).concat(_context6.t0.response == null ? "" : " - " + JSON.stringify((_error$response = _context6.t0.response) === null || _error$response === void 0 ? void 0 : _error$response.data), "\"")); + _this.logger.warn("Request #".concat(requestNumber, ": Request to Node ").concat(node.index, " failed due to \"").concat(_context6.t0.code, " ").concat(_context6.t0.message).concat(_context6.t0.response == null ? '' : ' - ' + JSON.stringify((_error$response = _context6.t0.response) === null || _error$response === void 0 ? void 0 : _error$response.data), "\"")); // this.logger.debug(error.stack) _this.logger.warn("Request #".concat(requestNumber, ": Sleeping for ").concat(_this.retryIntervalSeconds, "s and then retrying request...")); _context6.next = 38; @@ -781,7 +781,7 @@ var ApiCall = /*#__PURE__*/function () { case 38: _context6.prev = 38; if (abortSignal && abortListener) { - abortSignal.removeEventListener("abort", abortListener); + abortSignal.removeEventListener('abort', abortListener); } return _context6.finish(38); case 41: @@ -830,7 +830,7 @@ var ApiCall = /*#__PURE__*/function () { var requestNumber = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; // Check if nearestNode is set and is healthy, if so return it if (this.nearestNode != null) { - this.logger.debug("Request #".concat(requestNumber, ": Nodes Health: Node ").concat(this.nearestNode.index, " is ").concat(this.nearestNode.isHealthy === true ? "Healthy" : "Unhealthy")); + this.logger.debug("Request #".concat(requestNumber, ": Nodes Health: Node ").concat(this.nearestNode.index, " is ").concat(this.nearestNode.isHealthy === true ? 'Healthy' : 'Unhealthy')); if (this.nearestNode.isHealthy === true || this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) { this.logger.debug("Request #".concat(requestNumber, ": Updated current node to Node ").concat(this.nearestNode.index)); return this.nearestNode; @@ -840,8 +840,8 @@ var ApiCall = /*#__PURE__*/function () { // Fallback to nodes as usual this.logger.debug("Request #".concat(requestNumber, ": Nodes Health: ").concat(this.nodes.map(function (node) { - return "Node ".concat(node.index, " is ").concat(node.isHealthy === true ? "Healthy" : "Unhealthy"); - }).join(" || "))); + return "Node ".concat(node.index, " is ").concat(node.isHealthy === true ? 'Healthy' : 'Unhealthy'); + }).join(' || '))); var candidateNode = this.nodes[0]; for (var i = 0; i <= this.nodes.length; i++) { this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length; @@ -872,7 +872,7 @@ var ApiCall = /*#__PURE__*/function () { value: function initializeMetadataForNodes() { var _this2 = this; if (this.nearestNode != null) { - this.nearestNode.index = "nearestNode"; + this.nearestNode.index = 'nearestNode'; this.setNodeHealthcheck(this.nearestNode, HEALTHY); } this.nodes.forEach(function (node, i) { @@ -901,7 +901,7 @@ var ApiCall = /*#__PURE__*/function () { if (!this.sendApiKeyAsQueryParam) { defaultHeaders[APIKEYHEADERNAME] = this.apiKey; } - defaultHeaders["Content-Type"] = "application/json"; + defaultHeaders['Content-Type'] = 'application/json'; return defaultHeaders; } }, { @@ -929,7 +929,7 @@ var ApiCall = /*#__PURE__*/function () { key: "customErrorForResponse", value: function customErrorForResponse(response, messageFromServer) { var errorMessage = "Request failed with HTTP code ".concat(response.status); - if (typeof messageFromServer === "string" && messageFromServer.trim() !== "") { + if (typeof messageFromServer === 'string' && messageFromServer.trim() !== '') { errorMessage += " | Server said: ".concat(messageFromServer); } var error = new _Errors_TypesenseError__WEBPACK_IMPORTED_MODULE_6__["default"](errorMessage); @@ -1335,7 +1335,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/collections"; +var RESOURCEPATH = '/collections'; var Collections = /*#__PURE__*/function () { function Collections(apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Collections); @@ -1450,7 +1450,7 @@ var Configuration = /*#__PURE__*/function () { this.cacheSearchResultsForSeconds = options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default this.useServerSideSearchCache = options.useServerSideSearchCache || false; this.logger = options.logger || loglevel__WEBPACK_IMPORTED_MODULE_3__; - this.logLevel = options.logLevel || "warn"; + this.logLevel = options.logLevel || 'warn'; this.logger.setLevel(this.logLevel); this.additionalHeaders = options.additionalHeaders; this.httpAgent = options.httpAgent; @@ -1463,13 +1463,13 @@ var Configuration = /*#__PURE__*/function () { key: "validate", value: function validate() { if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) { - throw new _Errors__WEBPACK_IMPORTED_MODULE_4__.MissingConfigurationError("Ensure that nodes[].protocol, nodes[].host and nodes[].port are set"); + throw new _Errors__WEBPACK_IMPORTED_MODULE_4__.MissingConfigurationError('Ensure that nodes[].protocol, nodes[].host and nodes[].port are set'); } if (this.nearestNode != null && this.isNodeMissingAnyParameters(this.nearestNode)) { - throw new _Errors__WEBPACK_IMPORTED_MODULE_4__.MissingConfigurationError("Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set"); + throw new _Errors__WEBPACK_IMPORTED_MODULE_4__.MissingConfigurationError('Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set'); } if (this.apiKey == null) { - throw new _Errors__WEBPACK_IMPORTED_MODULE_4__.MissingConfigurationError("Ensure that apiKey is set"); + throw new _Errors__WEBPACK_IMPORTED_MODULE_4__.MissingConfigurationError('Ensure that apiKey is set'); } return true; } @@ -1484,28 +1484,28 @@ var Configuration = /*#__PURE__*/function () { }, { key: "isNodeMissingAnyParameters", value: function isNodeMissingAnyParameters(node) { - return !["protocol", "host", "port", "path"].every(function (key) { + return !['protocol', 'host', 'port', 'path'].every(function (key) { return node.hasOwnProperty(key); - }) && node["url"] == null; + }) && node['url'] == null; } }, { key: "setDefaultPathInNode", value: function setDefaultPathInNode(node) { - if (node != null && !node.hasOwnProperty("path")) { - node["path"] = ""; + if (node != null && !node.hasOwnProperty('path')) { + node['path'] = ''; } return node; } }, { key: "setDefaultPortInNode", value: function setDefaultPortInNode(node) { - if (node != null && !node.hasOwnProperty("port") && node.hasOwnProperty("protocol")) { - switch (node["protocol"]) { - case "https": - node["port"] = 443; + if (node != null && !node.hasOwnProperty('port') && node.hasOwnProperty('protocol')) { + switch (node['protocol']) { + case 'https': + node['port'] = 443; break; - case "http": - node["port"] = 80; + case 'http': + node['port'] = 80; break; } } @@ -1515,13 +1515,13 @@ var Configuration = /*#__PURE__*/function () { key: "showDeprecationWarnings", value: function showDeprecationWarnings(options) { if (options.timeoutSeconds) { - this.logger.warn("Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds"); + this.logger.warn('Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds'); } if (options.masterNode) { - this.logger.warn("Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12"); + this.logger.warn('Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12'); } if (options.readReplicaNodes) { - this.logger.warn("Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12"); + this.logger.warn('Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12'); } } }, { @@ -1755,7 +1755,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/conversations/models"; +var RESOURCEPATH = '/conversations/models'; var ConversationModels = /*#__PURE__*/function () { function ConversationModels(apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, ConversationModels); @@ -1803,7 +1803,7 @@ var ConversationModels = /*#__PURE__*/function () { }, { key: "endpointPath", value: function endpointPath(operation) { - return "".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); } }], [{ key: "RESOURCEPATH", @@ -1843,7 +1843,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/conversations"; +var RESOURCEPATH = '/conversations'; var Conversations = /*#__PURE__*/function () { function Conversations(apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Conversations); @@ -1915,7 +1915,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/debug"; +var RESOURCEPATH = '/debug'; var Debug = /*#__PURE__*/function () { function Debug(apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Debug); @@ -2105,7 +2105,7 @@ var Documents = /*#__PURE__*/function (_ref) { _context.next = 3; break; } - throw new Error("No document provided"); + throw new Error('No document provided'); case 3: return _context.abrupt("return", this.apiCall.post(this.endpointPath(), document, options)); case 4: @@ -2133,10 +2133,10 @@ var Documents = /*#__PURE__*/function (_ref) { _context2.next = 3; break; } - throw new Error("No document provided"); + throw new Error('No document provided'); case 3: return _context2.abrupt("return", this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { - action: "upsert" + action: 'upsert' }))); case 4: case "end": @@ -2163,16 +2163,16 @@ var Documents = /*#__PURE__*/function (_ref) { _context3.next = 3; break; } - throw new Error("No document provided"); + throw new Error('No document provided'); case 3: - if (!(options["filter_by"] != null)) { + if (!(options['filter_by'] != null)) { _context3.next = 7; break; } return _context3.abrupt("return", this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))); case 7: return _context3.abrupt("return", this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { - action: "update" + action: 'update' }))); case 8: case "end": @@ -2217,7 +2217,7 @@ var Documents = /*#__PURE__*/function (_ref) { while (1) switch (_context5.prev = _context5.next) { case 0: options = _args5.length > 1 && _args5[1] !== undefined ? _args5[1] : {}; - this.configuration.logger.warn("createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents"); + this.configuration.logger.warn('createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents'); return _context5.abrupt("return", this.import(documents, options)); case 3: case "end": @@ -2257,13 +2257,13 @@ var Documents = /*#__PURE__*/function (_ref) { _context6.prev = 2; documentsInJSONLFormat = documents.map(function (document) { return JSON.stringify(document); - }).join("\n"); + }).join('\n'); _context6.next = 11; break; case 6: _context6.prev = 6; _context6.t0 = _context6["catch"](2); - if (!(_context6.t0 instanceof RangeError && _context6.t0.message.includes("Too many properties to enumerate"))) { + if (!(_context6.t0 instanceof RangeError && _context6.t0.message.includes('Too many properties to enumerate'))) { _context6.next = 10; break; } @@ -2277,11 +2277,11 @@ var Documents = /*#__PURE__*/function (_ref) { documentsInJSONLFormat = documents; case 14: _context6.next = 16; - return this.apiCall.performRequest("post", this.endpointPath("import"), { + return this.apiCall.performRequest('post', this.endpointPath('import'), { queryParameters: options, bodyParameters: documentsInJSONLFormat, additionalHeaders: { - "Content-Type": "text/plain" + 'Content-Type': 'text/plain' }, skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully @@ -2293,7 +2293,7 @@ var Documents = /*#__PURE__*/function (_ref) { _context6.next = 27; break; } - resultsInJSONFormat = resultsInJSONLFormat.split("\n").map(function (r) { + resultsInJSONFormat = resultsInJSONLFormat.split('\n').map(function (r) { return JSON.parse(r); }); failedItems = resultsInJSONFormat.filter(function (r) { @@ -2335,7 +2335,7 @@ var Documents = /*#__PURE__*/function (_ref) { while (1) switch (_context7.prev = _context7.next) { case 0: options = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}; - return _context7.abrupt("return", this.apiCall.get(this.endpointPath("export"), options)); + return _context7.abrupt("return", this.apiCall.get(this.endpointPath('export'), options)); case 2: case "end": return _context7.stop(); @@ -2361,8 +2361,8 @@ var Documents = /*#__PURE__*/function (_ref) { while (1) switch (_context8.prev = _context8.next) { case 0: options = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {}; - return _context8.abrupt("return", this.apiCall.get(this.endpointPath("export"), options, { - responseType: "stream" + return _context8.abrupt("return", this.apiCall.get(this.endpointPath('export'), options, { + responseType: 'stream' })); case 2: case "end": @@ -2826,7 +2826,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/health"; +var RESOURCEPATH = '/health'; var Health = /*#__PURE__*/function () { function Health(apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Health); @@ -2959,7 +2959,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/keys"; +var RESOURCEPATH = '/keys'; var Keys = /*#__PURE__*/function () { function Keys(apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Keys); @@ -3010,10 +3010,10 @@ var Keys = /*#__PURE__*/function () { // Note: only a key generated with the `documents:search` action will be // accepted by the server, when usined with the search endpoint. var paramsJSON = JSON.stringify(parameters); - var digest = Buffer.from((0,crypto__WEBPACK_IMPORTED_MODULE_4__.createHmac)("sha256", searchKey).update(paramsJSON).digest("base64")); + var digest = Buffer.from((0,crypto__WEBPACK_IMPORTED_MODULE_4__.createHmac)('sha256', searchKey).update(paramsJSON).digest('base64')); var keyPrefix = searchKey.substr(0, 4); var rawScopedKey = "".concat(digest).concat(keyPrefix).concat(paramsJSON); - return Buffer.from(rawScopedKey).toString("base64"); + return Buffer.from(rawScopedKey).toString('base64'); } }], [{ key: "RESOURCEPATH", @@ -3047,7 +3047,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/metrics.json"; +var RESOURCEPATH = '/metrics.json'; var Metrics = /*#__PURE__*/function () { function Metrics(apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Metrics); @@ -3101,7 +3101,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/multi_search"; +var RESOURCEPATH = '/multi_search'; var MultiSearch = /*#__PURE__*/function () { function MultiSearch(apiCall, configuration) { var useTextContentType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; @@ -3135,11 +3135,11 @@ var MultiSearch = /*#__PURE__*/function () { _ref = _args.length > 2 && _args[2] !== undefined ? _args[2] : {}, _ref$cacheSearchResul = _ref.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _ref$cacheSearchResul === void 0 ? this.configuration.cacheSearchResultsForSeconds : _ref$cacheSearchResul; additionalHeaders = {}; if (this.useTextContentType) { - additionalHeaders["content-type"] = "text/plain"; + additionalHeaders['content-type'] = 'text/plain'; } additionalQueryParams = {}; if (this.configuration.useServerSideSearchCache === true) { - additionalQueryParams["use_cache"] = true; + additionalQueryParams['use_cache'] = true; } queryParams = Object.assign({}, commonParams, additionalQueryParams); return _context.abrupt("return", this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { @@ -3183,7 +3183,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/operations"; +var RESOURCEPATH = '/operations'; var Operations = /*#__PURE__*/function () { function Operations(apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Operations); @@ -3321,7 +3321,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/overrides"; +var RESOURCEPATH = '/overrides'; var Overrides = /*#__PURE__*/function () { function Overrides(collectionName, apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Overrides); @@ -3369,7 +3369,7 @@ var Overrides = /*#__PURE__*/function () { }, { key: "endpointPath", value: function endpointPath(operation) { - return "".concat(_Collections__WEBPACK_IMPORTED_MODULE_4__["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(_Collections__WEBPACK_IMPORTED_MODULE_4__["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); } }], [{ key: "RESOURCEPATH", @@ -3481,7 +3481,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/presets"; +var RESOURCEPATH = '/presets'; var Presets = /*#__PURE__*/function () { function Presets(apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Presets); @@ -3528,7 +3528,7 @@ var Presets = /*#__PURE__*/function () { }, { key: "endpointPath", value: function endpointPath(operation) { - return "".concat(Presets.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(Presets.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); } }], [{ key: "RESOURCEPATH", @@ -3704,8 +3704,8 @@ var SearchClient = /*#__PURE__*/function () { var _options$sendApiKeyAs; (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, SearchClient); options.sendApiKeyAsQueryParam = (_options$sendApiKeyAs = options.sendApiKeyAsQueryParam) !== null && _options$sendApiKeyAs !== void 0 ? _options$sendApiKeyAs : true; - if (options.sendApiKeyAsQueryParam === true && (options.apiKey || "").length > 2000) { - console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."); + if (options.sendApiKeyAsQueryParam === true && (options.apiKey || '').length > 2000) { + console.warn('[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.'); options.sendApiKeyAsQueryParam = false; } this.configuration = new _Configuration__WEBPACK_IMPORTED_MODULE_3__["default"](options); @@ -3730,7 +3730,7 @@ var SearchClient = /*#__PURE__*/function () { key: "collections", value: function collections(collectionName) { if (!collectionName) { - throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to " + "be searched must be specified. Use Typesense.Client if you need to access the collection object."); + throw new Error('Typesense.SearchClient only supports search operations, so the collectionName that needs to ' + 'be searched must be specified. Use Typesense.Client if you need to access the collection object.'); } else { if (this.individualCollections[collectionName] === undefined) { this.individualCollections[collectionName] = new _SearchOnlyCollection__WEBPACK_IMPORTED_MODULE_6__.SearchOnlyCollection(collectionName, this.apiCall, this.configuration); @@ -3807,7 +3807,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/documents"; +var RESOURCEPATH = '/documents'; var SearchOnlyDocuments = /*#__PURE__*/function () { function SearchOnlyDocuments(collectionName, apiCall, configuration) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, SearchOnlyDocuments); @@ -3840,15 +3840,15 @@ var SearchOnlyDocuments = /*#__PURE__*/function () { _ref = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}, _ref$cacheSearchResul = _ref.cacheSearchResultsForSeconds, cacheSearchResultsForSeconds = _ref$cacheSearchResul === void 0 ? this.configuration.cacheSearchResultsForSeconds : _ref$cacheSearchResul, _ref$abortSignal = _ref.abortSignal, abortSignal = _ref$abortSignal === void 0 ? null : _ref$abortSignal; additionalQueryParams = {}; if (this.configuration.useServerSideSearchCache === true) { - additionalQueryParams["use_cache"] = true; + additionalQueryParams['use_cache'] = true; } for (key in searchParameters) { if (Array.isArray(searchParameters[key])) { - additionalQueryParams[key] = searchParameters[key].join(","); + additionalQueryParams[key] = searchParameters[key].join(','); } } queryParams = Object.assign({}, searchParameters, additionalQueryParams); - return _context.abrupt("return", this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath("search"), queryParams, { + return _context.abrupt("return", this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath('search'), queryParams, { abortSignal: abortSignal }], { cacheResponseForSeconds: cacheSearchResultsForSeconds @@ -3867,7 +3867,7 @@ var SearchOnlyDocuments = /*#__PURE__*/function () { }, { key: "endpointPath", value: function endpointPath(operation) { - return "".concat(_Collections__WEBPACK_IMPORTED_MODULE_6__["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(_Collections__WEBPACK_IMPORTED_MODULE_6__["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); } }], [{ key: "RESOURCEPATH", @@ -3900,7 +3900,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/stats.json"; +var RESOURCEPATH = '/stats.json'; var Metrics = /*#__PURE__*/function () { function Metrics(apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Metrics); @@ -4030,7 +4030,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/stopwords"; +var RESOURCEPATH = '/stopwords'; var Stopwords = /*#__PURE__*/function () { function Stopwords(apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Stopwords); @@ -4077,7 +4077,7 @@ var Stopwords = /*#__PURE__*/function () { }, { key: "endpointPath", value: function endpointPath(operation) { - return "".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); } }], [{ key: "RESOURCEPATH", @@ -4194,7 +4194,7 @@ __webpack_require__.r(__webpack_exports__); -var RESOURCEPATH = "/synonyms"; +var RESOURCEPATH = '/synonyms'; var Synonyms = /*#__PURE__*/function () { function Synonyms(collectionName, apiCall) { (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, Synonyms); @@ -4242,7 +4242,7 @@ var Synonyms = /*#__PURE__*/function () { }, { key: "endpointPath", value: function endpointPath(operation) { - return "".concat(_Collections__WEBPACK_IMPORTED_MODULE_4__["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(_Collections__WEBPACK_IMPORTED_MODULE_4__["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); } }], [{ key: "RESOURCEPATH", diff --git a/dist/typesense.js.map b/dist/typesense.js.map index 420ed9f7..ee956bbb 100644 --- a/dist/typesense.js.map +++ b/dist/typesense.js.map @@ -1 +1 @@ -{"version":3,"file":"typesense.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAA2D;AAAA,IAGtCC,KAAK;EACxB,SAAAA,MAAoBC,IAAY,EAAUC,OAAgB,EAAE;IAAAC,iFAAA,OAAAH,KAAA;IAAA,KAAxCC,IAAY,GAAZA,IAAY;IAAA,KAAUC,OAAgB,GAAhBA,OAAgB;EAAG;EAACE,8EAAA,CAAAJ,KAAA;IAAAK,GAAA;IAAAC,KAAA;MAAA,IAAAC,SAAA,GAAAC,mFAAA,eAAAC,sEAAA,CAE9D,SAAAE,QAAA;QAAA,OAAAF,sEAAA,UAAAI,SAAAC,QAAA;UAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;YAAA;cAAA,OAAAF,QAAA,CAAAG,MAAA,WACS,IAAI,CAACf,OAAO,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A,CAAI,IAAI,CAACoP,cAAc,EAAApP,MAAA,CACvD4P,QAAQ,CAAC3P,YAAY,EAAAD,MAAA,CACpB0B,SAAS,KAAKP,SAAS,GAAG,EAAE,GAAG,GAAG,GAAGO,SAAS;IACnD;EAAC;IAAAnD,GAAA;IAAAa,GAAA,EAED,SAAAA,IAAA,EAAkC;MAChC,OAAOa,YAAY;IACrB;EAAC;EAAA,OAAA2P,QAAA;AAAA;;;;;;;;;;;AC1CH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,IAA0C;AAClD,QAAQ,oCAAO,UAAU;AAAA;AAAA;AAAA;AAAA,kGAAC;AAC1B,MAAM,KAAK,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qEAAqE;AACrE,YAAY;AACZ;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qDAAqD;AACrD,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB;AACtB;;AAEA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,oCAAoC;AACpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,CAAC;;;;;;;;;;;ACpWD;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA,cAAc,sGAAiC;AAC/C;AACA,gBAAgB;AAChB;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;AACL,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,aAAa;AACb,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA,sCAAsC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;AC/SjG;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,0BAA0B,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACTrF;;AAEA,cAAc,mBAAO,CAAC,kGAA+B;AACrD;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;;ACde;AACf;AACA,yCAAyC,SAAS;AAClD;AACA;;;;;;;;;;;;;;;ACJe;AACf;AACA;;;;;;;;;;;;;;;;ACFqD;AACtC;AACf,iCAAiC,gEAAgB;AACjD;;;;;;;;;;;;;;;ACHe;AACf;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;AC7Be;AACf;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACJiD;AACoB;AACtD;AACf,MAAM,wEAAwB;AAC9B;AACA;AACA;AACA,cAAc,8DAAc;AAC5B;;;;;;;;;;;;;;;;ACR+C;AAC/C;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA,kCAAkC,6DAAa;AAC/C;AACA;AACe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;;;;ACjB+C;AAChC;AACf,QAAQ,6DAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;;;;;;;;;;;;;;;ACde;AACf;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACLiD;AAClC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH,kBAAkB,8DAAc;AAChC;;;;;;;;;;;;;;;AChBe;AACf;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;ACNe;AACf;AACA,yFAAyF;AACzF,IAAI;AACJ;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;;;ACPe;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,YAAY,kEAAkE;AACtF,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC1Be;AACf;AACA;;;;;;;;;;;;;;;ACFe;AACf;AACA;;;;;;;;;;;;;;;;;ACFkC;AAC6B;AAChD;AACf,eAAe,sDAAO;AACtB;AACA,IAAI;AACJ;AACA;AACA,SAAS,qEAAqB;AAC9B;;;;;;;;;;;;;;;ACTe;AACf;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACNiD;AACY;AACY;AACtB;AACpC;AACf,SAAS,8DAAc,SAAS,oEAAoB,YAAY,0EAA0B,YAAY,+DAAe;AACrH;;;;;;;;;;;;;;;;;;;ACNuD;AACJ;AACsB;AACl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;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5EY;;AAEqB;AACO;AACK;AACE;AACK;AACS;AACC;AAChB;AACQ;AACC;AACZ;AACO;AACC;;AAEpD;AACA;AACA,uBAAuB,mEAAW;;AAElC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA,iEAAe;AACf;AACA;AACA,2BAA2B,6DAAY;AACvC,SAAS,6BAA6B;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,QAAQ,iDAAK;AACb,UAAU,0DAAQ,0BAA0B,0DAAQ;AACpD,8CAA8C;AAC9C,QAAQ;AACR;AACA,oEAAoE;AACpE,yFAAyF;AACzF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,kEAAa;;AAElC,8CAA8C,gEAAQ;;AAEtD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6DAAY;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,2DAAM;AACZ;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,2DAAU,oBAAoB,2DAAU;;AAEzD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,2DAAU,kBAAkB,2DAAU;;AAEvD;AACA;AACA;;AAEA;AACA;AACA;AACA,kDAAkD,iEAAoB;AACtE;AACA;AACA;AACA,iBAAiB,2DAAU;AAC3B;AACA,2CAA2C,2DAAU,aAAa,2DAAU;AA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A,qBAAqB,iEAAY;;AAEjC;AACA,oBAAoB,4DAAW;;AAE/B,qBAAqB,8DAAY;;AAEjC,4BAA4B,uEAAc,CAAC,iDAAK;;AAEhD,mBAAmB,8DAAQ;;AAE3B,uBAAuB,mEAAc;;AAErC;;AAEA;AACA,iEAAe,KAAK;;;;;;;;;;;;;;;;;ACxFP;;AAEkC;;AAE/C;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,yBAAyB,yDAAa;AACtC;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,WAAW,EAAC;;;;;;;;;;;;;;;;;;ACxHd;;AAEkC;AACf;;AAEhC;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA,EAAE,2DAAU,oDAAoD,2DAAU;AAC1E;AACA;;AAEA,iDAAK,yBAAyB,2DAAU;AACxC;AACA,CAAC;;AAED,iEAAe,aAAa,EAAC;;;;;;;;;;;;;;;;ACxBhB;;AAEE;AACf;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACJa;;AAEqB;AACY;AACW;AACN;AACR;AACI;AACC;AACH;;AAE7C,mBAAmB,6DAAS;;AAE5B;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,mBAAmB,8DAAkB;AACrC,oBAAoB,8DAAkB;AACtC;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,SAAS;AACtB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,aAAa,2DAAW;;AAExB,WAAW,yCAAyC;;AAEpD;AACA,MAAM,6DAAS;AACf;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,UAAU,iDAAK;AACf;AACA;AACA;AACA,QAAQ;AACR,QAAQ,6DAAS;AACjB;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA,oCAAoC,iDAAK;AACzC;AACA;AACA;;AAEA,eAAe,iDAAK;AACpB;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,wDAAY;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA,qBAAqB,2DAAe;AACpC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,2DAAe;AAC/B,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,aAAa,2DAAW;AACxB,qBAAqB,6DAAa;AAClC,WAAW,gEAAQ;AACnB;AACA;;AAEA;AACA,iDAAK;AACL;AACA;AACA,wBAAwB,2DAAW,aAAa;AAChD;AACA;AACA,yBAAyB;AACzB,KAAK;AACL;AACA,CAAC;;AAED,iDAAK;AACL;;AAEA;AACA;AACA,0BAA0B,2DAAW,aAAa;AAClD;AACA;AACA;AACA,UAAU,IAAI;AACd;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA,CAAC;;AAED,iEAAe,KAAK,EAAC;;;;;;;;;;;;;;;;;AChOR;;AAEmB;;AAEhC;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,iDAAK;AACnB;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB,CAAC;;AAED;AACA,kDAAkD,YAAY;;AAE9D;AACA;AACA;;AAEA,EAAE,iDAAK;AACP;AACA,GAAG;AACH;AACA,GAAG;;AAEH;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,iEAAe,UAAU,EAAC;;;;;;;;;;;;;;;;;;ACnGb;;AAEmB;AACsB;;AAEtD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,SAAS,iDAAK;AACd;;AAEA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,MAAM,iDAAK;AACX;AACA;;AAEA;AACA;AACA;;AAEA,OAAO,iDAAK;;AAEZ,MAAM,iDAAK;AACX;AACA;;AAEA,MAAM,iDAAK;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AAC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AI,iDAAK;;AAET;AACA;AACA;;AAEA;;AAEA;AACA,iDAAK,6CAA6C,MAAM;AACxD,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,iDAAK;;AAEL,iEAAe,YAAY,EAAC;;;;;;;;;;;;;;;;;ACzSf;;AAEqB;;AAElC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,eAAe;AACf;AACA;AACA,IAAI,iDAAK;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA,iEAAe,kBAAkB,EAAC;;;;;;;;;;;;;;;;;;ACtErB;;AAE2C;AACJ;;AAEpD;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACe;AACf,kBAAkB,qEAAa;AAC/B,WAAW,mEAAW;AACtB;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;ACpBa;;AAEkC;AACF;AACD;AACW;AACJ;AACJ;;AAE/C;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,gEAAa;AAC3B;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACe;AACf;;AAEA,mBAAmB,6DAAY;;AAE/B;AACA,gBAAgB,yDAAa;AAC7B;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,6DAAQ,8BAA8B,0DAAQ;;AAEhE;AACA;;AAEA;AACA,oBAAoB,yDAAa;AACjC;AACA;AACA;AACA;;AAEA,uBAAuB,6DAAY;;AAEnC;AACA,GAAG;AACH,SAAS,+DAAQ;AACjB;;AAEA;AACA;AACA,+BAA+B,yDAAa;AAC5C;AACA;AACA;AACA;AACA,kCAAkC,6DAAY;AAC9C;AACA;;AAEA;AACA,GAAG;AACH;;;;;;;;;;;;;;;;;;AChFa;;AAEmB;AACa;;AAE7C,oDAAoD,wDAAY;;AAEhE;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACe;AACf;AACA;AACA;;AAEA;AACA,QAAQ,iDAAK,0BAA0B,iDAAK;AAC5C,aAAa,iDAAK,aAAa,SAAS;AACxC,MAAM,SAAS,iDAAK;AACpB,aAAa,iDAAK,SAAS;AAC3B,MAAM,SAAS,iDAAK;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,iDAAK;AACd;AACA,MAAM,UAAU,iDAAK;AACrB;AACA;AACA;;AAEA;AACA;AACA,SAAS,iDAAK;AACd;AACA;AACA;;AAEA;AACA;AACA,SAAS,iDAAK;AACd;AACA,MAAM,UAAU,iDAAK;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAE,iDAAK,qCAAqC;AAC5C;AACA;AACA,KAAK,iDAAK;AACV,GAAG;;AAEH;AACA;;;;;;;;;;;;;;;;;ACzGa;;AAE4B;;AAEzC;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACe;AACf;AACA;AACA;AACA,IAAI;AACJ,eA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;AACA,kBAAkB,2DAAU,SAAS,2DAAU;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,cAAc,0DAAQ;AACtB,UAAU,0DAAQ;AAClB,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAK;AACL;AACA,CAAC;;AAED,iEAAe,QAAQ,EAAC;;;;;;;;;;;;;;;;AC3JX;;AAEb,iEAAe;AACf;AACA;AACA;AACA,CAAC,EAAC;;;;;;;;;;;;;;;;ACNK;;;;;;;;;;;;;;;;ACAM;;AAE4B;;AAEzC;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC;AACA,aAAa;AACb;AACA;AACA;;AAEA,YAAY,0DAAU;AACtB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG;AACH;;AAEA,iEAAe,oBAAoB,EAAC;;;;;;;;;;;;;;;;ACzDpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED,iEAAe,cAAc,EAAC;;;;;;;;;;;;;;;;ACtEjB;;AAEE;AACf;AACA;AACA;A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Q;AACrB;AACA,iEAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;;AAEH;AACA,CAAC,EAAC;;;;;;;;;;;;;;;;ACtDW;;AAEE;AACf,0BAA0B,KAAK;AAC/B;AACA;;;;;;;;;;;;;;;;ACLa;;AAEb;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,iEAAe,WAAW,EAAC;;;;;;;;;;;;;;;;ACtDd;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACe;AACf;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AC3Ba;;AAEmB;AACe;AAC/C;AACoE;;AAEpE;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA,SAAS,iDAAK,yBAAyB,iDAAK;AAC5C;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,iDAAK;AACd;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,YAAY;AACvB;AACA,aAAa;AACb;AACA;AACA,SAAS,iDAAK;AACd;;AAEA,mBAAmB,iDAAK,c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A,mBAAmB;AACnB,YAAY;AACZ,QAAQ;AACR,GAAG;AACH;AACA,CAAC,EAAC;;;;;;;;;;;;;;;;;;ACZF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAMA;;;;;;;;;;;;;;;;;;AC9CsC;AACI;;AAE3C,iEAAe;AACf,KAAK,6CAAK;AACV,KAAK,sDAAQ;AACb,CAAC;;;;;;;;;;;;;;;;;ACNY;;AAEwB;;AAErC;;AAEA,OAAO,UAAU;AACjB,OAAO,gBAAgB;;AAEvB;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA,OAAO,SAAS;;AAEhB;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA,2BAA2B,oBAAoB,IAAI;AACnD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA4B;AAC5B;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC;AAClC,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA,gCAAgC,WAAW,IAAI;AAC/C;AACA;AACA,eAAe,4DAAI;AACnB,MAAM;AACN;AACA;AACA,GAAG,GAAG,WAAW;AACjB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,eAAe;;AAEzC;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,QAAQ;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA,iEAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;;;;;;UCltBF;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;ACNwC;AACY;AACP;AAEL;AACxC,iEAAe;EAAE9B,MAAM,EAANA,yDAAM;EAAEgL,YAAY,EAAZA,+DAAY;EAAEU,MAAM,EAANA,8CAAMA;AAAC,CAAC,E","sources":["webpack://Typesense/./src/Typesense/Alias.ts","webpack://Typesense/./src/Typesense/Aliases.ts","webpack://Typesense/./src/Typesense/Analytics.ts","webpack://Typesense/./src/Typesense/AnalyticsEvents.ts","webpack://Typesense/./src/Typesense/AnalyticsRule.ts","webpack://Typesense/./src/Typesense/AnalyticsRules.ts","webpack://Typesense/./src/Typesense/ApiCall.ts","webpack://Typesense/./src/Typesense/Client.ts","webpack://Typesense/./src/Typesense/Collection.ts","webpack://Typesense/./src/Typesense/Collections.ts","webpack://Typesense/./src/Typesense/Configuration.ts","webpack://Typesense/./src/Typesense/Conversation.ts","webpack://Typesense/./src/Typesense/ConversationModel.ts","webpack://Typesense/./src/Typesense/ConversationModels.ts","webpack://Typesense/./src/Typesense/Conversations.ts","webpack://Typesense/./src/Typesense/Debug.ts","webpack://Typesense/./src/Typesense/Document.ts","webpack://Typesense/./src/Typesense/Documents.ts","webpack://Typesense/./src/Typesense/Errors/HTTPError.ts","webpack://Typesense/./src/Typesense/Errors/ImportError.ts","webpack://Typesense/./src/Typesense/Errors/MissingConfigurationError.ts","webpack://Typesense/./src/Typesense/Errors/ObjectAlreadyExists.ts","webpack://Typesense/./src/Typesense/Errors/ObjectNotFound.ts","webpack://Typesense/./src/Typesense/Errors/ObjectUnprocessable.ts","webpack://Typesense/./src/Typesense/Errors/RequestMalformed.ts","webpack://Typesense/./src/Typesense/Errors/RequestUnauthorized.ts","webpack://Typesense/./src/Typesense/Errors/ServerError.ts","webpack://Typesense/./src/Typesense/Errors/TypesenseError.ts","webpack://Typesense/./src/Typesense/Errors/index.ts","webpack://Typesense/./src/Typesense/Health.ts","webpack://Typesense/./src/Typesense/Key.ts","webpack://Typesense/./src/Typesense/Keys.ts","webpack://Typesense/./src/Typesense/Metrics.ts","webpack://Typesense/./src/Typesense/MultiSearch.ts","webpack://Typesense/./src/Typesense/Operations.ts","webpack://Typesense/./src/Typesense/Override.ts","webpack://Typesense/./src/Typesense/Overrides.ts","webpack://Typesense/./src/Typesense/Preset.ts","webpack://Typesense/./src/Typesense/Presets.ts","webpack://Typesense/./src/Typesense/RequestWithCache.ts","webpack://Typesense/./src/Typesense/SearchClient.ts","webpack://Typesense/./src/Typesense/SearchOnlyCollection.ts","webpack://Typesense/./src/Typesense/SearchOnlyDocuments.ts","webpack://Typesense/./src/Typesense/Stats.ts","webpack://Typesense/./src/Typesense/Stopword.ts","webpack://Typesense/./src/Typesense/Stopwords.ts","webpack://Typesense/./src/Typesense/Synonym.ts","webpack://Typesense/./src/Typesense/Synonyms.ts","webpack://Typesense/./node_modules/loglevel/lib/loglevel.js","webpack://Typesense/ignored|/Users/jason/Programming/jprojs/typesense/typesense-js/src/Typesense|crypto","webpack://Typesense/ignored|/Users/jason/Programming/jprojs/typesense/typesense-js/src/Typesense|http","webpack://Typesense/ignored|/Users/jason/Programming/jprojs/typesense/typesense-js/src/Typesense|https","webpack://Typesense/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/typeof.js","webpack://Typesense/./node_modules/@babel/runtime/regenerator/index.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/construct.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","webpack://Typesense/./node_modules/axios/lib/adapters/adapters.js","webpack://Typesense/./node_modules/axios/lib/adapters/xhr.js","webpack://Typesense/./node_modules/axios/lib/axios.js","webpack://Typesense/./node_modules/axios/lib/cancel/CancelToken.js","webpack://Typesense/./node_modules/axios/lib/cancel/CanceledError.js","webpack://Typesense/./node_modules/axios/lib/cancel/isCancel.js","webpack://Typesense/./node_modules/axios/lib/core/Axios.js","webpack://Typesense/./node_modules/axios/lib/core/AxiosError.js","webpack://Typesense/./node_modules/axios/lib/core/AxiosHeaders.js","webpack://Typesense/./node_modules/axios/lib/core/InterceptorManager.js","webpack://Typesense/./node_modules/axios/lib/core/buildFullPath.js","webpack://Typesense/./node_modules/axios/lib/core/dispatchRequest.js","webpack://Typesense/./node_modules/axios/lib/core/mergeConfig.js","webpack://Typesense/./node_modules/axios/lib/core/settle.js","webpack://Typesense/./node_modules/axios/lib/core/transformData.js","webpack://Typesense/./node_modules/axios/lib/defaults/index.js","webpack://Typesense/./node_modules/axios/lib/defaults/transitional.js","webpack://Typesense/./node_modules/axios/lib/env/data.js","webpack://Typesense/./node_modules/axios/lib/helpers/AxiosURLSearchParams.js","webpack://Typesense/./node_modules/axios/lib/helpers/HttpStatusCode.js","webpack://Typesense/./node_modules/axios/lib/helpers/bind.js","webpack://Typesense/./node_modules/axios/lib/helpers/buildURL.js","webpack://Typesense/./node_modules/axios/lib/helpers/combineURLs.js","webpack://Typesense/./node_modules/axios/lib/helpers/cookies.js","webpack://Typesense/./node_modules/axios/lib/helpers/formDataToJSON.js","webpack://Typesense/./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://Typesense/./node_modules/axios/lib/helpers/isAxiosError.js","webpack://Typesense/./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://Typesense/./node_modules/axios/lib/helpers/null.js","webpack://Typesense/./node_modules/axios/lib/helpers/parseHeaders.js","webpack://Typesense/./node_modules/axios/lib/helpers/parseProtocol.js","webpack://Typesense/./node_modules/axios/lib/helpers/speedometer.js","webpack://Typesense/./node_modules/axios/lib/helpers/spread.js","webpack://Typesense/./node_modules/axios/lib/helpers/toFormData.js","webpack://Typesense/./node_modules/axios/lib/helpers/toURLEncodedForm.js","webpack://Typesense/./node_modules/axios/lib/helpers/validator.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/classes/Blob.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/classes/FormData.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/index.js","webpack://Typesense/./node_modules/axios/lib/platform/common/utils.js","webpack://Typesense/./node_modules/axios/lib/platform/index.js","webpack://Typesense/./node_modules/axios/lib/utils.js","webpack://Typesense/webpack/bootstrap","webpack://Typesense/webpack/runtime/compat get default export","webpack://Typesense/webpack/runtime/define property getters","webpack://Typesense/webpack/runtime/hasOwnProperty shorthand","webpack://Typesense/webpack/runtime/make namespace object","webpack://Typesense/./src/Typesense.ts"],"sourcesContent":["import Aliases, { CollectionAliasSchema } from \"./Aliases\";\nimport ApiCall from \"./ApiCall\";\n\nexport default class Alias {\n constructor(private name: string, private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Aliases.RESOURCEPATH}/${this.name}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/aliases\";\n\nexport interface CollectionAliasCreateSchema {\n collection_name: string;\n}\n\nexport interface CollectionAliasSchema extends CollectionAliasCreateSchema {\n name: string;\n}\n\nexport interface CollectionAliasesResponseSchema {\n aliases: CollectionAliasSchema[];\n}\n\nexport default class Aliases {\n constructor(private apiCall: ApiCall) {}\n\n async upsert(\n name: string,\n mapping: CollectionAliasCreateSchema\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(name),\n mapping\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n private endpointPath(aliasName): string {\n return `${Aliases.RESOURCEPATH}/${aliasName}`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport AnalyticsRules from \"./AnalyticsRules\";\nimport AnalyticsRule from \"./AnalyticsRule\";\nimport AnalyticsEvents from \"./AnalyticsEvents\";\n\nconst RESOURCEPATH = \"/analytics\";\n\nexport default class Analytics {\n private readonly _analyticsRules: AnalyticsRules;\n private readonly individualAnalyticsRules: Record = {};\n private readonly _analyticsEvents: AnalyticsEvents;\n\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules(this.apiCall);\n this._analyticsEvents = new AnalyticsEvents(this.apiCall);\n }\n\n rules(id?: string): AnalyticsRules | AnalyticsRule {\n if (id === undefined) {\n return this._analyticsRules;\n } else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n }\n\n events(): AnalyticsEvents {\n return this._analyticsEvents;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport { AnalyticsEventCreateSchema } from \"./AnalyticsEvent\";\n\nconst RESOURCEPATH = \"/analytics/events\";\n\nexport default class AnalyticsEvents {\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async create(\n params: AnalyticsEventCreateSchema,\n ): Promise {\n return this.apiCall.post(\n this.endpointPath(),\n params,\n );\n }\n\n private endpointPath(operation?: string): string {\n return `${AnalyticsEvents.RESOURCEPATH}${\n operation === undefined ? \"\" : \"/\" + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport AnalyticsRules from \"./AnalyticsRules\";\n\nexport interface AnalyticsRuleCreateSchema {\n type: \"popular_queries\" | \"nohits_queries\" | \"counter\";\n params: {\n source: {\n collections: string[];\n events?: Array<{\n type: string;\n weight: number;\n name: string;\n }>;\n };\n expand_query?: boolean;\n destination: {\n collection: string;\n counter_field?: string;\n };\n limit?: number;\n };\n}\n\nexport interface AnalyticsRuleDeleteSchema {\n name: string;\n}\n\nexport interface AnalyticsRuleSchema extends AnalyticsRuleCreateSchema {\n name: string;\n}\n\nexport default class AnalyticsRule {\n constructor(\n private name: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${AnalyticsRules.RESOURCEPATH}/${this.name}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport {\n AnalyticsRuleCreateSchema,\n AnalyticsRuleSchema,\n} from \"./AnalyticsRule\";\n\nexport interface AnalyticsRulesRetrieveSchema {\n rules: AnalyticsRuleSchema[];\n}\n\nconst RESOURCEPATH = \"/analytics/rules\";\n\nexport default class AnalyticsRules {\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async upsert(\n name: string,\n params: AnalyticsRuleCreateSchema\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(name),\n params\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${AnalyticsRules.RESOURCEPATH}${\n operation === undefined ? \"\" : \"/\" + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import axios, { AxiosRequestConfig, AxiosResponse, Method } from \"axios\";\nimport { Logger } from \"loglevel\";\nimport {\n HTTPError,\n ObjectAlreadyExists,\n ObjectNotFound,\n ObjectUnprocessable,\n RequestMalformed,\n RequestUnauthorized,\n ServerError,\n} from \"./Errors\";\nimport TypesenseError from \"./Errors/TypesenseError\";\nimport Configuration, { NodeConfiguration } from \"./Configuration\";\nimport { Agent as HTTPAgent } from \"http\";\nimport { Agent as HTTPSAgent } from \"https\";\n\nconst APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nconst HEALTHY = true;\nconst UNHEALTHY = false;\n\ninterface Node extends NodeConfiguration {\n isHealthy: boolean;\n index: string | number;\n}\n\nexport default class ApiCall {\n private readonly apiKey: string;\n private readonly nodes: Node[];\n private readonly nearestNode: Node;\n private readonly connectionTimeoutSeconds: number;\n private readonly healthcheckIntervalSeconds: number;\n private readonly retryIntervalSeconds: number;\n private readonly sendApiKeyAsQueryParam?: boolean;\n private readonly numRetriesPerRequest: number;\n private readonly additionalUserHeaders?: Record;\n\n private readonly logger: Logger;\n private currentNodeIndex: number;\n\n constructor(private configuration: Configuration) {\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n\n this.logger = this.configuration.logger;\n\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n\n async get(\n endpoint: string,\n queryParameters: any = {},\n {\n abortSignal = null,\n responseType = undefined,\n }: {\n abortSignal?: any;\n responseType?: AxiosRequestConfig[\"responseType\"] | undefined;\n } = {},\n ): Promise {\n return this.performRequest(\"get\", endpoint, {\n queryParameters,\n abortSignal,\n responseType,\n });\n }\n\n async delete(endpoint: string, queryParameters: any = {}): Promise {\n return this.performRequest(\"delete\", endpoint, { queryParameters });\n }\n\n async post(\n endpoint: string,\n bodyParameters: any = {},\n queryParameters: any = {},\n additionalHeaders: any = {},\n ): Promise {\n return this.performRequest(\"post\", endpoint, {\n queryParameters,\n bodyParameters,\n additionalHeaders,\n });\n }\n\n async put(\n endpoint: string,\n bodyParameters: any = {},\n queryParameters: any = {},\n ): Promise {\n return this.performRequest(\"put\", endpoint, {\n queryParameters,\n bodyParameters,\n });\n }\n\n async patch(\n endpoint: string,\n bodyParameters: any = {},\n queryParameters: any = {},\n ): Promise {\n return this.performRequest(\"patch\", endpoint, {\n queryParameters,\n bodyParameters,\n });\n }\n\n async performRequest(\n requestType: Method,\n endpoint: string,\n {\n queryParameters = null,\n bodyParameters = null,\n additionalHeaders = {},\n abortSignal = null,\n responseType = undefined,\n skipConnectionTimeout = false,\n enableKeepAlive = undefined,\n }: {\n queryParameters?: any;\n bodyParameters?: any;\n additionalHeaders?: any;\n abortSignal?: any;\n responseType?: AxiosRequestConfig[\"responseType\"] | undefined;\n skipConnectionTimeout?: boolean;\n enableKeepAlive?: boolean | undefined;\n },\n ): Promise {\n this.configuration.validate();\n\n const requestNumber = Date.now();\n let lastException;\n this.logger.debug(\n `Request #${requestNumber}: Performing ${requestType.toUpperCase()} request: ${endpoint}`,\n );\n for (\n let numTries = 1;\n numTries <= this.numRetriesPerRequest + 1;\n numTries++\n ) {\n const node = this.getNextNode(requestNumber);\n this.logger.debug(\n `Request #${requestNumber}: Attempting ${requestType.toUpperCase()} request Try #${numTries} to Node ${\n node.index\n }`,\n );\n\n if (abortSignal && abortSignal.aborted) {\n return Promise.reject(new Error(\"Request aborted by caller.\"));\n }\n\n let abortListener;\n\n try {\n const requestOptions: AxiosRequestConfig = {\n method: requestType,\n url: this.uriFor(endpoint, node),\n headers: Object.assign(\n {},\n this.defaultHeaders(),\n additionalHeaders,\n this.additionalUserHeaders,\n ),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType,\n validateStatus: (status) => {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n (data, headers) => {\n let transformedData = data;\n if (\n headers !== undefined &&\n typeof data === \"string\" &&\n headers[\"content-type\"] &&\n headers[\"content-type\"].startsWith(\"application/json\")\n ) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this.connectionTimeoutSeconds * 1000;\n }\n\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n\n if (this.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params[\"x-typesense-api-key\"] = this.apiKey;\n }\n\n if (this.configuration.httpAgent) {\n this.logger.debug(\n `Request #${requestNumber}: Using custom httpAgent`,\n );\n requestOptions.httpAgent = this.configuration.httpAgent;\n } else if (enableKeepAlive === true) {\n this.logger.debug(`Request #${requestNumber}: Enabling KeepAlive`);\n requestOptions.httpAgent = new HTTPAgent({ keepAlive: true });\n }\n\n if (this.configuration.httpsAgent) {\n this.logger.debug(\n `Request #${requestNumber}: Using custom httpsAgent`,\n );\n requestOptions.httpsAgent = this.configuration.httpsAgent;\n } else if (enableKeepAlive === true) {\n this.logger.debug(`Request #${requestNumber}: Enabling keepAlive`);\n requestOptions.httpsAgent = new HTTPSAgent({ keepAlive: true });\n }\n\n if (this.configuration.paramsSerializer) {\n this.logger.debug(\n `Request #${requestNumber}: Using custom paramsSerializer`,\n );\n requestOptions.paramsSerializer = this.configuration.paramsSerializer;\n }\n\n if (\n bodyParameters &&\n ((typeof bodyParameters === \"string\" &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === \"object\" &&\n Object.keys(bodyParameters).length !== 0))\n ) {\n requestOptions.data = bodyParameters;\n }\n\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n const cancelToken = axios.CancelToken;\n const source = cancelToken.source();\n abortListener = () => source.cancel();\n abortSignal.addEventListener(\"abort\", abortListener);\n requestOptions.cancelToken = source.token;\n }\n\n const response = await axios(requestOptions);\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this.setNodeHealthcheck(node, HEALTHY);\n }\n this.logger.debug(\n `Request #${requestNumber}: Request to Node ${node.index} was made. Response Code was ${response.status}.`,\n );\n\n if (response.status >= 200 && response.status < 300) {\n // If response is 2xx return a resolved promise\n return Promise.resolve(response.data);\n } else if (response.status < 500) {\n // Next, if response is anything but 5xx, don't retry, return a custom error\n return Promise.reject(\n this.customErrorForResponse(response, response.data?.message),\n );\n } else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this.customErrorForResponse(response, response.data?.message);\n }\n } catch (error: any) {\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error;\n this.logger.warn(\n `Request #${requestNumber}: Request to Node ${\n node.index\n } failed due to \"${error.code} ${error.message}${\n error.response == null\n ? \"\"\n : \" - \" + JSON.stringify(error.response?.data)\n }\"`,\n );\n // this.logger.debug(error.stack)\n this.logger.warn(\n `Request #${requestNumber}: Sleeping for ${this.retryIntervalSeconds}s and then retrying request...`,\n );\n await this.timer(this.retryIntervalSeconds);\n } finally {\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener(\"abort\", abortListener);\n }\n }\n }\n this.logger.debug(\n `Request #${requestNumber}: No retries left. Raising last error`,\n );\n return Promise.reject(lastException);\n }\n\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n getNextNode(requestNumber = 0): Node {\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\n `Request #${requestNumber}: Nodes Health: Node ${\n this.nearestNode.index\n } is ${this.nearestNode.isHealthy === true ? \"Healthy\" : \"Unhealthy\"}`,\n );\n if (\n this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)\n ) {\n this.logger.debug(\n `Request #${requestNumber}: Updated current node to Node ${this.nearestNode.index}`,\n );\n return this.nearestNode;\n }\n this.logger.debug(\n `Request #${requestNumber}: Falling back to individual nodes`,\n );\n }\n\n // Fallback to nodes as usual\n this.logger.debug(\n `Request #${requestNumber}: Nodes Health: ${this.nodes\n .map(\n (node) =>\n `Node ${node.index} is ${\n node.isHealthy === true ? \"Healthy\" : \"Unhealthy\"\n }`,\n )\n .join(\" || \")}`,\n );\n let candidateNode: Node = this.nodes[0];\n for (let i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (\n candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)\n ) {\n this.logger.debug(\n `Request #${requestNumber}: Updated current node to Node ${candidateNode.index}`,\n );\n return candidateNode;\n }\n }\n\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\n `Request #${requestNumber}: No healthy nodes were found. Returning the next node, Node ${candidateNode.index}`,\n );\n return candidateNode;\n }\n\n nodeDueForHealthcheck(node, requestNumber = 0): boolean {\n const isDueForHealthcheck =\n Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\n `Request #${requestNumber}: Node ${node.index} has exceeded healtcheckIntervalSeconds of ${this.healthcheckIntervalSeconds}. Adding it back into rotation.`,\n );\n }\n return isDueForHealthcheck;\n }\n\n initializeMetadataForNodes(): void {\n if (this.nearestNode != null) {\n this.nearestNode.index = \"nearestNode\";\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n\n this.nodes.forEach((node, i) => {\n node.index = i;\n this.setNodeHealthcheck(node, HEALTHY);\n });\n }\n\n setNodeHealthcheck(node, isHealthy): void {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n }\n\n uriFor(endpoint: string, node): string {\n if (node.url != null) {\n return `${node.url}${endpoint}`;\n }\n return `${node.protocol}://${node.host}:${node.port}${node.path}${endpoint}`;\n }\n\n defaultHeaders(): any {\n const defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders[\"Content-Type\"] = \"application/json\";\n return defaultHeaders;\n }\n\n async timer(seconds): Promise {\n return new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n }\n\n customErrorForResponse(\n response: AxiosResponse,\n messageFromServer: string,\n ): TypesenseError {\n let errorMessage = `Request failed with HTTP code ${response.status}`;\n if (\n typeof messageFromServer === \"string\" &&\n messageFromServer.trim() !== \"\"\n ) {\n errorMessage += ` | Server said: ${messageFromServer}`;\n }\n\n let error = new TypesenseError(errorMessage);\n\n if (response.status === 400) {\n error = new RequestMalformed(errorMessage);\n } else if (response.status === 401) {\n error = new RequestUnauthorized(errorMessage);\n } else if (response.status === 404) {\n error = new ObjectNotFound(errorMessage);\n } else if (response.status === 409) {\n error = new ObjectAlreadyExists(errorMessage);\n } else if (response.status === 422) {\n error = new ObjectUnprocessable(errorMessage);\n } else if (response.status >= 500 && response.status <= 599) {\n error = new ServerError(errorMessage);\n } else {\n error = new HTTPError(errorMessage);\n }\n\n error.httpStatus = response.status;\n\n return error;\n }\n}\n","/* eslint-disable no-dupe-class-members */\n\nimport Configuration, { ConfigurationOptions } from \"./Configuration\";\nimport ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport Collection from \"./Collection\";\nimport Aliases from \"./Aliases\";\nimport Alias from \"./Alias\";\nimport Keys from \"./Keys\";\nimport Key from \"./Key\";\nimport Debug from \"./Debug\";\nimport Metrics from \"./Metrics\";\nimport Stats from \"./Stats\";\nimport Health from \"./Health\";\nimport Operations from \"./Operations\";\nimport MultiSearch from \"./MultiSearch\";\nimport Presets from \"./Presets\";\nimport Preset from \"./Preset\";\nimport Analytics from \"./Analytics\";\nimport Stopwords from \"./Stopwords\";\nimport Stopword from \"./Stopword\";\nimport Conversations from \"./Conversations\";\nimport Conversation from \"./Conversation\";\n\nexport default class Client {\n configuration: Configuration;\n apiCall: ApiCall;\n debug: Debug;\n metrics: Metrics;\n stats: Stats;\n health: Health;\n operations: Operations;\n multiSearch: MultiSearch;\n analytics: Analytics;\n private readonly _collections: Collections;\n private readonly individualCollections: Record;\n private readonly _aliases: Aliases;\n private readonly individualAliases: Record;\n private readonly _keys: Keys;\n private readonly individualKeys: Record;\n private readonly _presets: Presets;\n private readonly individualPresets: Record;\n private readonly _stopwords: Stopwords;\n private readonly individualStopwords: Record;\n private readonly _conversations: Conversations;\n private readonly individualConversations: Record;\n\n constructor(options: ConfigurationOptions) {\n options.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam ?? false;\n\n this.configuration = new Configuration(options);\n this.apiCall = new ApiCall(this.configuration);\n this.debug = new Debug(this.apiCall);\n this.metrics = new Metrics(this.apiCall);\n this.stats = new Stats(this.apiCall);\n this.health = new Health(this.apiCall);\n this.operations = new Operations(this.apiCall);\n this.multiSearch = new MultiSearch(this.apiCall, this.configuration);\n this._collections = new Collections(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets(this.apiCall);\n this.individualPresets = {};\n this._stopwords = new Stopwords(this.apiCall);\n this.individualStopwords = {};\n this.analytics = new Analytics(this.apiCall);\n this._conversations = new Conversations(this.apiCall);\n this.individualConversations = {};\n }\n\n collections(): Collections;\n collections = object>(\n collectionName: string,\n ): Collection;\n collections(collectionName?: string): Collections | Collection {\n if (collectionName === undefined) {\n return this._collections;\n } else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection(\n collectionName,\n this.apiCall,\n this.configuration,\n );\n }\n return this.individualCollections[collectionName];\n }\n }\n\n aliases(): Aliases;\n aliases(aliasName: string): Alias;\n aliases(aliasName?: string): Aliases | Alias {\n if (aliasName === undefined) {\n return this._aliases;\n } else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n }\n\n keys(): Keys;\n keys(id: number): Key;\n keys(id?: number): Keys | Key {\n if (id === undefined) {\n return this._keys;\n } else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n }\n\n presets(): Presets;\n presets(id: string): Preset;\n presets(id?: string): Presets | Preset {\n if (id === undefined) {\n return this._presets;\n } else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n }\n\n stopwords(): Stopwords;\n stopwords(id: string): Stopword;\n stopwords(id?: string): Stopwords | Stopword {\n if (id === undefined) {\n return this._stopwords;\n } else {\n if (this.individualStopwords[id] === undefined) {\n this.individualStopwords[id] = new Stopword(id, this.apiCall);\n }\n return this.individualStopwords[id];\n }\n }\n\n conversations(): Conversations;\n conversations(id: string): Conversation;\n conversations(id?: string): Conversations | Conversation {\n if (id === undefined) {\n return this._conversations;\n } else {\n if (this.individualConversations[id] === undefined) {\n this.individualConversations[id] = new Conversation(id, this.apiCall);\n }\n return this.individualConversations[id];\n }\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections, { CollectionCreateSchema } from \"./Collections\";\nimport Documents, { DocumentSchema } from \"./Documents\";\nimport { ObjectNotFound } from \"./Errors\";\nimport Overrides from \"./Overrides\";\nimport Override from \"./Override\";\nimport Synonyms from \"./Synonyms\";\nimport Synonym from \"./Synonym\";\nimport { Document } from \"./Document\";\n\nexport type FieldType =\n | \"string\"\n | \"int32\"\n | \"int64\"\n | \"float\"\n | \"bool\"\n | \"geopoint\"\n | \"geopoint[]\"\n | \"string[]\"\n | \"int32[]\"\n | \"int64[]\"\n | \"float[]\"\n | \"bool[]\"\n | \"object\"\n | \"object[]\"\n | \"auto\"\n | \"string*\"\n | \"image\";\n\nexport interface CollectionFieldSchema {\n name: string;\n type: FieldType;\n optional?: boolean;\n facet?: boolean;\n index?: boolean;\n sort?: boolean;\n locale?: string;\n infix?: boolean;\n stem?: boolean;\n num_dim?: number;\n store?: boolean;\n [t: string]: unknown;\n}\n\nexport interface CollectionSchema extends CollectionCreateSchema {\n created_at: number;\n num_documents: number;\n num_memory_shards: number;\n}\n\nexport interface CollectionDropFieldSchema {\n name: string;\n drop: true;\n}\n\nexport interface CollectionUpdateSchema\n extends Partial> {\n fields?: (CollectionFieldSchema | CollectionDropFieldSchema)[];\n}\n\nexport default class Collection {\n private readonly _documents: Documents;\n private individualDocuments: Record> = {};\n private readonly _overrides: Overrides;\n private individualOverrides: Record = {};\n private readonly _synonyms: Synonyms;\n private individualSynonyms: Record = {};\n\n constructor(\n private readonly name: string,\n private readonly apiCall: ApiCall,\n private readonly configuration: any,\n ) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n\n this._documents = new Documents(\n this.name,\n this.apiCall,\n this.configuration,\n );\n this._overrides = new Overrides(this.name, this.apiCall);\n this._synonyms = new Synonyms(this.name, this.apiCall);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async update(schema: CollectionUpdateSchema): Promise {\n return this.apiCall.patch(this.endpointPath(), schema);\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n async exists(): Promise {\n try {\n await this.retrieve();\n return true;\n } catch (e) {\n if (e instanceof ObjectNotFound) return false;\n throw e;\n }\n }\n\n documents(): Documents;\n documents(documentId: string): Document;\n documents(documentId?: string): Document | Documents {\n if (!documentId) {\n return this._documents;\n } else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document(\n this.name,\n documentId,\n this.apiCall,\n );\n }\n return this.individualDocuments[documentId];\n }\n }\n\n overrides(): Overrides;\n overrides(overrideId: string): Override;\n overrides(overrideId?: string): Overrides | Override {\n if (overrideId === undefined) {\n return this._overrides;\n } else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override(\n this.name,\n overrideId,\n this.apiCall,\n );\n }\n return this.individualOverrides[overrideId];\n }\n }\n\n synonyms(): Synonyms;\n synonyms(synonymId: string): Synonym;\n synonyms(synonymId?: string): Synonyms | Synonym {\n if (synonymId === undefined) {\n return this._synonyms;\n } else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym(\n this.name,\n synonymId,\n this.apiCall,\n );\n }\n return this.individualSynonyms[synonymId];\n }\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.name}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport { CollectionFieldSchema, CollectionSchema } from \"./Collection\";\n\nexport interface CollectionCreateSchema {\n name: string;\n default_sorting_field?: string;\n fields?: CollectionFieldSchema[];\n symbols_to_index?: string[];\n token_separators?: string[];\n enable_nested_fields?: boolean;\n metadata?: object;\n voice_query_model?: {\n model_name?: string;\n };\n}\n\nexport interface CollectionCreateOptions {\n src_name?: string;\n}\n\nconst RESOURCEPATH = \"/collections\";\n\nexport default class Collections {\n constructor(private apiCall: ApiCall) {}\n\n async create(\n schema: CollectionCreateSchema,\n options: CollectionCreateOptions = {},\n ): Promise {\n return this.apiCall.post(RESOURCEPATH, schema, options);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import * as logger from \"loglevel\";\nimport { Logger, LogLevelDesc } from \"loglevel\";\nimport { MissingConfigurationError } from \"./Errors\";\nimport type { Agent as HTTPAgent } from \"http\";\nimport type { Agent as HTTPSAgent } from \"https\";\n\nexport interface NodeConfiguration {\n host: string;\n port: number;\n protocol: string;\n path?: string;\n url?: string;\n}\n\nexport interface NodeConfigurationWithHostname {\n host: string;\n port: number;\n protocol: string;\n path?: string;\n}\n\nexport interface NodeConfigurationWithUrl {\n url: string;\n}\n\nexport interface ConfigurationOptions {\n apiKey: string;\n nodes:\n | NodeConfiguration[]\n | NodeConfigurationWithHostname[]\n | NodeConfigurationWithUrl[];\n randomizeNodes?: boolean;\n /**\n * @deprecated\n * masterNode is now consolidated to nodes, starting with Typesense Server v0.12'\n */\n masterNode?:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl;\n /**\n * @deprecated\n * readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12'\n */\n readReplicaNodes?:\n | NodeConfiguration[]\n | NodeConfigurationWithHostname[]\n | NodeConfigurationWithUrl[];\n nearestNode?:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl;\n connectionTimeoutSeconds?: number;\n timeoutSeconds?: number;\n healthcheckIntervalSeconds?: number;\n numRetries?: number;\n retryIntervalSeconds?: number;\n sendApiKeyAsQueryParam?: boolean | undefined;\n useServerSideSearchCache?: boolean;\n cacheSearchResultsForSeconds?: number;\n additionalHeaders?: Record;\n\n logLevel?: LogLevelDesc;\n logger?: Logger;\n\n /**\n * Set a custom HTTP Agent\n *\n * This is helpful for eg, to enable keepAlive which helps prevents ECONNRESET socket hang up errors\n * Usage:\n * const { Agent: HTTPAgent } = require(\"http\");\n * ...\n * httpAgent: new HTTPAgent({ keepAlive: true }),\n * @type {HTTPAgent}\n */\n httpAgent?: HTTPAgent;\n\n /**\n * Set a custom HTTPS Agent\n *\n * This is helpful for eg, to enable keepAlive which helps prevents ECONNRESET socket hang up errors\n * Usage:\n * const { Agent: HTTPSAgent } = require(\"https\");\n * ...\n * httpsAgent: new HTTPSAgent({ keepAlive: true }),\n * @type {HTTPSAgent}\n */\n httpsAgent?: HTTPSAgent;\n\n /**\n * Set a custom paramsSerializer\n *\n * See axios documentation for more information on how to use this parameter: https://axios-http.com/docs/req_config\n * This is helpful for handling React Native issues like this: https://github.com/axios/axios/issues/6102#issuecomment-2085301397\n * @type {any}\n */\n paramsSerializer?: any;\n}\n\nexport default class Configuration {\n readonly nodes:\n | NodeConfiguration[]\n | NodeConfigurationWithHostname[]\n | NodeConfigurationWithUrl[];\n readonly nearestNode?:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl;\n readonly connectionTimeoutSeconds: number;\n readonly healthcheckIntervalSeconds: number;\n readonly numRetries: number;\n readonly retryIntervalSeconds: number;\n readonly apiKey: string;\n readonly sendApiKeyAsQueryParam?: boolean;\n readonly cacheSearchResultsForSeconds: number;\n readonly useServerSideSearchCache: boolean;\n readonly logger: Logger;\n readonly logLevel: LogLevelDesc;\n readonly additionalHeaders?: Record;\n readonly httpAgent?: HTTPAgent;\n readonly httpsAgent?: HTTPSAgent;\n readonly paramsSerializer?: any;\n\n constructor(options: ConfigurationOptions) {\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map((node) => this.setDefaultPathInNode(node))\n .map((node) => this.setDefaultPortInNode(node))\n .map((node) => ({ ...node })) as NodeConfiguration[]; // Make a deep copy\n\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || \"warn\";\n this.logger.setLevel(this.logLevel);\n\n this.additionalHeaders = options.additionalHeaders;\n\n this.httpAgent = options.httpAgent;\n this.httpsAgent = options.httpsAgent;\n\n this.paramsSerializer = options.paramsSerializer;\n\n this.showDeprecationWarnings(options);\n this.validate();\n }\n\n validate(): boolean {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new MissingConfigurationError(\n \"Ensure that nodes[].protocol, nodes[].host and nodes[].port are set\",\n );\n }\n\n if (\n this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)\n ) {\n throw new MissingConfigurationError(\n \"Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set\",\n );\n }\n\n if (this.apiKey == null) {\n throw new MissingConfigurationError(\"Ensure that apiKey is set\");\n }\n\n return true;\n }\n\n private validateNodes(): boolean {\n return this.nodes.some((node) => {\n return this.isNodeMissingAnyParameters(node);\n });\n }\n\n private isNodeMissingAnyParameters(\n node:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl,\n ): boolean {\n return (\n ![\"protocol\", \"host\", \"port\", \"path\"].every((key) => {\n return node.hasOwnProperty(key);\n }) && node[\"url\"] == null\n );\n }\n\n private setDefaultPathInNode(\n node:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined,\n ):\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined {\n if (node != null && !node.hasOwnProperty(\"path\")) {\n node[\"path\"] = \"\";\n }\n return node;\n }\n\n private setDefaultPortInNode(\n node:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined,\n ):\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined {\n if (\n node != null &&\n !node.hasOwnProperty(\"port\") &&\n node.hasOwnProperty(\"protocol\")\n ) {\n switch (node[\"protocol\"]) {\n case \"https\":\n node[\"port\"] = 443;\n break;\n case \"http\":\n node[\"port\"] = 80;\n break;\n }\n }\n return node;\n }\n\n private showDeprecationWarnings(options: ConfigurationOptions): void {\n if (options.timeoutSeconds) {\n this.logger.warn(\n \"Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds\",\n );\n }\n if (options.masterNode) {\n this.logger.warn(\n \"Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12\",\n );\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\n \"Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12\",\n );\n }\n }\n\n private shuffleArray(array) {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [array[i], array[j]] = [array[j], array[i]];\n }\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Conversations from \"./Conversations\";\n\nexport interface ConversationDeleteSchema {\n id: number;\n}\n\nexport interface ConversationUpdateSchema {\n ttl: number;\n}\n\nexport interface ConversationSchema {\n id: number;\n conversation: object[];\n last_updated: number;\n ttl: number;\n}\n\nexport default class Conversation {\n constructor(\n private id: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async update(\n params: ConversationUpdateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(),\n params,\n );\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Conversations.RESOURCEPATH}/${this.id}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport ConversationModels from \"./ConversationModels\";\n\nexport interface ConversationModelCreateSchema {\n model_name: string;\n api_key: string;\n system_prompt?: string;\n max_bytes: number;\n}\n\nexport interface ConversationModelDeleteSchema {\n id: string;\n}\n\nexport interface ConversationModelSchema extends ConversationModelCreateSchema {\n id: string;\n}\n\nexport default class ConversationModel {\n constructor(\n private id: string,\n private apiCall: ApiCall,\n ) {}\n\n async update(\n params: ConversationModelCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(\n this.endpointPath(),\n );\n }\n\n private endpointPath(): string {\n return `${ConversationModels.RESOURCEPATH}/${this.id}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport {\n ConversationModelCreateSchema,\n ConversationModelSchema,\n} from \"./ConversationModel\";\n\nconst RESOURCEPATH = \"/conversations/models\";\n\nexport default class ConversationModels {\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async create(\n params: ConversationModelCreateSchema,\n ): Promise {\n return this.apiCall.post(\n this.endpointPath(),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(\n this.endpointPath(),\n );\n }\n\n private endpointPath(operation?: string): string {\n return `${ConversationModels.RESOURCEPATH}${\n operation === undefined ? \"\" : \"/\" + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport ConversationModels from \"./ConversationModels\";\nimport ConversationModel from \"./ConversationModel\";\nimport { ConversationSchema } from \"./Conversation\";\n\nconst RESOURCEPATH = \"/conversations\";\n\nexport interface ConversationsRetrieveSchema {\n conversations: ConversationSchema[];\n}\n\nexport default class Conversations {\n private readonly _conversationsModels: ConversationModels;\n private readonly individualConversationModels: Record<\n string,\n ConversationModel\n > = {};\n\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n this._conversationsModels = new ConversationModels(this.apiCall);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n models(): ConversationModels;\n models(id: string): ConversationModel;\n models(id?: string): ConversationModels | ConversationModel {\n if (id === undefined) {\n return this._conversationsModels;\n } else {\n if (this.individualConversationModels[id] === undefined) {\n this.individualConversationModels[id] = new ConversationModel(\n id,\n this.apiCall,\n );\n }\n return this.individualConversationModels[id];\n }\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/debug\";\n\nexport interface DebugResponseSchema {\n state: number;\n version: string;\n}\n\nexport default class Debug {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport Documents, {\n DocumentSchema,\n DocumentWriteParameters,\n} from \"./Documents\";\n\nexport class Document {\n constructor(\n private collectionName: string,\n private documentId: string,\n private apiCall: ApiCall\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n async update(\n partialDocument: Partial,\n options: DocumentWriteParameters = {}\n ): Promise {\n return this.apiCall.patch(this.endpointPath(), partialDocument, options);\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${Documents.RESOURCEPATH}/${this.documentId}`;\n }\n}\n","import type { ReadStream } from \"fs\";\nimport ApiCall from \"./ApiCall\";\nimport Configuration from \"./Configuration\";\nimport { ImportError } from \"./Errors\";\nimport { SearchOnlyDocuments } from \"./SearchOnlyDocuments\";\n\n// Todo: use generic to extract filter_by values\nexport interface DeleteQuery {\n filter_by: string;\n batch_size?: number;\n ignore_not_found?: boolean;\n}\n\nexport interface DeleteResponse {\n num_deleted: number;\n}\n\ninterface ImportResponseSuccess {\n success: true;\n}\n\nexport interface ImportResponseFail {\n success: false;\n error: string;\n document: DocumentSchema;\n code: number;\n}\n\nexport type ImportResponse = ImportResponseSuccess | ImportResponseFail;\n\nexport type DocumentSchema = Record;\n\nexport interface SearchParamsWithPreset extends Partial {\n preset: string;\n}\n\ntype OperationMode = \"off\" | \"always\" | \"fallback\";\nexport interface SearchParams {\n // From https://typesense.org/docs/latest/api/documents.html#arguments\n q?: string;\n query_by?: string | string[];\n query_by_weights?: string | number[];\n prefix?: string | boolean | boolean[]; // default: true\n filter_by?: string;\n enable_lazy_filter?: boolean; // default: false\n sort_by?: string | string[]; // default: text match desc\n facet_by?: string | string[];\n max_facet_values?: number;\n facet_sample_threshold?: number;\n facet_sample_percent?: number;\n facet_query?: string;\n facet_query_num_typos?: number;\n facet_return_parent?: string;\n page?: number; // default: 1\n per_page?: number; // default: 10, max 250\n group_by?: string | string[];\n group_limit?: number; // default:\n group_missing_values?: boolean;\n include_fields?: string | string[];\n exclude_fields?: string | string[];\n highlight_fields?: string | string[]; // default: all queried fields\n highlight_full_fields?: string | string[]; // default: all fields\n highlight_affix_num_tokens?: number; // default: 4\n highlight_start_tag?: string; // default: \n highlight_end_tag?: string; // default: \n enable_highlight_v1?: boolean;\n snippet_threshold?: number; // default: 30\n num_typos?: string | number | number[]; // default: 2\n min_len_1typo?: number;\n min_len_2typo?: number;\n split_join_tokens?: OperationMode;\n exhaustive_search?: boolean;\n drop_tokens_threshold?: number; // default: 10\n typo_tokens_threshold?: number; // default: 100\n pinned_hits?: string | string[];\n hidden_hits?: string | string[];\n limit_hits?: number; // default: no limit\n pre_segmented_query?: boolean;\n enable_overrides?: boolean;\n prioritize_exact_match?: boolean; // default: true\n prioritize_token_position?: boolean;\n prioritize_num_matching_fields?: boolean;\n search_cutoff_ms?: number;\n use_cache?: boolean;\n max_candidates?: number;\n infix?: OperationMode | OperationMode[];\n preset?: string;\n text_match_type?: \"max_score\" | \"max_weight\";\n vector_query?: string;\n \"x-typesense-api-key\"?: string;\n \"x-typesense-user-id\"?: string;\n offset?: number;\n limit?: number;\n stopwords?: string;\n conversation?: boolean;\n conversation_model_id?: string;\n conversation_id?: string;\n voice_query?: string;\n}\n\ntype SearchResponseHighlightObject = {\n matched_tokens?: string[];\n snippet?: string;\n value?: string;\n};\n\nexport type SearchResponseHighlight = T extends string | number\n ? SearchResponseHighlightObject\n : {\n [TAttribute in keyof T]?: SearchResponseHighlight;\n };\n\nexport interface SearchResponseHit {\n curated?: true;\n highlights?: [\n {\n field: keyof T;\n snippet?: string;\n value?: string;\n snippets?: string[];\n indices?: number[];\n matched_tokens: string[][] | string[];\n },\n ];\n highlight: SearchResponseHighlight;\n document: T;\n text_match: number;\n text_match_info?: {\n best_field_score: string; // To prevent scores from being truncated by JSON spec\n best_field_weight: number;\n fields_matched: number;\n score: string; // To prevent scores from being truncated by JSON spec\n tokens_matched: number;\n };\n}\n\nexport interface SearchResponseFacetCountSchema {\n counts: {\n count: number;\n highlighted: string;\n value: string;\n }[];\n field_name: keyof T;\n stats: {\n avg?: number;\n max?: number;\n min?: number;\n sum?: number;\n };\n}\n\nexport interface SearchResponseRequestParams {\n collection_name?: string;\n q?: string;\n page?: number;\n per_page?: number;\n first_q?: string;\n voice_query?: {\n transcribed_query?: string;\n };\n}\n\n// Todo: we could infer whether this is a grouped response by adding the search params as a generic\nexport interface SearchResponse {\n facet_counts?: SearchResponseFacetCountSchema[];\n found: number;\n found_docs?: number;\n out_of: number;\n page: number;\n request_params: SearchResponseRequestParams;\n search_time_ms: number;\n search_cutoff?: boolean;\n hits?: SearchResponseHit[];\n grouped_hits?: {\n group_key: string[];\n hits: SearchResponseHit[];\n found?: number;\n }[];\n conversation?: {\n answer: string;\n conversation_history: {\n conversation: object[];\n id: string;\n last_updated: number;\n ttl: number;\n };\n conversation_id: string;\n query: string;\n };\n}\n\nexport interface DocumentWriteParameters {\n dirty_values?: \"coerce_or_reject\" | \"coerce_or_drop\" | \"drop\" | \"reject\";\n action?: \"create\" | \"update\" | \"upsert\" | \"emplace\";\n}\n\nexport interface UpdateByFilterParameters {\n filter_by?: string;\n}\n\nexport interface UpdateByFilterResponse {\n num_updated: number;\n}\n\nexport interface DocumentImportParameters extends DocumentWriteParameters {\n batch_size?: number;\n return_doc?: boolean;\n return_id?: boolean;\n}\n\nexport interface DocumentsExportParameters {\n filter_by?: string;\n include_fields?: string;\n exclude_fields?: string;\n}\n\nexport interface SearchableDocuments {\n search(\n searchParameters: SearchParams | SearchParamsWithPreset,\n options: SearchOptions,\n ): Promise>;\n clearCache(): void;\n}\n\nexport interface WriteableDocuments {\n create(document: T, options: DocumentWriteParameters): Promise;\n upsert(document: T, options: DocumentWriteParameters): Promise;\n update(document: T, options: DocumentWriteParameters): Promise;\n delete(query: DeleteQuery): Promise;\n import(\n documents: T[] | string,\n options: DocumentWriteParameters,\n ): Promise;\n export(options: DocumentsExportParameters): Promise;\n}\n\nexport interface SearchOptions {\n cacheSearchResultsForSeconds?: number;\n abortSignal?: AbortSignal | null;\n}\n\nexport default class Documents\n extends SearchOnlyDocuments\n implements WriteableDocuments\n{\n constructor(\n collectionName: string,\n apiCall: ApiCall,\n configuration: Configuration,\n ) {\n super(collectionName, apiCall, configuration);\n }\n\n async create(document: T, options: DocumentWriteParameters = {}): Promise {\n if (!document) throw new Error(\"No document provided\");\n return this.apiCall.post(this.endpointPath(), document, options);\n }\n\n async upsert(document: T, options: DocumentWriteParameters = {}): Promise {\n if (!document) throw new Error(\"No document provided\");\n return this.apiCall.post(\n this.endpointPath(),\n document,\n Object.assign({}, options, { action: \"upsert\" }),\n );\n }\n\n async update(\n document: T,\n options: UpdateByFilterParameters,\n ): Promise;\n async update(document: T, options: DocumentWriteParameters): Promise;\n async update(\n document: T,\n options: DocumentWriteParameters | UpdateByFilterParameters = {},\n ): Promise {\n if (!document) throw new Error(\"No document provided\");\n\n if (options[\"filter_by\"] != null) {\n return this.apiCall.patch(\n this.endpointPath(),\n document,\n Object.assign({}, options),\n );\n } else {\n return this.apiCall.post(\n this.endpointPath(),\n document,\n Object.assign({}, options, { action: \"update\" }),\n );\n }\n }\n\n async delete(\n query: DeleteQuery = {} as DeleteQuery,\n ): Promise {\n return this.apiCall.delete(this.endpointPath(), query);\n }\n\n async createMany(documents: T[], options: DocumentImportParameters = {}) {\n this.configuration.logger.warn(\n \"createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents\",\n );\n return this.import(documents, options);\n }\n\n /**\n * Import a set of documents in a batch.\n * @param {string|Array} documents - Can be a JSONL string of documents or an array of document objects.\n * @param options\n * @return {string|Array} Returns a JSONL string if the input was a JSONL string, otherwise it returns an array of results.\n */\n async import(\n documents: string,\n options?: DocumentImportParameters,\n ): Promise;\n async import(\n documents: T[],\n options?: DocumentImportParameters,\n ): Promise;\n async import(\n documents: T[] | string,\n options: DocumentImportParameters = {},\n ): Promise {\n let documentsInJSONLFormat;\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map((document) => JSON.stringify(document))\n .join(\"\\n\");\n } catch (error: any) {\n // if rangeerror, throw custom error message\n if (\n error instanceof RangeError &&\n error.message.includes(\"Too many properties to enumerate\")\n ) {\n throw new Error(`${error}\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\n\n Please try reducing the number of keys in your document, or using CURL to import your data.\n `);\n }\n\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n } else {\n documentsInJSONLFormat = documents;\n }\n\n const resultsInJSONLFormat = await this.apiCall.performRequest(\n \"post\",\n this.endpointPath(\"import\"),\n {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { \"Content-Type\": \"text/plain\" },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n enableKeepAlive: true, // This is to prevent ECONNRESET socket hang up errors. Reference: https://github.com/axios/axios/issues/2936#issuecomment-779439991\n },\n );\n\n if (Array.isArray(documents)) {\n const resultsInJSONFormat = resultsInJSONLFormat\n .split(\"\\n\")\n .map((r) => JSON.parse(r)) as ImportResponse[];\n const failedItems = resultsInJSONFormat.filter(\n (r) => r.success === false,\n );\n if (failedItems.length > 0) {\n throw new ImportError(\n `${\n resultsInJSONFormat.length - failedItems.length\n } documents imported successfully, ${\n failedItems.length\n } documents failed during import. Use \\`error.importResults\\` from the raised exception to get a detailed error reason for each document.`,\n resultsInJSONFormat,\n );\n } else {\n return resultsInJSONFormat;\n }\n } else {\n return resultsInJSONLFormat as string;\n }\n }\n\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n async export(options: DocumentsExportParameters = {}): Promise {\n return this.apiCall.get(this.endpointPath(\"export\"), options);\n }\n\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n async exportStream(\n options: DocumentsExportParameters = {},\n ): Promise {\n return this.apiCall.get(this.endpointPath(\"export\"), options, {\n responseType: \"stream\",\n });\n }\n}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class HTTPError extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\nimport { ImportResponseFail } from \"../Documents\";\n\nexport default class ImportError extends TypesenseError {\n importResults: ImportResponseFail;\n constructor(message, importResults) {\n super(message);\n this.importResults = importResults;\n }\n}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class MissingConfigurationError extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class ObjectAlreadyExists extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class ObjectNotFound extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class ObjectUnprocessable extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class RequestMalformed extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class RequestUnauthorized extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class ServerError extends TypesenseError {}\n","export default class TypesenseError extends Error {\n httpStatus?: number;\n\n // Source: https://stackoverflow.com/a/58417721/123545\n constructor(message?: string) {\n super(message);\n this.name = new.target.name;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n","import HTTPError from \"./HTTPError\";\nimport MissingConfigurationError from \"./MissingConfigurationError\";\nimport ObjectAlreadyExists from \"./ObjectAlreadyExists\";\nimport ObjectNotFound from \"./ObjectNotFound\";\nimport ObjectUnprocessable from \"./ObjectUnprocessable\";\nimport RequestMalformed from \"./RequestMalformed\";\nimport RequestUnauthorized from \"./RequestUnauthorized\";\nimport ServerError from \"./ServerError\";\nimport ImportError from \"./ImportError\";\nimport TypesenseError from \"./TypesenseError\";\n\nexport {\n HTTPError,\n MissingConfigurationError,\n ObjectAlreadyExists,\n ObjectNotFound,\n ObjectUnprocessable,\n RequestMalformed,\n RequestUnauthorized,\n ServerError,\n TypesenseError,\n ImportError,\n};\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/health\";\n\nexport interface HealthResponse {\n ok: boolean;\n}\n\nexport default class Health {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Keys from \"./Keys\";\n\nexport interface KeyCreateSchema {\n actions: string[];\n collections: string[];\n description?: string;\n value?: string;\n value_prefix?: string;\n expires_at?: number;\n}\n\nexport interface KeyDeleteSchema {\n id: number;\n}\n\nexport interface KeySchema extends KeyCreateSchema {\n id: number;\n}\n\nexport default class Key {\n constructor(private id: number, private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Keys.RESOURCEPATH}/${this.id}`;\n }\n}\n","import { createHmac } from \"crypto\";\nimport ApiCall from \"./ApiCall\";\nimport { KeyCreateSchema, KeySchema } from \"./Key\";\nimport { SearchParams } from \"./Documents\";\n\nconst RESOURCEPATH = \"/keys\";\n\nexport interface KeysRetrieveSchema {\n keys: KeySchema[];\n}\n\nexport interface GenerateScopedSearchKeyParams extends Partial {\n expires_at?: number;\n cache_ttl?: number;\n limit_multi_searches?: number;\n}\n\nexport default class Keys {\n constructor(private apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async create(params: KeyCreateSchema): Promise {\n return this.apiCall.post(Keys.RESOURCEPATH, params);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n generateScopedSearchKey(\n searchKey: string,\n parameters: GenerateScopedSearchKeyParams\n ): string {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n const paramsJSON = JSON.stringify(parameters);\n const digest = Buffer.from(\n createHmac(\"sha256\", searchKey).update(paramsJSON).digest(\"base64\")\n );\n const keyPrefix = searchKey.substr(0, 4);\n const rawScopedKey = `${digest}${keyPrefix}${paramsJSON}`;\n\n return Buffer.from(rawScopedKey).toString(\"base64\");\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/metrics.json\";\n\nexport interface MetricsResponse {\n [key: `system_cpu${number}_active_percentage`]: string;\n system_cpu_active_percentage: string;\n system_disk_total_bytes: string;\n system_disk_used_bytes: string;\n system_memory_total_bytes: string;\n system_memory_total_swap_bytes?: string;\n system_memory_used_bytes: string;\n system_memory_used_swap_bytes?: string;\n system_network_received_bytes: string;\n system_network_sent_bytes: string;\n typesense_memory_active_bytes: string;\n typesense_memory_allocated_bytes: string;\n typesense_memory_fragmentation_ratio: string;\n typesense_memory_mapped_bytes: string;\n typesense_memory_metadata_bytes: string;\n typesense_memory_resident_bytes: string;\n typesense_memory_retained_bytes: string;\n}\n\nexport default class Metrics {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Configuration from \"./Configuration\";\nimport RequestWithCache from \"./RequestWithCache\";\nimport {\n DocumentSchema,\n SearchParams,\n SearchParamsWithPreset,\n SearchResponse,\n} from \"./Documents\";\n\nconst RESOURCEPATH = \"/multi_search\";\n\nexport interface MultiSearchRequestSchema extends SearchParams {\n collection?: string;\n \"x-typesense-api-key\"?: string;\n}\n\nexport interface MultiSearchRequestWithPresetSchema\n extends SearchParamsWithPreset {\n collection?: string;\n \"x-typesense-api-key\"?: string;\n}\n\nexport interface MultiSearchRequestsSchema {\n searches: (MultiSearchRequestSchema | MultiSearchRequestWithPresetSchema)[];\n}\n\nexport interface MultiSearchResponse {\n results: { [Index in keyof T]: SearchResponse } & {\n length: T[\"length\"];\n };\n}\n\nexport default class MultiSearch {\n private requestWithCache: RequestWithCache;\n\n constructor(\n private apiCall: ApiCall,\n private configuration: Configuration,\n private useTextContentType: boolean = false\n ) {\n this.requestWithCache = new RequestWithCache();\n }\n\n clearCache() {\n this.requestWithCache.clearCache();\n }\n\n async perform(\n searchRequests: MultiSearchRequestsSchema,\n commonParams: Partial = {},\n {\n cacheSearchResultsForSeconds = this.configuration\n .cacheSearchResultsForSeconds,\n }: { cacheSearchResultsForSeconds?: number } = {}\n ): Promise> {\n const additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders[\"content-type\"] = \"text/plain\";\n }\n\n const additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n const queryParams = Object.assign({}, commonParams, additionalQueryParams);\n\n return this.requestWithCache.perform(\n this.apiCall,\n this.apiCall.post,\n [RESOURCEPATH, searchRequests, queryParams, additionalHeaders],\n { cacheResponseForSeconds: cacheSearchResultsForSeconds }\n ) as Promise>;\n }\n}\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/operations\";\n\nexport default class Operations {\n constructor(private apiCall: ApiCall) {}\n\n async perform(\n operationName: \"vote\" | \"snapshot\" | \"cache/clear\" | string,\n queryParameters: Record = {}\n ): Promise {\n return this.apiCall.post(\n `${RESOURCEPATH}/${operationName}`,\n {},\n queryParameters\n );\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport Overrides, { OverrideCreateSchema } from \"./Overrides\";\n\nexport interface OverrideSchema extends OverrideCreateSchema {\n id: string;\n}\n\nexport interface OverrideDeleteSchema {\n id: string;\n}\n\nexport default class Override {\n constructor(\n private collectionName: string,\n private overrideId: string,\n private apiCall: ApiCall\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${Overrides.RESOURCEPATH}/${this.overrideId}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport { OverrideSchema } from \"./Override\";\n\nconst RESOURCEPATH = \"/overrides\";\n\nexport interface OverrideRuleQuerySchema {\n query?: string;\n match?: \"exact\" | \"contains\";\n}\n\nexport interface OverrideRuleFilterSchema {\n filter_by?: string;\n}\n\nexport interface OverrideRuleTagsSchema {\n tags?: string[];\n}\n\nexport interface OverrideCreateSchema {\n rule: OverrideRuleQuerySchema &\n OverrideRuleFilterSchema &\n OverrideRuleTagsSchema;\n filter_by?: string;\n sort_by?: string;\n remove_matched_tokens?: boolean;\n replace_query?: string;\n includes?: Array<{\n id: string;\n position: number;\n }>;\n excludes?: Array<{ id: string }>;\n filter_curated_hits?: boolean;\n effective_from_ts?: number;\n effective_to_ts?: number;\n stop_processing?: boolean;\n metadata?: object;\n}\n\nexport interface OverridesRetrieveSchema {\n overrides: OverrideSchema[];\n}\n\nexport default class Overrides {\n constructor(\n private collectionName: string,\n private apiCall: ApiCall,\n ) {}\n\n async upsert(\n overrideId: string,\n params: OverrideCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(overrideId),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${\n Overrides.RESOURCEPATH\n }${operation === undefined ? \"\" : \"/\" + operation}`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Presets, { PresetCreateSchema } from \"./Presets\";\n\nexport interface PresetSchema extends PresetCreateSchema {\n name: string;\n}\n\nexport interface PresetDeleteSchema {\n name: string;\n}\n\nexport default class Preset {\n constructor(private presetId: string, private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Presets.RESOURCEPATH}/${this.presetId}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport { PresetSchema } from \"./Preset\";\nimport { SearchParams } from \"./Documents\";\nimport { MultiSearchRequestsSchema } from \"./MultiSearch\";\n\nconst RESOURCEPATH = \"/presets\";\n\nexport interface PresetCreateSchema {\n value: SearchParams | MultiSearchRequestsSchema;\n}\n\nexport interface PresetsRetrieveSchema {\n presets: PresetSchema[];\n}\n\nexport default class Presets {\n constructor(private apiCall: ApiCall) {}\n\n async upsert(\n presetId: string,\n params: PresetCreateSchema\n ): Promise {\n return this.apiCall.put(this.endpointPath(presetId), params);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${Presets.RESOURCEPATH}${\n operation === undefined ? \"\" : \"/\" + operation\n }`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","const defaultCacheResponseForSeconds = 2 * 60;\nconst defaultMaxSize = 100;\n\nexport default class RequestWithCache {\n private responseCache: Map = new Map();\n private responsePromiseCache: Map = new Map();\n\n clearCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n async perform(\n requestContext: any,\n requestFunction: (...params: any) => unknown,\n requestFunctionArguments: any[],\n cacheOptions: CacheOptions\n ): Promise {\n const {\n cacheResponseForSeconds = defaultCacheResponseForSeconds,\n maxSize = defaultMaxSize,\n } = cacheOptions;\n const isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n\n if (isCacheDisabled) {\n return requestFunction.call(requestContext, ...requestFunctionArguments);\n }\n\n const requestFunctionArgumentsJSON = JSON.stringify(\n requestFunctionArguments\n );\n const cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n const now = Date.now();\n\n if (cacheEntry) {\n const isEntryValid =\n now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return Promise.resolve(cacheEntry.response);\n } else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n\n const cachePromiseEntry = this.responsePromiseCache.get(\n requestFunctionArgumentsJSON\n );\n\n if (cachePromiseEntry) {\n const isEntryValid =\n now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(\n requestFunctionArgumentsJSON,\n cachePromiseEntry\n );\n return cachePromiseEntry.responsePromise;\n } else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n\n const responsePromise = requestFunction.call(\n requestContext,\n ...requestFunctionArguments\n );\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise,\n });\n\n const response = await responsePromise;\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response,\n });\n\n const isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n const oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n const isResponsePromiseCacheOverMaxSize =\n this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n const oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return response as T;\n }\n}\n\ninterface CacheOptions {\n cacheResponseForSeconds?: number;\n maxSize?: number;\n}\n","import Configuration, { ConfigurationOptions } from \"./Configuration\";\nimport ApiCall from \"./ApiCall\";\nimport MultiSearch from \"./MultiSearch\";\nimport { DocumentSchema } from \"./Documents\";\nimport { SearchOnlyCollection } from \"./SearchOnlyCollection\";\n\nexport default class SearchClient {\n public readonly multiSearch: MultiSearch;\n private readonly configuration: Configuration;\n private readonly apiCall: ApiCall;\n private readonly individualCollections: Record;\n\n constructor(options: ConfigurationOptions) {\n options.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam ?? true;\n if (\n options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || \"\").length > 2000\n ) {\n console.warn(\n \"[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.\"\n );\n options.sendApiKeyAsQueryParam = false;\n }\n\n this.configuration = new Configuration(options);\n this.apiCall = new ApiCall(this.configuration);\n this.multiSearch = new MultiSearch(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n\n clearCache() {\n this.multiSearch.clearCache();\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(([_, collection]) => {\n collection.documents().clearCache();\n });\n }\n\n collections(\n collectionName: string\n ): SearchOnlyCollection | SearchOnlyCollection {\n if (!collectionName) {\n throw new Error(\n \"Typesense.SearchClient only supports search operations, so the collectionName that needs to \" +\n \"be searched must be specified. Use Typesense.Client if you need to access the collection object.\"\n );\n } else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection(\n collectionName,\n this.apiCall,\n this.configuration\n );\n }\n return this.individualCollections[collectionName];\n }\n }\n}\n","import { DocumentSchema, SearchableDocuments } from \"./Documents\";\nimport ApiCall from \"./ApiCall\";\nimport { SearchOnlyDocuments } from \"./SearchOnlyDocuments\";\n\nexport class SearchOnlyCollection {\n private readonly _documents: SearchableDocuments;\n\n constructor(\n private readonly name: string,\n private readonly apiCall: ApiCall,\n private readonly configuration: any\n ) {\n this._documents = new SearchOnlyDocuments(\n this.name,\n this.apiCall,\n this.configuration\n );\n }\n\n documents(): SearchableDocuments {\n return this._documents;\n }\n}\n","import RequestWithCache from \"./RequestWithCache\";\nimport ApiCall from \"./ApiCall\";\nimport Configuration from \"./Configuration\";\nimport Collections from \"./Collections\";\nimport type {\n DocumentSchema,\n SearchableDocuments,\n SearchOptions,\n SearchParams,\n SearchParamsWithPreset,\n SearchResponse,\n} from \"./Documents\";\n\nconst RESOURCEPATH = \"/documents\";\n\nexport class SearchOnlyDocuments\n implements SearchableDocuments\n{\n protected requestWithCache: RequestWithCache = new RequestWithCache();\n\n constructor(\n protected collectionName: string,\n protected apiCall: ApiCall,\n protected configuration: Configuration\n ) {}\n\n clearCache() {\n this.requestWithCache.clearCache();\n }\n\n async search(\n searchParameters: SearchParams | SearchParamsWithPreset,\n {\n cacheSearchResultsForSeconds = this.configuration\n .cacheSearchResultsForSeconds,\n abortSignal = null,\n }: SearchOptions = {}\n ): Promise> {\n const additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n for (const key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(\",\");\n }\n }\n const queryParams = Object.assign(\n {},\n searchParameters,\n additionalQueryParams\n );\n\n return this.requestWithCache.perform(\n this.apiCall,\n this.apiCall.get,\n [this.endpointPath(\"search\"), queryParams, { abortSignal }],\n {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n }\n ) as Promise>;\n }\n\n protected endpointPath(operation?: string) {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${RESOURCEPATH}${\n operation === undefined ? \"\" : \"/\" + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/stats.json\";\n\nexport interface EndpointStats {\n [endpoint: string]: number;\n}\n\nexport interface StatsResponse {\n delete_latency_ms?: number;\n delete_requests_per_second?: number;\n import_latency_ms?: number;\n import_requests_per_second?: number;\n latency_ms?: EndpointStats;\n overloaded_requests_per_second?: number;\n pending_write_batches?: number;\n requests_per_second?: EndpointStats;\n search_latency_ms?: number;\n search_requests_per_second?: number;\n total_requests_per_second?: number;\n write_latency_ms?: number;\n write_requests_per_second?: number;\n}\n\nexport default class Metrics {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Stopwords, { StopwordCreateSchema } from \"./Stopwords\";\n\nexport interface StopwordSchema extends StopwordCreateSchema {\n id: string;\n stopwords: string[];\n locale?: string;\n}\n\nexport interface StopwordDeleteSchema {\n id: string;\n}\n\nexport default class Stopword {\n constructor(\n private stopwordId: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Stopwords.RESOURCEPATH}/${this.stopwordId}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport { StopwordSchema } from \"./Stopword\";\n\nconst RESOURCEPATH = \"/stopwords\";\n\nexport interface StopwordCreateSchema {\n stopwords: string[];\n locale?: string;\n}\n\nexport interface StopwordsRetrieveSchema {\n stopwords: StopwordSchema[];\n}\n\nexport default class Stopwords {\n constructor(private apiCall: ApiCall) {}\n\n async upsert(\n stopwordId: string,\n params: StopwordCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(stopwordId),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${Stopwords.RESOURCEPATH}${\n operation === undefined ? \"\" : \"/\" + operation\n }`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport Synonyms, { SynonymCreateSchema } from \"./Synonyms\";\n\nexport interface SynonymSchema extends SynonymCreateSchema {\n id: string;\n}\n\nexport interface SynonymDeleteSchema {\n id: string;\n}\n\nexport default class Synonym {\n constructor(\n private collectionName: string,\n private synonymId: string,\n private apiCall: ApiCall\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${Synonyms.RESOURCEPATH}/${this.synonymId}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport { SynonymSchema } from \"./Synonym\";\n\nconst RESOURCEPATH = \"/synonyms\";\n\nexport interface SynonymCreateSchema {\n synonyms: string[];\n root?: string;\n locale?: string;\n symbols_to_index?: string[];\n}\n\nexport interface SynonymsRetrieveSchema {\n synonyms: SynonymSchema[];\n}\n\nexport default class Synonyms {\n constructor(private collectionName: string, private apiCall: ApiCall) {}\n\n async upsert(\n synonymId: string,\n params: SynonymCreateSchema\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(synonymId),\n params\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string) {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${\n Synonyms.RESOURCEPATH\n }${operation === undefined ? \"\" : \"/\" + operation}`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n var _loggersByName = {};\n var defaultLogger = null;\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods() {\n /*jshint validthis:true */\n var level = this.getLevel();\n\n // Replace the actual methods.\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, this.name);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n\n // Return any important warnings.\n if (typeof console === undefinedType && level < this.levels.SILENT) {\n return \"No console available for logging\";\n }\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, _level, _loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, factory) {\n // Private instance variables.\n var self = this;\n /**\n * The level inherited from a parent logger (or a global default). We\n * cache this here rather than delegating to the parent so that it stays\n * in sync with the actual logging methods that we have installed (the\n * parent could change levels but we might not have rebuilt the loggers\n * in this child yet).\n * @type {number}\n */\n var inheritedLevel;\n /**\n * The default level for this logger, if any. If set, this overrides\n * `inheritedLevel`.\n * @type {number|null}\n */\n var defaultLevel;\n /**\n * A user-specific level for this logger. If set, this overrides\n * `defaultLevel`.\n * @type {number|null}\n */\n var userLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var cookieName = encodeURIComponent(storageKey);\n var location = cookie.indexOf(cookieName + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(\n cookie.slice(location + cookieName.length + 1)\n )[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n function normalizeLevel(input) {\n var level = input;\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n return level;\n } else {\n throw new TypeError(\"log.setLevel() called with invalid level: \" + input);\n }\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n if (userLevel != null) {\n return userLevel;\n } else if (defaultLevel != null) {\n return defaultLevel;\n } else {\n return inheritedLevel;\n }\n };\n\n self.setLevel = function (level, persist) {\n userLevel = normalizeLevel(level);\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(userLevel);\n }\n\n // NOTE: in v2, this should call rebuild(), which updates children.\n return replaceLoggingMethods.call(self);\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = normalizeLevel(level);\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n userLevel = null;\n clearPersistedLevel();\n replaceLoggingMethods.call(self);\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n self.rebuild = function () {\n if (defaultLogger !== self) {\n inheritedLevel = normalizeLevel(defaultLogger.getLevel());\n }\n replaceLoggingMethods.call(self);\n\n if (defaultLogger === self) {\n for (var childName in _loggersByName) {\n _loggersByName[childName].rebuild();\n }\n }\n };\n\n // Initialize all the internal levels.\n inheritedLevel = normalizeLevel(\n defaultLogger ? defaultLogger.getLevel() : \"WARN\"\n );\n var initialLevel = getPersistedLevel();\n if (initialLevel != null) {\n userLevel = normalizeLevel(initialLevel);\n }\n replaceLoggingMethods.call(self);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n defaultLogger = new Logger();\n\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name,\n defaultLogger.methodFactory\n );\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","/* (ignored) */","/* (ignored) */","/* (ignored) */","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(t, e, r) {\n if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);\n var o = [null];\n o.push.apply(o, e);\n var p = new (t.bind.apply(t, o))();\n return r && setPrototypeOf(p, r.prototype), p;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","export default function _isNativeFunction(fn) {\n try {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n } catch (e) {\n return typeof fn === \"function\";\n }\n}","export default function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : String(i);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","export const VERSION = \"1.6.7\";","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import Client from \"./Typesense/Client\";\nimport SearchClient from \"./Typesense/SearchClient\";\nimport * as Errors from \"./Typesense/Errors\";\n\nexport { Client, SearchClient, Errors };\nexport default { Client, SearchClient, Errors };\n"],"names":["Aliases","Alias","name","apiCall","_classCallCheck","_createClass","key","value","_retrieve","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_callee$","_context","prev","next","abrupt","get","endpointPath","stop","retrieve","apply","arguments","_delete2","_callee2","_callee2$","_context2","delete","_delete","concat","RESOURCEPATH","default","_upsert","mapping","put","upsert","_x","_x2","aliasName","AnalyticsRules","AnalyticsRule","AnalyticsEvents","Analytics","_defineProperty","_analyticsRules","_analyticsEvents","rules","id","undefined","individualAnalyticsRules","events","_create","params","post","create","operation","axios","HTTPError","ObjectAlreadyExists","ObjectNotFound","ObjectUnprocessable","RequestMalformed","RequestUnauthorized","ServerError","TypesenseError","Agent","HTTPAgent","HTTPSAgent","APIKEYHEADERNAME","HEALTHY","UNHEALTHY","ApiCall","configuration","apiKey","nodes","JSON","parse","stringify","nearestNode","connectionTimeoutSeconds","healthcheckIntervalSeconds","numRetriesPerRequest","numRetries","retryIntervalSeconds","sendApiKeyAsQueryParam","additionalUserHeaders","additionalHeaders","logger","initializeMetadataForNodes","currentNodeIndex","_get","endpoint","queryParameters","_ref","_ref$abortSignal","abortSignal","_ref$responseType","responseType","_args","length","performRequest","_args2","_post","_callee3","bodyParameters","_args3","_callee3$","_context3","_x3","_put","_callee4","_args4","_callee4$","_context4","_x4","_patch","_callee5","_args5","_callee5$","_context5","patch","_x5","_performRequest","_callee6","requestType","_ref2","_this","_ref2$queryParameters","_ref2$bodyParameters","_ref2$additionalHeade","_ref2$abortSignal","_ref2$responseType","_ref2$skipConnectionT","skipConnectionTimeout","_ref2$enableKeepAlive","enableKeepAlive","requestNumber","lastException","_loop","_ret","numTries","_callee6$","_context7","validate","Date","now","debug","toUpperCase","node","abortListener","requestOptions","cancelToken","source","response","_response$data","_response$data2","_error$response","_loop$","_context6","getNextNode","index","aborted","v","Promise","reject","Error","method","url","uriFor","headers","Object","assign","defaultHeaders","maxContentLength","Infinity","maxBodyLength","validateStatus","status","transformResponse","data","transformedData","startsWith","timeout","keys","httpAgent","keepAlive","httpsAgent","paramsSerializer","_typeof","CancelToken","cancel","addEventListener","token","sent","setNodeHealthcheck","resolve","customErrorForResponse","message","t0","warn","code","timer","removeEventListener","finish","delegateYield","_x6","_x7","_x8","isHealthy","nodeDueForHealthcheck","map","join","candidateNode","i","isDueForHealthcheck","lastAccessTimestamp","_this2","forEach","protocol","host","port","path","_timer","_callee7","seconds","_callee7$","_context8","setTimeout","_x9","messageFromServer","errorMessage","trim","error","httpStatus","Configuration","Collections","Collection","Keys","Key","Debug","Metrics","Stats","Health","Operations","MultiSearch","Presets","Preset","Stopwords","Stopword","Conversations","Conversation","Client","options","_options$sendApiKeyAs","metrics","stats","health","operations","multiSearch","_collections","individualCollections","_aliases","individualAliases","_keys","individualKeys","_presets","individualPresets","_stopwords","individualStopwords","analytics","_conversations","individualConversations","collections","collectionName","aliases","presets","stopwords","conversations","Documents","Overrides","Override","Synonyms","Synonym","Document","_documents","_overrides","_synonyms","_update","schema","update","_exists","exists","documents","documentId","individualDocuments","overrides","overrideId","individualOverrides","synonyms","synonymId","individualSynonyms","MissingConfigurationError","setDefaultPathInNode","setDefaultPortInNode","_objectSpread","randomizeNodes","shuffleArray","timeoutSeconds","cacheSearchResultsForSeconds","useServerSideSearchCache","logLevel","setLevel","showDeprecationWarnings","validateNodes","isNodeMissingAnyParameters","some","every","hasOwnProperty","masterNode","readReplicaNodes","array","j","Math","floor","random","ConversationModels","ConversationModel","_conversationsModels","models","individualConversationModels","partialDocument","ImportError","SearchOnlyDocuments","_inherits","_callSuper","document","action","query","_createMany","import","createMany","_import2","documentsInJSONLFormat","resultsInJSONLFormat","resultsInJSONFormat","failedItems","_args6","Array","isArray","RangeError","includes","split","r","filter","success","_import","_export2","_args7","_export","_exportStream","_callee8","_args8","_callee8$","exportStream","_TypesenseError","importResults","_Error","constructor","setPrototypeOf","_assertThisInitialized","prototype","_wrapNativeSuper","createHmac","generateScopedSearchKey","searchKey","parameters","paramsJSON","digest","Buffer","from","keyPrefix","substr","rawScopedKey","toString","RequestWithCache","useTextContentType","requestWithCache","clearCache","_perform","searchRequests","commonParams","_ref$cacheSearchResul","additionalQueryParams","queryParams","perform","cacheResponseForSeconds","operationName","presetId","defaultCacheResponseForSeconds","defaultMaxSize","Map","responseCache","responsePromiseCache","requestContext","requestFunction","requestFunctionArguments","cacheOptions","_cacheOptions$cacheRe","_cacheOptions$maxSize","maxSize","isCacheDisabled","requestFunctionArgumentsJSON","cacheEntry","isEntryValid","cachePromiseEntry","_isEntryValid","responsePromise","isCacheOverMaxSize","oldestEntry","isResponsePromiseCacheOverMaxSize","_oldestEntry","call","_toConsumableArray","requestTimestamp","set","size","SearchOnlyCollection","SearchClient","console","entries","_slicedToArray","_","collection","_search","searchParameters","search","stopwordId","Errors"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"typesense.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAA2D;AAAA,IAGtCC,KAAK;EACxB,SAAAA,MACUC,IAAY,EACZC,OAAgB,EACxB;IAAAC,iFAAA,OAAAH,KAAA;IAAA,KAFQC,IAAY,GAAZA,IAAY;IAAA,KACZC,OAAgB,GAAhBA,OAAgB;EACvB;EAACE,8EAAA,CAAAJ,KAAA;IAAAK,GAAA;IAAAC,KAAA;MAAA,IAAAC,SAAA,GAAAC,mFAAA,eAAAC,sEAAA,CAEJ,SAAAE,QAAA;QAAA,OAAAF,sEAAA,UAAAI,SAAAC,QAAA;UAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;YAAA;cAAA,OAAAF,QAAA,CAAAG,MAAA,WACS,IAAI,CAACf,OAAO,CAACgB,GAAG,CAAwB,IAAI,CAACC,YAAY,CAAC,CAAC,CAAC;YAAA;YAAA;cAAA,OAAAL,QAAA,CAAAM,IAAA;UAAA;QAAA,GAAAT,OAAA;MAAA,CACpE;MAAA,SAAAU,SAAA;QAAA,OAAAd,SAAA,CAAAe,KAAA,OAAAC,SAAA;MAAA;MAAA,OAAAF,QAAA;IAAA;EAAA;IAAAhB,GAAA;IAAAC,KAAA;MAAA,IAAAkB,QAAA,GAAAhB,mFAAA,eAAAC,sEAAA,CAED,SAAAgB,SAAA;QAAA,OAAAhB,sEAAA,UAAAiB,UAAAC,SAAA;UAAA,kBAAAA,SAAA,CAAAZ,IAAA,GAAAY,SAAA,CAAAX,IAAA;YAAA;cAAA,OAAAW,SAAA,CAAAV,MAAA,WACS,IAAI,CAACf,OAAO,CAAC0B,MAAM,CAAwB,IAAI,CAACT,YAAY,CAAC,CAAC,CAA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ACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,uBAAuB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qEAAqE;AACrE,YAAY;AACZ;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAY;;AAEZ;AACA;AACA;AACA,qDAAqD;AACrD,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,sBAAsB;AACtB;;AAEA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;;AAEA;AACA;AACA,oCAAoC;AACpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,CAAC;;;;;;;;;;;ACpWD;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA,cAAc,sGAAiC;AAC/C;AACA,gBAAgB;AAChB;AACA;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,KAAK;AACL,iDAAiD;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,aAAa;AACb,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA,KAAK;AACL;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA,sCAAsC,yBAAyB,SAAS,yBAAyB;;;;;;;;;;AC/SjG;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA,GAAG,EAAE,yBAAyB,SAAS,yBAAyB;AAChE;AACA,0BAA0B,yBAAyB,SAAS,yBAAyB;;;;;;;;;;ACTrF;;AAEA,cAAc,mBAAO,CAAC,kGAA+B;AACrD;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;;ACde;AACf;AACA,yCAAyC,SAAS;AAClD;AACA;;;;;;;;;;;;;;;ACJe;AACf;AACA;;;;;;;;;;;;;;;;ACFqD;AACtC;AACf,iCAAiC,gEAAgB;AACjD;;;;;;;;;;;;;;;ACHe;AACf;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;AC7Be;AACf;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACJiD;AACoB;AACtD;AACf,MAAM,wEAAwB;AAC9B;AACA;AACA;AACA,cAAc,8DAAc;AAC5B;;;;;;;;;;;;;;;;ACR+C;AAC/C;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA,kCAAkC,6DAAa;AAC/C;AACA;AACe;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;;;;;ACjB+C;AAChC;AACf,QAAQ,6DAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;;;;;;;;;;;;;;;ACde;AACf;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACLiD;AAClC;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH,kBAAkB,8DAAc;AAChC;;;;;;;;;;;;;;;AChBe;AACf;AACA;AACA,IAAI;AACJ;AACA;AACA;;;;;;;;;;;;;;;ACNe;AACf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;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,kEAAa;;AAElC,8CAA8C,gEAAQ;;AAEtD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8BAA8B,6DAAY;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAM,2DAAM;AACZ;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,2DAAU,oBAAoB,2DAAU;;AAEzD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,2DAAU,kBAAkB,2DAAU;;AAEvD;AACA;AACA;;AAEA;AACA;AACA;AACA,kDAAkD,iEAAoB;AACtE;AACA;AACA;AACA,iBAAiB,2DAAU;AAC3B;AACA,2CAA2C,2DAAU,aAAa,2DAAU;AAC5E;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,0DAAQ;AACf,uBAAuB,iDAAK;;AAE5B,uDAAuD,uEAAe;AACtE;AACA,4EAA4E,4DAAO;;AAEnF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM,iDAAK;AACX;AACA,OAAO;AACP;;AAEA;AACA,SAAS,iDAAK;AACd;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,iEAAa;AACzD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,sEAAa;;AAElC,oBAAoB,0DAAQ;AAC5B,iBAAiB,2DAAU,2CAA2C,2DAAU;AAChF;AACA;;;AAGA;AACA;AACA,GAAG;AACH,CAAC;;;;;;;;;;;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A;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA,iEAAe,WAAW,EAAC;;;;;;;;;;;;;;;;;;ACxHd;;AAEkC;AACf;;AAEhC;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA,aAAa,eAAe;AAC5B;AACA;AACA;AACA,EAAE,2DAAU,oDAAoD,2DAAU;AAC1E;AACA;;AAEA,iDAAK,yBAAyB,2DAAU;AACxC;AACA,CAAC;;AAED,iEAAe,aAAa,EAAC;;;;;;;;;;;;;;;;ACxBhB;;AAEE;AACf;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACJa;;AAEqB;AACY;AACW;AACN;AACR;AACI;AACC;AACH;;AAE7C,mBAAmB,6DAAS;;AAE5B;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,mBAAmB,8DAAkB;AACrC,oBAAoB,8DAAkB;AACtC;AACA;;AAEA;AACA;AACA;AACA,aAAa,eAAe;AAC5B,aAAa,SAAS;AACtB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,oEAAoE;;AAEpE;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,aAAa,2DAAW;;AAExB,WAAW,yCAAyC;;AAEpD;AACA,MAAM,6DAAS;AACf;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA,UAAU,iDAAK;AACf;AACA;AACA;AACA,QAAQ;AACR,QAAQ,6DAAS;AACjB;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA,oCAAoC,iDAAK;AACzC;AACA;AACA;;AAEA,eAAe,iDAAK;AACpB;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,wDAAY;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA,qBAAqB,2DAAe;AACpC;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,2DAAe;AAC/B,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,aAAa,2DAAW;AACxB,qBAAqB,6DAAa;AAClC,WAAW,gEAAQ;AACnB;AACA;;AAEA;AACA,iDAAK;AACL;AACA;AACA,wBAAwB,2DAAW,aAAa;AAChD;AACA;AACA,yBAAyB;AACzB,KAAK;AACL;AACA,CAAC;;AAED,iDAAK;AACL;;AAEA;AACA;AACA,0BAA0B,2DAAW,aAAa;AAClD;AACA;AACA;AACA,UAAU,IAAI;AACd;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA,CAAC;;AAED,iEAAe,KAAK,EAAC;;;;;;;;;;;;;;;;;AChOR;;AAEmB;;AAEhC;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,OAAO;AACpB;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iDAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc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;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAoB,iDAAK;;AAEzB;AACA;;AAEA;AACA;AACA;AACA;;AAEA,QAAQ,iDAAK;AACb;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,IAAI,iDAAK;AACT,kBAAkB,iDAAK;;AAEvB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,IAAI,iDAAK;AACT,sEAAsE,iDAAK;AAC3E,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,IAAI,iDAAK;;AAET;AACA;AACA;;AAEA;;AAEA;AACA,iDAAK,6CAA6C,MAAM;AACxD,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,iDAAK;;AAEL,iEAAe,YAAY,EAAC;;;;;;;;;;;;;;;;;ACzSf;;AAEqB;;AAElC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,aAAa,UAAU;AACvB;AACA,cAAc,QAAQ;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA,eAAe;AACf;A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B;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,iDAAK;AACd;AACA,MAAM,UAAU,iDAAK;AACrB;AACA;AACA;;AAEA;AACA;AACA,SAAS,iDAAK;AACd;AACA;AACA;;AAEA;AACA;AACA,SAAS,iDAAK;AACd;AACA,MAAM,UAAU,iDAAK;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAE,iDAAK,qCAAqC;AAC5C;AACA;AACA,KAAK,iDAAK;AACV,GAAG;;AAEH;AACA;;;;;;;;;;;;;;;;;ACzGa;;AAE4B;;AAEzC;AACA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACe;AACf;AACA;AACA;AACA,IAAI;AACJ,eAAe,sDAAU;AACzB;AACA,OAAO,sDAAU,kBAAkB,sDAAU;AAC7C;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AC1Ba;;AAEqB;AACU;AACO;;AAEnD;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B,WAAW,SAAS;AACpB;AACA,aAAa,GAAG;AAChB;AACe;AACf,yBAAyB,0DAAQ;AACjC;AACA,kBAAkB,6DAAY;AAC9B;;AAEA,EAAE,iDAAK;AACP;AACA,GAAG;;AAEH;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;AC3Ba;;AAEmB;AACe;AACM;AACH;AACY;AAClB;AACc;;AAE1D;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,MAAM,iDAAK;AACX;AACA;AACA,aAAa,iDAAK;AAClB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GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,qBAAqB;AAChC,WAAW,qBAAqB;AAChC;AACA,aAAa;AACb;AACA;AACA;;AAEA,YAAY,0DAAU;AACtB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA,GAAG;AACH;;AAEA,iEAAe,oBAAoB,EAAC;;;;;;;;;;;;;;;;ACzDpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC;;AAED,iEAAe,cAAc,EAAC;;;;;;;;;;;;;;;;ACtEjB;;AAEE;AACf;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACNa;;AAEmB;AACsC;;AAEtE;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB;AACA,aAAa,QAAQ;AACrB;AACe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ,uBAAuB,iDAAK;AAC5B;AACA,UAAU,wEAAoB;AAC9B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;AC9Da;;AAEb;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACe;AACf;AACA;AACA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d;;;;;;;;;;;;;;;;;;ACba;;AAEqB;AACU;;AAE5C,iEAAe,0DAAQ;;AAEvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,gBAAgB,SAAS;AACzB;AACA;AACA,sBAAsB,iDAAK;AAC3B;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,GAAG,GAAG,EAAC;;;;;;;;;;;;;;;;AClEP;AACA,iEAAe,IAAI,EAAC;;;;;;;;;;;;;;;;;ACDP;;AAEqB;;AAElC;AACA;AACA,0BAA0B,iDAAK;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA,iEAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;;AAEH;AACA,CAAC,EAAC;;;;;;;;;;;;;;;;ACtDW;;AAEE;AACf,0BAA0B,KAAK;AAC/B;AACA;;;;;;;;;;;;;;;;ACLa;;AAEb;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,iEAAe,WAAW,EAAC;;;;;;;;;;;;;;;;ACtDd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AAW,QAAQ;AACnB;AACA,aAAa,SAAS;AACtB;AACA,OAAO,SAAS;;AAEhB;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,UAAU;AACrB;AACA,WAAW,SAAS;AACpB,aAAa;AACb;AACA,2BAA2B,oBAAoB,IAAI;AACnD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,OAAO;AACvC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA,gBAAgB,SAAS;AACzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA4B;AAC5B;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA,SAAS,UAAU;AACnB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kCAAkC;AAClC,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA,wCAAwC,OAAO;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,WAAW,SAAS;AACpB,aAAa,QAAQ;AACrB;AACA,gCAAgC,WAAW,IAAI;AAC/C;AACA;AACA,eAAe,4DAAI;AACnB,MAAM;AACN;AACA;AACA,GAAG,GAAG,WAAW;AACjB;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,UAAU;AACrB;AACA,aAAa;AACb;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B,eAAe;;AAEzC;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA,aAAa,SAAS;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,QAAQ;AACjB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA,iEAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;;;;;;UCltBF;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;ACNwC;AACY;AACP;AAEL;AACxC,iEAAe;EAAE9B,MAAM,EAANA,yDAAM;EAAEgL,YAAY,EAAZA,+DAAY;EAAEU,MAAM,EAANA,8CAAMA;AAAC,CAAC,E","sources":["webpack://Typesense/./src/Typesense/Alias.ts","webpack://Typesense/./src/Typesense/Aliases.ts","webpack://Typesense/./src/Typesense/Analytics.ts","webpack://Typesense/./src/Typesense/AnalyticsEvents.ts","webpack://Typesense/./src/Typesense/AnalyticsRule.ts","webpack://Typesense/./src/Typesense/AnalyticsRules.ts","webpack://Typesense/./src/Typesense/ApiCall.ts","webpack://Typesense/./src/Typesense/Client.ts","webpack://Typesense/./src/Typesense/Collection.ts","webpack://Typesense/./src/Typesense/Collections.ts","webpack://Typesense/./src/Typesense/Configuration.ts","webpack://Typesense/./src/Typesense/Conversation.ts","webpack://Typesense/./src/Typesense/ConversationModel.ts","webpack://Typesense/./src/Typesense/ConversationModels.ts","webpack://Typesense/./src/Typesense/Conversations.ts","webpack://Typesense/./src/Typesense/Debug.ts","webpack://Typesense/./src/Typesense/Document.ts","webpack://Typesense/./src/Typesense/Documents.ts","webpack://Typesense/./src/Typesense/Errors/HTTPError.ts","webpack://Typesense/./src/Typesense/Errors/ImportError.ts","webpack://Typesense/./src/Typesense/Errors/MissingConfigurationError.ts","webpack://Typesense/./src/Typesense/Errors/ObjectAlreadyExists.ts","webpack://Typesense/./src/Typesense/Errors/ObjectNotFound.ts","webpack://Typesense/./src/Typesense/Errors/ObjectUnprocessable.ts","webpack://Typesense/./src/Typesense/Errors/RequestMalformed.ts","webpack://Typesense/./src/Typesense/Errors/RequestUnauthorized.ts","webpack://Typesense/./src/Typesense/Errors/ServerError.ts","webpack://Typesense/./src/Typesense/Errors/TypesenseError.ts","webpack://Typesense/./src/Typesense/Errors/index.ts","webpack://Typesense/./src/Typesense/Health.ts","webpack://Typesense/./src/Typesense/Key.ts","webpack://Typesense/./src/Typesense/Keys.ts","webpack://Typesense/./src/Typesense/Metrics.ts","webpack://Typesense/./src/Typesense/MultiSearch.ts","webpack://Typesense/./src/Typesense/Operations.ts","webpack://Typesense/./src/Typesense/Override.ts","webpack://Typesense/./src/Typesense/Overrides.ts","webpack://Typesense/./src/Typesense/Preset.ts","webpack://Typesense/./src/Typesense/Presets.ts","webpack://Typesense/./src/Typesense/RequestWithCache.ts","webpack://Typesense/./src/Typesense/SearchClient.ts","webpack://Typesense/./src/Typesense/SearchOnlyCollection.ts","webpack://Typesense/./src/Typesense/SearchOnlyDocuments.ts","webpack://Typesense/./src/Typesense/Stats.ts","webpack://Typesense/./src/Typesense/Stopword.ts","webpack://Typesense/./src/Typesense/Stopwords.ts","webpack://Typesense/./src/Typesense/Synonym.ts","webpack://Typesense/./src/Typesense/Synonyms.ts","webpack://Typesense/./node_modules/loglevel/lib/loglevel.js","webpack://Typesense/ignored|/home/overthesanity/projects/typesense-js/src/Typesense|crypto","webpack://Typesense/ignored|/home/overthesanity/projects/typesense-js/src/Typesense|http","webpack://Typesense/ignored|/home/overthesanity/projects/typesense-js/src/Typesense|https","webpack://Typesense/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/typeof.js","webpack://Typesense/./node_modules/@babel/runtime/regenerator/index.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/construct.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","webpack://Typesense/./node_modules/axios/lib/adapters/adapters.js","webpack://Typesense/./node_modules/axios/lib/adapters/xhr.js","webpack://Typesense/./node_modules/axios/lib/axios.js","webpack://Typesense/./node_modules/axios/lib/cancel/CancelToken.js","webpack://Typesense/./node_modules/axios/lib/cancel/CanceledError.js","webpack://Typesense/./node_modules/axios/lib/cancel/isCancel.js","webpack://Typesense/./node_modules/axios/lib/core/Axios.js","webpack://Typesense/./node_modules/axios/lib/core/AxiosError.js","webpack://Typesense/./node_modules/axios/lib/core/AxiosHeaders.js","webpack://Typesense/./node_modules/axios/lib/core/InterceptorManager.js","webpack://Typesense/./node_modules/axios/lib/core/buildFullPath.js","webpack://Typesense/./node_modules/axios/lib/core/dispatchRequest.js","webpack://Typesense/./node_modules/axios/lib/core/mergeConfig.js","webpack://Typesense/./node_modules/axios/lib/core/settle.js","webpack://Typesense/./node_modules/axios/lib/core/transformData.js","webpack://Typesense/./node_modules/axios/lib/defaults/index.js","webpack://Typesense/./node_modules/axios/lib/defaults/transitional.js","webpack://Typesense/./node_modules/axios/lib/env/data.js","webpack://Typesense/./node_modules/axios/lib/helpers/AxiosURLSearchParams.js","webpack://Typesense/./node_modules/axios/lib/helpers/HttpStatusCode.js","webpack://Typesense/./node_modules/axios/lib/helpers/bind.js","webpack://Typesense/./node_modules/axios/lib/helpers/buildURL.js","webpack://Typesense/./node_modules/axios/lib/helpers/combineURLs.js","webpack://Typesense/./node_modules/axios/lib/helpers/cookies.js","webpack://Typesense/./node_modules/axios/lib/helpers/formDataToJSON.js","webpack://Typesense/./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://Typesense/./node_modules/axios/lib/helpers/isAxiosError.js","webpack://Typesense/./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://Typesense/./node_modules/axios/lib/helpers/null.js","webpack://Typesense/./node_modules/axios/lib/helpers/parseHeaders.js","webpack://Typesense/./node_modules/axios/lib/helpers/parseProtocol.js","webpack://Typesense/./node_modules/axios/lib/helpers/speedometer.js","webpack://Typesense/./node_modules/axios/lib/helpers/spread.js","webpack://Typesense/./node_modules/axios/lib/helpers/toFormData.js","webpack://Typesense/./node_modules/axios/lib/helpers/toURLEncodedForm.js","webpack://Typesense/./node_modules/axios/lib/helpers/validator.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/classes/Blob.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/classes/FormData.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/index.js","webpack://Typesense/./node_modules/axios/lib/platform/common/utils.js","webpack://Typesense/./node_modules/axios/lib/platform/index.js","webpack://Typesense/./node_modules/axios/lib/utils.js","webpack://Typesense/webpack/bootstrap","webpack://Typesense/webpack/runtime/compat get default export","webpack://Typesense/webpack/runtime/define property getters","webpack://Typesense/webpack/runtime/hasOwnProperty shorthand","webpack://Typesense/webpack/runtime/make namespace object","webpack://Typesense/./src/Typesense.ts"],"sourcesContent":["import Aliases, { CollectionAliasSchema } from './Aliases';\nimport ApiCall from './ApiCall';\n\nexport default class Alias {\n constructor(\n private name: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Aliases.RESOURCEPATH}/${this.name}`;\n }\n}\n","import ApiCall from './ApiCall';\n\nconst RESOURCEPATH = '/aliases';\n\nexport interface CollectionAliasCreateSchema {\n collection_name: string;\n}\n\nexport interface CollectionAliasSchema extends CollectionAliasCreateSchema {\n name: string;\n}\n\nexport interface CollectionAliasesResponseSchema {\n aliases: CollectionAliasSchema[];\n}\n\nexport default class Aliases {\n constructor(private apiCall: ApiCall) {}\n\n async upsert(\n name: string,\n mapping: CollectionAliasCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(name),\n mapping,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n private endpointPath(aliasName): string {\n return `${Aliases.RESOURCEPATH}/${aliasName}`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport AnalyticsRules from './AnalyticsRules';\nimport AnalyticsRule from './AnalyticsRule';\nimport AnalyticsEvents from './AnalyticsEvents';\n\nconst RESOURCEPATH = '/analytics';\n\nexport default class Analytics {\n private readonly _analyticsRules: AnalyticsRules;\n private readonly individualAnalyticsRules: Record = {};\n private readonly _analyticsEvents: AnalyticsEvents;\n\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules(this.apiCall);\n this._analyticsEvents = new AnalyticsEvents(this.apiCall);\n }\n\n rules(id?: string): AnalyticsRules | AnalyticsRule {\n if (id === undefined) {\n return this._analyticsRules;\n } else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n }\n\n events(): AnalyticsEvents {\n return this._analyticsEvents;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport { AnalyticsEventCreateSchema } from './AnalyticsEvent';\n\nconst RESOURCEPATH = '/analytics/events';\n\nexport default class AnalyticsEvents {\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async create(\n params: AnalyticsEventCreateSchema,\n ): Promise {\n return this.apiCall.post(\n this.endpointPath(),\n params,\n );\n }\n\n private endpointPath(operation?: string): string {\n return `${AnalyticsEvents.RESOURCEPATH}${\n operation === undefined ? '' : '/' + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport AnalyticsRules from './AnalyticsRules';\n\nexport interface AnalyticsRuleCreateSchema {\n type: 'popular_queries' | 'nohits_queries' | 'counter';\n params: {\n source: {\n collections: string[];\n events?: Array<{\n type: string;\n weight: number;\n name: string;\n }>;\n };\n expand_query?: boolean;\n destination: {\n collection: string;\n counter_field?: string;\n };\n limit?: number;\n };\n}\n\nexport interface AnalyticsRuleDeleteSchema {\n name: string;\n}\n\nexport interface AnalyticsRuleSchema extends AnalyticsRuleCreateSchema {\n name: string;\n}\n\nexport default class AnalyticsRule {\n constructor(\n private name: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${AnalyticsRules.RESOURCEPATH}/${this.name}`;\n }\n}\n","import ApiCall from './ApiCall';\nimport {\n AnalyticsRuleCreateSchema,\n AnalyticsRuleSchema,\n} from './AnalyticsRule';\n\nexport interface AnalyticsRulesRetrieveSchema {\n rules: AnalyticsRuleSchema[];\n}\n\nconst RESOURCEPATH = '/analytics/rules';\n\nexport default class AnalyticsRules {\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async upsert(\n name: string,\n params: AnalyticsRuleCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(name),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${AnalyticsRules.RESOURCEPATH}${\n operation === undefined ? '' : '/' + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import axios, { AxiosRequestConfig, AxiosResponse, Method } from 'axios';\nimport { Logger } from 'loglevel';\nimport {\n HTTPError,\n ObjectAlreadyExists,\n ObjectNotFound,\n ObjectUnprocessable,\n RequestMalformed,\n RequestUnauthorized,\n ServerError,\n} from './Errors';\nimport TypesenseError from './Errors/TypesenseError';\nimport Configuration, { NodeConfiguration } from './Configuration';\nimport { Agent as HTTPAgent } from 'http';\nimport { Agent as HTTPSAgent } from 'https';\n\nconst APIKEYHEADERNAME = 'X-TYPESENSE-API-KEY';\nconst HEALTHY = true;\nconst UNHEALTHY = false;\n\ninterface Node extends NodeConfiguration {\n isHealthy: boolean;\n index: string | number;\n}\n\nexport default class ApiCall {\n private readonly apiKey: string;\n private readonly nodes: Node[];\n private readonly nearestNode: Node;\n private readonly connectionTimeoutSeconds: number;\n private readonly healthcheckIntervalSeconds: number;\n private readonly retryIntervalSeconds: number;\n private readonly sendApiKeyAsQueryParam?: boolean;\n private readonly numRetriesPerRequest: number;\n private readonly additionalUserHeaders?: Record;\n\n private readonly logger: Logger;\n private currentNodeIndex: number;\n\n constructor(private configuration: Configuration) {\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n\n this.logger = this.configuration.logger;\n\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n\n async get(\n endpoint: string,\n queryParameters: any = {},\n {\n abortSignal = null,\n responseType = undefined,\n }: {\n abortSignal?: any;\n responseType?: AxiosRequestConfig['responseType'] | undefined;\n } = {},\n ): Promise {\n return this.performRequest('get', endpoint, {\n queryParameters,\n abortSignal,\n responseType,\n });\n }\n\n async delete(endpoint: string, queryParameters: any = {}): Promise {\n return this.performRequest('delete', endpoint, { queryParameters });\n }\n\n async post(\n endpoint: string,\n bodyParameters: any = {},\n queryParameters: any = {},\n additionalHeaders: any = {},\n ): Promise {\n return this.performRequest('post', endpoint, {\n queryParameters,\n bodyParameters,\n additionalHeaders,\n });\n }\n\n async put(\n endpoint: string,\n bodyParameters: any = {},\n queryParameters: any = {},\n ): Promise {\n return this.performRequest('put', endpoint, {\n queryParameters,\n bodyParameters,\n });\n }\n\n async patch(\n endpoint: string,\n bodyParameters: any = {},\n queryParameters: any = {},\n ): Promise {\n return this.performRequest('patch', endpoint, {\n queryParameters,\n bodyParameters,\n });\n }\n\n async performRequest(\n requestType: Method,\n endpoint: string,\n {\n queryParameters = null,\n bodyParameters = null,\n additionalHeaders = {},\n abortSignal = null,\n responseType = undefined,\n skipConnectionTimeout = false,\n enableKeepAlive = undefined,\n }: {\n queryParameters?: any;\n bodyParameters?: any;\n additionalHeaders?: any;\n abortSignal?: any;\n responseType?: AxiosRequestConfig['responseType'] | undefined;\n skipConnectionTimeout?: boolean;\n enableKeepAlive?: boolean | undefined;\n },\n ): Promise {\n this.configuration.validate();\n\n const requestNumber = Date.now();\n let lastException;\n this.logger.debug(\n `Request #${requestNumber}: Performing ${requestType.toUpperCase()} request: ${endpoint}`,\n );\n for (\n let numTries = 1;\n numTries <= this.numRetriesPerRequest + 1;\n numTries++\n ) {\n const node = this.getNextNode(requestNumber);\n this.logger.debug(\n `Request #${requestNumber}: Attempting ${requestType.toUpperCase()} request Try #${numTries} to Node ${\n node.index\n }`,\n );\n\n if (abortSignal && abortSignal.aborted) {\n return Promise.reject(new Error('Request aborted by caller.'));\n }\n\n let abortListener;\n\n try {\n const requestOptions: AxiosRequestConfig = {\n method: requestType,\n url: this.uriFor(endpoint, node),\n headers: Object.assign(\n {},\n this.defaultHeaders(),\n additionalHeaders,\n this.additionalUserHeaders,\n ),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType,\n validateStatus: (status) => {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n (data, headers) => {\n let transformedData = data;\n if (\n headers !== undefined &&\n typeof data === 'string' &&\n headers['content-type'] &&\n headers['content-type'].startsWith('application/json')\n ) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this.connectionTimeoutSeconds * 1000;\n }\n\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n\n if (this.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params['x-typesense-api-key'] = this.apiKey;\n }\n\n if (this.configuration.httpAgent) {\n this.logger.debug(\n `Request #${requestNumber}: Using custom httpAgent`,\n );\n requestOptions.httpAgent = this.configuration.httpAgent;\n } else if (enableKeepAlive === true) {\n this.logger.debug(`Request #${requestNumber}: Enabling KeepAlive`);\n requestOptions.httpAgent = new HTTPAgent({ keepAlive: true });\n }\n\n if (this.configuration.httpsAgent) {\n this.logger.debug(\n `Request #${requestNumber}: Using custom httpsAgent`,\n );\n requestOptions.httpsAgent = this.configuration.httpsAgent;\n } else if (enableKeepAlive === true) {\n this.logger.debug(`Request #${requestNumber}: Enabling keepAlive`);\n requestOptions.httpsAgent = new HTTPSAgent({ keepAlive: true });\n }\n\n if (this.configuration.paramsSerializer) {\n this.logger.debug(\n `Request #${requestNumber}: Using custom paramsSerializer`,\n );\n requestOptions.paramsSerializer = this.configuration.paramsSerializer;\n }\n\n if (\n bodyParameters &&\n ((typeof bodyParameters === 'string' &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === 'object' &&\n Object.keys(bodyParameters).length !== 0))\n ) {\n requestOptions.data = bodyParameters;\n }\n\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n const cancelToken = axios.CancelToken;\n const source = cancelToken.source();\n abortListener = () => source.cancel();\n abortSignal.addEventListener('abort', abortListener);\n requestOptions.cancelToken = source.token;\n }\n\n const response = await axios(requestOptions);\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this.setNodeHealthcheck(node, HEALTHY);\n }\n this.logger.debug(\n `Request #${requestNumber}: Request to Node ${node.index} was made. Response Code was ${response.status}.`,\n );\n\n if (response.status >= 200 && response.status < 300) {\n // If response is 2xx return a resolved promise\n return Promise.resolve(response.data);\n } else if (response.status < 500) {\n // Next, if response is anything but 5xx, don't retry, return a custom error\n return Promise.reject(\n this.customErrorForResponse(response, response.data?.message),\n );\n } else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this.customErrorForResponse(response, response.data?.message);\n }\n } catch (error: any) {\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error;\n this.logger.warn(\n `Request #${requestNumber}: Request to Node ${\n node.index\n } failed due to \"${error.code} ${error.message}${\n error.response == null\n ? ''\n : ' - ' + JSON.stringify(error.response?.data)\n }\"`,\n );\n // this.logger.debug(error.stack)\n this.logger.warn(\n `Request #${requestNumber}: Sleeping for ${this.retryIntervalSeconds}s and then retrying request...`,\n );\n await this.timer(this.retryIntervalSeconds);\n } finally {\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener('abort', abortListener);\n }\n }\n }\n this.logger.debug(\n `Request #${requestNumber}: No retries left. Raising last error`,\n );\n return Promise.reject(lastException);\n }\n\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n getNextNode(requestNumber = 0): Node {\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\n `Request #${requestNumber}: Nodes Health: Node ${\n this.nearestNode.index\n } is ${this.nearestNode.isHealthy === true ? 'Healthy' : 'Unhealthy'}`,\n );\n if (\n this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)\n ) {\n this.logger.debug(\n `Request #${requestNumber}: Updated current node to Node ${this.nearestNode.index}`,\n );\n return this.nearestNode;\n }\n this.logger.debug(\n `Request #${requestNumber}: Falling back to individual nodes`,\n );\n }\n\n // Fallback to nodes as usual\n this.logger.debug(\n `Request #${requestNumber}: Nodes Health: ${this.nodes\n .map(\n (node) =>\n `Node ${node.index} is ${\n node.isHealthy === true ? 'Healthy' : 'Unhealthy'\n }`,\n )\n .join(' || ')}`,\n );\n let candidateNode: Node = this.nodes[0];\n for (let i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (\n candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)\n ) {\n this.logger.debug(\n `Request #${requestNumber}: Updated current node to Node ${candidateNode.index}`,\n );\n return candidateNode;\n }\n }\n\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\n `Request #${requestNumber}: No healthy nodes were found. Returning the next node, Node ${candidateNode.index}`,\n );\n return candidateNode;\n }\n\n nodeDueForHealthcheck(node, requestNumber = 0): boolean {\n const isDueForHealthcheck =\n Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\n `Request #${requestNumber}: Node ${node.index} has exceeded healtcheckIntervalSeconds of ${this.healthcheckIntervalSeconds}. Adding it back into rotation.`,\n );\n }\n return isDueForHealthcheck;\n }\n\n initializeMetadataForNodes(): void {\n if (this.nearestNode != null) {\n this.nearestNode.index = 'nearestNode';\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n\n this.nodes.forEach((node, i) => {\n node.index = i;\n this.setNodeHealthcheck(node, HEALTHY);\n });\n }\n\n setNodeHealthcheck(node, isHealthy): void {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n }\n\n uriFor(endpoint: string, node): string {\n if (node.url != null) {\n return `${node.url}${endpoint}`;\n }\n return `${node.protocol}://${node.host}:${node.port}${node.path}${endpoint}`;\n }\n\n defaultHeaders(): any {\n const defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders['Content-Type'] = 'application/json';\n return defaultHeaders;\n }\n\n async timer(seconds): Promise {\n return new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n }\n\n customErrorForResponse(\n response: AxiosResponse,\n messageFromServer: string,\n ): TypesenseError {\n let errorMessage = `Request failed with HTTP code ${response.status}`;\n if (\n typeof messageFromServer === 'string' &&\n messageFromServer.trim() !== ''\n ) {\n errorMessage += ` | Server said: ${messageFromServer}`;\n }\n\n let error = new TypesenseError(errorMessage);\n\n if (response.status === 400) {\n error = new RequestMalformed(errorMessage);\n } else if (response.status === 401) {\n error = new RequestUnauthorized(errorMessage);\n } else if (response.status === 404) {\n error = new ObjectNotFound(errorMessage);\n } else if (response.status === 409) {\n error = new ObjectAlreadyExists(errorMessage);\n } else if (response.status === 422) {\n error = new ObjectUnprocessable(errorMessage);\n } else if (response.status >= 500 && response.status <= 599) {\n error = new ServerError(errorMessage);\n } else {\n error = new HTTPError(errorMessage);\n }\n\n error.httpStatus = response.status;\n\n return error;\n }\n}\n","/* eslint-disable no-dupe-class-members */\n\nimport Configuration, { ConfigurationOptions } from './Configuration';\nimport ApiCall from './ApiCall';\nimport Collections from './Collections';\nimport Collection from './Collection';\nimport Aliases from './Aliases';\nimport Alias from './Alias';\nimport Keys from './Keys';\nimport Key from './Key';\nimport Debug from './Debug';\nimport Metrics from './Metrics';\nimport Stats from './Stats';\nimport Health from './Health';\nimport Operations from './Operations';\nimport MultiSearch from './MultiSearch';\nimport Presets from './Presets';\nimport Preset from './Preset';\nimport Analytics from './Analytics';\nimport Stopwords from './Stopwords';\nimport Stopword from './Stopword';\nimport Conversations from './Conversations';\nimport Conversation from './Conversation';\n\nexport default class Client {\n configuration: Configuration;\n apiCall: ApiCall;\n debug: Debug;\n metrics: Metrics;\n stats: Stats;\n health: Health;\n operations: Operations;\n multiSearch: MultiSearch;\n analytics: Analytics;\n private readonly _collections: Collections;\n private readonly individualCollections: Record;\n private readonly _aliases: Aliases;\n private readonly individualAliases: Record;\n private readonly _keys: Keys;\n private readonly individualKeys: Record;\n private readonly _presets: Presets;\n private readonly individualPresets: Record;\n private readonly _stopwords: Stopwords;\n private readonly individualStopwords: Record;\n private readonly _conversations: Conversations;\n private readonly individualConversations: Record;\n\n constructor(options: ConfigurationOptions) {\n options.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam ?? false;\n\n this.configuration = new Configuration(options);\n this.apiCall = new ApiCall(this.configuration);\n this.debug = new Debug(this.apiCall);\n this.metrics = new Metrics(this.apiCall);\n this.stats = new Stats(this.apiCall);\n this.health = new Health(this.apiCall);\n this.operations = new Operations(this.apiCall);\n this.multiSearch = new MultiSearch(this.apiCall, this.configuration);\n this._collections = new Collections(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets(this.apiCall);\n this.individualPresets = {};\n this._stopwords = new Stopwords(this.apiCall);\n this.individualStopwords = {};\n this.analytics = new Analytics(this.apiCall);\n this._conversations = new Conversations(this.apiCall);\n this.individualConversations = {};\n }\n\n collections(): Collections;\n collections = object>(\n collectionName: string,\n ): Collection;\n collections(collectionName?: string): Collections | Collection {\n if (collectionName === undefined) {\n return this._collections;\n } else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection(\n collectionName,\n this.apiCall,\n this.configuration,\n );\n }\n return this.individualCollections[collectionName];\n }\n }\n\n aliases(): Aliases;\n aliases(aliasName: string): Alias;\n aliases(aliasName?: string): Aliases | Alias {\n if (aliasName === undefined) {\n return this._aliases;\n } else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n }\n\n keys(): Keys;\n keys(id: number): Key;\n keys(id?: number): Keys | Key {\n if (id === undefined) {\n return this._keys;\n } else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n }\n\n presets(): Presets;\n presets(id: string): Preset;\n presets(id?: string): Presets | Preset {\n if (id === undefined) {\n return this._presets;\n } else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n }\n\n stopwords(): Stopwords;\n stopwords(id: string): Stopword;\n stopwords(id?: string): Stopwords | Stopword {\n if (id === undefined) {\n return this._stopwords;\n } else {\n if (this.individualStopwords[id] === undefined) {\n this.individualStopwords[id] = new Stopword(id, this.apiCall);\n }\n return this.individualStopwords[id];\n }\n }\n\n conversations(): Conversations;\n conversations(id: string): Conversation;\n conversations(id?: string): Conversations | Conversation {\n if (id === undefined) {\n return this._conversations;\n } else {\n if (this.individualConversations[id] === undefined) {\n this.individualConversations[id] = new Conversation(id, this.apiCall);\n }\n return this.individualConversations[id];\n }\n }\n}\n","import ApiCall from './ApiCall';\nimport Collections, { CollectionCreateSchema } from './Collections';\nimport Documents, { DocumentSchema } from './Documents';\nimport { ObjectNotFound } from './Errors';\nimport Overrides from './Overrides';\nimport Override from './Override';\nimport Synonyms from './Synonyms';\nimport Synonym from './Synonym';\nimport { Document } from './Document';\n\nexport type FieldType =\n | 'string'\n | 'int32'\n | 'int64'\n | 'float'\n | 'bool'\n | 'geopoint'\n | 'geopoint[]'\n | 'string[]'\n | 'int32[]'\n | 'int64[]'\n | 'float[]'\n | 'bool[]'\n | 'object'\n | 'object[]'\n | 'auto'\n | 'string*'\n | 'image';\n\nexport interface CollectionFieldSchema {\n name: string;\n type: FieldType;\n optional?: boolean;\n facet?: boolean;\n index?: boolean;\n sort?: boolean;\n locale?: string;\n infix?: boolean;\n stem?: boolean;\n num_dim?: number;\n store?: boolean;\n [t: string]: unknown;\n}\n\nexport interface CollectionSchema extends CollectionCreateSchema {\n created_at: number;\n num_documents: number;\n num_memory_shards: number;\n}\n\nexport interface CollectionDropFieldSchema {\n name: string;\n drop: true;\n}\n\nexport interface CollectionUpdateSchema\n extends Partial> {\n fields?: (CollectionFieldSchema | CollectionDropFieldSchema)[];\n}\n\nexport default class Collection {\n private readonly _documents: Documents;\n private individualDocuments: Record> = {};\n private readonly _overrides: Overrides;\n private individualOverrides: Record = {};\n private readonly _synonyms: Synonyms;\n private individualSynonyms: Record = {};\n\n constructor(\n private readonly name: string,\n private readonly apiCall: ApiCall,\n private readonly configuration: any,\n ) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n\n this._documents = new Documents(\n this.name,\n this.apiCall,\n this.configuration,\n );\n this._overrides = new Overrides(this.name, this.apiCall);\n this._synonyms = new Synonyms(this.name, this.apiCall);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async update(schema: CollectionUpdateSchema): Promise {\n return this.apiCall.patch(this.endpointPath(), schema);\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n async exists(): Promise {\n try {\n await this.retrieve();\n return true;\n } catch (e) {\n if (e instanceof ObjectNotFound) return false;\n throw e;\n }\n }\n\n documents(): Documents;\n documents(documentId: string): Document;\n documents(documentId?: string): Document | Documents {\n if (!documentId) {\n return this._documents;\n } else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document(\n this.name,\n documentId,\n this.apiCall,\n );\n }\n return this.individualDocuments[documentId];\n }\n }\n\n overrides(): Overrides;\n overrides(overrideId: string): Override;\n overrides(overrideId?: string): Overrides | Override {\n if (overrideId === undefined) {\n return this._overrides;\n } else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override(\n this.name,\n overrideId,\n this.apiCall,\n );\n }\n return this.individualOverrides[overrideId];\n }\n }\n\n synonyms(): Synonyms;\n synonyms(synonymId: string): Synonym;\n synonyms(synonymId?: string): Synonyms | Synonym {\n if (synonymId === undefined) {\n return this._synonyms;\n } else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym(\n this.name,\n synonymId,\n this.apiCall,\n );\n }\n return this.individualSynonyms[synonymId];\n }\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.name}`;\n }\n}\n","import ApiCall from './ApiCall';\nimport { CollectionFieldSchema, CollectionSchema } from './Collection';\n\nexport interface CollectionCreateSchema {\n name: string;\n default_sorting_field?: string;\n fields?: CollectionFieldSchema[];\n symbols_to_index?: string[];\n token_separators?: string[];\n enable_nested_fields?: boolean;\n metadata?: object;\n voice_query_model?: {\n model_name?: string;\n };\n}\n\nexport interface CollectionCreateOptions {\n src_name?: string;\n}\n\nconst RESOURCEPATH = '/collections';\n\nexport default class Collections {\n constructor(private apiCall: ApiCall) {}\n\n async create(\n schema: CollectionCreateSchema,\n options: CollectionCreateOptions = {},\n ): Promise {\n return this.apiCall.post(RESOURCEPATH, schema, options);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import * as logger from 'loglevel';\nimport { Logger, LogLevelDesc } from 'loglevel';\nimport { MissingConfigurationError } from './Errors';\nimport type { Agent as HTTPAgent } from 'http';\nimport type { Agent as HTTPSAgent } from 'https';\n\nexport interface NodeConfiguration {\n host: string;\n port: number;\n protocol: string;\n path?: string;\n url?: string;\n}\n\nexport interface NodeConfigurationWithHostname {\n host: string;\n port: number;\n protocol: string;\n path?: string;\n}\n\nexport interface NodeConfigurationWithUrl {\n url: string;\n}\n\nexport interface ConfigurationOptions {\n apiKey: string;\n nodes:\n | NodeConfiguration[]\n | NodeConfigurationWithHostname[]\n | NodeConfigurationWithUrl[];\n randomizeNodes?: boolean;\n /**\n * @deprecated\n * masterNode is now consolidated to nodes, starting with Typesense Server v0.12'\n */\n masterNode?:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl;\n /**\n * @deprecated\n * readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12'\n */\n readReplicaNodes?:\n | NodeConfiguration[]\n | NodeConfigurationWithHostname[]\n | NodeConfigurationWithUrl[];\n nearestNode?:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl;\n connectionTimeoutSeconds?: number;\n timeoutSeconds?: number;\n healthcheckIntervalSeconds?: number;\n numRetries?: number;\n retryIntervalSeconds?: number;\n sendApiKeyAsQueryParam?: boolean | undefined;\n useServerSideSearchCache?: boolean;\n cacheSearchResultsForSeconds?: number;\n additionalHeaders?: Record;\n\n logLevel?: LogLevelDesc;\n logger?: Logger;\n\n /**\n * Set a custom HTTP Agent\n *\n * This is helpful for eg, to enable keepAlive which helps prevents ECONNRESET socket hang up errors\n * Usage:\n * const { Agent: HTTPAgent } = require(\"http\");\n * ...\n * httpAgent: new HTTPAgent({ keepAlive: true }),\n * @type {HTTPAgent}\n */\n httpAgent?: HTTPAgent;\n\n /**\n * Set a custom HTTPS Agent\n *\n * This is helpful for eg, to enable keepAlive which helps prevents ECONNRESET socket hang up errors\n * Usage:\n * const { Agent: HTTPSAgent } = require(\"https\");\n * ...\n * httpsAgent: new HTTPSAgent({ keepAlive: true }),\n * @type {HTTPSAgent}\n */\n httpsAgent?: HTTPSAgent;\n\n /**\n * Set a custom paramsSerializer\n *\n * See axios documentation for more information on how to use this parameter: https://axios-http.com/docs/req_config\n * This is helpful for handling React Native issues like this: https://github.com/axios/axios/issues/6102#issuecomment-2085301397\n * @type {any}\n */\n paramsSerializer?: any;\n}\n\nexport default class Configuration {\n readonly nodes:\n | NodeConfiguration[]\n | NodeConfigurationWithHostname[]\n | NodeConfigurationWithUrl[];\n readonly nearestNode?:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl;\n readonly connectionTimeoutSeconds: number;\n readonly healthcheckIntervalSeconds: number;\n readonly numRetries: number;\n readonly retryIntervalSeconds: number;\n readonly apiKey: string;\n readonly sendApiKeyAsQueryParam?: boolean;\n readonly cacheSearchResultsForSeconds: number;\n readonly useServerSideSearchCache: boolean;\n readonly logger: Logger;\n readonly logLevel: LogLevelDesc;\n readonly additionalHeaders?: Record;\n readonly httpAgent?: HTTPAgent;\n readonly httpsAgent?: HTTPSAgent;\n readonly paramsSerializer?: any;\n\n constructor(options: ConfigurationOptions) {\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map((node) => this.setDefaultPathInNode(node))\n .map((node) => this.setDefaultPortInNode(node))\n .map((node) => ({ ...node })) as NodeConfiguration[]; // Make a deep copy\n\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || 'warn';\n this.logger.setLevel(this.logLevel);\n\n this.additionalHeaders = options.additionalHeaders;\n\n this.httpAgent = options.httpAgent;\n this.httpsAgent = options.httpsAgent;\n\n this.paramsSerializer = options.paramsSerializer;\n\n this.showDeprecationWarnings(options);\n this.validate();\n }\n\n validate(): boolean {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new MissingConfigurationError(\n 'Ensure that nodes[].protocol, nodes[].host and nodes[].port are set',\n );\n }\n\n if (\n this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)\n ) {\n throw new MissingConfigurationError(\n 'Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set',\n );\n }\n\n if (this.apiKey == null) {\n throw new MissingConfigurationError('Ensure that apiKey is set');\n }\n\n return true;\n }\n\n private validateNodes(): boolean {\n return this.nodes.some((node) => {\n return this.isNodeMissingAnyParameters(node);\n });\n }\n\n private isNodeMissingAnyParameters(\n node:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl,\n ): boolean {\n return (\n !['protocol', 'host', 'port', 'path'].every((key) => {\n return node.hasOwnProperty(key);\n }) && node['url'] == null\n );\n }\n\n private setDefaultPathInNode(\n node:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined,\n ):\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined {\n if (node != null && !node.hasOwnProperty('path')) {\n node['path'] = '';\n }\n return node;\n }\n\n private setDefaultPortInNode(\n node:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined,\n ):\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined {\n if (\n node != null &&\n !node.hasOwnProperty('port') &&\n node.hasOwnProperty('protocol')\n ) {\n switch (node['protocol']) {\n case 'https':\n node['port'] = 443;\n break;\n case 'http':\n node['port'] = 80;\n break;\n }\n }\n return node;\n }\n\n private showDeprecationWarnings(options: ConfigurationOptions): void {\n if (options.timeoutSeconds) {\n this.logger.warn(\n 'Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds',\n );\n }\n if (options.masterNode) {\n this.logger.warn(\n 'Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12',\n );\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\n 'Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12',\n );\n }\n }\n\n private shuffleArray(array) {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [array[i], array[j]] = [array[j], array[i]];\n }\n }\n}\n","import ApiCall from './ApiCall';\nimport Conversations from './Conversations';\n\nexport interface ConversationDeleteSchema {\n id: number;\n}\n\nexport interface ConversationUpdateSchema {\n ttl: number;\n}\n\nexport interface ConversationSchema {\n id: number;\n conversation: object[];\n last_updated: number;\n ttl: number;\n}\n\nexport default class Conversation {\n constructor(\n private id: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async update(\n params: ConversationUpdateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(),\n params,\n );\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Conversations.RESOURCEPATH}/${this.id}`;\n }\n}\n","import ApiCall from './ApiCall';\nimport ConversationModels from './ConversationModels';\n\nexport interface ConversationModelCreateSchema {\n model_name: string;\n api_key: string;\n system_prompt?: string;\n max_bytes: number;\n}\n\nexport interface ConversationModelDeleteSchema {\n id: string;\n}\n\nexport interface ConversationModelSchema extends ConversationModelCreateSchema {\n id: string;\n}\n\nexport default class ConversationModel {\n constructor(\n private id: string,\n private apiCall: ApiCall,\n ) {}\n\n async update(\n params: ConversationModelCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(\n this.endpointPath(),\n );\n }\n\n private endpointPath(): string {\n return `${ConversationModels.RESOURCEPATH}/${this.id}`;\n }\n}\n","import ApiCall from './ApiCall';\nimport {\n ConversationModelCreateSchema,\n ConversationModelSchema,\n} from './ConversationModel';\n\nconst RESOURCEPATH = '/conversations/models';\n\nexport default class ConversationModels {\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async create(\n params: ConversationModelCreateSchema,\n ): Promise {\n return this.apiCall.post(\n this.endpointPath(),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${ConversationModels.RESOURCEPATH}${\n operation === undefined ? '' : '/' + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport ConversationModels from './ConversationModels';\nimport ConversationModel from './ConversationModel';\nimport { ConversationSchema } from './Conversation';\n\nconst RESOURCEPATH = '/conversations';\n\nexport interface ConversationsRetrieveSchema {\n conversations: ConversationSchema[];\n}\n\nexport default class Conversations {\n private readonly _conversationsModels: ConversationModels;\n private readonly individualConversationModels: Record<\n string,\n ConversationModel\n > = {};\n\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n this._conversationsModels = new ConversationModels(this.apiCall);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n models(): ConversationModels;\n models(id: string): ConversationModel;\n models(id?: string): ConversationModels | ConversationModel {\n if (id === undefined) {\n return this._conversationsModels;\n } else {\n if (this.individualConversationModels[id] === undefined) {\n this.individualConversationModels[id] = new ConversationModel(\n id,\n this.apiCall,\n );\n }\n return this.individualConversationModels[id];\n }\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\n\nconst RESOURCEPATH = '/debug';\n\nexport interface DebugResponseSchema {\n state: number;\n version: string;\n}\n\nexport default class Debug {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from './ApiCall';\nimport Collections from './Collections';\nimport Documents, {\n DocumentSchema,\n DocumentWriteParameters,\n} from './Documents';\n\nexport class Document {\n constructor(\n private collectionName: string,\n private documentId: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n async update(\n partialDocument: Partial,\n options: DocumentWriteParameters = {},\n ): Promise {\n return this.apiCall.patch(this.endpointPath(), partialDocument, options);\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${Documents.RESOURCEPATH}/${this.documentId}`;\n }\n}\n","import type { ReadStream } from 'fs';\nimport ApiCall from './ApiCall';\nimport Configuration from './Configuration';\nimport { ImportError } from './Errors';\nimport { SearchOnlyDocuments } from './SearchOnlyDocuments';\n\n// Todo: use generic to extract filter_by values\nexport interface DeleteQuery {\n filter_by: string;\n batch_size?: number;\n ignore_not_found?: boolean;\n}\n\nexport interface DeleteResponse {\n num_deleted: number;\n}\n\ninterface ImportResponseSuccess {\n success: true;\n}\n\nexport interface ImportResponseFail {\n success: false;\n error: string;\n document: DocumentSchema;\n code: number;\n}\n\nexport type ImportResponse = ImportResponseSuccess | ImportResponseFail;\n\nexport type DocumentSchema = Record;\n\nexport interface SearchParamsWithPreset extends Partial {\n preset: string;\n}\n\ntype OperationMode = 'off' | 'always' | 'fallback';\nexport interface SearchParams {\n // From https://typesense.org/docs/latest/api/documents.html#arguments\n q?: string;\n query_by?: string | string[];\n query_by_weights?: string | number[];\n prefix?: string | boolean | boolean[]; // default: true\n filter_by?: string;\n enable_lazy_filter?: boolean; // default: false\n sort_by?: string | string[]; // default: text match desc\n facet_by?: string | string[];\n max_facet_values?: number;\n facet_sample_threshold?: number;\n facet_sample_percent?: number;\n facet_query?: string;\n facet_query_num_typos?: number;\n facet_return_parent?: string;\n page?: number; // default: 1\n per_page?: number; // default: 10, max 250\n group_by?: string | string[];\n group_limit?: number; // default:\n group_missing_values?: boolean;\n include_fields?: string | string[];\n exclude_fields?: string | string[];\n highlight_fields?: string | string[]; // default: all queried fields\n highlight_full_fields?: string | string[]; // default: all fields\n highlight_affix_num_tokens?: number; // default: 4\n highlight_start_tag?: string; // default: \n highlight_end_tag?: string; // default: \n enable_highlight_v1?: boolean;\n snippet_threshold?: number; // default: 30\n num_typos?: string | number | number[]; // default: 2\n min_len_1typo?: number;\n min_len_2typo?: number;\n split_join_tokens?: OperationMode;\n exhaustive_search?: boolean;\n drop_tokens_threshold?: number; // default: 10\n typo_tokens_threshold?: number; // default: 100\n pinned_hits?: string | string[];\n hidden_hits?: string | string[];\n limit_hits?: number; // default: no limit\n pre_segmented_query?: boolean;\n enable_overrides?: boolean;\n prioritize_exact_match?: boolean; // default: true\n prioritize_token_position?: boolean;\n prioritize_num_matching_fields?: boolean;\n search_cutoff_ms?: number;\n use_cache?: boolean;\n max_candidates?: number;\n infix?: OperationMode | OperationMode[];\n preset?: string;\n text_match_type?: 'max_score' | 'max_weight';\n vector_query?: string;\n 'x-typesense-api-key'?: string;\n 'x-typesense-user-id'?: string;\n offset?: number;\n limit?: number;\n stopwords?: string;\n conversation?: boolean;\n conversation_model_id?: string;\n conversation_id?: string;\n voice_query?: string;\n}\n\ntype SearchResponseHighlightObject = {\n matched_tokens?: string[];\n snippet?: string;\n value?: string;\n};\n\nexport type SearchResponseHighlight = T extends string | number\n ? SearchResponseHighlightObject\n : {\n [TAttribute in keyof T]?: SearchResponseHighlight;\n };\n\nexport interface SearchResponseHit {\n curated?: true;\n highlights?: [\n {\n field: keyof T;\n snippet?: string;\n value?: string;\n snippets?: string[];\n indices?: number[];\n matched_tokens: string[][] | string[];\n },\n ];\n highlight: SearchResponseHighlight;\n document: T;\n text_match: number;\n text_match_info?: {\n best_field_score: string; // To prevent scores from being truncated by JSON spec\n best_field_weight: number;\n fields_matched: number;\n score: string; // To prevent scores from being truncated by JSON spec\n tokens_matched: number;\n };\n}\n\nexport interface SearchResponseFacetCountSchema {\n counts: {\n count: number;\n highlighted: string;\n value: string;\n }[];\n field_name: keyof T;\n stats: {\n avg?: number;\n max?: number;\n min?: number;\n sum?: number;\n };\n}\n\nexport interface SearchResponseRequestParams {\n collection_name?: string;\n q?: string;\n page?: number;\n per_page?: number;\n first_q?: string;\n voice_query?: {\n transcribed_query?: string;\n };\n}\n\n// Todo: we could infer whether this is a grouped response by adding the search params as a generic\nexport interface SearchResponse {\n facet_counts?: SearchResponseFacetCountSchema[];\n found: number;\n found_docs?: number;\n out_of: number;\n page: number;\n request_params: SearchResponseRequestParams;\n search_time_ms: number;\n search_cutoff?: boolean;\n hits?: SearchResponseHit[];\n grouped_hits?: {\n group_key: string[];\n hits: SearchResponseHit[];\n found?: number;\n }[];\n conversation?: {\n answer: string;\n conversation_history: {\n conversation: object[];\n id: string;\n last_updated: number;\n ttl: number;\n };\n conversation_id: string;\n query: string;\n };\n}\n\nexport interface DocumentWriteParameters {\n dirty_values?: 'coerce_or_reject' | 'coerce_or_drop' | 'drop' | 'reject';\n action?: 'create' | 'update' | 'upsert' | 'emplace';\n}\n\nexport interface UpdateByFilterParameters {\n filter_by?: string;\n}\n\nexport interface UpdateByFilterResponse {\n num_updated: number;\n}\n\nexport interface DocumentImportParameters extends DocumentWriteParameters {\n batch_size?: number;\n return_doc?: boolean;\n return_id?: boolean;\n}\n\nexport interface DocumentsExportParameters {\n filter_by?: string;\n include_fields?: string;\n exclude_fields?: string;\n}\n\nexport interface SearchableDocuments {\n search(\n searchParameters: SearchParams | SearchParamsWithPreset,\n options: SearchOptions,\n ): Promise>;\n clearCache(): void;\n}\n\nexport interface WriteableDocuments {\n create(document: T, options: DocumentWriteParameters): Promise;\n upsert(document: T, options: DocumentWriteParameters): Promise;\n update(document: T, options: DocumentWriteParameters): Promise;\n delete(query: DeleteQuery): Promise;\n import(\n documents: T[] | string,\n options: DocumentWriteParameters,\n ): Promise;\n export(options: DocumentsExportParameters): Promise;\n}\n\nexport interface SearchOptions {\n cacheSearchResultsForSeconds?: number;\n abortSignal?: AbortSignal | null;\n}\n\nexport default class Documents\n extends SearchOnlyDocuments\n implements WriteableDocuments\n{\n constructor(\n collectionName: string,\n apiCall: ApiCall,\n configuration: Configuration,\n ) {\n super(collectionName, apiCall, configuration);\n }\n\n async create(document: T, options: DocumentWriteParameters = {}): Promise {\n if (!document) throw new Error('No document provided');\n return this.apiCall.post(this.endpointPath(), document, options);\n }\n\n async upsert(document: T, options: DocumentWriteParameters = {}): Promise {\n if (!document) throw new Error('No document provided');\n return this.apiCall.post(\n this.endpointPath(),\n document,\n Object.assign({}, options, { action: 'upsert' }),\n );\n }\n\n async update(\n document: T,\n options: UpdateByFilterParameters,\n ): Promise;\n async update(document: T, options: DocumentWriteParameters): Promise;\n async update(\n document: T,\n options: DocumentWriteParameters | UpdateByFilterParameters = {},\n ): Promise {\n if (!document) throw new Error('No document provided');\n\n if (options['filter_by'] != null) {\n return this.apiCall.patch(\n this.endpointPath(),\n document,\n Object.assign({}, options),\n );\n } else {\n return this.apiCall.post(\n this.endpointPath(),\n document,\n Object.assign({}, options, { action: 'update' }),\n );\n }\n }\n\n async delete(\n query: DeleteQuery = {} as DeleteQuery,\n ): Promise {\n return this.apiCall.delete(this.endpointPath(), query);\n }\n\n async createMany(documents: T[], options: DocumentImportParameters = {}) {\n this.configuration.logger.warn(\n 'createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents',\n );\n return this.import(documents, options);\n }\n\n /**\n * Import a set of documents in a batch.\n * @param {string|Array} documents - Can be a JSONL string of documents or an array of document objects.\n * @param options\n * @return {string|Array} Returns a JSONL string if the input was a JSONL string, otherwise it returns an array of results.\n */\n async import(\n documents: string,\n options?: DocumentImportParameters,\n ): Promise;\n async import(\n documents: T[],\n options?: DocumentImportParameters,\n ): Promise;\n async import(\n documents: T[] | string,\n options: DocumentImportParameters = {},\n ): Promise {\n let documentsInJSONLFormat;\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map((document) => JSON.stringify(document))\n .join('\\n');\n } catch (error: any) {\n // if rangeerror, throw custom error message\n if (\n error instanceof RangeError &&\n error.message.includes('Too many properties to enumerate')\n ) {\n throw new Error(`${error}\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\n\n Please try reducing the number of keys in your document, or using CURL to import your data.\n `);\n }\n\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n } else {\n documentsInJSONLFormat = documents;\n }\n\n const resultsInJSONLFormat = await this.apiCall.performRequest(\n 'post',\n this.endpointPath('import'),\n {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { 'Content-Type': 'text/plain' },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n enableKeepAlive: true, // This is to prevent ECONNRESET socket hang up errors. Reference: https://github.com/axios/axios/issues/2936#issuecomment-779439991\n },\n );\n\n if (Array.isArray(documents)) {\n const resultsInJSONFormat = resultsInJSONLFormat\n .split('\\n')\n .map((r) => JSON.parse(r)) as ImportResponse[];\n const failedItems = resultsInJSONFormat.filter(\n (r) => r.success === false,\n );\n if (failedItems.length > 0) {\n throw new ImportError(\n `${\n resultsInJSONFormat.length - failedItems.length\n } documents imported successfully, ${\n failedItems.length\n } documents failed during import. Use \\`error.importResults\\` from the raised exception to get a detailed error reason for each document.`,\n resultsInJSONFormat,\n );\n } else {\n return resultsInJSONFormat;\n }\n } else {\n return resultsInJSONLFormat as string;\n }\n }\n\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n async export(options: DocumentsExportParameters = {}): Promise {\n return this.apiCall.get(this.endpointPath('export'), options);\n }\n\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n async exportStream(\n options: DocumentsExportParameters = {},\n ): Promise {\n return this.apiCall.get(this.endpointPath('export'), options, {\n responseType: 'stream',\n });\n }\n}\n","import TypesenseError from './TypesenseError';\n\nexport default class HTTPError extends TypesenseError {}\n","import TypesenseError from './TypesenseError';\nimport { ImportResponseFail } from '../Documents';\n\nexport default class ImportError extends TypesenseError {\n importResults: ImportResponseFail;\n constructor(message, importResults) {\n super(message);\n this.importResults = importResults;\n }\n}\n","import TypesenseError from './TypesenseError';\n\nexport default class MissingConfigurationError extends TypesenseError {}\n","import TypesenseError from './TypesenseError';\n\nexport default class ObjectAlreadyExists extends TypesenseError {}\n","import TypesenseError from './TypesenseError';\n\nexport default class ObjectNotFound extends TypesenseError {}\n","import TypesenseError from './TypesenseError';\n\nexport default class ObjectUnprocessable extends TypesenseError {}\n","import TypesenseError from './TypesenseError';\n\nexport default class RequestMalformed extends TypesenseError {}\n","import TypesenseError from './TypesenseError';\n\nexport default class RequestUnauthorized extends TypesenseError {}\n","import TypesenseError from './TypesenseError';\n\nexport default class ServerError extends TypesenseError {}\n","export default class TypesenseError extends Error {\n httpStatus?: number;\n\n // Source: https://stackoverflow.com/a/58417721/123545\n constructor(message?: string) {\n super(message);\n this.name = new.target.name;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n","import HTTPError from './HTTPError';\nimport MissingConfigurationError from './MissingConfigurationError';\nimport ObjectAlreadyExists from './ObjectAlreadyExists';\nimport ObjectNotFound from './ObjectNotFound';\nimport ObjectUnprocessable from './ObjectUnprocessable';\nimport RequestMalformed from './RequestMalformed';\nimport RequestUnauthorized from './RequestUnauthorized';\nimport ServerError from './ServerError';\nimport ImportError from './ImportError';\nimport TypesenseError from './TypesenseError';\n\nexport {\n HTTPError,\n MissingConfigurationError,\n ObjectAlreadyExists,\n ObjectNotFound,\n ObjectUnprocessable,\n RequestMalformed,\n RequestUnauthorized,\n ServerError,\n TypesenseError,\n ImportError,\n};\n","import ApiCall from './ApiCall';\n\nconst RESOURCEPATH = '/health';\n\nexport interface HealthResponse {\n ok: boolean;\n}\n\nexport default class Health {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from './ApiCall';\nimport Keys from './Keys';\n\nexport interface KeyCreateSchema {\n actions: string[];\n collections: string[];\n description?: string;\n value?: string;\n value_prefix?: string;\n expires_at?: number;\n}\n\nexport interface KeyDeleteSchema {\n id: number;\n}\n\nexport interface KeySchema extends KeyCreateSchema {\n id: number;\n}\n\nexport default class Key {\n constructor(\n private id: number,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Keys.RESOURCEPATH}/${this.id}`;\n }\n}\n","import { createHmac } from 'crypto';\nimport ApiCall from './ApiCall';\nimport { KeyCreateSchema, KeySchema } from './Key';\nimport { SearchParams } from './Documents';\n\nconst RESOURCEPATH = '/keys';\n\nexport interface KeysRetrieveSchema {\n keys: KeySchema[];\n}\n\nexport interface GenerateScopedSearchKeyParams extends Partial {\n expires_at?: number;\n cache_ttl?: number;\n limit_multi_searches?: number;\n}\n\nexport default class Keys {\n constructor(private apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async create(params: KeyCreateSchema): Promise {\n return this.apiCall.post(Keys.RESOURCEPATH, params);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n generateScopedSearchKey(\n searchKey: string,\n parameters: GenerateScopedSearchKeyParams,\n ): string {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n const paramsJSON = JSON.stringify(parameters);\n const digest = Buffer.from(\n createHmac('sha256', searchKey).update(paramsJSON).digest('base64'),\n );\n const keyPrefix = searchKey.substr(0, 4);\n const rawScopedKey = `${digest}${keyPrefix}${paramsJSON}`;\n\n return Buffer.from(rawScopedKey).toString('base64');\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\n\nconst RESOURCEPATH = '/metrics.json';\n\nexport interface MetricsResponse {\n [key: `system_cpu${number}_active_percentage`]: string;\n system_cpu_active_percentage: string;\n system_disk_total_bytes: string;\n system_disk_used_bytes: string;\n system_memory_total_bytes: string;\n system_memory_total_swap_bytes?: string;\n system_memory_used_bytes: string;\n system_memory_used_swap_bytes?: string;\n system_network_received_bytes: string;\n system_network_sent_bytes: string;\n typesense_memory_active_bytes: string;\n typesense_memory_allocated_bytes: string;\n typesense_memory_fragmentation_ratio: string;\n typesense_memory_mapped_bytes: string;\n typesense_memory_metadata_bytes: string;\n typesense_memory_resident_bytes: string;\n typesense_memory_retained_bytes: string;\n}\n\nexport default class Metrics {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from './ApiCall';\nimport Configuration from './Configuration';\nimport RequestWithCache from './RequestWithCache';\nimport {\n DocumentSchema,\n SearchParams,\n SearchParamsWithPreset,\n SearchResponse,\n} from './Documents';\n\nconst RESOURCEPATH = '/multi_search';\n\nexport interface MultiSearchRequestSchema extends SearchParams {\n collection?: string;\n 'x-typesense-api-key'?: string;\n}\n\nexport interface MultiSearchRequestWithPresetSchema\n extends SearchParamsWithPreset {\n collection?: string;\n 'x-typesense-api-key'?: string;\n}\n\nexport interface MultiSearchRequestsSchema {\n searches: (MultiSearchRequestSchema | MultiSearchRequestWithPresetSchema)[];\n}\n\nexport interface MultiSearchResponse {\n results: { [Index in keyof T]: SearchResponse } & {\n length: T['length'];\n };\n}\n\nexport default class MultiSearch {\n private requestWithCache: RequestWithCache;\n\n constructor(\n private apiCall: ApiCall,\n private configuration: Configuration,\n private useTextContentType: boolean = false,\n ) {\n this.requestWithCache = new RequestWithCache();\n }\n\n clearCache() {\n this.requestWithCache.clearCache();\n }\n\n async perform(\n searchRequests: MultiSearchRequestsSchema,\n commonParams: Partial = {},\n {\n cacheSearchResultsForSeconds = this.configuration\n .cacheSearchResultsForSeconds,\n }: { cacheSearchResultsForSeconds?: number } = {},\n ): Promise> {\n const additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders['content-type'] = 'text/plain';\n }\n\n const additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams['use_cache'] = true;\n }\n const queryParams = Object.assign({}, commonParams, additionalQueryParams);\n\n return this.requestWithCache.perform(\n this.apiCall,\n this.apiCall.post,\n [RESOURCEPATH, searchRequests, queryParams, additionalHeaders],\n { cacheResponseForSeconds: cacheSearchResultsForSeconds },\n ) as Promise>;\n }\n}\n","import ApiCall from './ApiCall';\n\nconst RESOURCEPATH = '/operations';\n\nexport default class Operations {\n constructor(private apiCall: ApiCall) {}\n\n async perform(\n operationName: 'vote' | 'snapshot' | 'cache/clear' | string,\n queryParameters: Record = {},\n ): Promise {\n return this.apiCall.post(\n `${RESOURCEPATH}/${operationName}`,\n {},\n queryParameters,\n );\n }\n}\n","import ApiCall from './ApiCall';\nimport Collections from './Collections';\nimport Overrides, { OverrideCreateSchema } from './Overrides';\n\nexport interface OverrideSchema extends OverrideCreateSchema {\n id: string;\n}\n\nexport interface OverrideDeleteSchema {\n id: string;\n}\n\nexport default class Override {\n constructor(\n private collectionName: string,\n private overrideId: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${Overrides.RESOURCEPATH}/${this.overrideId}`;\n }\n}\n","import ApiCall from './ApiCall';\nimport Collections from './Collections';\nimport { OverrideSchema } from './Override';\n\nconst RESOURCEPATH = '/overrides';\n\nexport interface OverrideRuleQuerySchema {\n query?: string;\n match?: 'exact' | 'contains';\n}\n\nexport interface OverrideRuleFilterSchema {\n filter_by?: string;\n}\n\nexport interface OverrideRuleTagsSchema {\n tags?: string[];\n}\n\nexport interface OverrideCreateSchema {\n rule: OverrideRuleQuerySchema &\n OverrideRuleFilterSchema &\n OverrideRuleTagsSchema;\n filter_by?: string;\n sort_by?: string;\n remove_matched_tokens?: boolean;\n replace_query?: string;\n includes?: Array<{\n id: string;\n position: number;\n }>;\n excludes?: Array<{ id: string }>;\n filter_curated_hits?: boolean;\n effective_from_ts?: number;\n effective_to_ts?: number;\n stop_processing?: boolean;\n metadata?: object;\n}\n\nexport interface OverridesRetrieveSchema {\n overrides: OverrideSchema[];\n}\n\nexport default class Overrides {\n constructor(\n private collectionName: string,\n private apiCall: ApiCall,\n ) {}\n\n async upsert(\n overrideId: string,\n params: OverrideCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(overrideId),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${\n Overrides.RESOURCEPATH\n }${operation === undefined ? '' : '/' + operation}`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport Presets, { PresetCreateSchema } from './Presets';\n\nexport interface PresetSchema extends PresetCreateSchema {\n name: string;\n}\n\nexport interface PresetDeleteSchema {\n name: string;\n}\n\nexport default class Preset {\n constructor(\n private presetId: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Presets.RESOURCEPATH}/${this.presetId}`;\n }\n}\n","import ApiCall from './ApiCall';\nimport { PresetSchema } from './Preset';\nimport { SearchParams } from './Documents';\nimport { MultiSearchRequestsSchema } from './MultiSearch';\n\nconst RESOURCEPATH = '/presets';\n\nexport interface PresetCreateSchema {\n value: SearchParams | MultiSearchRequestsSchema;\n}\n\nexport interface PresetsRetrieveSchema {\n presets: PresetSchema[];\n}\n\nexport default class Presets {\n constructor(private apiCall: ApiCall) {}\n\n async upsert(\n presetId: string,\n params: PresetCreateSchema,\n ): Promise {\n return this.apiCall.put(this.endpointPath(presetId), params);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${Presets.RESOURCEPATH}${\n operation === undefined ? '' : '/' + operation\n }`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","const defaultCacheResponseForSeconds = 2 * 60;\nconst defaultMaxSize = 100;\n\nexport default class RequestWithCache {\n private responseCache: Map = new Map();\n private responsePromiseCache: Map = new Map();\n\n clearCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n async perform(\n requestContext: any,\n requestFunction: (...params: any) => unknown,\n requestFunctionArguments: any[],\n cacheOptions: CacheOptions,\n ): Promise {\n const {\n cacheResponseForSeconds = defaultCacheResponseForSeconds,\n maxSize = defaultMaxSize,\n } = cacheOptions;\n const isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n\n if (isCacheDisabled) {\n return requestFunction.call(requestContext, ...requestFunctionArguments);\n }\n\n const requestFunctionArgumentsJSON = JSON.stringify(\n requestFunctionArguments,\n );\n const cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n const now = Date.now();\n\n if (cacheEntry) {\n const isEntryValid =\n now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return Promise.resolve(cacheEntry.response);\n } else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n\n const cachePromiseEntry = this.responsePromiseCache.get(\n requestFunctionArgumentsJSON,\n );\n\n if (cachePromiseEntry) {\n const isEntryValid =\n now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(\n requestFunctionArgumentsJSON,\n cachePromiseEntry,\n );\n return cachePromiseEntry.responsePromise;\n } else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n\n const responsePromise = requestFunction.call(\n requestContext,\n ...requestFunctionArguments,\n );\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise,\n });\n\n const response = await responsePromise;\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response,\n });\n\n const isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n const oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n const isResponsePromiseCacheOverMaxSize =\n this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n const oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return response as T;\n }\n}\n\ninterface CacheOptions {\n cacheResponseForSeconds?: number;\n maxSize?: number;\n}\n","import Configuration, { ConfigurationOptions } from './Configuration';\nimport ApiCall from './ApiCall';\nimport MultiSearch from './MultiSearch';\nimport { DocumentSchema } from './Documents';\nimport { SearchOnlyCollection } from './SearchOnlyCollection';\n\nexport default class SearchClient {\n public readonly multiSearch: MultiSearch;\n private readonly configuration: Configuration;\n private readonly apiCall: ApiCall;\n private readonly individualCollections: Record;\n\n constructor(options: ConfigurationOptions) {\n options.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam ?? true;\n if (\n options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || '').length > 2000\n ) {\n console.warn(\n '[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.',\n );\n options.sendApiKeyAsQueryParam = false;\n }\n\n this.configuration = new Configuration(options);\n this.apiCall = new ApiCall(this.configuration);\n this.multiSearch = new MultiSearch(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n\n clearCache() {\n this.multiSearch.clearCache();\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(([_, collection]) => {\n collection.documents().clearCache();\n });\n }\n\n collections(\n collectionName: string,\n ): SearchOnlyCollection | SearchOnlyCollection {\n if (!collectionName) {\n throw new Error(\n 'Typesense.SearchClient only supports search operations, so the collectionName that needs to ' +\n 'be searched must be specified. Use Typesense.Client if you need to access the collection object.',\n );\n } else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection(\n collectionName,\n this.apiCall,\n this.configuration,\n );\n }\n return this.individualCollections[collectionName];\n }\n }\n}\n","import { DocumentSchema, SearchableDocuments } from './Documents';\nimport ApiCall from './ApiCall';\nimport { SearchOnlyDocuments } from './SearchOnlyDocuments';\n\nexport class SearchOnlyCollection {\n private readonly _documents: SearchableDocuments;\n\n constructor(\n private readonly name: string,\n private readonly apiCall: ApiCall,\n private readonly configuration: any,\n ) {\n this._documents = new SearchOnlyDocuments(\n this.name,\n this.apiCall,\n this.configuration,\n );\n }\n\n documents(): SearchableDocuments {\n return this._documents;\n }\n}\n","import RequestWithCache from './RequestWithCache';\nimport ApiCall from './ApiCall';\nimport Configuration from './Configuration';\nimport Collections from './Collections';\nimport type {\n DocumentSchema,\n SearchableDocuments,\n SearchOptions,\n SearchParams,\n SearchParamsWithPreset,\n SearchResponse,\n} from './Documents';\n\nconst RESOURCEPATH = '/documents';\n\nexport class SearchOnlyDocuments\n implements SearchableDocuments\n{\n protected requestWithCache: RequestWithCache = new RequestWithCache();\n\n constructor(\n protected collectionName: string,\n protected apiCall: ApiCall,\n protected configuration: Configuration,\n ) {}\n\n clearCache() {\n this.requestWithCache.clearCache();\n }\n\n async search(\n searchParameters: SearchParams | SearchParamsWithPreset,\n {\n cacheSearchResultsForSeconds = this.configuration\n .cacheSearchResultsForSeconds,\n abortSignal = null,\n }: SearchOptions = {},\n ): Promise> {\n const additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams['use_cache'] = true;\n }\n for (const key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(',');\n }\n }\n const queryParams = Object.assign(\n {},\n searchParameters,\n additionalQueryParams,\n );\n\n return this.requestWithCache.perform(\n this.apiCall,\n this.apiCall.get,\n [this.endpointPath('search'), queryParams, { abortSignal }],\n {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n },\n ) as Promise>;\n }\n\n protected endpointPath(operation?: string) {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${RESOURCEPATH}${\n operation === undefined ? '' : '/' + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\n\nconst RESOURCEPATH = '/stats.json';\n\nexport interface EndpointStats {\n [endpoint: string]: number;\n}\n\nexport interface StatsResponse {\n delete_latency_ms?: number;\n delete_requests_per_second?: number;\n import_latency_ms?: number;\n import_requests_per_second?: number;\n latency_ms?: EndpointStats;\n overloaded_requests_per_second?: number;\n pending_write_batches?: number;\n requests_per_second?: EndpointStats;\n search_latency_ms?: number;\n search_requests_per_second?: number;\n total_requests_per_second?: number;\n write_latency_ms?: number;\n write_requests_per_second?: number;\n}\n\nexport default class Metrics {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from './ApiCall';\nimport Stopwords, { StopwordCreateSchema } from './Stopwords';\n\nexport interface StopwordSchema extends StopwordCreateSchema {\n id: string;\n stopwords: string[];\n locale?: string;\n}\n\nexport interface StopwordDeleteSchema {\n id: string;\n}\n\nexport default class Stopword {\n constructor(\n private stopwordId: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Stopwords.RESOURCEPATH}/${this.stopwordId}`;\n }\n}\n","import ApiCall from './ApiCall';\nimport { StopwordSchema } from './Stopword';\n\nconst RESOURCEPATH = '/stopwords';\n\nexport interface StopwordCreateSchema {\n stopwords: string[];\n locale?: string;\n}\n\nexport interface StopwordsRetrieveSchema {\n stopwords: StopwordSchema[];\n}\n\nexport default class Stopwords {\n constructor(private apiCall: ApiCall) {}\n\n async upsert(\n stopwordId: string,\n params: StopwordCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(stopwordId),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${Stopwords.RESOURCEPATH}${\n operation === undefined ? '' : '/' + operation\n }`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport Collections from './Collections';\nimport Synonyms, { SynonymCreateSchema } from './Synonyms';\n\nexport interface SynonymSchema extends SynonymCreateSchema {\n id: string;\n}\n\nexport interface SynonymDeleteSchema {\n id: string;\n}\n\nexport default class Synonym {\n constructor(\n private collectionName: string,\n private synonymId: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${Synonyms.RESOURCEPATH}/${this.synonymId}`;\n }\n}\n","import ApiCall from './ApiCall';\nimport Collections from './Collections';\nimport { SynonymSchema } from './Synonym';\n\nconst RESOURCEPATH = '/synonyms';\n\nexport interface SynonymCreateSchema {\n synonyms: string[];\n root?: string;\n locale?: string;\n symbols_to_index?: string[];\n}\n\nexport interface SynonymsRetrieveSchema {\n synonyms: SynonymSchema[];\n}\n\nexport default class Synonyms {\n constructor(\n private collectionName: string,\n private apiCall: ApiCall,\n ) {}\n\n async upsert(\n synonymId: string,\n params: SynonymCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(synonymId),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string) {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${\n Synonyms.RESOURCEPATH\n }${operation === undefined ? '' : '/' + operation}`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n var _loggersByName = {};\n var defaultLogger = null;\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods() {\n /*jshint validthis:true */\n var level = this.getLevel();\n\n // Replace the actual methods.\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, this.name);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n\n // Return any important warnings.\n if (typeof console === undefinedType && level < this.levels.SILENT) {\n return \"No console available for logging\";\n }\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, _level, _loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, factory) {\n // Private instance variables.\n var self = this;\n /**\n * The level inherited from a parent logger (or a global default). We\n * cache this here rather than delegating to the parent so that it stays\n * in sync with the actual logging methods that we have installed (the\n * parent could change levels but we might not have rebuilt the loggers\n * in this child yet).\n * @type {number}\n */\n var inheritedLevel;\n /**\n * The default level for this logger, if any. If set, this overrides\n * `inheritedLevel`.\n * @type {number|null}\n */\n var defaultLevel;\n /**\n * A user-specific level for this logger. If set, this overrides\n * `defaultLevel`.\n * @type {number|null}\n */\n var userLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var cookieName = encodeURIComponent(storageKey);\n var location = cookie.indexOf(cookieName + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(\n cookie.slice(location + cookieName.length + 1)\n )[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n function normalizeLevel(input) {\n var level = input;\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n return level;\n } else {\n throw new TypeError(\"log.setLevel() called with invalid level: \" + input);\n }\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n if (userLevel != null) {\n return userLevel;\n } else if (defaultLevel != null) {\n return defaultLevel;\n } else {\n return inheritedLevel;\n }\n };\n\n self.setLevel = function (level, persist) {\n userLevel = normalizeLevel(level);\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(userLevel);\n }\n\n // NOTE: in v2, this should call rebuild(), which updates children.\n return replaceLoggingMethods.call(self);\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = normalizeLevel(level);\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n userLevel = null;\n clearPersistedLevel();\n replaceLoggingMethods.call(self);\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n self.rebuild = function () {\n if (defaultLogger !== self) {\n inheritedLevel = normalizeLevel(defaultLogger.getLevel());\n }\n replaceLoggingMethods.call(self);\n\n if (defaultLogger === self) {\n for (var childName in _loggersByName) {\n _loggersByName[childName].rebuild();\n }\n }\n };\n\n // Initialize all the internal levels.\n inheritedLevel = normalizeLevel(\n defaultLogger ? defaultLogger.getLevel() : \"WARN\"\n );\n var initialLevel = getPersistedLevel();\n if (initialLevel != null) {\n userLevel = normalizeLevel(initialLevel);\n }\n replaceLoggingMethods.call(self);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n defaultLogger = new Logger();\n\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name,\n defaultLogger.methodFactory\n );\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","/* (ignored) */","/* (ignored) */","/* (ignored) */","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(t, e, r) {\n if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);\n var o = [null];\n o.push.apply(o, e);\n var p = new (t.bind.apply(t, o))();\n return r && setPrototypeOf(p, r.prototype), p;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","export default function _isNativeFunction(fn) {\n try {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n } catch (e) {\n return typeof fn === \"function\";\n }\n}","export default function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : String(i);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","export const VERSION = \"1.6.7\";","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import Client from './Typesense/Client';\nimport SearchClient from './Typesense/SearchClient';\nimport * as Errors from './Typesense/Errors';\n\nexport { Client, SearchClient, Errors };\nexport default { Client, SearchClient, Errors };\n"],"names":["Aliases","Alias","name","apiCall","_classCallCheck","_createClass","key","value","_retrieve","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_callee$","_context","prev","next","abrupt","get","endpointPath","stop","retrieve","apply","arguments","_delete2","_callee2","_callee2$","_context2","delete","_delete","concat","RESOURCEPATH","default","_upsert","mapping","put","upsert","_x","_x2","aliasName","AnalyticsRules","AnalyticsRule","AnalyticsEvents","Analytics","_defineProperty","_analyticsRules","_analyticsEvents","rules","id","undefined","individualAnalyticsRules","events","_create","params","post","create","operation","axios","HTTPError","ObjectAlreadyExists","ObjectNotFound","ObjectUnprocessable","RequestMalformed","RequestUnauthorized","ServerError","TypesenseError","Agent","HTTPAgent","HTTPSAgent","APIKEYHEADERNAME","HEALTHY","UNHEALTHY","ApiCall","configuration","apiKey","nodes","JSON","parse","stringify","nearestNode","connectionTimeoutSeconds","healthcheckIntervalSeconds","numRetriesPerRequest","numRetries","retryIntervalSeconds","sendApiKeyAsQueryParam","additionalUserHeaders","additionalHeaders","logger","initializeMetadataForNodes","currentNodeIndex","_get","endpoint","queryParameters","_ref","_ref$abortSignal","abortSignal","_ref$responseType","responseType","_args","length","performRequest","_args2","_post","_callee3","bodyParameters","_args3","_callee3$","_context3","_x3","_put","_callee4","_args4","_callee4$","_context4","_x4","_patch","_callee5","_args5","_callee5$","_context5","patch","_x5","_performRequest","_callee6","requestType","_ref2","_this","_ref2$queryParameters","_ref2$bodyParameters","_ref2$additionalHeade","_ref2$abortSignal","_ref2$responseType","_ref2$skipConnectionT","skipConnectionTimeout","_ref2$enableKeepAlive","enableKeepAlive","requestNumber","lastException","_loop","_ret","numTries","_callee6$","_context7","validate","Date","now","debug","toUpperCase","node","abortListener","requestOptions","cancelToken","source","response","_response$data","_response$data2","_error$response","_loop$","_context6","getNextNode","index","aborted","v","Promise","reject","Error","method","url","uriFor","headers","Object","assign","defaultHeaders","maxContentLength","Infinity","maxBodyLength","validateStatus","status","transformResponse","data","transformedData","startsWith","timeout","keys","httpAgent","keepAlive","httpsAgent","paramsSerializer","_typeof","CancelToken","cancel","addEventListener","token","sent","setNodeHealthcheck","resolve","customErrorForResponse","message","t0","warn","code","timer","removeEventListener","finish","delegateYield","_x6","_x7","_x8","isHealthy","nodeDueForHealthcheck","map","join","candidateNode","i","isDueForHealthcheck","lastAccessTimestamp","_this2","forEach","protocol","host","port","path","_timer","_callee7","seconds","_callee7$","_context8","setTimeout","_x9","messageFromServer","errorMessage","trim","error","httpStatus","Configuration","Collections","Collection","Keys","Key","Debug","Metrics","Stats","Health","Operations","MultiSearch","Presets","Preset","Stopwords","Stopword","Conversations","Conversation","Client","options","_options$sendApiKeyAs","metrics","stats","health","operations","multiSearch","_collections","individualCollections","_aliases","individualAliases","_keys","individualKeys","_presets","individualPresets","_stopwords","individualStopwords","analytics","_conversations","individualConversations","collections","collectionName","aliases","presets","stopwords","conversations","Documents","Overrides","Override","Synonyms","Synonym","Document","_documents","_overrides","_synonyms","_update","schema","update","_exists","exists","documents","documentId","individualDocuments","overrides","overrideId","individualOverrides","synonyms","synonymId","individualSynonyms","MissingConfigurationError","setDefaultPathInNode","setDefaultPortInNode","_objectSpread","randomizeNodes","shuffleArray","timeoutSeconds","cacheSearchResultsForSeconds","useServerSideSearchCache","logLevel","setLevel","showDeprecationWarnings","validateNodes","isNodeMissingAnyParameters","some","every","hasOwnProperty","masterNode","readReplicaNodes","array","j","Math","floor","random","ConversationModels","ConversationModel","_conversationsModels","models","individualConversationModels","partialDocument","ImportError","SearchOnlyDocuments","_inherits","_callSuper","document","action","query","_createMany","import","createMany","_import2","documentsInJSONLFormat","resultsInJSONLFormat","resultsInJSONFormat","failedItems","_args6","Array","isArray","RangeError","includes","split","r","filter","success","_import","_export2","_args7","_export","_exportStream","_callee8","_args8","_callee8$","exportStream","_TypesenseError","importResults","_Error","constructor","setPrototypeOf","_assertThisInitialized","prototype","_wrapNativeSuper","createHmac","generateScopedSearchKey","searchKey","parameters","paramsJSON","digest","Buffer","from","keyPrefix","substr","rawScopedKey","toString","RequestWithCache","useTextContentType","requestWithCache","clearCache","_perform","searchRequests","commonParams","_ref$cacheSearchResul","additionalQueryParams","queryParams","perform","cacheResponseForSeconds","operationName","presetId","defaultCacheResponseForSeconds","defaultMaxSize","Map","responseCache","responsePromiseCache","requestContext","requestFunction","requestFunctionArguments","cacheOptions","_cacheOptions$cacheRe","_cacheOptions$maxSize","maxSize","isCacheDisabled","requestFunctionArgumentsJSON","cacheEntry","isEntryValid","cachePromiseEntry","_isEntryValid","responsePromise","isCacheOverMaxSize","oldestEntry","isResponsePromiseCacheOverMaxSize","_oldestEntry","call","_toConsumableArray","requestTimestamp","set","size","SearchOnlyCollection","SearchClient","console","entries","_slicedToArray","_","collection","_search","searchParameters","search","stopwordId","Errors"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/typesense.min.js.map b/dist/typesense.min.js.map index 293a96f3..dc0fc226 100644 --- a/dist/typesense.min.js.map +++ b/dist/typesense.min.js.map @@ -1 +1 @@ -{"version":3,"file":"typesense.min.js","mappings":";8CAAA,SAMC,SAAUA,EAAMC,GACb,aAEI,EAMA,WAIJ,IAAIC,EAAO,WAAY,EACnBC,EAAgB,YAChBC,SAAeC,SAAWF,UAA0BE,OAAOC,YAAcH,GACzE,kBAAkBI,KAAKF,OAAOC,UAAUE,WAGxCC,EAAa,CACb,QACA,QACA,OACA,OACA,SAGAC,EAAiB,CAAC,EAClBC,EAAgB,KAGpB,SAASC,EAAWC,EAAKC,GACrB,IAAIC,EAASF,EAAIC,GACjB,GAA2B,mBAAhBC,EAAOC,KACd,OAAOD,EAAOC,KAAKH,GAEnB,IACI,OAAOI,SAASC,UAAUF,KAAKG,KAAKJ,EAAQF,EAChD,CAAE,MAAOO,GAEL,OAAO,WACH,OAAOH,SAASC,UAAUG,MAAMA,MAAMN,EAAQ,CAACF,EAAKS,WACxD,CACJ,CAER,CAGA,SAASC,IACDC,QAAQC,MACJD,QAAQC,IAAIJ,MACZG,QAAQC,IAAIJ,MAAMG,QAASF,WAG3BL,SAASC,UAAUG,MAAMA,MAAMG,QAAQC,IAAK,CAACD,QAASF,aAG1DE,QAAQE,OAAOF,QAAQE,OAC/B,CAwBA,SAASC,IAKL,IAHA,IAAIC,EAAQC,KAAKC,WAGRC,EAAI,EAAGA,EAAItB,EAAWuB,OAAQD,IAAK,CACxC,IAAIjB,EAAaL,EAAWsB,GAC5BF,KAAKf,GAAeiB,EAAIH,EACpB1B,EACA2B,KAAKI,cAAcnB,EAAYc,EAAOC,KAAKK,KACnD,CAMA,GAHAL,KAAKJ,IAAMI,KAAKM,aAGLX,UAAYrB,GAAiByB,EAAQC,KAAKO,OAAOC,OACxD,MAAO,kCAEf,CAIA,SAASC,EAAgCxB,GACrC,OAAO,kBACQU,UAAYrB,IACnBwB,EAAsBR,KAAK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,MAAQD,EAAG,CACb,IAAIxE,EACF2E,EACAhE,EACA0E,EACAJ,EAAI,GACJoB,GAAI,EACJxB,GAAI,EACN,IACE,GAAIlE,GAAK6D,EAAIA,EAAEzE,KAAK0E,IAAIyD,KAAM,IAAM9B,EAAG,CACrC,GAAI1B,OAAOF,KAAOA,EAAG,OACrB6B,GAAI,CACN,MAAO,OAASA,GAAKrG,EAAIW,EAAEZ,KAAKyE,IAAIkD,QAAUzC,EAAEyD,KAAK1I,EAAE+E,OAAQE,EAAErE,SAAWwF,GAAIC,GAAI,GACtF,CAAE,MAAO5B,GACPI,GAAI,EAAIF,EAAIF,CACd,CAAE,QACA,IACE,IAAK4B,GAAK,MAAQ7B,EAAU,SAAMa,EAAIb,EAAU,SAAKE,OAAOW,KAAOA,GAAI,MACzE,CAAE,QACA,GAAIR,EAAG,MAAMF,CACf,CACF,CACA,OAAOM,CACT,CACF,CFrBgC,CAAqBoR,EAAK1V,IAAM,GAA2B0V,EAAK1V,IGLjF,WACb,MAAM,IAAImC,UAAU,4IACtB,CHGsG,ID6B5CwzB,EAAA,GAAYA,EAAA,GACrD0G,YAAYlB,YACzB,GACF,GAAC,CAAAjxB,IAAA,cAAA9F,MAED,SACE42B,GAEA,GAAKA,EAaH,YAPmDr6B,IAA/Cb,KAAK2hC,sBAAsBzG,KAC7Bl7B,KAAK2hC,sBAAsBzG,GAAkB,IAAIqH,GAC/CrH,EACAl7B,KAAKi5B,QACLj5B,KAAKozB,gBAGFpzB,KAAK2hC,sBAAsBzG,GAZlC,MAAM,IAAIl0B,MACR,+LAaN,KAACw7B,CAAA,CAnD8B,GKDjC,UAAiBtB,OAAAA,GAAQsB,aAAAA,GAAcC,OAAAA","sources":["webpack://Typesense/./node_modules/loglevel/lib/loglevel.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/typeof.js","webpack://Typesense/./node_modules/@babel/runtime/regenerator/index.js","webpack://Typesense/webpack/bootstrap","webpack://Typesense/webpack/runtime/compat get default export","webpack://Typesense/webpack/runtime/define property getters","webpack://Typesense/webpack/runtime/hasOwnProperty shorthand","webpack://Typesense/webpack/runtime/make namespace object","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/construct.js","webpack://Typesense/./src/Typesense/Errors/TypesenseError.ts","webpack://Typesense/./src/Typesense/Errors/MissingConfigurationError.ts","webpack://Typesense/./src/Typesense/Configuration.ts","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://Typesense/./node_modules/axios/lib/helpers/bind.js","webpack://Typesense/./node_modules/axios/lib/utils.js","webpack://Typesense/./node_modules/axios/lib/core/AxiosError.js","webpack://Typesense/./node_modules/axios/lib/helpers/toFormData.js","webpack://Typesense/./node_modules/axios/lib/helpers/AxiosURLSearchParams.js","webpack://Typesense/./node_modules/axios/lib/helpers/buildURL.js","webpack://Typesense/./node_modules/axios/lib/core/InterceptorManager.js","webpack://Typesense/./node_modules/axios/lib/defaults/transitional.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/index.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/classes/FormData.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/classes/Blob.js","webpack://Typesense/./node_modules/axios/lib/platform/common/utils.js","webpack://Typesense/./node_modules/axios/lib/platform/index.js","webpack://Typesense/./node_modules/axios/lib/helpers/formDataToJSON.js","webpack://Typesense/./node_modules/axios/lib/defaults/index.js","webpack://Typesense/./node_modules/axios/lib/helpers/toURLEncodedForm.js","webpack://Typesense/./node_modules/axios/lib/helpers/parseHeaders.js","webpack://Typesense/./node_modules/axios/lib/core/AxiosHeaders.js","webpack://Typesense/./node_modules/axios/lib/core/transformData.js","webpack://Typesense/./node_modules/axios/lib/cancel/isCancel.js","webpack://Typesense/./node_modules/axios/lib/cancel/CanceledError.js","webpack://Typesense/./node_modules/axios/lib/helpers/cookies.js","webpack://Typesense/./node_modules/axios/lib/core/buildFullPath.js","webpack://Typesense/./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://Typesense/./node_modules/axios/lib/helpers/combineURLs.js","webpack://Typesense/./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://Typesense/./node_modules/axios/lib/adapters/xhr.js","webpack://Typesense/./node_modules/axios/lib/helpers/speedometer.js","webpack://Typesense/./node_modules/axios/lib/adapters/adapters.js","webpack://Typesense/./node_modules/axios/lib/helpers/null.js","webpack://Typesense/./node_modules/axios/lib/core/settle.js","webpack://Typesense/./node_modules/axios/lib/helpers/parseProtocol.js","webpack://Typesense/./node_modules/axios/lib/core/dispatchRequest.js","webpack://Typesense/./node_modules/axios/lib/core/mergeConfig.js","webpack://Typesense/./node_modules/axios/lib/env/data.js","webpack://Typesense/./node_modules/axios/lib/helpers/validator.js","webpack://Typesense/./node_modules/axios/lib/core/Axios.js","webpack://Typesense/./node_modules/axios/lib/cancel/CancelToken.js","webpack://Typesense/./node_modules/axios/lib/helpers/HttpStatusCode.js","webpack://Typesense/./node_modules/axios/lib/axios.js","webpack://Typesense/./node_modules/axios/lib/helpers/spread.js","webpack://Typesense/./node_modules/axios/lib/helpers/isAxiosError.js","webpack://Typesense/./src/Typesense/Errors/RequestMalformed.ts","webpack://Typesense/./src/Typesense/Errors/RequestUnauthorized.ts","webpack://Typesense/./src/Typesense/Errors/ObjectNotFound.ts","webpack://Typesense/./src/Typesense/Errors/ObjectAlreadyExists.ts","webpack://Typesense/./src/Typesense/Errors/ObjectUnprocessable.ts","webpack://Typesense/./src/Typesense/Errors/ServerError.ts","webpack://Typesense/./src/Typesense/Errors/HTTPError.ts","webpack://Typesense/./src/Typesense/ApiCall.ts","webpack://Typesense/./src/Typesense/Collections.ts","webpack://Typesense/./src/Typesense/Errors/ImportError.ts","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://Typesense/./src/Typesense/RequestWithCache.ts","webpack://Typesense/./src/Typesense/SearchOnlyDocuments.ts","webpack://Typesense/./src/Typesense/Documents.ts","webpack://Typesense/./src/Typesense/Overrides.ts","webpack://Typesense/./src/Typesense/Override.ts","webpack://Typesense/./src/Typesense/Synonyms.ts","webpack://Typesense/./src/Typesense/Synonym.ts","webpack://Typesense/./src/Typesense/Document.ts","webpack://Typesense/./src/Typesense/Collection.ts","webpack://Typesense/./src/Typesense/Aliases.ts","webpack://Typesense/./src/Typesense/Alias.ts","webpack://Typesense/./src/Typesense/Keys.ts","webpack://Typesense/./src/Typesense/Key.ts","webpack://Typesense/./src/Typesense/Debug.ts","webpack://Typesense/./src/Typesense/Metrics.ts","webpack://Typesense/./src/Typesense/Stats.ts","webpack://Typesense/./src/Typesense/Health.ts","webpack://Typesense/./src/Typesense/Operations.ts","webpack://Typesense/./src/Typesense/MultiSearch.ts","webpack://Typesense/./src/Typesense/Presets.ts","webpack://Typesense/./src/Typesense/Preset.ts","webpack://Typesense/./src/Typesense/AnalyticsRules.ts","webpack://Typesense/./src/Typesense/AnalyticsRule.ts","webpack://Typesense/./src/Typesense/AnalyticsEvents.ts","webpack://Typesense/./src/Typesense/Analytics.ts","webpack://Typesense/./src/Typesense/Stopwords.ts","webpack://Typesense/./src/Typesense/Stopword.ts","webpack://Typesense/./src/Typesense/ConversationModels.ts","webpack://Typesense/./src/Typesense/ConversationModel.ts","webpack://Typesense/./src/Typesense/Conversations.ts","webpack://Typesense/./src/Typesense/Conversation.ts","webpack://Typesense/./src/Typesense/Client.ts","webpack://Typesense/./src/Typesense/SearchOnlyCollection.ts","webpack://Typesense/./src/Typesense/SearchClient.ts","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://Typesense/./src/Typesense.ts"],"sourcesContent":["/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n var _loggersByName = {};\n var defaultLogger = null;\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods() {\n /*jshint validthis:true */\n var level = this.getLevel();\n\n // Replace the actual methods.\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, this.name);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n\n // Return any important warnings.\n if (typeof console === undefinedType && level < this.levels.SILENT) {\n return \"No console available for logging\";\n }\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, _level, _loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, factory) {\n // Private instance variables.\n var self = this;\n /**\n * The level inherited from a parent logger (or a global default). We\n * cache this here rather than delegating to the parent so that it stays\n * in sync with the actual logging methods that we have installed (the\n * parent could change levels but we might not have rebuilt the loggers\n * in this child yet).\n * @type {number}\n */\n var inheritedLevel;\n /**\n * The default level for this logger, if any. If set, this overrides\n * `inheritedLevel`.\n * @type {number|null}\n */\n var defaultLevel;\n /**\n * A user-specific level for this logger. If set, this overrides\n * `defaultLevel`.\n * @type {number|null}\n */\n var userLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var cookieName = encodeURIComponent(storageKey);\n var location = cookie.indexOf(cookieName + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(\n cookie.slice(location + cookieName.length + 1)\n )[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n function normalizeLevel(input) {\n var level = input;\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n return level;\n } else {\n throw new TypeError(\"log.setLevel() called with invalid level: \" + input);\n }\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n if (userLevel != null) {\n return userLevel;\n } else if (defaultLevel != null) {\n return defaultLevel;\n } else {\n return inheritedLevel;\n }\n };\n\n self.setLevel = function (level, persist) {\n userLevel = normalizeLevel(level);\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(userLevel);\n }\n\n // NOTE: in v2, this should call rebuild(), which updates children.\n return replaceLoggingMethods.call(self);\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = normalizeLevel(level);\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n userLevel = null;\n clearPersistedLevel();\n replaceLoggingMethods.call(self);\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n self.rebuild = function () {\n if (defaultLogger !== self) {\n inheritedLevel = normalizeLevel(defaultLogger.getLevel());\n }\n replaceLoggingMethods.call(self);\n\n if (defaultLogger === self) {\n for (var childName in _loggersByName) {\n _loggersByName[childName].rebuild();\n }\n }\n };\n\n // Initialize all the internal levels.\n inheritedLevel = normalizeLevel(\n defaultLogger ? defaultLogger.getLevel() : \"WARN\"\n );\n var initialLevel = getPersistedLevel();\n if (initialLevel != null) {\n userLevel = normalizeLevel(initialLevel);\n }\n replaceLoggingMethods.call(self);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n defaultLogger = new Logger();\n\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name,\n defaultLogger.methodFactory\n );\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : String(i);\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","export default function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}","export default function _isNativeFunction(fn) {\n try {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n } catch (e) {\n return typeof fn === \"function\";\n }\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(t, e, r) {\n if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);\n var o = [null];\n o.push.apply(o, e);\n var p = new (t.bind.apply(t, o))();\n return r && setPrototypeOf(p, r.prototype), p;\n}","export default class TypesenseError extends Error {\n httpStatus?: number;\n\n // Source: https://stackoverflow.com/a/58417721/123545\n constructor(message?: string) {\n super(message);\n this.name = new.target.name;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class MissingConfigurationError extends TypesenseError {}\n","import * as logger from \"loglevel\";\nimport { Logger, LogLevelDesc } from \"loglevel\";\nimport { MissingConfigurationError } from \"./Errors\";\nimport type { Agent as HTTPAgent } from \"http\";\nimport type { Agent as HTTPSAgent } from \"https\";\n\nexport interface NodeConfiguration {\n host: string;\n port: number;\n protocol: string;\n path?: string;\n url?: string;\n}\n\nexport interface NodeConfigurationWithHostname {\n host: string;\n port: number;\n protocol: string;\n path?: string;\n}\n\nexport interface NodeConfigurationWithUrl {\n url: string;\n}\n\nexport interface ConfigurationOptions {\n apiKey: string;\n nodes:\n | NodeConfiguration[]\n | NodeConfigurationWithHostname[]\n | NodeConfigurationWithUrl[];\n randomizeNodes?: boolean;\n /**\n * @deprecated\n * masterNode is now consolidated to nodes, starting with Typesense Server v0.12'\n */\n masterNode?:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl;\n /**\n * @deprecated\n * readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12'\n */\n readReplicaNodes?:\n | NodeConfiguration[]\n | NodeConfigurationWithHostname[]\n | NodeConfigurationWithUrl[];\n nearestNode?:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl;\n connectionTimeoutSeconds?: number;\n timeoutSeconds?: number;\n healthcheckIntervalSeconds?: number;\n numRetries?: number;\n retryIntervalSeconds?: number;\n sendApiKeyAsQueryParam?: boolean | undefined;\n useServerSideSearchCache?: boolean;\n cacheSearchResultsForSeconds?: number;\n additionalHeaders?: Record;\n\n logLevel?: LogLevelDesc;\n logger?: Logger;\n\n /**\n * Set a custom HTTP Agent\n *\n * This is helpful for eg, to enable keepAlive which helps prevents ECONNRESET socket hang up errors\n * Usage:\n * const { Agent: HTTPAgent } = require(\"http\");\n * ...\n * httpAgent: new HTTPAgent({ keepAlive: true }),\n * @type {HTTPAgent}\n */\n httpAgent?: HTTPAgent;\n\n /**\n * Set a custom HTTPS Agent\n *\n * This is helpful for eg, to enable keepAlive which helps prevents ECONNRESET socket hang up errors\n * Usage:\n * const { Agent: HTTPSAgent } = require(\"https\");\n * ...\n * httpsAgent: new HTTPSAgent({ keepAlive: true }),\n * @type {HTTPSAgent}\n */\n httpsAgent?: HTTPSAgent;\n\n /**\n * Set a custom paramsSerializer\n *\n * See axios documentation for more information on how to use this parameter: https://axios-http.com/docs/req_config\n * This is helpful for handling React Native issues like this: https://github.com/axios/axios/issues/6102#issuecomment-2085301397\n * @type {any}\n */\n paramsSerializer?: any;\n}\n\nexport default class Configuration {\n readonly nodes:\n | NodeConfiguration[]\n | NodeConfigurationWithHostname[]\n | NodeConfigurationWithUrl[];\n readonly nearestNode?:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl;\n readonly connectionTimeoutSeconds: number;\n readonly healthcheckIntervalSeconds: number;\n readonly numRetries: number;\n readonly retryIntervalSeconds: number;\n readonly apiKey: string;\n readonly sendApiKeyAsQueryParam?: boolean;\n readonly cacheSearchResultsForSeconds: number;\n readonly useServerSideSearchCache: boolean;\n readonly logger: Logger;\n readonly logLevel: LogLevelDesc;\n readonly additionalHeaders?: Record;\n readonly httpAgent?: HTTPAgent;\n readonly httpsAgent?: HTTPSAgent;\n readonly paramsSerializer?: any;\n\n constructor(options: ConfigurationOptions) {\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map((node) => this.setDefaultPathInNode(node))\n .map((node) => this.setDefaultPortInNode(node))\n .map((node) => ({ ...node })) as NodeConfiguration[]; // Make a deep copy\n\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || \"warn\";\n this.logger.setLevel(this.logLevel);\n\n this.additionalHeaders = options.additionalHeaders;\n\n this.httpAgent = options.httpAgent;\n this.httpsAgent = options.httpsAgent;\n\n this.paramsSerializer = options.paramsSerializer;\n\n this.showDeprecationWarnings(options);\n this.validate();\n }\n\n validate(): boolean {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new MissingConfigurationError(\n \"Ensure that nodes[].protocol, nodes[].host and nodes[].port are set\",\n );\n }\n\n if (\n this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)\n ) {\n throw new MissingConfigurationError(\n \"Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set\",\n );\n }\n\n if (this.apiKey == null) {\n throw new MissingConfigurationError(\"Ensure that apiKey is set\");\n }\n\n return true;\n }\n\n private validateNodes(): boolean {\n return this.nodes.some((node) => {\n return this.isNodeMissingAnyParameters(node);\n });\n }\n\n private isNodeMissingAnyParameters(\n node:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl,\n ): boolean {\n return (\n ![\"protocol\", \"host\", \"port\", \"path\"].every((key) => {\n return node.hasOwnProperty(key);\n }) && node[\"url\"] == null\n );\n }\n\n private setDefaultPathInNode(\n node:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined,\n ):\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined {\n if (node != null && !node.hasOwnProperty(\"path\")) {\n node[\"path\"] = \"\";\n }\n return node;\n }\n\n private setDefaultPortInNode(\n node:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined,\n ):\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined {\n if (\n node != null &&\n !node.hasOwnProperty(\"port\") &&\n node.hasOwnProperty(\"protocol\")\n ) {\n switch (node[\"protocol\"]) {\n case \"https\":\n node[\"port\"] = 443;\n break;\n case \"http\":\n node[\"port\"] = 80;\n break;\n }\n }\n return node;\n }\n\n private showDeprecationWarnings(options: ConfigurationOptions): void {\n if (options.timeoutSeconds) {\n this.logger.warn(\n \"Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds\",\n );\n }\n if (options.masterNode) {\n this.logger.warn(\n \"Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12\",\n );\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\n \"Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12\",\n );\n }\n }\n\n private shuffleArray(array) {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [array[i], array[j]] = [array[j], array[i]];\n }\n }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.7\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class RequestMalformed extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class RequestUnauthorized extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class ObjectNotFound extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class ObjectAlreadyExists extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class ObjectUnprocessable extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class ServerError extends TypesenseError {}\n","import TypesenseError from \"./TypesenseError\";\n\nexport default class HTTPError extends TypesenseError {}\n","import axios, { AxiosRequestConfig, AxiosResponse, Method } from \"axios\";\nimport { Logger } from \"loglevel\";\nimport {\n HTTPError,\n ObjectAlreadyExists,\n ObjectNotFound,\n ObjectUnprocessable,\n RequestMalformed,\n RequestUnauthorized,\n ServerError,\n} from \"./Errors\";\nimport TypesenseError from \"./Errors/TypesenseError\";\nimport Configuration, { NodeConfiguration } from \"./Configuration\";\nimport { Agent as HTTPAgent } from \"http\";\nimport { Agent as HTTPSAgent } from \"https\";\n\nconst APIKEYHEADERNAME = \"X-TYPESENSE-API-KEY\";\nconst HEALTHY = true;\nconst UNHEALTHY = false;\n\ninterface Node extends NodeConfiguration {\n isHealthy: boolean;\n index: string | number;\n}\n\nexport default class ApiCall {\n private readonly apiKey: string;\n private readonly nodes: Node[];\n private readonly nearestNode: Node;\n private readonly connectionTimeoutSeconds: number;\n private readonly healthcheckIntervalSeconds: number;\n private readonly retryIntervalSeconds: number;\n private readonly sendApiKeyAsQueryParam?: boolean;\n private readonly numRetriesPerRequest: number;\n private readonly additionalUserHeaders?: Record;\n\n private readonly logger: Logger;\n private currentNodeIndex: number;\n\n constructor(private configuration: Configuration) {\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n\n this.logger = this.configuration.logger;\n\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n\n async get(\n endpoint: string,\n queryParameters: any = {},\n {\n abortSignal = null,\n responseType = undefined,\n }: {\n abortSignal?: any;\n responseType?: AxiosRequestConfig[\"responseType\"] | undefined;\n } = {},\n ): Promise {\n return this.performRequest(\"get\", endpoint, {\n queryParameters,\n abortSignal,\n responseType,\n });\n }\n\n async delete(endpoint: string, queryParameters: any = {}): Promise {\n return this.performRequest(\"delete\", endpoint, { queryParameters });\n }\n\n async post(\n endpoint: string,\n bodyParameters: any = {},\n queryParameters: any = {},\n additionalHeaders: any = {},\n ): Promise {\n return this.performRequest(\"post\", endpoint, {\n queryParameters,\n bodyParameters,\n additionalHeaders,\n });\n }\n\n async put(\n endpoint: string,\n bodyParameters: any = {},\n queryParameters: any = {},\n ): Promise {\n return this.performRequest(\"put\", endpoint, {\n queryParameters,\n bodyParameters,\n });\n }\n\n async patch(\n endpoint: string,\n bodyParameters: any = {},\n queryParameters: any = {},\n ): Promise {\n return this.performRequest(\"patch\", endpoint, {\n queryParameters,\n bodyParameters,\n });\n }\n\n async performRequest(\n requestType: Method,\n endpoint: string,\n {\n queryParameters = null,\n bodyParameters = null,\n additionalHeaders = {},\n abortSignal = null,\n responseType = undefined,\n skipConnectionTimeout = false,\n enableKeepAlive = undefined,\n }: {\n queryParameters?: any;\n bodyParameters?: any;\n additionalHeaders?: any;\n abortSignal?: any;\n responseType?: AxiosRequestConfig[\"responseType\"] | undefined;\n skipConnectionTimeout?: boolean;\n enableKeepAlive?: boolean | undefined;\n },\n ): Promise {\n this.configuration.validate();\n\n const requestNumber = Date.now();\n let lastException;\n this.logger.debug(\n `Request #${requestNumber}: Performing ${requestType.toUpperCase()} request: ${endpoint}`,\n );\n for (\n let numTries = 1;\n numTries <= this.numRetriesPerRequest + 1;\n numTries++\n ) {\n const node = this.getNextNode(requestNumber);\n this.logger.debug(\n `Request #${requestNumber}: Attempting ${requestType.toUpperCase()} request Try #${numTries} to Node ${\n node.index\n }`,\n );\n\n if (abortSignal && abortSignal.aborted) {\n return Promise.reject(new Error(\"Request aborted by caller.\"));\n }\n\n let abortListener;\n\n try {\n const requestOptions: AxiosRequestConfig = {\n method: requestType,\n url: this.uriFor(endpoint, node),\n headers: Object.assign(\n {},\n this.defaultHeaders(),\n additionalHeaders,\n this.additionalUserHeaders,\n ),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType,\n validateStatus: (status) => {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n (data, headers) => {\n let transformedData = data;\n if (\n headers !== undefined &&\n typeof data === \"string\" &&\n headers[\"content-type\"] &&\n headers[\"content-type\"].startsWith(\"application/json\")\n ) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this.connectionTimeoutSeconds * 1000;\n }\n\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n\n if (this.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params[\"x-typesense-api-key\"] = this.apiKey;\n }\n\n if (this.configuration.httpAgent) {\n this.logger.debug(\n `Request #${requestNumber}: Using custom httpAgent`,\n );\n requestOptions.httpAgent = this.configuration.httpAgent;\n } else if (enableKeepAlive === true) {\n this.logger.debug(`Request #${requestNumber}: Enabling KeepAlive`);\n requestOptions.httpAgent = new HTTPAgent({ keepAlive: true });\n }\n\n if (this.configuration.httpsAgent) {\n this.logger.debug(\n `Request #${requestNumber}: Using custom httpsAgent`,\n );\n requestOptions.httpsAgent = this.configuration.httpsAgent;\n } else if (enableKeepAlive === true) {\n this.logger.debug(`Request #${requestNumber}: Enabling keepAlive`);\n requestOptions.httpsAgent = new HTTPSAgent({ keepAlive: true });\n }\n\n if (this.configuration.paramsSerializer) {\n this.logger.debug(\n `Request #${requestNumber}: Using custom paramsSerializer`,\n );\n requestOptions.paramsSerializer = this.configuration.paramsSerializer;\n }\n\n if (\n bodyParameters &&\n ((typeof bodyParameters === \"string\" &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === \"object\" &&\n Object.keys(bodyParameters).length !== 0))\n ) {\n requestOptions.data = bodyParameters;\n }\n\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n const cancelToken = axios.CancelToken;\n const source = cancelToken.source();\n abortListener = () => source.cancel();\n abortSignal.addEventListener(\"abort\", abortListener);\n requestOptions.cancelToken = source.token;\n }\n\n const response = await axios(requestOptions);\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this.setNodeHealthcheck(node, HEALTHY);\n }\n this.logger.debug(\n `Request #${requestNumber}: Request to Node ${node.index} was made. Response Code was ${response.status}.`,\n );\n\n if (response.status >= 200 && response.status < 300) {\n // If response is 2xx return a resolved promise\n return Promise.resolve(response.data);\n } else if (response.status < 500) {\n // Next, if response is anything but 5xx, don't retry, return a custom error\n return Promise.reject(\n this.customErrorForResponse(response, response.data?.message),\n );\n } else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this.customErrorForResponse(response, response.data?.message);\n }\n } catch (error: any) {\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error;\n this.logger.warn(\n `Request #${requestNumber}: Request to Node ${\n node.index\n } failed due to \"${error.code} ${error.message}${\n error.response == null\n ? \"\"\n : \" - \" + JSON.stringify(error.response?.data)\n }\"`,\n );\n // this.logger.debug(error.stack)\n this.logger.warn(\n `Request #${requestNumber}: Sleeping for ${this.retryIntervalSeconds}s and then retrying request...`,\n );\n await this.timer(this.retryIntervalSeconds);\n } finally {\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener(\"abort\", abortListener);\n }\n }\n }\n this.logger.debug(\n `Request #${requestNumber}: No retries left. Raising last error`,\n );\n return Promise.reject(lastException);\n }\n\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n getNextNode(requestNumber = 0): Node {\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\n `Request #${requestNumber}: Nodes Health: Node ${\n this.nearestNode.index\n } is ${this.nearestNode.isHealthy === true ? \"Healthy\" : \"Unhealthy\"}`,\n );\n if (\n this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)\n ) {\n this.logger.debug(\n `Request #${requestNumber}: Updated current node to Node ${this.nearestNode.index}`,\n );\n return this.nearestNode;\n }\n this.logger.debug(\n `Request #${requestNumber}: Falling back to individual nodes`,\n );\n }\n\n // Fallback to nodes as usual\n this.logger.debug(\n `Request #${requestNumber}: Nodes Health: ${this.nodes\n .map(\n (node) =>\n `Node ${node.index} is ${\n node.isHealthy === true ? \"Healthy\" : \"Unhealthy\"\n }`,\n )\n .join(\" || \")}`,\n );\n let candidateNode: Node = this.nodes[0];\n for (let i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (\n candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)\n ) {\n this.logger.debug(\n `Request #${requestNumber}: Updated current node to Node ${candidateNode.index}`,\n );\n return candidateNode;\n }\n }\n\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\n `Request #${requestNumber}: No healthy nodes were found. Returning the next node, Node ${candidateNode.index}`,\n );\n return candidateNode;\n }\n\n nodeDueForHealthcheck(node, requestNumber = 0): boolean {\n const isDueForHealthcheck =\n Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\n `Request #${requestNumber}: Node ${node.index} has exceeded healtcheckIntervalSeconds of ${this.healthcheckIntervalSeconds}. Adding it back into rotation.`,\n );\n }\n return isDueForHealthcheck;\n }\n\n initializeMetadataForNodes(): void {\n if (this.nearestNode != null) {\n this.nearestNode.index = \"nearestNode\";\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n\n this.nodes.forEach((node, i) => {\n node.index = i;\n this.setNodeHealthcheck(node, HEALTHY);\n });\n }\n\n setNodeHealthcheck(node, isHealthy): void {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n }\n\n uriFor(endpoint: string, node): string {\n if (node.url != null) {\n return `${node.url}${endpoint}`;\n }\n return `${node.protocol}://${node.host}:${node.port}${node.path}${endpoint}`;\n }\n\n defaultHeaders(): any {\n const defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders[\"Content-Type\"] = \"application/json\";\n return defaultHeaders;\n }\n\n async timer(seconds): Promise {\n return new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n }\n\n customErrorForResponse(\n response: AxiosResponse,\n messageFromServer: string,\n ): TypesenseError {\n let errorMessage = `Request failed with HTTP code ${response.status}`;\n if (\n typeof messageFromServer === \"string\" &&\n messageFromServer.trim() !== \"\"\n ) {\n errorMessage += ` | Server said: ${messageFromServer}`;\n }\n\n let error = new TypesenseError(errorMessage);\n\n if (response.status === 400) {\n error = new RequestMalformed(errorMessage);\n } else if (response.status === 401) {\n error = new RequestUnauthorized(errorMessage);\n } else if (response.status === 404) {\n error = new ObjectNotFound(errorMessage);\n } else if (response.status === 409) {\n error = new ObjectAlreadyExists(errorMessage);\n } else if (response.status === 422) {\n error = new ObjectUnprocessable(errorMessage);\n } else if (response.status >= 500 && response.status <= 599) {\n error = new ServerError(errorMessage);\n } else {\n error = new HTTPError(errorMessage);\n }\n\n error.httpStatus = response.status;\n\n return error;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport { CollectionFieldSchema, CollectionSchema } from \"./Collection\";\n\nexport interface CollectionCreateSchema {\n name: string;\n default_sorting_field?: string;\n fields?: CollectionFieldSchema[];\n symbols_to_index?: string[];\n token_separators?: string[];\n enable_nested_fields?: boolean;\n metadata?: object;\n voice_query_model?: {\n model_name?: string;\n };\n}\n\nexport interface CollectionCreateOptions {\n src_name?: string;\n}\n\nconst RESOURCEPATH = \"/collections\";\n\nexport default class Collections {\n constructor(private apiCall: ApiCall) {}\n\n async create(\n schema: CollectionCreateSchema,\n options: CollectionCreateOptions = {},\n ): Promise {\n return this.apiCall.post(RESOURCEPATH, schema, options);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import TypesenseError from \"./TypesenseError\";\nimport { ImportResponseFail } from \"../Documents\";\n\nexport default class ImportError extends TypesenseError {\n importResults: ImportResponseFail;\n constructor(message, importResults) {\n super(message);\n this.importResults = importResults;\n }\n}\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","const defaultCacheResponseForSeconds = 2 * 60;\nconst defaultMaxSize = 100;\n\nexport default class RequestWithCache {\n private responseCache: Map = new Map();\n private responsePromiseCache: Map = new Map();\n\n clearCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n async perform(\n requestContext: any,\n requestFunction: (...params: any) => unknown,\n requestFunctionArguments: any[],\n cacheOptions: CacheOptions\n ): Promise {\n const {\n cacheResponseForSeconds = defaultCacheResponseForSeconds,\n maxSize = defaultMaxSize,\n } = cacheOptions;\n const isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n\n if (isCacheDisabled) {\n return requestFunction.call(requestContext, ...requestFunctionArguments);\n }\n\n const requestFunctionArgumentsJSON = JSON.stringify(\n requestFunctionArguments\n );\n const cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n const now = Date.now();\n\n if (cacheEntry) {\n const isEntryValid =\n now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return Promise.resolve(cacheEntry.response);\n } else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n\n const cachePromiseEntry = this.responsePromiseCache.get(\n requestFunctionArgumentsJSON\n );\n\n if (cachePromiseEntry) {\n const isEntryValid =\n now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(\n requestFunctionArgumentsJSON,\n cachePromiseEntry\n );\n return cachePromiseEntry.responsePromise;\n } else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n\n const responsePromise = requestFunction.call(\n requestContext,\n ...requestFunctionArguments\n );\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise,\n });\n\n const response = await responsePromise;\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response,\n });\n\n const isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n const oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n const isResponsePromiseCacheOverMaxSize =\n this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n const oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return response as T;\n }\n}\n\ninterface CacheOptions {\n cacheResponseForSeconds?: number;\n maxSize?: number;\n}\n","import RequestWithCache from \"./RequestWithCache\";\nimport ApiCall from \"./ApiCall\";\nimport Configuration from \"./Configuration\";\nimport Collections from \"./Collections\";\nimport type {\n DocumentSchema,\n SearchableDocuments,\n SearchOptions,\n SearchParams,\n SearchParamsWithPreset,\n SearchResponse,\n} from \"./Documents\";\n\nconst RESOURCEPATH = \"/documents\";\n\nexport class SearchOnlyDocuments\n implements SearchableDocuments\n{\n protected requestWithCache: RequestWithCache = new RequestWithCache();\n\n constructor(\n protected collectionName: string,\n protected apiCall: ApiCall,\n protected configuration: Configuration\n ) {}\n\n clearCache() {\n this.requestWithCache.clearCache();\n }\n\n async search(\n searchParameters: SearchParams | SearchParamsWithPreset,\n {\n cacheSearchResultsForSeconds = this.configuration\n .cacheSearchResultsForSeconds,\n abortSignal = null,\n }: SearchOptions = {}\n ): Promise> {\n const additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n for (const key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(\",\");\n }\n }\n const queryParams = Object.assign(\n {},\n searchParameters,\n additionalQueryParams\n );\n\n return this.requestWithCache.perform(\n this.apiCall,\n this.apiCall.get,\n [this.endpointPath(\"search\"), queryParams, { abortSignal }],\n {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n }\n ) as Promise>;\n }\n\n protected endpointPath(operation?: string) {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${RESOURCEPATH}${\n operation === undefined ? \"\" : \"/\" + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import type { ReadStream } from \"fs\";\nimport ApiCall from \"./ApiCall\";\nimport Configuration from \"./Configuration\";\nimport { ImportError } from \"./Errors\";\nimport { SearchOnlyDocuments } from \"./SearchOnlyDocuments\";\n\n// Todo: use generic to extract filter_by values\nexport interface DeleteQuery {\n filter_by: string;\n batch_size?: number;\n ignore_not_found?: boolean;\n}\n\nexport interface DeleteResponse {\n num_deleted: number;\n}\n\ninterface ImportResponseSuccess {\n success: true;\n}\n\nexport interface ImportResponseFail {\n success: false;\n error: string;\n document: DocumentSchema;\n code: number;\n}\n\nexport type ImportResponse = ImportResponseSuccess | ImportResponseFail;\n\nexport type DocumentSchema = Record;\n\nexport interface SearchParamsWithPreset extends Partial {\n preset: string;\n}\n\ntype OperationMode = \"off\" | \"always\" | \"fallback\";\nexport interface SearchParams {\n // From https://typesense.org/docs/latest/api/documents.html#arguments\n q?: string;\n query_by?: string | string[];\n query_by_weights?: string | number[];\n prefix?: string | boolean | boolean[]; // default: true\n filter_by?: string;\n enable_lazy_filter?: boolean; // default: false\n sort_by?: string | string[]; // default: text match desc\n facet_by?: string | string[];\n max_facet_values?: number;\n facet_sample_threshold?: number;\n facet_sample_percent?: number;\n facet_query?: string;\n facet_query_num_typos?: number;\n facet_return_parent?: string;\n page?: number; // default: 1\n per_page?: number; // default: 10, max 250\n group_by?: string | string[];\n group_limit?: number; // default:\n group_missing_values?: boolean;\n include_fields?: string | string[];\n exclude_fields?: string | string[];\n highlight_fields?: string | string[]; // default: all queried fields\n highlight_full_fields?: string | string[]; // default: all fields\n highlight_affix_num_tokens?: number; // default: 4\n highlight_start_tag?: string; // default: \n highlight_end_tag?: string; // default: \n enable_highlight_v1?: boolean;\n snippet_threshold?: number; // default: 30\n num_typos?: string | number | number[]; // default: 2\n min_len_1typo?: number;\n min_len_2typo?: number;\n split_join_tokens?: OperationMode;\n exhaustive_search?: boolean;\n drop_tokens_threshold?: number; // default: 10\n typo_tokens_threshold?: number; // default: 100\n pinned_hits?: string | string[];\n hidden_hits?: string | string[];\n limit_hits?: number; // default: no limit\n pre_segmented_query?: boolean;\n enable_overrides?: boolean;\n prioritize_exact_match?: boolean; // default: true\n prioritize_token_position?: boolean;\n prioritize_num_matching_fields?: boolean;\n search_cutoff_ms?: number;\n use_cache?: boolean;\n max_candidates?: number;\n infix?: OperationMode | OperationMode[];\n preset?: string;\n text_match_type?: \"max_score\" | \"max_weight\";\n vector_query?: string;\n \"x-typesense-api-key\"?: string;\n \"x-typesense-user-id\"?: string;\n offset?: number;\n limit?: number;\n stopwords?: string;\n conversation?: boolean;\n conversation_model_id?: string;\n conversation_id?: string;\n voice_query?: string;\n}\n\ntype SearchResponseHighlightObject = {\n matched_tokens?: string[];\n snippet?: string;\n value?: string;\n};\n\nexport type SearchResponseHighlight = T extends string | number\n ? SearchResponseHighlightObject\n : {\n [TAttribute in keyof T]?: SearchResponseHighlight;\n };\n\nexport interface SearchResponseHit {\n curated?: true;\n highlights?: [\n {\n field: keyof T;\n snippet?: string;\n value?: string;\n snippets?: string[];\n indices?: number[];\n matched_tokens: string[][] | string[];\n },\n ];\n highlight: SearchResponseHighlight;\n document: T;\n text_match: number;\n text_match_info?: {\n best_field_score: string; // To prevent scores from being truncated by JSON spec\n best_field_weight: number;\n fields_matched: number;\n score: string; // To prevent scores from being truncated by JSON spec\n tokens_matched: number;\n };\n}\n\nexport interface SearchResponseFacetCountSchema {\n counts: {\n count: number;\n highlighted: string;\n value: string;\n }[];\n field_name: keyof T;\n stats: {\n avg?: number;\n max?: number;\n min?: number;\n sum?: number;\n };\n}\n\nexport interface SearchResponseRequestParams {\n collection_name?: string;\n q?: string;\n page?: number;\n per_page?: number;\n first_q?: string;\n voice_query?: {\n transcribed_query?: string;\n };\n}\n\n// Todo: we could infer whether this is a grouped response by adding the search params as a generic\nexport interface SearchResponse {\n facet_counts?: SearchResponseFacetCountSchema[];\n found: number;\n found_docs?: number;\n out_of: number;\n page: number;\n request_params: SearchResponseRequestParams;\n search_time_ms: number;\n search_cutoff?: boolean;\n hits?: SearchResponseHit[];\n grouped_hits?: {\n group_key: string[];\n hits: SearchResponseHit[];\n found?: number;\n }[];\n conversation?: {\n answer: string;\n conversation_history: {\n conversation: object[];\n id: string;\n last_updated: number;\n ttl: number;\n };\n conversation_id: string;\n query: string;\n };\n}\n\nexport interface DocumentWriteParameters {\n dirty_values?: \"coerce_or_reject\" | \"coerce_or_drop\" | \"drop\" | \"reject\";\n action?: \"create\" | \"update\" | \"upsert\" | \"emplace\";\n}\n\nexport interface UpdateByFilterParameters {\n filter_by?: string;\n}\n\nexport interface UpdateByFilterResponse {\n num_updated: number;\n}\n\nexport interface DocumentImportParameters extends DocumentWriteParameters {\n batch_size?: number;\n return_doc?: boolean;\n return_id?: boolean;\n}\n\nexport interface DocumentsExportParameters {\n filter_by?: string;\n include_fields?: string;\n exclude_fields?: string;\n}\n\nexport interface SearchableDocuments {\n search(\n searchParameters: SearchParams | SearchParamsWithPreset,\n options: SearchOptions,\n ): Promise>;\n clearCache(): void;\n}\n\nexport interface WriteableDocuments {\n create(document: T, options: DocumentWriteParameters): Promise;\n upsert(document: T, options: DocumentWriteParameters): Promise;\n update(document: T, options: DocumentWriteParameters): Promise;\n delete(query: DeleteQuery): Promise;\n import(\n documents: T[] | string,\n options: DocumentWriteParameters,\n ): Promise;\n export(options: DocumentsExportParameters): Promise;\n}\n\nexport interface SearchOptions {\n cacheSearchResultsForSeconds?: number;\n abortSignal?: AbortSignal | null;\n}\n\nexport default class Documents\n extends SearchOnlyDocuments\n implements WriteableDocuments\n{\n constructor(\n collectionName: string,\n apiCall: ApiCall,\n configuration: Configuration,\n ) {\n super(collectionName, apiCall, configuration);\n }\n\n async create(document: T, options: DocumentWriteParameters = {}): Promise {\n if (!document) throw new Error(\"No document provided\");\n return this.apiCall.post(this.endpointPath(), document, options);\n }\n\n async upsert(document: T, options: DocumentWriteParameters = {}): Promise {\n if (!document) throw new Error(\"No document provided\");\n return this.apiCall.post(\n this.endpointPath(),\n document,\n Object.assign({}, options, { action: \"upsert\" }),\n );\n }\n\n async update(\n document: T,\n options: UpdateByFilterParameters,\n ): Promise;\n async update(document: T, options: DocumentWriteParameters): Promise;\n async update(\n document: T,\n options: DocumentWriteParameters | UpdateByFilterParameters = {},\n ): Promise {\n if (!document) throw new Error(\"No document provided\");\n\n if (options[\"filter_by\"] != null) {\n return this.apiCall.patch(\n this.endpointPath(),\n document,\n Object.assign({}, options),\n );\n } else {\n return this.apiCall.post(\n this.endpointPath(),\n document,\n Object.assign({}, options, { action: \"update\" }),\n );\n }\n }\n\n async delete(\n query: DeleteQuery = {} as DeleteQuery,\n ): Promise {\n return this.apiCall.delete(this.endpointPath(), query);\n }\n\n async createMany(documents: T[], options: DocumentImportParameters = {}) {\n this.configuration.logger.warn(\n \"createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents\",\n );\n return this.import(documents, options);\n }\n\n /**\n * Import a set of documents in a batch.\n * @param {string|Array} documents - Can be a JSONL string of documents or an array of document objects.\n * @param options\n * @return {string|Array} Returns a JSONL string if the input was a JSONL string, otherwise it returns an array of results.\n */\n async import(\n documents: string,\n options?: DocumentImportParameters,\n ): Promise;\n async import(\n documents: T[],\n options?: DocumentImportParameters,\n ): Promise;\n async import(\n documents: T[] | string,\n options: DocumentImportParameters = {},\n ): Promise {\n let documentsInJSONLFormat;\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map((document) => JSON.stringify(document))\n .join(\"\\n\");\n } catch (error: any) {\n // if rangeerror, throw custom error message\n if (\n error instanceof RangeError &&\n error.message.includes(\"Too many properties to enumerate\")\n ) {\n throw new Error(`${error}\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\n\n Please try reducing the number of keys in your document, or using CURL to import your data.\n `);\n }\n\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n } else {\n documentsInJSONLFormat = documents;\n }\n\n const resultsInJSONLFormat = await this.apiCall.performRequest(\n \"post\",\n this.endpointPath(\"import\"),\n {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { \"Content-Type\": \"text/plain\" },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n enableKeepAlive: true, // This is to prevent ECONNRESET socket hang up errors. Reference: https://github.com/axios/axios/issues/2936#issuecomment-779439991\n },\n );\n\n if (Array.isArray(documents)) {\n const resultsInJSONFormat = resultsInJSONLFormat\n .split(\"\\n\")\n .map((r) => JSON.parse(r)) as ImportResponse[];\n const failedItems = resultsInJSONFormat.filter(\n (r) => r.success === false,\n );\n if (failedItems.length > 0) {\n throw new ImportError(\n `${\n resultsInJSONFormat.length - failedItems.length\n } documents imported successfully, ${\n failedItems.length\n } documents failed during import. Use \\`error.importResults\\` from the raised exception to get a detailed error reason for each document.`,\n resultsInJSONFormat,\n );\n } else {\n return resultsInJSONFormat;\n }\n } else {\n return resultsInJSONLFormat as string;\n }\n }\n\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n async export(options: DocumentsExportParameters = {}): Promise {\n return this.apiCall.get(this.endpointPath(\"export\"), options);\n }\n\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n async exportStream(\n options: DocumentsExportParameters = {},\n ): Promise {\n return this.apiCall.get(this.endpointPath(\"export\"), options, {\n responseType: \"stream\",\n });\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport { OverrideSchema } from \"./Override\";\n\nconst RESOURCEPATH = \"/overrides\";\n\nexport interface OverrideRuleQuerySchema {\n query?: string;\n match?: \"exact\" | \"contains\";\n}\n\nexport interface OverrideRuleFilterSchema {\n filter_by?: string;\n}\n\nexport interface OverrideRuleTagsSchema {\n tags?: string[];\n}\n\nexport interface OverrideCreateSchema {\n rule: OverrideRuleQuerySchema &\n OverrideRuleFilterSchema &\n OverrideRuleTagsSchema;\n filter_by?: string;\n sort_by?: string;\n remove_matched_tokens?: boolean;\n replace_query?: string;\n includes?: Array<{\n id: string;\n position: number;\n }>;\n excludes?: Array<{ id: string }>;\n filter_curated_hits?: boolean;\n effective_from_ts?: number;\n effective_to_ts?: number;\n stop_processing?: boolean;\n metadata?: object;\n}\n\nexport interface OverridesRetrieveSchema {\n overrides: OverrideSchema[];\n}\n\nexport default class Overrides {\n constructor(\n private collectionName: string,\n private apiCall: ApiCall,\n ) {}\n\n async upsert(\n overrideId: string,\n params: OverrideCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(overrideId),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${\n Overrides.RESOURCEPATH\n }${operation === undefined ? \"\" : \"/\" + operation}`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport Overrides, { OverrideCreateSchema } from \"./Overrides\";\n\nexport interface OverrideSchema extends OverrideCreateSchema {\n id: string;\n}\n\nexport interface OverrideDeleteSchema {\n id: string;\n}\n\nexport default class Override {\n constructor(\n private collectionName: string,\n private overrideId: string,\n private apiCall: ApiCall\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${Overrides.RESOURCEPATH}/${this.overrideId}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport { SynonymSchema } from \"./Synonym\";\n\nconst RESOURCEPATH = \"/synonyms\";\n\nexport interface SynonymCreateSchema {\n synonyms: string[];\n root?: string;\n locale?: string;\n symbols_to_index?: string[];\n}\n\nexport interface SynonymsRetrieveSchema {\n synonyms: SynonymSchema[];\n}\n\nexport default class Synonyms {\n constructor(private collectionName: string, private apiCall: ApiCall) {}\n\n async upsert(\n synonymId: string,\n params: SynonymCreateSchema\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(synonymId),\n params\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string) {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${\n Synonyms.RESOURCEPATH\n }${operation === undefined ? \"\" : \"/\" + operation}`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport Synonyms, { SynonymCreateSchema } from \"./Synonyms\";\n\nexport interface SynonymSchema extends SynonymCreateSchema {\n id: string;\n}\n\nexport interface SynonymDeleteSchema {\n id: string;\n}\n\nexport default class Synonym {\n constructor(\n private collectionName: string,\n private synonymId: string,\n private apiCall: ApiCall\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${Synonyms.RESOURCEPATH}/${this.synonymId}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport Documents, {\n DocumentSchema,\n DocumentWriteParameters,\n} from \"./Documents\";\n\nexport class Document {\n constructor(\n private collectionName: string,\n private documentId: string,\n private apiCall: ApiCall\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n async update(\n partialDocument: Partial,\n options: DocumentWriteParameters = {}\n ): Promise {\n return this.apiCall.patch(this.endpointPath(), partialDocument, options);\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${Documents.RESOURCEPATH}/${this.documentId}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Collections, { CollectionCreateSchema } from \"./Collections\";\nimport Documents, { DocumentSchema } from \"./Documents\";\nimport { ObjectNotFound } from \"./Errors\";\nimport Overrides from \"./Overrides\";\nimport Override from \"./Override\";\nimport Synonyms from \"./Synonyms\";\nimport Synonym from \"./Synonym\";\nimport { Document } from \"./Document\";\n\nexport type FieldType =\n | \"string\"\n | \"int32\"\n | \"int64\"\n | \"float\"\n | \"bool\"\n | \"geopoint\"\n | \"geopoint[]\"\n | \"string[]\"\n | \"int32[]\"\n | \"int64[]\"\n | \"float[]\"\n | \"bool[]\"\n | \"object\"\n | \"object[]\"\n | \"auto\"\n | \"string*\"\n | \"image\";\n\nexport interface CollectionFieldSchema {\n name: string;\n type: FieldType;\n optional?: boolean;\n facet?: boolean;\n index?: boolean;\n sort?: boolean;\n locale?: string;\n infix?: boolean;\n stem?: boolean;\n num_dim?: number;\n store?: boolean;\n [t: string]: unknown;\n}\n\nexport interface CollectionSchema extends CollectionCreateSchema {\n created_at: number;\n num_documents: number;\n num_memory_shards: number;\n}\n\nexport interface CollectionDropFieldSchema {\n name: string;\n drop: true;\n}\n\nexport interface CollectionUpdateSchema\n extends Partial> {\n fields?: (CollectionFieldSchema | CollectionDropFieldSchema)[];\n}\n\nexport default class Collection {\n private readonly _documents: Documents;\n private individualDocuments: Record> = {};\n private readonly _overrides: Overrides;\n private individualOverrides: Record = {};\n private readonly _synonyms: Synonyms;\n private individualSynonyms: Record = {};\n\n constructor(\n private readonly name: string,\n private readonly apiCall: ApiCall,\n private readonly configuration: any,\n ) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n\n this._documents = new Documents(\n this.name,\n this.apiCall,\n this.configuration,\n );\n this._overrides = new Overrides(this.name, this.apiCall);\n this._synonyms = new Synonyms(this.name, this.apiCall);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async update(schema: CollectionUpdateSchema): Promise {\n return this.apiCall.patch(this.endpointPath(), schema);\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n async exists(): Promise {\n try {\n await this.retrieve();\n return true;\n } catch (e) {\n if (e instanceof ObjectNotFound) return false;\n throw e;\n }\n }\n\n documents(): Documents;\n documents(documentId: string): Document;\n documents(documentId?: string): Document | Documents {\n if (!documentId) {\n return this._documents;\n } else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document(\n this.name,\n documentId,\n this.apiCall,\n );\n }\n return this.individualDocuments[documentId];\n }\n }\n\n overrides(): Overrides;\n overrides(overrideId: string): Override;\n overrides(overrideId?: string): Overrides | Override {\n if (overrideId === undefined) {\n return this._overrides;\n } else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override(\n this.name,\n overrideId,\n this.apiCall,\n );\n }\n return this.individualOverrides[overrideId];\n }\n }\n\n synonyms(): Synonyms;\n synonyms(synonymId: string): Synonym;\n synonyms(synonymId?: string): Synonyms | Synonym {\n if (synonymId === undefined) {\n return this._synonyms;\n } else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym(\n this.name,\n synonymId,\n this.apiCall,\n );\n }\n return this.individualSynonyms[synonymId];\n }\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.name}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/aliases\";\n\nexport interface CollectionAliasCreateSchema {\n collection_name: string;\n}\n\nexport interface CollectionAliasSchema extends CollectionAliasCreateSchema {\n name: string;\n}\n\nexport interface CollectionAliasesResponseSchema {\n aliases: CollectionAliasSchema[];\n}\n\nexport default class Aliases {\n constructor(private apiCall: ApiCall) {}\n\n async upsert(\n name: string,\n mapping: CollectionAliasCreateSchema\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(name),\n mapping\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n private endpointPath(aliasName): string {\n return `${Aliases.RESOURCEPATH}/${aliasName}`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import Aliases, { CollectionAliasSchema } from \"./Aliases\";\nimport ApiCall from \"./ApiCall\";\n\nexport default class Alias {\n constructor(private name: string, private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Aliases.RESOURCEPATH}/${this.name}`;\n }\n}\n","import { createHmac } from \"crypto\";\nimport ApiCall from \"./ApiCall\";\nimport { KeyCreateSchema, KeySchema } from \"./Key\";\nimport { SearchParams } from \"./Documents\";\n\nconst RESOURCEPATH = \"/keys\";\n\nexport interface KeysRetrieveSchema {\n keys: KeySchema[];\n}\n\nexport interface GenerateScopedSearchKeyParams extends Partial {\n expires_at?: number;\n cache_ttl?: number;\n limit_multi_searches?: number;\n}\n\nexport default class Keys {\n constructor(private apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async create(params: KeyCreateSchema): Promise {\n return this.apiCall.post(Keys.RESOURCEPATH, params);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n generateScopedSearchKey(\n searchKey: string,\n parameters: GenerateScopedSearchKeyParams\n ): string {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n const paramsJSON = JSON.stringify(parameters);\n const digest = Buffer.from(\n createHmac(\"sha256\", searchKey).update(paramsJSON).digest(\"base64\")\n );\n const keyPrefix = searchKey.substr(0, 4);\n const rawScopedKey = `${digest}${keyPrefix}${paramsJSON}`;\n\n return Buffer.from(rawScopedKey).toString(\"base64\");\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Keys from \"./Keys\";\n\nexport interface KeyCreateSchema {\n actions: string[];\n collections: string[];\n description?: string;\n value?: string;\n value_prefix?: string;\n expires_at?: number;\n}\n\nexport interface KeyDeleteSchema {\n id: number;\n}\n\nexport interface KeySchema extends KeyCreateSchema {\n id: number;\n}\n\nexport default class Key {\n constructor(private id: number, private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Keys.RESOURCEPATH}/${this.id}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/debug\";\n\nexport interface DebugResponseSchema {\n state: number;\n version: string;\n}\n\nexport default class Debug {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/metrics.json\";\n\nexport interface MetricsResponse {\n [key: `system_cpu${number}_active_percentage`]: string;\n system_cpu_active_percentage: string;\n system_disk_total_bytes: string;\n system_disk_used_bytes: string;\n system_memory_total_bytes: string;\n system_memory_total_swap_bytes?: string;\n system_memory_used_bytes: string;\n system_memory_used_swap_bytes?: string;\n system_network_received_bytes: string;\n system_network_sent_bytes: string;\n typesense_memory_active_bytes: string;\n typesense_memory_allocated_bytes: string;\n typesense_memory_fragmentation_ratio: string;\n typesense_memory_mapped_bytes: string;\n typesense_memory_metadata_bytes: string;\n typesense_memory_resident_bytes: string;\n typesense_memory_retained_bytes: string;\n}\n\nexport default class Metrics {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/stats.json\";\n\nexport interface EndpointStats {\n [endpoint: string]: number;\n}\n\nexport interface StatsResponse {\n delete_latency_ms?: number;\n delete_requests_per_second?: number;\n import_latency_ms?: number;\n import_requests_per_second?: number;\n latency_ms?: EndpointStats;\n overloaded_requests_per_second?: number;\n pending_write_batches?: number;\n requests_per_second?: EndpointStats;\n search_latency_ms?: number;\n search_requests_per_second?: number;\n total_requests_per_second?: number;\n write_latency_ms?: number;\n write_requests_per_second?: number;\n}\n\nexport default class Metrics {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/health\";\n\nexport interface HealthResponse {\n ok: boolean;\n}\n\nexport default class Health {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from \"./ApiCall\";\n\nconst RESOURCEPATH = \"/operations\";\n\nexport default class Operations {\n constructor(private apiCall: ApiCall) {}\n\n async perform(\n operationName: \"vote\" | \"snapshot\" | \"cache/clear\" | string,\n queryParameters: Record = {}\n ): Promise {\n return this.apiCall.post(\n `${RESOURCEPATH}/${operationName}`,\n {},\n queryParameters\n );\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Configuration from \"./Configuration\";\nimport RequestWithCache from \"./RequestWithCache\";\nimport {\n DocumentSchema,\n SearchParams,\n SearchParamsWithPreset,\n SearchResponse,\n} from \"./Documents\";\n\nconst RESOURCEPATH = \"/multi_search\";\n\nexport interface MultiSearchRequestSchema extends SearchParams {\n collection?: string;\n \"x-typesense-api-key\"?: string;\n}\n\nexport interface MultiSearchRequestWithPresetSchema\n extends SearchParamsWithPreset {\n collection?: string;\n \"x-typesense-api-key\"?: string;\n}\n\nexport interface MultiSearchRequestsSchema {\n searches: (MultiSearchRequestSchema | MultiSearchRequestWithPresetSchema)[];\n}\n\nexport interface MultiSearchResponse {\n results: { [Index in keyof T]: SearchResponse } & {\n length: T[\"length\"];\n };\n}\n\nexport default class MultiSearch {\n private requestWithCache: RequestWithCache;\n\n constructor(\n private apiCall: ApiCall,\n private configuration: Configuration,\n private useTextContentType: boolean = false\n ) {\n this.requestWithCache = new RequestWithCache();\n }\n\n clearCache() {\n this.requestWithCache.clearCache();\n }\n\n async perform(\n searchRequests: MultiSearchRequestsSchema,\n commonParams: Partial = {},\n {\n cacheSearchResultsForSeconds = this.configuration\n .cacheSearchResultsForSeconds,\n }: { cacheSearchResultsForSeconds?: number } = {}\n ): Promise> {\n const additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders[\"content-type\"] = \"text/plain\";\n }\n\n const additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams[\"use_cache\"] = true;\n }\n const queryParams = Object.assign({}, commonParams, additionalQueryParams);\n\n return this.requestWithCache.perform(\n this.apiCall,\n this.apiCall.post,\n [RESOURCEPATH, searchRequests, queryParams, additionalHeaders],\n { cacheResponseForSeconds: cacheSearchResultsForSeconds }\n ) as Promise>;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport { PresetSchema } from \"./Preset\";\nimport { SearchParams } from \"./Documents\";\nimport { MultiSearchRequestsSchema } from \"./MultiSearch\";\n\nconst RESOURCEPATH = \"/presets\";\n\nexport interface PresetCreateSchema {\n value: SearchParams | MultiSearchRequestsSchema;\n}\n\nexport interface PresetsRetrieveSchema {\n presets: PresetSchema[];\n}\n\nexport default class Presets {\n constructor(private apiCall: ApiCall) {}\n\n async upsert(\n presetId: string,\n params: PresetCreateSchema\n ): Promise {\n return this.apiCall.put(this.endpointPath(presetId), params);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${Presets.RESOURCEPATH}${\n operation === undefined ? \"\" : \"/\" + operation\n }`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Presets, { PresetCreateSchema } from \"./Presets\";\n\nexport interface PresetSchema extends PresetCreateSchema {\n name: string;\n}\n\nexport interface PresetDeleteSchema {\n name: string;\n}\n\nexport default class Preset {\n constructor(private presetId: string, private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Presets.RESOURCEPATH}/${this.presetId}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport {\n AnalyticsRuleCreateSchema,\n AnalyticsRuleSchema,\n} from \"./AnalyticsRule\";\n\nexport interface AnalyticsRulesRetrieveSchema {\n rules: AnalyticsRuleSchema[];\n}\n\nconst RESOURCEPATH = \"/analytics/rules\";\n\nexport default class AnalyticsRules {\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async upsert(\n name: string,\n params: AnalyticsRuleCreateSchema\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(name),\n params\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${AnalyticsRules.RESOURCEPATH}${\n operation === undefined ? \"\" : \"/\" + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport AnalyticsRules from \"./AnalyticsRules\";\n\nexport interface AnalyticsRuleCreateSchema {\n type: \"popular_queries\" | \"nohits_queries\" | \"counter\";\n params: {\n source: {\n collections: string[];\n events?: Array<{\n type: string;\n weight: number;\n name: string;\n }>;\n };\n expand_query?: boolean;\n destination: {\n collection: string;\n counter_field?: string;\n };\n limit?: number;\n };\n}\n\nexport interface AnalyticsRuleDeleteSchema {\n name: string;\n}\n\nexport interface AnalyticsRuleSchema extends AnalyticsRuleCreateSchema {\n name: string;\n}\n\nexport default class AnalyticsRule {\n constructor(\n private name: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${AnalyticsRules.RESOURCEPATH}/${this.name}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport { AnalyticsEventCreateSchema } from \"./AnalyticsEvent\";\n\nconst RESOURCEPATH = \"/analytics/events\";\n\nexport default class AnalyticsEvents {\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async create(\n params: AnalyticsEventCreateSchema,\n ): Promise {\n return this.apiCall.post(\n this.endpointPath(),\n params,\n );\n }\n\n private endpointPath(operation?: string): string {\n return `${AnalyticsEvents.RESOURCEPATH}${\n operation === undefined ? \"\" : \"/\" + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport AnalyticsRules from \"./AnalyticsRules\";\nimport AnalyticsRule from \"./AnalyticsRule\";\nimport AnalyticsEvents from \"./AnalyticsEvents\";\n\nconst RESOURCEPATH = \"/analytics\";\n\nexport default class Analytics {\n private readonly _analyticsRules: AnalyticsRules;\n private readonly individualAnalyticsRules: Record = {};\n private readonly _analyticsEvents: AnalyticsEvents;\n\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules(this.apiCall);\n this._analyticsEvents = new AnalyticsEvents(this.apiCall);\n }\n\n rules(id?: string): AnalyticsRules | AnalyticsRule {\n if (id === undefined) {\n return this._analyticsRules;\n } else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n }\n\n events(): AnalyticsEvents {\n return this._analyticsEvents;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport { StopwordSchema } from \"./Stopword\";\n\nconst RESOURCEPATH = \"/stopwords\";\n\nexport interface StopwordCreateSchema {\n stopwords: string[];\n locale?: string;\n}\n\nexport interface StopwordsRetrieveSchema {\n stopwords: StopwordSchema[];\n}\n\nexport default class Stopwords {\n constructor(private apiCall: ApiCall) {}\n\n async upsert(\n stopwordId: string,\n params: StopwordCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(stopwordId),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${Stopwords.RESOURCEPATH}${\n operation === undefined ? \"\" : \"/\" + operation\n }`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Stopwords, { StopwordCreateSchema } from \"./Stopwords\";\n\nexport interface StopwordSchema extends StopwordCreateSchema {\n id: string;\n stopwords: string[];\n locale?: string;\n}\n\nexport interface StopwordDeleteSchema {\n id: string;\n}\n\nexport default class Stopword {\n constructor(\n private stopwordId: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Stopwords.RESOURCEPATH}/${this.stopwordId}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport {\n ConversationModelCreateSchema,\n ConversationModelSchema,\n} from \"./ConversationModel\";\n\nconst RESOURCEPATH = \"/conversations/models\";\n\nexport default class ConversationModels {\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async create(\n params: ConversationModelCreateSchema,\n ): Promise {\n return this.apiCall.post(\n this.endpointPath(),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(\n this.endpointPath(),\n );\n }\n\n private endpointPath(operation?: string): string {\n return `${ConversationModels.RESOURCEPATH}${\n operation === undefined ? \"\" : \"/\" + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport ConversationModels from \"./ConversationModels\";\n\nexport interface ConversationModelCreateSchema {\n model_name: string;\n api_key: string;\n system_prompt?: string;\n max_bytes: number;\n}\n\nexport interface ConversationModelDeleteSchema {\n id: string;\n}\n\nexport interface ConversationModelSchema extends ConversationModelCreateSchema {\n id: string;\n}\n\nexport default class ConversationModel {\n constructor(\n private id: string,\n private apiCall: ApiCall,\n ) {}\n\n async update(\n params: ConversationModelCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(\n this.endpointPath(),\n );\n }\n\n private endpointPath(): string {\n return `${ConversationModels.RESOURCEPATH}/${this.id}`;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport ConversationModels from \"./ConversationModels\";\nimport ConversationModel from \"./ConversationModel\";\nimport { ConversationSchema } from \"./Conversation\";\n\nconst RESOURCEPATH = \"/conversations\";\n\nexport interface ConversationsRetrieveSchema {\n conversations: ConversationSchema[];\n}\n\nexport default class Conversations {\n private readonly _conversationsModels: ConversationModels;\n private readonly individualConversationModels: Record<\n string,\n ConversationModel\n > = {};\n\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n this._conversationsModels = new ConversationModels(this.apiCall);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n models(): ConversationModels;\n models(id: string): ConversationModel;\n models(id?: string): ConversationModels | ConversationModel {\n if (id === undefined) {\n return this._conversationsModels;\n } else {\n if (this.individualConversationModels[id] === undefined) {\n this.individualConversationModels[id] = new ConversationModel(\n id,\n this.apiCall,\n );\n }\n return this.individualConversationModels[id];\n }\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from \"./ApiCall\";\nimport Conversations from \"./Conversations\";\n\nexport interface ConversationDeleteSchema {\n id: number;\n}\n\nexport interface ConversationUpdateSchema {\n ttl: number;\n}\n\nexport interface ConversationSchema {\n id: number;\n conversation: object[];\n last_updated: number;\n ttl: number;\n}\n\nexport default class Conversation {\n constructor(\n private id: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async update(\n params: ConversationUpdateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(),\n params,\n );\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Conversations.RESOURCEPATH}/${this.id}`;\n }\n}\n","/* eslint-disable no-dupe-class-members */\n\nimport Configuration, { ConfigurationOptions } from \"./Configuration\";\nimport ApiCall from \"./ApiCall\";\nimport Collections from \"./Collections\";\nimport Collection from \"./Collection\";\nimport Aliases from \"./Aliases\";\nimport Alias from \"./Alias\";\nimport Keys from \"./Keys\";\nimport Key from \"./Key\";\nimport Debug from \"./Debug\";\nimport Metrics from \"./Metrics\";\nimport Stats from \"./Stats\";\nimport Health from \"./Health\";\nimport Operations from \"./Operations\";\nimport MultiSearch from \"./MultiSearch\";\nimport Presets from \"./Presets\";\nimport Preset from \"./Preset\";\nimport Analytics from \"./Analytics\";\nimport Stopwords from \"./Stopwords\";\nimport Stopword from \"./Stopword\";\nimport Conversations from \"./Conversations\";\nimport Conversation from \"./Conversation\";\n\nexport default class Client {\n configuration: Configuration;\n apiCall: ApiCall;\n debug: Debug;\n metrics: Metrics;\n stats: Stats;\n health: Health;\n operations: Operations;\n multiSearch: MultiSearch;\n analytics: Analytics;\n private readonly _collections: Collections;\n private readonly individualCollections: Record;\n private readonly _aliases: Aliases;\n private readonly individualAliases: Record;\n private readonly _keys: Keys;\n private readonly individualKeys: Record;\n private readonly _presets: Presets;\n private readonly individualPresets: Record;\n private readonly _stopwords: Stopwords;\n private readonly individualStopwords: Record;\n private readonly _conversations: Conversations;\n private readonly individualConversations: Record;\n\n constructor(options: ConfigurationOptions) {\n options.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam ?? false;\n\n this.configuration = new Configuration(options);\n this.apiCall = new ApiCall(this.configuration);\n this.debug = new Debug(this.apiCall);\n this.metrics = new Metrics(this.apiCall);\n this.stats = new Stats(this.apiCall);\n this.health = new Health(this.apiCall);\n this.operations = new Operations(this.apiCall);\n this.multiSearch = new MultiSearch(this.apiCall, this.configuration);\n this._collections = new Collections(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets(this.apiCall);\n this.individualPresets = {};\n this._stopwords = new Stopwords(this.apiCall);\n this.individualStopwords = {};\n this.analytics = new Analytics(this.apiCall);\n this._conversations = new Conversations(this.apiCall);\n this.individualConversations = {};\n }\n\n collections(): Collections;\n collections = object>(\n collectionName: string,\n ): Collection;\n collections(collectionName?: string): Collections | Collection {\n if (collectionName === undefined) {\n return this._collections;\n } else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection(\n collectionName,\n this.apiCall,\n this.configuration,\n );\n }\n return this.individualCollections[collectionName];\n }\n }\n\n aliases(): Aliases;\n aliases(aliasName: string): Alias;\n aliases(aliasName?: string): Aliases | Alias {\n if (aliasName === undefined) {\n return this._aliases;\n } else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n }\n\n keys(): Keys;\n keys(id: number): Key;\n keys(id?: number): Keys | Key {\n if (id === undefined) {\n return this._keys;\n } else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n }\n\n presets(): Presets;\n presets(id: string): Preset;\n presets(id?: string): Presets | Preset {\n if (id === undefined) {\n return this._presets;\n } else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n }\n\n stopwords(): Stopwords;\n stopwords(id: string): Stopword;\n stopwords(id?: string): Stopwords | Stopword {\n if (id === undefined) {\n return this._stopwords;\n } else {\n if (this.individualStopwords[id] === undefined) {\n this.individualStopwords[id] = new Stopword(id, this.apiCall);\n }\n return this.individualStopwords[id];\n }\n }\n\n conversations(): Conversations;\n conversations(id: string): Conversation;\n conversations(id?: string): Conversations | Conversation {\n if (id === undefined) {\n return this._conversations;\n } else {\n if (this.individualConversations[id] === undefined) {\n this.individualConversations[id] = new Conversation(id, this.apiCall);\n }\n return this.individualConversations[id];\n }\n }\n}\n","import { DocumentSchema, SearchableDocuments } from \"./Documents\";\nimport ApiCall from \"./ApiCall\";\nimport { SearchOnlyDocuments } from \"./SearchOnlyDocuments\";\n\nexport class SearchOnlyCollection {\n private readonly _documents: SearchableDocuments;\n\n constructor(\n private readonly name: string,\n private readonly apiCall: ApiCall,\n private readonly configuration: any\n ) {\n this._documents = new SearchOnlyDocuments(\n this.name,\n this.apiCall,\n this.configuration\n );\n }\n\n documents(): SearchableDocuments {\n return this._documents;\n }\n}\n","import Configuration, { ConfigurationOptions } from \"./Configuration\";\nimport ApiCall from \"./ApiCall\";\nimport MultiSearch from \"./MultiSearch\";\nimport { DocumentSchema } from \"./Documents\";\nimport { SearchOnlyCollection } from \"./SearchOnlyCollection\";\n\nexport default class SearchClient {\n public readonly multiSearch: MultiSearch;\n private readonly configuration: Configuration;\n private readonly apiCall: ApiCall;\n private readonly individualCollections: Record;\n\n constructor(options: ConfigurationOptions) {\n options.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam ?? true;\n if (\n options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || \"\").length > 2000\n ) {\n console.warn(\n \"[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.\"\n );\n options.sendApiKeyAsQueryParam = false;\n }\n\n this.configuration = new Configuration(options);\n this.apiCall = new ApiCall(this.configuration);\n this.multiSearch = new MultiSearch(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n\n clearCache() {\n this.multiSearch.clearCache();\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(([_, collection]) => {\n collection.documents().clearCache();\n });\n }\n\n collections(\n collectionName: string\n ): SearchOnlyCollection | SearchOnlyCollection {\n if (!collectionName) {\n throw new Error(\n \"Typesense.SearchClient only supports search operations, so the collectionName that needs to \" +\n \"be searched must be specified. Use Typesense.Client if you need to access the collection object.\"\n );\n } else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection(\n collectionName,\n this.apiCall,\n this.configuration\n );\n }\n return this.individualCollections[collectionName];\n }\n }\n}\n","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import Client from \"./Typesense/Client\";\nimport SearchClient from \"./Typesense/SearchClient\";\nimport * as Errors from \"./Typesense/Errors\";\n\nexport { Client, SearchClient, Errors };\nexport default { Client, SearchClient, Errors };\n"],"names":["root","definition","noop","undefinedType","isIE","window","navigator","test","userAgent","logMethods","_loggersByName","defaultLogger","bindMethod","obj","methodName","method","bind","Function","prototype","call","e","apply","arguments","traceForIE","console","log","trace","replaceLoggingMethods","level","this","getLevel","i","length","methodFactory","name","debug","levels","SILENT","enableLoggingWhenConsoleArrives","defaultMethodFactory","_level","_loggerName","undefined","realMethod","Logger","factory","inheritedLevel","defaultLevel","userLevel","self","storageKey","getPersistedLevel","storedLevel","localStorage","ignore","cookie","document","cookieName","encodeURIComponent","location","indexOf","exec","slice","normalizeLevel","input","toUpperCase","TypeError","setLevel","persist","levelNum","levelName","persistLevelIfPossible","setDefaultLevel","resetLevel","removeItem","clearPersistedLevel","enableAll","TRACE","disableAll","rebuild","childName","initialLevel","getLogger","logger","_log","noConflict","getLoggers","_typeof","_regeneratorRuntime","module","exports","__esModule","t","r","Object","n","hasOwnProperty","o","defineProperty","value","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","stop","rval","handle","complete","finish","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","key","get","prop","_classCallCheck","instance","Constructor","toPropertyKey","toPrimitive","String","_defineProperties","target","props","descriptor","_createClass","protoProps","staticProps","_defineProperty","_assertThisInitialized","ReferenceError","_possibleConstructorReturn","_getPrototypeOf","_setPrototypeOf","_inherits","subClass","superClass","_isNativeReflectConstruct","Boolean","valueOf","Reflect","construct","_wrapNativeSuper","Class","_cache","Map","fn","toString","has","set","Wrapper","TypesenseError","_Error","message","_this","_callSuper","MissingConfigurationError","_TypesenseError","Configuration","options","nodes","map","node","setDefaultPathInNode","setDefaultPortInNode","_objectSpread","randomizeNodes","shuffleArray","nearestNode","connectionTimeoutSeconds","timeoutSeconds","healthcheckIntervalSeconds","numRetries","retryIntervalSeconds","apiKey","sendApiKeyAsQueryParam","cacheSearchResultsForSeconds","useServerSideSearchCache","logLevel","additionalHeaders","httpAgent","httpsAgent","paramsSerializer","showDeprecationWarnings","validate","validateNodes","isNodeMissingAnyParameters","_this2","some","every","warn","masterNode","readReplicaNodes","array","j","Math","floor","random","_ref","asyncGeneratorStep","gen","reject","_next","_throw","info","error","_asyncToGenerator","args","err","thisArg","kindOf","cache","thing","str","toLowerCase","kindOfTest","typeOfTest","isArray","Array","isUndefined","isArrayBuffer","isString","isFunction","isNumber","isObject","isPlainObject","val","isDate","isFile","isBlob","isFileList","isURLSearchParams","allOwnKeys","getOwnPropertyNames","len","findKey","_key","_global","global","isContextDefined","context","isTypedArray","TypedArray","Uint8Array","isHTMLForm","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","ret","defineProperties","ALPHA","DIGIT","ALPHABET","ALPHA_DIGIT","isAsyncFn","isBuffer","isFormData","kind","FormData","append","isArrayBufferView","result","ArrayBuffer","isView","buffer","isBoolean","isStream","pipe","merge","caseless","assignValue","targetKey","extend","b","trim","replace","stripBOM","content","charCodeAt","inherits","superConstructor","assign","toFlatObject","sourceObj","destObj","filter","propFilter","merged","endsWith","searchString","position","lastIndex","toArray","arr","forEachEntry","pair","matchAll","regExp","matches","hasOwnProp","freezeMethods","toObjectSet","arrayOrString","delimiter","split","toCamelCase","m","p1","p2","toFiniteNumber","defaultValue","Number","isFinite","generateString","size","alphabet","isSpecCompliantForm","toJSONObject","stack","visit","source","reducedValue","isThenable","catch","AxiosError","code","config","request","response","captureStackTrace","utils","toJSON","description","number","fileName","lineNumber","columnNumber","status","from","customProps","axiosError","cause","isVisitable","removeBrackets","renderKey","path","dots","concat","token","join","predicates","formData","metaTokens","indexes","option","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","Buffer","JSON","stringify","isFlatArray","el","index","exposedHelpers","build","encode","charMap","match","AxiosURLSearchParams","params","_pairs","encoder","_encode","buildURL","url","serializeFn","serialize","serializedParams","hashmarkIndex","handlers","use","fulfilled","rejected","synchronous","runWhen","eject","id","clear","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","buildPath","isNumericKey","isLast","arrayToObject","entries","parsePropPath","defaults","transitional","adapter","transformRequest","data","headers","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","platform","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","rawValue","parser","parse","stringifySafely","transformResponse","JSONRequested","responseType","strictJSONParsing","ERR_BAD_RESPONSE","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","parsed","line","substring","parseHeaders","tokens","tokensRE","parseTokens","matcher","deleted","deleteHeader","normalize","format","normalized","w","char","formatHeader","targets","asStrings","first","computed","accessor","accessors","defineAccessor","accessorName","arg1","arg2","arg3","buildAccessors","mapped","headerValue","transformData","fns","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","write","expires","domain","secure","Date","toGMTString","read","RegExp","decodeURIComponent","remove","now","buildFullPath","baseURL","requestedURL","relativeURL","combineURLs","msie","urlParsingNode","createElement","originURL","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","requestURL","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","samplesCount","min","bytes","timestamps","firstSampleTS","head","tail","chunkLength","startedAt","bytesCount","passed","round","loaded","total","lengthComputable","progressBytes","rate","progress","estimated","event","knownAdapters","http","xhr","XMLHttpRequest","requestData","requestHeaders","onCanceled","withXSRFToken","cancelToken","unsubscribe","signal","removeEventListener","auth","username","password","unescape","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","ERR_BAD_REQUEST","settle","responseText","statusText","open","onreadystatechange","readyState","responseURL","setTimeout","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","isURLSameOrigin","xsrfValue","cookies","setRequestHeader","withCredentials","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","abort","subscribe","aborted","parseProtocol","send","renderReason","reason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","socketPath","responseEncoding","configValue","validators","deprecatedWarnings","validator","version","formatMessage","opt","desc","opts","ERR_DEPRECATED","assertOptions","schema","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","Axios","instanceConfig","interceptors","configOrUrl","_request","dummy","boolean","function","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","responseInterceptorChain","promise","chain","newConfig","onFulfilled","onRejected","getUri","generateHTTPMethod","isForm","CancelToken","executor","resolvePromise","_listeners","onfulfilled","_resolve","splice","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","axios","createInstance","defaultConfig","VERSION","toFormData","Cancel","all","promises","spread","callback","isAxiosError","payload","formToJSON","getAdapter","default","RequestMalformed","RequestUnauthorized","ObjectNotFound","ObjectAlreadyExists","ObjectUnprocessable","ServerError","HTTPError","HEALTHY","ApiCall","configuration","numRetriesPerRequest","additionalUserHeaders","initializeMetadataForNodes","currentNodeIndex","_timer","_performRequest","_patch","_put","_post","_delete2","_get","_callee","endpoint","queryParameters","_ref$abortSignal","abortSignal","_ref$responseType","_args","_context","performRequest","_x","_callee2","_args2","_context2","_x2","_callee3","bodyParameters","_args3","_context3","_x3","_callee4","_args4","_context4","_x4","_callee5","_args5","_context5","_x5","_callee6","requestType","_ref2","_ref2$queryParameters","_ref2$bodyParameters","_ref2$additionalHeade","_ref2$abortSignal","_ref2$responseType","_ref2$skipConnectionT","skipConnectionTimeout","_ref2$enableKeepAlive","enableKeepAlive","requestNumber","lastException","_loop","_ret","numTries","_context7","abortListener","requestOptions","_response$data","_response$data2","_error$response","_context6","getNextNode","uriFor","defaultHeaders","Infinity","transformedData","startsWith","HTTPAgent","keepAlive","HTTPSAgent","setNodeHealthcheck","customErrorForResponse","t0","timer","_x6","_x7","_x8","isHealthy","nodeDueForHealthcheck","candidateNode","isDueForHealthcheck","lastAccessTimestamp","_callee7","seconds","_context8","_x9","messageFromServer","errorMessage","httpStatus","RESOURCEPATH","Collections","apiCall","_retrieve","_create","post","ImportError","importResults","_arrayLikeToArray","arr2","_unsupportedIterableToArray","minLen","_toConsumableArray","iter","RequestWithCache","_perform","responseCache","responsePromiseCache","requestContext","requestFunction","requestFunctionArguments","cacheOptions","_cacheOptions$cacheRe","cacheResponseForSeconds","_cacheOptions$maxSize","maxSize","requestFunctionArgumentsJSON","cacheEntry","cachePromiseEntry","responsePromise","oldestEntry","_oldestEntry","requestTimestamp","delete","SearchOnlyDocuments","collectionName","_search","requestWithCache","clearCache","searchParameters","_ref$cacheSearchResul","additionalQueryParams","queryParams","perform","endpointPath","operation","Documents","_exportStream","_export2","_import2","_createMany","_update","_upsert","action","patch","query","documents","import","documentsInJSONLFormat","resultsInJSONLFormat","resultsInJSONFormat","failedItems","_args6","RangeError","includes","success","_args7","_callee8","_args8","Overrides","overrideId","put","Override","Synonyms","synonymId","Synonym","Document","documentId","partialDocument","Collection","_documents","_overrides","_synonyms","_exists","retrieve","individualDocuments","individualOverrides","individualSynonyms","Aliases","mapping","aliasName","Alias","Keys","searchKey","parameters","paramsJSON","digest","createHmac","update","keyPrefix","substr","rawScopedKey","Key","Debug","Metrics","Health","Operations","operationName","MultiSearch","useTextContentType","searchRequests","commonParams","Presets","presetId","Preset","AnalyticsRules","AnalyticsRule","AnalyticsEvents","Analytics","_analyticsRules","_analyticsEvents","individualAnalyticsRules","Stopwords","stopwordId","Stopword","ConversationModels","ConversationModel","Conversations","_conversationsModels","individualConversationModels","Conversation","Client","_options$sendApiKeyAs","metrics","stats","Stats","health","operations","multiSearch","_collections","individualCollections","_aliases","individualAliases","_keys","individualKeys","_presets","individualPresets","_stopwords","individualStopwords","analytics","_conversations","individualConversations","SearchOnlyCollection","SearchClient","Errors"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"typesense.min.js","mappings":";8CAAA,SAMC,SAAUA,EAAMC,GACb,aAEI,EAMA,WAIJ,IAAIC,EAAO,WAAY,EACnBC,EAAgB,YAChBC,SAAeC,SAAWF,UAA0BE,OAAOC,YAAcH,GACzE,kBAAkBI,KAAKF,OAAOC,UAAUE,WAGxCC,EAAa,CACb,QACA,QACA,OACA,OACA,SAGAC,EAAiB,CAAC,EAClBC,EAAgB,KAGpB,SAASC,EAAWC,EAAKC,GACrB,IAAIC,EAASF,EAAIC,GACjB,GAA2B,mBAAhBC,EAAOC,KACd,OAAOD,EAAOC,KAAKH,GAEnB,IACI,OAAOI,SAASC,UAAUF,KAAKG,KAAKJ,EAAQF,EAChD,CAAE,MAAOO,GAEL,OAAO,WACH,OAAOH,SAASC,UAAUG,MAAMA,MAAMN,EAAQ,CAACF,EAAKS,WACxD,CACJ,CAER,CAGA,SAASC,IACDC,QAAQC,MACJD,QAAQC,IAAIJ,MACZG,QAAQC,IAAIJ,MAAMG,QAASF,WAG3BL,SAASC,UAAUG,MAA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B,KAAK2hC,sBAAsBzG,GAAkB,IAAIqH,GAC/CrH,EACAl7B,KAAKi5B,QACLj5B,KAAKozB,gBAGFpzB,KAAK2hC,sBAAsBzG,GAZlC,MAAM,IAAIl0B,MACR,+LAaN,KAACw7B,CAAA,CAnD8B,GKDjC,UAAiBtB,OAAAA,GAAQsB,aAAAA,GAAcC,OAAAA","sources":["webpack://Typesense/./node_modules/loglevel/lib/loglevel.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/typeof.js","webpack://Typesense/./node_modules/@babel/runtime/regenerator/index.js","webpack://Typesense/webpack/bootstrap","webpack://Typesense/webpack/runtime/compat get default export","webpack://Typesense/webpack/runtime/define property getters","webpack://Typesense/webpack/runtime/hasOwnProperty shorthand","webpack://Typesense/webpack/runtime/make namespace object","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/construct.js","webpack://Typesense/./src/Typesense/Errors/TypesenseError.ts","webpack://Typesense/./src/Typesense/Errors/MissingConfigurationError.ts","webpack://Typesense/./src/Typesense/Configuration.ts","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://Typesense/./node_modules/axios/lib/helpers/bind.js","webpack://Typesense/./node_modules/axios/lib/utils.js","webpack://Typesense/./node_modules/axios/lib/core/AxiosError.js","webpack://Typesense/./node_modules/axios/lib/helpers/toFormData.js","webpack://Typesense/./node_modules/axios/lib/helpers/AxiosURLSearchParams.js","webpack://Typesense/./node_modules/axios/lib/helpers/buildURL.js","webpack://Typesense/./node_modules/axios/lib/core/InterceptorManager.js","webpack://Typesense/./node_modules/axios/lib/defaults/transitional.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/index.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/classes/FormData.js","webpack://Typesense/./node_modules/axios/lib/platform/browser/classes/Blob.js","webpack://Typesense/./node_modules/axios/lib/platform/common/utils.js","webpack://Typesense/./node_modules/axios/lib/platform/index.js","webpack://Typesense/./node_modules/axios/lib/helpers/formDataToJSON.js","webpack://Typesense/./node_modules/axios/lib/defaults/index.js","webpack://Typesense/./node_modules/axios/lib/helpers/toURLEncodedForm.js","webpack://Typesense/./node_modules/axios/lib/helpers/parseHeaders.js","webpack://Typesense/./node_modules/axios/lib/core/AxiosHeaders.js","webpack://Typesense/./node_modules/axios/lib/core/transformData.js","webpack://Typesense/./node_modules/axios/lib/cancel/isCancel.js","webpack://Typesense/./node_modules/axios/lib/cancel/CanceledError.js","webpack://Typesense/./node_modules/axios/lib/helpers/cookies.js","webpack://Typesense/./node_modules/axios/lib/core/buildFullPath.js","webpack://Typesense/./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://Typesense/./node_modules/axios/lib/helpers/combineURLs.js","webpack://Typesense/./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://Typesense/./node_modules/axios/lib/adapters/xhr.js","webpack://Typesense/./node_modules/axios/lib/helpers/speedometer.js","webpack://Typesense/./node_modules/axios/lib/adapters/adapters.js","webpack://Typesense/./node_modules/axios/lib/helpers/null.js","webpack://Typesense/./node_modules/axios/lib/core/settle.js","webpack://Typesense/./node_modules/axios/lib/helpers/parseProtocol.js","webpack://Typesense/./node_modules/axios/lib/core/dispatchRequest.js","webpack://Typesense/./node_modules/axios/lib/core/mergeConfig.js","webpack://Typesense/./node_modules/axios/lib/env/data.js","webpack://Typesense/./node_modules/axios/lib/helpers/validator.js","webpack://Typesense/./node_modules/axios/lib/core/Axios.js","webpack://Typesense/./node_modules/axios/lib/cancel/CancelToken.js","webpack://Typesense/./node_modules/axios/lib/helpers/HttpStatusCode.js","webpack://Typesense/./node_modules/axios/lib/axios.js","webpack://Typesense/./node_modules/axios/lib/helpers/spread.js","webpack://Typesense/./node_modules/axios/lib/helpers/isAxiosError.js","webpack://Typesense/./src/Typesense/Errors/RequestMalformed.ts","webpack://Typesense/./src/Typesense/Errors/RequestUnauthorized.ts","webpack://Typesense/./src/Typesense/Errors/ObjectNotFound.ts","webpack://Typesense/./src/Typesense/Errors/ObjectAlreadyExists.ts","webpack://Typesense/./src/Typesense/Errors/ObjectUnprocessable.ts","webpack://Typesense/./src/Typesense/Errors/ServerError.ts","webpack://Typesense/./src/Typesense/Errors/HTTPError.ts","webpack://Typesense/./src/Typesense/ApiCall.ts","webpack://Typesense/./src/Typesense/Collections.ts","webpack://Typesense/./src/Typesense/Errors/ImportError.ts","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://Typesense/./src/Typesense/RequestWithCache.ts","webpack://Typesense/./src/Typesense/SearchOnlyDocuments.ts","webpack://Typesense/./src/Typesense/Documents.ts","webpack://Typesense/./src/Typesense/Overrides.ts","webpack://Typesense/./src/Typesense/Override.ts","webpack://Typesense/./src/Typesense/Synonyms.ts","webpack://Typesense/./src/Typesense/Synonym.ts","webpack://Typesense/./src/Typesense/Document.ts","webpack://Typesense/./src/Typesense/Collection.ts","webpack://Typesense/./src/Typesense/Aliases.ts","webpack://Typesense/./src/Typesense/Alias.ts","webpack://Typesense/./src/Typesense/Keys.ts","webpack://Typesense/./src/Typesense/Key.ts","webpack://Typesense/./src/Typesense/Debug.ts","webpack://Typesense/./src/Typesense/Metrics.ts","webpack://Typesense/./src/Typesense/Stats.ts","webpack://Typesense/./src/Typesense/Health.ts","webpack://Typesense/./src/Typesense/Operations.ts","webpack://Typesense/./src/Typesense/MultiSearch.ts","webpack://Typesense/./src/Typesense/Presets.ts","webpack://Typesense/./src/Typesense/Preset.ts","webpack://Typesense/./src/Typesense/AnalyticsRules.ts","webpack://Typesense/./src/Typesense/AnalyticsRule.ts","webpack://Typesense/./src/Typesense/AnalyticsEvents.ts","webpack://Typesense/./src/Typesense/Analytics.ts","webpack://Typesense/./src/Typesense/Stopwords.ts","webpack://Typesense/./src/Typesense/Stopword.ts","webpack://Typesense/./src/Typesense/ConversationModels.ts","webpack://Typesense/./src/Typesense/ConversationModel.ts","webpack://Typesense/./src/Typesense/Conversations.ts","webpack://Typesense/./src/Typesense/Conversation.ts","webpack://Typesense/./src/Typesense/Client.ts","webpack://Typesense/./src/Typesense/SearchOnlyCollection.ts","webpack://Typesense/./src/Typesense/SearchClient.ts","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://Typesense/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://Typesense/./src/Typesense.ts"],"sourcesContent":["/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n var _loggersByName = {};\n var defaultLogger = null;\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods() {\n /*jshint validthis:true */\n var level = this.getLevel();\n\n // Replace the actual methods.\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, this.name);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n\n // Return any important warnings.\n if (typeof console === undefinedType && level < this.levels.SILENT) {\n return \"No console available for logging\";\n }\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, _level, _loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, factory) {\n // Private instance variables.\n var self = this;\n /**\n * The level inherited from a parent logger (or a global default). We\n * cache this here rather than delegating to the parent so that it stays\n * in sync with the actual logging methods that we have installed (the\n * parent could change levels but we might not have rebuilt the loggers\n * in this child yet).\n * @type {number}\n */\n var inheritedLevel;\n /**\n * The default level for this logger, if any. If set, this overrides\n * `inheritedLevel`.\n * @type {number|null}\n */\n var defaultLevel;\n /**\n * A user-specific level for this logger. If set, this overrides\n * `defaultLevel`.\n * @type {number|null}\n */\n var userLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var cookieName = encodeURIComponent(storageKey);\n var location = cookie.indexOf(cookieName + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(\n cookie.slice(location + cookieName.length + 1)\n )[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n function normalizeLevel(input) {\n var level = input;\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n return level;\n } else {\n throw new TypeError(\"log.setLevel() called with invalid level: \" + input);\n }\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n if (userLevel != null) {\n return userLevel;\n } else if (defaultLevel != null) {\n return defaultLevel;\n } else {\n return inheritedLevel;\n }\n };\n\n self.setLevel = function (level, persist) {\n userLevel = normalizeLevel(level);\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(userLevel);\n }\n\n // NOTE: in v2, this should call rebuild(), which updates children.\n return replaceLoggingMethods.call(self);\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = normalizeLevel(level);\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n userLevel = null;\n clearPersistedLevel();\n replaceLoggingMethods.call(self);\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n self.rebuild = function () {\n if (defaultLogger !== self) {\n inheritedLevel = normalizeLevel(defaultLogger.getLevel());\n }\n replaceLoggingMethods.call(self);\n\n if (defaultLogger === self) {\n for (var childName in _loggersByName) {\n _loggersByName[childName].rebuild();\n }\n }\n };\n\n // Initialize all the internal levels.\n inheritedLevel = normalizeLevel(\n defaultLogger ? defaultLogger.getLevel() : \"WARN\"\n );\n var initialLevel = getPersistedLevel();\n if (initialLevel != null) {\n userLevel = normalizeLevel(initialLevel);\n }\n replaceLoggingMethods.call(self);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n defaultLogger = new Logger();\n\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name,\n defaultLogger.methodFactory\n );\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : String(i);\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","import _typeof from \"./typeof.js\";\nimport assertThisInitialized from \"./assertThisInitialized.js\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return assertThisInitialized(self);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","export default function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}","export default function _isNativeFunction(fn) {\n try {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n } catch (e) {\n return typeof fn === \"function\";\n }\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(t, e, r) {\n if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);\n var o = [null];\n o.push.apply(o, e);\n var p = new (t.bind.apply(t, o))();\n return r && setPrototypeOf(p, r.prototype), p;\n}","export default class TypesenseError extends Error {\n httpStatus?: number;\n\n // Source: https://stackoverflow.com/a/58417721/123545\n constructor(message?: string) {\n super(message);\n this.name = new.target.name;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n","import TypesenseError from './TypesenseError';\n\nexport default class MissingConfigurationError extends TypesenseError {}\n","import * as logger from 'loglevel';\nimport { Logger, LogLevelDesc } from 'loglevel';\nimport { MissingConfigurationError } from './Errors';\nimport type { Agent as HTTPAgent } from 'http';\nimport type { Agent as HTTPSAgent } from 'https';\n\nexport interface NodeConfiguration {\n host: string;\n port: number;\n protocol: string;\n path?: string;\n url?: string;\n}\n\nexport interface NodeConfigurationWithHostname {\n host: string;\n port: number;\n protocol: string;\n path?: string;\n}\n\nexport interface NodeConfigurationWithUrl {\n url: string;\n}\n\nexport interface ConfigurationOptions {\n apiKey: string;\n nodes:\n | NodeConfiguration[]\n | NodeConfigurationWithHostname[]\n | NodeConfigurationWithUrl[];\n randomizeNodes?: boolean;\n /**\n * @deprecated\n * masterNode is now consolidated to nodes, starting with Typesense Server v0.12'\n */\n masterNode?:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl;\n /**\n * @deprecated\n * readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12'\n */\n readReplicaNodes?:\n | NodeConfiguration[]\n | NodeConfigurationWithHostname[]\n | NodeConfigurationWithUrl[];\n nearestNode?:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl;\n connectionTimeoutSeconds?: number;\n timeoutSeconds?: number;\n healthcheckIntervalSeconds?: number;\n numRetries?: number;\n retryIntervalSeconds?: number;\n sendApiKeyAsQueryParam?: boolean | undefined;\n useServerSideSearchCache?: boolean;\n cacheSearchResultsForSeconds?: number;\n additionalHeaders?: Record;\n\n logLevel?: LogLevelDesc;\n logger?: Logger;\n\n /**\n * Set a custom HTTP Agent\n *\n * This is helpful for eg, to enable keepAlive which helps prevents ECONNRESET socket hang up errors\n * Usage:\n * const { Agent: HTTPAgent } = require(\"http\");\n * ...\n * httpAgent: new HTTPAgent({ keepAlive: true }),\n * @type {HTTPAgent}\n */\n httpAgent?: HTTPAgent;\n\n /**\n * Set a custom HTTPS Agent\n *\n * This is helpful for eg, to enable keepAlive which helps prevents ECONNRESET socket hang up errors\n * Usage:\n * const { Agent: HTTPSAgent } = require(\"https\");\n * ...\n * httpsAgent: new HTTPSAgent({ keepAlive: true }),\n * @type {HTTPSAgent}\n */\n httpsAgent?: HTTPSAgent;\n\n /**\n * Set a custom paramsSerializer\n *\n * See axios documentation for more information on how to use this parameter: https://axios-http.com/docs/req_config\n * This is helpful for handling React Native issues like this: https://github.com/axios/axios/issues/6102#issuecomment-2085301397\n * @type {any}\n */\n paramsSerializer?: any;\n}\n\nexport default class Configuration {\n readonly nodes:\n | NodeConfiguration[]\n | NodeConfigurationWithHostname[]\n | NodeConfigurationWithUrl[];\n readonly nearestNode?:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl;\n readonly connectionTimeoutSeconds: number;\n readonly healthcheckIntervalSeconds: number;\n readonly numRetries: number;\n readonly retryIntervalSeconds: number;\n readonly apiKey: string;\n readonly sendApiKeyAsQueryParam?: boolean;\n readonly cacheSearchResultsForSeconds: number;\n readonly useServerSideSearchCache: boolean;\n readonly logger: Logger;\n readonly logLevel: LogLevelDesc;\n readonly additionalHeaders?: Record;\n readonly httpAgent?: HTTPAgent;\n readonly httpsAgent?: HTTPSAgent;\n readonly paramsSerializer?: any;\n\n constructor(options: ConfigurationOptions) {\n this.nodes = options.nodes || [];\n this.nodes = this.nodes\n .map((node) => this.setDefaultPathInNode(node))\n .map((node) => this.setDefaultPortInNode(node))\n .map((node) => ({ ...node })) as NodeConfiguration[]; // Make a deep copy\n\n if (options.randomizeNodes == null) {\n options.randomizeNodes = true;\n }\n\n if (options.randomizeNodes === true) {\n this.shuffleArray(this.nodes);\n }\n\n this.nearestNode = options.nearestNode;\n this.nearestNode = this.setDefaultPathInNode(this.nearestNode);\n this.nearestNode = this.setDefaultPortInNode(this.nearestNode);\n\n this.connectionTimeoutSeconds =\n options.connectionTimeoutSeconds || options.timeoutSeconds || 5;\n this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 60;\n this.numRetries =\n options.numRetries ||\n this.nodes.length + (this.nearestNode == null ? 0 : 1) ||\n 3;\n this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1;\n\n this.apiKey = options.apiKey;\n this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam; // We will set a default for this in Client and SearchClient\n\n this.cacheSearchResultsForSeconds =\n options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default\n this.useServerSideSearchCache = options.useServerSideSearchCache || false;\n\n this.logger = options.logger || logger;\n this.logLevel = options.logLevel || 'warn';\n this.logger.setLevel(this.logLevel);\n\n this.additionalHeaders = options.additionalHeaders;\n\n this.httpAgent = options.httpAgent;\n this.httpsAgent = options.httpsAgent;\n\n this.paramsSerializer = options.paramsSerializer;\n\n this.showDeprecationWarnings(options);\n this.validate();\n }\n\n validate(): boolean {\n if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) {\n throw new MissingConfigurationError(\n 'Ensure that nodes[].protocol, nodes[].host and nodes[].port are set',\n );\n }\n\n if (\n this.nearestNode != null &&\n this.isNodeMissingAnyParameters(this.nearestNode)\n ) {\n throw new MissingConfigurationError(\n 'Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set',\n );\n }\n\n if (this.apiKey == null) {\n throw new MissingConfigurationError('Ensure that apiKey is set');\n }\n\n return true;\n }\n\n private validateNodes(): boolean {\n return this.nodes.some((node) => {\n return this.isNodeMissingAnyParameters(node);\n });\n }\n\n private isNodeMissingAnyParameters(\n node:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl,\n ): boolean {\n return (\n !['protocol', 'host', 'port', 'path'].every((key) => {\n return node.hasOwnProperty(key);\n }) && node['url'] == null\n );\n }\n\n private setDefaultPathInNode(\n node:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined,\n ):\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined {\n if (node != null && !node.hasOwnProperty('path')) {\n node['path'] = '';\n }\n return node;\n }\n\n private setDefaultPortInNode(\n node:\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined,\n ):\n | NodeConfiguration\n | NodeConfigurationWithHostname\n | NodeConfigurationWithUrl\n | undefined {\n if (\n node != null &&\n !node.hasOwnProperty('port') &&\n node.hasOwnProperty('protocol')\n ) {\n switch (node['protocol']) {\n case 'https':\n node['port'] = 443;\n break;\n case 'http':\n node['port'] = 80;\n break;\n }\n }\n return node;\n }\n\n private showDeprecationWarnings(options: ConfigurationOptions): void {\n if (options.timeoutSeconds) {\n this.logger.warn(\n 'Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds',\n );\n }\n if (options.masterNode) {\n this.logger.warn(\n 'Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12',\n );\n }\n if (options.readReplicaNodes) {\n this.logger.warn(\n 'Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12',\n );\n }\n }\n\n private shuffleArray(array) {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [array[i], array[j]] = [array[j], array[i]];\n }\n }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n value = +value;\n return Number.isFinite(value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n response && (this.response = response);\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.response && this.response.status ? this.response.status : null\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?object} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })();\n","'use strict';\n\nimport utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport cookies from './../helpers/cookies.js';\nimport buildURL from './../helpers/buildURL.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport isURLSameOrigin from './../helpers/isURLSameOrigin.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport speedometer from '../helpers/speedometer.js';\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = AxiosHeaders.from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (utils.isFormData(requestData)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = buildFullPath(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || transitionalDefaults;\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(fullPath);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","export const VERSION = \"1.6.7\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy;\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","import TypesenseError from './TypesenseError';\n\nexport default class RequestMalformed extends TypesenseError {}\n","import TypesenseError from './TypesenseError';\n\nexport default class RequestUnauthorized extends TypesenseError {}\n","import TypesenseError from './TypesenseError';\n\nexport default class ObjectNotFound extends TypesenseError {}\n","import TypesenseError from './TypesenseError';\n\nexport default class ObjectAlreadyExists extends TypesenseError {}\n","import TypesenseError from './TypesenseError';\n\nexport default class ObjectUnprocessable extends TypesenseError {}\n","import TypesenseError from './TypesenseError';\n\nexport default class ServerError extends TypesenseError {}\n","import TypesenseError from './TypesenseError';\n\nexport default class HTTPError extends TypesenseError {}\n","import axios, { AxiosRequestConfig, AxiosResponse, Method } from 'axios';\nimport { Logger } from 'loglevel';\nimport {\n HTTPError,\n ObjectAlreadyExists,\n ObjectNotFound,\n ObjectUnprocessable,\n RequestMalformed,\n RequestUnauthorized,\n ServerError,\n} from './Errors';\nimport TypesenseError from './Errors/TypesenseError';\nimport Configuration, { NodeConfiguration } from './Configuration';\nimport { Agent as HTTPAgent } from 'http';\nimport { Agent as HTTPSAgent } from 'https';\n\nconst APIKEYHEADERNAME = 'X-TYPESENSE-API-KEY';\nconst HEALTHY = true;\nconst UNHEALTHY = false;\n\ninterface Node extends NodeConfiguration {\n isHealthy: boolean;\n index: string | number;\n}\n\nexport default class ApiCall {\n private readonly apiKey: string;\n private readonly nodes: Node[];\n private readonly nearestNode: Node;\n private readonly connectionTimeoutSeconds: number;\n private readonly healthcheckIntervalSeconds: number;\n private readonly retryIntervalSeconds: number;\n private readonly sendApiKeyAsQueryParam?: boolean;\n private readonly numRetriesPerRequest: number;\n private readonly additionalUserHeaders?: Record;\n\n private readonly logger: Logger;\n private currentNodeIndex: number;\n\n constructor(private configuration: Configuration) {\n this.apiKey = this.configuration.apiKey;\n this.nodes =\n this.configuration.nodes == null\n ? this.configuration.nodes\n : JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes\n this.nearestNode =\n this.configuration.nearestNode == null\n ? this.configuration.nearestNode\n : JSON.parse(JSON.stringify(this.configuration.nearestNode));\n this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds;\n this.healthcheckIntervalSeconds =\n this.configuration.healthcheckIntervalSeconds;\n this.numRetriesPerRequest = this.configuration.numRetries;\n this.retryIntervalSeconds = this.configuration.retryIntervalSeconds;\n this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam;\n this.additionalUserHeaders = this.configuration.additionalHeaders;\n\n this.logger = this.configuration.logger;\n\n this.initializeMetadataForNodes();\n this.currentNodeIndex = -1;\n }\n\n async get(\n endpoint: string,\n queryParameters: any = {},\n {\n abortSignal = null,\n responseType = undefined,\n }: {\n abortSignal?: any;\n responseType?: AxiosRequestConfig['responseType'] | undefined;\n } = {},\n ): Promise {\n return this.performRequest('get', endpoint, {\n queryParameters,\n abortSignal,\n responseType,\n });\n }\n\n async delete(endpoint: string, queryParameters: any = {}): Promise {\n return this.performRequest('delete', endpoint, { queryParameters });\n }\n\n async post(\n endpoint: string,\n bodyParameters: any = {},\n queryParameters: any = {},\n additionalHeaders: any = {},\n ): Promise {\n return this.performRequest('post', endpoint, {\n queryParameters,\n bodyParameters,\n additionalHeaders,\n });\n }\n\n async put(\n endpoint: string,\n bodyParameters: any = {},\n queryParameters: any = {},\n ): Promise {\n return this.performRequest('put', endpoint, {\n queryParameters,\n bodyParameters,\n });\n }\n\n async patch(\n endpoint: string,\n bodyParameters: any = {},\n queryParameters: any = {},\n ): Promise {\n return this.performRequest('patch', endpoint, {\n queryParameters,\n bodyParameters,\n });\n }\n\n async performRequest(\n requestType: Method,\n endpoint: string,\n {\n queryParameters = null,\n bodyParameters = null,\n additionalHeaders = {},\n abortSignal = null,\n responseType = undefined,\n skipConnectionTimeout = false,\n enableKeepAlive = undefined,\n }: {\n queryParameters?: any;\n bodyParameters?: any;\n additionalHeaders?: any;\n abortSignal?: any;\n responseType?: AxiosRequestConfig['responseType'] | undefined;\n skipConnectionTimeout?: boolean;\n enableKeepAlive?: boolean | undefined;\n },\n ): Promise {\n this.configuration.validate();\n\n const requestNumber = Date.now();\n let lastException;\n this.logger.debug(\n `Request #${requestNumber}: Performing ${requestType.toUpperCase()} request: ${endpoint}`,\n );\n for (\n let numTries = 1;\n numTries <= this.numRetriesPerRequest + 1;\n numTries++\n ) {\n const node = this.getNextNode(requestNumber);\n this.logger.debug(\n `Request #${requestNumber}: Attempting ${requestType.toUpperCase()} request Try #${numTries} to Node ${\n node.index\n }`,\n );\n\n if (abortSignal && abortSignal.aborted) {\n return Promise.reject(new Error('Request aborted by caller.'));\n }\n\n let abortListener;\n\n try {\n const requestOptions: AxiosRequestConfig = {\n method: requestType,\n url: this.uriFor(endpoint, node),\n headers: Object.assign(\n {},\n this.defaultHeaders(),\n additionalHeaders,\n this.additionalUserHeaders,\n ),\n maxContentLength: Infinity,\n maxBodyLength: Infinity,\n responseType,\n validateStatus: (status) => {\n /* Override default validateStatus, which only considers 2xx a success.\n In our case, if the server returns any HTTP code, we will handle it below.\n We do this to be able to raise custom errors based on response code.\n */\n return status > 0;\n },\n transformResponse: [\n (data, headers) => {\n let transformedData = data;\n if (\n headers !== undefined &&\n typeof data === 'string' &&\n headers['content-type'] &&\n headers['content-type'].startsWith('application/json')\n ) {\n transformedData = JSON.parse(data);\n }\n return transformedData;\n },\n ],\n };\n\n if (skipConnectionTimeout !== true) {\n requestOptions.timeout = this.connectionTimeoutSeconds * 1000;\n }\n\n if (queryParameters && Object.keys(queryParameters).length !== 0) {\n requestOptions.params = queryParameters;\n }\n\n if (this.sendApiKeyAsQueryParam) {\n requestOptions.params = requestOptions.params || {};\n requestOptions.params['x-typesense-api-key'] = this.apiKey;\n }\n\n if (this.configuration.httpAgent) {\n this.logger.debug(\n `Request #${requestNumber}: Using custom httpAgent`,\n );\n requestOptions.httpAgent = this.configuration.httpAgent;\n } else if (enableKeepAlive === true) {\n this.logger.debug(`Request #${requestNumber}: Enabling KeepAlive`);\n requestOptions.httpAgent = new HTTPAgent({ keepAlive: true });\n }\n\n if (this.configuration.httpsAgent) {\n this.logger.debug(\n `Request #${requestNumber}: Using custom httpsAgent`,\n );\n requestOptions.httpsAgent = this.configuration.httpsAgent;\n } else if (enableKeepAlive === true) {\n this.logger.debug(`Request #${requestNumber}: Enabling keepAlive`);\n requestOptions.httpsAgent = new HTTPSAgent({ keepAlive: true });\n }\n\n if (this.configuration.paramsSerializer) {\n this.logger.debug(\n `Request #${requestNumber}: Using custom paramsSerializer`,\n );\n requestOptions.paramsSerializer = this.configuration.paramsSerializer;\n }\n\n if (\n bodyParameters &&\n ((typeof bodyParameters === 'string' &&\n bodyParameters.length !== 0) ||\n (typeof bodyParameters === 'object' &&\n Object.keys(bodyParameters).length !== 0))\n ) {\n requestOptions.data = bodyParameters;\n }\n\n // Translate from user-provided AbortController to the Axios request cancel mechanism.\n if (abortSignal) {\n const cancelToken = axios.CancelToken;\n const source = cancelToken.source();\n abortListener = () => source.cancel();\n abortSignal.addEventListener('abort', abortListener);\n requestOptions.cancelToken = source.token;\n }\n\n const response = await axios(requestOptions);\n if (response.status >= 1 && response.status <= 499) {\n // Treat any status code > 0 and < 500 to be an indication that node is healthy\n // We exclude 0 since some clients return 0 when request fails\n this.setNodeHealthcheck(node, HEALTHY);\n }\n this.logger.debug(\n `Request #${requestNumber}: Request to Node ${node.index} was made. Response Code was ${response.status}.`,\n );\n\n if (response.status >= 200 && response.status < 300) {\n // If response is 2xx return a resolved promise\n return Promise.resolve(response.data);\n } else if (response.status < 500) {\n // Next, if response is anything but 5xx, don't retry, return a custom error\n return Promise.reject(\n this.customErrorForResponse(response, response.data?.message),\n );\n } else {\n // Retry all other HTTP errors (HTTPStatus > 500)\n // This will get caught by the catch block below\n throw this.customErrorForResponse(response, response.data?.message);\n }\n } catch (error: any) {\n // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts\n this.setNodeHealthcheck(node, UNHEALTHY);\n lastException = error;\n this.logger.warn(\n `Request #${requestNumber}: Request to Node ${\n node.index\n } failed due to \"${error.code} ${error.message}${\n error.response == null\n ? ''\n : ' - ' + JSON.stringify(error.response?.data)\n }\"`,\n );\n // this.logger.debug(error.stack)\n this.logger.warn(\n `Request #${requestNumber}: Sleeping for ${this.retryIntervalSeconds}s and then retrying request...`,\n );\n await this.timer(this.retryIntervalSeconds);\n } finally {\n if (abortSignal && abortListener) {\n abortSignal.removeEventListener('abort', abortListener);\n }\n }\n }\n this.logger.debug(\n `Request #${requestNumber}: No retries left. Raising last error`,\n );\n return Promise.reject(lastException);\n }\n\n // Attempts to find the next healthy node, looping through the list of nodes once.\n // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy\n // so we can try the request for good measure, in case that node has become healthy since\n getNextNode(requestNumber = 0): Node {\n // Check if nearestNode is set and is healthy, if so return it\n if (this.nearestNode != null) {\n this.logger.debug(\n `Request #${requestNumber}: Nodes Health: Node ${\n this.nearestNode.index\n } is ${this.nearestNode.isHealthy === true ? 'Healthy' : 'Unhealthy'}`,\n );\n if (\n this.nearestNode.isHealthy === true ||\n this.nodeDueForHealthcheck(this.nearestNode, requestNumber)\n ) {\n this.logger.debug(\n `Request #${requestNumber}: Updated current node to Node ${this.nearestNode.index}`,\n );\n return this.nearestNode;\n }\n this.logger.debug(\n `Request #${requestNumber}: Falling back to individual nodes`,\n );\n }\n\n // Fallback to nodes as usual\n this.logger.debug(\n `Request #${requestNumber}: Nodes Health: ${this.nodes\n .map(\n (node) =>\n `Node ${node.index} is ${\n node.isHealthy === true ? 'Healthy' : 'Unhealthy'\n }`,\n )\n .join(' || ')}`,\n );\n let candidateNode: Node = this.nodes[0];\n for (let i = 0; i <= this.nodes.length; i++) {\n this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length;\n candidateNode = this.nodes[this.currentNodeIndex];\n if (\n candidateNode.isHealthy === true ||\n this.nodeDueForHealthcheck(candidateNode, requestNumber)\n ) {\n this.logger.debug(\n `Request #${requestNumber}: Updated current node to Node ${candidateNode.index}`,\n );\n return candidateNode;\n }\n }\n\n // None of the nodes are marked healthy, but some of them could have become healthy since last health check.\n // So we will just return the next node.\n this.logger.debug(\n `Request #${requestNumber}: No healthy nodes were found. Returning the next node, Node ${candidateNode.index}`,\n );\n return candidateNode;\n }\n\n nodeDueForHealthcheck(node, requestNumber = 0): boolean {\n const isDueForHealthcheck =\n Date.now() - node.lastAccessTimestamp >\n this.healthcheckIntervalSeconds * 1000;\n if (isDueForHealthcheck) {\n this.logger.debug(\n `Request #${requestNumber}: Node ${node.index} has exceeded healtcheckIntervalSeconds of ${this.healthcheckIntervalSeconds}. Adding it back into rotation.`,\n );\n }\n return isDueForHealthcheck;\n }\n\n initializeMetadataForNodes(): void {\n if (this.nearestNode != null) {\n this.nearestNode.index = 'nearestNode';\n this.setNodeHealthcheck(this.nearestNode, HEALTHY);\n }\n\n this.nodes.forEach((node, i) => {\n node.index = i;\n this.setNodeHealthcheck(node, HEALTHY);\n });\n }\n\n setNodeHealthcheck(node, isHealthy): void {\n node.isHealthy = isHealthy;\n node.lastAccessTimestamp = Date.now();\n }\n\n uriFor(endpoint: string, node): string {\n if (node.url != null) {\n return `${node.url}${endpoint}`;\n }\n return `${node.protocol}://${node.host}:${node.port}${node.path}${endpoint}`;\n }\n\n defaultHeaders(): any {\n const defaultHeaders = {};\n if (!this.sendApiKeyAsQueryParam) {\n defaultHeaders[APIKEYHEADERNAME] = this.apiKey;\n }\n defaultHeaders['Content-Type'] = 'application/json';\n return defaultHeaders;\n }\n\n async timer(seconds): Promise {\n return new Promise((resolve) => setTimeout(resolve, seconds * 1000));\n }\n\n customErrorForResponse(\n response: AxiosResponse,\n messageFromServer: string,\n ): TypesenseError {\n let errorMessage = `Request failed with HTTP code ${response.status}`;\n if (\n typeof messageFromServer === 'string' &&\n messageFromServer.trim() !== ''\n ) {\n errorMessage += ` | Server said: ${messageFromServer}`;\n }\n\n let error = new TypesenseError(errorMessage);\n\n if (response.status === 400) {\n error = new RequestMalformed(errorMessage);\n } else if (response.status === 401) {\n error = new RequestUnauthorized(errorMessage);\n } else if (response.status === 404) {\n error = new ObjectNotFound(errorMessage);\n } else if (response.status === 409) {\n error = new ObjectAlreadyExists(errorMessage);\n } else if (response.status === 422) {\n error = new ObjectUnprocessable(errorMessage);\n } else if (response.status >= 500 && response.status <= 599) {\n error = new ServerError(errorMessage);\n } else {\n error = new HTTPError(errorMessage);\n }\n\n error.httpStatus = response.status;\n\n return error;\n }\n}\n","import ApiCall from './ApiCall';\nimport { CollectionFieldSchema, CollectionSchema } from './Collection';\n\nexport interface CollectionCreateSchema {\n name: string;\n default_sorting_field?: string;\n fields?: CollectionFieldSchema[];\n symbols_to_index?: string[];\n token_separators?: string[];\n enable_nested_fields?: boolean;\n metadata?: object;\n voice_query_model?: {\n model_name?: string;\n };\n}\n\nexport interface CollectionCreateOptions {\n src_name?: string;\n}\n\nconst RESOURCEPATH = '/collections';\n\nexport default class Collections {\n constructor(private apiCall: ApiCall) {}\n\n async create(\n schema: CollectionCreateSchema,\n options: CollectionCreateOptions = {},\n ): Promise {\n return this.apiCall.post(RESOURCEPATH, schema, options);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import TypesenseError from './TypesenseError';\nimport { ImportResponseFail } from '../Documents';\n\nexport default class ImportError extends TypesenseError {\n importResults: ImportResponseFail;\n constructor(message, importResults) {\n super(message);\n this.importResults = importResults;\n }\n}\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","const defaultCacheResponseForSeconds = 2 * 60;\nconst defaultMaxSize = 100;\n\nexport default class RequestWithCache {\n private responseCache: Map = new Map();\n private responsePromiseCache: Map = new Map();\n\n clearCache() {\n this.responseCache = new Map();\n this.responsePromiseCache = new Map();\n }\n\n // Todo: should probably be passed a callback instead, or an apiCall instance. Types are messy this way\n async perform(\n requestContext: any,\n requestFunction: (...params: any) => unknown,\n requestFunctionArguments: any[],\n cacheOptions: CacheOptions,\n ): Promise {\n const {\n cacheResponseForSeconds = defaultCacheResponseForSeconds,\n maxSize = defaultMaxSize,\n } = cacheOptions;\n const isCacheDisabled = cacheResponseForSeconds <= 0 || maxSize <= 0;\n\n if (isCacheDisabled) {\n return requestFunction.call(requestContext, ...requestFunctionArguments);\n }\n\n const requestFunctionArgumentsJSON = JSON.stringify(\n requestFunctionArguments,\n );\n const cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON);\n const now = Date.now();\n\n if (cacheEntry) {\n const isEntryValid =\n now - cacheEntry.requestTimestamp < cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n this.responseCache.set(requestFunctionArgumentsJSON, cacheEntry);\n return Promise.resolve(cacheEntry.response);\n } else {\n this.responseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n\n const cachePromiseEntry = this.responsePromiseCache.get(\n requestFunctionArgumentsJSON,\n );\n\n if (cachePromiseEntry) {\n const isEntryValid =\n now - cachePromiseEntry.requestTimestamp <\n cacheResponseForSeconds * 1000;\n if (isEntryValid) {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n this.responsePromiseCache.set(\n requestFunctionArgumentsJSON,\n cachePromiseEntry,\n );\n return cachePromiseEntry.responsePromise;\n } else {\n this.responsePromiseCache.delete(requestFunctionArgumentsJSON);\n }\n }\n\n const responsePromise = requestFunction.call(\n requestContext,\n ...requestFunctionArguments,\n );\n this.responsePromiseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n responsePromise,\n });\n\n const response = await responsePromise;\n this.responseCache.set(requestFunctionArgumentsJSON, {\n requestTimestamp: now,\n response,\n });\n\n const isCacheOverMaxSize = this.responseCache.size > maxSize;\n if (isCacheOverMaxSize) {\n const oldestEntry = this.responseCache.keys().next().value;\n this.responseCache.delete(oldestEntry);\n }\n const isResponsePromiseCacheOverMaxSize =\n this.responsePromiseCache.size > maxSize;\n if (isResponsePromiseCacheOverMaxSize) {\n const oldestEntry = this.responsePromiseCache.keys().next().value;\n this.responsePromiseCache.delete(oldestEntry);\n }\n return response as T;\n }\n}\n\ninterface CacheOptions {\n cacheResponseForSeconds?: number;\n maxSize?: number;\n}\n","import RequestWithCache from './RequestWithCache';\nimport ApiCall from './ApiCall';\nimport Configuration from './Configuration';\nimport Collections from './Collections';\nimport type {\n DocumentSchema,\n SearchableDocuments,\n SearchOptions,\n SearchParams,\n SearchParamsWithPreset,\n SearchResponse,\n} from './Documents';\n\nconst RESOURCEPATH = '/documents';\n\nexport class SearchOnlyDocuments\n implements SearchableDocuments\n{\n protected requestWithCache: RequestWithCache = new RequestWithCache();\n\n constructor(\n protected collectionName: string,\n protected apiCall: ApiCall,\n protected configuration: Configuration,\n ) {}\n\n clearCache() {\n this.requestWithCache.clearCache();\n }\n\n async search(\n searchParameters: SearchParams | SearchParamsWithPreset,\n {\n cacheSearchResultsForSeconds = this.configuration\n .cacheSearchResultsForSeconds,\n abortSignal = null,\n }: SearchOptions = {},\n ): Promise> {\n const additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams['use_cache'] = true;\n }\n for (const key in searchParameters) {\n if (Array.isArray(searchParameters[key])) {\n additionalQueryParams[key] = searchParameters[key].join(',');\n }\n }\n const queryParams = Object.assign(\n {},\n searchParameters,\n additionalQueryParams,\n );\n\n return this.requestWithCache.perform(\n this.apiCall,\n this.apiCall.get,\n [this.endpointPath('search'), queryParams, { abortSignal }],\n {\n cacheResponseForSeconds: cacheSearchResultsForSeconds,\n },\n ) as Promise>;\n }\n\n protected endpointPath(operation?: string) {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${RESOURCEPATH}${\n operation === undefined ? '' : '/' + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import type { ReadStream } from 'fs';\nimport ApiCall from './ApiCall';\nimport Configuration from './Configuration';\nimport { ImportError } from './Errors';\nimport { SearchOnlyDocuments } from './SearchOnlyDocuments';\n\n// Todo: use generic to extract filter_by values\nexport interface DeleteQuery {\n filter_by: string;\n batch_size?: number;\n ignore_not_found?: boolean;\n}\n\nexport interface DeleteResponse {\n num_deleted: number;\n}\n\ninterface ImportResponseSuccess {\n success: true;\n}\n\nexport interface ImportResponseFail {\n success: false;\n error: string;\n document: DocumentSchema;\n code: number;\n}\n\nexport type ImportResponse = ImportResponseSuccess | ImportResponseFail;\n\nexport type DocumentSchema = Record;\n\nexport interface SearchParamsWithPreset extends Partial {\n preset: string;\n}\n\ntype OperationMode = 'off' | 'always' | 'fallback';\nexport interface SearchParams {\n // From https://typesense.org/docs/latest/api/documents.html#arguments\n q?: string;\n query_by?: string | string[];\n query_by_weights?: string | number[];\n prefix?: string | boolean | boolean[]; // default: true\n filter_by?: string;\n enable_lazy_filter?: boolean; // default: false\n sort_by?: string | string[]; // default: text match desc\n facet_by?: string | string[];\n max_facet_values?: number;\n facet_sample_threshold?: number;\n facet_sample_percent?: number;\n facet_query?: string;\n facet_query_num_typos?: number;\n facet_return_parent?: string;\n page?: number; // default: 1\n per_page?: number; // default: 10, max 250\n group_by?: string | string[];\n group_limit?: number; // default:\n group_missing_values?: boolean;\n include_fields?: string | string[];\n exclude_fields?: string | string[];\n highlight_fields?: string | string[]; // default: all queried fields\n highlight_full_fields?: string | string[]; // default: all fields\n highlight_affix_num_tokens?: number; // default: 4\n highlight_start_tag?: string; // default: \n highlight_end_tag?: string; // default: \n enable_highlight_v1?: boolean;\n snippet_threshold?: number; // default: 30\n num_typos?: string | number | number[]; // default: 2\n min_len_1typo?: number;\n min_len_2typo?: number;\n split_join_tokens?: OperationMode;\n exhaustive_search?: boolean;\n drop_tokens_threshold?: number; // default: 10\n typo_tokens_threshold?: number; // default: 100\n pinned_hits?: string | string[];\n hidden_hits?: string | string[];\n limit_hits?: number; // default: no limit\n pre_segmented_query?: boolean;\n enable_overrides?: boolean;\n prioritize_exact_match?: boolean; // default: true\n prioritize_token_position?: boolean;\n prioritize_num_matching_fields?: boolean;\n search_cutoff_ms?: number;\n use_cache?: boolean;\n max_candidates?: number;\n infix?: OperationMode | OperationMode[];\n preset?: string;\n text_match_type?: 'max_score' | 'max_weight';\n vector_query?: string;\n 'x-typesense-api-key'?: string;\n 'x-typesense-user-id'?: string;\n offset?: number;\n limit?: number;\n stopwords?: string;\n conversation?: boolean;\n conversation_model_id?: string;\n conversation_id?: string;\n voice_query?: string;\n}\n\ntype SearchResponseHighlightObject = {\n matched_tokens?: string[];\n snippet?: string;\n value?: string;\n};\n\nexport type SearchResponseHighlight = T extends string | number\n ? SearchResponseHighlightObject\n : {\n [TAttribute in keyof T]?: SearchResponseHighlight;\n };\n\nexport interface SearchResponseHit {\n curated?: true;\n highlights?: [\n {\n field: keyof T;\n snippet?: string;\n value?: string;\n snippets?: string[];\n indices?: number[];\n matched_tokens: string[][] | string[];\n },\n ];\n highlight: SearchResponseHighlight;\n document: T;\n text_match: number;\n text_match_info?: {\n best_field_score: string; // To prevent scores from being truncated by JSON spec\n best_field_weight: number;\n fields_matched: number;\n score: string; // To prevent scores from being truncated by JSON spec\n tokens_matched: number;\n };\n}\n\nexport interface SearchResponseFacetCountSchema {\n counts: {\n count: number;\n highlighted: string;\n value: string;\n }[];\n field_name: keyof T;\n stats: {\n avg?: number;\n max?: number;\n min?: number;\n sum?: number;\n };\n}\n\nexport interface SearchResponseRequestParams {\n collection_name?: string;\n q?: string;\n page?: number;\n per_page?: number;\n first_q?: string;\n voice_query?: {\n transcribed_query?: string;\n };\n}\n\n// Todo: we could infer whether this is a grouped response by adding the search params as a generic\nexport interface SearchResponse {\n facet_counts?: SearchResponseFacetCountSchema[];\n found: number;\n found_docs?: number;\n out_of: number;\n page: number;\n request_params: SearchResponseRequestParams;\n search_time_ms: number;\n search_cutoff?: boolean;\n hits?: SearchResponseHit[];\n grouped_hits?: {\n group_key: string[];\n hits: SearchResponseHit[];\n found?: number;\n }[];\n conversation?: {\n answer: string;\n conversation_history: {\n conversation: object[];\n id: string;\n last_updated: number;\n ttl: number;\n };\n conversation_id: string;\n query: string;\n };\n}\n\nexport interface DocumentWriteParameters {\n dirty_values?: 'coerce_or_reject' | 'coerce_or_drop' | 'drop' | 'reject';\n action?: 'create' | 'update' | 'upsert' | 'emplace';\n}\n\nexport interface UpdateByFilterParameters {\n filter_by?: string;\n}\n\nexport interface UpdateByFilterResponse {\n num_updated: number;\n}\n\nexport interface DocumentImportParameters extends DocumentWriteParameters {\n batch_size?: number;\n return_doc?: boolean;\n return_id?: boolean;\n}\n\nexport interface DocumentsExportParameters {\n filter_by?: string;\n include_fields?: string;\n exclude_fields?: string;\n}\n\nexport interface SearchableDocuments {\n search(\n searchParameters: SearchParams | SearchParamsWithPreset,\n options: SearchOptions,\n ): Promise>;\n clearCache(): void;\n}\n\nexport interface WriteableDocuments {\n create(document: T, options: DocumentWriteParameters): Promise;\n upsert(document: T, options: DocumentWriteParameters): Promise;\n update(document: T, options: DocumentWriteParameters): Promise;\n delete(query: DeleteQuery): Promise;\n import(\n documents: T[] | string,\n options: DocumentWriteParameters,\n ): Promise;\n export(options: DocumentsExportParameters): Promise;\n}\n\nexport interface SearchOptions {\n cacheSearchResultsForSeconds?: number;\n abortSignal?: AbortSignal | null;\n}\n\nexport default class Documents\n extends SearchOnlyDocuments\n implements WriteableDocuments\n{\n constructor(\n collectionName: string,\n apiCall: ApiCall,\n configuration: Configuration,\n ) {\n super(collectionName, apiCall, configuration);\n }\n\n async create(document: T, options: DocumentWriteParameters = {}): Promise {\n if (!document) throw new Error('No document provided');\n return this.apiCall.post(this.endpointPath(), document, options);\n }\n\n async upsert(document: T, options: DocumentWriteParameters = {}): Promise {\n if (!document) throw new Error('No document provided');\n return this.apiCall.post(\n this.endpointPath(),\n document,\n Object.assign({}, options, { action: 'upsert' }),\n );\n }\n\n async update(\n document: T,\n options: UpdateByFilterParameters,\n ): Promise;\n async update(document: T, options: DocumentWriteParameters): Promise;\n async update(\n document: T,\n options: DocumentWriteParameters | UpdateByFilterParameters = {},\n ): Promise {\n if (!document) throw new Error('No document provided');\n\n if (options['filter_by'] != null) {\n return this.apiCall.patch(\n this.endpointPath(),\n document,\n Object.assign({}, options),\n );\n } else {\n return this.apiCall.post(\n this.endpointPath(),\n document,\n Object.assign({}, options, { action: 'update' }),\n );\n }\n }\n\n async delete(\n query: DeleteQuery = {} as DeleteQuery,\n ): Promise {\n return this.apiCall.delete(this.endpointPath(), query);\n }\n\n async createMany(documents: T[], options: DocumentImportParameters = {}) {\n this.configuration.logger.warn(\n 'createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents',\n );\n return this.import(documents, options);\n }\n\n /**\n * Import a set of documents in a batch.\n * @param {string|Array} documents - Can be a JSONL string of documents or an array of document objects.\n * @param options\n * @return {string|Array} Returns a JSONL string if the input was a JSONL string, otherwise it returns an array of results.\n */\n async import(\n documents: string,\n options?: DocumentImportParameters,\n ): Promise;\n async import(\n documents: T[],\n options?: DocumentImportParameters,\n ): Promise;\n async import(\n documents: T[] | string,\n options: DocumentImportParameters = {},\n ): Promise {\n let documentsInJSONLFormat;\n if (Array.isArray(documents)) {\n try {\n documentsInJSONLFormat = documents\n .map((document) => JSON.stringify(document))\n .join('\\n');\n } catch (error: any) {\n // if rangeerror, throw custom error message\n if (\n error instanceof RangeError &&\n error.message.includes('Too many properties to enumerate')\n ) {\n throw new Error(`${error}\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\n\n Please try reducing the number of keys in your document, or using CURL to import your data.\n `);\n }\n\n // else, throw the non-range error anyways\n throw new Error(error);\n }\n } else {\n documentsInJSONLFormat = documents;\n }\n\n const resultsInJSONLFormat = await this.apiCall.performRequest(\n 'post',\n this.endpointPath('import'),\n {\n queryParameters: options,\n bodyParameters: documentsInJSONLFormat,\n additionalHeaders: { 'Content-Type': 'text/plain' },\n skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully\n enableKeepAlive: true, // This is to prevent ECONNRESET socket hang up errors. Reference: https://github.com/axios/axios/issues/2936#issuecomment-779439991\n },\n );\n\n if (Array.isArray(documents)) {\n const resultsInJSONFormat = resultsInJSONLFormat\n .split('\\n')\n .map((r) => JSON.parse(r)) as ImportResponse[];\n const failedItems = resultsInJSONFormat.filter(\n (r) => r.success === false,\n );\n if (failedItems.length > 0) {\n throw new ImportError(\n `${\n resultsInJSONFormat.length - failedItems.length\n } documents imported successfully, ${\n failedItems.length\n } documents failed during import. Use \\`error.importResults\\` from the raised exception to get a detailed error reason for each document.`,\n resultsInJSONFormat,\n );\n } else {\n return resultsInJSONFormat;\n }\n } else {\n return resultsInJSONLFormat as string;\n }\n }\n\n /**\n * Returns a JSONL string for all the documents in this collection\n */\n async export(options: DocumentsExportParameters = {}): Promise {\n return this.apiCall.get(this.endpointPath('export'), options);\n }\n\n /**\n * Returns a NodeJS readable stream of JSONL for all the documents in this collection.\n */\n async exportStream(\n options: DocumentsExportParameters = {},\n ): Promise {\n return this.apiCall.get(this.endpointPath('export'), options, {\n responseType: 'stream',\n });\n }\n}\n","import ApiCall from './ApiCall';\nimport Collections from './Collections';\nimport { OverrideSchema } from './Override';\n\nconst RESOURCEPATH = '/overrides';\n\nexport interface OverrideRuleQuerySchema {\n query?: string;\n match?: 'exact' | 'contains';\n}\n\nexport interface OverrideRuleFilterSchema {\n filter_by?: string;\n}\n\nexport interface OverrideRuleTagsSchema {\n tags?: string[];\n}\n\nexport interface OverrideCreateSchema {\n rule: OverrideRuleQuerySchema &\n OverrideRuleFilterSchema &\n OverrideRuleTagsSchema;\n filter_by?: string;\n sort_by?: string;\n remove_matched_tokens?: boolean;\n replace_query?: string;\n includes?: Array<{\n id: string;\n position: number;\n }>;\n excludes?: Array<{ id: string }>;\n filter_curated_hits?: boolean;\n effective_from_ts?: number;\n effective_to_ts?: number;\n stop_processing?: boolean;\n metadata?: object;\n}\n\nexport interface OverridesRetrieveSchema {\n overrides: OverrideSchema[];\n}\n\nexport default class Overrides {\n constructor(\n private collectionName: string,\n private apiCall: ApiCall,\n ) {}\n\n async upsert(\n overrideId: string,\n params: OverrideCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(overrideId),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${\n Overrides.RESOURCEPATH\n }${operation === undefined ? '' : '/' + operation}`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport Collections from './Collections';\nimport Overrides, { OverrideCreateSchema } from './Overrides';\n\nexport interface OverrideSchema extends OverrideCreateSchema {\n id: string;\n}\n\nexport interface OverrideDeleteSchema {\n id: string;\n}\n\nexport default class Override {\n constructor(\n private collectionName: string,\n private overrideId: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${Overrides.RESOURCEPATH}/${this.overrideId}`;\n }\n}\n","import ApiCall from './ApiCall';\nimport Collections from './Collections';\nimport { SynonymSchema } from './Synonym';\n\nconst RESOURCEPATH = '/synonyms';\n\nexport interface SynonymCreateSchema {\n synonyms: string[];\n root?: string;\n locale?: string;\n symbols_to_index?: string[];\n}\n\nexport interface SynonymsRetrieveSchema {\n synonyms: SynonymSchema[];\n}\n\nexport default class Synonyms {\n constructor(\n private collectionName: string,\n private apiCall: ApiCall,\n ) {}\n\n async upsert(\n synonymId: string,\n params: SynonymCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(synonymId),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string) {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${\n Synonyms.RESOURCEPATH\n }${operation === undefined ? '' : '/' + operation}`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport Collections from './Collections';\nimport Synonyms, { SynonymCreateSchema } from './Synonyms';\n\nexport interface SynonymSchema extends SynonymCreateSchema {\n id: string;\n}\n\nexport interface SynonymDeleteSchema {\n id: string;\n}\n\nexport default class Synonym {\n constructor(\n private collectionName: string,\n private synonymId: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${Synonyms.RESOURCEPATH}/${this.synonymId}`;\n }\n}\n","import ApiCall from './ApiCall';\nimport Collections from './Collections';\nimport Documents, {\n DocumentSchema,\n DocumentWriteParameters,\n} from './Documents';\n\nexport class Document {\n constructor(\n private collectionName: string,\n private documentId: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n async update(\n partialDocument: Partial,\n options: DocumentWriteParameters = {},\n ): Promise {\n return this.apiCall.patch(this.endpointPath(), partialDocument, options);\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.collectionName}${Documents.RESOURCEPATH}/${this.documentId}`;\n }\n}\n","import ApiCall from './ApiCall';\nimport Collections, { CollectionCreateSchema } from './Collections';\nimport Documents, { DocumentSchema } from './Documents';\nimport { ObjectNotFound } from './Errors';\nimport Overrides from './Overrides';\nimport Override from './Override';\nimport Synonyms from './Synonyms';\nimport Synonym from './Synonym';\nimport { Document } from './Document';\n\nexport type FieldType =\n | 'string'\n | 'int32'\n | 'int64'\n | 'float'\n | 'bool'\n | 'geopoint'\n | 'geopoint[]'\n | 'string[]'\n | 'int32[]'\n | 'int64[]'\n | 'float[]'\n | 'bool[]'\n | 'object'\n | 'object[]'\n | 'auto'\n | 'string*'\n | 'image';\n\nexport interface CollectionFieldSchema {\n name: string;\n type: FieldType;\n optional?: boolean;\n facet?: boolean;\n index?: boolean;\n sort?: boolean;\n locale?: string;\n infix?: boolean;\n stem?: boolean;\n num_dim?: number;\n store?: boolean;\n [t: string]: unknown;\n}\n\nexport interface CollectionSchema extends CollectionCreateSchema {\n created_at: number;\n num_documents: number;\n num_memory_shards: number;\n}\n\nexport interface CollectionDropFieldSchema {\n name: string;\n drop: true;\n}\n\nexport interface CollectionUpdateSchema\n extends Partial> {\n fields?: (CollectionFieldSchema | CollectionDropFieldSchema)[];\n}\n\nexport default class Collection {\n private readonly _documents: Documents;\n private individualDocuments: Record> = {};\n private readonly _overrides: Overrides;\n private individualOverrides: Record = {};\n private readonly _synonyms: Synonyms;\n private individualSynonyms: Record = {};\n\n constructor(\n private readonly name: string,\n private readonly apiCall: ApiCall,\n private readonly configuration: any,\n ) {\n this.name = name;\n this.apiCall = apiCall;\n this.configuration = configuration;\n\n this._documents = new Documents(\n this.name,\n this.apiCall,\n this.configuration,\n );\n this._overrides = new Overrides(this.name, this.apiCall);\n this._synonyms = new Synonyms(this.name, this.apiCall);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async update(schema: CollectionUpdateSchema): Promise {\n return this.apiCall.patch(this.endpointPath(), schema);\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n async exists(): Promise {\n try {\n await this.retrieve();\n return true;\n } catch (e) {\n if (e instanceof ObjectNotFound) return false;\n throw e;\n }\n }\n\n documents(): Documents;\n documents(documentId: string): Document;\n documents(documentId?: string): Document | Documents {\n if (!documentId) {\n return this._documents;\n } else {\n if (this.individualDocuments[documentId] === undefined) {\n this.individualDocuments[documentId] = new Document(\n this.name,\n documentId,\n this.apiCall,\n );\n }\n return this.individualDocuments[documentId];\n }\n }\n\n overrides(): Overrides;\n overrides(overrideId: string): Override;\n overrides(overrideId?: string): Overrides | Override {\n if (overrideId === undefined) {\n return this._overrides;\n } else {\n if (this.individualOverrides[overrideId] === undefined) {\n this.individualOverrides[overrideId] = new Override(\n this.name,\n overrideId,\n this.apiCall,\n );\n }\n return this.individualOverrides[overrideId];\n }\n }\n\n synonyms(): Synonyms;\n synonyms(synonymId: string): Synonym;\n synonyms(synonymId?: string): Synonyms | Synonym {\n if (synonymId === undefined) {\n return this._synonyms;\n } else {\n if (this.individualSynonyms[synonymId] === undefined) {\n this.individualSynonyms[synonymId] = new Synonym(\n this.name,\n synonymId,\n this.apiCall,\n );\n }\n return this.individualSynonyms[synonymId];\n }\n }\n\n private endpointPath(): string {\n return `${Collections.RESOURCEPATH}/${this.name}`;\n }\n}\n","import ApiCall from './ApiCall';\n\nconst RESOURCEPATH = '/aliases';\n\nexport interface CollectionAliasCreateSchema {\n collection_name: string;\n}\n\nexport interface CollectionAliasSchema extends CollectionAliasCreateSchema {\n name: string;\n}\n\nexport interface CollectionAliasesResponseSchema {\n aliases: CollectionAliasSchema[];\n}\n\nexport default class Aliases {\n constructor(private apiCall: ApiCall) {}\n\n async upsert(\n name: string,\n mapping: CollectionAliasCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(name),\n mapping,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n private endpointPath(aliasName): string {\n return `${Aliases.RESOURCEPATH}/${aliasName}`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import Aliases, { CollectionAliasSchema } from './Aliases';\nimport ApiCall from './ApiCall';\n\nexport default class Alias {\n constructor(\n private name: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Aliases.RESOURCEPATH}/${this.name}`;\n }\n}\n","import { createHmac } from 'crypto';\nimport ApiCall from './ApiCall';\nimport { KeyCreateSchema, KeySchema } from './Key';\nimport { SearchParams } from './Documents';\n\nconst RESOURCEPATH = '/keys';\n\nexport interface KeysRetrieveSchema {\n keys: KeySchema[];\n}\n\nexport interface GenerateScopedSearchKeyParams extends Partial {\n expires_at?: number;\n cache_ttl?: number;\n limit_multi_searches?: number;\n}\n\nexport default class Keys {\n constructor(private apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async create(params: KeyCreateSchema): Promise {\n return this.apiCall.post(Keys.RESOURCEPATH, params);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n generateScopedSearchKey(\n searchKey: string,\n parameters: GenerateScopedSearchKeyParams,\n ): string {\n // Note: only a key generated with the `documents:search` action will be\n // accepted by the server, when usined with the search endpoint.\n const paramsJSON = JSON.stringify(parameters);\n const digest = Buffer.from(\n createHmac('sha256', searchKey).update(paramsJSON).digest('base64'),\n );\n const keyPrefix = searchKey.substr(0, 4);\n const rawScopedKey = `${digest}${keyPrefix}${paramsJSON}`;\n\n return Buffer.from(rawScopedKey).toString('base64');\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport Keys from './Keys';\n\nexport interface KeyCreateSchema {\n actions: string[];\n collections: string[];\n description?: string;\n value?: string;\n value_prefix?: string;\n expires_at?: number;\n}\n\nexport interface KeyDeleteSchema {\n id: number;\n}\n\nexport interface KeySchema extends KeyCreateSchema {\n id: number;\n}\n\nexport default class Key {\n constructor(\n private id: number,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Keys.RESOURCEPATH}/${this.id}`;\n }\n}\n","import ApiCall from './ApiCall';\n\nconst RESOURCEPATH = '/debug';\n\nexport interface DebugResponseSchema {\n state: number;\n version: string;\n}\n\nexport default class Debug {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from './ApiCall';\n\nconst RESOURCEPATH = '/metrics.json';\n\nexport interface MetricsResponse {\n [key: `system_cpu${number}_active_percentage`]: string;\n system_cpu_active_percentage: string;\n system_disk_total_bytes: string;\n system_disk_used_bytes: string;\n system_memory_total_bytes: string;\n system_memory_total_swap_bytes?: string;\n system_memory_used_bytes: string;\n system_memory_used_swap_bytes?: string;\n system_network_received_bytes: string;\n system_network_sent_bytes: string;\n typesense_memory_active_bytes: string;\n typesense_memory_allocated_bytes: string;\n typesense_memory_fragmentation_ratio: string;\n typesense_memory_mapped_bytes: string;\n typesense_memory_metadata_bytes: string;\n typesense_memory_resident_bytes: string;\n typesense_memory_retained_bytes: string;\n}\n\nexport default class Metrics {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from './ApiCall';\n\nconst RESOURCEPATH = '/stats.json';\n\nexport interface EndpointStats {\n [endpoint: string]: number;\n}\n\nexport interface StatsResponse {\n delete_latency_ms?: number;\n delete_requests_per_second?: number;\n import_latency_ms?: number;\n import_requests_per_second?: number;\n latency_ms?: EndpointStats;\n overloaded_requests_per_second?: number;\n pending_write_batches?: number;\n requests_per_second?: EndpointStats;\n search_latency_ms?: number;\n search_requests_per_second?: number;\n total_requests_per_second?: number;\n write_latency_ms?: number;\n write_requests_per_second?: number;\n}\n\nexport default class Metrics {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from './ApiCall';\n\nconst RESOURCEPATH = '/health';\n\nexport interface HealthResponse {\n ok: boolean;\n}\n\nexport default class Health {\n constructor(private apiCall: ApiCall) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n}\n","import ApiCall from './ApiCall';\n\nconst RESOURCEPATH = '/operations';\n\nexport default class Operations {\n constructor(private apiCall: ApiCall) {}\n\n async perform(\n operationName: 'vote' | 'snapshot' | 'cache/clear' | string,\n queryParameters: Record = {},\n ): Promise {\n return this.apiCall.post(\n `${RESOURCEPATH}/${operationName}`,\n {},\n queryParameters,\n );\n }\n}\n","import ApiCall from './ApiCall';\nimport Configuration from './Configuration';\nimport RequestWithCache from './RequestWithCache';\nimport {\n DocumentSchema,\n SearchParams,\n SearchParamsWithPreset,\n SearchResponse,\n} from './Documents';\n\nconst RESOURCEPATH = '/multi_search';\n\nexport interface MultiSearchRequestSchema extends SearchParams {\n collection?: string;\n 'x-typesense-api-key'?: string;\n}\n\nexport interface MultiSearchRequestWithPresetSchema\n extends SearchParamsWithPreset {\n collection?: string;\n 'x-typesense-api-key'?: string;\n}\n\nexport interface MultiSearchRequestsSchema {\n searches: (MultiSearchRequestSchema | MultiSearchRequestWithPresetSchema)[];\n}\n\nexport interface MultiSearchResponse {\n results: { [Index in keyof T]: SearchResponse } & {\n length: T['length'];\n };\n}\n\nexport default class MultiSearch {\n private requestWithCache: RequestWithCache;\n\n constructor(\n private apiCall: ApiCall,\n private configuration: Configuration,\n private useTextContentType: boolean = false,\n ) {\n this.requestWithCache = new RequestWithCache();\n }\n\n clearCache() {\n this.requestWithCache.clearCache();\n }\n\n async perform(\n searchRequests: MultiSearchRequestsSchema,\n commonParams: Partial = {},\n {\n cacheSearchResultsForSeconds = this.configuration\n .cacheSearchResultsForSeconds,\n }: { cacheSearchResultsForSeconds?: number } = {},\n ): Promise> {\n const additionalHeaders = {};\n if (this.useTextContentType) {\n additionalHeaders['content-type'] = 'text/plain';\n }\n\n const additionalQueryParams = {};\n if (this.configuration.useServerSideSearchCache === true) {\n additionalQueryParams['use_cache'] = true;\n }\n const queryParams = Object.assign({}, commonParams, additionalQueryParams);\n\n return this.requestWithCache.perform(\n this.apiCall,\n this.apiCall.post,\n [RESOURCEPATH, searchRequests, queryParams, additionalHeaders],\n { cacheResponseForSeconds: cacheSearchResultsForSeconds },\n ) as Promise>;\n }\n}\n","import ApiCall from './ApiCall';\nimport { PresetSchema } from './Preset';\nimport { SearchParams } from './Documents';\nimport { MultiSearchRequestsSchema } from './MultiSearch';\n\nconst RESOURCEPATH = '/presets';\n\nexport interface PresetCreateSchema {\n value: SearchParams | MultiSearchRequestsSchema;\n}\n\nexport interface PresetsRetrieveSchema {\n presets: PresetSchema[];\n}\n\nexport default class Presets {\n constructor(private apiCall: ApiCall) {}\n\n async upsert(\n presetId: string,\n params: PresetCreateSchema,\n ): Promise {\n return this.apiCall.put(this.endpointPath(presetId), params);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${Presets.RESOURCEPATH}${\n operation === undefined ? '' : '/' + operation\n }`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport Presets, { PresetCreateSchema } from './Presets';\n\nexport interface PresetSchema extends PresetCreateSchema {\n name: string;\n}\n\nexport interface PresetDeleteSchema {\n name: string;\n}\n\nexport default class Preset {\n constructor(\n private presetId: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Presets.RESOURCEPATH}/${this.presetId}`;\n }\n}\n","import ApiCall from './ApiCall';\nimport {\n AnalyticsRuleCreateSchema,\n AnalyticsRuleSchema,\n} from './AnalyticsRule';\n\nexport interface AnalyticsRulesRetrieveSchema {\n rules: AnalyticsRuleSchema[];\n}\n\nconst RESOURCEPATH = '/analytics/rules';\n\nexport default class AnalyticsRules {\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async upsert(\n name: string,\n params: AnalyticsRuleCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(name),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${AnalyticsRules.RESOURCEPATH}${\n operation === undefined ? '' : '/' + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport AnalyticsRules from './AnalyticsRules';\n\nexport interface AnalyticsRuleCreateSchema {\n type: 'popular_queries' | 'nohits_queries' | 'counter';\n params: {\n source: {\n collections: string[];\n events?: Array<{\n type: string;\n weight: number;\n name: string;\n }>;\n };\n expand_query?: boolean;\n destination: {\n collection: string;\n counter_field?: string;\n };\n limit?: number;\n };\n}\n\nexport interface AnalyticsRuleDeleteSchema {\n name: string;\n}\n\nexport interface AnalyticsRuleSchema extends AnalyticsRuleCreateSchema {\n name: string;\n}\n\nexport default class AnalyticsRule {\n constructor(\n private name: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${AnalyticsRules.RESOURCEPATH}/${this.name}`;\n }\n}\n","import ApiCall from './ApiCall';\nimport { AnalyticsEventCreateSchema } from './AnalyticsEvent';\n\nconst RESOURCEPATH = '/analytics/events';\n\nexport default class AnalyticsEvents {\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async create(\n params: AnalyticsEventCreateSchema,\n ): Promise {\n return this.apiCall.post(\n this.endpointPath(),\n params,\n );\n }\n\n private endpointPath(operation?: string): string {\n return `${AnalyticsEvents.RESOURCEPATH}${\n operation === undefined ? '' : '/' + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport AnalyticsRules from './AnalyticsRules';\nimport AnalyticsRule from './AnalyticsRule';\nimport AnalyticsEvents from './AnalyticsEvents';\n\nconst RESOURCEPATH = '/analytics';\n\nexport default class Analytics {\n private readonly _analyticsRules: AnalyticsRules;\n private readonly individualAnalyticsRules: Record = {};\n private readonly _analyticsEvents: AnalyticsEvents;\n\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n this._analyticsRules = new AnalyticsRules(this.apiCall);\n this._analyticsEvents = new AnalyticsEvents(this.apiCall);\n }\n\n rules(id?: string): AnalyticsRules | AnalyticsRule {\n if (id === undefined) {\n return this._analyticsRules;\n } else {\n if (this.individualAnalyticsRules[id] === undefined) {\n this.individualAnalyticsRules[id] = new AnalyticsRule(id, this.apiCall);\n }\n return this.individualAnalyticsRules[id];\n }\n }\n\n events(): AnalyticsEvents {\n return this._analyticsEvents;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport { StopwordSchema } from './Stopword';\n\nconst RESOURCEPATH = '/stopwords';\n\nexport interface StopwordCreateSchema {\n stopwords: string[];\n locale?: string;\n}\n\nexport interface StopwordsRetrieveSchema {\n stopwords: StopwordSchema[];\n}\n\nexport default class Stopwords {\n constructor(private apiCall: ApiCall) {}\n\n async upsert(\n stopwordId: string,\n params: StopwordCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(stopwordId),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${Stopwords.RESOURCEPATH}${\n operation === undefined ? '' : '/' + operation\n }`;\n }\n\n static get RESOURCEPATH(): string {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport Stopwords, { StopwordCreateSchema } from './Stopwords';\n\nexport interface StopwordSchema extends StopwordCreateSchema {\n id: string;\n stopwords: string[];\n locale?: string;\n}\n\nexport interface StopwordDeleteSchema {\n id: string;\n}\n\nexport default class Stopword {\n constructor(\n private stopwordId: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Stopwords.RESOURCEPATH}/${this.stopwordId}`;\n }\n}\n","import ApiCall from './ApiCall';\nimport {\n ConversationModelCreateSchema,\n ConversationModelSchema,\n} from './ConversationModel';\n\nconst RESOURCEPATH = '/conversations/models';\n\nexport default class ConversationModels {\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n }\n\n async create(\n params: ConversationModelCreateSchema,\n ): Promise {\n return this.apiCall.post(\n this.endpointPath(),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n private endpointPath(operation?: string): string {\n return `${ConversationModels.RESOURCEPATH}${\n operation === undefined ? '' : '/' + operation\n }`;\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport ConversationModels from './ConversationModels';\n\nexport interface ConversationModelCreateSchema {\n model_name: string;\n api_key: string;\n system_prompt?: string;\n max_bytes: number;\n}\n\nexport interface ConversationModelDeleteSchema {\n id: string;\n}\n\nexport interface ConversationModelSchema extends ConversationModelCreateSchema {\n id: string;\n}\n\nexport default class ConversationModel {\n constructor(\n private id: string,\n private apiCall: ApiCall,\n ) {}\n\n async update(\n params: ConversationModelCreateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(),\n params,\n );\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async delete(): Promise {\n return this.apiCall.delete(\n this.endpointPath(),\n );\n }\n\n private endpointPath(): string {\n return `${ConversationModels.RESOURCEPATH}/${this.id}`;\n }\n}\n","import ApiCall from './ApiCall';\nimport ConversationModels from './ConversationModels';\nimport ConversationModel from './ConversationModel';\nimport { ConversationSchema } from './Conversation';\n\nconst RESOURCEPATH = '/conversations';\n\nexport interface ConversationsRetrieveSchema {\n conversations: ConversationSchema[];\n}\n\nexport default class Conversations {\n private readonly _conversationsModels: ConversationModels;\n private readonly individualConversationModels: Record<\n string,\n ConversationModel\n > = {};\n\n constructor(private readonly apiCall: ApiCall) {\n this.apiCall = apiCall;\n this._conversationsModels = new ConversationModels(this.apiCall);\n }\n\n async retrieve(): Promise {\n return this.apiCall.get(RESOURCEPATH);\n }\n\n models(): ConversationModels;\n models(id: string): ConversationModel;\n models(id?: string): ConversationModels | ConversationModel {\n if (id === undefined) {\n return this._conversationsModels;\n } else {\n if (this.individualConversationModels[id] === undefined) {\n this.individualConversationModels[id] = new ConversationModel(\n id,\n this.apiCall,\n );\n }\n return this.individualConversationModels[id];\n }\n }\n\n static get RESOURCEPATH() {\n return RESOURCEPATH;\n }\n}\n","import ApiCall from './ApiCall';\nimport Conversations from './Conversations';\n\nexport interface ConversationDeleteSchema {\n id: number;\n}\n\nexport interface ConversationUpdateSchema {\n ttl: number;\n}\n\nexport interface ConversationSchema {\n id: number;\n conversation: object[];\n last_updated: number;\n ttl: number;\n}\n\nexport default class Conversation {\n constructor(\n private id: string,\n private apiCall: ApiCall,\n ) {}\n\n async retrieve(): Promise {\n return this.apiCall.get(this.endpointPath());\n }\n\n async update(\n params: ConversationUpdateSchema,\n ): Promise {\n return this.apiCall.put(\n this.endpointPath(),\n params,\n );\n }\n\n async delete(): Promise {\n return this.apiCall.delete(this.endpointPath());\n }\n\n private endpointPath(): string {\n return `${Conversations.RESOURCEPATH}/${this.id}`;\n }\n}\n","/* eslint-disable no-dupe-class-members */\n\nimport Configuration, { ConfigurationOptions } from './Configuration';\nimport ApiCall from './ApiCall';\nimport Collections from './Collections';\nimport Collection from './Collection';\nimport Aliases from './Aliases';\nimport Alias from './Alias';\nimport Keys from './Keys';\nimport Key from './Key';\nimport Debug from './Debug';\nimport Metrics from './Metrics';\nimport Stats from './Stats';\nimport Health from './Health';\nimport Operations from './Operations';\nimport MultiSearch from './MultiSearch';\nimport Presets from './Presets';\nimport Preset from './Preset';\nimport Analytics from './Analytics';\nimport Stopwords from './Stopwords';\nimport Stopword from './Stopword';\nimport Conversations from './Conversations';\nimport Conversation from './Conversation';\n\nexport default class Client {\n configuration: Configuration;\n apiCall: ApiCall;\n debug: Debug;\n metrics: Metrics;\n stats: Stats;\n health: Health;\n operations: Operations;\n multiSearch: MultiSearch;\n analytics: Analytics;\n private readonly _collections: Collections;\n private readonly individualCollections: Record;\n private readonly _aliases: Aliases;\n private readonly individualAliases: Record;\n private readonly _keys: Keys;\n private readonly individualKeys: Record;\n private readonly _presets: Presets;\n private readonly individualPresets: Record;\n private readonly _stopwords: Stopwords;\n private readonly individualStopwords: Record;\n private readonly _conversations: Conversations;\n private readonly individualConversations: Record;\n\n constructor(options: ConfigurationOptions) {\n options.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam ?? false;\n\n this.configuration = new Configuration(options);\n this.apiCall = new ApiCall(this.configuration);\n this.debug = new Debug(this.apiCall);\n this.metrics = new Metrics(this.apiCall);\n this.stats = new Stats(this.apiCall);\n this.health = new Health(this.apiCall);\n this.operations = new Operations(this.apiCall);\n this.multiSearch = new MultiSearch(this.apiCall, this.configuration);\n this._collections = new Collections(this.apiCall);\n this.individualCollections = {};\n this._aliases = new Aliases(this.apiCall);\n this.individualAliases = {};\n this._keys = new Keys(this.apiCall);\n this.individualKeys = {};\n this._presets = new Presets(this.apiCall);\n this.individualPresets = {};\n this._stopwords = new Stopwords(this.apiCall);\n this.individualStopwords = {};\n this.analytics = new Analytics(this.apiCall);\n this._conversations = new Conversations(this.apiCall);\n this.individualConversations = {};\n }\n\n collections(): Collections;\n collections = object>(\n collectionName: string,\n ): Collection;\n collections(collectionName?: string): Collections | Collection {\n if (collectionName === undefined) {\n return this._collections;\n } else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new Collection(\n collectionName,\n this.apiCall,\n this.configuration,\n );\n }\n return this.individualCollections[collectionName];\n }\n }\n\n aliases(): Aliases;\n aliases(aliasName: string): Alias;\n aliases(aliasName?: string): Aliases | Alias {\n if (aliasName === undefined) {\n return this._aliases;\n } else {\n if (this.individualAliases[aliasName] === undefined) {\n this.individualAliases[aliasName] = new Alias(aliasName, this.apiCall);\n }\n return this.individualAliases[aliasName];\n }\n }\n\n keys(): Keys;\n keys(id: number): Key;\n keys(id?: number): Keys | Key {\n if (id === undefined) {\n return this._keys;\n } else {\n if (this.individualKeys[id] === undefined) {\n this.individualKeys[id] = new Key(id, this.apiCall);\n }\n return this.individualKeys[id];\n }\n }\n\n presets(): Presets;\n presets(id: string): Preset;\n presets(id?: string): Presets | Preset {\n if (id === undefined) {\n return this._presets;\n } else {\n if (this.individualPresets[id] === undefined) {\n this.individualPresets[id] = new Preset(id, this.apiCall);\n }\n return this.individualPresets[id];\n }\n }\n\n stopwords(): Stopwords;\n stopwords(id: string): Stopword;\n stopwords(id?: string): Stopwords | Stopword {\n if (id === undefined) {\n return this._stopwords;\n } else {\n if (this.individualStopwords[id] === undefined) {\n this.individualStopwords[id] = new Stopword(id, this.apiCall);\n }\n return this.individualStopwords[id];\n }\n }\n\n conversations(): Conversations;\n conversations(id: string): Conversation;\n conversations(id?: string): Conversations | Conversation {\n if (id === undefined) {\n return this._conversations;\n } else {\n if (this.individualConversations[id] === undefined) {\n this.individualConversations[id] = new Conversation(id, this.apiCall);\n }\n return this.individualConversations[id];\n }\n }\n}\n","import { DocumentSchema, SearchableDocuments } from './Documents';\nimport ApiCall from './ApiCall';\nimport { SearchOnlyDocuments } from './SearchOnlyDocuments';\n\nexport class SearchOnlyCollection {\n private readonly _documents: SearchableDocuments;\n\n constructor(\n private readonly name: string,\n private readonly apiCall: ApiCall,\n private readonly configuration: any,\n ) {\n this._documents = new SearchOnlyDocuments(\n this.name,\n this.apiCall,\n this.configuration,\n );\n }\n\n documents(): SearchableDocuments {\n return this._documents;\n }\n}\n","import Configuration, { ConfigurationOptions } from './Configuration';\nimport ApiCall from './ApiCall';\nimport MultiSearch from './MultiSearch';\nimport { DocumentSchema } from './Documents';\nimport { SearchOnlyCollection } from './SearchOnlyCollection';\n\nexport default class SearchClient {\n public readonly multiSearch: MultiSearch;\n private readonly configuration: Configuration;\n private readonly apiCall: ApiCall;\n private readonly individualCollections: Record;\n\n constructor(options: ConfigurationOptions) {\n options.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam ?? true;\n if (\n options.sendApiKeyAsQueryParam === true &&\n (options.apiKey || '').length > 2000\n ) {\n console.warn(\n '[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.',\n );\n options.sendApiKeyAsQueryParam = false;\n }\n\n this.configuration = new Configuration(options);\n this.apiCall = new ApiCall(this.configuration);\n this.multiSearch = new MultiSearch(this.apiCall, this.configuration, true);\n this.individualCollections = {};\n }\n\n clearCache() {\n this.multiSearch.clearCache();\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n Object.entries(this.individualCollections).forEach(([_, collection]) => {\n collection.documents().clearCache();\n });\n }\n\n collections(\n collectionName: string,\n ): SearchOnlyCollection | SearchOnlyCollection {\n if (!collectionName) {\n throw new Error(\n 'Typesense.SearchClient only supports search operations, so the collectionName that needs to ' +\n 'be searched must be specified. Use Typesense.Client if you need to access the collection object.',\n );\n } else {\n if (this.individualCollections[collectionName] === undefined) {\n this.individualCollections[collectionName] = new SearchOnlyCollection(\n collectionName,\n this.apiCall,\n this.configuration,\n );\n }\n return this.individualCollections[collectionName];\n }\n }\n}\n","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import Client from './Typesense/Client';\nimport SearchClient from './Typesense/SearchClient';\nimport * as Errors from './Typesense/Errors';\n\nexport { Client, SearchClient, Errors };\nexport default { Client, SearchClient, Errors };\n"],"names":["root","definition","noop","undefinedType","isIE","window","navigator","test","userAgent","logMethods","_loggersByName","defaultLogger","bindMethod","obj","methodName","method","bind","Function","prototype","call","e","apply","arguments","traceForIE","console","log","trace","replaceLoggingMethods","level","this","getLevel","i","length","methodFactory","name","debug","levels","SILENT","enableLoggingWhenConsoleArrives","defaultMethodFactory","_level","_loggerName","undefined","realMethod","Logger","factory","inheritedLevel","defaultLevel","userLevel","self","storageKey","getPersistedLevel","storedLevel","localStorage","ignore","cookie","document","cookieName","encodeURIComponent","location","indexOf","exec","slice","normalizeLevel","input","toUpperCase","TypeError","setLevel","persist","levelNum","levelName","persistLevelIfPossible","setDefaultLevel","resetLevel","removeItem","clearPersistedLevel","enableAll","TRACE","disableAll","rebuild","childName","initialLevel","getLogger","logger","_log","noConflict","getLoggers","_typeof","_regeneratorRuntime","module","exports","__esModule","t","r","Object","n","hasOwnProperty","o","defineProperty","value","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","forEach","_invoke","AsyncIterator","invoke","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","displayName","isGeneratorFunction","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","keys","reverse","pop","prev","charAt","stop","rval","handle","complete","finish","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","key","get","prop","_classCallCheck","instance","Constructor","toPropertyKey","toPrimitive","String","_defineProperties","target","props","descriptor","_createClass","protoProps","staticProps","_defineProperty","_assertThisInitialized","ReferenceError","_possibleConstructorReturn","_getPrototypeOf","_setPrototypeOf","_inherits","subClass","superClass","_isNativeReflectConstruct","Boolean","valueOf","Reflect","construct","_wrapNativeSuper","Class","_cache","Map","fn","toString","has","set","Wrapper","TypesenseError","_Error","message","_this","_callSuper","MissingConfigurationError","_TypesenseError","Configuration","options","nodes","map","node","setDefaultPathInNode","setDefaultPortInNode","_objectSpread","randomizeNodes","shuffleArray","nearestNode","connectionTimeoutSeconds","timeoutSeconds","healthcheckIntervalSeconds","numRetries","retryIntervalSeconds","apiKey","sendApiKeyAsQueryParam","cacheSearchResultsForSeconds","useServerSideSearchCache","logLevel","additionalHeaders","httpAgent","httpsAgent","paramsSerializer","showDeprecationWarnings","validate","validateNodes","isNodeMissingAnyParameters","_this2","some","every","warn","masterNode","readReplicaNodes","array","j","Math","floor","random","_ref","asyncGeneratorStep","gen","reject","_next","_throw","info","error","_asyncToGenerator","args","err","thisArg","kindOf","cache","thing","str","toLowerCase","kindOfTest","typeOfTest","isArray","Array","isUndefined","isArrayBuffer","isString","isFunction","isNumber","isObject","isPlainObject","val","isDate","isFile","isBlob","isFileList","isURLSearchParams","allOwnKeys","getOwnPropertyNames","len","findKey","_key","_global","global","isContextDefined","context","isTypedArray","TypedArray","Uint8Array","isHTMLForm","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","ret","defineProperties","ALPHA","DIGIT","ALPHABET","ALPHA_DIGIT","isAsyncFn","isBuffer","isFormData","kind","FormData","append","isArrayBufferView","result","ArrayBuffer","isView","buffer","isBoolean","isStream","pipe","merge","caseless","assignValue","targetKey","extend","b","trim","replace","stripBOM","content","charCodeAt","inherits","superConstructor","assign","toFlatObject","sourceObj","destObj","filter","propFilter","merged","endsWith","searchString","position","lastIndex","toArray","arr","forEachEntry","pair","matchAll","regExp","matches","hasOwnProp","freezeMethods","toObjectSet","arrayOrString","delimiter","split","toCamelCase","m","p1","p2","toFiniteNumber","defaultValue","Number","isFinite","generateString","size","alphabet","isSpecCompliantForm","toJSONObject","stack","visit","source","reducedValue","isThenable","catch","AxiosError","code","config","request","response","captureStackTrace","utils","toJSON","description","number","fileName","lineNumber","columnNumber","status","from","customProps","axiosError","cause","isVisitable","removeBrackets","renderKey","path","dots","concat","token","join","predicates","formData","metaTokens","indexes","option","visitor","defaultVisitor","useBlob","Blob","convertValue","toISOString","Buffer","JSON","stringify","isFlatArray","el","index","exposedHelpers","build","encode","charMap","match","AxiosURLSearchParams","params","_pairs","encoder","_encode","buildURL","url","serializeFn","serialize","serializedParams","hashmarkIndex","handlers","use","fulfilled","rejected","synchronous","runWhen","eject","id","clear","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","buildPath","isNumericKey","isLast","arrayToObject","entries","parsePropPath","defaults","transitional","adapter","transformRequest","data","headers","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","platform","helpers","isNode","toURLEncodedForm","formSerializer","_FormData","env","rawValue","parser","parse","stringifySafely","transformResponse","JSONRequested","responseType","strictJSONParsing","ERR_BAD_RESPONSE","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","ignoreDuplicateOf","$internals","normalizeHeader","header","normalizeValue","matchHeaderValue","isHeaderNameFilter","AxiosHeaders","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","parsed","line","substring","parseHeaders","tokens","tokensRE","parseTokens","matcher","deleted","deleteHeader","normalize","format","normalized","w","char","formatHeader","targets","asStrings","first","computed","accessor","accessors","defineAccessor","accessorName","arg1","arg2","arg3","buildAccessors","mapped","headerValue","transformData","fns","isCancel","__CANCEL__","CanceledError","ERR_CANCELED","write","expires","domain","secure","Date","toGMTString","read","RegExp","decodeURIComponent","remove","now","buildFullPath","baseURL","requestedURL","relativeURL","combineURLs","msie","urlParsingNode","createElement","originURL","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","requestURL","progressEventReducer","listener","isDownloadStream","bytesNotified","_speedometer","samplesCount","min","bytes","timestamps","firstSampleTS","head","tail","chunkLength","startedAt","bytesCount","passed","round","loaded","total","lengthComputable","progressBytes","rate","progress","estimated","event","knownAdapters","http","xhr","XMLHttpRequest","requestData","requestHeaders","onCanceled","withXSRFToken","cancelToken","unsubscribe","signal","removeEventListener","auth","username","password","unescape","btoa","fullPath","onloadend","responseHeaders","getAllResponseHeaders","ERR_BAD_REQUEST","settle","responseText","statusText","open","onreadystatechange","readyState","responseURL","setTimeout","onabort","ECONNABORTED","onerror","ERR_NETWORK","ontimeout","timeoutErrorMessage","ETIMEDOUT","isURLSameOrigin","xsrfValue","cookies","setRequestHeader","withCredentials","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","abort","subscribe","aborted","parseProtocol","send","renderReason","reason","isResolvedHandle","adapters","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","dispatchRequest","headersToObject","mergeConfig","config1","config2","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","beforeRedirect","transport","socketPath","responseEncoding","configValue","validators","deprecatedWarnings","validator","version","formatMessage","opt","desc","opts","ERR_DEPRECATED","assertOptions","schema","allowUnknown","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","Axios","instanceConfig","interceptors","configOrUrl","_request","dummy","boolean","function","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","responseInterceptorChain","promise","chain","newConfig","onFulfilled","onRejected","getUri","generateHTTPMethod","isForm","CancelToken","executor","resolvePromise","_listeners","onfulfilled","_resolve","splice","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","axios","createInstance","defaultConfig","VERSION","toFormData","Cancel","all","promises","spread","callback","isAxiosError","payload","formToJSON","getAdapter","default","RequestMalformed","RequestUnauthorized","ObjectNotFound","ObjectAlreadyExists","ObjectUnprocessable","ServerError","HTTPError","HEALTHY","ApiCall","configuration","numRetriesPerRequest","additionalUserHeaders","initializeMetadataForNodes","currentNodeIndex","_timer","_performRequest","_patch","_put","_post","_delete2","_get","_callee","endpoint","queryParameters","_ref$abortSignal","abortSignal","_ref$responseType","_args","_context","performRequest","_x","_callee2","_args2","_context2","_x2","_callee3","bodyParameters","_args3","_context3","_x3","_callee4","_args4","_context4","_x4","_callee5","_args5","_context5","_x5","_callee6","requestType","_ref2","_ref2$queryParameters","_ref2$bodyParameters","_ref2$additionalHeade","_ref2$abortSignal","_ref2$responseType","_ref2$skipConnectionT","skipConnectionTimeout","_ref2$enableKeepAlive","enableKeepAlive","requestNumber","lastException","_loop","_ret","numTries","_context7","abortListener","requestOptions","_response$data","_response$data2","_error$response","_context6","getNextNode","uriFor","defaultHeaders","Infinity","transformedData","startsWith","HTTPAgent","keepAlive","HTTPSAgent","setNodeHealthcheck","customErrorForResponse","t0","timer","_x6","_x7","_x8","isHealthy","nodeDueForHealthcheck","candidateNode","isDueForHealthcheck","lastAccessTimestamp","_callee7","seconds","_context8","_x9","messageFromServer","errorMessage","httpStatus","RESOURCEPATH","Collections","apiCall","_retrieve","_create","post","ImportError","importResults","_arrayLikeToArray","arr2","_unsupportedIterableToArray","minLen","_toConsumableArray","iter","RequestWithCache","_perform","responseCache","responsePromiseCache","requestContext","requestFunction","requestFunctionArguments","cacheOptions","_cacheOptions$cacheRe","cacheResponseForSeconds","_cacheOptions$maxSize","maxSize","requestFunctionArgumentsJSON","cacheEntry","cachePromiseEntry","responsePromise","oldestEntry","_oldestEntry","requestTimestamp","delete","SearchOnlyDocuments","collectionName","_search","requestWithCache","clearCache","searchParameters","_ref$cacheSearchResul","additionalQueryParams","queryParams","perform","endpointPath","operation","Documents","_exportStream","_export2","_import2","_createMany","_update","_upsert","action","patch","query","documents","import","documentsInJSONLFormat","resultsInJSONLFormat","resultsInJSONFormat","failedItems","_args6","RangeError","includes","success","_args7","_callee8","_args8","Overrides","overrideId","put","Override","Synonyms","synonymId","Synonym","Document","documentId","partialDocument","Collection","_documents","_overrides","_synonyms","_exists","retrieve","individualDocuments","individualOverrides","individualSynonyms","Aliases","mapping","aliasName","Alias","Keys","searchKey","parameters","paramsJSON","digest","createHmac","update","keyPrefix","substr","rawScopedKey","Key","Debug","Metrics","Health","Operations","operationName","MultiSearch","useTextContentType","searchRequests","commonParams","Presets","presetId","Preset","AnalyticsRules","AnalyticsRule","AnalyticsEvents","Analytics","_analyticsRules","_analyticsEvents","individualAnalyticsRules","Stopwords","stopwordId","Stopword","ConversationModels","ConversationModel","Conversations","_conversationsModels","individualConversationModels","Conversation","Client","_options$sendApiKeyAs","metrics","stats","Stats","health","operations","multiSearch","_collections","individualCollections","_aliases","individualAliases","_keys","individualKeys","_presets","individualPresets","_stopwords","individualStopwords","analytics","_conversations","individualConversations","SearchOnlyCollection","SearchClient","Errors"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/Typesense.d.ts b/lib/Typesense.d.ts index 3cdd44e6..e520a126 100644 --- a/lib/Typesense.d.ts +++ b/lib/Typesense.d.ts @@ -1,6 +1,6 @@ -import Client from "./Typesense/Client"; -import SearchClient from "./Typesense/SearchClient"; -import * as Errors from "./Typesense/Errors"; +import Client from './Typesense/Client'; +import SearchClient from './Typesense/SearchClient'; +import * as Errors from './Typesense/Errors'; export { Client, SearchClient, Errors }; declare const _default: { Client: typeof Client; diff --git a/lib/Typesense/Alias.d.ts b/lib/Typesense/Alias.d.ts index 6e36a7d3..aa1f01cd 100644 --- a/lib/Typesense/Alias.d.ts +++ b/lib/Typesense/Alias.d.ts @@ -1,5 +1,5 @@ -import { CollectionAliasSchema } from "./Aliases"; -import ApiCall from "./ApiCall"; +import { CollectionAliasSchema } from './Aliases'; +import ApiCall from './ApiCall'; export default class Alias { private name; private apiCall; diff --git a/lib/Typesense/Alias.js.map b/lib/Typesense/Alias.js.map index 8716e9e2..6c7395b0 100644 --- a/lib/Typesense/Alias.js.map +++ b/lib/Typesense/Alias.js.map @@ -1 +1 @@ -{"version":3,"file":"Alias.js","sourceRoot":"","sources":["../../src/Typesense/Alias.ts"],"names":[],"mappings":";;;AAAA,8DAA2D;AAG3D;IACE,eAAoB,IAAY,EAAU,OAAgB;QAAtC,SAAI,GAAJ,IAAI,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAS;IAAG,CAAC;IAExD,wBAAQ,GAAd;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAwB,IAAI,CAAC,YAAY,EAAE,CAAC,EAAC;;;KACrE;IAEK,sBAAM,GAAZ;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAwB,IAAI,CAAC,YAAY,EAAE,CAAC,EAAC;;;KACxE;IAEO,4BAAY,GAApB;QACE,OAAO,UAAG,iBAAO,CAAC,YAAY,cAAI,IAAI,CAAC,IAAI,CAAE,CAAC;IAChD,CAAC;IACH,YAAC;AAAD,CAAC,AAdD,IAcC"} \ No newline at end of file +{"version":3,"file":"Alias.js","sourceRoot":"","sources":["../../src/Typesense/Alias.ts"],"names":[],"mappings":";;;AAAA,8DAA2D;AAG3D;IACE,eACU,IAAY,EACZ,OAAgB;QADhB,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAS;IACvB,CAAC;IAEE,wBAAQ,GAAd;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAwB,IAAI,CAAC,YAAY,EAAE,CAAC,EAAC;;;KACrE;IAEK,sBAAM,GAAZ;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAwB,IAAI,CAAC,YAAY,EAAE,CAAC,EAAC;;;KACxE;IAEO,4BAAY,GAApB;QACE,OAAO,UAAG,iBAAO,CAAC,YAAY,cAAI,IAAI,CAAC,IAAI,CAAE,CAAC;IAChD,CAAC;IACH,YAAC;AAAD,CAAC,AAjBD,IAiBC"} \ No newline at end of file diff --git a/lib/Typesense/Aliases.d.ts b/lib/Typesense/Aliases.d.ts index aad02136..b68a8332 100644 --- a/lib/Typesense/Aliases.d.ts +++ b/lib/Typesense/Aliases.d.ts @@ -1,4 +1,4 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; export interface CollectionAliasCreateSchema { collection_name: string; } diff --git a/lib/Typesense/Aliases.js b/lib/Typesense/Aliases.js index a054489d..5ad91196 100644 --- a/lib/Typesense/Aliases.js +++ b/lib/Typesense/Aliases.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); -var RESOURCEPATH = "/aliases"; +var RESOURCEPATH = '/aliases'; var Aliases = /** @class */ (function () { function Aliases(apiCall) { this.apiCall = apiCall; diff --git a/lib/Typesense/Analytics.d.ts b/lib/Typesense/Analytics.d.ts index ea151dad..122d08a8 100644 --- a/lib/Typesense/Analytics.d.ts +++ b/lib/Typesense/Analytics.d.ts @@ -1,7 +1,7 @@ -import ApiCall from "./ApiCall"; -import AnalyticsRules from "./AnalyticsRules"; -import AnalyticsRule from "./AnalyticsRule"; -import AnalyticsEvents from "./AnalyticsEvents"; +import ApiCall from './ApiCall'; +import AnalyticsRules from './AnalyticsRules'; +import AnalyticsRule from './AnalyticsRule'; +import AnalyticsEvents from './AnalyticsEvents'; export default class Analytics { private readonly apiCall; private readonly _analyticsRules; diff --git a/lib/Typesense/Analytics.js b/lib/Typesense/Analytics.js index 620f3bfb..185e7e36 100644 --- a/lib/Typesense/Analytics.js +++ b/lib/Typesense/Analytics.js @@ -4,7 +4,7 @@ var tslib_1 = require("tslib"); var AnalyticsRules_1 = tslib_1.__importDefault(require("./AnalyticsRules")); var AnalyticsRule_1 = tslib_1.__importDefault(require("./AnalyticsRule")); var AnalyticsEvents_1 = tslib_1.__importDefault(require("./AnalyticsEvents")); -var RESOURCEPATH = "/analytics"; +var RESOURCEPATH = '/analytics'; var Analytics = /** @class */ (function () { function Analytics(apiCall) { this.apiCall = apiCall; diff --git a/lib/Typesense/AnalyticsEvents.d.ts b/lib/Typesense/AnalyticsEvents.d.ts index 98157081..e5d35290 100644 --- a/lib/Typesense/AnalyticsEvents.d.ts +++ b/lib/Typesense/AnalyticsEvents.d.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import { AnalyticsEventCreateSchema } from "./AnalyticsEvent"; +import ApiCall from './ApiCall'; +import { AnalyticsEventCreateSchema } from './AnalyticsEvent'; export default class AnalyticsEvents { private readonly apiCall; constructor(apiCall: ApiCall); diff --git a/lib/Typesense/AnalyticsEvents.js b/lib/Typesense/AnalyticsEvents.js index ea613178..80ebdf75 100644 --- a/lib/Typesense/AnalyticsEvents.js +++ b/lib/Typesense/AnalyticsEvents.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); -var RESOURCEPATH = "/analytics/events"; +var RESOURCEPATH = '/analytics/events'; var AnalyticsEvents = /** @class */ (function () { function AnalyticsEvents(apiCall) { this.apiCall = apiCall; @@ -15,7 +15,7 @@ var AnalyticsEvents = /** @class */ (function () { }); }; AnalyticsEvents.prototype.endpointPath = function (operation) { - return "".concat(AnalyticsEvents.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(AnalyticsEvents.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); }; Object.defineProperty(AnalyticsEvents, "RESOURCEPATH", { get: function () { diff --git a/lib/Typesense/AnalyticsRule.d.ts b/lib/Typesense/AnalyticsRule.d.ts index 1eb865e5..23aebb05 100644 --- a/lib/Typesense/AnalyticsRule.d.ts +++ b/lib/Typesense/AnalyticsRule.d.ts @@ -1,6 +1,6 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; export interface AnalyticsRuleCreateSchema { - type: "popular_queries" | "nohits_queries" | "counter"; + type: 'popular_queries' | 'nohits_queries' | 'counter'; params: { source: { collections: string[]; diff --git a/lib/Typesense/AnalyticsRules.d.ts b/lib/Typesense/AnalyticsRules.d.ts index 5ac34f01..421592c5 100644 --- a/lib/Typesense/AnalyticsRules.d.ts +++ b/lib/Typesense/AnalyticsRules.d.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import { AnalyticsRuleCreateSchema, AnalyticsRuleSchema } from "./AnalyticsRule"; +import ApiCall from './ApiCall'; +import { AnalyticsRuleCreateSchema, AnalyticsRuleSchema } from './AnalyticsRule'; export interface AnalyticsRulesRetrieveSchema { rules: AnalyticsRuleSchema[]; } diff --git a/lib/Typesense/AnalyticsRules.js b/lib/Typesense/AnalyticsRules.js index f84e2649..bff7517a 100644 --- a/lib/Typesense/AnalyticsRules.js +++ b/lib/Typesense/AnalyticsRules.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); -var RESOURCEPATH = "/analytics/rules"; +var RESOURCEPATH = '/analytics/rules'; var AnalyticsRules = /** @class */ (function () { function AnalyticsRules(apiCall) { this.apiCall = apiCall; @@ -22,7 +22,7 @@ var AnalyticsRules = /** @class */ (function () { }); }; AnalyticsRules.prototype.endpointPath = function (operation) { - return "".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(AnalyticsRules.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); }; Object.defineProperty(AnalyticsRules, "RESOURCEPATH", { get: function () { diff --git a/lib/Typesense/ApiCall.d.ts b/lib/Typesense/ApiCall.d.ts index e1f288a2..bc71c259 100644 --- a/lib/Typesense/ApiCall.d.ts +++ b/lib/Typesense/ApiCall.d.ts @@ -1,6 +1,6 @@ -import { AxiosRequestConfig, AxiosResponse, Method } from "axios"; -import TypesenseError from "./Errors/TypesenseError"; -import Configuration, { NodeConfiguration } from "./Configuration"; +import { AxiosRequestConfig, AxiosResponse, Method } from 'axios'; +import TypesenseError from './Errors/TypesenseError'; +import Configuration, { NodeConfiguration } from './Configuration'; interface Node extends NodeConfiguration { isHealthy: boolean; index: string | number; @@ -21,7 +21,7 @@ export default class ApiCall { constructor(configuration: Configuration); get(endpoint: string, queryParameters?: any, { abortSignal, responseType, }?: { abortSignal?: any; - responseType?: AxiosRequestConfig["responseType"] | undefined; + responseType?: AxiosRequestConfig['responseType'] | undefined; }): Promise; delete(endpoint: string, queryParameters?: any): Promise; post(endpoint: string, bodyParameters?: any, queryParameters?: any, additionalHeaders?: any): Promise; @@ -32,7 +32,7 @@ export default class ApiCall { bodyParameters?: any; additionalHeaders?: any; abortSignal?: any; - responseType?: AxiosRequestConfig["responseType"] | undefined; + responseType?: AxiosRequestConfig['responseType'] | undefined; skipConnectionTimeout?: boolean; enableKeepAlive?: boolean | undefined; }): Promise; diff --git a/lib/Typesense/ApiCall.js b/lib/Typesense/ApiCall.js index 708092a5..a4b96ee9 100644 --- a/lib/Typesense/ApiCall.js +++ b/lib/Typesense/ApiCall.js @@ -6,7 +6,7 @@ var Errors_1 = require("./Errors"); var TypesenseError_1 = tslib_1.__importDefault(require("./Errors/TypesenseError")); var http_1 = require("http"); var https_1 = require("https"); -var APIKEYHEADERNAME = "X-TYPESENSE-API-KEY"; +var APIKEYHEADERNAME = 'X-TYPESENSE-API-KEY'; var HEALTHY = true; var UNHEALTHY = false; var ApiCall = /** @class */ (function () { @@ -37,7 +37,7 @@ var ApiCall = /** @class */ (function () { var _b = _a === void 0 ? {} : _a, _c = _b.abortSignal, abortSignal = _c === void 0 ? null : _c, _d = _b.responseType, responseType = _d === void 0 ? undefined : _d; return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_e) { - return [2 /*return*/, this.performRequest("get", endpoint, { + return [2 /*return*/, this.performRequest('get', endpoint, { queryParameters: queryParameters, abortSignal: abortSignal, responseType: responseType, @@ -49,7 +49,7 @@ var ApiCall = /** @class */ (function () { if (queryParameters === void 0) { queryParameters = {}; } return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { - return [2 /*return*/, this.performRequest("delete", endpoint, { queryParameters: queryParameters })]; + return [2 /*return*/, this.performRequest('delete', endpoint, { queryParameters: queryParameters })]; }); }); }; @@ -59,7 +59,7 @@ var ApiCall = /** @class */ (function () { if (additionalHeaders === void 0) { additionalHeaders = {}; } return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { - return [2 /*return*/, this.performRequest("post", endpoint, { + return [2 /*return*/, this.performRequest('post', endpoint, { queryParameters: queryParameters, bodyParameters: bodyParameters, additionalHeaders: additionalHeaders, @@ -72,7 +72,7 @@ var ApiCall = /** @class */ (function () { if (queryParameters === void 0) { queryParameters = {}; } return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { - return [2 /*return*/, this.performRequest("put", endpoint, { + return [2 /*return*/, this.performRequest('put', endpoint, { queryParameters: queryParameters, bodyParameters: bodyParameters, })]; @@ -84,7 +84,7 @@ var ApiCall = /** @class */ (function () { if (queryParameters === void 0) { queryParameters = {}; } return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { - return [2 /*return*/, this.performRequest("patch", endpoint, { + return [2 /*return*/, this.performRequest('patch', endpoint, { queryParameters: queryParameters, bodyParameters: bodyParameters, })]; @@ -110,7 +110,7 @@ var ApiCall = /** @class */ (function () { node = this_1.getNextNode(requestNumber); this_1.logger.debug("Request #".concat(requestNumber, ": Attempting ").concat(requestType.toUpperCase(), " request Try #").concat(numTries, " to Node ").concat(node.index)); if (abortSignal && abortSignal.aborted) { - return [2 /*return*/, { value: Promise.reject(new Error("Request aborted by caller.")) }]; + return [2 /*return*/, { value: Promise.reject(new Error('Request aborted by caller.')) }]; } abortListener = void 0; _o.label = 1; @@ -134,9 +134,9 @@ var ApiCall = /** @class */ (function () { function (data, headers) { var transformedData = data; if (headers !== undefined && - typeof data === "string" && - headers["content-type"] && - headers["content-type"].startsWith("application/json")) { + typeof data === 'string' && + headers['content-type'] && + headers['content-type'].startsWith('application/json')) { transformedData = JSON.parse(data); } return transformedData; @@ -151,7 +151,7 @@ var ApiCall = /** @class */ (function () { } if (this_1.sendApiKeyAsQueryParam) { requestOptions.params = requestOptions.params || {}; - requestOptions.params["x-typesense-api-key"] = this_1.apiKey; + requestOptions.params['x-typesense-api-key'] = this_1.apiKey; } if (this_1.configuration.httpAgent) { this_1.logger.debug("Request #".concat(requestNumber, ": Using custom httpAgent")); @@ -174,9 +174,9 @@ var ApiCall = /** @class */ (function () { requestOptions.paramsSerializer = this_1.configuration.paramsSerializer; } if (bodyParameters && - ((typeof bodyParameters === "string" && + ((typeof bodyParameters === 'string' && bodyParameters.length !== 0) || - (typeof bodyParameters === "object" && + (typeof bodyParameters === 'object' && Object.keys(bodyParameters).length !== 0))) { requestOptions.data = bodyParameters; } @@ -185,7 +185,7 @@ var ApiCall = /** @class */ (function () { cancelToken = axios_1.default.CancelToken; source_1 = cancelToken.source(); abortListener = function () { return source_1.cancel(); }; - abortSignal.addEventListener("abort", abortListener); + abortSignal.addEventListener('abort', abortListener); requestOptions.cancelToken = source_1.token; } return [4 /*yield*/, (0, axios_1.default)(requestOptions)]; @@ -215,8 +215,8 @@ var ApiCall = /** @class */ (function () { this_1.setNodeHealthcheck(node, UNHEALTHY); lastException = error_1; this_1.logger.warn("Request #".concat(requestNumber, ": Request to Node ").concat(node.index, " failed due to \"").concat(error_1.code, " ").concat(error_1.message).concat(error_1.response == null - ? "" - : " - " + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), "\"")); + ? '' + : ' - ' + JSON.stringify((_d = error_1.response) === null || _d === void 0 ? void 0 : _d.data), "\"")); // this.logger.debug(error.stack) this_1.logger.warn("Request #".concat(requestNumber, ": Sleeping for ").concat(this_1.retryIntervalSeconds, "s and then retrying request...")); return [4 /*yield*/, this_1.timer(this_1.retryIntervalSeconds)]; @@ -225,7 +225,7 @@ var ApiCall = /** @class */ (function () { return [3 /*break*/, 6]; case 5: if (abortSignal && abortListener) { - abortSignal.removeEventListener("abort", abortListener); + abortSignal.removeEventListener('abort', abortListener); } return [7 /*endfinally*/]; case 6: return [2 /*return*/]; @@ -260,7 +260,7 @@ var ApiCall = /** @class */ (function () { if (requestNumber === void 0) { requestNumber = 0; } // Check if nearestNode is set and is healthy, if so return it if (this.nearestNode != null) { - this.logger.debug("Request #".concat(requestNumber, ": Nodes Health: Node ").concat(this.nearestNode.index, " is ").concat(this.nearestNode.isHealthy === true ? "Healthy" : "Unhealthy")); + this.logger.debug("Request #".concat(requestNumber, ": Nodes Health: Node ").concat(this.nearestNode.index, " is ").concat(this.nearestNode.isHealthy === true ? 'Healthy' : 'Unhealthy')); if (this.nearestNode.isHealthy === true || this.nodeDueForHealthcheck(this.nearestNode, requestNumber)) { this.logger.debug("Request #".concat(requestNumber, ": Updated current node to Node ").concat(this.nearestNode.index)); @@ -271,9 +271,9 @@ var ApiCall = /** @class */ (function () { // Fallback to nodes as usual this.logger.debug("Request #".concat(requestNumber, ": Nodes Health: ").concat(this.nodes .map(function (node) { - return "Node ".concat(node.index, " is ").concat(node.isHealthy === true ? "Healthy" : "Unhealthy"); + return "Node ".concat(node.index, " is ").concat(node.isHealthy === true ? 'Healthy' : 'Unhealthy'); }) - .join(" || "))); + .join(' || '))); var candidateNode = this.nodes[0]; for (var i = 0; i <= this.nodes.length; i++) { this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length; @@ -301,7 +301,7 @@ var ApiCall = /** @class */ (function () { ApiCall.prototype.initializeMetadataForNodes = function () { var _this = this; if (this.nearestNode != null) { - this.nearestNode.index = "nearestNode"; + this.nearestNode.index = 'nearestNode'; this.setNodeHealthcheck(this.nearestNode, HEALTHY); } this.nodes.forEach(function (node, i) { @@ -324,7 +324,7 @@ var ApiCall = /** @class */ (function () { if (!this.sendApiKeyAsQueryParam) { defaultHeaders[APIKEYHEADERNAME] = this.apiKey; } - defaultHeaders["Content-Type"] = "application/json"; + defaultHeaders['Content-Type'] = 'application/json'; return defaultHeaders; }; ApiCall.prototype.timer = function (seconds) { @@ -336,8 +336,8 @@ var ApiCall = /** @class */ (function () { }; ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) { var errorMessage = "Request failed with HTTP code ".concat(response.status); - if (typeof messageFromServer === "string" && - messageFromServer.trim() !== "") { + if (typeof messageFromServer === 'string' && + messageFromServer.trim() !== '') { errorMessage += " | Server said: ".concat(messageFromServer); } var error = new TypesenseError_1.default(errorMessage); diff --git a/lib/Typesense/Client.d.ts b/lib/Typesense/Client.d.ts index 843112e1..73bda591 100644 --- a/lib/Typesense/Client.d.ts +++ b/lib/Typesense/Client.d.ts @@ -1,24 +1,24 @@ -import Configuration, { ConfigurationOptions } from "./Configuration"; -import ApiCall from "./ApiCall"; -import Collections from "./Collections"; -import Collection from "./Collection"; -import Aliases from "./Aliases"; -import Alias from "./Alias"; -import Keys from "./Keys"; -import Key from "./Key"; -import Debug from "./Debug"; -import Metrics from "./Metrics"; -import Stats from "./Stats"; -import Health from "./Health"; -import Operations from "./Operations"; -import MultiSearch from "./MultiSearch"; -import Presets from "./Presets"; -import Preset from "./Preset"; -import Analytics from "./Analytics"; -import Stopwords from "./Stopwords"; -import Stopword from "./Stopword"; -import Conversations from "./Conversations"; -import Conversation from "./Conversation"; +import Configuration, { ConfigurationOptions } from './Configuration'; +import ApiCall from './ApiCall'; +import Collections from './Collections'; +import Collection from './Collection'; +import Aliases from './Aliases'; +import Alias from './Alias'; +import Keys from './Keys'; +import Key from './Key'; +import Debug from './Debug'; +import Metrics from './Metrics'; +import Stats from './Stats'; +import Health from './Health'; +import Operations from './Operations'; +import MultiSearch from './MultiSearch'; +import Presets from './Presets'; +import Preset from './Preset'; +import Analytics from './Analytics'; +import Stopwords from './Stopwords'; +import Stopword from './Stopword'; +import Conversations from './Conversations'; +import Conversation from './Conversation'; export default class Client { configuration: Configuration; apiCall: ApiCall; diff --git a/lib/Typesense/Collection.d.ts b/lib/Typesense/Collection.d.ts index ad994c38..7d4e8869 100644 --- a/lib/Typesense/Collection.d.ts +++ b/lib/Typesense/Collection.d.ts @@ -1,12 +1,12 @@ -import ApiCall from "./ApiCall"; -import { CollectionCreateSchema } from "./Collections"; -import Documents, { DocumentSchema } from "./Documents"; -import Overrides from "./Overrides"; -import Override from "./Override"; -import Synonyms from "./Synonyms"; -import Synonym from "./Synonym"; -import { Document } from "./Document"; -export type FieldType = "string" | "int32" | "int64" | "float" | "bool" | "geopoint" | "geopoint[]" | "string[]" | "int32[]" | "int64[]" | "float[]" | "bool[]" | "object" | "object[]" | "auto" | "string*" | "image"; +import ApiCall from './ApiCall'; +import { CollectionCreateSchema } from './Collections'; +import Documents, { DocumentSchema } from './Documents'; +import Overrides from './Overrides'; +import Override from './Override'; +import Synonyms from './Synonyms'; +import Synonym from './Synonym'; +import { Document } from './Document'; +export type FieldType = 'string' | 'int32' | 'int64' | 'float' | 'bool' | 'geopoint' | 'geopoint[]' | 'string[]' | 'int32[]' | 'int64[]' | 'float[]' | 'bool[]' | 'object' | 'object[]' | 'auto' | 'string*' | 'image'; export interface CollectionFieldSchema { name: string; type: FieldType; @@ -30,7 +30,7 @@ export interface CollectionDropFieldSchema { name: string; drop: true; } -export interface CollectionUpdateSchema extends Partial> { +export interface CollectionUpdateSchema extends Partial> { fields?: (CollectionFieldSchema | CollectionDropFieldSchema)[]; } export default class Collection { diff --git a/lib/Typesense/Collections.d.ts b/lib/Typesense/Collections.d.ts index 88a91623..c574157a 100644 --- a/lib/Typesense/Collections.d.ts +++ b/lib/Typesense/Collections.d.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import { CollectionFieldSchema, CollectionSchema } from "./Collection"; +import ApiCall from './ApiCall'; +import { CollectionFieldSchema, CollectionSchema } from './Collection'; export interface CollectionCreateSchema { name: string; default_sorting_field?: string; diff --git a/lib/Typesense/Collections.js b/lib/Typesense/Collections.js index 7f958fef..5f32a976 100644 --- a/lib/Typesense/Collections.js +++ b/lib/Typesense/Collections.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); -var RESOURCEPATH = "/collections"; +var RESOURCEPATH = '/collections'; var Collections = /** @class */ (function () { function Collections(apiCall) { this.apiCall = apiCall; diff --git a/lib/Typesense/Configuration.d.ts b/lib/Typesense/Configuration.d.ts index 9aa9c01e..708dcb4d 100644 --- a/lib/Typesense/Configuration.d.ts +++ b/lib/Typesense/Configuration.d.ts @@ -1,8 +1,8 @@ /// /// -import { Logger, LogLevelDesc } from "loglevel"; -import type { Agent as HTTPAgent } from "http"; -import type { Agent as HTTPSAgent } from "https"; +import { Logger, LogLevelDesc } from 'loglevel'; +import type { Agent as HTTPAgent } from 'http'; +import type { Agent as HTTPSAgent } from 'https'; export interface NodeConfiguration { host: string; port: number; diff --git a/lib/Typesense/Configuration.js b/lib/Typesense/Configuration.js index 83915e1e..5ce759ea 100644 --- a/lib/Typesense/Configuration.js +++ b/lib/Typesense/Configuration.js @@ -34,7 +34,7 @@ var Configuration = /** @class */ (function () { options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default this.useServerSideSearchCache = options.useServerSideSearchCache || false; this.logger = options.logger || logger; - this.logLevel = options.logLevel || "warn"; + this.logLevel = options.logLevel || 'warn'; this.logger.setLevel(this.logLevel); this.additionalHeaders = options.additionalHeaders; this.httpAgent = options.httpAgent; @@ -45,14 +45,14 @@ var Configuration = /** @class */ (function () { } Configuration.prototype.validate = function () { if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) { - throw new Errors_1.MissingConfigurationError("Ensure that nodes[].protocol, nodes[].host and nodes[].port are set"); + throw new Errors_1.MissingConfigurationError('Ensure that nodes[].protocol, nodes[].host and nodes[].port are set'); } if (this.nearestNode != null && this.isNodeMissingAnyParameters(this.nearestNode)) { - throw new Errors_1.MissingConfigurationError("Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set"); + throw new Errors_1.MissingConfigurationError('Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set'); } if (this.apiKey == null) { - throw new Errors_1.MissingConfigurationError("Ensure that apiKey is set"); + throw new Errors_1.MissingConfigurationError('Ensure that apiKey is set'); } return true; }; @@ -63,26 +63,26 @@ var Configuration = /** @class */ (function () { }); }; Configuration.prototype.isNodeMissingAnyParameters = function (node) { - return (!["protocol", "host", "port", "path"].every(function (key) { + return (!['protocol', 'host', 'port', 'path'].every(function (key) { return node.hasOwnProperty(key); - }) && node["url"] == null); + }) && node['url'] == null); }; Configuration.prototype.setDefaultPathInNode = function (node) { - if (node != null && !node.hasOwnProperty("path")) { - node["path"] = ""; + if (node != null && !node.hasOwnProperty('path')) { + node['path'] = ''; } return node; }; Configuration.prototype.setDefaultPortInNode = function (node) { if (node != null && - !node.hasOwnProperty("port") && - node.hasOwnProperty("protocol")) { - switch (node["protocol"]) { - case "https": - node["port"] = 443; + !node.hasOwnProperty('port') && + node.hasOwnProperty('protocol')) { + switch (node['protocol']) { + case 'https': + node['port'] = 443; break; - case "http": - node["port"] = 80; + case 'http': + node['port'] = 80; break; } } @@ -90,13 +90,13 @@ var Configuration = /** @class */ (function () { }; Configuration.prototype.showDeprecationWarnings = function (options) { if (options.timeoutSeconds) { - this.logger.warn("Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds"); + this.logger.warn('Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds'); } if (options.masterNode) { - this.logger.warn("Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12"); + this.logger.warn('Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12'); } if (options.readReplicaNodes) { - this.logger.warn("Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12"); + this.logger.warn('Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12'); } }; Configuration.prototype.shuffleArray = function (array) { diff --git a/lib/Typesense/Conversation.d.ts b/lib/Typesense/Conversation.d.ts index 4e067cb9..53c39725 100644 --- a/lib/Typesense/Conversation.d.ts +++ b/lib/Typesense/Conversation.d.ts @@ -1,4 +1,4 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; export interface ConversationDeleteSchema { id: number; } diff --git a/lib/Typesense/ConversationModel.d.ts b/lib/Typesense/ConversationModel.d.ts index c9f26b74..43171670 100644 --- a/lib/Typesense/ConversationModel.d.ts +++ b/lib/Typesense/ConversationModel.d.ts @@ -1,4 +1,4 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; export interface ConversationModelCreateSchema { model_name: string; api_key: string; diff --git a/lib/Typesense/ConversationModels.d.ts b/lib/Typesense/ConversationModels.d.ts index 8a6ef4c4..676d73b2 100644 --- a/lib/Typesense/ConversationModels.d.ts +++ b/lib/Typesense/ConversationModels.d.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import { ConversationModelCreateSchema, ConversationModelSchema } from "./ConversationModel"; +import ApiCall from './ApiCall'; +import { ConversationModelCreateSchema, ConversationModelSchema } from './ConversationModel'; export default class ConversationModels { private readonly apiCall; constructor(apiCall: ApiCall); diff --git a/lib/Typesense/ConversationModels.js b/lib/Typesense/ConversationModels.js index cb3674bd..2b1b4138 100644 --- a/lib/Typesense/ConversationModels.js +++ b/lib/Typesense/ConversationModels.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); -var RESOURCEPATH = "/conversations/models"; +var RESOURCEPATH = '/conversations/models'; var ConversationModels = /** @class */ (function () { function ConversationModels(apiCall) { this.apiCall = apiCall; @@ -22,7 +22,7 @@ var ConversationModels = /** @class */ (function () { }); }; ConversationModels.prototype.endpointPath = function (operation) { - return "".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(ConversationModels.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); }; Object.defineProperty(ConversationModels, "RESOURCEPATH", { get: function () { diff --git a/lib/Typesense/ConversationModels.js.map b/lib/Typesense/ConversationModels.js.map index ccc85036..419d690c 100644 --- a/lib/Typesense/ConversationModels.js.map +++ b/lib/Typesense/ConversationModels.js.map @@ -1 +1 @@ -{"version":3,"file":"ConversationModels.js","sourceRoot":"","sources":["../../src/Typesense/ConversationModels.ts"],"names":[],"mappings":";;;AAMA,IAAM,YAAY,GAAG,uBAAuB,CAAC;AAE7C;IACE,4BAA6B,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;QAC3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEK,mCAAM,GAAZ,UACE,MAAqC;;;gBAErC,sBAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAI,CAAC,YAAY,EAAE,EACnB,MAAM,CACP,EAAC;;;KACH;IAEK,qCAAQ,GAAd;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CACrB,IAAI,CAAC,YAAY,EAAE,CACpB,EAAC;;;KACH;IAEO,yCAAY,GAApB,UAAqB,SAAkB;QACrC,OAAO,UAAG,kBAAkB,CAAC,YAAY,SACvC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,SAAS,CAC9C,CAAC;IACL,CAAC;IAED,sBAAW,kCAAY;aAAvB;YACE,OAAO,YAAY,CAAC;QACtB,CAAC;;;OAAA;IACH,yBAAC;AAAD,CAAC,AA7BD,IA6BC"} \ No newline at end of file +{"version":3,"file":"ConversationModels.js","sourceRoot":"","sources":["../../src/Typesense/ConversationModels.ts"],"names":[],"mappings":";;;AAMA,IAAM,YAAY,GAAG,uBAAuB,CAAC;AAE7C;IACE,4BAA6B,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;QAC3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEK,mCAAM,GAAZ,UACE,MAAqC;;;gBAErC,sBAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAI,CAAC,YAAY,EAAE,EACnB,MAAM,CACP,EAAC;;;KACH;IAEK,qCAAQ,GAAd;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAA4B,IAAI,CAAC,YAAY,EAAE,CAAC,EAAC;;;KACzE;IAEO,yCAAY,GAApB,UAAqB,SAAkB;QACrC,OAAO,UAAG,kBAAkB,CAAC,YAAY,SACvC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,SAAS,CAC9C,CAAC;IACL,CAAC;IAED,sBAAW,kCAAY;aAAvB;YACE,OAAO,YAAY,CAAC;QACtB,CAAC;;;OAAA;IACH,yBAAC;AAAD,CAAC,AA3BD,IA2BC"} \ No newline at end of file diff --git a/lib/Typesense/Conversations.d.ts b/lib/Typesense/Conversations.d.ts index 5a4b8dc9..7ebc8ce6 100644 --- a/lib/Typesense/Conversations.d.ts +++ b/lib/Typesense/Conversations.d.ts @@ -1,7 +1,7 @@ -import ApiCall from "./ApiCall"; -import ConversationModels from "./ConversationModels"; -import ConversationModel from "./ConversationModel"; -import { ConversationSchema } from "./Conversation"; +import ApiCall from './ApiCall'; +import ConversationModels from './ConversationModels'; +import ConversationModel from './ConversationModel'; +import { ConversationSchema } from './Conversation'; export interface ConversationsRetrieveSchema { conversations: ConversationSchema[]; } diff --git a/lib/Typesense/Conversations.js b/lib/Typesense/Conversations.js index 69e67c4d..268befcc 100644 --- a/lib/Typesense/Conversations.js +++ b/lib/Typesense/Conversations.js @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var ConversationModels_1 = tslib_1.__importDefault(require("./ConversationModels")); var ConversationModel_1 = tslib_1.__importDefault(require("./ConversationModel")); -var RESOURCEPATH = "/conversations"; +var RESOURCEPATH = '/conversations'; var Conversations = /** @class */ (function () { function Conversations(apiCall) { this.apiCall = apiCall; diff --git a/lib/Typesense/Debug.d.ts b/lib/Typesense/Debug.d.ts index ac0f44d4..87120b95 100644 --- a/lib/Typesense/Debug.d.ts +++ b/lib/Typesense/Debug.d.ts @@ -1,4 +1,4 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; export interface DebugResponseSchema { state: number; version: string; diff --git a/lib/Typesense/Debug.js b/lib/Typesense/Debug.js index fa525663..be657f1c 100644 --- a/lib/Typesense/Debug.js +++ b/lib/Typesense/Debug.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); -var RESOURCEPATH = "/debug"; +var RESOURCEPATH = '/debug'; var Debug = /** @class */ (function () { function Debug(apiCall) { this.apiCall = apiCall; diff --git a/lib/Typesense/Document.d.ts b/lib/Typesense/Document.d.ts index 56eb7153..41900089 100644 --- a/lib/Typesense/Document.d.ts +++ b/lib/Typesense/Document.d.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import { DocumentSchema, DocumentWriteParameters } from "./Documents"; +import ApiCall from './ApiCall'; +import { DocumentSchema, DocumentWriteParameters } from './Documents'; export declare class Document { private collectionName; private documentId; diff --git a/lib/Typesense/Documents.d.ts b/lib/Typesense/Documents.d.ts index fd13e56f..51160125 100644 --- a/lib/Typesense/Documents.d.ts +++ b/lib/Typesense/Documents.d.ts @@ -1,8 +1,8 @@ /// -import type { ReadStream } from "fs"; -import ApiCall from "./ApiCall"; -import Configuration from "./Configuration"; -import { SearchOnlyDocuments } from "./SearchOnlyDocuments"; +import type { ReadStream } from 'fs'; +import ApiCall from './ApiCall'; +import Configuration from './Configuration'; +import { SearchOnlyDocuments } from './SearchOnlyDocuments'; export interface DeleteQuery { filter_by: string; batch_size?: number; @@ -25,7 +25,7 @@ export type DocumentSchema = Record; export interface SearchParamsWithPreset extends Partial { preset: string; } -type OperationMode = "off" | "always" | "fallback"; +type OperationMode = 'off' | 'always' | 'fallback'; export interface SearchParams { q?: string; query_by?: string | string[]; @@ -75,10 +75,10 @@ export interface SearchParams { max_candidates?: number; infix?: OperationMode | OperationMode[]; preset?: string; - text_match_type?: "max_score" | "max_weight"; + text_match_type?: 'max_score' | 'max_weight'; vector_query?: string; - "x-typesense-api-key"?: string; - "x-typesense-user-id"?: string; + 'x-typesense-api-key'?: string; + 'x-typesense-user-id'?: string; offset?: number; limit?: number; stopwords?: string; @@ -170,8 +170,8 @@ export interface SearchResponse { }; } export interface DocumentWriteParameters { - dirty_values?: "coerce_or_reject" | "coerce_or_drop" | "drop" | "reject"; - action?: "create" | "update" | "upsert" | "emplace"; + dirty_values?: 'coerce_or_reject' | 'coerce_or_drop' | 'drop' | 'reject'; + action?: 'create' | 'update' | 'upsert' | 'emplace'; } export interface UpdateByFilterParameters { filter_by?: string; diff --git a/lib/Typesense/Documents.js b/lib/Typesense/Documents.js index 315ee64a..fec86432 100644 --- a/lib/Typesense/Documents.js +++ b/lib/Typesense/Documents.js @@ -13,7 +13,7 @@ var Documents = /** @class */ (function (_super) { return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { if (!document) - throw new Error("No document provided"); + throw new Error('No document provided'); return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, options)]; }); }); @@ -23,8 +23,8 @@ var Documents = /** @class */ (function (_super) { return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { if (!document) - throw new Error("No document provided"); - return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: "upsert" }))]; + throw new Error('No document provided'); + return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: 'upsert' }))]; }); }); }; @@ -33,12 +33,12 @@ var Documents = /** @class */ (function (_super) { return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { if (!document) - throw new Error("No document provided"); - if (options["filter_by"] != null) { + throw new Error('No document provided'); + if (options['filter_by'] != null) { return [2 /*return*/, this.apiCall.patch(this.endpointPath(), document, Object.assign({}, options))]; } else { - return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: "update" }))]; + return [2 /*return*/, this.apiCall.post(this.endpointPath(), document, Object.assign({}, options, { action: 'update' }))]; } return [2 /*return*/]; }); @@ -56,7 +56,7 @@ var Documents = /** @class */ (function (_super) { if (options === void 0) { options = {}; } return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { - this.configuration.logger.warn("createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents"); + this.configuration.logger.warn('createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents'); return [2 /*return*/, this.import(documents, options)]; }); }); @@ -72,12 +72,12 @@ var Documents = /** @class */ (function (_super) { try { documentsInJSONLFormat = documents .map(function (document) { return JSON.stringify(document); }) - .join("\n"); + .join('\n'); } catch (error) { // if rangeerror, throw custom error message if (error instanceof RangeError && - error.message.includes("Too many properties to enumerate")) { + error.message.includes('Too many properties to enumerate')) { throw new Error("".concat(error, "\n It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\n\n Please try reducing the number of keys in your document, or using CURL to import your data.\n ")); } // else, throw the non-range error anyways @@ -87,10 +87,10 @@ var Documents = /** @class */ (function (_super) { else { documentsInJSONLFormat = documents; } - return [4 /*yield*/, this.apiCall.performRequest("post", this.endpointPath("import"), { + return [4 /*yield*/, this.apiCall.performRequest('post', this.endpointPath('import'), { queryParameters: options, bodyParameters: documentsInJSONLFormat, - additionalHeaders: { "Content-Type": "text/plain" }, + additionalHeaders: { 'Content-Type': 'text/plain' }, skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully enableKeepAlive: true, // This is to prevent ECONNRESET socket hang up errors. Reference: https://github.com/axios/axios/issues/2936#issuecomment-779439991 })]; @@ -98,7 +98,7 @@ var Documents = /** @class */ (function (_super) { resultsInJSONLFormat = _a.sent(); if (Array.isArray(documents)) { resultsInJSONFormat = resultsInJSONLFormat - .split("\n") + .split('\n') .map(function (r) { return JSON.parse(r); }); failedItems = resultsInJSONFormat.filter(function (r) { return r.success === false; }); if (failedItems.length > 0) { @@ -123,7 +123,7 @@ var Documents = /** @class */ (function (_super) { if (options === void 0) { options = {}; } return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(this.endpointPath("export"), options)]; + return [2 /*return*/, this.apiCall.get(this.endpointPath('export'), options)]; }); }); }; @@ -134,8 +134,8 @@ var Documents = /** @class */ (function (_super) { if (options === void 0) { options = {}; } return tslib_1.__awaiter(this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { - return [2 /*return*/, this.apiCall.get(this.endpointPath("export"), options, { - responseType: "stream", + return [2 /*return*/, this.apiCall.get(this.endpointPath('export'), options, { + responseType: 'stream', })]; }); }); diff --git a/lib/Typesense/Errors/HTTPError.d.ts b/lib/Typesense/Errors/HTTPError.d.ts index 499e415a..5f616a84 100644 --- a/lib/Typesense/Errors/HTTPError.d.ts +++ b/lib/Typesense/Errors/HTTPError.d.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class HTTPError extends TypesenseError { } diff --git a/lib/Typesense/Errors/ImportError.d.ts b/lib/Typesense/Errors/ImportError.d.ts index d8a1145f..817859e0 100644 --- a/lib/Typesense/Errors/ImportError.d.ts +++ b/lib/Typesense/Errors/ImportError.d.ts @@ -1,5 +1,5 @@ -import TypesenseError from "./TypesenseError"; -import { ImportResponseFail } from "../Documents"; +import TypesenseError from './TypesenseError'; +import { ImportResponseFail } from '../Documents'; export default class ImportError extends TypesenseError { importResults: ImportResponseFail; constructor(message: any, importResults: any); diff --git a/lib/Typesense/Errors/MissingConfigurationError.d.ts b/lib/Typesense/Errors/MissingConfigurationError.d.ts index 7977c65b..b0c99f70 100644 --- a/lib/Typesense/Errors/MissingConfigurationError.d.ts +++ b/lib/Typesense/Errors/MissingConfigurationError.d.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class MissingConfigurationError extends TypesenseError { } diff --git a/lib/Typesense/Errors/ObjectAlreadyExists.d.ts b/lib/Typesense/Errors/ObjectAlreadyExists.d.ts index 92e7e21d..13680cbb 100644 --- a/lib/Typesense/Errors/ObjectAlreadyExists.d.ts +++ b/lib/Typesense/Errors/ObjectAlreadyExists.d.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class ObjectAlreadyExists extends TypesenseError { } diff --git a/lib/Typesense/Errors/ObjectNotFound.d.ts b/lib/Typesense/Errors/ObjectNotFound.d.ts index 9408bd6e..d09be31b 100644 --- a/lib/Typesense/Errors/ObjectNotFound.d.ts +++ b/lib/Typesense/Errors/ObjectNotFound.d.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class ObjectNotFound extends TypesenseError { } diff --git a/lib/Typesense/Errors/ObjectUnprocessable.d.ts b/lib/Typesense/Errors/ObjectUnprocessable.d.ts index f0517f89..118540e0 100644 --- a/lib/Typesense/Errors/ObjectUnprocessable.d.ts +++ b/lib/Typesense/Errors/ObjectUnprocessable.d.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class ObjectUnprocessable extends TypesenseError { } diff --git a/lib/Typesense/Errors/RequestMalformed.d.ts b/lib/Typesense/Errors/RequestMalformed.d.ts index 4d87ac81..83e3d86e 100644 --- a/lib/Typesense/Errors/RequestMalformed.d.ts +++ b/lib/Typesense/Errors/RequestMalformed.d.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class RequestMalformed extends TypesenseError { } diff --git a/lib/Typesense/Errors/RequestUnauthorized.d.ts b/lib/Typesense/Errors/RequestUnauthorized.d.ts index 281ad728..d2fb0d4c 100644 --- a/lib/Typesense/Errors/RequestUnauthorized.d.ts +++ b/lib/Typesense/Errors/RequestUnauthorized.d.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class RequestUnauthorized extends TypesenseError { } diff --git a/lib/Typesense/Errors/ServerError.d.ts b/lib/Typesense/Errors/ServerError.d.ts index f89362a1..17e39922 100644 --- a/lib/Typesense/Errors/ServerError.d.ts +++ b/lib/Typesense/Errors/ServerError.d.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class ServerError extends TypesenseError { } diff --git a/lib/Typesense/Errors/index.d.ts b/lib/Typesense/Errors/index.d.ts index e5046195..c1160f47 100644 --- a/lib/Typesense/Errors/index.d.ts +++ b/lib/Typesense/Errors/index.d.ts @@ -1,11 +1,11 @@ -import HTTPError from "./HTTPError"; -import MissingConfigurationError from "./MissingConfigurationError"; -import ObjectAlreadyExists from "./ObjectAlreadyExists"; -import ObjectNotFound from "./ObjectNotFound"; -import ObjectUnprocessable from "./ObjectUnprocessable"; -import RequestMalformed from "./RequestMalformed"; -import RequestUnauthorized from "./RequestUnauthorized"; -import ServerError from "./ServerError"; -import ImportError from "./ImportError"; -import TypesenseError from "./TypesenseError"; +import HTTPError from './HTTPError'; +import MissingConfigurationError from './MissingConfigurationError'; +import ObjectAlreadyExists from './ObjectAlreadyExists'; +import ObjectNotFound from './ObjectNotFound'; +import ObjectUnprocessable from './ObjectUnprocessable'; +import RequestMalformed from './RequestMalformed'; +import RequestUnauthorized from './RequestUnauthorized'; +import ServerError from './ServerError'; +import ImportError from './ImportError'; +import TypesenseError from './TypesenseError'; export { HTTPError, MissingConfigurationError, ObjectAlreadyExists, ObjectNotFound, ObjectUnprocessable, RequestMalformed, RequestUnauthorized, ServerError, TypesenseError, ImportError, }; diff --git a/lib/Typesense/Health.d.ts b/lib/Typesense/Health.d.ts index 8bf91aa8..ce7aad7a 100644 --- a/lib/Typesense/Health.d.ts +++ b/lib/Typesense/Health.d.ts @@ -1,4 +1,4 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; export interface HealthResponse { ok: boolean; } diff --git a/lib/Typesense/Health.js b/lib/Typesense/Health.js index 0c28608a..83e3b038 100644 --- a/lib/Typesense/Health.js +++ b/lib/Typesense/Health.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); -var RESOURCEPATH = "/health"; +var RESOURCEPATH = '/health'; var Health = /** @class */ (function () { function Health(apiCall) { this.apiCall = apiCall; diff --git a/lib/Typesense/Key.d.ts b/lib/Typesense/Key.d.ts index 94f24763..2b343bb9 100644 --- a/lib/Typesense/Key.d.ts +++ b/lib/Typesense/Key.d.ts @@ -1,4 +1,4 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; export interface KeyCreateSchema { actions: string[]; collections: string[]; diff --git a/lib/Typesense/Key.js.map b/lib/Typesense/Key.js.map index 7cda4660..d64e3abb 100644 --- a/lib/Typesense/Key.js.map +++ b/lib/Typesense/Key.js.map @@ -1 +1 @@ -{"version":3,"file":"Key.js","sourceRoot":"","sources":["../../src/Typesense/Key.ts"],"names":[],"mappings":";;;AACA,wDAA0B;AAmB1B;IACE,aAAoB,EAAU,EAAU,OAAgB;QAApC,OAAE,GAAF,EAAE,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAS;IAAG,CAAC;IAEtD,sBAAQ,GAAd;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAY,IAAI,CAAC,YAAY,EAAE,CAAC,EAAC;;;KACzD;IAEK,oBAAM,GAAZ;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAkB,IAAI,CAAC,YAAY,EAAE,CAAC,EAAC;;;KAClE;IAEO,0BAAY,GAApB;QACE,OAAO,UAAG,cAAI,CAAC,YAAY,cAAI,IAAI,CAAC,EAAE,CAAE,CAAC;IAC3C,CAAC;IACH,UAAC;AAAD,CAAC,AAdD,IAcC"} \ No newline at end of file +{"version":3,"file":"Key.js","sourceRoot":"","sources":["../../src/Typesense/Key.ts"],"names":[],"mappings":";;;AACA,wDAA0B;AAmB1B;IACE,aACU,EAAU,EACV,OAAgB;QADhB,OAAE,GAAF,EAAE,CAAQ;QACV,YAAO,GAAP,OAAO,CAAS;IACvB,CAAC;IAEE,sBAAQ,GAAd;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAY,IAAI,CAAC,YAAY,EAAE,CAAC,EAAC;;;KACzD;IAEK,oBAAM,GAAZ;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAkB,IAAI,CAAC,YAAY,EAAE,CAAC,EAAC;;;KAClE;IAEO,0BAAY,GAApB;QACE,OAAO,UAAG,cAAI,CAAC,YAAY,cAAI,IAAI,CAAC,EAAE,CAAE,CAAC;IAC3C,CAAC;IACH,UAAC;AAAD,CAAC,AAjBD,IAiBC"} \ No newline at end of file diff --git a/lib/Typesense/Keys.d.ts b/lib/Typesense/Keys.d.ts index ca8817d9..a4404718 100644 --- a/lib/Typesense/Keys.d.ts +++ b/lib/Typesense/Keys.d.ts @@ -1,6 +1,6 @@ -import ApiCall from "./ApiCall"; -import { KeyCreateSchema, KeySchema } from "./Key"; -import { SearchParams } from "./Documents"; +import ApiCall from './ApiCall'; +import { KeyCreateSchema, KeySchema } from './Key'; +import { SearchParams } from './Documents'; export interface KeysRetrieveSchema { keys: KeySchema[]; } diff --git a/lib/Typesense/Keys.js b/lib/Typesense/Keys.js index 77d45b7d..95a59b8d 100644 --- a/lib/Typesense/Keys.js +++ b/lib/Typesense/Keys.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var crypto_1 = require("crypto"); -var RESOURCEPATH = "/keys"; +var RESOURCEPATH = '/keys'; var Keys = /** @class */ (function () { function Keys(apiCall) { this.apiCall = apiCall; @@ -26,10 +26,10 @@ var Keys = /** @class */ (function () { // Note: only a key generated with the `documents:search` action will be // accepted by the server, when usined with the search endpoint. var paramsJSON = JSON.stringify(parameters); - var digest = Buffer.from((0, crypto_1.createHmac)("sha256", searchKey).update(paramsJSON).digest("base64")); + var digest = Buffer.from((0, crypto_1.createHmac)('sha256', searchKey).update(paramsJSON).digest('base64')); var keyPrefix = searchKey.substr(0, 4); var rawScopedKey = "".concat(digest).concat(keyPrefix).concat(paramsJSON); - return Buffer.from(rawScopedKey).toString("base64"); + return Buffer.from(rawScopedKey).toString('base64'); }; Object.defineProperty(Keys, "RESOURCEPATH", { get: function () { diff --git a/lib/Typesense/Metrics.d.ts b/lib/Typesense/Metrics.d.ts index e2aa4210..98b0e04f 100644 --- a/lib/Typesense/Metrics.d.ts +++ b/lib/Typesense/Metrics.d.ts @@ -1,4 +1,4 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; export interface MetricsResponse { [key: `system_cpu${number}_active_percentage`]: string; system_cpu_active_percentage: string; diff --git a/lib/Typesense/Metrics.js b/lib/Typesense/Metrics.js index 9c564425..2e4c5226 100644 --- a/lib/Typesense/Metrics.js +++ b/lib/Typesense/Metrics.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); -var RESOURCEPATH = "/metrics.json"; +var RESOURCEPATH = '/metrics.json'; var Metrics = /** @class */ (function () { function Metrics(apiCall) { this.apiCall = apiCall; diff --git a/lib/Typesense/MultiSearch.d.ts b/lib/Typesense/MultiSearch.d.ts index 335a5f33..336d68b2 100644 --- a/lib/Typesense/MultiSearch.d.ts +++ b/lib/Typesense/MultiSearch.d.ts @@ -1,13 +1,13 @@ -import ApiCall from "./ApiCall"; -import Configuration from "./Configuration"; -import { DocumentSchema, SearchParams, SearchParamsWithPreset, SearchResponse } from "./Documents"; +import ApiCall from './ApiCall'; +import Configuration from './Configuration'; +import { DocumentSchema, SearchParams, SearchParamsWithPreset, SearchResponse } from './Documents'; export interface MultiSearchRequestSchema extends SearchParams { collection?: string; - "x-typesense-api-key"?: string; + 'x-typesense-api-key'?: string; } export interface MultiSearchRequestWithPresetSchema extends SearchParamsWithPreset { collection?: string; - "x-typesense-api-key"?: string; + 'x-typesense-api-key'?: string; } export interface MultiSearchRequestsSchema { searches: (MultiSearchRequestSchema | MultiSearchRequestWithPresetSchema)[]; @@ -16,7 +16,7 @@ export interface MultiSearchResponse { results: { [Index in keyof T]: SearchResponse; } & { - length: T["length"]; + length: T['length']; }; } export default class MultiSearch { diff --git a/lib/Typesense/MultiSearch.js b/lib/Typesense/MultiSearch.js index e5aaa3b5..428d6a54 100644 --- a/lib/Typesense/MultiSearch.js +++ b/lib/Typesense/MultiSearch.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var RequestWithCache_1 = tslib_1.__importDefault(require("./RequestWithCache")); -var RESOURCEPATH = "/multi_search"; +var RESOURCEPATH = '/multi_search'; var MultiSearch = /** @class */ (function () { function MultiSearch(apiCall, configuration, useTextContentType) { if (useTextContentType === void 0) { useTextContentType = false; } @@ -23,11 +23,11 @@ var MultiSearch = /** @class */ (function () { return tslib_1.__generator(this, function (_d) { additionalHeaders = {}; if (this.useTextContentType) { - additionalHeaders["content-type"] = "text/plain"; + additionalHeaders['content-type'] = 'text/plain'; } additionalQueryParams = {}; if (this.configuration.useServerSideSearchCache === true) { - additionalQueryParams["use_cache"] = true; + additionalQueryParams['use_cache'] = true; } queryParams = Object.assign({}, commonParams, additionalQueryParams); return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { cacheResponseForSeconds: cacheSearchResultsForSeconds })]; diff --git a/lib/Typesense/Operations.d.ts b/lib/Typesense/Operations.d.ts index 5a1ea8fd..fe79de9e 100644 --- a/lib/Typesense/Operations.d.ts +++ b/lib/Typesense/Operations.d.ts @@ -1,6 +1,6 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; export default class Operations { private apiCall; constructor(apiCall: ApiCall); - perform(operationName: "vote" | "snapshot" | "cache/clear" | string, queryParameters?: Record): Promise; + perform(operationName: 'vote' | 'snapshot' | 'cache/clear' | string, queryParameters?: Record): Promise; } diff --git a/lib/Typesense/Operations.js b/lib/Typesense/Operations.js index d34c3237..d1582f18 100644 --- a/lib/Typesense/Operations.js +++ b/lib/Typesense/Operations.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); -var RESOURCEPATH = "/operations"; +var RESOURCEPATH = '/operations'; var Operations = /** @class */ (function () { function Operations(apiCall) { this.apiCall = apiCall; diff --git a/lib/Typesense/Override.d.ts b/lib/Typesense/Override.d.ts index ee1d99c7..b8a36f69 100644 --- a/lib/Typesense/Override.d.ts +++ b/lib/Typesense/Override.d.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import { OverrideCreateSchema } from "./Overrides"; +import ApiCall from './ApiCall'; +import { OverrideCreateSchema } from './Overrides'; export interface OverrideSchema extends OverrideCreateSchema { id: string; } diff --git a/lib/Typesense/Overrides.d.ts b/lib/Typesense/Overrides.d.ts index 1c36b336..eddbedb7 100644 --- a/lib/Typesense/Overrides.d.ts +++ b/lib/Typesense/Overrides.d.ts @@ -1,8 +1,8 @@ -import ApiCall from "./ApiCall"; -import { OverrideSchema } from "./Override"; +import ApiCall from './ApiCall'; +import { OverrideSchema } from './Override'; export interface OverrideRuleQuerySchema { query?: string; - match?: "exact" | "contains"; + match?: 'exact' | 'contains'; } export interface OverrideRuleFilterSchema { filter_by?: string; diff --git a/lib/Typesense/Overrides.js b/lib/Typesense/Overrides.js index 80af88d6..67d4fe9f 100644 --- a/lib/Typesense/Overrides.js +++ b/lib/Typesense/Overrides.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var Collections_1 = tslib_1.__importDefault(require("./Collections")); -var RESOURCEPATH = "/overrides"; +var RESOURCEPATH = '/overrides'; var Overrides = /** @class */ (function () { function Overrides(collectionName, apiCall) { this.collectionName = collectionName; @@ -23,7 +23,7 @@ var Overrides = /** @class */ (function () { }); }; Overrides.prototype.endpointPath = function (operation) { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); }; Object.defineProperty(Overrides, "RESOURCEPATH", { get: function () { diff --git a/lib/Typesense/Preset.d.ts b/lib/Typesense/Preset.d.ts index f9a9415f..78c05b7d 100644 --- a/lib/Typesense/Preset.d.ts +++ b/lib/Typesense/Preset.d.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import { PresetCreateSchema } from "./Presets"; +import ApiCall from './ApiCall'; +import { PresetCreateSchema } from './Presets'; export interface PresetSchema extends PresetCreateSchema { name: string; } diff --git a/lib/Typesense/Preset.js.map b/lib/Typesense/Preset.js.map index 12792a36..b1e40c68 100644 --- a/lib/Typesense/Preset.js.map +++ b/lib/Typesense/Preset.js.map @@ -1 +1 @@ -{"version":3,"file":"Preset.js","sourceRoot":"","sources":["../../src/Typesense/Preset.ts"],"names":[],"mappings":";;;AACA,8DAAwD;AAUxD;IACE,gBAAoB,QAAgB,EAAU,OAAgB;QAA1C,aAAQ,GAAR,QAAQ,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAS;IAAG,CAAC;IAE5D,yBAAQ,GAAd;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAe,IAAI,CAAC,YAAY,EAAE,CAAC,EAAC;;;KAC5D;IAEK,uBAAM,GAAZ;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAqB,IAAI,CAAC,YAAY,EAAE,CAAC,EAAC;;;KACrE;IAEO,6BAAY,GAApB;QACE,OAAO,UAAG,iBAAO,CAAC,YAAY,cAAI,IAAI,CAAC,QAAQ,CAAE,CAAC;IACpD,CAAC;IACH,aAAC;AAAD,CAAC,AAdD,IAcC"} \ No newline at end of file +{"version":3,"file":"Preset.js","sourceRoot":"","sources":["../../src/Typesense/Preset.ts"],"names":[],"mappings":";;;AACA,8DAAwD;AAUxD;IACE,gBACU,QAAgB,EAChB,OAAgB;QADhB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,YAAO,GAAP,OAAO,CAAS;IACvB,CAAC;IAEE,yBAAQ,GAAd;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAe,IAAI,CAAC,YAAY,EAAE,CAAC,EAAC;;;KAC5D;IAEK,uBAAM,GAAZ;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAqB,IAAI,CAAC,YAAY,EAAE,CAAC,EAAC;;;KACrE;IAEO,6BAAY,GAApB;QACE,OAAO,UAAG,iBAAO,CAAC,YAAY,cAAI,IAAI,CAAC,QAAQ,CAAE,CAAC;IACpD,CAAC;IACH,aAAC;AAAD,CAAC,AAjBD,IAiBC"} \ No newline at end of file diff --git a/lib/Typesense/Presets.d.ts b/lib/Typesense/Presets.d.ts index 83491421..ef7181d7 100644 --- a/lib/Typesense/Presets.d.ts +++ b/lib/Typesense/Presets.d.ts @@ -1,7 +1,7 @@ -import ApiCall from "./ApiCall"; -import { PresetSchema } from "./Preset"; -import { SearchParams } from "./Documents"; -import { MultiSearchRequestsSchema } from "./MultiSearch"; +import ApiCall from './ApiCall'; +import { PresetSchema } from './Preset'; +import { SearchParams } from './Documents'; +import { MultiSearchRequestsSchema } from './MultiSearch'; export interface PresetCreateSchema { value: SearchParams | MultiSearchRequestsSchema; } diff --git a/lib/Typesense/Presets.js b/lib/Typesense/Presets.js index 05306792..5415110a 100644 --- a/lib/Typesense/Presets.js +++ b/lib/Typesense/Presets.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); -var RESOURCEPATH = "/presets"; +var RESOURCEPATH = '/presets'; var Presets = /** @class */ (function () { function Presets(apiCall) { this.apiCall = apiCall; @@ -21,7 +21,7 @@ var Presets = /** @class */ (function () { }); }; Presets.prototype.endpointPath = function (operation) { - return "".concat(Presets.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(Presets.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); }; Object.defineProperty(Presets, "RESOURCEPATH", { get: function () { diff --git a/lib/Typesense/SearchClient.d.ts b/lib/Typesense/SearchClient.d.ts index cee519ea..7f319c87 100644 --- a/lib/Typesense/SearchClient.d.ts +++ b/lib/Typesense/SearchClient.d.ts @@ -1,7 +1,7 @@ -import { ConfigurationOptions } from "./Configuration"; -import MultiSearch from "./MultiSearch"; -import { DocumentSchema } from "./Documents"; -import { SearchOnlyCollection } from "./SearchOnlyCollection"; +import { ConfigurationOptions } from './Configuration'; +import MultiSearch from './MultiSearch'; +import { DocumentSchema } from './Documents'; +import { SearchOnlyCollection } from './SearchOnlyCollection'; export default class SearchClient { readonly multiSearch: MultiSearch; private readonly configuration; diff --git a/lib/Typesense/SearchClient.js b/lib/Typesense/SearchClient.js index d8de0e03..035cc669 100644 --- a/lib/Typesense/SearchClient.js +++ b/lib/Typesense/SearchClient.js @@ -10,8 +10,8 @@ var SearchClient = /** @class */ (function () { var _a; options.sendApiKeyAsQueryParam = (_a = options.sendApiKeyAsQueryParam) !== null && _a !== void 0 ? _a : true; if (options.sendApiKeyAsQueryParam === true && - (options.apiKey || "").length > 2000) { - console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."); + (options.apiKey || '').length > 2000) { + console.warn('[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.'); options.sendApiKeyAsQueryParam = false; } this.configuration = new Configuration_1.default(options); @@ -29,8 +29,8 @@ var SearchClient = /** @class */ (function () { }; SearchClient.prototype.collections = function (collectionName) { if (!collectionName) { - throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to " + - "be searched must be specified. Use Typesense.Client if you need to access the collection object."); + throw new Error('Typesense.SearchClient only supports search operations, so the collectionName that needs to ' + + 'be searched must be specified. Use Typesense.Client if you need to access the collection object.'); } else { if (this.individualCollections[collectionName] === undefined) { diff --git a/lib/Typesense/SearchOnlyCollection.d.ts b/lib/Typesense/SearchOnlyCollection.d.ts index c74fb562..c443280f 100644 --- a/lib/Typesense/SearchOnlyCollection.d.ts +++ b/lib/Typesense/SearchOnlyCollection.d.ts @@ -1,5 +1,5 @@ -import { DocumentSchema, SearchableDocuments } from "./Documents"; -import ApiCall from "./ApiCall"; +import { DocumentSchema, SearchableDocuments } from './Documents'; +import ApiCall from './ApiCall'; export declare class SearchOnlyCollection { private readonly name; private readonly apiCall; diff --git a/lib/Typesense/SearchOnlyDocuments.d.ts b/lib/Typesense/SearchOnlyDocuments.d.ts index 93453b0a..f51fba8d 100644 --- a/lib/Typesense/SearchOnlyDocuments.d.ts +++ b/lib/Typesense/SearchOnlyDocuments.d.ts @@ -1,7 +1,7 @@ -import RequestWithCache from "./RequestWithCache"; -import ApiCall from "./ApiCall"; -import Configuration from "./Configuration"; -import type { DocumentSchema, SearchableDocuments, SearchOptions, SearchParams, SearchParamsWithPreset, SearchResponse } from "./Documents"; +import RequestWithCache from './RequestWithCache'; +import ApiCall from './ApiCall'; +import Configuration from './Configuration'; +import type { DocumentSchema, SearchableDocuments, SearchOptions, SearchParams, SearchParamsWithPreset, SearchResponse } from './Documents'; export declare class SearchOnlyDocuments implements SearchableDocuments { protected collectionName: string; protected apiCall: ApiCall; diff --git a/lib/Typesense/SearchOnlyDocuments.js b/lib/Typesense/SearchOnlyDocuments.js index a7ab67ae..830b266f 100644 --- a/lib/Typesense/SearchOnlyDocuments.js +++ b/lib/Typesense/SearchOnlyDocuments.js @@ -4,7 +4,7 @@ exports.SearchOnlyDocuments = void 0; var tslib_1 = require("tslib"); var RequestWithCache_1 = tslib_1.__importDefault(require("./RequestWithCache")); var Collections_1 = tslib_1.__importDefault(require("./Collections")); -var RESOURCEPATH = "/documents"; +var RESOURCEPATH = '/documents'; var SearchOnlyDocuments = /** @class */ (function () { function SearchOnlyDocuments(collectionName, apiCall, configuration) { this.collectionName = collectionName; @@ -23,22 +23,22 @@ var SearchOnlyDocuments = /** @class */ (function () { return tslib_1.__generator(this, function (_e) { additionalQueryParams = {}; if (this.configuration.useServerSideSearchCache === true) { - additionalQueryParams["use_cache"] = true; + additionalQueryParams['use_cache'] = true; } for (key in searchParameters) { if (Array.isArray(searchParameters[key])) { - additionalQueryParams[key] = searchParameters[key].join(","); + additionalQueryParams[key] = searchParameters[key].join(','); } } queryParams = Object.assign({}, searchParameters, additionalQueryParams); - return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath("search"), queryParams, { abortSignal: abortSignal }], { + return [2 /*return*/, this.requestWithCache.perform(this.apiCall, this.apiCall.get, [this.endpointPath('search'), queryParams, { abortSignal: abortSignal }], { cacheResponseForSeconds: cacheSearchResultsForSeconds, })]; }); }); }; SearchOnlyDocuments.prototype.endpointPath = function (operation) { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); }; Object.defineProperty(SearchOnlyDocuments, "RESOURCEPATH", { get: function () { diff --git a/lib/Typesense/Stats.d.ts b/lib/Typesense/Stats.d.ts index a3a0ad2f..18054512 100644 --- a/lib/Typesense/Stats.d.ts +++ b/lib/Typesense/Stats.d.ts @@ -1,4 +1,4 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; export interface EndpointStats { [endpoint: string]: number; } diff --git a/lib/Typesense/Stats.js b/lib/Typesense/Stats.js index f00c45d8..f6cfd07b 100644 --- a/lib/Typesense/Stats.js +++ b/lib/Typesense/Stats.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); -var RESOURCEPATH = "/stats.json"; +var RESOURCEPATH = '/stats.json'; var Metrics = /** @class */ (function () { function Metrics(apiCall) { this.apiCall = apiCall; diff --git a/lib/Typesense/Stopword.d.ts b/lib/Typesense/Stopword.d.ts index 3a74c588..3e89d7c7 100644 --- a/lib/Typesense/Stopword.d.ts +++ b/lib/Typesense/Stopword.d.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import { StopwordCreateSchema } from "./Stopwords"; +import ApiCall from './ApiCall'; +import { StopwordCreateSchema } from './Stopwords'; export interface StopwordSchema extends StopwordCreateSchema { id: string; stopwords: string[]; diff --git a/lib/Typesense/Stopwords.d.ts b/lib/Typesense/Stopwords.d.ts index 3d119c1f..7e349923 100644 --- a/lib/Typesense/Stopwords.d.ts +++ b/lib/Typesense/Stopwords.d.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import { StopwordSchema } from "./Stopword"; +import ApiCall from './ApiCall'; +import { StopwordSchema } from './Stopword'; export interface StopwordCreateSchema { stopwords: string[]; locale?: string; diff --git a/lib/Typesense/Stopwords.js b/lib/Typesense/Stopwords.js index e905a926..f9759521 100644 --- a/lib/Typesense/Stopwords.js +++ b/lib/Typesense/Stopwords.js @@ -1,7 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); -var RESOURCEPATH = "/stopwords"; +var RESOURCEPATH = '/stopwords'; var Stopwords = /** @class */ (function () { function Stopwords(apiCall) { this.apiCall = apiCall; @@ -21,7 +21,7 @@ var Stopwords = /** @class */ (function () { }); }; Stopwords.prototype.endpointPath = function (operation) { - return "".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(Stopwords.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); }; Object.defineProperty(Stopwords, "RESOURCEPATH", { get: function () { diff --git a/lib/Typesense/Synonym.d.ts b/lib/Typesense/Synonym.d.ts index e178a28b..e0c22712 100644 --- a/lib/Typesense/Synonym.d.ts +++ b/lib/Typesense/Synonym.d.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import { SynonymCreateSchema } from "./Synonyms"; +import ApiCall from './ApiCall'; +import { SynonymCreateSchema } from './Synonyms'; export interface SynonymSchema extends SynonymCreateSchema { id: string; } diff --git a/lib/Typesense/Synonyms.d.ts b/lib/Typesense/Synonyms.d.ts index 82bfb1d6..2f32614d 100644 --- a/lib/Typesense/Synonyms.d.ts +++ b/lib/Typesense/Synonyms.d.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import { SynonymSchema } from "./Synonym"; +import ApiCall from './ApiCall'; +import { SynonymSchema } from './Synonym'; export interface SynonymCreateSchema { synonyms: string[]; root?: string; diff --git a/lib/Typesense/Synonyms.js b/lib/Typesense/Synonyms.js index 51f7aaad..563ba70d 100644 --- a/lib/Typesense/Synonyms.js +++ b/lib/Typesense/Synonyms.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var Collections_1 = tslib_1.__importDefault(require("./Collections")); -var RESOURCEPATH = "/synonyms"; +var RESOURCEPATH = '/synonyms'; var Synonyms = /** @class */ (function () { function Synonyms(collectionName, apiCall) { this.collectionName = collectionName; @@ -23,7 +23,7 @@ var Synonyms = /** @class */ (function () { }); }; Synonyms.prototype.endpointPath = function (operation) { - return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? "" : "/" + operation); + return "".concat(Collections_1.default.RESOURCEPATH, "/").concat(this.collectionName).concat(Synonyms.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); }; Object.defineProperty(Synonyms, "RESOURCEPATH", { get: function () { diff --git a/lib/Typesense/Synonyms.js.map b/lib/Typesense/Synonyms.js.map index 29790250..603e57ae 100644 --- a/lib/Typesense/Synonyms.js.map +++ b/lib/Typesense/Synonyms.js.map @@ -1 +1 @@ -{"version":3,"file":"Synonyms.js","sourceRoot":"","sources":["../../src/Typesense/Synonyms.ts"],"names":[],"mappings":";;;AACA,sEAAwC;AAGxC,IAAM,YAAY,GAAG,WAAW,CAAC;AAajC;IACE,kBAAoB,cAAsB,EAAU,OAAgB;QAAhD,mBAAc,GAAd,cAAc,CAAQ;QAAU,YAAO,GAAP,OAAO,CAAS;IAAG,CAAC;IAElE,yBAAM,GAAZ,UACE,SAAiB,EACjB,MAA2B;;;gBAE3B,sBAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CACrB,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,EAC5B,MAAM,CACP,EAAC;;;KACH;IAEK,2BAAQ,GAAd;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAyB,IAAI,CAAC,YAAY,EAAE,CAAC,EAAC;;;KACtE;IAEO,+BAAY,GAApB,UAAqB,SAAkB;QACrC,OAAO,UAAG,qBAAW,CAAC,YAAY,cAAI,IAAI,CAAC,cAAc,SACvD,QAAQ,CAAC,YAAY,SACpB,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,SAAS,CAAE,CAAC;IACtD,CAAC;IAED,sBAAW,wBAAY;aAAvB;YACE,OAAO,YAAY,CAAC;QACtB,CAAC;;;OAAA;IACH,eAAC;AAAD,CAAC,AA1BD,IA0BC"} \ No newline at end of file +{"version":3,"file":"Synonyms.js","sourceRoot":"","sources":["../../src/Typesense/Synonyms.ts"],"names":[],"mappings":";;;AACA,sEAAwC;AAGxC,IAAM,YAAY,GAAG,WAAW,CAAC;AAajC;IACE,kBACU,cAAsB,EACtB,OAAgB;QADhB,mBAAc,GAAd,cAAc,CAAQ;QACtB,YAAO,GAAP,OAAO,CAAS;IACvB,CAAC;IAEE,yBAAM,GAAZ,UACE,SAAiB,EACjB,MAA2B;;;gBAE3B,sBAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CACrB,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,EAC5B,MAAM,CACP,EAAC;;;KACH;IAEK,2BAAQ,GAAd;;;gBACE,sBAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAyB,IAAI,CAAC,YAAY,EAAE,CAAC,EAAC;;;KACtE;IAEO,+BAAY,GAApB,UAAqB,SAAkB;QACrC,OAAO,UAAG,qBAAW,CAAC,YAAY,cAAI,IAAI,CAAC,cAAc,SACvD,QAAQ,CAAC,YAAY,SACpB,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,SAAS,CAAE,CAAC;IACtD,CAAC;IAED,sBAAW,wBAAY;aAAvB;YACE,OAAO,YAAY,CAAC;QACtB,CAAC;;;OAAA;IACH,eAAC;AAAD,CAAC,AA7BD,IA6BC"} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 323d2c35..eb9f22b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,10 +44,13 @@ "eslint-plugin-prettier": "^5.0.1", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-standard": "^5.0.0", + "husky": "^9.0.11", + "is-ci": "^3.0.1", "mocha": "^10.2.0", "mocha-junit-reporter": "^2.2.1", "nyc": "^15.1.0", "prettier": "^3.0.3", + "pretty-quick": "^4.0.0", "timekeeper": "^2.3.1", "ts-loader": "^9.5.0", "ts-mocha": "^10.0.0", @@ -3984,6 +3987,21 @@ "node": ">=6.0" } }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, "node_modules/cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", @@ -5698,6 +5716,29 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, "node_modules/ext": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", @@ -6050,6 +6091,18 @@ "node": ">=8.0.0" } }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", @@ -6409,6 +6462,30 @@ "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", "dev": true }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/husky": { + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", + "dev": true, + "bin": { + "husky": "bin.mjs" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -6701,6 +6778,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-ci": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", + "dev": true, + "dependencies": { + "ci-info": "^3.2.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, "node_modules/is-core-module": { "version": "2.13.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", @@ -7693,6 +7782,15 @@ "node": ">= 0.6" } }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -8022,6 +8120,15 @@ "node": ">= 0.8.0" } }, + "node_modules/mri": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", + "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -8165,6 +8272,18 @@ "node": ">=0.10.0" } }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/nyc": { "version": "15.1.0", "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", @@ -8513,6 +8632,21 @@ "wrappy": "1" } }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/optionator": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", @@ -8875,6 +9009,115 @@ "node": ">= 0.8" } }, + "node_modules/pretty-quick": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-4.0.0.tgz", + "integrity": "sha512-M+2MmeufXb/M7Xw3Afh1gxcYpj+sK0AxEfnfF958ktFeAyi5MsKY5brymVURQLgPLV1QaF5P4pb2oFJ54H3yzQ==", + "dev": true, + "dependencies": { + "execa": "^5.1.1", + "find-up": "^5.0.0", + "ignore": "^5.3.0", + "mri": "^1.2.0", + "picocolors": "^1.0.0", + "picomatch": "^3.0.1", + "tslib": "^2.6.2" + }, + "bin": { + "pretty-quick": "lib/cli.mjs" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "prettier": "^3.0.0" + } + }, + "node_modules/pretty-quick/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pretty-quick/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pretty-quick/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pretty-quick/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pretty-quick/node_modules/picomatch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-3.0.1.tgz", + "integrity": "sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pretty-quick/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -9830,6 +10073,15 @@ "node": ">=8" } }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", diff --git a/package.json b/package.json index fa07d4a0..2d6b0aa2 100644 --- a/package.json +++ b/package.json @@ -72,10 +72,13 @@ "eslint-plugin-prettier": "^5.0.1", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-standard": "^5.0.0", + "husky": "^9.0.11", + "is-ci": "^3.0.1", "mocha": "^10.2.0", "mocha-junit-reporter": "^2.2.1", "nyc": "^15.1.0", "prettier": "^3.0.3", + "pretty-quick": "^4.0.0", "timekeeper": "^2.3.1", "ts-loader": "^9.5.0", "ts-mocha": "^10.0.0", @@ -87,6 +90,8 @@ "webpack-cli": "^5.1.4" }, "scripts": { + "prepare": "is-ci || husky install", + "pretty-quick": "pretty-quick", "format": "prettier --write \"(src|test|doc)/**/*.(ts|json|js)\"", "pretest": "eslint .", "test": "nyc --reporter=html --reporter=text ts-mocha --require @babel/register --recursive", diff --git a/src/Typesense.ts b/src/Typesense.ts index 2d485da6..9dd2343f 100644 --- a/src/Typesense.ts +++ b/src/Typesense.ts @@ -1,6 +1,6 @@ -import Client from "./Typesense/Client"; -import SearchClient from "./Typesense/SearchClient"; -import * as Errors from "./Typesense/Errors"; +import Client from './Typesense/Client'; +import SearchClient from './Typesense/SearchClient'; +import * as Errors from './Typesense/Errors'; export { Client, SearchClient, Errors }; export default { Client, SearchClient, Errors }; diff --git a/src/Typesense/Alias.ts b/src/Typesense/Alias.ts index 976423cd..b924d8b8 100644 --- a/src/Typesense/Alias.ts +++ b/src/Typesense/Alias.ts @@ -1,8 +1,11 @@ -import Aliases, { CollectionAliasSchema } from "./Aliases"; -import ApiCall from "./ApiCall"; +import Aliases, { CollectionAliasSchema } from './Aliases'; +import ApiCall from './ApiCall'; export default class Alias { - constructor(private name: string, private apiCall: ApiCall) {} + constructor( + private name: string, + private apiCall: ApiCall, + ) {} async retrieve(): Promise { return this.apiCall.get(this.endpointPath()); diff --git a/src/Typesense/Aliases.ts b/src/Typesense/Aliases.ts index 0b3942e0..9ecd56ae 100644 --- a/src/Typesense/Aliases.ts +++ b/src/Typesense/Aliases.ts @@ -1,6 +1,6 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; -const RESOURCEPATH = "/aliases"; +const RESOURCEPATH = '/aliases'; export interface CollectionAliasCreateSchema { collection_name: string; @@ -19,11 +19,11 @@ export default class Aliases { async upsert( name: string, - mapping: CollectionAliasCreateSchema + mapping: CollectionAliasCreateSchema, ): Promise { return this.apiCall.put( this.endpointPath(name), - mapping + mapping, ); } diff --git a/src/Typesense/Analytics.ts b/src/Typesense/Analytics.ts index def5a936..16bddf97 100644 --- a/src/Typesense/Analytics.ts +++ b/src/Typesense/Analytics.ts @@ -1,9 +1,9 @@ -import ApiCall from "./ApiCall"; -import AnalyticsRules from "./AnalyticsRules"; -import AnalyticsRule from "./AnalyticsRule"; -import AnalyticsEvents from "./AnalyticsEvents"; +import ApiCall from './ApiCall'; +import AnalyticsRules from './AnalyticsRules'; +import AnalyticsRule from './AnalyticsRule'; +import AnalyticsEvents from './AnalyticsEvents'; -const RESOURCEPATH = "/analytics"; +const RESOURCEPATH = '/analytics'; export default class Analytics { private readonly _analyticsRules: AnalyticsRules; diff --git a/src/Typesense/AnalyticsEvents.ts b/src/Typesense/AnalyticsEvents.ts index 6c7df20b..3b50b3f1 100644 --- a/src/Typesense/AnalyticsEvents.ts +++ b/src/Typesense/AnalyticsEvents.ts @@ -1,7 +1,7 @@ -import ApiCall from "./ApiCall"; -import { AnalyticsEventCreateSchema } from "./AnalyticsEvent"; +import ApiCall from './ApiCall'; +import { AnalyticsEventCreateSchema } from './AnalyticsEvent'; -const RESOURCEPATH = "/analytics/events"; +const RESOURCEPATH = '/analytics/events'; export default class AnalyticsEvents { constructor(private readonly apiCall: ApiCall) { @@ -19,7 +19,7 @@ export default class AnalyticsEvents { private endpointPath(operation?: string): string { return `${AnalyticsEvents.RESOURCEPATH}${ - operation === undefined ? "" : "/" + operation + operation === undefined ? '' : '/' + operation }`; } diff --git a/src/Typesense/AnalyticsRule.ts b/src/Typesense/AnalyticsRule.ts index 9931fe08..d2419d21 100644 --- a/src/Typesense/AnalyticsRule.ts +++ b/src/Typesense/AnalyticsRule.ts @@ -1,8 +1,8 @@ -import ApiCall from "./ApiCall"; -import AnalyticsRules from "./AnalyticsRules"; +import ApiCall from './ApiCall'; +import AnalyticsRules from './AnalyticsRules'; export interface AnalyticsRuleCreateSchema { - type: "popular_queries" | "nohits_queries" | "counter"; + type: 'popular_queries' | 'nohits_queries' | 'counter'; params: { source: { collections: string[]; diff --git a/src/Typesense/AnalyticsRules.ts b/src/Typesense/AnalyticsRules.ts index 42c91722..d0c315a2 100644 --- a/src/Typesense/AnalyticsRules.ts +++ b/src/Typesense/AnalyticsRules.ts @@ -1,14 +1,14 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; import { AnalyticsRuleCreateSchema, AnalyticsRuleSchema, -} from "./AnalyticsRule"; +} from './AnalyticsRule'; export interface AnalyticsRulesRetrieveSchema { rules: AnalyticsRuleSchema[]; } -const RESOURCEPATH = "/analytics/rules"; +const RESOURCEPATH = '/analytics/rules'; export default class AnalyticsRules { constructor(private readonly apiCall: ApiCall) { @@ -17,11 +17,11 @@ export default class AnalyticsRules { async upsert( name: string, - params: AnalyticsRuleCreateSchema + params: AnalyticsRuleCreateSchema, ): Promise { return this.apiCall.put( this.endpointPath(name), - params + params, ); } @@ -31,7 +31,7 @@ export default class AnalyticsRules { private endpointPath(operation?: string): string { return `${AnalyticsRules.RESOURCEPATH}${ - operation === undefined ? "" : "/" + operation + operation === undefined ? '' : '/' + operation }`; } diff --git a/src/Typesense/ApiCall.ts b/src/Typesense/ApiCall.ts index ad7026b4..48ed8bc7 100644 --- a/src/Typesense/ApiCall.ts +++ b/src/Typesense/ApiCall.ts @@ -1,5 +1,5 @@ -import axios, { AxiosRequestConfig, AxiosResponse, Method } from "axios"; -import { Logger } from "loglevel"; +import axios, { AxiosRequestConfig, AxiosResponse, Method } from 'axios'; +import { Logger } from 'loglevel'; import { HTTPError, ObjectAlreadyExists, @@ -8,13 +8,13 @@ import { RequestMalformed, RequestUnauthorized, ServerError, -} from "./Errors"; -import TypesenseError from "./Errors/TypesenseError"; -import Configuration, { NodeConfiguration } from "./Configuration"; -import { Agent as HTTPAgent } from "http"; -import { Agent as HTTPSAgent } from "https"; +} from './Errors'; +import TypesenseError from './Errors/TypesenseError'; +import Configuration, { NodeConfiguration } from './Configuration'; +import { Agent as HTTPAgent } from 'http'; +import { Agent as HTTPSAgent } from 'https'; -const APIKEYHEADERNAME = "X-TYPESENSE-API-KEY"; +const APIKEYHEADERNAME = 'X-TYPESENSE-API-KEY'; const HEALTHY = true; const UNHEALTHY = false; @@ -69,10 +69,10 @@ export default class ApiCall { responseType = undefined, }: { abortSignal?: any; - responseType?: AxiosRequestConfig["responseType"] | undefined; + responseType?: AxiosRequestConfig['responseType'] | undefined; } = {}, ): Promise { - return this.performRequest("get", endpoint, { + return this.performRequest('get', endpoint, { queryParameters, abortSignal, responseType, @@ -80,7 +80,7 @@ export default class ApiCall { } async delete(endpoint: string, queryParameters: any = {}): Promise { - return this.performRequest("delete", endpoint, { queryParameters }); + return this.performRequest('delete', endpoint, { queryParameters }); } async post( @@ -89,7 +89,7 @@ export default class ApiCall { queryParameters: any = {}, additionalHeaders: any = {}, ): Promise { - return this.performRequest("post", endpoint, { + return this.performRequest('post', endpoint, { queryParameters, bodyParameters, additionalHeaders, @@ -101,7 +101,7 @@ export default class ApiCall { bodyParameters: any = {}, queryParameters: any = {}, ): Promise { - return this.performRequest("put", endpoint, { + return this.performRequest('put', endpoint, { queryParameters, bodyParameters, }); @@ -112,7 +112,7 @@ export default class ApiCall { bodyParameters: any = {}, queryParameters: any = {}, ): Promise { - return this.performRequest("patch", endpoint, { + return this.performRequest('patch', endpoint, { queryParameters, bodyParameters, }); @@ -134,7 +134,7 @@ export default class ApiCall { bodyParameters?: any; additionalHeaders?: any; abortSignal?: any; - responseType?: AxiosRequestConfig["responseType"] | undefined; + responseType?: AxiosRequestConfig['responseType'] | undefined; skipConnectionTimeout?: boolean; enableKeepAlive?: boolean | undefined; }, @@ -159,7 +159,7 @@ export default class ApiCall { ); if (abortSignal && abortSignal.aborted) { - return Promise.reject(new Error("Request aborted by caller.")); + return Promise.reject(new Error('Request aborted by caller.')); } let abortListener; @@ -189,9 +189,9 @@ export default class ApiCall { let transformedData = data; if ( headers !== undefined && - typeof data === "string" && - headers["content-type"] && - headers["content-type"].startsWith("application/json") + typeof data === 'string' && + headers['content-type'] && + headers['content-type'].startsWith('application/json') ) { transformedData = JSON.parse(data); } @@ -210,7 +210,7 @@ export default class ApiCall { if (this.sendApiKeyAsQueryParam) { requestOptions.params = requestOptions.params || {}; - requestOptions.params["x-typesense-api-key"] = this.apiKey; + requestOptions.params['x-typesense-api-key'] = this.apiKey; } if (this.configuration.httpAgent) { @@ -242,9 +242,9 @@ export default class ApiCall { if ( bodyParameters && - ((typeof bodyParameters === "string" && + ((typeof bodyParameters === 'string' && bodyParameters.length !== 0) || - (typeof bodyParameters === "object" && + (typeof bodyParameters === 'object' && Object.keys(bodyParameters).length !== 0)) ) { requestOptions.data = bodyParameters; @@ -255,7 +255,7 @@ export default class ApiCall { const cancelToken = axios.CancelToken; const source = cancelToken.source(); abortListener = () => source.cancel(); - abortSignal.addEventListener("abort", abortListener); + abortSignal.addEventListener('abort', abortListener); requestOptions.cancelToken = source.token; } @@ -291,8 +291,8 @@ export default class ApiCall { node.index } failed due to "${error.code} ${error.message}${ error.response == null - ? "" - : " - " + JSON.stringify(error.response?.data) + ? '' + : ' - ' + JSON.stringify(error.response?.data) }"`, ); // this.logger.debug(error.stack) @@ -302,7 +302,7 @@ export default class ApiCall { await this.timer(this.retryIntervalSeconds); } finally { if (abortSignal && abortListener) { - abortSignal.removeEventListener("abort", abortListener); + abortSignal.removeEventListener('abort', abortListener); } } } @@ -321,7 +321,7 @@ export default class ApiCall { this.logger.debug( `Request #${requestNumber}: Nodes Health: Node ${ this.nearestNode.index - } is ${this.nearestNode.isHealthy === true ? "Healthy" : "Unhealthy"}`, + } is ${this.nearestNode.isHealthy === true ? 'Healthy' : 'Unhealthy'}`, ); if ( this.nearestNode.isHealthy === true || @@ -343,10 +343,10 @@ export default class ApiCall { .map( (node) => `Node ${node.index} is ${ - node.isHealthy === true ? "Healthy" : "Unhealthy" + node.isHealthy === true ? 'Healthy' : 'Unhealthy' }`, ) - .join(" || ")}`, + .join(' || ')}`, ); let candidateNode: Node = this.nodes[0]; for (let i = 0; i <= this.nodes.length; i++) { @@ -385,7 +385,7 @@ export default class ApiCall { initializeMetadataForNodes(): void { if (this.nearestNode != null) { - this.nearestNode.index = "nearestNode"; + this.nearestNode.index = 'nearestNode'; this.setNodeHealthcheck(this.nearestNode, HEALTHY); } @@ -412,7 +412,7 @@ export default class ApiCall { if (!this.sendApiKeyAsQueryParam) { defaultHeaders[APIKEYHEADERNAME] = this.apiKey; } - defaultHeaders["Content-Type"] = "application/json"; + defaultHeaders['Content-Type'] = 'application/json'; return defaultHeaders; } @@ -426,8 +426,8 @@ export default class ApiCall { ): TypesenseError { let errorMessage = `Request failed with HTTP code ${response.status}`; if ( - typeof messageFromServer === "string" && - messageFromServer.trim() !== "" + typeof messageFromServer === 'string' && + messageFromServer.trim() !== '' ) { errorMessage += ` | Server said: ${messageFromServer}`; } diff --git a/src/Typesense/Client.ts b/src/Typesense/Client.ts index 3d16d8f1..4f50f825 100644 --- a/src/Typesense/Client.ts +++ b/src/Typesense/Client.ts @@ -1,26 +1,26 @@ /* eslint-disable no-dupe-class-members */ -import Configuration, { ConfigurationOptions } from "./Configuration"; -import ApiCall from "./ApiCall"; -import Collections from "./Collections"; -import Collection from "./Collection"; -import Aliases from "./Aliases"; -import Alias from "./Alias"; -import Keys from "./Keys"; -import Key from "./Key"; -import Debug from "./Debug"; -import Metrics from "./Metrics"; -import Stats from "./Stats"; -import Health from "./Health"; -import Operations from "./Operations"; -import MultiSearch from "./MultiSearch"; -import Presets from "./Presets"; -import Preset from "./Preset"; -import Analytics from "./Analytics"; -import Stopwords from "./Stopwords"; -import Stopword from "./Stopword"; -import Conversations from "./Conversations"; -import Conversation from "./Conversation"; +import Configuration, { ConfigurationOptions } from './Configuration'; +import ApiCall from './ApiCall'; +import Collections from './Collections'; +import Collection from './Collection'; +import Aliases from './Aliases'; +import Alias from './Alias'; +import Keys from './Keys'; +import Key from './Key'; +import Debug from './Debug'; +import Metrics from './Metrics'; +import Stats from './Stats'; +import Health from './Health'; +import Operations from './Operations'; +import MultiSearch from './MultiSearch'; +import Presets from './Presets'; +import Preset from './Preset'; +import Analytics from './Analytics'; +import Stopwords from './Stopwords'; +import Stopword from './Stopword'; +import Conversations from './Conversations'; +import Conversation from './Conversation'; export default class Client { configuration: Configuration; diff --git a/src/Typesense/Collection.ts b/src/Typesense/Collection.ts index 5eb14421..844e9853 100644 --- a/src/Typesense/Collection.ts +++ b/src/Typesense/Collection.ts @@ -1,31 +1,31 @@ -import ApiCall from "./ApiCall"; -import Collections, { CollectionCreateSchema } from "./Collections"; -import Documents, { DocumentSchema } from "./Documents"; -import { ObjectNotFound } from "./Errors"; -import Overrides from "./Overrides"; -import Override from "./Override"; -import Synonyms from "./Synonyms"; -import Synonym from "./Synonym"; -import { Document } from "./Document"; +import ApiCall from './ApiCall'; +import Collections, { CollectionCreateSchema } from './Collections'; +import Documents, { DocumentSchema } from './Documents'; +import { ObjectNotFound } from './Errors'; +import Overrides from './Overrides'; +import Override from './Override'; +import Synonyms from './Synonyms'; +import Synonym from './Synonym'; +import { Document } from './Document'; export type FieldType = - | "string" - | "int32" - | "int64" - | "float" - | "bool" - | "geopoint" - | "geopoint[]" - | "string[]" - | "int32[]" - | "int64[]" - | "float[]" - | "bool[]" - | "object" - | "object[]" - | "auto" - | "string*" - | "image"; + | 'string' + | 'int32' + | 'int64' + | 'float' + | 'bool' + | 'geopoint' + | 'geopoint[]' + | 'string[]' + | 'int32[]' + | 'int64[]' + | 'float[]' + | 'bool[]' + | 'object' + | 'object[]' + | 'auto' + | 'string*' + | 'image'; export interface CollectionFieldSchema { name: string; @@ -54,7 +54,7 @@ export interface CollectionDropFieldSchema { } export interface CollectionUpdateSchema - extends Partial> { + extends Partial> { fields?: (CollectionFieldSchema | CollectionDropFieldSchema)[]; } diff --git a/src/Typesense/Collections.ts b/src/Typesense/Collections.ts index 5758231d..ebe2d75c 100644 --- a/src/Typesense/Collections.ts +++ b/src/Typesense/Collections.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import { CollectionFieldSchema, CollectionSchema } from "./Collection"; +import ApiCall from './ApiCall'; +import { CollectionFieldSchema, CollectionSchema } from './Collection'; export interface CollectionCreateSchema { name: string; @@ -18,7 +18,7 @@ export interface CollectionCreateOptions { src_name?: string; } -const RESOURCEPATH = "/collections"; +const RESOURCEPATH = '/collections'; export default class Collections { constructor(private apiCall: ApiCall) {} diff --git a/src/Typesense/Configuration.ts b/src/Typesense/Configuration.ts index 864f685e..370738ab 100644 --- a/src/Typesense/Configuration.ts +++ b/src/Typesense/Configuration.ts @@ -1,8 +1,8 @@ -import * as logger from "loglevel"; -import { Logger, LogLevelDesc } from "loglevel"; -import { MissingConfigurationError } from "./Errors"; -import type { Agent as HTTPAgent } from "http"; -import type { Agent as HTTPSAgent } from "https"; +import * as logger from 'loglevel'; +import { Logger, LogLevelDesc } from 'loglevel'; +import { MissingConfigurationError } from './Errors'; +import type { Agent as HTTPAgent } from 'http'; +import type { Agent as HTTPSAgent } from 'https'; export interface NodeConfiguration { host: string; @@ -157,7 +157,7 @@ export default class Configuration { this.useServerSideSearchCache = options.useServerSideSearchCache || false; this.logger = options.logger || logger; - this.logLevel = options.logLevel || "warn"; + this.logLevel = options.logLevel || 'warn'; this.logger.setLevel(this.logLevel); this.additionalHeaders = options.additionalHeaders; @@ -174,7 +174,7 @@ export default class Configuration { validate(): boolean { if (this.nodes == null || this.nodes.length === 0 || this.validateNodes()) { throw new MissingConfigurationError( - "Ensure that nodes[].protocol, nodes[].host and nodes[].port are set", + 'Ensure that nodes[].protocol, nodes[].host and nodes[].port are set', ); } @@ -183,12 +183,12 @@ export default class Configuration { this.isNodeMissingAnyParameters(this.nearestNode) ) { throw new MissingConfigurationError( - "Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set", + 'Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set', ); } if (this.apiKey == null) { - throw new MissingConfigurationError("Ensure that apiKey is set"); + throw new MissingConfigurationError('Ensure that apiKey is set'); } return true; @@ -207,9 +207,9 @@ export default class Configuration { | NodeConfigurationWithUrl, ): boolean { return ( - !["protocol", "host", "port", "path"].every((key) => { + !['protocol', 'host', 'port', 'path'].every((key) => { return node.hasOwnProperty(key); - }) && node["url"] == null + }) && node['url'] == null ); } @@ -224,8 +224,8 @@ export default class Configuration { | NodeConfigurationWithHostname | NodeConfigurationWithUrl | undefined { - if (node != null && !node.hasOwnProperty("path")) { - node["path"] = ""; + if (node != null && !node.hasOwnProperty('path')) { + node['path'] = ''; } return node; } @@ -243,15 +243,15 @@ export default class Configuration { | undefined { if ( node != null && - !node.hasOwnProperty("port") && - node.hasOwnProperty("protocol") + !node.hasOwnProperty('port') && + node.hasOwnProperty('protocol') ) { - switch (node["protocol"]) { - case "https": - node["port"] = 443; + switch (node['protocol']) { + case 'https': + node['port'] = 443; break; - case "http": - node["port"] = 80; + case 'http': + node['port'] = 80; break; } } @@ -261,17 +261,17 @@ export default class Configuration { private showDeprecationWarnings(options: ConfigurationOptions): void { if (options.timeoutSeconds) { this.logger.warn( - "Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds", + 'Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds', ); } if (options.masterNode) { this.logger.warn( - "Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12", + 'Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12', ); } if (options.readReplicaNodes) { this.logger.warn( - "Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12", + 'Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12', ); } } diff --git a/src/Typesense/Conversation.ts b/src/Typesense/Conversation.ts index c6b65a9e..1f71f0c3 100644 --- a/src/Typesense/Conversation.ts +++ b/src/Typesense/Conversation.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import Conversations from "./Conversations"; +import ApiCall from './ApiCall'; +import Conversations from './Conversations'; export interface ConversationDeleteSchema { id: number; diff --git a/src/Typesense/ConversationModel.ts b/src/Typesense/ConversationModel.ts index 9782bcd8..0c4cae2b 100644 --- a/src/Typesense/ConversationModel.ts +++ b/src/Typesense/ConversationModel.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import ConversationModels from "./ConversationModels"; +import ApiCall from './ApiCall'; +import ConversationModels from './ConversationModels'; export interface ConversationModelCreateSchema { model_name: string; diff --git a/src/Typesense/ConversationModels.ts b/src/Typesense/ConversationModels.ts index 62eb09e4..aa1eab5c 100644 --- a/src/Typesense/ConversationModels.ts +++ b/src/Typesense/ConversationModels.ts @@ -1,10 +1,10 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; import { ConversationModelCreateSchema, ConversationModelSchema, -} from "./ConversationModel"; +} from './ConversationModel'; -const RESOURCEPATH = "/conversations/models"; +const RESOURCEPATH = '/conversations/models'; export default class ConversationModels { constructor(private readonly apiCall: ApiCall) { @@ -21,14 +21,12 @@ export default class ConversationModels { } async retrieve(): Promise { - return this.apiCall.get( - this.endpointPath(), - ); + return this.apiCall.get(this.endpointPath()); } private endpointPath(operation?: string): string { return `${ConversationModels.RESOURCEPATH}${ - operation === undefined ? "" : "/" + operation + operation === undefined ? '' : '/' + operation }`; } diff --git a/src/Typesense/Conversations.ts b/src/Typesense/Conversations.ts index 8cfaba67..2bad5185 100644 --- a/src/Typesense/Conversations.ts +++ b/src/Typesense/Conversations.ts @@ -1,9 +1,9 @@ -import ApiCall from "./ApiCall"; -import ConversationModels from "./ConversationModels"; -import ConversationModel from "./ConversationModel"; -import { ConversationSchema } from "./Conversation"; +import ApiCall from './ApiCall'; +import ConversationModels from './ConversationModels'; +import ConversationModel from './ConversationModel'; +import { ConversationSchema } from './Conversation'; -const RESOURCEPATH = "/conversations"; +const RESOURCEPATH = '/conversations'; export interface ConversationsRetrieveSchema { conversations: ConversationSchema[]; diff --git a/src/Typesense/Debug.ts b/src/Typesense/Debug.ts index acdf2e92..722fb897 100644 --- a/src/Typesense/Debug.ts +++ b/src/Typesense/Debug.ts @@ -1,6 +1,6 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; -const RESOURCEPATH = "/debug"; +const RESOURCEPATH = '/debug'; export interface DebugResponseSchema { state: number; diff --git a/src/Typesense/Document.ts b/src/Typesense/Document.ts index dc98c102..afeaa72a 100644 --- a/src/Typesense/Document.ts +++ b/src/Typesense/Document.ts @@ -1,15 +1,15 @@ -import ApiCall from "./ApiCall"; -import Collections from "./Collections"; +import ApiCall from './ApiCall'; +import Collections from './Collections'; import Documents, { DocumentSchema, DocumentWriteParameters, -} from "./Documents"; +} from './Documents'; export class Document { constructor( private collectionName: string, private documentId: string, - private apiCall: ApiCall + private apiCall: ApiCall, ) {} async retrieve(): Promise { @@ -22,7 +22,7 @@ export class Document { async update( partialDocument: Partial, - options: DocumentWriteParameters = {} + options: DocumentWriteParameters = {}, ): Promise { return this.apiCall.patch(this.endpointPath(), partialDocument, options); } diff --git a/src/Typesense/Documents.ts b/src/Typesense/Documents.ts index 1d199c7a..19dfb04a 100644 --- a/src/Typesense/Documents.ts +++ b/src/Typesense/Documents.ts @@ -1,8 +1,8 @@ -import type { ReadStream } from "fs"; -import ApiCall from "./ApiCall"; -import Configuration from "./Configuration"; -import { ImportError } from "./Errors"; -import { SearchOnlyDocuments } from "./SearchOnlyDocuments"; +import type { ReadStream } from 'fs'; +import ApiCall from './ApiCall'; +import Configuration from './Configuration'; +import { ImportError } from './Errors'; +import { SearchOnlyDocuments } from './SearchOnlyDocuments'; // Todo: use generic to extract filter_by values export interface DeleteQuery { @@ -34,7 +34,7 @@ export interface SearchParamsWithPreset extends Partial { preset: string; } -type OperationMode = "off" | "always" | "fallback"; +type OperationMode = 'off' | 'always' | 'fallback'; export interface SearchParams { // From https://typesense.org/docs/latest/api/documents.html#arguments q?: string; @@ -85,10 +85,10 @@ export interface SearchParams { max_candidates?: number; infix?: OperationMode | OperationMode[]; preset?: string; - text_match_type?: "max_score" | "max_weight"; + text_match_type?: 'max_score' | 'max_weight'; vector_query?: string; - "x-typesense-api-key"?: string; - "x-typesense-user-id"?: string; + 'x-typesense-api-key'?: string; + 'x-typesense-user-id'?: string; offset?: number; limit?: number; stopwords?: string; @@ -190,8 +190,8 @@ export interface SearchResponse { } export interface DocumentWriteParameters { - dirty_values?: "coerce_or_reject" | "coerce_or_drop" | "drop" | "reject"; - action?: "create" | "update" | "upsert" | "emplace"; + dirty_values?: 'coerce_or_reject' | 'coerce_or_drop' | 'drop' | 'reject'; + action?: 'create' | 'update' | 'upsert' | 'emplace'; } export interface UpdateByFilterParameters { @@ -252,16 +252,16 @@ export default class Documents } async create(document: T, options: DocumentWriteParameters = {}): Promise { - if (!document) throw new Error("No document provided"); + if (!document) throw new Error('No document provided'); return this.apiCall.post(this.endpointPath(), document, options); } async upsert(document: T, options: DocumentWriteParameters = {}): Promise { - if (!document) throw new Error("No document provided"); + if (!document) throw new Error('No document provided'); return this.apiCall.post( this.endpointPath(), document, - Object.assign({}, options, { action: "upsert" }), + Object.assign({}, options, { action: 'upsert' }), ); } @@ -274,9 +274,9 @@ export default class Documents document: T, options: DocumentWriteParameters | UpdateByFilterParameters = {}, ): Promise { - if (!document) throw new Error("No document provided"); + if (!document) throw new Error('No document provided'); - if (options["filter_by"] != null) { + if (options['filter_by'] != null) { return this.apiCall.patch( this.endpointPath(), document, @@ -286,7 +286,7 @@ export default class Documents return this.apiCall.post( this.endpointPath(), document, - Object.assign({}, options, { action: "update" }), + Object.assign({}, options, { action: 'update' }), ); } } @@ -299,7 +299,7 @@ export default class Documents async createMany(documents: T[], options: DocumentImportParameters = {}) { this.configuration.logger.warn( - "createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents", + 'createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents', ); return this.import(documents, options); } @@ -327,12 +327,12 @@ export default class Documents try { documentsInJSONLFormat = documents .map((document) => JSON.stringify(document)) - .join("\n"); + .join('\n'); } catch (error: any) { // if rangeerror, throw custom error message if ( error instanceof RangeError && - error.message.includes("Too many properties to enumerate") + error.message.includes('Too many properties to enumerate') ) { throw new Error(`${error} It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object @@ -349,12 +349,12 @@ export default class Documents } const resultsInJSONLFormat = await this.apiCall.performRequest( - "post", - this.endpointPath("import"), + 'post', + this.endpointPath('import'), { queryParameters: options, bodyParameters: documentsInJSONLFormat, - additionalHeaders: { "Content-Type": "text/plain" }, + additionalHeaders: { 'Content-Type': 'text/plain' }, skipConnectionTimeout: true, // We never want to client-side-timeout on an import and retry, since imports are syncronous and we want to let them take as long as it takes to complete fully enableKeepAlive: true, // This is to prevent ECONNRESET socket hang up errors. Reference: https://github.com/axios/axios/issues/2936#issuecomment-779439991 }, @@ -362,7 +362,7 @@ export default class Documents if (Array.isArray(documents)) { const resultsInJSONFormat = resultsInJSONLFormat - .split("\n") + .split('\n') .map((r) => JSON.parse(r)) as ImportResponse[]; const failedItems = resultsInJSONFormat.filter( (r) => r.success === false, @@ -388,7 +388,7 @@ export default class Documents * Returns a JSONL string for all the documents in this collection */ async export(options: DocumentsExportParameters = {}): Promise { - return this.apiCall.get(this.endpointPath("export"), options); + return this.apiCall.get(this.endpointPath('export'), options); } /** @@ -397,8 +397,8 @@ export default class Documents async exportStream( options: DocumentsExportParameters = {}, ): Promise { - return this.apiCall.get(this.endpointPath("export"), options, { - responseType: "stream", + return this.apiCall.get(this.endpointPath('export'), options, { + responseType: 'stream', }); } } diff --git a/src/Typesense/Errors/HTTPError.ts b/src/Typesense/Errors/HTTPError.ts index e61602a1..22ca714b 100644 --- a/src/Typesense/Errors/HTTPError.ts +++ b/src/Typesense/Errors/HTTPError.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class HTTPError extends TypesenseError {} diff --git a/src/Typesense/Errors/ImportError.ts b/src/Typesense/Errors/ImportError.ts index 94ffe3e9..9be9407e 100644 --- a/src/Typesense/Errors/ImportError.ts +++ b/src/Typesense/Errors/ImportError.ts @@ -1,5 +1,5 @@ -import TypesenseError from "./TypesenseError"; -import { ImportResponseFail } from "../Documents"; +import TypesenseError from './TypesenseError'; +import { ImportResponseFail } from '../Documents'; export default class ImportError extends TypesenseError { importResults: ImportResponseFail; diff --git a/src/Typesense/Errors/MissingConfigurationError.ts b/src/Typesense/Errors/MissingConfigurationError.ts index 8063f6ec..e7002110 100644 --- a/src/Typesense/Errors/MissingConfigurationError.ts +++ b/src/Typesense/Errors/MissingConfigurationError.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class MissingConfigurationError extends TypesenseError {} diff --git a/src/Typesense/Errors/ObjectAlreadyExists.ts b/src/Typesense/Errors/ObjectAlreadyExists.ts index 8796c296..158432b8 100644 --- a/src/Typesense/Errors/ObjectAlreadyExists.ts +++ b/src/Typesense/Errors/ObjectAlreadyExists.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class ObjectAlreadyExists extends TypesenseError {} diff --git a/src/Typesense/Errors/ObjectNotFound.ts b/src/Typesense/Errors/ObjectNotFound.ts index 6940f4bd..7e52dd79 100644 --- a/src/Typesense/Errors/ObjectNotFound.ts +++ b/src/Typesense/Errors/ObjectNotFound.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class ObjectNotFound extends TypesenseError {} diff --git a/src/Typesense/Errors/ObjectUnprocessable.ts b/src/Typesense/Errors/ObjectUnprocessable.ts index e6c3b5e6..f181828e 100644 --- a/src/Typesense/Errors/ObjectUnprocessable.ts +++ b/src/Typesense/Errors/ObjectUnprocessable.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class ObjectUnprocessable extends TypesenseError {} diff --git a/src/Typesense/Errors/RequestMalformed.ts b/src/Typesense/Errors/RequestMalformed.ts index 82fc016b..47decd0e 100644 --- a/src/Typesense/Errors/RequestMalformed.ts +++ b/src/Typesense/Errors/RequestMalformed.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class RequestMalformed extends TypesenseError {} diff --git a/src/Typesense/Errors/RequestUnauthorized.ts b/src/Typesense/Errors/RequestUnauthorized.ts index e273ff64..a54e050d 100644 --- a/src/Typesense/Errors/RequestUnauthorized.ts +++ b/src/Typesense/Errors/RequestUnauthorized.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class RequestUnauthorized extends TypesenseError {} diff --git a/src/Typesense/Errors/ServerError.ts b/src/Typesense/Errors/ServerError.ts index eadc568e..5114d4de 100644 --- a/src/Typesense/Errors/ServerError.ts +++ b/src/Typesense/Errors/ServerError.ts @@ -1,3 +1,3 @@ -import TypesenseError from "./TypesenseError"; +import TypesenseError from './TypesenseError'; export default class ServerError extends TypesenseError {} diff --git a/src/Typesense/Errors/index.ts b/src/Typesense/Errors/index.ts index 4271af02..359f8c7a 100644 --- a/src/Typesense/Errors/index.ts +++ b/src/Typesense/Errors/index.ts @@ -1,13 +1,13 @@ -import HTTPError from "./HTTPError"; -import MissingConfigurationError from "./MissingConfigurationError"; -import ObjectAlreadyExists from "./ObjectAlreadyExists"; -import ObjectNotFound from "./ObjectNotFound"; -import ObjectUnprocessable from "./ObjectUnprocessable"; -import RequestMalformed from "./RequestMalformed"; -import RequestUnauthorized from "./RequestUnauthorized"; -import ServerError from "./ServerError"; -import ImportError from "./ImportError"; -import TypesenseError from "./TypesenseError"; +import HTTPError from './HTTPError'; +import MissingConfigurationError from './MissingConfigurationError'; +import ObjectAlreadyExists from './ObjectAlreadyExists'; +import ObjectNotFound from './ObjectNotFound'; +import ObjectUnprocessable from './ObjectUnprocessable'; +import RequestMalformed from './RequestMalformed'; +import RequestUnauthorized from './RequestUnauthorized'; +import ServerError from './ServerError'; +import ImportError from './ImportError'; +import TypesenseError from './TypesenseError'; export { HTTPError, diff --git a/src/Typesense/Health.ts b/src/Typesense/Health.ts index 784b45d7..22c6cd23 100644 --- a/src/Typesense/Health.ts +++ b/src/Typesense/Health.ts @@ -1,6 +1,6 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; -const RESOURCEPATH = "/health"; +const RESOURCEPATH = '/health'; export interface HealthResponse { ok: boolean; diff --git a/src/Typesense/Key.ts b/src/Typesense/Key.ts index e011134b..3b497005 100644 --- a/src/Typesense/Key.ts +++ b/src/Typesense/Key.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import Keys from "./Keys"; +import ApiCall from './ApiCall'; +import Keys from './Keys'; export interface KeyCreateSchema { actions: string[]; @@ -19,7 +19,10 @@ export interface KeySchema extends KeyCreateSchema { } export default class Key { - constructor(private id: number, private apiCall: ApiCall) {} + constructor( + private id: number, + private apiCall: ApiCall, + ) {} async retrieve(): Promise { return this.apiCall.get(this.endpointPath()); diff --git a/src/Typesense/Keys.ts b/src/Typesense/Keys.ts index 6eefd902..a50319dc 100644 --- a/src/Typesense/Keys.ts +++ b/src/Typesense/Keys.ts @@ -1,9 +1,9 @@ -import { createHmac } from "crypto"; -import ApiCall from "./ApiCall"; -import { KeyCreateSchema, KeySchema } from "./Key"; -import { SearchParams } from "./Documents"; +import { createHmac } from 'crypto'; +import ApiCall from './ApiCall'; +import { KeyCreateSchema, KeySchema } from './Key'; +import { SearchParams } from './Documents'; -const RESOURCEPATH = "/keys"; +const RESOURCEPATH = '/keys'; export interface KeysRetrieveSchema { keys: KeySchema[]; @@ -30,18 +30,18 @@ export default class Keys { generateScopedSearchKey( searchKey: string, - parameters: GenerateScopedSearchKeyParams + parameters: GenerateScopedSearchKeyParams, ): string { // Note: only a key generated with the `documents:search` action will be // accepted by the server, when usined with the search endpoint. const paramsJSON = JSON.stringify(parameters); const digest = Buffer.from( - createHmac("sha256", searchKey).update(paramsJSON).digest("base64") + createHmac('sha256', searchKey).update(paramsJSON).digest('base64'), ); const keyPrefix = searchKey.substr(0, 4); const rawScopedKey = `${digest}${keyPrefix}${paramsJSON}`; - return Buffer.from(rawScopedKey).toString("base64"); + return Buffer.from(rawScopedKey).toString('base64'); } static get RESOURCEPATH() { diff --git a/src/Typesense/Metrics.ts b/src/Typesense/Metrics.ts index 8121497b..9592f537 100644 --- a/src/Typesense/Metrics.ts +++ b/src/Typesense/Metrics.ts @@ -1,6 +1,6 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; -const RESOURCEPATH = "/metrics.json"; +const RESOURCEPATH = '/metrics.json'; export interface MetricsResponse { [key: `system_cpu${number}_active_percentage`]: string; diff --git a/src/Typesense/MultiSearch.ts b/src/Typesense/MultiSearch.ts index 036de8df..d7b46efe 100644 --- a/src/Typesense/MultiSearch.ts +++ b/src/Typesense/MultiSearch.ts @@ -1,24 +1,24 @@ -import ApiCall from "./ApiCall"; -import Configuration from "./Configuration"; -import RequestWithCache from "./RequestWithCache"; +import ApiCall from './ApiCall'; +import Configuration from './Configuration'; +import RequestWithCache from './RequestWithCache'; import { DocumentSchema, SearchParams, SearchParamsWithPreset, SearchResponse, -} from "./Documents"; +} from './Documents'; -const RESOURCEPATH = "/multi_search"; +const RESOURCEPATH = '/multi_search'; export interface MultiSearchRequestSchema extends SearchParams { collection?: string; - "x-typesense-api-key"?: string; + 'x-typesense-api-key'?: string; } export interface MultiSearchRequestWithPresetSchema extends SearchParamsWithPreset { collection?: string; - "x-typesense-api-key"?: string; + 'x-typesense-api-key'?: string; } export interface MultiSearchRequestsSchema { @@ -27,7 +27,7 @@ export interface MultiSearchRequestsSchema { export interface MultiSearchResponse { results: { [Index in keyof T]: SearchResponse } & { - length: T["length"]; + length: T['length']; }; } @@ -37,7 +37,7 @@ export default class MultiSearch { constructor( private apiCall: ApiCall, private configuration: Configuration, - private useTextContentType: boolean = false + private useTextContentType: boolean = false, ) { this.requestWithCache = new RequestWithCache(); } @@ -52,16 +52,16 @@ export default class MultiSearch { { cacheSearchResultsForSeconds = this.configuration .cacheSearchResultsForSeconds, - }: { cacheSearchResultsForSeconds?: number } = {} + }: { cacheSearchResultsForSeconds?: number } = {}, ): Promise> { const additionalHeaders = {}; if (this.useTextContentType) { - additionalHeaders["content-type"] = "text/plain"; + additionalHeaders['content-type'] = 'text/plain'; } const additionalQueryParams = {}; if (this.configuration.useServerSideSearchCache === true) { - additionalQueryParams["use_cache"] = true; + additionalQueryParams['use_cache'] = true; } const queryParams = Object.assign({}, commonParams, additionalQueryParams); @@ -69,7 +69,7 @@ export default class MultiSearch { this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], - { cacheResponseForSeconds: cacheSearchResultsForSeconds } + { cacheResponseForSeconds: cacheSearchResultsForSeconds }, ) as Promise>; } } diff --git a/src/Typesense/Operations.ts b/src/Typesense/Operations.ts index 605a7d4a..150ea935 100644 --- a/src/Typesense/Operations.ts +++ b/src/Typesense/Operations.ts @@ -1,18 +1,18 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; -const RESOURCEPATH = "/operations"; +const RESOURCEPATH = '/operations'; export default class Operations { constructor(private apiCall: ApiCall) {} async perform( - operationName: "vote" | "snapshot" | "cache/clear" | string, - queryParameters: Record = {} + operationName: 'vote' | 'snapshot' | 'cache/clear' | string, + queryParameters: Record = {}, ): Promise { return this.apiCall.post( `${RESOURCEPATH}/${operationName}`, {}, - queryParameters + queryParameters, ); } } diff --git a/src/Typesense/Override.ts b/src/Typesense/Override.ts index 49f08839..38258372 100644 --- a/src/Typesense/Override.ts +++ b/src/Typesense/Override.ts @@ -1,6 +1,6 @@ -import ApiCall from "./ApiCall"; -import Collections from "./Collections"; -import Overrides, { OverrideCreateSchema } from "./Overrides"; +import ApiCall from './ApiCall'; +import Collections from './Collections'; +import Overrides, { OverrideCreateSchema } from './Overrides'; export interface OverrideSchema extends OverrideCreateSchema { id: string; @@ -14,7 +14,7 @@ export default class Override { constructor( private collectionName: string, private overrideId: string, - private apiCall: ApiCall + private apiCall: ApiCall, ) {} async retrieve(): Promise { diff --git a/src/Typesense/Overrides.ts b/src/Typesense/Overrides.ts index 77b79579..873d5c42 100644 --- a/src/Typesense/Overrides.ts +++ b/src/Typesense/Overrides.ts @@ -1,12 +1,12 @@ -import ApiCall from "./ApiCall"; -import Collections from "./Collections"; -import { OverrideSchema } from "./Override"; +import ApiCall from './ApiCall'; +import Collections from './Collections'; +import { OverrideSchema } from './Override'; -const RESOURCEPATH = "/overrides"; +const RESOURCEPATH = '/overrides'; export interface OverrideRuleQuerySchema { query?: string; - match?: "exact" | "contains"; + match?: 'exact' | 'contains'; } export interface OverrideRuleFilterSchema { @@ -64,7 +64,7 @@ export default class Overrides { private endpointPath(operation?: string): string { return `${Collections.RESOURCEPATH}/${this.collectionName}${ Overrides.RESOURCEPATH - }${operation === undefined ? "" : "/" + operation}`; + }${operation === undefined ? '' : '/' + operation}`; } static get RESOURCEPATH(): string { diff --git a/src/Typesense/Preset.ts b/src/Typesense/Preset.ts index 59b060ce..b0ed4feb 100644 --- a/src/Typesense/Preset.ts +++ b/src/Typesense/Preset.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import Presets, { PresetCreateSchema } from "./Presets"; +import ApiCall from './ApiCall'; +import Presets, { PresetCreateSchema } from './Presets'; export interface PresetSchema extends PresetCreateSchema { name: string; @@ -10,7 +10,10 @@ export interface PresetDeleteSchema { } export default class Preset { - constructor(private presetId: string, private apiCall: ApiCall) {} + constructor( + private presetId: string, + private apiCall: ApiCall, + ) {} async retrieve(): Promise { return this.apiCall.get(this.endpointPath()); diff --git a/src/Typesense/Presets.ts b/src/Typesense/Presets.ts index d21d092e..aaf4ee8c 100644 --- a/src/Typesense/Presets.ts +++ b/src/Typesense/Presets.ts @@ -1,9 +1,9 @@ -import ApiCall from "./ApiCall"; -import { PresetSchema } from "./Preset"; -import { SearchParams } from "./Documents"; -import { MultiSearchRequestsSchema } from "./MultiSearch"; +import ApiCall from './ApiCall'; +import { PresetSchema } from './Preset'; +import { SearchParams } from './Documents'; +import { MultiSearchRequestsSchema } from './MultiSearch'; -const RESOURCEPATH = "/presets"; +const RESOURCEPATH = '/presets'; export interface PresetCreateSchema { value: SearchParams | MultiSearchRequestsSchema; @@ -18,7 +18,7 @@ export default class Presets { async upsert( presetId: string, - params: PresetCreateSchema + params: PresetCreateSchema, ): Promise { return this.apiCall.put(this.endpointPath(presetId), params); } @@ -29,7 +29,7 @@ export default class Presets { private endpointPath(operation?: string): string { return `${Presets.RESOURCEPATH}${ - operation === undefined ? "" : "/" + operation + operation === undefined ? '' : '/' + operation }`; } diff --git a/src/Typesense/RequestWithCache.ts b/src/Typesense/RequestWithCache.ts index 47ac66af..e1d97adb 100644 --- a/src/Typesense/RequestWithCache.ts +++ b/src/Typesense/RequestWithCache.ts @@ -15,7 +15,7 @@ export default class RequestWithCache { requestContext: any, requestFunction: (...params: any) => unknown, requestFunctionArguments: any[], - cacheOptions: CacheOptions + cacheOptions: CacheOptions, ): Promise { const { cacheResponseForSeconds = defaultCacheResponseForSeconds, @@ -28,7 +28,7 @@ export default class RequestWithCache { } const requestFunctionArgumentsJSON = JSON.stringify( - requestFunctionArguments + requestFunctionArguments, ); const cacheEntry = this.responseCache.get(requestFunctionArgumentsJSON); const now = Date.now(); @@ -46,7 +46,7 @@ export default class RequestWithCache { } const cachePromiseEntry = this.responsePromiseCache.get( - requestFunctionArgumentsJSON + requestFunctionArgumentsJSON, ); if (cachePromiseEntry) { @@ -57,7 +57,7 @@ export default class RequestWithCache { this.responsePromiseCache.delete(requestFunctionArgumentsJSON); this.responsePromiseCache.set( requestFunctionArgumentsJSON, - cachePromiseEntry + cachePromiseEntry, ); return cachePromiseEntry.responsePromise; } else { @@ -67,7 +67,7 @@ export default class RequestWithCache { const responsePromise = requestFunction.call( requestContext, - ...requestFunctionArguments + ...requestFunctionArguments, ); this.responsePromiseCache.set(requestFunctionArgumentsJSON, { requestTimestamp: now, diff --git a/src/Typesense/SearchClient.ts b/src/Typesense/SearchClient.ts index 92671ffe..3a268a78 100644 --- a/src/Typesense/SearchClient.ts +++ b/src/Typesense/SearchClient.ts @@ -1,8 +1,8 @@ -import Configuration, { ConfigurationOptions } from "./Configuration"; -import ApiCall from "./ApiCall"; -import MultiSearch from "./MultiSearch"; -import { DocumentSchema } from "./Documents"; -import { SearchOnlyCollection } from "./SearchOnlyCollection"; +import Configuration, { ConfigurationOptions } from './Configuration'; +import ApiCall from './ApiCall'; +import MultiSearch from './MultiSearch'; +import { DocumentSchema } from './Documents'; +import { SearchOnlyCollection } from './SearchOnlyCollection'; export default class SearchClient { public readonly multiSearch: MultiSearch; @@ -14,10 +14,10 @@ export default class SearchClient { options.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam ?? true; if ( options.sendApiKeyAsQueryParam === true && - (options.apiKey || "").length > 2000 + (options.apiKey || '').length > 2000 ) { console.warn( - "[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter." + '[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter.', ); options.sendApiKeyAsQueryParam = false; } @@ -38,19 +38,19 @@ export default class SearchClient { } collections( - collectionName: string + collectionName: string, ): SearchOnlyCollection | SearchOnlyCollection { if (!collectionName) { throw new Error( - "Typesense.SearchClient only supports search operations, so the collectionName that needs to " + - "be searched must be specified. Use Typesense.Client if you need to access the collection object." + 'Typesense.SearchClient only supports search operations, so the collectionName that needs to ' + + 'be searched must be specified. Use Typesense.Client if you need to access the collection object.', ); } else { if (this.individualCollections[collectionName] === undefined) { this.individualCollections[collectionName] = new SearchOnlyCollection( collectionName, this.apiCall, - this.configuration + this.configuration, ); } return this.individualCollections[collectionName]; diff --git a/src/Typesense/SearchOnlyCollection.ts b/src/Typesense/SearchOnlyCollection.ts index d5c9cbef..406b4ce6 100644 --- a/src/Typesense/SearchOnlyCollection.ts +++ b/src/Typesense/SearchOnlyCollection.ts @@ -1,6 +1,6 @@ -import { DocumentSchema, SearchableDocuments } from "./Documents"; -import ApiCall from "./ApiCall"; -import { SearchOnlyDocuments } from "./SearchOnlyDocuments"; +import { DocumentSchema, SearchableDocuments } from './Documents'; +import ApiCall from './ApiCall'; +import { SearchOnlyDocuments } from './SearchOnlyDocuments'; export class SearchOnlyCollection { private readonly _documents: SearchableDocuments; @@ -8,12 +8,12 @@ export class SearchOnlyCollection { constructor( private readonly name: string, private readonly apiCall: ApiCall, - private readonly configuration: any + private readonly configuration: any, ) { this._documents = new SearchOnlyDocuments( this.name, this.apiCall, - this.configuration + this.configuration, ); } diff --git a/src/Typesense/SearchOnlyDocuments.ts b/src/Typesense/SearchOnlyDocuments.ts index 5efb68fc..dfb95554 100644 --- a/src/Typesense/SearchOnlyDocuments.ts +++ b/src/Typesense/SearchOnlyDocuments.ts @@ -1,7 +1,7 @@ -import RequestWithCache from "./RequestWithCache"; -import ApiCall from "./ApiCall"; -import Configuration from "./Configuration"; -import Collections from "./Collections"; +import RequestWithCache from './RequestWithCache'; +import ApiCall from './ApiCall'; +import Configuration from './Configuration'; +import Collections from './Collections'; import type { DocumentSchema, SearchableDocuments, @@ -9,9 +9,9 @@ import type { SearchParams, SearchParamsWithPreset, SearchResponse, -} from "./Documents"; +} from './Documents'; -const RESOURCEPATH = "/documents"; +const RESOURCEPATH = '/documents'; export class SearchOnlyDocuments implements SearchableDocuments @@ -21,7 +21,7 @@ export class SearchOnlyDocuments constructor( protected collectionName: string, protected apiCall: ApiCall, - protected configuration: Configuration + protected configuration: Configuration, ) {} clearCache() { @@ -34,36 +34,36 @@ export class SearchOnlyDocuments cacheSearchResultsForSeconds = this.configuration .cacheSearchResultsForSeconds, abortSignal = null, - }: SearchOptions = {} + }: SearchOptions = {}, ): Promise> { const additionalQueryParams = {}; if (this.configuration.useServerSideSearchCache === true) { - additionalQueryParams["use_cache"] = true; + additionalQueryParams['use_cache'] = true; } for (const key in searchParameters) { if (Array.isArray(searchParameters[key])) { - additionalQueryParams[key] = searchParameters[key].join(","); + additionalQueryParams[key] = searchParameters[key].join(','); } } const queryParams = Object.assign( {}, searchParameters, - additionalQueryParams + additionalQueryParams, ); return this.requestWithCache.perform( this.apiCall, this.apiCall.get, - [this.endpointPath("search"), queryParams, { abortSignal }], + [this.endpointPath('search'), queryParams, { abortSignal }], { cacheResponseForSeconds: cacheSearchResultsForSeconds, - } + }, ) as Promise>; } protected endpointPath(operation?: string) { return `${Collections.RESOURCEPATH}/${this.collectionName}${RESOURCEPATH}${ - operation === undefined ? "" : "/" + operation + operation === undefined ? '' : '/' + operation }`; } diff --git a/src/Typesense/Stats.ts b/src/Typesense/Stats.ts index 00cb9edd..7e029fe4 100644 --- a/src/Typesense/Stats.ts +++ b/src/Typesense/Stats.ts @@ -1,6 +1,6 @@ -import ApiCall from "./ApiCall"; +import ApiCall from './ApiCall'; -const RESOURCEPATH = "/stats.json"; +const RESOURCEPATH = '/stats.json'; export interface EndpointStats { [endpoint: string]: number; diff --git a/src/Typesense/Stopword.ts b/src/Typesense/Stopword.ts index 0c5f0608..e2ffd176 100644 --- a/src/Typesense/Stopword.ts +++ b/src/Typesense/Stopword.ts @@ -1,5 +1,5 @@ -import ApiCall from "./ApiCall"; -import Stopwords, { StopwordCreateSchema } from "./Stopwords"; +import ApiCall from './ApiCall'; +import Stopwords, { StopwordCreateSchema } from './Stopwords'; export interface StopwordSchema extends StopwordCreateSchema { id: string; diff --git a/src/Typesense/Stopwords.ts b/src/Typesense/Stopwords.ts index 22693abc..029dad03 100644 --- a/src/Typesense/Stopwords.ts +++ b/src/Typesense/Stopwords.ts @@ -1,7 +1,7 @@ -import ApiCall from "./ApiCall"; -import { StopwordSchema } from "./Stopword"; +import ApiCall from './ApiCall'; +import { StopwordSchema } from './Stopword'; -const RESOURCEPATH = "/stopwords"; +const RESOURCEPATH = '/stopwords'; export interface StopwordCreateSchema { stopwords: string[]; @@ -31,7 +31,7 @@ export default class Stopwords { private endpointPath(operation?: string): string { return `${Stopwords.RESOURCEPATH}${ - operation === undefined ? "" : "/" + operation + operation === undefined ? '' : '/' + operation }`; } diff --git a/src/Typesense/Synonym.ts b/src/Typesense/Synonym.ts index 076de562..8819fb4a 100644 --- a/src/Typesense/Synonym.ts +++ b/src/Typesense/Synonym.ts @@ -1,6 +1,6 @@ -import ApiCall from "./ApiCall"; -import Collections from "./Collections"; -import Synonyms, { SynonymCreateSchema } from "./Synonyms"; +import ApiCall from './ApiCall'; +import Collections from './Collections'; +import Synonyms, { SynonymCreateSchema } from './Synonyms'; export interface SynonymSchema extends SynonymCreateSchema { id: string; @@ -14,7 +14,7 @@ export default class Synonym { constructor( private collectionName: string, private synonymId: string, - private apiCall: ApiCall + private apiCall: ApiCall, ) {} async retrieve(): Promise { diff --git a/src/Typesense/Synonyms.ts b/src/Typesense/Synonyms.ts index 2d4ffd90..27ed948f 100644 --- a/src/Typesense/Synonyms.ts +++ b/src/Typesense/Synonyms.ts @@ -1,8 +1,8 @@ -import ApiCall from "./ApiCall"; -import Collections from "./Collections"; -import { SynonymSchema } from "./Synonym"; +import ApiCall from './ApiCall'; +import Collections from './Collections'; +import { SynonymSchema } from './Synonym'; -const RESOURCEPATH = "/synonyms"; +const RESOURCEPATH = '/synonyms'; export interface SynonymCreateSchema { synonyms: string[]; @@ -16,15 +16,18 @@ export interface SynonymsRetrieveSchema { } export default class Synonyms { - constructor(private collectionName: string, private apiCall: ApiCall) {} + constructor( + private collectionName: string, + private apiCall: ApiCall, + ) {} async upsert( synonymId: string, - params: SynonymCreateSchema + params: SynonymCreateSchema, ): Promise { return this.apiCall.put( this.endpointPath(synonymId), - params + params, ); } @@ -35,7 +38,7 @@ export default class Synonyms { private endpointPath(operation?: string) { return `${Collections.RESOURCEPATH}/${this.collectionName}${ Synonyms.RESOURCEPATH - }${operation === undefined ? "" : "/" + operation}`; + }${operation === undefined ? '' : '/' + operation}`; } static get RESOURCEPATH(): string { diff --git a/test/Typesense.spec.js b/test/Typesense.spec.js index cb66bdbd..9abf759b 100644 --- a/test/Typesense.spec.js +++ b/test/Typesense.spec.js @@ -1,51 +1,51 @@ -import chai from "chai"; +import chai from 'chai'; import { Client as TypesenseClient, SearchClient as TypesenseSearchClient, Errors, -} from "../src/Typesense"; +} from '../src/Typesense'; let expect = chai.expect; -describe("Typesense", function () { - it("should have a Client object that can be instantiated", function (done) { +describe('Typesense', function () { + it('should have a Client object that can be instantiated', function (done) { let client = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); - expect(client.configuration).to.be.an("object"); + expect(client.configuration).to.be.an('object'); done(); }); - it("should have a SearchClient object that can be instantiated", function (done) { + it('should have a SearchClient object that can be instantiated', function (done) { let client = new TypesenseSearchClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); - expect(client.configuration).to.be.an("object"); + expect(client.configuration).to.be.an('object'); done(); }); - it("should have all the custom error objects", function (done) { + it('should have all the custom error objects', function (done) { // Just to make sure the object is available expect(new Errors.TypesenseError()).to.be.an.instanceof( - Errors.TypesenseError + Errors.TypesenseError, ); done(); }); diff --git a/test/Typesense/Alias.spec.js b/test/Typesense/Alias.spec.js index e99f7e81..a8251068 100644 --- a/test/Typesense/Alias.spec.js +++ b/test/Typesense/Alias.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Alias", function () { +describe('Alias', function () { let typesense; let alias; let apiCall; @@ -17,36 +17,36 @@ describe("Alias", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); - alias = typesense.aliases("companies"); + alias = typesense.aliases('companies'); apiCall = new ApiCall(typesense.configuration); mockAxios = new MockAxiosAdapter(axios); }); - describe(".retrieve", function () { - it("retrieves the alias", function (done) { + describe('.retrieve', function () { + it('retrieves the alias', function (done) { mockAxios .onGet( apiCall.uriFor( - "/aliases/companies", - typesense.configuration.nodes[0] + '/aliases/companies', + typesense.configuration.nodes[0], ), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(200, "{}", { - "content-type": "application/json; charset=utf-8", + .reply(200, '{}', { + 'content-type': 'application/json; charset=utf-8', }); // console.log(mockAxios.handlers) @@ -57,23 +57,23 @@ describe("Alias", function () { }); }); - describe(".delete", function () { - it("deletes an alias", function (done) { + describe('.delete', function () { + it('deletes an alias', function (done) { mockAxios .onDelete( apiCall.uriFor( - "/aliases/companies", - typesense.configuration.nodes[0] + '/aliases/companies', + typesense.configuration.nodes[0], ), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(200, "{}", { - "content-type": "application/json; charset=utf-8", + .reply(200, '{}', { + 'content-type': 'application/json; charset=utf-8', }); let returnData = alias.delete(); diff --git a/test/Typesense/Aliases.spec.js b/test/Typesense/Aliases.spec.js index b00d1012..74164765 100644 --- a/test/Typesense/Aliases.spec.js +++ b/test/Typesense/Aliases.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Aliases", function () { +describe('Aliases', function () { let typesense; let aliases; let apiCall; @@ -17,12 +17,12 @@ describe("Aliases", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); aliases = typesense.aliases(); @@ -30,46 +30,46 @@ describe("Aliases", function () { mockAxios = new MockAxiosAdapter(axios); }); - describe(".upsert", function () { - it("upserts an alias", function (done) { + describe('.upsert', function () { + it('upserts an alias', function (done) { mockAxios .onPut( - apiCall.uriFor("/aliases/books", typesense.configuration.nodes[0]), + apiCall.uriFor('/aliases/books', typesense.configuration.nodes[0]), { - collection_name: "books_january", + collection_name: 'books_january', }, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(201, "{}", { - "content-type": "application/json; charset=utf-8", + .reply(201, '{}', { + 'content-type': 'application/json; charset=utf-8', }); - let returnData = aliases.upsert("books", { - collection_name: "books_january", + let returnData = aliases.upsert('books', { + collection_name: 'books_january', }); expect(returnData).to.eventually.deep.equal({}).notify(done); }); }); - describe(".retrieve", function () { - it("retrieves all aliases", function (done) { + describe('.retrieve', function () { + it('retrieves all aliases', function (done) { mockAxios .onGet( - apiCall.uriFor("/aliases", typesense.configuration.nodes[0]), + apiCall.uriFor('/aliases', typesense.configuration.nodes[0]), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(200, "[]", { - "content-type": "application/json; charset=utf-8", + .reply(200, '[]', { + 'content-type': 'application/json; charset=utf-8', }); let returnData = aliases.retrieve(); diff --git a/test/Typesense/AnalyticsEvents.spec.js b/test/Typesense/AnalyticsEvents.spec.js index b9df9971..e2bcc573 100644 --- a/test/Typesense/AnalyticsEvents.spec.js +++ b/test/Typesense/AnalyticsEvents.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("AnalyticsEvents", function () { +describe('AnalyticsEvents', function () { let typesense; let analyticsEvents; let apiCall; @@ -17,12 +17,12 @@ describe("AnalyticsEvents", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); analyticsEvents = typesense.analytics.events(); @@ -30,33 +30,33 @@ describe("AnalyticsEvents", function () { mockAxios = new MockAxiosAdapter(axios); }); - describe(".create", function () { - it("creates an analytics rule", function (done) { + describe('.create', function () { + it('creates an analytics rule', function (done) { mockAxios .onPost( - apiCall.uriFor("/analytics/events", typesense.configuration.nodes[0]), + apiCall.uriFor('/analytics/events', typesense.configuration.nodes[0]), { - type: "conversion", - name: "products_purchase_event", + type: 'conversion', + name: 'products_purchase_event', data: { - doc_id: "1022", - user_id: "111117", + doc_id: '1022', + user_id: '111117', }, }, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) - .reply(201, "{}", { "content-type": "application/json" }); + .reply(201, '{}', { 'content-type': 'application/json' }); let returnData = analyticsEvents.create({ - type: "conversion", - name: "products_purchase_event", + type: 'conversion', + name: 'products_purchase_event', data: { - doc_id: "1022", - user_id: "111117", + doc_id: '1022', + user_id: '111117', }, }); diff --git a/test/Typesense/AnalyticsRule.spec.js b/test/Typesense/AnalyticsRule.spec.js index e93f4167..89765e2e 100644 --- a/test/Typesense/AnalyticsRule.spec.js +++ b/test/Typesense/AnalyticsRule.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("AnalyticsRule", function () { +describe('AnalyticsRule', function () { let typesense; let analyticsRule; let apiCall; @@ -17,35 +17,35 @@ describe("AnalyticsRule", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); - analyticsRule = typesense.analytics.rules("123"); + analyticsRule = typesense.analytics.rules('123'); apiCall = new ApiCall(typesense.configuration); mockAxios = new MockAxiosAdapter(axios); }); - describe(".retrieve", function () { - it("retrieves the rule", function (done) { + describe('.retrieve', function () { + it('retrieves the rule', function (done) { mockAxios .onGet( apiCall.uriFor( - "/analytics/rules/123", - typesense.configuration.nodes[0] + '/analytics/rules/123', + typesense.configuration.nodes[0], ), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(200, "{}", { "content-type": "application/json" }); + .reply(200, '{}', { 'content-type': 'application/json' }); // console.log(mockAxios.handlers) @@ -55,20 +55,20 @@ describe("AnalyticsRule", function () { }); }); - describe(".delete", function () { - it("deletes a key", function (done) { + describe('.delete', function () { + it('deletes a key', function (done) { mockAxios .onDelete( apiCall.uriFor( - "/analytics/rules/123", - typesense.configuration.nodes[0] + '/analytics/rules/123', + typesense.configuration.nodes[0], ), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, {}); diff --git a/test/Typesense/AnalyticsRules.spec.js b/test/Typesense/AnalyticsRules.spec.js index adb63e16..4f34fbd5 100644 --- a/test/Typesense/AnalyticsRules.spec.js +++ b/test/Typesense/AnalyticsRules.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("AnalyticsRules", function () { +describe('AnalyticsRules', function () { let typesense; let analyticsRules; let apiCall; @@ -17,12 +17,12 @@ describe("AnalyticsRules", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); analyticsRules = typesense.analytics.rules(); @@ -30,36 +30,36 @@ describe("AnalyticsRules", function () { mockAxios = new MockAxiosAdapter(axios); }); - describe(".upsert", function () { - it("upserts an analytics rule", function (done) { + describe('.upsert', function () { + it('upserts an analytics rule', function (done) { mockAxios .onPut( apiCall.uriFor( - "/analytics/rules/search_suggestions", + '/analytics/rules/search_suggestions', typesense.configuration.nodes[0], ), { - type: "popular_queries", + type: 'popular_queries', params: { - source: { collections: ["products"] }, - destination: { collection: "products_top_queries" }, + source: { collections: ['products'] }, + destination: { collection: 'products_top_queries' }, expand_query: true, limit: 100, }, }, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) - .reply(201, "{}", { "content-type": "application/json" }); + .reply(201, '{}', { 'content-type': 'application/json' }); - let returnData = analyticsRules.upsert("search_suggestions", { - type: "popular_queries", + let returnData = analyticsRules.upsert('search_suggestions', { + type: 'popular_queries', params: { - source: { collections: ["products"] }, - destination: { collection: "products_top_queries" }, + source: { collections: ['products'] }, + destination: { collection: 'products_top_queries' }, expand_query: true, limit: 100, }, @@ -69,19 +69,19 @@ describe("AnalyticsRules", function () { }); }); - describe(".retrieve", function () { - it("retrieves all analytics rules", function (done) { + describe('.retrieve', function () { + it('retrieves all analytics rules', function (done) { mockAxios .onGet( - apiCall.uriFor("/analytics/rules", typesense.configuration.nodes[0]), + apiCall.uriFor('/analytics/rules', typesense.configuration.nodes[0]), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) - .reply(200, "[]", { "content-type": "application/json" }); + .reply(200, '[]', { 'content-type': 'application/json' }); let returnData = analyticsRules.retrieve(); diff --git a/test/Typesense/ApiCall.spec.js b/test/Typesense/ApiCall.spec.js index fbc0dea7..c7b63b11 100644 --- a/test/Typesense/ApiCall.spec.js +++ b/test/Typesense/ApiCall.spec.js @@ -1,380 +1,380 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import { ObjectUnprocessable } from "../../src/Typesense/Errors"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; -import timekeeper from "timekeeper"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import { ObjectUnprocessable } from '../../src/Typesense/Errors'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; +import timekeeper from 'timekeeper'; let expect = chai.expect; chai.use(chaiAsPromised); let sharedNodeSelectionBehavior = (method) => { - it("does not retry when HTTPStatus >= 300 and HTTPStatus < 500", async function () { + it('does not retry when HTTPStatus >= 300 and HTTPStatus < 500', async function () { this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[0])) - .reply(409, JSON.stringify({ message: "Already exists" }), { - "content-type": "application/json", + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[0])) + .reply(409, JSON.stringify({ message: 'Already exists' }), { + 'content-type': 'application/json', }); this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[1])) - .reply(422, JSON.stringify({ message: "Unprocessable" }), { - "content-type": "application/json", + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[1])) + .reply(422, JSON.stringify({ message: 'Unprocessable' }), { + 'content-type': 'application/json', }); this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[2])) - .reply(500, JSON.stringify({ message: "Error message" }), { - "content-type": "application/json", + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[2])) + .reply(500, JSON.stringify({ message: 'Error message' }), { + 'content-type': 'application/json', }); - await expect(this.apiCall[method]("/")).to.eventually.be.rejectedWith( - "Request failed with HTTP code 409 | Server said: Already exists" + await expect(this.apiCall[method]('/')).to.eventually.be.rejectedWith( + 'Request failed with HTTP code 409 | Server said: Already exists', ); - await expect(this.apiCall[method]("/")).to.eventually.be.rejectedWith( - ObjectUnprocessable + await expect(this.apiCall[method]('/')).to.eventually.be.rejectedWith( + ObjectUnprocessable, ); let requestHistory = this.mockAxios.history[method]; expect(requestHistory.length).to.equal(2); - expect(requestHistory[0].url).to.equal("http://node0:8108/"); - expect(requestHistory[1].url).to.equal("http://node1:7108/"); + expect(requestHistory[0].url).to.equal('http://node0:8108/'); + expect(requestHistory[1].url).to.equal('http://node1:7108/'); }); - it("raises an error when no nodes are healthy", async function () { + it('raises an error when no nodes are healthy', async function () { this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[0])) - .reply(500, JSON.stringify({ message: "Error message" }), { - "content-type": "application/json", + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[0])) + .reply(500, JSON.stringify({ message: 'Error message' }), { + 'content-type': 'application/json', }); this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[1])) - .reply(500, JSON.stringify({ message: "Error message" }), { - "content-type": "application/json", + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[1])) + .reply(500, JSON.stringify({ message: 'Error message' }), { + 'content-type': 'application/json', }); this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[2])) - .reply(500, JSON.stringify({ message: "Error message" }), { - "content-type": "application/json", + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[2])) + .reply(500, JSON.stringify({ message: 'Error message' }), { + 'content-type': 'application/json', }); - await expect(this.apiCall[method]("/")).to.eventually.be.rejectedWith( - "Request failed with HTTP code 500 | Server said: Error message" + await expect(this.apiCall[method]('/')).to.eventually.be.rejectedWith( + 'Request failed with HTTP code 500 | Server said: Error message', ); let requestHistory = this.mockAxios.history[method]; expect(requestHistory.length).to.equal(4); - expect(requestHistory[0].url).to.equal("http://node0:8108/"); - expect(requestHistory[1].url).to.equal("http://node1:7108/"); - expect(requestHistory[2].url).to.equal("http://node2:9108/"); - expect(requestHistory[3].url).to.equal("http://node0:8108/"); + expect(requestHistory[0].url).to.equal('http://node0:8108/'); + expect(requestHistory[1].url).to.equal('http://node1:7108/'); + expect(requestHistory[2].url).to.equal('http://node2:9108/'); + expect(requestHistory[3].url).to.equal('http://node0:8108/'); }); - it("selects the next available node when there is a connection timeout", async function () { + it('selects the next available node when there is a connection timeout', async function () { this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[0])) + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[0])) .timeout(); this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[1])) + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[1])) .timeout(); this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[2])) - .reply(200, JSON.stringify({ message: "Success" }), { - "content-type": "application/json", + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[2])) + .reply(200, JSON.stringify({ message: 'Success' }), { + 'content-type': 'application/json', }); - await expect(this.apiCall[method]("/")).to.eventually.deep.equal({ - message: "Success", + await expect(this.apiCall[method]('/')).to.eventually.deep.equal({ + message: 'Success', }); let requestHistory = this.mockAxios.history[method]; expect(requestHistory.length).to.equal(3); - expect(requestHistory[0].url).to.equal("http://node0:8108/"); - expect(requestHistory[1].url).to.equal("http://node1:7108/"); - expect(requestHistory[2].url).to.equal("http://node2:9108/"); + expect(requestHistory[0].url).to.equal('http://node0:8108/'); + expect(requestHistory[1].url).to.equal('http://node1:7108/'); + expect(requestHistory[2].url).to.equal('http://node2:9108/'); }); - it("removes unhealthy nodes out of rotation, until threshold", async function () { + it('removes unhealthy nodes out of rotation, until threshold', async function () { this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[0])) + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[0])) .timeout(); this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[1])) + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[1])) .timeout(); this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[2])) - .reply(200, JSON.stringify({ message: "Success" }), { - "content-type": "application/json", + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[2])) + .reply(200, JSON.stringify({ message: 'Success' }), { + 'content-type': 'application/json', }); let currentTime = Date.now(); timekeeper.freeze(currentTime); - await this.apiCall[method]("/"); // Node 0 and Node 1 are marked as unhealthy after this, request should have been made to Node 2 - await this.apiCall[method]("/"); // Request should have been made to Node 2 - await this.apiCall[method]("/"); // Request should have been made to Node 2 + await this.apiCall[method]('/'); // Node 0 and Node 1 are marked as unhealthy after this, request should have been made to Node 2 + await this.apiCall[method]('/'); // Request should have been made to Node 2 + await this.apiCall[method]('/'); // Request should have been made to Node 2 timekeeper.freeze(currentTime + 5 * 1000); - await this.apiCall[method]("/"); // Request should have been made to Node 2 + await this.apiCall[method]('/'); // Request should have been made to Node 2 timekeeper.freeze(currentTime + 65 * 1000); - await this.apiCall[method]("/"); // Request should have been made to Node 2, since Node 0 and Node 1 are still unhealthy, though they were added back into rotation after the threshold + await this.apiCall[method]('/'); // Request should have been made to Node 2, since Node 0 and Node 1 are still unhealthy, though they were added back into rotation after the threshold // Remove first mock, to let request to node 0 succeed this.mockAxios.handlers[method].shift(); this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[0])) - .reply(200, JSON.stringify({ message: "Success" }), { - "content-type": "application/json", + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[0])) + .reply(200, JSON.stringify({ message: 'Success' }), { + 'content-type': 'application/json', }); timekeeper.freeze(currentTime + 185 * 1000); - await this.apiCall[method]("/"); // Request should have been made to Node 0, since it is now healthy and the unhealthy threshold was exceeded + await this.apiCall[method]('/'); // Request should have been made to Node 0, since it is now healthy and the unhealthy threshold was exceeded let requestHistory = this.mockAxios.history[method]; expect(requestHistory.length).to.equal(10); - expect(requestHistory[0].url).to.equal("http://node0:8108/"); - expect(requestHistory[1].url).to.equal("http://node1:7108/"); - expect(requestHistory[2].url).to.equal("http://node2:9108/"); + expect(requestHistory[0].url).to.equal('http://node0:8108/'); + expect(requestHistory[1].url).to.equal('http://node1:7108/'); + expect(requestHistory[2].url).to.equal('http://node2:9108/'); - expect(requestHistory[3].url).to.equal("http://node2:9108/"); + expect(requestHistory[3].url).to.equal('http://node2:9108/'); - expect(requestHistory[4].url).to.equal("http://node2:9108/"); + expect(requestHistory[4].url).to.equal('http://node2:9108/'); - expect(requestHistory[5].url).to.equal("http://node2:9108/"); + expect(requestHistory[5].url).to.equal('http://node2:9108/'); - expect(requestHistory[6].url).to.equal("http://node0:8108/"); - expect(requestHistory[7].url).to.equal("http://node1:7108/"); - expect(requestHistory[8].url).to.equal("http://node2:9108/"); + expect(requestHistory[6].url).to.equal('http://node0:8108/'); + expect(requestHistory[7].url).to.equal('http://node1:7108/'); + expect(requestHistory[8].url).to.equal('http://node2:9108/'); - expect(requestHistory[9].url).to.equal("http://node0:8108/"); + expect(requestHistory[9].url).to.equal('http://node0:8108/'); timekeeper.reset(); }); - describe("when a nearestNode is specified", function () { + describe('when a nearestNode is specified', function () { beforeEach(function () { this.typesense = new TypesenseClient({ nearestNode: { - host: "nearestNode", - port: "6108", - protocol: "http", + host: 'nearestNode', + port: '6108', + protocol: 'http', }, nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, { - host: "node1", - port: "7108", - protocol: "http", + host: 'node1', + port: '7108', + protocol: 'http', }, { - host: "node2", - port: "9108", - protocol: "http", + host: 'node2', + port: '9108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, - logLevel: "error", + logLevel: 'error', retryIntervalSeconds: 0.001, // To keep tests fast }); this.mockAxios = new MockAxiosAdapter(axios); this.apiCall = new ApiCall(this.typesense.configuration); }); - it("uses the nearestNode if it is present and healthy, otherwise fallsback to regular nodes", async function () { + it('uses the nearestNode if it is present and healthy, otherwise fallsback to regular nodes', async function () { this.mockAxios .onAny( - this.apiCall.uriFor("/", this.typesense.configuration.nearestNode) + this.apiCall.uriFor('/', this.typesense.configuration.nearestNode), ) .timeout(); this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[0])) + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[0])) .timeout(); this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[1])) + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[1])) .timeout(); this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[2])) - .reply(200, JSON.stringify({ message: "Success" }), { - "content-type": "application/json", + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[2])) + .reply(200, JSON.stringify({ message: 'Success' }), { + 'content-type': 'application/json', }); let currentTime = Date.now(); timekeeper.freeze(currentTime); - await this.apiCall[method]("/"); // Node nearestNode, Node 0 and Node 1 are marked as unhealthy after this, request should have been made to Node 2 - await this.apiCall[method]("/"); // Request should have been made to Node 2 - await this.apiCall[method]("/"); // Request should have been made to Node 2 + await this.apiCall[method]('/'); // Node nearestNode, Node 0 and Node 1 are marked as unhealthy after this, request should have been made to Node 2 + await this.apiCall[method]('/'); // Request should have been made to Node 2 + await this.apiCall[method]('/'); // Request should have been made to Node 2 timekeeper.freeze(currentTime + 5 * 1000); - await this.apiCall[method]("/"); // Request should have been made to Node 2 + await this.apiCall[method]('/'); // Request should have been made to Node 2 timekeeper.freeze(currentTime + 65 * 1000); - await this.apiCall[method]("/"); // Request should have been attempted to nearestNode, Node 0 and Node 1, but finally made to Node 2 (since disributedSearchNode, Node 0 and Node 1 are still unhealthy, though they were added back into rotation after the threshold) + await this.apiCall[method]('/'); // Request should have been attempted to nearestNode, Node 0 and Node 1, but finally made to Node 2 (since disributedSearchNode, Node 0 and Node 1 are still unhealthy, though they were added back into rotation after the threshold) // Remove first mock, to let request to nearestNode succeed this.mockAxios.handlers[method].shift(); this.mockAxios .onAny( - this.apiCall.uriFor("/", this.typesense.configuration.nearestNode) + this.apiCall.uriFor('/', this.typesense.configuration.nearestNode), ) - .reply(200, JSON.stringify({ message: "Success" }), { - "content-type": "application/json", + .reply(200, JSON.stringify({ message: 'Success' }), { + 'content-type': 'application/json', }); timekeeper.freeze(currentTime + 185 * 1000); - await this.apiCall[method]("/"); // Request should have been made to nearestNode, since it is now healthy and the unhealthy threshold was exceeded - await this.apiCall[method]("/"); // Request should have been made to nearestNode, since no roundrobin if it is present and healthy - await this.apiCall[method]("/"); // Request should have been made to nearestNode, since no roundrobin if it is present and healthy + await this.apiCall[method]('/'); // Request should have been made to nearestNode, since it is now healthy and the unhealthy threshold was exceeded + await this.apiCall[method]('/'); // Request should have been made to nearestNode, since no roundrobin if it is present and healthy + await this.apiCall[method]('/'); // Request should have been made to nearestNode, since no roundrobin if it is present and healthy let requestHistory = this.mockAxios.history[method]; expect(requestHistory.length).to.equal(14); - expect(requestHistory[0].url).to.equal("http://nearestNode:6108/"); - expect(requestHistory[1].url).to.equal("http://node0:8108/"); - expect(requestHistory[2].url).to.equal("http://node1:7108/"); - expect(requestHistory[3].url).to.equal("http://node2:9108/"); + expect(requestHistory[0].url).to.equal('http://nearestNode:6108/'); + expect(requestHistory[1].url).to.equal('http://node0:8108/'); + expect(requestHistory[2].url).to.equal('http://node1:7108/'); + expect(requestHistory[3].url).to.equal('http://node2:9108/'); - expect(requestHistory[4].url).to.equal("http://node2:9108/"); + expect(requestHistory[4].url).to.equal('http://node2:9108/'); - expect(requestHistory[5].url).to.equal("http://node2:9108/"); + expect(requestHistory[5].url).to.equal('http://node2:9108/'); - expect(requestHistory[6].url).to.equal("http://node2:9108/"); + expect(requestHistory[6].url).to.equal('http://node2:9108/'); - expect(requestHistory[7].url).to.equal("http://nearestNode:6108/"); - expect(requestHistory[8].url).to.equal("http://node0:8108/"); - expect(requestHistory[9].url).to.equal("http://node1:7108/"); - expect(requestHistory[10].url).to.equal("http://node2:9108/"); + expect(requestHistory[7].url).to.equal('http://nearestNode:6108/'); + expect(requestHistory[8].url).to.equal('http://node0:8108/'); + expect(requestHistory[9].url).to.equal('http://node1:7108/'); + expect(requestHistory[10].url).to.equal('http://node2:9108/'); - expect(requestHistory[11].url).to.equal("http://nearestNode:6108/"); + expect(requestHistory[11].url).to.equal('http://nearestNode:6108/'); - expect(requestHistory[12].url).to.equal("http://nearestNode:6108/"); + expect(requestHistory[12].url).to.equal('http://nearestNode:6108/'); - expect(requestHistory[13].url).to.equal("http://nearestNode:6108/"); + expect(requestHistory[13].url).to.equal('http://nearestNode:6108/'); timekeeper.reset(); }); - it("raises an error when no nodes are healthy", async function () { + it('raises an error when no nodes are healthy', async function () { this.mockAxios .onAny( - this.apiCall.uriFor("/", this.typesense.configuration.nearestNode) + this.apiCall.uriFor('/', this.typesense.configuration.nearestNode), ) - .reply(500, JSON.stringify({ message: "Error message" }), { - "content-type": "application/json", + .reply(500, JSON.stringify({ message: 'Error message' }), { + 'content-type': 'application/json', }); this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[0])) - .reply(500, JSON.stringify({ message: "Error message" }), { - "content-type": "application/json", + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[0])) + .reply(500, JSON.stringify({ message: 'Error message' }), { + 'content-type': 'application/json', }); this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[1])) - .reply(500, JSON.stringify({ message: "Error message" }), { - "content-type": "application/json", + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[1])) + .reply(500, JSON.stringify({ message: 'Error message' }), { + 'content-type': 'application/json', }); this.mockAxios - .onAny(this.apiCall.uriFor("/", this.typesense.configuration.nodes[2])) - .reply(500, JSON.stringify({ message: "Error message" }), { - "content-type": "application/json", + .onAny(this.apiCall.uriFor('/', this.typesense.configuration.nodes[2])) + .reply(500, JSON.stringify({ message: 'Error message' }), { + 'content-type': 'application/json', }); - await expect(this.apiCall[method]("/")).to.eventually.be.rejectedWith( - "Request failed with HTTP code 500 | Server said: Error message" + await expect(this.apiCall[method]('/')).to.eventually.be.rejectedWith( + 'Request failed with HTTP code 500 | Server said: Error message', ); let requestHistory = this.mockAxios.history[method]; expect(requestHistory.length).to.equal(5); - expect(requestHistory[0].url).to.equal("http://nearestNode:6108/"); - expect(requestHistory[1].url).to.equal("http://node0:8108/"); - expect(requestHistory[2].url).to.equal("http://node1:7108/"); - expect(requestHistory[3].url).to.equal("http://node2:9108/"); - expect(requestHistory[4].url).to.equal("http://node0:8108/"); + expect(requestHistory[0].url).to.equal('http://nearestNode:6108/'); + expect(requestHistory[1].url).to.equal('http://node0:8108/'); + expect(requestHistory[2].url).to.equal('http://node1:7108/'); + expect(requestHistory[3].url).to.equal('http://node2:9108/'); + expect(requestHistory[4].url).to.equal('http://node0:8108/'); }); }); }; -describe("ApiCall", function () { - describe("Method Calls", function () { +describe('ApiCall', function () { + describe('Method Calls', function () { beforeEach(function () { this.typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, { - host: "node1", - port: "7108", - protocol: "http", + host: 'node1', + port: '7108', + protocol: 'http', }, { - host: "node2", - port: "9108", - protocol: "http", + host: 'node2', + port: '9108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, - logLevel: "error", + logLevel: 'error', retryIntervalSeconds: 0.001, // To keep tests fast }); this.mockAxios = new MockAxiosAdapter(axios); this.apiCall = new ApiCall(this.typesense.configuration); }); - describe(".post", function () { - sharedNodeSelectionBehavior("post"); + describe('.post', function () { + sharedNodeSelectionBehavior('post'); }); - describe(".put", function () { - sharedNodeSelectionBehavior("post"); + describe('.put', function () { + sharedNodeSelectionBehavior('post'); }); - describe(".get", function () { - sharedNodeSelectionBehavior("post"); + describe('.get', function () { + sharedNodeSelectionBehavior('post'); }); - describe(".delete", function () { - sharedNodeSelectionBehavior("post"); + describe('.delete', function () { + sharedNodeSelectionBehavior('post'); }); }); - describe("URL Construction", function () { - it("constructs the URL based on the node params", function (done) { + describe('URL Construction', function () { + it('constructs the URL based on the node params', function (done) { const client = new TypesenseClient({ nodes: [ { - url: "https://node0/path", + url: 'https://node0/path', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); const apiCall = new ApiCall(client.configuration); expect( - apiCall.uriFor("/collections", client.configuration.nodes[0]) - ).to.equal("https://node0/path/collections"); + apiCall.uriFor('/collections', client.configuration.nodes[0]), + ).to.equal('https://node0/path/collections'); done(); }); }); - describe("Custom Headers", function () { - it("passes on additional user-provided headers in the request", async function () { + describe('Custom Headers', function () { + it('passes on additional user-provided headers in the request', async function () { const client = new TypesenseClient({ nodes: [ { - url: "https://node0/path", + url: 'https://node0/path', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, additionalHeaders: { - "x-header-name": "value", + 'x-header-name': 'value', }, }); @@ -382,16 +382,16 @@ describe("ApiCall", function () { const apiCall = new ApiCall(client.configuration); this.mockAxios - .onGet("https://node0/path/collections", null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": client.configuration.apiKey, - "x-header-name": "value", + .onGet('https://node0/path/collections', null, { + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': client.configuration.apiKey, + 'x-header-name': 'value', }) - .reply(200, JSON.stringify({}), { "content-type": "application/json" }); + .reply(200, JSON.stringify({}), { 'content-type': 'application/json' }); // Will error out if request doesn't match the stub - return apiCall.get("/collections", {}); + return apiCall.get('/collections', {}); }); }); }); diff --git a/test/Typesense/Client.spec.js b/test/Typesense/Client.spec.js index c7d1de3b..ed7c5d3b 100644 --- a/test/Typesense/Client.spec.js +++ b/test/Typesense/Client.spec.js @@ -1,54 +1,54 @@ -import chai from "chai"; -import { Client as TypesenseClient } from "../../src/Typesense"; +import chai from 'chai'; +import { Client as TypesenseClient } from '../../src/Typesense'; let expect = chai.expect; -describe("Client", function () { +describe('Client', function () { let typesense; beforeEach(function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); }); - it("should set the right default configuration values", function (done) { + it('should set the right default configuration values', function (done) { expect(typesense.configuration.nodes).to.eql([ { - host: "node0", - port: "8108", - protocol: "http", - path: "", + host: 'node0', + port: '8108', + protocol: 'http', + path: '', }, ]); expect(typesense.configuration.connectionTimeoutSeconds).to.eql(5); - expect(typesense.configuration.apiKey).to.eql("abcd"); + expect(typesense.configuration.apiKey).to.eql('abcd'); done(); }); - it("should allow custom user headers to be passed in", function (done) { + it('should allow custom user headers to be passed in', function (done) { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, additionalHeaders: { - "CF-Access-Client-Id": "abcd", + 'CF-Access-Client-Id': 'abcd', }, }); expect( - typesense.configuration.additionalHeaders["CF-Access-Client-Id"] - ).to.eql("abcd"); + typesense.configuration.additionalHeaders['CF-Access-Client-Id'], + ).to.eql('abcd'); done(); }); }); diff --git a/test/Typesense/Collection.spec.js b/test/Typesense/Collection.spec.js index da4169a1..7170dcb2 100644 --- a/test/Typesense/Collection.spec.js +++ b/test/Typesense/Collection.spec.js @@ -1,80 +1,80 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Collection", function () { +describe('Collection', function () { let typesense; let collection; let apiCall; let mockAxios; let companySchema = { - name: "companies", + name: 'companies', num_documents: 0, fields: [ { - name: "company_name", - type: "string", + name: 'company_name', + type: 'string', facet: false, }, { - name: "num_employees", - type: "int32", + name: 'num_employees', + type: 'int32', facet: false, }, { - name: "country", - type: "string", + name: 'country', + type: 'string', facet: true, }, { - name: "address", - type: "string", - locale: "el", + name: 'address', + type: 'string', + locale: 'el', infix: true, }, ], - default_sorting_field: "num_employees", + default_sorting_field: 'num_employees', }; beforeEach(function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); - collection = typesense.collections("companies"); + collection = typesense.collections('companies'); apiCall = new ApiCall(typesense.configuration); mockAxios = new MockAxiosAdapter(axios); }); - describe(".retrieve", function () { - it("retrieves a collection", function (done) { + describe('.retrieve', function () { + it('retrieves a collection', function (done) { mockAxios .onGet( apiCall.uriFor( - "/collections/companies", - typesense.configuration.nodes[0] + '/collections/companies', + typesense.configuration.nodes[0], ), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, JSON.stringify(companySchema), { - "content-type": "application/json", + 'content-type': 'application/json', }); let returnData = collection.retrieve(); @@ -83,26 +83,26 @@ describe("Collection", function () { }); }); - describe(".update", function () { - it("updates a collection", function (done) { + describe('.update', function () { + it('updates a collection', function (done) { const updateSchema = { - fields: [{ name: "fieldX", drop: true }], + fields: [{ name: 'fieldX', drop: true }], }; mockAxios .onPatch( apiCall.uriFor( - "/collections/companies", - typesense.configuration.nodes[0] + '/collections/companies', + typesense.configuration.nodes[0], ), updateSchema, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, JSON.stringify(updateSchema), { - "content-type": "application/json", + 'content-type': 'application/json', }); let returnData = collection.update(updateSchema); @@ -111,23 +111,23 @@ describe("Collection", function () { }); }); - describe(".delete", function () { - it("deletes a collection", function (done) { + describe('.delete', function () { + it('deletes a collection', function (done) { mockAxios .onDelete( apiCall.uriFor( - "/collections/companies", - typesense.configuration.nodes[0] + '/collections/companies', + typesense.configuration.nodes[0], ), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, JSON.stringify(companySchema), { - "content-type": "application/json", + 'content-type': 'application/json', }); let returnData = collection.delete(); diff --git a/test/Typesense/Collections.spec.js b/test/Typesense/Collections.spec.js index 4d27091f..690c6c73 100644 --- a/test/Typesense/Collections.spec.js +++ b/test/Typesense/Collections.spec.js @@ -1,56 +1,56 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Collections", function () { +describe('Collections', function () { let typesense; let collections; let apiCall; let mockAxios; let companySchema = { - name: "companies", + name: 'companies', num_documents: 0, fields: [ { - name: "company_name", - type: "string", + name: 'company_name', + type: 'string', facet: false, }, { - name: "num_employees", - type: "int32", + name: 'num_employees', + type: 'int32', facet: false, }, { - name: "country", - type: "string", + name: 'country', + type: 'string', facet: true, }, { - name: "address", - type: "string", - locale: "el", + name: 'address', + type: 'string', + locale: 'el', infix: true, }, ], - default_sorting_field: "num_employees", + default_sorting_field: 'num_employees', }; beforeEach(function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); collections = typesense.collections(); @@ -58,22 +58,22 @@ describe("Collections", function () { mockAxios = new MockAxiosAdapter(axios); }); - describe(".create", function () { - it("creates a collection", function (done) { + describe('.create', function () { + it('creates a collection', function (done) { // eslint-disable-next-line @typescript-eslint/no-unused-vars let { num_documents: numDocuments, ...schemaForCreation } = companySchema; mockAxios .onPost( - apiCall.uriFor("/collections", typesense.configuration.nodes[0]), + apiCall.uriFor('/collections', typesense.configuration.nodes[0]), schemaForCreation, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(201, JSON.stringify(companySchema), { - "content-type": "application/json", + 'content-type': 'application/json', }); let returnData = collections.create(schemaForCreation); @@ -81,32 +81,32 @@ describe("Collections", function () { expect(returnData).to.eventually.deep.equal(companySchema).notify(done); }); - context("when a query paramater is passed", function () { - it("passes the query parameter to the API", function (done) { + context('when a query paramater is passed', function () { + it('passes the query parameter to the API', function (done) { // eslint-disable-next-line @typescript-eslint/no-unused-vars let { num_documents: numDocuments, ...schemaForCreation } = companySchema; mockAxios .onPost( - apiCall.uriFor("/collections", typesense.configuration.nodes[0]), + apiCall.uriFor('/collections', typesense.configuration.nodes[0]), schemaForCreation, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply((config) => { - expect(config.params.src_name).to.equal("collection_x"); + expect(config.params.src_name).to.equal('collection_x'); return [ 201, JSON.stringify(companySchema), - { "content-type": "application/json" }, + { 'content-type': 'application/json' }, ]; }); let returnData = collections.create(schemaForCreation, { - src_name: "collection_x", + src_name: 'collection_x', }); expect(returnData).to.eventually.deep.equal(companySchema).notify(done); @@ -114,20 +114,20 @@ describe("Collections", function () { }); }); - describe(".retrieve", function () { - it("retrieves all collections", function (done) { + describe('.retrieve', function () { + it('retrieves all collections', function (done) { mockAxios .onGet( - apiCall.uriFor("/collections", typesense.configuration.nodes[0]), + apiCall.uriFor('/collections', typesense.configuration.nodes[0]), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, JSON.stringify([companySchema]), { - "content-type": "application/json", + 'content-type': 'application/json', }); let returnData = collections.retrieve(); diff --git a/test/Typesense/Configuration.spec.js b/test/Typesense/Configuration.spec.js index 1a4043ed..4e1bd2de 100644 --- a/test/Typesense/Configuration.spec.js +++ b/test/Typesense/Configuration.spec.js @@ -1,22 +1,22 @@ -import chai from "chai"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import { MissingConfigurationError } from "../../src/Typesense/Errors"; +import chai from 'chai'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import { MissingConfigurationError } from '../../src/Typesense/Errors'; let expect = chai.expect; -describe("Configuration", function () { +describe('Configuration', function () { let typesense; - it("throws an error if there is a missing host value in nodes", function (done) { + it('throws an error if there is a missing host value in nodes', function (done) { expect(() => { typesense = new TypesenseClient({ nodes: [ { - port: "8108", - protocol: "http", + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); }).to.throw(MissingConfigurationError); @@ -24,16 +24,16 @@ describe("Configuration", function () { done(); }); - it("throws an error if there is a missing protocol value in nodes", function (done) { + it('throws an error if there is a missing protocol value in nodes', function (done) { expect(() => { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", + host: 'node0', + port: '8108', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); }).to.throw(MissingConfigurationError); @@ -41,16 +41,16 @@ describe("Configuration", function () { done(); }); - it("auto sets port if port is missing", function (done) { + it('auto sets port if port is missing', function (done) { expect(() => { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - protocol: "http", + host: 'node0', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); expect(typesense.configuration.nodes[0].port).to.equal(80); @@ -59,19 +59,19 @@ describe("Configuration", function () { done(); }); - it("throws an error if nearestNode is missing values", function (done) { + it('throws an error if nearestNode is missing values', function (done) { expect(() => { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - protocol: "http", + host: 'node0', + protocol: 'http', }, ], nearestNode: { - host: "node1", + host: 'node1', }, - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); }).to.throw(MissingConfigurationError); @@ -79,13 +79,13 @@ describe("Configuration", function () { done(); }); - it("throws an error if apiKey is missing", function (done) { + it('throws an error if apiKey is missing', function (done) { expect(() => { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - protocol: "http", + host: 'node0', + protocol: 'http', }, ], }); @@ -94,40 +94,40 @@ describe("Configuration", function () { done(); }); - it("does not throw any errors if url is present", function (done) { + it('does not throw any errors if url is present', function (done) { expect(() => { typesense = new TypesenseClient({ nodes: [ { - url: "https://example.net/", + url: 'https://example.net/', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); expect(typesense.configuration.nodes[0].url).to.equal( - "https://example.net/" + 'https://example.net/', ); }).to.not.throw(MissingConfigurationError); done(); }); - it("randomizes nodes by default", function (done) { + it('randomizes nodes by default', function (done) { for (let i = 0; i < 10; i++) { typesense = new TypesenseClient({ nodes: [ - { host: "node0", protocol: "https" }, - { host: "node1", protocol: "https" }, + { host: 'node0', protocol: 'https' }, + { host: 'node1', protocol: 'https' }, ], - apiKey: "abcd", + apiKey: 'abcd', }); - if (typesense.configuration.nodes[0].host === "node1") { - expect(typesense.configuration.nodes[0].host).to.equal("node1"); + if (typesense.configuration.nodes[0].host === 'node1') { + expect(typesense.configuration.nodes[0].host).to.equal('node1'); return done(); } } - expect(typesense.configuration.nodes[0].host).to.equal("node1"); + expect(typesense.configuration.nodes[0].host).to.equal('node1'); return done(); }); }); diff --git a/test/Typesense/Conversation.spec.js b/test/Typesense/Conversation.spec.js index a382758c..5babd3a0 100644 --- a/test/Typesense/Conversation.spec.js +++ b/test/Typesense/Conversation.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Conversation", function () { +describe('Conversation', function () { let typesense; let conversation; let apiCall; @@ -17,35 +17,35 @@ describe("Conversation", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); - conversation = typesense.conversations("123"); + conversation = typesense.conversations('123'); apiCall = new ApiCall(typesense.configuration); mockAxios = new MockAxiosAdapter(axios); }); - describe(".retrieve", function () { - it("retrieves the conversation", function (done) { + describe('.retrieve', function () { + it('retrieves the conversation', function (done) { mockAxios .onGet( apiCall.uriFor( - "/conversations/123", + '/conversations/123', typesense.configuration.nodes[0], ), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) - .reply(200, "{}", { "content-type": "application/json" }); + .reply(200, '{}', { 'content-type': 'application/json' }); // console.log(mockAxios.handlers) @@ -55,19 +55,19 @@ describe("Conversation", function () { }); }); - describe(".delete", function () { - it("deletes the conversation", function (done) { + describe('.delete', function () { + it('deletes the conversation', function (done) { mockAxios .onDelete( apiCall.uriFor( - "/conversations/123", + '/conversations/123', typesense.configuration.nodes[0], ), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) .reply(200, {}); @@ -78,21 +78,21 @@ describe("Conversation", function () { }); }); - describe(".update", function () { - it("updates the conversation", function (done) { + describe('.update', function () { + it('updates the conversation', function (done) { mockAxios .onPut( apiCall.uriFor( - "/conversations/123", + '/conversations/123', typesense.configuration.nodes[0], ), { ttl: 10, }, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) .reply(200, {}); diff --git a/test/Typesense/ConversationModel.spec.js b/test/Typesense/ConversationModel.spec.js index b5e44b6b..1f3b8601 100644 --- a/test/Typesense/ConversationModel.spec.js +++ b/test/Typesense/ConversationModel.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("ConversationModel", function () { +describe('ConversationModel', function () { let typesense; let conversationModel; let apiCall; @@ -17,35 +17,35 @@ describe("ConversationModel", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); - conversationModel = typesense.conversations().models("123"); + conversationModel = typesense.conversations().models('123'); apiCall = new ApiCall(typesense.configuration); mockAxios = new MockAxiosAdapter(axios); }); - describe(".retrieve", function () { - it("retrieves the model", function (done) { + describe('.retrieve', function () { + it('retrieves the model', function (done) { mockAxios .onGet( apiCall.uriFor( - "/conversations/models/123", + '/conversations/models/123', typesense.configuration.nodes[0], ), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) - .reply(200, "{}", { "content-type": "application/json" }); + .reply(200, '{}', { 'content-type': 'application/json' }); // console.log(mockAxios.handlers) @@ -55,19 +55,19 @@ describe("ConversationModel", function () { }); }); - describe(".delete", function () { - it("deletes the model", function (done) { + describe('.delete', function () { + it('deletes the model', function (done) { mockAxios .onDelete( apiCall.uriFor( - "/conversations/models/123", + '/conversations/models/123', typesense.configuration.nodes[0], ), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) .reply(200, {}); diff --git a/test/Typesense/ConversationModels.spec.js b/test/Typesense/ConversationModels.spec.js index 89c2b985..68169df7 100644 --- a/test/Typesense/ConversationModels.spec.js +++ b/test/Typesense/ConversationModels.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("ConversationModels", function () { +describe('ConversationModels', function () { let typesense; let conversationModels; let apiCall; @@ -17,12 +17,12 @@ describe("ConversationModels", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); conversationModels = typesense.conversations().models(); @@ -30,47 +30,47 @@ describe("ConversationModels", function () { mockAxios = new MockAxiosAdapter(axios); }); - describe(".create", function () { - it("creates a conversation model", function (done) { + describe('.create', function () { + it('creates a conversation model', function (done) { mockAxios .onPost( apiCall.uriFor( - "/conversations/models", + '/conversations/models', typesense.configuration.nodes[0], ), { - model_name: "test", + model_name: 'test', }, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) - .reply(201, "{}", { "content-type": "application/json" }); + .reply(201, '{}', { 'content-type': 'application/json' }); - let returnData = conversationModels.create({ model_name: "test" }); + let returnData = conversationModels.create({ model_name: 'test' }); expect(returnData).to.eventually.deep.equal({}).notify(done); }); }); - describe(".retrieve", function () { - it("retrieves all conversations models", function (done) { + describe('.retrieve', function () { + it('retrieves all conversations models', function (done) { mockAxios .onGet( apiCall.uriFor( - "/conversations/models", + '/conversations/models', typesense.configuration.nodes[0], ), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) - .reply(200, "[]", { "content-type": "application/json" }); + .reply(200, '[]', { 'content-type': 'application/json' }); let returnData = conversationModels.retrieve(); diff --git a/test/Typesense/Conversations.spec.js b/test/Typesense/Conversations.spec.js index 9a89779c..07c8016e 100644 --- a/test/Typesense/Conversations.spec.js +++ b/test/Typesense/Conversations.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Conversations", function () { +describe('Conversations', function () { let typesense; let conversations; let apiCall; @@ -17,12 +17,12 @@ describe("Conversations", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); conversations = typesense.conversations(); @@ -30,19 +30,19 @@ describe("Conversations", function () { mockAxios = new MockAxiosAdapter(axios); }); - describe(".retrieve", function () { - it("retrieves all conversations", function (done) { + describe('.retrieve', function () { + it('retrieves all conversations', function (done) { mockAxios .onGet( - apiCall.uriFor("/conversations", typesense.configuration.nodes[0]), + apiCall.uriFor('/conversations', typesense.configuration.nodes[0]), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) - .reply(200, "[]", { "content-type": "application/json" }); + .reply(200, '[]', { 'content-type': 'application/json' }); let returnData = conversations.retrieve(); diff --git a/test/Typesense/Debug.spec.js b/test/Typesense/Debug.spec.js index 3ef527cd..88185599 100644 --- a/test/Typesense/Debug.spec.js +++ b/test/Typesense/Debug.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Debug", function () { +describe('Debug', function () { let mockAxios; let typesense; let apiCall; @@ -17,32 +17,32 @@ describe("Debug", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); apiCall = new ApiCall(typesense.configuration); }); - describe(".retrieve", function () { - it("retrieves debugging information", function (done) { - let debugInfo = { version: "0.8.0" }; + describe('.retrieve', function () { + it('retrieves debugging information', function (done) { + let debugInfo = { version: '0.8.0' }; mockAxios .onGet( - apiCall.uriFor("/debug", typesense.configuration.nodes[0]), + apiCall.uriFor('/debug', typesense.configuration.nodes[0]), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, JSON.stringify(debugInfo), { - "content-type": "application/json", + 'content-type': 'application/json', }); let returnData = typesense.debug.retrieve(); diff --git a/test/Typesense/Document.spec.js b/test/Typesense/Document.spec.js index f09223a0..6cef416a 100644 --- a/test/Typesense/Document.spec.js +++ b/test/Typesense/Document.spec.js @@ -1,21 +1,21 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Document", function () { +describe('Document', function () { let typesense; let document; let documentResult = { - id: "124", - company_name: "Stark Industries", + id: '124', + company_name: 'Stark Industries', num_employees: 5215, - country: "USA", + country: 'USA', }; let apiCall; let mockAxios; @@ -23,36 +23,36 @@ describe("Document", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); - document = typesense.collections("companies").documents("124"); + document = typesense.collections('companies').documents('124'); apiCall = new ApiCall(typesense.configuration); mockAxios = new MockAxiosAdapter(axios); }); - describe(".retrieve", function () { - it("retrieves a document", function (done) { + describe('.retrieve', function () { + it('retrieves a document', function (done) { mockAxios .onGet( apiCall.uriFor( - "/collections/companies/documents/124", - typesense.configuration.nodes[0] + '/collections/companies/documents/124', + typesense.configuration.nodes[0], ), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, JSON.stringify(documentResult), { - "content-type": "application/json", + 'content-type': 'application/json', }); let returnData = document.retrieve(); @@ -61,59 +61,59 @@ describe("Document", function () { }); }); - describe(".update", function () { - it("updates a document", function (done) { + describe('.update', function () { + it('updates a document', function (done) { const partialDocument = { id: 124, - company_name: "Stark Industries Inc", + company_name: 'Stark Industries Inc', }; mockAxios .onPatch( apiCall.uriFor( - "/collections/companies/documents/124", - typesense.configuration.nodes[0] + '/collections/companies/documents/124', + typesense.configuration.nodes[0], ), partialDocument, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply((config) => { - expect(config.params.dirty_values).to.equal("coerce_or_reject"); + expect(config.params.dirty_values).to.equal('coerce_or_reject'); return [ 200, JSON.stringify(partialDocument), - { "content-type": "application/json" }, + { 'content-type': 'application/json' }, ]; }); let returnData = document.update(partialDocument, { - dirty_values: "coerce_or_reject", + dirty_values: 'coerce_or_reject', }); expect(returnData).to.eventually.deep.equal(partialDocument).notify(done); }); }); - describe(".delete", function () { - it("deletes a document", function (done) { + describe('.delete', function () { + it('deletes a document', function (done) { mockAxios .onDelete( apiCall.uriFor( - "/collections/companies/documents/124", - typesense.configuration.nodes[0] + '/collections/companies/documents/124', + typesense.configuration.nodes[0], ), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, JSON.stringify(documentResult), { - "content-type": "application/json", + 'content-type': 'application/json', }); let returnData = document.delete(); diff --git a/test/Typesense/Documents.spec.js b/test/Typesense/Documents.spec.js index 965f15f9..70b6b46e 100644 --- a/test/Typesense/Documents.spec.js +++ b/test/Typesense/Documents.spec.js @@ -1,16 +1,16 @@ -import fs from "fs"; -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; -import timekeeper from "timekeeper"; +import fs from 'fs'; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; +import timekeeper from 'timekeeper'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Documents", function () { +describe('Documents', function () { let typesense; let documents; let document; @@ -22,40 +22,40 @@ describe("Documents", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, cacheSearchResultsForSeconds: 2 * 60, }); document = { - id: "124", - company_name: "Stark Industries", + id: '124', + company_name: 'Stark Industries', num_employees: 5215, - country: "USA", + country: 'USA', }; anotherDocument = { - id: "125", - company_name: "Stark Industries", + id: '125', + company_name: 'Stark Industries', num_employees: 5215, - country: "USA", + country: 'USA', }; - documents = typesense.collections("companies").documents(); + documents = typesense.collections('companies').documents(); apiCall = new ApiCall(typesense.configuration); mockAxios = new MockAxiosAdapter(axios); }); - describe(".search", function () { - it("searches the documents in a collection", function (done) { + describe('.search', function () { + it('searches the documents in a collection', function (done) { let searchParameters = { - q: "Stark", - query_by: "company_name", + q: 'Stark', + query_by: 'company_name', }; let stubbedSearchResult = { facet_counts: [], @@ -65,13 +65,13 @@ describe("Documents", function () { hits: [ { _highlight: { - company_name: "Stark Industries", + company_name: 'Stark Industries', }, document: { - id: "124", - company_name: "Stark Industries", + id: '124', + company_name: 'Stark Industries', num_employees: 5215, - country: "USA", + country: 'USA', }, }, ], @@ -79,20 +79,20 @@ describe("Documents", function () { mockAxios .onGet( apiCall.uriFor( - "/collections/companies/documents/search", - typesense.configuration.nodes[0] + '/collections/companies/documents/search', + typesense.configuration.nodes[0], ), { params: searchParameters, }, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, JSON.stringify(stubbedSearchResult), { - "content-type": "application/json", + 'content-type': 'application/json', }); let returnData = documents.search(searchParameters); @@ -101,15 +101,15 @@ describe("Documents", function () { .to.eventually.deep.equal(stubbedSearchResult) .notify(done); }); - it("searches with and without cache", async function () { + it('searches with and without cache', async function () { let searchParameters = [ { - q: "Stark", - query_by: "company_name", + q: 'Stark', + query_by: 'company_name', }, { - q: "Acme", - query_by: "company_name", + q: 'Acme', + query_by: 'company_name', }, ]; let stubbedSearchResults = [ @@ -121,13 +121,13 @@ describe("Documents", function () { hits: [ { _highlight: { - company_name: "Stark Industries", + company_name: 'Stark Industries', }, document: { - id: "124", - company_name: "Stark Industries", + id: '124', + company_name: 'Stark Industries', num_employees: 5215, - country: "USA", + country: 'USA', }, }, ], @@ -140,13 +140,13 @@ describe("Documents", function () { hits: [ { _highlight: { - company_name: "Acme Corp", + company_name: 'Acme Corp', }, document: { - id: "124", - company_name: "Acme Corp", + id: '124', + company_name: 'Acme Corp', num_employees: 231, - country: "USA", + country: 'USA', }, }, ], @@ -157,20 +157,20 @@ describe("Documents", function () { mockAxios .onGet( apiCall.uriFor( - "/collections/companies/documents/search", - typesense.configuration.nodes[0] + '/collections/companies/documents/search', + typesense.configuration.nodes[0], ), { params: searchParameters[i], }, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, JSON.stringify(stubbedSearchResults[i]), { - "content-type": "application/json", + 'content-type': 'application/json', }); }); @@ -184,7 +184,7 @@ describe("Documents", function () { ]; // Only two requests should be made, since one of them was cached - expect(mockAxios.history["get"].length).to.equal(2); + expect(mockAxios.history['get'].length).to.equal(2); expect(returnData[0]).to.deep.equal(stubbedSearchResults[0]); expect(returnData[1]).to.deep.equal(stubbedSearchResults[0]); // Same response should be returned @@ -196,7 +196,7 @@ describe("Documents", function () { expect(returnData[3]).to.deep.equal(stubbedSearchResults[1]); // No new requests should have been made - expect(mockAxios.history["get"].length).to.equal(2); + expect(mockAxios.history['get'].length).to.equal(2); // Now wait 2 minutes and then retry the request, it should now make an actual request, since cache is stale timekeeper.freeze(currentTime + 121 * 1000); @@ -204,15 +204,15 @@ describe("Documents", function () { expect(returnData[4]).to.deep.equal(stubbedSearchResults[1]); // One new request should have been made - expect(mockAxios.history["get"].length).to.equal(3); + expect(mockAxios.history['get'].length).to.equal(3); timekeeper.reset(); }); }); - it("should evict least used cache entries", async function () { + it('should evict least used cache entries', async function () { const searchFactory = () => ({ q: Math.random().toString(), - query_by: "company_name", + query_by: 'company_name', }); let searchParameters = []; @@ -229,13 +229,13 @@ describe("Documents", function () { hits: [ { _highlight: { - company_name: "Stark Industries", + company_name: 'Stark Industries', }, document: { - id: "124", - company_name: "Stark Industries", + id: '124', + company_name: 'Stark Industries', num_employees: 5215, - country: "USA", + country: 'USA', }, }, ], @@ -246,20 +246,20 @@ describe("Documents", function () { mockAxios .onGet( apiCall.uriFor( - "/collections/companies/documents/search", - typesense.configuration.nodes[0] + '/collections/companies/documents/search', + typesense.configuration.nodes[0], ), { params: searchParameters[i], }, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, JSON.stringify(stubbedSearchResults[i]), { - "content-type": "application/json", + 'content-type': 'application/json', }); }); @@ -285,24 +285,24 @@ describe("Documents", function () { // get 0 again because it was the oldest await documents.search(searchParameters[0]); - const numberOfRequest = mockAxios.history["get"].length; + const numberOfRequest = mockAxios.history['get'].length; expect(numberOfRequest).to.equal(102); }); - describe(".create", function () { - it("creates the document", function (done) { + describe('.create', function () { + it('creates the document', function (done) { mockAxios .onPost( apiCall.uriFor( - "/collections/companies/documents", - typesense.configuration.nodes[0] + '/collections/companies/documents', + typesense.configuration.nodes[0], ), document, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(201, document); @@ -312,85 +312,85 @@ describe("Documents", function () { }); }); - describe(".upsert", function () { - it("upserts the document", function (done) { + describe('.upsert', function () { + it('upserts the document', function (done) { mockAxios .onPost( apiCall.uriFor( - "/collections/companies/documents", - typesense.configuration.nodes[0] + '/collections/companies/documents', + typesense.configuration.nodes[0], ), document, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply((config) => { - expect(config.params.action).to.equal("upsert"); - expect(config.params.dirty_values).to.equal("reject"); + expect(config.params.action).to.equal('upsert'); + expect(config.params.dirty_values).to.equal('reject'); return [ 201, JSON.stringify(document), - { "content-type": "application/json" }, + { 'content-type': 'application/json' }, ]; }); - let returnData = documents.upsert(document, { dirty_values: "reject" }); + let returnData = documents.upsert(document, { dirty_values: 'reject' }); expect(returnData).to.eventually.deep.equal(document).notify(done); }); }); - describe(".update", function () { - it("updates the document", function (done) { + describe('.update', function () { + it('updates the document', function (done) { mockAxios .onPost( apiCall.uriFor( - "/collections/companies/documents", - typesense.configuration.nodes[0] + '/collections/companies/documents', + typesense.configuration.nodes[0], ), document, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply((config) => { - expect(config.params.action).to.equal("update"); - expect(config.params.dirty_values).to.equal("reject"); + expect(config.params.action).to.equal('update'); + expect(config.params.dirty_values).to.equal('reject'); return [ 201, JSON.stringify(document), - { "content-type": "application/json" }, + { 'content-type': 'application/json' }, ]; }); - let returnData = documents.update(document, { dirty_values: "reject" }); + let returnData = documents.update(document, { dirty_values: 'reject' }); expect(returnData).to.eventually.deep.equal(document).notify(done); }); }); - describe(".createMany", function () { - it("imports the documents", function (done) { + describe('.createMany', function () { + it('imports the documents', function (done) { mockAxios .onPost( apiCall.uriFor( - "/collections/companies/documents/import", - typesense.configuration.nodes[0] + '/collections/companies/documents/import', + typesense.configuration.nodes[0], ), `${JSON.stringify(document)}\n${JSON.stringify(anotherDocument)}`, { - Accept: "application/json, text/plain, */*", - "Content-Type": "text/plain", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'text/plain', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, JSON.stringify({ success: true }), { - "content-type": "text/plain", + 'content-type': 'text/plain', }); let returnData = documents.createMany([document, anotherDocument]); @@ -400,27 +400,27 @@ describe("Documents", function () { .notify(done); }); - context("when a query paramater is passed", function () { - it("passes the query parameter to the API", function (done) { + context('when a query paramater is passed', function () { + it('passes the query parameter to the API', function (done) { mockAxios .onPost( apiCall.uriFor( - "/collections/companies/documents/import", - typesense.configuration.nodes[0] + '/collections/companies/documents/import', + typesense.configuration.nodes[0], ), `${JSON.stringify(document)}\n${JSON.stringify(anotherDocument)}`, { - Accept: "application/json, text/plain, */*", - "Content-Type": "text/plain", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'text/plain', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply((config) => { expect(config.params.upsert).to.equal(true); return [ 200, JSON.stringify({ success: true }), - { "content-type": "text/plain" }, + { 'content-type': 'text/plain' }, ]; }); @@ -435,35 +435,35 @@ describe("Documents", function () { }); }); - describe(".import", function () { - context("when a query paramater is passed", function () { - it("passes the query parameter to the API", function (done) { + describe('.import', function () { + context('when a query paramater is passed', function () { + it('passes the query parameter to the API', function (done) { mockAxios .onPost( apiCall.uriFor( - "/collections/companies/documents/import", - typesense.configuration.nodes[0] + '/collections/companies/documents/import', + typesense.configuration.nodes[0], ), `${JSON.stringify(document)}\n${JSON.stringify(anotherDocument)}`, { - Accept: "application/json, text/plain, */*", - "Content-Type": "text/plain", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'text/plain', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply((config) => { - expect(config.params.action).to.equal("upsert"); + expect(config.params.action).to.equal('upsert'); return [ 200, JSON.stringify({ success: true }), - { "content-type": "text/plain" }, + { 'content-type': 'text/plain' }, ]; }); let jsonlData = [document, anotherDocument] .map((document) => JSON.stringify(document)) - .join("\n"); - let returnData = documents.import(jsonlData, { action: "upsert" }); + .join('\n'); + let returnData = documents.import(jsonlData, { action: 'upsert' }); expect(returnData) .to.eventually.deep.equal(JSON.stringify({ success: true })) @@ -471,135 +471,137 @@ describe("Documents", function () { }); }); - context("when an array of docs is passed", function () { - it("converts it to JSONL and returns an array of results", function (done) { + context('when an array of docs is passed', function () { + it('converts it to JSONL and returns an array of results', function (done) { mockAxios .onPost( apiCall.uriFor( - "/collections/companies/documents/import", - typesense.configuration.nodes[0] + '/collections/companies/documents/import', + typesense.configuration.nodes[0], ), `${JSON.stringify(document)}\n${JSON.stringify(anotherDocument)}`, { - Accept: "application/json, text/plain, */*", - "Content-Type": "text/plain", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'text/plain', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) // eslint-disable-next-line @typescript-eslint/no-unused-vars .reply((config) => { - return [200, "{}\n{}", { "content-type": "text/plain" }]; + return [200, '{}\n{}', { 'content-type': 'text/plain' }]; }); let returnData = documents.import([document, anotherDocument]); expect(returnData).to.eventually.deep.equal([{}, {}]).notify(done); }); - context("when there is an import error", function () { - it("it raises an exception", function (done) { + context('when there is an import error', function () { + it('it raises an exception', function (done) { mockAxios .onPost( apiCall.uriFor( - "/collections/companies/documents/import", - typesense.configuration.nodes[0] + '/collections/companies/documents/import', + typesense.configuration.nodes[0], ), `${JSON.stringify(document)}\n${JSON.stringify(anotherDocument)}`, { - Accept: "application/json, text/plain, */*", - "Content-Type": "text/plain", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'text/plain', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) // eslint-disable-next-line @typescript-eslint/no-unused-vars .reply((config) => { return [ 200, '{"success": false, "message": "Error message"}\n{"success": false, "message": "Error message"}', - { "content-type": "text/plain" }, + { 'content-type': 'text/plain' }, ]; }); documents.import([document, anotherDocument]).catch((error) => { - expect(error.constructor.name).to.eq("ImportError"); + expect(error.constructor.name).to.eq('ImportError'); expect(error.importResults.length).to.eq(2); expect(error.importResults[0].success).to.eq(false); - expect(error.importResults[0].message).to.eq("Error message"); + expect(error.importResults[0].message).to.eq('Error message'); done(); }); }); }); }); - context("when a JSONL string is passed", function () { - it("it sends the string as is and returns a string", function (done) { + context('when a JSONL string is passed', function () { + it('it sends the string as is and returns a string', function (done) { mockAxios .onPost( apiCall.uriFor( - "/collections/companies/documents/import", - typesense.configuration.nodes[0] + '/collections/companies/documents/import', + typesense.configuration.nodes[0], ), `${JSON.stringify(document)}\n${JSON.stringify(anotherDocument)}`, { - Accept: "application/json, text/plain, */*", - "Content-Type": "text/plain", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'text/plain', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) // eslint-disable-next-line @typescript-eslint/no-unused-vars .reply((config) => { - return [200, "{}\n{}", { "content-type": "text/plain" }]; + return [200, '{}\n{}', { 'content-type': 'text/plain' }]; }); let jsonlData = [document, anotherDocument] .map((document) => JSON.stringify(document)) - .join("\n"); + .join('\n'); let returnData = documents.import(jsonlData); - expect(returnData).to.eventually.deep.equal("{}\n{}").notify(done); + expect(returnData).to.eventually.deep.equal('{}\n{}').notify(done); }); }); }); - describe(".export", function () { - it("exports the documents", function (done) { + describe('.export', function () { + it('exports the documents', function (done) { mockAxios .onGet( apiCall.uriFor( - "/collections/companies/documents/export", - typesense.configuration.nodes[0] + '/collections/companies/documents/export', + typesense.configuration.nodes[0], ), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply((config) => { - expect(config.params.include_fields).to.equal("field1"); + expect(config.params.include_fields).to.equal('field1'); return [ 200, [JSON.stringify(document), JSON.stringify(anotherDocument)].join( - "\n" + '\n', ), { - "content-type": "text/plain", + 'content-type': 'text/plain', }, ]; }); - let returnData = documents.export({ include_fields: "field1" }); + let returnData = documents.export({ include_fields: 'field1' }); expect(returnData) .to.eventually.deep.equal( - [JSON.stringify(document), JSON.stringify(anotherDocument)].join("\n") + [JSON.stringify(document), JSON.stringify(anotherDocument)].join( + '\n', + ), ) .notify(done); }); }); - describe(".exportStream", function () { - const tempDirectory = "test-files"; + describe('.exportStream', function () { + const tempDirectory = 'test-files'; const tempFile = `${tempDirectory}/exportStreamData.jsonl`; const directoryExists = (dir) => fs.promises @@ -613,7 +615,7 @@ describe("Documents", function () { } await fs.promises.writeFile( tempFile, - [JSON.stringify(document), JSON.stringify(anotherDocument)].join("\n") + [JSON.stringify(document), JSON.stringify(anotherDocument)].join('\n'), ); }); @@ -623,62 +625,62 @@ describe("Documents", function () { } }); - it("exports a nodejs stream", async function () { + it('exports a nodejs stream', async function () { mockAxios .onGet( apiCall.uriFor( - "/collections/companies/documents/export", - typesense.configuration.nodes[0] + '/collections/companies/documents/export', + typesense.configuration.nodes[0], ), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply((config) => { - expect(config.params.include_fields).to.equal("field1"); + expect(config.params.include_fields).to.equal('field1'); return [200, fs.createReadStream(tempFile)]; }); - const stream = await documents.exportStream({ include_fields: "field1" }); + const stream = await documents.exportStream({ include_fields: 'field1' }); const getDataFromStream = () => new Promise((resolve, reject) => { - let finalData = ""; - stream.on("data", (data) => { + let finalData = ''; + stream.on('data', (data) => { finalData += data; }); - stream.on("end", () => resolve(finalData)); - stream.on("error", (err) => reject(err)); + stream.on('end', () => resolve(finalData)); + stream.on('error', (err) => reject(err)); }); const data = await getDataFromStream(); expect(data).to.deep.equal( - [JSON.stringify(document), JSON.stringify(anotherDocument)].join("\n") + [JSON.stringify(document), JSON.stringify(anotherDocument)].join('\n'), ); }); }); - describe(".delete", function () { - it("delete documents", function (done) { + describe('.delete', function () { + it('delete documents', function (done) { mockAxios .onDelete( apiCall.uriFor( - "/collections/companies/documents", - typesense.configuration.nodes[0] + '/collections/companies/documents', + typesense.configuration.nodes[0], ), { - params: { filter_by: "field:=value" }, + params: { filter_by: 'field:=value' }, }, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(200, "{}", { "content-type": "application/json" }); + .reply(200, '{}', { 'content-type': 'application/json' }); - let returnData = documents.delete({ filter_by: "field:=value" }); + let returnData = documents.delete({ filter_by: 'field:=value' }); expect(returnData).to.eventually.deep.equal({}).notify(done); }); diff --git a/test/Typesense/Health.spec.js b/test/Typesense/Health.spec.js index 7eec87ae..6e890877 100644 --- a/test/Typesense/Health.spec.js +++ b/test/Typesense/Health.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Health", function () { +describe('Health', function () { let mockAxios; let typesense; let apiCall; @@ -17,31 +17,31 @@ describe("Health", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); apiCall = new ApiCall(typesense.configuration); }); - describe(".retrieve", function () { - it("retrieves health information", function (done) { + describe('.retrieve', function () { + it('retrieves health information', function (done) { mockAxios .onGet( - apiCall.uriFor("/health", typesense.configuration.nodes[0]), + apiCall.uriFor('/health', typesense.configuration.nodes[0]), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, JSON.stringify({ ok: true }), { - "content-type": "application/json", + 'content-type': 'application/json', }); let returnData = typesense.health.retrieve(); diff --git a/test/Typesense/Key.spec.js b/test/Typesense/Key.spec.js index b2dc0708..3d24b9dd 100644 --- a/test/Typesense/Key.spec.js +++ b/test/Typesense/Key.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Key", function () { +describe('Key', function () { let typesense; let key; let apiCall; @@ -17,32 +17,32 @@ describe("Key", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); - key = typesense.keys("123"); + key = typesense.keys('123'); apiCall = new ApiCall(typesense.configuration); mockAxios = new MockAxiosAdapter(axios); }); - describe(".retrieve", function () { - it("retrieves the key", function (done) { + describe('.retrieve', function () { + it('retrieves the key', function (done) { mockAxios .onGet( - apiCall.uriFor("/keys/123", typesense.configuration.nodes[0]), + apiCall.uriFor('/keys/123', typesense.configuration.nodes[0]), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(200, "{}", { "content-type": "application/json" }); + .reply(200, '{}', { 'content-type': 'application/json' }); // console.log(mockAxios.handlers) @@ -52,17 +52,17 @@ describe("Key", function () { }); }); - describe(".delete", function () { - it("deletes a key", function (done) { + describe('.delete', function () { + it('deletes a key', function (done) { mockAxios .onDelete( - apiCall.uriFor("/keys/123", typesense.configuration.nodes[0]), + apiCall.uriFor('/keys/123', typesense.configuration.nodes[0]), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, {}); diff --git a/test/Typesense/Keys.spec.js b/test/Typesense/Keys.spec.js index 8f972b4b..1508d26b 100644 --- a/test/Typesense/Keys.spec.js +++ b/test/Typesense/Keys.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Keys", function () { +describe('Keys', function () { let typesense; let keys; let apiCall; @@ -17,12 +17,12 @@ describe("Keys", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); keys = typesense.keys(); @@ -30,47 +30,47 @@ describe("Keys", function () { mockAxios = new MockAxiosAdapter(axios); }); - describe(".create", function () { - it("creates a key", function (done) { + describe('.create', function () { + it('creates a key', function (done) { mockAxios .onPost( - apiCall.uriFor("/keys", typesense.configuration.nodes[0]), + apiCall.uriFor('/keys', typesense.configuration.nodes[0]), { - description: "Search-only key.", - actions: ["documents:search"], - collections: ["*"], + description: 'Search-only key.', + actions: ['documents:search'], + collections: ['*'], }, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(201, "{}", { "content-type": "application/json" }); + .reply(201, '{}', { 'content-type': 'application/json' }); let returnData = keys.create({ - description: "Search-only key.", - actions: ["documents:search"], - collections: ["*"], + description: 'Search-only key.', + actions: ['documents:search'], + collections: ['*'], }); expect(returnData).to.eventually.deep.equal({}).notify(done); }); }); - describe(".retrieve", function () { - it("retrieves all keys", function (done) { + describe('.retrieve', function () { + it('retrieves all keys', function (done) { mockAxios .onGet( - apiCall.uriFor("/keys", typesense.configuration.nodes[0]), + apiCall.uriFor('/keys', typesense.configuration.nodes[0]), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(200, "[]", { "content-type": "application/json" }); + .reply(200, '[]', { 'content-type': 'application/json' }); let returnData = keys.retrieve(); @@ -78,15 +78,15 @@ describe("Keys", function () { }); }); - describe(".generateScopedSearchKey", function () { - it("returns a scoped search key", function (done) { + describe('.generateScopedSearchKey', function () { + it('returns a scoped search key', function (done) { // The following keys were generated and verified to work with an actual Typesense server // We're only verifying that the algorithm works as expected client-side - const searchKey = "RN23GFr1s6jQ9kgSNg2O7fYcAUXU7127"; + const searchKey = 'RN23GFr1s6jQ9kgSNg2O7fYcAUXU7127'; const scopedSearchKey = - "SC9sT0hncHFwTHNFc3U3d3psRDZBUGNXQUViQUdDNmRHSmJFQnNnczJ4VT1STjIzeyJmaWx0ZXJfYnkiOiJjb21wYW55X2lkOjEyNCJ9"; + 'SC9sT0hncHFwTHNFc3U3d3psRDZBUGNXQUViQUdDNmRHSmJFQnNnczJ4VT1STjIzeyJmaWx0ZXJfYnkiOiJjb21wYW55X2lkOjEyNCJ9'; const result = keys.generateScopedSearchKey(searchKey, { - filter_by: "company_id:124", + filter_by: 'company_id:124', }); expect(result).to.equal(scopedSearchKey); diff --git a/test/Typesense/Metrics.spec.js b/test/Typesense/Metrics.spec.js index 76ba3143..8092072a 100644 --- a/test/Typesense/Metrics.spec.js +++ b/test/Typesense/Metrics.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Metrics", function () { +describe('Metrics', function () { let mockAxios; let typesense; let apiCall; @@ -17,30 +17,30 @@ describe("Metrics", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); apiCall = new ApiCall(typesense.configuration); }); - describe(".retrieve", function () { - it("retrieves metrics", function (done) { + describe('.retrieve', function () { + it('retrieves metrics', function (done) { mockAxios .onGet( - apiCall.uriFor("/metrics.json", typesense.configuration.nodes[0]), + apiCall.uriFor('/metrics.json', typesense.configuration.nodes[0]), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(200, "{}", { "content-type": "application/json" }); + .reply(200, '{}', { 'content-type': 'application/json' }); let returnData = typesense.metrics.retrieve(); diff --git a/test/Typesense/MultiSearch.spec.js b/test/Typesense/MultiSearch.spec.js index c5b39cd5..f8ac4f80 100644 --- a/test/Typesense/MultiSearch.spec.js +++ b/test/Typesense/MultiSearch.spec.js @@ -1,15 +1,15 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; -import timekeeper from "timekeeper"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; +import timekeeper from 'timekeeper'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("MultiSearch", function () { +describe('MultiSearch', function () { let mockAxios; let typesense; let apiCall; @@ -18,41 +18,41 @@ describe("MultiSearch", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, cacheSearchResultsForSeconds: 2 * 60, }); apiCall = new ApiCall(typesense.configuration); }); - describe(".perform", function () { - it("performs a multi-search", function (done) { + describe('.perform', function () { + it('performs a multi-search', function (done) { let searches = { - searches: [{ q: "term1" }, { q: "term2" }], + searches: [{ q: 'term1' }, { q: 'term2' }], }; let commonParams = { - collection: "docs", - query_by: "field", + collection: 'docs', + query_by: 'field', }; mockAxios .onPost( - apiCall.uriFor("/multi_search", typesense.configuration.nodes[0]), + apiCall.uriFor('/multi_search', typesense.configuration.nodes[0]), searches, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply((config) => { expect(config.params).to.deep.equal(commonParams); - return [200, "{}", { "content-type": "application/json" }]; + return [200, '{}', { 'content-type': 'application/json' }]; }); let returnData = typesense.multiSearch.perform(searches, commonParams); @@ -60,23 +60,23 @@ describe("MultiSearch", function () { expect(returnData).to.eventually.deep.equal({}).notify(done); }); - it("searches with and without cache", async function () { + it('searches with and without cache', async function () { let searchRequests = [ { - searches: [{ q: "term1" }, { q: "term2" }], + searches: [{ q: 'term1' }, { q: 'term2' }], }, { - searches: [{ q: "term2" }, { q: "term3" }], + searches: [{ q: 'term2' }, { q: 'term3' }], }, ]; let commonParams = [ { - collection: "docs", - query_by: "field", + collection: 'docs', + query_by: 'field', }, { - collection: "notes", - query_by: "field", + collection: 'notes', + query_by: 'field', }, ]; let stubbedSearchResults = [{ results1: [] }, { results2: [] }]; @@ -84,20 +84,20 @@ describe("MultiSearch", function () { searchRequests.forEach((_, i) => { mockAxios .onPost( - apiCall.uriFor("/multi_search", typesense.configuration.nodes[0]), + apiCall.uriFor('/multi_search', typesense.configuration.nodes[0]), searchRequests[i], { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply((config) => { expect(config.params).to.deep.equal(commonParams[i]); return [ 200, JSON.stringify(stubbedSearchResults[i]), - { "content-type": "application/json" }, + { 'content-type': 'application/json' }, ]; }); }); @@ -112,7 +112,7 @@ describe("MultiSearch", function () { ]; // Only two requests should be made, since one of them was cached - expect(mockAxios.history["post"].length).to.equal(2); + expect(mockAxios.history['post'].length).to.equal(2); expect(returnData[0]).to.deep.equal(stubbedSearchResults[0]); expect(returnData[1]).to.deep.equal(stubbedSearchResults[0]); // Same response should be returned @@ -121,22 +121,22 @@ describe("MultiSearch", function () { // Now wait 60s and then retry the request, still should be fetched from cache timekeeper.freeze(currentTime + 60 * 1000); returnData.push( - await typesense.multiSearch.perform(searchRequests[1], commonParams[1]) + await typesense.multiSearch.perform(searchRequests[1], commonParams[1]), ); expect(returnData[3]).to.deep.equal(stubbedSearchResults[1]); // No new requests should have been made - expect(mockAxios.history["post"].length).to.equal(2); + expect(mockAxios.history['post'].length).to.equal(2); // Now wait 2 minutes and then retry the request, it should now make an actual request, since cache is stale timekeeper.freeze(currentTime + 121 * 1000); returnData.push( - await typesense.multiSearch.perform(searchRequests[1], commonParams[1]) + await typesense.multiSearch.perform(searchRequests[1], commonParams[1]), ); expect(returnData[4]).to.deep.equal(stubbedSearchResults[1]); // One new request should have been made - expect(mockAxios.history["post"].length).to.equal(3); + expect(mockAxios.history['post'].length).to.equal(3); timekeeper.reset(); }); }); diff --git a/test/Typesense/Operations.spec.js b/test/Typesense/Operations.spec.js index a2da96af..54b93394 100644 --- a/test/Typesense/Operations.spec.js +++ b/test/Typesense/Operations.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Operations", function () { +describe('Operations', function () { let mockAxios; let typesense; let apiCall; @@ -17,39 +17,39 @@ describe("Operations", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); apiCall = new ApiCall(typesense.configuration); }); - describe(".perform", function () { - it("performs the operation", function (done) { + describe('.perform', function () { + it('performs the operation', function (done) { mockAxios .onPost( apiCall.uriFor( - "/operations/snapshot", - typesense.configuration.nodes[0] + '/operations/snapshot', + typesense.configuration.nodes[0], ), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply((config) => { - expect(config.params.snapshot_path).to.equal("/tmp/dbsnap"); - return [200, "{}", { "content-type": "application/json" }]; + expect(config.params.snapshot_path).to.equal('/tmp/dbsnap'); + return [200, '{}', { 'content-type': 'application/json' }]; }); - let returnData = typesense.operations.perform("snapshot", { - snapshot_path: "/tmp/dbsnap", + let returnData = typesense.operations.perform('snapshot', { + snapshot_path: '/tmp/dbsnap', }); expect(returnData).to.eventually.deep.equal({}).notify(done); diff --git a/test/Typesense/Override.spec.js b/test/Typesense/Override.spec.js index b4d77aa2..2cec32ae 100644 --- a/test/Typesense/Override.spec.js +++ b/test/Typesense/Override.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Override", function () { +describe('Override', function () { let typesense; let overrideData; let override; @@ -19,47 +19,47 @@ describe("Override", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); overrideData = { - id: "lex-exact", + id: 'lex-exact', rule: { - query: "lex luthor", - match: "exact", + query: 'lex luthor', + match: 'exact', }, - includes: [{ id: "125", position: 1 }], - excludes: [{ id: "124" }], + includes: [{ id: '125', position: 1 }], + excludes: [{ id: '124' }], }; - override = typesense.collections("companies").overrides("lex-exact"); + override = typesense.collections('companies').overrides('lex-exact'); apiCall = new ApiCall(typesense.configuration); mockAxios = new MockAxiosAdapter(axios); }); - describe(".retrieve", function () { - it("retreives the override with the given ID", function (done) { + describe('.retrieve', function () { + it('retreives the override with the given ID', function (done) { mockAxios .onGet( apiCall.uriFor( - "/collections/companies/overrides/lex-exact", - typesense.configuration.nodes[0] + '/collections/companies/overrides/lex-exact', + typesense.configuration.nodes[0], ), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, JSON.stringify(overrideData), { - "content-type": "application/json", + 'content-type': 'application/json', }); let returnData = override.retrieve(); @@ -67,24 +67,24 @@ describe("Override", function () { }); }); - describe(".delete", function () { - it("deletes the override with the given ID", function (done) { - let stubbedResult = { id: "lex-exact" }; + describe('.delete', function () { + it('deletes the override with the given ID', function (done) { + let stubbedResult = { id: 'lex-exact' }; mockAxios .onDelete( apiCall.uriFor( - "/collections/companies/overrides/lex-exact", - typesense.configuration.nodes[0] + '/collections/companies/overrides/lex-exact', + typesense.configuration.nodes[0], ), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, JSON.stringify(stubbedResult), { - "content-type": "application/json", + 'content-type': 'application/json', }); let returnData = override.delete(); diff --git a/test/Typesense/Overrides.spec.js b/test/Typesense/Overrides.spec.js index 49a000f6..2785c3a9 100644 --- a/test/Typesense/Overrides.spec.js +++ b/test/Typesense/Overrides.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Overrides", function () { +describe('Overrides', function () { let typesense; let overrides; let override; @@ -19,71 +19,71 @@ describe("Overrides", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); override = { - id: "lex-exact", + id: 'lex-exact', rule: { - query: "lex luthor", - match: "exact", + query: 'lex luthor', + match: 'exact', }, - includes: [{ id: "125", position: 1 }], - excludes: [{ id: "124" }], + includes: [{ id: '125', position: 1 }], + excludes: [{ id: '124' }], }; - overrides = typesense.collections("companies").overrides(); + overrides = typesense.collections('companies').overrides(); apiCall = new ApiCall(typesense.configuration); mockAxios = new MockAxiosAdapter(axios); }); - describe(".create", function () { - it("creates the override in the collection", function (done) { + describe('.create', function () { + it('creates the override in the collection', function (done) { mockAxios .onPut( apiCall.uriFor( - "/collections/companies/overrides/lex-exact", - typesense.configuration.nodes[0] + '/collections/companies/overrides/lex-exact', + typesense.configuration.nodes[0], ), override, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(201, JSON.stringify(override), { - "content-type": "application/json", + 'content-type': 'application/json', }); - let returnData = overrides.upsert("lex-exact", override); + let returnData = overrides.upsert('lex-exact', override); expect(returnData).to.eventually.deep.equal(override).notify(done); }); }); - describe(".retrieve", function () { - it("retrieves all overrides", function (done) { + describe('.retrieve', function () { + it('retrieves all overrides', function (done) { mockAxios .onGet( apiCall.uriFor( - "/collections/companies/overrides", - typesense.configuration.nodes[0] + '/collections/companies/overrides', + typesense.configuration.nodes[0], ), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, JSON.stringify([override]), { - "content-type": "application/json", + 'content-type': 'application/json', }); let returnData = overrides.retrieve(); diff --git a/test/Typesense/Preset.spec.js b/test/Typesense/Preset.spec.js index 2f15cbd6..de871bc6 100644 --- a/test/Typesense/Preset.spec.js +++ b/test/Typesense/Preset.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Preset", function () { +describe('Preset', function () { let typesense; let preset; let apiCall; @@ -17,32 +17,32 @@ describe("Preset", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); - preset = typesense.presets("123"); + preset = typesense.presets('123'); apiCall = new ApiCall(typesense.configuration); mockAxios = new MockAxiosAdapter(axios); }); - describe(".retrieve", function () { - it("retrieves the preset", function (done) { + describe('.retrieve', function () { + it('retrieves the preset', function (done) { mockAxios .onGet( - apiCall.uriFor("/presets/123", typesense.configuration.nodes[0]), + apiCall.uriFor('/presets/123', typesense.configuration.nodes[0]), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(200, "{}", { "content-type": "application/json" }); + .reply(200, '{}', { 'content-type': 'application/json' }); // console.log(mockAxios.handlers) @@ -52,17 +52,17 @@ describe("Preset", function () { }); }); - describe(".delete", function () { - it("deletes a preset", function (done) { + describe('.delete', function () { + it('deletes a preset', function (done) { mockAxios .onDelete( - apiCall.uriFor("/presets/123", typesense.configuration.nodes[0]), + apiCall.uriFor('/presets/123', typesense.configuration.nodes[0]), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply(200, {}); diff --git a/test/Typesense/Presets.spec.js b/test/Typesense/Presets.spec.js index 36abcc93..ec9ac52c 100644 --- a/test/Typesense/Presets.spec.js +++ b/test/Typesense/Presets.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Presets", function () { +describe('Presets', function () { let typesense; let presets; let apiCall; @@ -17,12 +17,12 @@ describe("Presets", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); presets = typesense.presets(); @@ -30,27 +30,27 @@ describe("Presets", function () { mockAxios = new MockAxiosAdapter(axios); }); - describe(".upsert", function () { - it("upserts a preset", function (done) { + describe('.upsert', function () { + it('upserts a preset', function (done) { mockAxios .onPut( - apiCall.uriFor("/presets/preset-1", typesense.configuration.nodes[0]), + apiCall.uriFor('/presets/preset-1', typesense.configuration.nodes[0]), { value: { - query_by: "field1", + query_by: 'field1', }, }, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(201, "{}", { "content-type": "application/json" }); + .reply(201, '{}', { 'content-type': 'application/json' }); - let returnData = presets.upsert("preset-1", { + let returnData = presets.upsert('preset-1', { value: { - query_by: "field1", + query_by: 'field1', }, }); @@ -58,19 +58,19 @@ describe("Presets", function () { }); }); - describe(".retrieve", function () { - it("retrieves all presets", function (done) { + describe('.retrieve', function () { + it('retrieves all presets', function (done) { mockAxios .onGet( - apiCall.uriFor("/presets", typesense.configuration.nodes[0]), + apiCall.uriFor('/presets', typesense.configuration.nodes[0]), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(200, "[]", { "content-type": "application/json" }); + .reply(200, '[]', { 'content-type': 'application/json' }); let returnData = presets.retrieve(); diff --git a/test/Typesense/SearchClient.spec.js b/test/Typesense/SearchClient.spec.js index 98476e46..b1b343c6 100644 --- a/test/Typesense/SearchClient.spec.js +++ b/test/Typesense/SearchClient.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { SearchClient as TypesenseSearchClient } from "../../src/Typesense"; -import MockAxiosAdapter from "axios-mock-adapter"; -import axios from "axios"; -import ApiCall from "../../src/Typesense/ApiCall"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { SearchClient as TypesenseSearchClient } from '../../src/Typesense'; +import MockAxiosAdapter from 'axios-mock-adapter'; +import axios from 'axios'; +import ApiCall from '../../src/Typesense/ApiCall'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("SearchClient", function () { +describe('SearchClient', function () { let typesense; let documents; let apiCall; @@ -18,91 +18,91 @@ describe("SearchClient", function () { typesense = new TypesenseSearchClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, cacheSearchResultsForSeconds: 2 * 60, }); - documents = typesense.collections("companies").documents(); + documents = typesense.collections('companies').documents(); apiCall = new ApiCall(typesense.configuration); mockAxios = new MockAxiosAdapter(axios); }); - it("should set the right default configuration values", function (done) { + it('should set the right default configuration values', function (done) { expect(typesense.configuration.nodes).to.eql([ { - host: "node0", - port: "8108", - protocol: "http", - path: "", + host: 'node0', + port: '8108', + protocol: 'http', + path: '', }, ]); expect(typesense.configuration.connectionTimeoutSeconds).to.eql(5); - expect(typesense.configuration.apiKey).to.eql("abcd"); + expect(typesense.configuration.apiKey).to.eql('abcd'); done(); }); - it("should only expose the search endpoints", function (done) { + it('should only expose the search endpoints', function (done) { expect(typesense.collections).to.throw( - "Typesense.SearchClient only supports search operations" + 'Typesense.SearchClient only supports search operations', ); - expect(typesense.collections("xyz").documents().search).to.be.a("function"); - expect(typesense.multiSearch.perform).to.be.a("function"); - expect(typesense.keys).to.be.an("undefined"); + expect(typesense.collections('xyz').documents().search).to.be.a('function'); + expect(typesense.multiSearch.perform).to.be.a('function'); + expect(typesense.keys).to.be.an('undefined'); done(); }); - it("should send the api key via headers, when key is over 2000 characters, even if sendApiKeyAsQueryParam is true", function (done) { + it('should send the api key via headers, when key is over 2000 characters, even if sendApiKeyAsQueryParam is true', function (done) { let mockAxios = new MockAxiosAdapter(axios); const configuration = { nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], apiKey: - "2e8aa18217d0d64173ee2c897d7847adad903c4ef711ad9dd1b66071e346b4524f8f4c96bef3424b893b0d2e25d17028422d487a17cee645720b59bdae2c6c0f21d8e474d29aebd788194a339c015e87c7a02547d4664171e515a4f1bef80ae68ef606009f2205e87e00249468b8b121afa184630aa3c1c5a613adab62fa3c98e6e8b92642af9c9d4ff5cd5ceda4c062603fc4c255895e527fcfda7c89cdb2bc84e947ab89733bed2ab138f29bd7f3766f92e01e024c131ca8877a8fa18045ea6bedfb44cec03486067186ac5803c4c2a8eee9d926a51dc9d2ec2ec9e833d2e11bf9fa67f57760dd12ad40f5ca6a74bfd580bf42b84425efd3ba298dba5a50b6e262193604d94ca2baa8eeca55b0336e7392e4433871c83e16a7450b1d927043e4b6712e0b752a3eb8a402b10be0eba79adf1ca0a3495d3ae8edde25030ce4a4499754f23dc22690d4c769ac9212b8b68b3208cfba56cf43cec52a9184fd4596ba196cf4aa8cdad5365ea4600c5cc2789f9f79953b1955eb78b84f6dc78e2e3b7967ff2f8c5706e2041364b9e3948f487ca6cd6f6993eeffc3b50d9ee54a04b09507c29a9b926e24834cf430dc56f577f32e871dba7bfd57f25a3b8dd915289ab3efe6596868ba2222daa794019715cfef2271a0fca6f8de6ba8881ba1d1228c078ee4619fcc29598aa27038f99c81321381c6892ddb8fc1b7c71b1de5d057243eeb1649643c452b062bd94c71f26b8e7bea12b938a2458cadddc5af6f1210b7f71f1988412e0504c1f63bf20a84847da96a4241feee67784828bcd842bb3670f88bbe6f346a9b2dc59698407ee6ef70e35911f3c00f7826e323e7a46bd33acfb7b824c44185b6d973ca1c5b1686e9565121b0204b68b4491f652d0ac5331ed7ba76112728d559df60f2b57dad1b809001fec95bad2030f53396ccf1f4412aeb2339ab7e924002adfc8d377cc31c427b36fb083e0835de77a543839ec4f8dcb3cfa5943d8e22fd20440014ecf2c32b2f4bb8f854a6fb777b7927a337c73fa9fefe88147096cad0cb22995c98a8d19f8a033b8fe3c20f69963e3c935823f28394e21ee9f3471c9ff0894bc8ffc9a82ef8ef4bd3ad8436afb3768c6217bc10340ad04111601eaf4dc058ca44897e4d7f13a3ef56c1ca9119d5fd6f995ab5a6cb2d9a43cc8587506345ca2e2b24660833e01752f32420cdec108e8043dc533ea6cc5753071a25d34bf8bb2c503d711394810ecf63a100522914aa4faeab18ac471f8a70128bf07bb43da489649678bc92f02eda671351381590ae43b9e272148ef97e464c47929b303df67c56d1dc698e63149094118ad33bd753b6d6a3c41bab8596636062a3fc8d90c1b6bdafa03cdf6bb048d6222ea1fd5a1c8670eedfdb252dfd5b14315d0ed71ada4ffb4a691960c83bf31c762d4a5dbbf9f92bc9b1c2b575b9e2c1ff7a56a7f8a510394ae2cf7ee413590882813f5a01c20781d1f6339127ec6249075b5cac9c28b2675bc11a42fce0c0da704ffa24e4a63ef5adf17fc7d2eefbcece4a24f1a69f830e6fc0a5a2bbe95cf23cdab2992aca1ab2b8f6362c1fdce3b8f07c25044e5ceaa462cd12eead68b87b2cb5b5a673190cbe58bb4253b88ffb9301dca677f41b7a8bf16a7cad01920dfb2b869d90cec79c2ebe2fd4c8474ce0215aaf587ac415e40a07d1350935dd64c4c8e58dc7b33c9a2d6a41fca9f120db71a563ac00ff8367f39dc0a544882adc49ea070a47a0b93cc05e37c081862c071d15bfd73f31b7c2e0c55bcfb7874f533e7e71eccced539e0ea02f7d47dfe02bdf08161f5c5bc6d1ea84d00cc2cb493808bd74aae2018c0a39bc68acdf1a26a93f25588d44558f85d12a32bd130046bcb3d3cbed5c0abd855923f46d57ab040ba63af005a297be955ab44542cec41eb026b43a5e957c655519cd70854ef82555e89534d2a12b88b1a6d81d80a59da6ea98b7c9e684e87f311736a4babc19c8b7cbecee29bc870c9092bf600ef079a91d5891b229e0f6560704daa4c42e34052bd03969c38bc4ba0c3ca6eeba1086e72269e7d5f306e4ac11ef61f18709585e2e97a94c2ca24f4b0264b92efe5b2a395c33512692520c7648b1c78138cc958f2bba89ffb041f41ce3a534270c1d238fca4c46b2a602ec084ee7abcf36f96c5dc9a677cc4a9bd75c59cb7d24384a6219bd8c9ddce8904ef4baae91b7231916fffaa1f53c672c4f4ab979b58f95de7081de1ac28b44bad9ac2098a65f2c5fa1c798bf10236042c3298e6676a073148bf37d608f9f38b9ec6f321239495acb960f5ca1729b7c6829757418819e5b2fe96be6a88a0936b6d5e637eeb0b87d74792241cb461f78402bcf49a1b28c3a758eba2279f0a3c15054a1ede806e15a58cb6327a818268264ffbfd5a8594d29d5582366d8c9dc595a2974871258d2b30130fbb0038dc7a00d2ec9f7cc0d5286dc2fd39a50b65792044c6130c75576b9838d3760c8fe62cce46119b1420735816f663e6b5c30836a4fc7fbf6a7f2de79ffb8cc472a46b269fc23ac92ff96742c622bd7d06e183c24f0d43a49b8ea8fd85b4174844166fcfbeb49122e2ade8ad0428b3ab86006a1133f8616c7dd2bb647ae691d7decd99ce05a9b2c21514130582f6ddb08f53223e4f61371f68d1c9be93eaf9167cb9ef06ee2d2b8b0c74dbf30a06b40c5cdd982c21b82587066961ecbc18f13eb0568826270d992410ce29e5838b95132bb603f3ba946e1cd8d1e888daf1292266748ada8a83771e40fd4ef44373c69fc7f25336119ab53339f6d376aa7b95530c2bbedfab91fb0555b4c02203b2edd", + '2e8aa18217d0d64173ee2c897d7847adad903c4ef711ad9dd1b66071e346b4524f8f4c96bef3424b893b0d2e25d17028422d487a17cee645720b59bdae2c6c0f21d8e474d29aebd788194a339c015e87c7a02547d4664171e515a4f1bef80ae68ef606009f2205e87e00249468b8b121afa184630aa3c1c5a613adab62fa3c98e6e8b92642af9c9d4ff5cd5ceda4c062603fc4c255895e527fcfda7c89cdb2bc84e947ab89733bed2ab138f29bd7f3766f92e01e024c131ca8877a8fa18045ea6bedfb44cec03486067186ac5803c4c2a8eee9d926a51dc9d2ec2ec9e833d2e11bf9fa67f57760dd12ad40f5ca6a74bfd580bf42b84425efd3ba298dba5a50b6e262193604d94ca2baa8eeca55b0336e7392e4433871c83e16a7450b1d927043e4b6712e0b752a3eb8a402b10be0eba79adf1ca0a3495d3ae8edde25030ce4a4499754f23dc22690d4c769ac9212b8b68b3208cfba56cf43cec52a9184fd4596ba196cf4aa8cdad5365ea4600c5cc2789f9f79953b1955eb78b84f6dc78e2e3b7967ff2f8c5706e2041364b9e3948f487ca6cd6f6993eeffc3b50d9ee54a04b09507c29a9b926e24834cf430dc56f577f32e871dba7bfd57f25a3b8dd915289ab3efe6596868ba2222daa794019715cfef2271a0fca6f8de6ba8881ba1d1228c078ee4619fcc29598aa27038f99c81321381c6892ddb8fc1b7c71b1de5d057243eeb1649643c452b062bd94c71f26b8e7bea12b938a2458cadddc5af6f1210b7f71f1988412e0504c1f63bf20a84847da96a4241feee67784828bcd842bb3670f88bbe6f346a9b2dc59698407ee6ef70e35911f3c00f7826e323e7a46bd33acfb7b824c44185b6d973ca1c5b1686e9565121b0204b68b4491f652d0ac5331ed7ba76112728d559df60f2b57dad1b809001fec95bad2030f53396ccf1f4412aeb2339ab7e924002adfc8d377cc31c427b36fb083e0835de77a543839ec4f8dcb3cfa5943d8e22fd20440014ecf2c32b2f4bb8f854a6fb777b7927a337c73fa9fefe88147096cad0cb22995c98a8d19f8a033b8fe3c20f69963e3c935823f28394e21ee9f3471c9ff0894bc8ffc9a82ef8ef4bd3ad8436afb3768c6217bc10340ad04111601eaf4dc058ca44897e4d7f13a3ef56c1ca9119d5fd6f995ab5a6cb2d9a43cc8587506345ca2e2b24660833e01752f32420cdec108e8043dc533ea6cc5753071a25d34bf8bb2c503d711394810ecf63a100522914aa4faeab18ac471f8a70128bf07bb43da489649678bc92f02eda671351381590ae43b9e272148ef97e464c47929b303df67c56d1dc698e63149094118ad33bd753b6d6a3c41bab8596636062a3fc8d90c1b6bdafa03cdf6bb048d6222ea1fd5a1c8670eedfdb252dfd5b14315d0ed71ada4ffb4a691960c83bf31c762d4a5dbbf9f92bc9b1c2b575b9e2c1ff7a56a7f8a510394ae2cf7ee413590882813f5a01c20781d1f6339127ec6249075b5cac9c28b2675bc11a42fce0c0da704ffa24e4a63ef5adf17fc7d2eefbcece4a24f1a69f830e6fc0a5a2bbe95cf23cdab2992aca1ab2b8f6362c1fdce3b8f07c25044e5ceaa462cd12eead68b87b2cb5b5a673190cbe58bb4253b88ffb9301dca677f41b7a8bf16a7cad01920dfb2b869d90cec79c2ebe2fd4c8474ce0215aaf587ac415e40a07d1350935dd64c4c8e58dc7b33c9a2d6a41fca9f120db71a563ac00ff8367f39dc0a544882adc49ea070a47a0b93cc05e37c081862c071d15bfd73f31b7c2e0c55bcfb7874f533e7e71eccced539e0ea02f7d47dfe02bdf08161f5c5bc6d1ea84d00cc2cb493808bd74aae2018c0a39bc68acdf1a26a93f25588d44558f85d12a32bd130046bcb3d3cbed5c0abd855923f46d57ab040ba63af005a297be955ab44542cec41eb026b43a5e957c655519cd70854ef82555e89534d2a12b88b1a6d81d80a59da6ea98b7c9e684e87f311736a4babc19c8b7cbecee29bc870c9092bf600ef079a91d5891b229e0f6560704daa4c42e34052bd03969c38bc4ba0c3ca6eeba1086e72269e7d5f306e4ac11ef61f18709585e2e97a94c2ca24f4b0264b92efe5b2a395c33512692520c7648b1c78138cc958f2bba89ffb041f41ce3a534270c1d238fca4c46b2a602ec084ee7abcf36f96c5dc9a677cc4a9bd75c59cb7d24384a6219bd8c9ddce8904ef4baae91b7231916fffaa1f53c672c4f4ab979b58f95de7081de1ac28b44bad9ac2098a65f2c5fa1c798bf10236042c3298e6676a073148bf37d608f9f38b9ec6f321239495acb960f5ca1729b7c6829757418819e5b2fe96be6a88a0936b6d5e637eeb0b87d74792241cb461f78402bcf49a1b28c3a758eba2279f0a3c15054a1ede806e15a58cb6327a818268264ffbfd5a8594d29d5582366d8c9dc595a2974871258d2b30130fbb0038dc7a00d2ec9f7cc0d5286dc2fd39a50b65792044c6130c75576b9838d3760c8fe62cce46119b1420735816f663e6b5c30836a4fc7fbf6a7f2de79ffb8cc472a46b269fc23ac92ff96742c622bd7d06e183c24f0d43a49b8ea8fd85b4174844166fcfbeb49122e2ade8ad0428b3ab86006a1133f8616c7dd2bb647ae691d7decd99ce05a9b2c21514130582f6ddb08f53223e4f61371f68d1c9be93eaf9167cb9ef06ee2d2b8b0c74dbf30a06b40c5cdd982c21b82587066961ecbc18f13eb0568826270d992410ce29e5838b95132bb603f3ba946e1cd8d1e888daf1292266748ada8a83771e40fd4ef44373c69fc7f25336119ab53339f6d376aa7b95530c2bbedfab91fb0555b4c02203b2edd', sendApiKeyAsQueryParam: true, }; typesense = new TypesenseSearchClient(configuration); let apiCall = new ApiCall(typesense.configuration); let searches = { - searches: [{ q: "term1" }, { q: "term2" }], + searches: [{ q: 'term1' }, { q: 'term2' }], }; let commonParams = { - collection: "docs", - query_by: "field", + collection: 'docs', + query_by: 'field', }; mockAxios .onPost( - apiCall.uriFor("/multi_search", typesense.configuration.nodes[0]), + apiCall.uriFor('/multi_search', typesense.configuration.nodes[0]), searches, { - Accept: "application/json, text/plain, */*", - "Content-Type": "text/plain", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'text/plain', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) .reply((config) => { - expect(config.params["x-typesense-api-key"]).to.eq(undefined); - return [200, "{}", { "content-type": "application/json" }]; + expect(config.params['x-typesense-api-key']).to.eq(undefined); + return [200, '{}', { 'content-type': 'application/json' }]; }); let returnData = typesense.multiSearch.perform(searches, commonParams); expect(returnData).to.eventually.deep.equal({}).notify(done); }); - it("should programatically clear document cache", async function () { + it('should programatically clear document cache', async function () { let searchParameters = [ { - q: "Stark", - query_by: "company_name", + q: 'Stark', + query_by: 'company_name', }, ]; let stubbedSearchResults = [ @@ -114,13 +114,13 @@ describe("SearchClient", function () { hits: [ { _highlight: { - company_name: "Stark Industries", + company_name: 'Stark Industries', }, document: { - id: "124", - company_name: "Stark Industries", + id: '124', + company_name: 'Stark Industries', num_employees: 5215, - country: "USA", + country: 'USA', }, }, ], @@ -131,12 +131,12 @@ describe("SearchClient", function () { mockAxios .onGet( apiCall.uriFor( - "/collections/companies/documents/search", - typesense.configuration.nodes[0] - ) + '/collections/companies/documents/search', + typesense.configuration.nodes[0], + ), ) .reply(200, JSON.stringify(stubbedSearchResults[i]), { - "content-type": "application/json", + 'content-type': 'application/json', }); }); @@ -148,18 +148,18 @@ describe("SearchClient", function () { await documents.search(searchParameters[0]); // if 2 requests are made, then we know that cache was cleared successfully - expect(mockAxios.history["get"].length).to.equal(2); + expect(mockAxios.history['get'].length).to.equal(2); }); - it("should programatically clear multi_search cache", async function () { + it('should programatically clear multi_search cache', async function () { let searchRequests = [ { - searches: [{ q: "term1" }, { q: "term2" }], + searches: [{ q: 'term1' }, { q: 'term2' }], }, ]; let commonParams = [ { - collection: "docs", - query_by: "field", + collection: 'docs', + query_by: 'field', }, ]; let stubbedSearchResults = [{ results1: [] }, { results2: [] }]; @@ -167,14 +167,14 @@ describe("SearchClient", function () { searchRequests.forEach((_, i) => { mockAxios .onPost( - apiCall.uriFor("/multi_search", typesense.configuration.nodes[0]) + apiCall.uriFor('/multi_search', typesense.configuration.nodes[0]), ) // eslint-disable-next-line @typescript-eslint/no-unused-vars .reply((config) => { return [ 200, JSON.stringify(stubbedSearchResults[i]), - { "content-type": "application/json" }, + { 'content-type': 'application/json' }, ]; }); }); @@ -187,6 +187,6 @@ describe("SearchClient", function () { await typesense.multiSearch.perform(searchRequests[0], commonParams[0]); // if 2 requests are made, then we know that cache was cleared successfully - expect(mockAxios.history["post"].length).to.equal(2); + expect(mockAxios.history['post'].length).to.equal(2); }); }); diff --git a/test/Typesense/Stats.spec.js b/test/Typesense/Stats.spec.js index def1e5c1..48f51f89 100644 --- a/test/Typesense/Stats.spec.js +++ b/test/Typesense/Stats.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Stats", function () { +describe('Stats', function () { let mockAxios; let typesense; let apiCall; @@ -17,30 +17,30 @@ describe("Stats", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); apiCall = new ApiCall(typesense.configuration); }); - describe(".retrieve", function () { - it("retrieves stats", function (done) { + describe('.retrieve', function () { + it('retrieves stats', function (done) { mockAxios .onGet( - apiCall.uriFor("/stats.json", typesense.configuration.nodes[0]), + apiCall.uriFor('/stats.json', typesense.configuration.nodes[0]), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) - .reply(200, "{}", { "content-type": "application/json" }); + .reply(200, '{}', { 'content-type': 'application/json' }); let returnData = typesense.stats.retrieve(); diff --git a/test/Typesense/Stopword.spec.js b/test/Typesense/Stopword.spec.js index 230aeb8e..e807b412 100644 --- a/test/Typesense/Stopword.spec.js +++ b/test/Typesense/Stopword.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Stopword", function () { +describe('Stopword', function () { let typesense; let stopword; let apiCall; @@ -17,32 +17,32 @@ describe("Stopword", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); - stopword = typesense.stopwords("123"); + stopword = typesense.stopwords('123'); apiCall = new ApiCall(typesense.configuration); mockAxios = new MockAxiosAdapter(axios); }); - describe(".retrieve", function () { - it("retrieves the stopword", function (done) { + describe('.retrieve', function () { + it('retrieves the stopword', function (done) { mockAxios .onGet( - apiCall.uriFor("/stopwords/123", typesense.configuration.nodes[0]), + apiCall.uriFor('/stopwords/123', typesense.configuration.nodes[0]), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) - .reply(200, "{}", { "content-type": "application/json" }); + .reply(200, '{}', { 'content-type': 'application/json' }); // console.log(mockAxios.handlers) @@ -52,16 +52,16 @@ describe("Stopword", function () { }); }); - describe(".delete", function () { - it("deletes a stopword", function (done) { + describe('.delete', function () { + it('deletes a stopword', function (done) { mockAxios .onDelete( - apiCall.uriFor("/stopwords/123", typesense.configuration.nodes[0]), + apiCall.uriFor('/stopwords/123', typesense.configuration.nodes[0]), null, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) .reply(200, {}); diff --git a/test/Typesense/Stopwords.spec.js b/test/Typesense/Stopwords.spec.js index 2b58d1d5..bf835eeb 100644 --- a/test/Typesense/Stopwords.spec.js +++ b/test/Typesense/Stopwords.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Stopwords", function () { +describe('Stopwords', function () { let typesense; let stopwords; let apiCall; @@ -17,12 +17,12 @@ describe("Stopwords", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); stopwords = typesense.stopwords(); @@ -30,46 +30,46 @@ describe("Stopwords", function () { mockAxios = new MockAxiosAdapter(axios); }); - describe(".upsert", function () { - it("upserts a stopword", function (done) { + describe('.upsert', function () { + it('upserts a stopword', function (done) { mockAxios .onPut( apiCall.uriFor( - "/stopwords/stopword-1", + '/stopwords/stopword-1', typesense.configuration.nodes[0], ), { - stopwords: ["a", "the"], + stopwords: ['a', 'the'], }, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) - .reply(201, "{}", { "content-type": "application/json" }); + .reply(201, '{}', { 'content-type': 'application/json' }); - let returnData = stopwords.upsert("stopword-1", { - stopwords: ["a", "the"], + let returnData = stopwords.upsert('stopword-1', { + stopwords: ['a', 'the'], }); expect(returnData).to.eventually.deep.equal({}).notify(done); }); }); - describe(".retrieve", function () { - it("retrieves all stopwords", function (done) { + describe('.retrieve', function () { + it('retrieves all stopwords', function (done) { mockAxios .onGet( - apiCall.uriFor("/stopwords", typesense.configuration.nodes[0]), + apiCall.uriFor('/stopwords', typesense.configuration.nodes[0]), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, }, ) - .reply(200, "[]", { "content-type": "application/json" }); + .reply(200, '[]', { 'content-type': 'application/json' }); let returnData = stopwords.retrieve(); diff --git a/test/Typesense/Synonym.spec.js b/test/Typesense/Synonym.spec.js index 350bfdc7..2a46ab04 100644 --- a/test/Typesense/Synonym.spec.js +++ b/test/Typesense/Synonym.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Synonym", function () { +describe('Synonym', function () { let typesense; let synonym; let apiCall; @@ -18,58 +18,58 @@ describe("Synonym", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); - synonym = typesense.collections("companies").synonyms("synonym-set-1"); + synonym = typesense.collections('companies').synonyms('synonym-set-1'); apiCall = new ApiCall(typesense.configuration); mockAxios = new MockAxiosAdapter(axios); }); - describe(".retrieve", function () { - it("retreives the synonym with the given ID", function (done) { + describe('.retrieve', function () { + it('retreives the synonym with the given ID', function (done) { mockAxios .onGet( apiCall.uriFor( - "/collections/companies/synonyms/synonym-set-1", - typesense.configuration.nodes[0] + '/collections/companies/synonyms/synonym-set-1', + typesense.configuration.nodes[0], ), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(200, "{}", { "content-type": "application/json" }); + .reply(200, '{}', { 'content-type': 'application/json' }); let returnData = synonym.retrieve(); expect(returnData).to.eventually.deep.equal({}).notify(done); }); }); - describe(".delete", function () { - it("deletes the synonym with the given ID", function (done) { + describe('.delete', function () { + it('deletes the synonym with the given ID', function (done) { mockAxios .onDelete( apiCall.uriFor( - "/collections/companies/synonyms/synonym-set-1", - typesense.configuration.nodes[0] + '/collections/companies/synonyms/synonym-set-1', + typesense.configuration.nodes[0], ), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(200, "{}", { "content-type": "application/json" }); + .reply(200, '{}', { 'content-type': 'application/json' }); let returnData = synonym.delete(); diff --git a/test/Typesense/Synonyms.spec.js b/test/Typesense/Synonyms.spec.js index 89c7d665..60978072 100644 --- a/test/Typesense/Synonyms.spec.js +++ b/test/Typesense/Synonyms.spec.js @@ -1,14 +1,14 @@ -import chai from "chai"; -import chaiAsPromised from "chai-as-promised"; -import { Client as TypesenseClient } from "../../src/Typesense"; -import ApiCall from "../../src/Typesense/ApiCall"; -import axios from "axios"; -import MockAxiosAdapter from "axios-mock-adapter"; +import chai from 'chai'; +import chaiAsPromised from 'chai-as-promised'; +import { Client as TypesenseClient } from '../../src/Typesense'; +import ApiCall from '../../src/Typesense/ApiCall'; +import axios from 'axios'; +import MockAxiosAdapter from 'axios-mock-adapter'; let expect = chai.expect; chai.use(chaiAsPromised); -describe("Synonyms", function () { +describe('Synonyms', function () { let typesense; let synonyms; let synonym; @@ -19,58 +19,58 @@ describe("Synonyms", function () { typesense = new TypesenseClient({ nodes: [ { - host: "node0", - port: "8108", - protocol: "http", + host: 'node0', + port: '8108', + protocol: 'http', }, ], - apiKey: "abcd", + apiKey: 'abcd', randomizeNodes: false, }); - synonyms = typesense.collections("companies").synonyms(); + synonyms = typesense.collections('companies').synonyms(); apiCall = new ApiCall(typesense.configuration); mockAxios = new MockAxiosAdapter(axios); }); - describe(".create", function () { - it("creates the synonym in the collection", function (done) { + describe('.create', function () { + it('creates the synonym in the collection', function (done) { mockAxios .onPut( apiCall.uriFor( - "/collections/companies/synonyms/synonym-set-1", - typesense.configuration.nodes[0] + '/collections/companies/synonyms/synonym-set-1', + typesense.configuration.nodes[0], ), synonym, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(201, "{}", { "content-type": "application/json" }); + .reply(201, '{}', { 'content-type': 'application/json' }); - let returnData = synonyms.upsert("synonym-set-1", {}); + let returnData = synonyms.upsert('synonym-set-1', {}); expect(returnData).to.eventually.deep.equal({}).notify(done); }); }); - describe(".retrieve", function () { - it("retrieves all synonyms", function (done) { + describe('.retrieve', function () { + it('retrieves all synonyms', function (done) { mockAxios .onGet( apiCall.uriFor( - "/collections/companies/synonyms", - typesense.configuration.nodes[0] + '/collections/companies/synonyms', + typesense.configuration.nodes[0], ), undefined, { - Accept: "application/json, text/plain, */*", - "Content-Type": "application/json", - "X-TYPESENSE-API-KEY": typesense.configuration.apiKey, - } + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json', + 'X-TYPESENSE-API-KEY': typesense.configuration.apiKey, + }, ) - .reply(200, JSON.stringify([]), { "content-type": "application/json" }); + .reply(200, JSON.stringify([]), { 'content-type': 'application/json' }); let returnData = synonyms.retrieve();