diff --git a/.eslintrc.json b/.eslintrc.json index 4eb2ab3c..d6440b59 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -19,6 +19,10 @@ "promise", "standard" ], + "extends": [ + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended" + ], "globals": { "document": false, @@ -139,7 +143,7 @@ "no-use-before-define": ["error", { "functions": false, "classes": false, "variables": false }], "no-useless-call": "error", "no-useless-computed-key": "error", - "no-useless-constructor": "error", + "no-useless-constructor": "off", "no-useless-escape": "error", "no-useless-rename": "error", "no-useless-return": "error", @@ -180,6 +184,8 @@ "node/no-deprecated-api": "error", "node/process-exit-as-throw": "error", + "@typescript-eslint/consistent-type-imports": "error", + "promise/param-names": "error", diff --git a/dist/typesense.js b/dist/typesense.js index 68181334..461e997e 100644 --- a/dist/typesense.js +++ b/dist/typesense.js @@ -876,62 +876,7 @@ Cancel.prototype.__CANCEL__ = true; module.exports = Cancel; -},{}],28:[function(require,module,exports){ -'use strict'; - -var utils = require('./../utils'); - -// Headers whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -var ignoreDuplicateOf = [ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]; - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} headers Headers needing to be parsed - * @returns {Object} Headers parsed into an object - */ -module.exports = function parseHeaders(headers) { - var parsed = {}; - var key; - var val; - var i; - - if (!headers) { return parsed; } - - utils.forEach(headers.split('\n'), function parser(line) { - i = line.indexOf(':'); - key = utils.trim(line.substr(0, i)).toLowerCase(); - val = utils.trim(line.substr(i + 1)); - - if (key) { - if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { - return; - } - if (key === 'set-cookie') { - parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - } - }); - - return parsed; -}; - -},{"./../utils":31}],23:[function(require,module,exports){ +},{}],23:[function(require,module,exports){ 'use strict'; var utils = require('./../utils'); @@ -986,6 +931,61 @@ module.exports = ( })() ); +},{"./../utils":31}],28:[function(require,module,exports){ +'use strict'; + +var utils = require('./../utils'); + +// Headers whose duplicates are ignored by node +// c.f. https://nodejs.org/api/http.html#http_message_headers +var ignoreDuplicateOf = [ + 'age', 'authorization', 'content-length', 'content-type', 'etag', + 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', + 'last-modified', 'location', 'max-forwards', 'proxy-authorization', + 'referer', 'retry-after', 'user-agent' +]; + +/** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} headers Headers needing to be parsed + * @returns {Object} Headers parsed into an object + */ +module.exports = function parseHeaders(headers) { + var parsed = {}; + var key; + var val; + var i; + + if (!headers) { return parsed; } + + utils.forEach(headers.split('\n'), function parser(line) { + i = line.indexOf(':'); + key = utils.trim(line.substr(0, i)).toLowerCase(); + val = utils.trim(line.substr(i + 1)); + + if (key) { + if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { + return; + } + if (key === 'set-cookie') { + parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); + } else { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + } + }); + + return parsed; +}; + },{"./../utils":31}],26:[function(require,module,exports){ 'use strict'; @@ -1145,6 +1145,11 @@ module.exports = function isCancel(value) { return !!(value && value.__CANCEL__); }; +},{}],19:[function(require,module,exports){ +module.exports = { + "version": "0.26.0" +}; + },{}],29:[function(require,module,exports){ 'use strict'; @@ -1174,11 +1179,6 @@ module.exports = function spread(callback) { }; }; -},{}],19:[function(require,module,exports){ -module.exports = { - "version": "0.26.0" -}; - },{}],15:[function(require,module,exports){ 'use strict'; @@ -1795,23 +1795,7 @@ module.exports = function dispatchRequest(config) { }); }; -},{"../cancel/Cancel":6,"../cancel/isCancel":8,"../defaults":18,"./../utils":31,"./transformData":17}],22:[function(require,module,exports){ -'use strict'; - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * @returns {string} The combined URL - */ -module.exports = function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; -}; - -},{}],24:[function(require,module,exports){ +},{"../cancel/Cancel":6,"../cancel/isCancel":8,"../defaults":18,"./../utils":31,"./transformData":17}],24:[function(require,module,exports){ 'use strict'; /** @@ -1827,6 +1811,22 @@ module.exports = function isAbsoluteURL(url) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); }; +},{}],22:[function(require,module,exports){ +'use strict'; + +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * @returns {string} The combined URL + */ +module.exports = function combineURLs(baseURL, relativeURL) { + return relativeURL + ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') + : baseURL; +}; + },{}],14:[function(require,module,exports){ 'use strict'; @@ -4461,6 +4461,12 @@ var __importStar = void 0 && (void 0).__importStar || function (mod) { return result; }; +var __exportStar = void 0 && (void 0).__exportStar || function (m, exports) { + for (var p in m) { + if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); + } +}; + var __importDefault = void 0 && (void 0).__importDefault || function (mod) { return mod && mod.__esModule ? mod : { "default": mod @@ -4483,220 +4489,218 @@ exports.SearchClient = SearchClient_1["default"]; var Errors = __importStar(require("./Typesense/Errors")); exports.Errors = Errors; + +__exportStar(require("./Typesense/Documents"), exports); + +__exportStar(require("./Typesense/Collection"), exports); + +__exportStar(require("./Typesense/Collections"), exports); + +__exportStar(require("./Typesense/Configuration"), exports); + +__exportStar(require("./Typesense/MultiSearch"), exports); + +__exportStar(require("./Typesense/Synonym"), exports); + +__exportStar(require("./Typesense/Synonym"), exports); + exports["default"] = { Client: Client_1["default"], SearchClient: SearchClient_1["default"], Errors: Errors }; -},{"./Typesense/Client":42,"./Typesense/Errors":59,"./Typesense/SearchClient":69}],59:[function(require,module,exports){ +},{"./Typesense/Client":42,"./Typesense/Collection":43,"./Typesense/Collections":44,"./Typesense/Configuration":45,"./Typesense/Documents":48,"./Typesense/Errors":59,"./Typesense/MultiSearch":64,"./Typesense/SearchClient":69,"./Typesense/Synonym":72}],44:[function(require,module,exports){ "use strict"; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; +var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function (resolve) { + resolve(value); + }); + } -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0; + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } -var HTTPError_1 = __importDefault(require("./HTTPError")); + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } -exports.HTTPError = HTTPError_1["default"]; + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } -var MissingConfigurationError_1 = __importDefault(require("./MissingConfigurationError")); + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; -exports.MissingConfigurationError = MissingConfigurationError_1["default"]; +var __generator = void 0 && (void 0).__generator || function (thisArg, body) { + var _ = { + label: 0, + sent: function sent() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }, + f, + y, + t, + g; + return g = { + next: verb(0), + "throw": verb(1), + "return": verb(2) + }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { + return this; + }), g; -var ObjectAlreadyExists_1 = __importDefault(require("./ObjectAlreadyExists")); + function verb(n) { + return function (v) { + return step([n, v]); + }; + } -exports.ObjectAlreadyExists = ObjectAlreadyExists_1["default"]; + function step(op) { + if (f) throw new TypeError("Generator is already executing."); -var ObjectNotFound_1 = __importDefault(require("./ObjectNotFound")); + while (_) { + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; -exports.ObjectNotFound = ObjectNotFound_1["default"]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; -var ObjectUnprocessable_1 = __importDefault(require("./ObjectUnprocessable")); + case 4: + _.label++; + return { + value: op[1], + done: false + }; -exports.ObjectUnprocessable = ObjectUnprocessable_1["default"]; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; -var RequestMalformed_1 = __importDefault(require("./RequestMalformed")); + case 7: + op = _.ops.pop(); -exports.RequestMalformed = RequestMalformed_1["default"]; - -var RequestUnauthorized_1 = __importDefault(require("./RequestUnauthorized")); - -exports.RequestUnauthorized = RequestUnauthorized_1["default"]; - -var ServerError_1 = __importDefault(require("./ServerError")); - -exports.ServerError = ServerError_1["default"]; - -var ImportError_1 = __importDefault(require("./ImportError")); - -exports.ImportError = ImportError_1["default"]; - -var TypesenseError_1 = __importDefault(require("./TypesenseError")); - -exports.TypesenseError = TypesenseError_1["default"]; + _.trys.pop(); -},{"./HTTPError":49,"./ImportError":50,"./MissingConfigurationError":51,"./ObjectAlreadyExists":52,"./ObjectNotFound":53,"./ObjectUnprocessable":54,"./RequestMalformed":55,"./RequestUnauthorized":56,"./ServerError":57,"./TypesenseError":58}],69:[function(require,module,exports){ -"use strict"; + continue; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } -Object.defineProperty(exports, "__esModule", { - value: true -}); + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } -var Configuration_1 = __importDefault(require("./Configuration")); + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } -var ApiCall_1 = __importDefault(require("./ApiCall")); + if (t && _.label < t[2]) { + _.label = t[2]; -var MultiSearch_1 = __importDefault(require("./MultiSearch")); + _.ops.push(op); -var SearchOnlyCollection_1 = require("./SearchOnlyCollection"); + break; + } -var SearchClient = -/** @class */ -function () { - function SearchClient(options) { - var shouldSendApiKeyAsQueryParam = (options['apiKey'] || '').length < 2000; + if (t[2]) _.ops.pop(); - if (shouldSendApiKeyAsQueryParam) { - options['sendApiKeyAsQueryParam'] = true; - } + _.trys.pop(); - this.configuration = new Configuration_1["default"](options); - this.apiCall = new ApiCall_1["default"](this.configuration); - this.multiSearch = new MultiSearch_1["default"](this.apiCall, this.configuration, true); - this.individualCollections = {}; - } + continue; + } - 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.'); - } else { - if (this.individualCollections[collectionName] === undefined) { - this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration); + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; } - - return this.individualCollections[collectionName]; } - }; - - return SearchClient; -}(); - -exports["default"] = SearchClient; -},{"./ApiCall":41,"./Configuration":45,"./MultiSearch":64,"./SearchOnlyCollection":70}],42:[function(require,module,exports){ -"use strict"; - -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; + if (op[0] & 5) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: true + }; + } }; Object.defineProperty(exports, "__esModule", { value: true }); +var RESOURCEPATH = '/collections'; -var Configuration_1 = __importDefault(require("./Configuration")); - -var ApiCall_1 = __importDefault(require("./ApiCall")); - -var Collections_1 = __importDefault(require("./Collections")); - -var Collection_1 = __importDefault(require("./Collection")); - -var Aliases_1 = __importDefault(require("./Aliases")); - -var Alias_1 = __importDefault(require("./Alias")); - -var Keys_1 = __importDefault(require("./Keys")); - -var Key_1 = __importDefault(require("./Key")); - -var Debug_1 = __importDefault(require("./Debug")); - -var Metrics_1 = __importDefault(require("./Metrics")); - -var Health_1 = __importDefault(require("./Health")); - -var Operations_1 = __importDefault(require("./Operations")); - -var MultiSearch_1 = __importDefault(require("./MultiSearch")); - -var Client = +var Collections = /** @class */ function () { - function Client(options) { - this.configuration = new Configuration_1["default"](options); - this.apiCall = new ApiCall_1["default"](this.configuration); - this.debug = new Debug_1["default"](this.apiCall); - this.metrics = new Metrics_1["default"](this.apiCall); - this.health = new Health_1["default"](this.apiCall); - this.operations = new Operations_1["default"](this.apiCall); - this.multiSearch = new MultiSearch_1["default"](this.apiCall, this.configuration); - this._collections = new Collections_1["default"](this.apiCall); - this.individualCollections = {}; - this._aliases = new Aliases_1["default"](this.apiCall); - this.individualAliases = {}; - this._keys = new Keys_1["default"](this.apiCall); - this.individualKeys = {}; + function Collections(apiCall) { + this.apiCall = apiCall; } - Client.prototype.collections = function (collectionName) { - if (collectionName === undefined) { - return this._collections; - } else { - if (this.individualCollections[collectionName] === undefined) { - this.individualCollections[collectionName] = new Collection_1["default"](collectionName, this.apiCall, this.configuration); - } - - return this.individualCollections[collectionName]; - } - }; - - Client.prototype.aliases = function (aliasName) { - if (aliasName === undefined) { - return this._aliases; - } else { - if (this.individualAliases[aliasName] === undefined) { - this.individualAliases[aliasName] = new Alias_1["default"](aliasName, this.apiCall); - } - - return this.individualAliases[aliasName]; - } + Collections.prototype.create = function (schema) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 + /*return*/ + , this.apiCall.post(RESOURCEPATH, schema)]; + }); + }); }; - Client.prototype.keys = function (id) { - if (id === undefined) { - return this._keys; - } else { - if (this.individualKeys[id] === undefined) { - this.individualKeys[id] = new Key_1["default"](id, this.apiCall); - } - - return this.individualKeys[id]; - } + Collections.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 + /*return*/ + , this.apiCall.get(RESOURCEPATH)]; + }); + }); }; - return Client; + Object.defineProperty(Collections, "RESOURCEPATH", { + get: function get() { + return RESOURCEPATH; + }, + enumerable: false, + configurable: true + }); + return Collections; }(); -exports["default"] = Client; +exports["default"] = Collections; -},{"./Alias":39,"./Aliases":40,"./ApiCall":41,"./Collection":43,"./Collections":44,"./Configuration":45,"./Debug":46,"./Health":60,"./Key":61,"./Keys":62,"./Metrics":63,"./MultiSearch":64,"./Operations":65}],39:[function(require,module,exports){ +},{}],72:[function(require,module,exports){ "use strict"; var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { @@ -4852,17 +4856,20 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var Aliases_1 = __importDefault(require("./Aliases")); +var Collections_1 = __importDefault(require("./Collections")); -var Alias = +var Synonyms_1 = __importDefault(require("./Synonyms")); + +var Synonym = /** @class */ function () { - function Alias(name, apiCall) { - this.name = name; + function Synonym(collectionName, synonymId, apiCall) { + this.collectionName = collectionName; + this.synonymId = synonymId; this.apiCall = apiCall; } - Alias.prototype.retrieve = function () { + Synonym.prototype.retrieve = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 @@ -4872,7 +4879,7 @@ function () { }); }; - Alias.prototype["delete"] = function () { + Synonym.prototype["delete"] = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 @@ -4882,16 +4889,16 @@ function () { }); }; - Alias.prototype.endpointPath = function () { - return "".concat(Aliases_1["default"].RESOURCEPATH, "/").concat(this.name); + Synonym.prototype.endpointPath = function () { + return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Synonyms_1["default"].RESOURCEPATH, "/").concat(this.synonymId); }; - return Alias; + return Synonym; }(); -exports["default"] = Alias; +exports["default"] = Synonym; -},{"./Aliases":40}],40:[function(require,module,exports){ +},{"./Collections":44,"./Synonyms":73}],64:[function(require,module,exports){ "use strict"; var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { @@ -5037,203 +5044,231 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) { } }; +var __importDefault = void 0 && (void 0).__importDefault || function (mod) { + return mod && mod.__esModule ? mod : { + "default": mod + }; +}; + Object.defineProperty(exports, "__esModule", { value: true }); -var RESOURCEPATH = '/aliases'; -var Aliases = +var RequestWithCache_1 = __importDefault(require("./RequestWithCache")); + +var RESOURCEPATH = '/multi_search'; + +var MultiSearch = /** @class */ function () { - function Aliases(apiCall) { + function MultiSearch(apiCall, configuration, useTextContentType) { + if (useTextContentType === void 0) { + useTextContentType = false; + } + this.apiCall = apiCall; + this.configuration = configuration; + this.useTextContentType = useTextContentType; + this.requestWithCache = new RequestWithCache_1["default"](); } - Aliases.prototype.upsert = function (name, mapping) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.put(this.endpointPath(name), mapping)]; - }); - }); - }; + MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) { + if (commonParams === void 0) { + commonParams = {}; + } + + var _b = _a === void 0 ? {} : _a, + _c = _b.cacheSearchResultsForSeconds, + cacheSearchResultsForSeconds = _c === void 0 ? this.configuration.cacheSearchResultsForSeconds : _c; - Aliases.prototype.retrieve = function () { return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { + var additionalHeaders, additionalQueryParams, queryParams; + return __generator(this, function (_d) { + additionalHeaders = {}; + + if (this.useTextContentType) { + additionalHeaders['content-type'] = 'text/plain'; + } + + additionalQueryParams = {}; + + if (this.configuration.useServerSideSearchCache === true) { + additionalQueryParams['use_cache'] = true; + } + + queryParams = Object.assign({}, commonParams, additionalQueryParams); return [2 /*return*/ - , this.apiCall.get(RESOURCEPATH)]; + , this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { + cacheResponseForSeconds: cacheSearchResultsForSeconds + })]; }); }); }; - Aliases.prototype.endpointPath = function (aliasName) { - return "".concat(Aliases.RESOURCEPATH, "/").concat(aliasName); - }; - - Object.defineProperty(Aliases, "RESOURCEPATH", { - get: function get() { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return Aliases; + return MultiSearch; }(); -exports["default"] = Aliases; +exports["default"] = MultiSearch; -},{}],41:[function(require,module,exports){ +},{"./RequestWithCache":68}],45:[function(require,module,exports){ "use strict"; -var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); - -var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")); - -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } - - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } +var __createBinding = void 0 && (void 0).__createBinding || (Object.create ? function (o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { + enumerable: true, + get: function get() { + return m[k]; } - } + }; + } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } + Object.defineProperty(o, k2, desc); +} : function (o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +}); - step((generator = generator.apply(thisArg, _arguments || [])).next()); +var __setModuleDefault = void 0 && (void 0).__setModuleDefault || (Object.create ? function (o, v) { + Object.defineProperty(o, "default", { + enumerable: true, + value: v }); -}; - -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; +} : function (o, v) { + o["default"] = v; +}); - function verb(n) { - return function (v) { - return step([n, v]); - }; +var __importStar = void 0 && (void 0).__importStar || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) { + if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - - switch (op[0]) { - case 0: - case 1: - t = op; - break; + __setModuleDefault(result, mod); - case 4: - _.label++; - return { - value: op[1], - done: false - }; + return result; +}; - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; +Object.defineProperty(exports, "__esModule", { + value: true +}); - case 7: - op = _.ops.pop(); +var logger = __importStar(require("loglevel")); - _.trys.pop(); +var Errors_1 = require("./Errors"); - continue; +var Configuration = +/** @class */ +function () { + function Configuration(options) { + var _this = this; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } + this.nodes = options.nodes || []; + this.nodes = this.nodes.map(function (node) { + return _this.setDefaultPathInNode(node); + }).map(function (node) { + return _this.setDefaultPortInNode(node); + }); + this.nearestNode = options.nearestNode || null; + this.nearestNode = this.setDefaultPathInNode(this.nearestNode); + this.nearestNode = this.setDefaultPortInNode(this.nearestNode); + this.connectionTimeoutSeconds = options.connectionTimeoutSeconds || options.timeoutSeconds || 10; + this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 15; + this.numRetries = options.numRetries || this.nodes.length + (this.nearestNode == null ? 0 : 1) || 3; + this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1; + this.apiKey = options.apiKey; + this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam || false; + this.cacheSearchResultsForSeconds = options.cacheSearchResultsForSeconds || 0; // Disable client-side cache by default - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } + this.useServerSideSearchCache = options.useServerSideSearchCache || false; + this.logger = options.logger || logger; + this.logLevel = options.logLevel || 'warn'; + this.logger.setLevel(this.logLevel); + this.additionalHeaders = options.additionalHeaders; + this.showDeprecationWarnings(options); + this.validate(); + } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } + 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'); + } - if (t && _.label < t[2]) { - _.label = t[2]; + if (this.nearestNode != null && this.isNodeMissingAnyParameters(this.nearestNode)) { + throw new Errors_1.MissingConfigurationError('Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set'); + } - _.ops.push(op); + if (this.apiKey == null) { + throw new Errors_1.MissingConfigurationError('Ensure that apiKey is set'); + } - break; - } + return true; + }; - if (t[2]) _.ops.pop(); + Configuration.prototype.validateNodes = function () { + var _this = this; - _.trys.pop(); + return this.nodes.some(function (node) { + return _this.isNodeMissingAnyParameters(node); + }); + }; - continue; - } + Configuration.prototype.isNodeMissingAnyParameters = function (node) { + return !['protocol', 'host', 'port', 'path'].every(function (key) { + return node.hasOwnProperty(key); + }) && node.url == null; + }; - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } + Configuration.prototype.setDefaultPathInNode = function (node) { + if (node != null && !node.hasOwnProperty('path')) { + node.path = ''; } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; + return node; + }; + + Configuration.prototype.setDefaultPortInNode = function (node) { + if (node != null && !node.hasOwnProperty('port') && node.hasOwnProperty('protocol')) { + switch (node.protocol) { + case 'https': + node.port = 443; + break; + + case 'http': + node.port = 80; + break; + } + } + + return node; + }; + + Configuration.prototype.showDeprecationWarnings = function (options) { + if (options.timeoutSeconds) { + 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'); + } + + if (options.readReplicaNodes) { + this.logger.warn('Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12'); + } + }; + + return Configuration; +}(); + +exports["default"] = Configuration; + +},{"./Errors":59,"loglevel":36}],69:[function(require,module,exports){ +"use strict"; var __importDefault = void 0 && (void 0).__importDefault || function (mod) { return mod && mod.__esModule ? mod : { @@ -5245,547 +5280,883 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var axios_1 = __importDefault(require("axios")); +var Configuration_1 = __importDefault(require("./Configuration")); -var Errors_1 = require("./Errors"); +var ApiCall_1 = __importDefault(require("./ApiCall")); -var TypesenseError_1 = __importDefault(require("./Errors/TypesenseError")); +var MultiSearch_1 = __importDefault(require("./MultiSearch")); -var APIKEYHEADERNAME = 'X-TYPESENSE-API-KEY'; -var HEALTHY = true; -var UNHEALTHY = false; +var SearchOnlyCollection_1 = require("./SearchOnlyCollection"); -var ApiCall = +var SearchClient = /** @class */ function () { - function ApiCall(configuration) { - this.configuration = configuration; - this.apiKey = this.configuration.apiKey; - this.nodes = JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes + function SearchClient(options) { + var shouldSendApiKeyAsQueryParam = (options['apiKey'] || '').length < 2000; - this.nearestNode = JSON.parse(JSON.stringify(this.configuration.nearestNode)); - this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds; - this.healthcheckIntervalSeconds = this.configuration.healthcheckIntervalSeconds; - this.numRetriesPerRequest = this.configuration.numRetries; - this.retryIntervalSeconds = this.configuration.retryIntervalSeconds; - this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam; - this.additionalUserHeaders = this.configuration.additionalHeaders; - this.logger = this.configuration.logger; - this.initializeMetadataForNodes(); - this.currentNodeIndex = -1; + if (shouldSendApiKeyAsQueryParam) { + options['sendApiKeyAsQueryParam'] = true; + } + + this.configuration = new Configuration_1["default"](options); + this.apiCall = new ApiCall_1["default"](this.configuration); + this.multiSearch = new MultiSearch_1["default"](this.apiCall, this.configuration, true); + this.individualCollections = {}; } - ApiCall.prototype.get = function (endpoint, queryParameters, _a) { - if (queryParameters === void 0) { - queryParameters = {}; + 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.'); + } else { + if (this.individualCollections[collectionName] === undefined) { + this.individualCollections[collectionName] = new SearchOnlyCollection_1.SearchOnlyCollection(collectionName, this.apiCall, this.configuration); + } + + return this.individualCollections[collectionName]; } + }; - var _b = _a === void 0 ? {} : _a, - _c = _b.abortSignal, - abortSignal = _c === void 0 ? null : _c, - _d = _b.responseType, - responseType = _d === void 0 ? null : _d; + return SearchClient; +}(); - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_e) { - return [2 - /*return*/ - , this.performRequest('get', endpoint, { - queryParameters: queryParameters, - abortSignal: abortSignal, - responseType: responseType - })]; - }); - }); - }; +exports["default"] = SearchClient; - ApiCall.prototype["delete"] = function (endpoint, queryParameters) { - if (queryParameters === void 0) { - queryParameters = {}; - } +},{"./ApiCall":41,"./Configuration":45,"./MultiSearch":64,"./SearchOnlyCollection":70}],48:[function(require,module,exports){ +"use strict"; - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.performRequest('delete', endpoint, { - queryParameters: queryParameters - })]; - }); - }); +var __extends = void 0 && (void 0).__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; + + return _extendStatics(d, b); }; - ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) { - if (bodyParameters === void 0) { - bodyParameters = {}; - } + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - if (queryParameters === void 0) { - queryParameters = {}; - } + _extendStatics(d, b); - if (additionalHeaders === void 0) { - additionalHeaders = {}; + function __() { + this.constructor = d; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.performRequest('post', endpoint, { - queryParameters: queryParameters, - bodyParameters: bodyParameters, - additionalHeaders: additionalHeaders - })]; - }); - }); + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; +}(); - ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) { - if (bodyParameters === void 0) { - bodyParameters = {}; - } +var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function (resolve) { + resolve(value); + }); + } - if (queryParameters === void 0) { - queryParameters = {}; + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.performRequest('put', endpoint, { - queryParameters: queryParameters, - bodyParameters: bodyParameters - })]; - }); - }); - }; - - ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) { - if (bodyParameters === void 0) { - bodyParameters = {}; + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } } - if (queryParameters === void 0) { - queryParameters = {}; + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.performRequest('patch', endpoint, { - queryParameters: queryParameters, - bodyParameters: bodyParameters - })]; - }); - }); - }; + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; - ApiCall.prototype.performRequest = function (requestType, endpoint, _a) { - var _b, _c, _d; +var __generator = void 0 && (void 0).__generator || function (thisArg, body) { + var _ = { + label: 0, + sent: function sent() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }, + f, + y, + t, + g; + return g = { + next: verb(0), + "throw": verb(1), + "return": verb(2) + }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { + return this; + }), g; + + function verb(n) { + return function (v) { + return step([n, v]); + }; + } + + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + + while (_) { + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + + switch (op[0]) { + case 0: + case 1: + t = op; + break; + + case 4: + _.label++; + return { + value: op[1], + done: false + }; + + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + + case 7: + op = _.ops.pop(); + + _.trys.pop(); + + continue; + + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + + if (t && _.label < t[2]) { + _.label = t[2]; + + _.ops.push(op); + + break; + } + + if (t[2]) _.ops.pop(); + + _.trys.pop(); + + continue; + } + + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + } + + if (op[0] & 5) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: true + }; + } +}; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var Errors_1 = require("./Errors"); + +var SearchOnlyDocuments_1 = require("./SearchOnlyDocuments"); + +var Documents = +/** @class */ +function (_super) { + __extends(Documents, _super); + + function Documents(collectionName, apiCall, configuration) { + return _super.call(this, collectionName, apiCall, configuration) || this; + } + + Documents.prototype.create = function (document, options) { + if (options === void 0) { + options = {}; + } - var _e = _a.queryParameters, - queryParameters = _e === void 0 ? null : _e, - _f = _a.bodyParameters, - bodyParameters = _f === void 0 ? null : _f, - _g = _a.additionalHeaders, - additionalHeaders = _g === void 0 ? {} : _g, - _h = _a.abortSignal, - abortSignal = _h === void 0 ? null : _h, - _j = _a.responseType, - responseType = _j === void 0 ? null : _j; return __awaiter(this, void 0, void 0, function () { - var requestNumber, lastException, _loop_1, this_1, numTries, state_1; + return __generator(this, function (_a) { + if (!document) throw new Error('No document provided'); + return [2 + /*return*/ + , this.apiCall.post(this.endpointPath(), document, options)]; + }); + }); + }; - return __generator(this, function (_k) { - switch (_k.label) { + Documents.prototype.upsert = function (document, options) { + if (options === void 0) { + options = {}; + } + + return __awaiter(this, void 0, void 0, function () { + return __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' + }))]; + }); + }); + }; + + Documents.prototype.update = function (document, options) { + if (options === void 0) { + options = {}; + } + + return __awaiter(this, void 0, void 0, function () { + return __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: 'update' + }))]; + }); + }); + }; + + Documents.prototype["delete"] = function (idOrQuery) { + if (idOrQuery === void 0) { + idOrQuery = {}; + } + + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + if (typeof idOrQuery === 'string') { + return [2 + /*return*/ + , this.apiCall["delete"](this.endpointPath(idOrQuery), idOrQuery)]; + } else { + return [2 + /*return*/ + , this.apiCall["delete"](this.endpointPath(), idOrQuery)]; + } + + return [2 + /*return*/ + ]; + }); + }); + }; + + Documents.prototype.createMany = function (documents, options) { + if (options === void 0) { + options = {}; + } + + return __awaiter(this, void 0, void 0, function () { + return __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'); + return [2 + /*return*/ + , this["import"](documents, options)]; + }); + }); + }; + + Documents.prototype["import"] = function (documents, options) { + if (options === void 0) { + options = {}; + } + + return __awaiter(this, void 0, void 0, function () { + var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems; + return __generator(this, function (_a) { + switch (_a.label) { case 0: - this.configuration.validate(); - requestNumber = Date.now(); - this.logger.debug("Request #".concat(requestNumber, ": Performing ").concat(requestType.toUpperCase(), " request: ").concat(endpoint)); + if (Array.isArray(documents)) { + try { + documentsInJSONLFormat = documents.map(function (document) { + return JSON.stringify(document); + }).join('\n'); + } catch (error) { + // if rangeerror, throw custom error message + if (RangeError instanceof error && (error === null || error === void 0 ? void 0 : error.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 - _loop_1 = function _loop_1(numTries) { - var node, abortListener, requestOptions, cancelToken, source_1, response, error_1; - return __generator(this, function (_l) { - switch (_l.label) { - case 0: - 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.')) - }]; - } + throw new Error(error); + } + } else { + documentsInJSONLFormat = documents; + } - abortListener = void 0; - _l.label = 1; + return [4 + /*yield*/ + , this.apiCall.performRequest('post', this.endpointPath('import'), { + queryParameters: options, + bodyParameters: documentsInJSONLFormat, + additionalHeaders: { + 'Content-Type': 'text/plain' + } + })]; - case 1: - _l.trys.push([1, 3, 5, 6]); + case 1: + resultsInJSONLFormat = _a.sent(); - requestOptions = { - method: requestType, - url: this_1.uriFor(endpoint, node), - headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders), - timeout: this_1.connectionTimeoutSeconds * 1000, - maxContentLength: Infinity, - maxBodyLength: Infinity, - responseType: responseType, - validateStatus: function validateStatus(status) { - /* Override default validateStatus, which only considers 2xx a success. - In our case, if the server returns any HTTP code, we will handle it below. - We do this to be able to raise custom errors based on response code. - */ - return status > 0; - }, - transformResponse: [function (data, headers) { - var transformedData = data; + if (Array.isArray(documents)) { + resultsInJSONFormat = resultsInJSONLFormat.split('\n').map(function (r) { + return JSON.parse(r); + }); + failedItems = resultsInJSONFormat.filter(function (r) { + return r.success === false; + }); - if (headers !== undefined && typeof data === 'string' && headers['content-type'] && headers['content-type'].startsWith('application/json')) { - transformedData = JSON.parse(data); - } + if (failedItems.length > 0) { + throw new Errors_1.ImportError("".concat(resultsInJSONFormat.length - failedItems.length, " documents imported successfully, ").concat(failedItems.length, " documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."), resultsInJSONFormat); + } else { + return [2 + /*return*/ + , resultsInJSONFormat]; + } + } else { + return [2 + /*return*/ + , resultsInJSONLFormat]; + } - return transformedData; - }] - }; + return [2 + /*return*/ + ]; + } + }); + }); + }; + /** + * Returns a JSONL string for all the documents in this collection + */ - if (queryParameters && Object.keys(queryParameters).length !== 0) { - requestOptions.params = queryParameters; - } - if (this_1.sendApiKeyAsQueryParam) { - requestOptions.params = requestOptions.params || {}; - requestOptions.params['x-typesense-api-key'] = this_1.apiKey; - } + Documents.prototype["export"] = function (options) { + if (options === void 0) { + options = {}; + } - if (bodyParameters && (typeof bodyParameters === 'string' && bodyParameters.length !== 0 || (0, _typeof2["default"])(bodyParameters) === 'object' && Object.keys(bodyParameters).length !== 0)) { - requestOptions.data = bodyParameters; - } // Translate from user-provided AbortController to the Axios request cancel mechanism. + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 + /*return*/ + , this.apiCall.get(this.endpointPath('export'), options)]; + }); + }); + }; + /** + * Returns a NodeJS readable stream of JSONL for all the documents in this collection. + */ - if (abortSignal) { - cancelToken = axios_1["default"].CancelToken; - source_1 = cancelToken.source(); + Documents.prototype.exportStream = function (options) { + if (options === void 0) { + options = {}; + } - abortListener = function abortListener() { - return source_1.cancel(); - }; + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 + /*return*/ + , this.apiCall.get(this.endpointPath('export'), options, { + responseType: 'stream' + })]; + }); + }); + }; - abortSignal.addEventListener('abort', abortListener); - requestOptions.cancelToken = source_1.token; - } + return Documents; +}(SearchOnlyDocuments_1.SearchOnlyDocuments); - return [4 - /*yield*/ - , (0, axios_1["default"])(requestOptions)]; +exports["default"] = Documents; - case 2: - response = _l.sent(); +},{"./Errors":59,"./SearchOnlyDocuments":71}],43:[function(require,module,exports){ +"use strict"; + +var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function (resolve) { + resolve(value); + }); + } + + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + + function step(result) { + result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + } + + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; + +var __generator = void 0 && (void 0).__generator || function (thisArg, body) { + var _ = { + label: 0, + sent: function sent() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [] + }, + f, + y, + t, + g; + return g = { + next: verb(0), + "throw": verb(1), + "return": verb(2) + }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { + return this; + }), g; + + function verb(n) { + return function (v) { + return step([n, v]); + }; + } + + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + + while (_) { + try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + + switch (op[0]) { + case 0: + case 1: + t = op; + break; + + case 4: + _.label++; + return { + value: op[1], + done: false + }; + + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + + case 7: + op = _.ops.pop(); + + _.trys.pop(); + + continue; + + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _ = 0; + continue; + } + + if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { + _.label = op[1]; + break; + } + + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + + if (t && _.label < t[2]) { + _.label = t[2]; + + _.ops.push(op); + + break; + } + + if (t[2]) _.ops.pop(); + + _.trys.pop(); + + continue; + } + + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + } + + if (op[0] & 5) throw op[1]; + return { + value: op[0] ? op[1] : void 0, + done: true + }; + } +}; + +var __importDefault = void 0 && (void 0).__importDefault || function (mod) { + return mod && mod.__esModule ? mod : { + "default": mod + }; +}; - if (response.status >= 1 && response.status <= 499) { - // Treat any status code > 0 and < 500 to be an indication that node is healthy - // We exclude 0 since some clients return 0 when request fails - this_1.setNodeHealthcheck(node, HEALTHY); - } +Object.defineProperty(exports, "__esModule", { + value: true +}); - this_1.logger.debug("Request #".concat(requestNumber, ": Request to Node ").concat(node.index, " was made. Response Code was ").concat(response.status, ".")); +var Collections_1 = __importDefault(require("./Collections")); - if (response.status >= 200 && response.status < 300) { - return [2 - /*return*/ - , { - value: Promise.resolve(response.data) - }]; - } else if (response.status < 500) { - return [2 - /*return*/ - , { - value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) - }]; - } else { - // Retry all other HTTP errors (HTTPStatus > 500) - // This will get caught by the catch block below - throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message); - } +var Documents_1 = __importDefault(require("./Documents")); - return [3 - /*break*/ - , 6]; +var Errors_1 = require("./Errors"); - case 3: - error_1 = _l.sent(); // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts +var Overrides_1 = __importDefault(require("./Overrides")); - 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), "\"")); // this.logger.debug(error.stack) +var Override_1 = __importDefault(require("./Override")); - 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)]; +var Synonyms_1 = __importDefault(require("./Synonyms")); - case 4: - _l.sent(); +var Synonym_1 = __importDefault(require("./Synonym")); - return [3 - /*break*/ - , 6]; +var Document_1 = require("./Document"); - case 5: - if (abortSignal && abortListener) { - abortSignal.removeEventListener('abort', abortListener); - } +var Collection = +/** @class */ +function () { + function Collection(name, apiCall, configuration) { + this.name = name; + this.apiCall = apiCall; + this.configuration = configuration; + this.individualDocuments = {}; + this.individualOverrides = {}; + this.individualSynonyms = {}; + this.name = name; + this.apiCall = apiCall; + this.configuration = configuration; + this._documents = new Documents_1["default"](this.name, this.apiCall, this.configuration); + this._overrides = new Overrides_1["default"](this.name, this.apiCall); + this._synonyms = new Synonyms_1["default"](this.name, this.apiCall); + } - return [7 - /*endfinally*/ - ]; + Collection.prototype.retrieve = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 + /*return*/ + , this.apiCall.get(this.endpointPath())]; + }); + }); + }; - case 6: - return [2 - /*return*/ - ]; - } - }); - }; + Collection.prototype["delete"] = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 + /*return*/ + , this.apiCall["delete"](this.endpointPath())]; + }); + }); + }; - this_1 = this; - numTries = 1; - _k.label = 1; + Collection.prototype.exists = function () { + return __awaiter(this, void 0, void 0, function () { + var e_1; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + _a.trys.push([0, 2,, 3]); + + return [4 + /*yield*/ + , this.retrieve()]; case 1: - if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 - /*break*/ - , 4]; - return [5 - /*yield**/ - , _loop_1(numTries)]; + _a.sent(); + + return [2 + /*return*/ + , true]; case 2: - state_1 = _k.sent(); - if ((0, _typeof2["default"])(state_1) === "object") return [2 + e_1 = _a.sent(); + if (e_1 instanceof Errors_1.ObjectNotFound) return [2 /*return*/ - , state_1.value]; - _k.label = 3; + , false]; + throw e_1; case 3: - numTries++; - return [3 - /*break*/ - , 1]; - - case 4: - this.logger.debug("Request #".concat(requestNumber, ": No retries left. Raising last error")); return [2 /*return*/ - , Promise.reject(lastException)]; + ]; } }); }); - }; // Attempts to find the next healthy node, looping through the list of nodes once. - // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy - // so we can try the request for good measure, in case that node has become healthy since + }; + Collection.prototype.documents = function (documentId) { + if (!documentId) { + return this._documents; + } else { + if (this.individualDocuments[documentId] === undefined) { + this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall); + } - ApiCall.prototype.getNextNode = function (requestNumber) { - if (requestNumber === void 0) { - requestNumber = 0; - } // Check if nearestNode is set and is healthy, if so return it + return this.individualDocuments[documentId]; + } + }; + Collection.prototype.overrides = function (overrideId) { + if (overrideId === undefined) { + return this._overrides; + } else { + if (this.individualOverrides[overrideId] === undefined) { + this.individualOverrides[overrideId] = new Override_1["default"](this.name, overrideId, this.apiCall); + } - 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')); + return this.individualOverrides[overrideId]; + } + }; - 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; + Collection.prototype.synonyms = function (synonymId) { + if (synonymId === undefined) { + return this._synonyms; + } else { + if (this.individualSynonyms[synonymId] === undefined) { + this.individualSynonyms[synonymId] = new Synonym_1["default"](this.name, synonymId, this.apiCall); } - this.logger.debug("Request #".concat(requestNumber, ": Falling back to individual nodes")); - } // Fallback to nodes as usual - + return this.individualSynonyms[synonymId]; + } + }; - 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(' || '))); - var candidateNode; + Collection.prototype.endpointPath = function () { + return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.name); + }; - for (var i = 0; i <= this.nodes.length; i++) { - this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length; - candidateNode = this.nodes[this.currentNodeIndex]; + return Collection; +}(); - if (candidateNode.isHealthy === true || this.nodeDueForHealthcheck(candidateNode, requestNumber)) { - this.logger.debug("Request #".concat(requestNumber, ": Updated current node to Node ").concat(candidateNode.index)); - return candidateNode; - } - } // None of the nodes are marked healthy, but some of them could have become healthy since last health check. - // So we will just return the next node. +exports["default"] = Collection; +},{"./Collections":44,"./Document":47,"./Documents":48,"./Errors":59,"./Override":66,"./Overrides":67,"./Synonym":72,"./Synonyms":73}],59:[function(require,module,exports){ +"use strict"; - this.logger.debug("Request #".concat(requestNumber, ": No healthy nodes were found. Returning the next node, Node ").concat(candidateNode.index)); - return candidateNode; +var __importDefault = void 0 && (void 0).__importDefault || function (mod) { + return mod && mod.__esModule ? mod : { + "default": mod }; +}; - ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) { - if (requestNumber === void 0) { - requestNumber = 0; - } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ImportError = exports.TypesenseError = exports.ServerError = exports.RequestUnauthorized = exports.RequestMalformed = exports.ObjectUnprocessable = exports.ObjectNotFound = exports.ObjectAlreadyExists = exports.MissingConfigurationError = exports.HTTPError = void 0; - var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp > this.healthcheckIntervalSeconds * 1000; +var HTTPError_1 = __importDefault(require("./HTTPError")); - if (isDueForHealthcheck) { - this.logger.debug("Request #".concat(requestNumber, ": Node ").concat(node.index, " has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds, ". Adding it back into rotation.")); - } +exports.HTTPError = HTTPError_1["default"]; - return isDueForHealthcheck; - }; +var MissingConfigurationError_1 = __importDefault(require("./MissingConfigurationError")); - ApiCall.prototype.initializeMetadataForNodes = function () { - var _this = this; +exports.MissingConfigurationError = MissingConfigurationError_1["default"]; - if (this.nearestNode != null) { - this.nearestNode.index = 'nearestNode'; - this.setNodeHealthcheck(this.nearestNode, HEALTHY); - } +var ObjectAlreadyExists_1 = __importDefault(require("./ObjectAlreadyExists")); + +exports.ObjectAlreadyExists = ObjectAlreadyExists_1["default"]; + +var ObjectNotFound_1 = __importDefault(require("./ObjectNotFound")); + +exports.ObjectNotFound = ObjectNotFound_1["default"]; + +var ObjectUnprocessable_1 = __importDefault(require("./ObjectUnprocessable")); + +exports.ObjectUnprocessable = ObjectUnprocessable_1["default"]; + +var RequestMalformed_1 = __importDefault(require("./RequestMalformed")); + +exports.RequestMalformed = RequestMalformed_1["default"]; + +var RequestUnauthorized_1 = __importDefault(require("./RequestUnauthorized")); + +exports.RequestUnauthorized = RequestUnauthorized_1["default"]; - this.nodes.forEach(function (node, i) { - node.index = i; +var ServerError_1 = __importDefault(require("./ServerError")); - _this.setNodeHealthcheck(node, HEALTHY); - }); - }; +exports.ServerError = ServerError_1["default"]; - ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) { - node.isHealthy = isHealthy; - node.lastAccessTimestamp = Date.now(); - }; +var ImportError_1 = __importDefault(require("./ImportError")); - ApiCall.prototype.uriFor = function (endpoint, node) { - if (node.url != null) { - return "".concat(node.url).concat(endpoint); - } +exports.ImportError = ImportError_1["default"]; - return "".concat(node.protocol, "://").concat(node.host, ":").concat(node.port).concat(node.path).concat(endpoint); - }; +var TypesenseError_1 = __importDefault(require("./TypesenseError")); - ApiCall.prototype.defaultHeaders = function () { - var defaultHeaders = {}; +exports.TypesenseError = TypesenseError_1["default"]; - if (!this.sendApiKeyAsQueryParam) { - defaultHeaders[APIKEYHEADERNAME] = this.apiKey; - } +},{"./HTTPError":49,"./ImportError":50,"./MissingConfigurationError":51,"./ObjectAlreadyExists":52,"./ObjectNotFound":53,"./ObjectUnprocessable":54,"./RequestMalformed":55,"./RequestUnauthorized":56,"./ServerError":57,"./TypesenseError":58}],42:[function(require,module,exports){ +"use strict"; - defaultHeaders['Content-Type'] = 'application/json'; - return defaultHeaders; +var __importDefault = void 0 && (void 0).__importDefault || function (mod) { + return mod && mod.__esModule ? mod : { + "default": mod }; +}; - ApiCall.prototype.timer = function (seconds) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , new Promise(function (resolve) { - return setTimeout(resolve, seconds * 1000); - })]; - }); - }); - }; +Object.defineProperty(exports, "__esModule", { + value: true +}); - ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) { - var errorMessage = "Request failed with HTTP code ".concat(response.status); +var Configuration_1 = __importDefault(require("./Configuration")); - if (typeof messageFromServer === 'string' && messageFromServer.trim() !== '') { - errorMessage += " | Server said: ".concat(messageFromServer); - } +var ApiCall_1 = __importDefault(require("./ApiCall")); - var error = new TypesenseError_1["default"](errorMessage); +var Collections_1 = __importDefault(require("./Collections")); - if (response.status === 400) { - error = new Errors_1.RequestMalformed(errorMessage); - } else if (response.status === 401) { - error = new Errors_1.RequestUnauthorized(errorMessage); - } else if (response.status === 404) { - error = new Errors_1.ObjectNotFound(errorMessage); - } else if (response.status === 409) { - error = new Errors_1.ObjectAlreadyExists(errorMessage); - } else if (response.status === 422) { - error = new Errors_1.ObjectUnprocessable(errorMessage); - } else if (response.status >= 500 && response.status <= 599) { - error = new Errors_1.ServerError(errorMessage); - } else { - error = new Errors_1.HTTPError(errorMessage); - } +var Collection_1 = __importDefault(require("./Collection")); - error.httpStatus = response.status; - return error; - }; +var Aliases_1 = __importDefault(require("./Aliases")); - return ApiCall; -}(); +var Alias_1 = __importDefault(require("./Alias")); -exports["default"] = ApiCall; +var Keys_1 = __importDefault(require("./Keys")); -},{"./Errors":59,"./Errors/TypesenseError":58,"@babel/runtime/helpers/interopRequireDefault":1,"@babel/runtime/helpers/typeof":2,"axios":3}],58:[function(require,module,exports){ -"use strict"; +var Key_1 = __importDefault(require("./Key")); -var __extends = void 0 && (void 0).__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; +var Debug_1 = __importDefault(require("./Debug")); - return _extendStatics(d, b); - }; +var Metrics_1 = __importDefault(require("./Metrics")); - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); +var Health_1 = __importDefault(require("./Health")); - _extendStatics(d, b); +var Operations_1 = __importDefault(require("./Operations")); - function __() { - this.constructor = d; - } +var MultiSearch_1 = __importDefault(require("./MultiSearch")); - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); +var Client = +/** @class */ +function () { + function Client(options) { + this.configuration = new Configuration_1["default"](options); + this.apiCall = new ApiCall_1["default"](this.configuration); + this.debug = new Debug_1["default"](this.apiCall); + this.metrics = new Metrics_1["default"](this.apiCall); + this.health = new Health_1["default"](this.apiCall); + this.operations = new Operations_1["default"](this.apiCall); + this.multiSearch = new MultiSearch_1["default"](this.apiCall, this.configuration); + this._collections = new Collections_1["default"](this.apiCall); + this.individualCollections = {}; + this._aliases = new Aliases_1["default"](this.apiCall); + this.individualAliases = {}; + this._keys = new Keys_1["default"](this.apiCall); + this.individualKeys = {}; + } -Object.defineProperty(exports, "__esModule", { - value: true -}); + Client.prototype.collections = function (collectionName) { + if (collectionName === undefined) { + return this._collections; + } else { + if (this.individualCollections[collectionName] === undefined) { + this.individualCollections[collectionName] = new Collection_1["default"](collectionName, this.apiCall, this.configuration); + } -var TypesenseError = -/** @class */ -function (_super) { - __extends(TypesenseError, _super); // Source: https://stackoverflow.com/a/58417721/123545 + return this.individualCollections[collectionName]; + } + }; + Client.prototype.aliases = function (aliasName) { + if (aliasName === undefined) { + return this._aliases; + } else { + if (this.individualAliases[aliasName] === undefined) { + this.individualAliases[aliasName] = new Alias_1["default"](aliasName, this.apiCall); + } - function TypesenseError(message) { - var _newTarget = this.constructor; + return this.individualAliases[aliasName]; + } + }; - var _this = _super.call(this, message) || this; + Client.prototype.keys = function (id) { + if (id === undefined) { + return this._keys; + } else { + if (this.individualKeys[id] === undefined) { + this.individualKeys[id] = new Key_1["default"](id, this.apiCall); + } - _this.name = _newTarget.name; - Object.setPrototypeOf(_this, _newTarget.prototype); - return _this; - } + return this.individualKeys[id]; + } + }; - return TypesenseError; -}(Error); + return Client; +}(); -exports["default"] = TypesenseError; +exports["default"] = Client; -},{}],44:[function(require,module,exports){ +},{"./Alias":39,"./Aliases":40,"./ApiCall":41,"./Collection":43,"./Collections":44,"./Configuration":45,"./Debug":46,"./Health":60,"./Key":61,"./Keys":62,"./Metrics":63,"./MultiSearch":64,"./Operations":65}],39:[function(require,module,exports){ "use strict"; var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { @@ -5931,51 +6302,56 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) { } }; +var __importDefault = void 0 && (void 0).__importDefault || function (mod) { + return mod && mod.__esModule ? mod : { + "default": mod + }; +}; + Object.defineProperty(exports, "__esModule", { value: true }); -var RESOURCEPATH = '/collections'; -var Collections = +var Aliases_1 = __importDefault(require("./Aliases")); + +var Alias = /** @class */ function () { - function Collections(apiCall) { + function Alias(name, apiCall) { + this.name = name; this.apiCall = apiCall; } - Collections.prototype.create = function (schema) { + Alias.prototype.retrieve = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/ - , this.apiCall.post(RESOURCEPATH, schema)]; + , this.apiCall.get(this.endpointPath())]; }); }); }; - Collections.prototype.retrieve = function () { + Alias.prototype["delete"] = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/ - , this.apiCall.get(RESOURCEPATH)]; + , this.apiCall["delete"](this.endpointPath())]; }); }); }; - Object.defineProperty(Collections, "RESOURCEPATH", { - get: function get() { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return Collections; + Alias.prototype.endpointPath = function () { + return "".concat(Aliases_1["default"].RESOURCEPATH, "/").concat(this.name); + }; + + return Alias; }(); -exports["default"] = Collections; +exports["default"] = Alias; -},{}],46:[function(require,module,exports){ +},{"./Aliases":40}],40:[function(require,module,exports){ "use strict"; var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { @@ -6124,16 +6500,26 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) { Object.defineProperty(exports, "__esModule", { value: true }); -var RESOURCEPATH = '/debug'; +var RESOURCEPATH = '/aliases'; -var Debug = +var Aliases = /** @class */ function () { - function Debug(apiCall) { + function Aliases(apiCall) { this.apiCall = apiCall; } - Debug.prototype.retrieve = function () { + Aliases.prototype.upsert = function (name, mapping) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 + /*return*/ + , this.apiCall.put(this.endpointPath(name), mapping)]; + }); + }); + }; + + Aliases.prototype.retrieve = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 @@ -6143,14 +6529,29 @@ function () { }); }; - return Debug; + Aliases.prototype.endpointPath = function (aliasName) { + return "".concat(Aliases.RESOURCEPATH, "/").concat(aliasName); + }; + + Object.defineProperty(Aliases, "RESOURCEPATH", { + get: function get() { + return RESOURCEPATH; + }, + enumerable: false, + configurable: true + }); + return Aliases; }(); -exports["default"] = Debug; +exports["default"] = Aliases; -},{}],60:[function(require,module,exports){ +},{}],41:[function(require,module,exports){ "use strict"; +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")); + var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { @@ -6294,384 +6695,557 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) { } }; +var __importDefault = void 0 && (void 0).__importDefault || function (mod) { + return mod && mod.__esModule ? mod : { + "default": mod + }; +}; + Object.defineProperty(exports, "__esModule", { value: true }); -var RESOURCEPATH = '/health'; -var Health = +var axios_1 = __importDefault(require("axios")); + +var Errors_1 = require("./Errors"); + +var TypesenseError_1 = __importDefault(require("./Errors/TypesenseError")); + +var APIKEYHEADERNAME = 'X-TYPESENSE-API-KEY'; +var HEALTHY = true; +var UNHEALTHY = false; + +var ApiCall = /** @class */ function () { - function Health(apiCall) { - this.apiCall = apiCall; + function ApiCall(configuration) { + this.configuration = configuration; + this.apiKey = this.configuration.apiKey; + this.nodes = JSON.parse(JSON.stringify(this.configuration.nodes)); // Make a copy, since we'll be adding additional metadata to the nodes + + this.nearestNode = JSON.parse(JSON.stringify(this.configuration.nearestNode)); + this.connectionTimeoutSeconds = this.configuration.connectionTimeoutSeconds; + this.healthcheckIntervalSeconds = this.configuration.healthcheckIntervalSeconds; + this.numRetriesPerRequest = this.configuration.numRetries; + this.retryIntervalSeconds = this.configuration.retryIntervalSeconds; + this.sendApiKeyAsQueryParam = this.configuration.sendApiKeyAsQueryParam; + this.additionalUserHeaders = this.configuration.additionalHeaders; + this.logger = this.configuration.logger; + this.initializeMetadataForNodes(); + this.currentNodeIndex = -1; } - Health.prototype.retrieve = function () { + ApiCall.prototype.get = function (endpoint, queryParameters, _a) { + if (queryParameters === void 0) { + queryParameters = {}; + } + + var _b = _a === void 0 ? {} : _a, + _c = _b.abortSignal, + abortSignal = _c === void 0 ? null : _c, + _d = _b.responseType, + responseType = _d === void 0 ? null : _d; + + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_e) { + return [2 + /*return*/ + , this.performRequest('get', endpoint, { + queryParameters: queryParameters, + abortSignal: abortSignal, + responseType: responseType + })]; + }); + }); + }; + + ApiCall.prototype["delete"] = function (endpoint, queryParameters) { + if (queryParameters === void 0) { + queryParameters = {}; + } + return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/ - , this.apiCall.get(RESOURCEPATH)]; + , this.performRequest('delete', endpoint, { + queryParameters: queryParameters + })]; }); }); }; - return Health; -}(); + ApiCall.prototype.post = function (endpoint, bodyParameters, queryParameters, additionalHeaders) { + if (bodyParameters === void 0) { + bodyParameters = {}; + } -exports["default"] = Health; + if (queryParameters === void 0) { + queryParameters = {}; + } -},{}],63:[function(require,module,exports){ -"use strict"; + if (additionalHeaders === void 0) { + additionalHeaders = {}; + } -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 + /*return*/ + , this.performRequest('post', endpoint, { + queryParameters: queryParameters, + bodyParameters: bodyParameters, + additionalHeaders: additionalHeaders + })]; + }); }); - } + }; - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } + ApiCall.prototype.put = function (endpoint, bodyParameters, queryParameters) { + if (bodyParameters === void 0) { + bodyParameters = {}; } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } + if (queryParameters === void 0) { + queryParameters = {}; } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 + /*return*/ + , this.performRequest('put', endpoint, { + queryParameters: queryParameters, + bodyParameters: bodyParameters + })]; + }); + }); + }; + + ApiCall.prototype.patch = function (endpoint, bodyParameters, queryParameters) { + if (bodyParameters === void 0) { + bodyParameters = {}; } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; + if (queryParameters === void 0) { + queryParameters = {}; + } -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 + /*return*/ + , this.performRequest('patch', endpoint, { + queryParameters: queryParameters, + bodyParameters: bodyParameters + })]; + }); + }); + }; + + ApiCall.prototype.performRequest = function (requestType, endpoint, _a) { + var _b, _c, _d; + + var _e = _a.queryParameters, + queryParameters = _e === void 0 ? null : _e, + _f = _a.bodyParameters, + bodyParameters = _f === void 0 ? null : _f, + _g = _a.additionalHeaders, + additionalHeaders = _g === void 0 ? {} : _g, + _h = _a.abortSignal, + abortSignal = _h === void 0 ? null : _h, + _j = _a.responseType, + responseType = _j === void 0 ? null : _j; + return __awaiter(this, void 0, void 0, function () { + var requestNumber, lastException, _loop_1, this_1, numTries, state_1; + + return __generator(this, function (_k) { + switch (_k.label) { + case 0: + this.configuration.validate(); + requestNumber = Date.now(); + this.logger.debug("Request #".concat(requestNumber, ": Performing ").concat(requestType.toUpperCase(), " request: ").concat(endpoint)); + + _loop_1 = function _loop_1(numTries) { + var node, abortListener, requestOptions, cancelToken, source_1, response, error_1; + return __generator(this, function (_l) { + switch (_l.label) { + case 0: + 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.')) + }]; + } + + abortListener = void 0; + _l.label = 1; + + case 1: + _l.trys.push([1, 3, 5, 6]); + + requestOptions = { + method: requestType, + url: this_1.uriFor(endpoint, node), + headers: Object.assign({}, this_1.defaultHeaders(), additionalHeaders, this_1.additionalUserHeaders), + timeout: this_1.connectionTimeoutSeconds * 1000, + maxContentLength: Infinity, + maxBodyLength: Infinity, + responseType: responseType, + validateStatus: function validateStatus(status) { + /* Override default validateStatus, which only considers 2xx a success. + In our case, if the server returns any HTTP code, we will handle it below. + We do this to be able to raise custom errors based on response code. + */ + return status > 0; + }, + transformResponse: [function (data, headers) { + var transformedData = data; + + if (headers !== undefined && typeof data === 'string' && headers['content-type'] && headers['content-type'].startsWith('application/json')) { + transformedData = JSON.parse(data); + } + + return transformedData; + }] + }; + + if (queryParameters && Object.keys(queryParameters).length !== 0) { + requestOptions.params = queryParameters; + } + + if (this_1.sendApiKeyAsQueryParam) { + requestOptions.params = requestOptions.params || {}; + requestOptions.params['x-typesense-api-key'] = this_1.apiKey; + } - function verb(n) { - return function (v) { - return step([n, v]); - }; - } + if (bodyParameters && (typeof bodyParameters === 'string' && bodyParameters.length !== 0 || (0, _typeof2["default"])(bodyParameters) === 'object' && Object.keys(bodyParameters).length !== 0)) { + requestOptions.data = bodyParameters; + } // Translate from user-provided AbortController to the Axios request cancel mechanism. - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; + if (abortSignal) { + cancelToken = axios_1["default"].CancelToken; + source_1 = cancelToken.source(); - switch (op[0]) { - case 0: - case 1: - t = op; - break; + abortListener = function abortListener() { + return source_1.cancel(); + }; - case 4: - _.label++; - return { - value: op[1], - done: false - }; + abortSignal.addEventListener('abort', abortListener); + requestOptions.cancelToken = source_1.token; + } - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; + return [4 + /*yield*/ + , (0, axios_1["default"])(requestOptions)]; - case 7: - op = _.ops.pop(); + case 2: + response = _l.sent(); - _.trys.pop(); + if (response.status >= 1 && response.status <= 499) { + // Treat any status code > 0 and < 500 to be an indication that node is healthy + // We exclude 0 since some clients return 0 when request fails + this_1.setNodeHealthcheck(node, HEALTHY); + } - continue; + this_1.logger.debug("Request #".concat(requestNumber, ": Request to Node ").concat(node.index, " was made. Response Code was ").concat(response.status, ".")); - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } + if (response.status >= 200 && response.status < 300) { + return [2 + /*return*/ + , { + value: Promise.resolve(response.data) + }]; + } else if (response.status < 500) { + return [2 + /*return*/ + , { + value: Promise.reject(this_1.customErrorForResponse(response, (_b = response.data) === null || _b === void 0 ? void 0 : _b.message)) + }]; + } else { + // Retry all other HTTP errors (HTTPStatus > 500) + // This will get caught by the catch block below + throw this_1.customErrorForResponse(response, (_c = response.data) === null || _c === void 0 ? void 0 : _c.message); + } - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } + return [3 + /*break*/ + , 6]; - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } + case 3: + error_1 = _l.sent(); // This block handles retries for HTTPStatus > 500 and network layer issues like connection timeouts - if (t && _.label < t[2]) { - _.label = t[2]; + 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), "\"")); // this.logger.debug(error.stack) - _.ops.push(op); + 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)]; - break; - } + case 4: + _l.sent(); - if (t[2]) _.ops.pop(); + return [3 + /*break*/ + , 6]; - _.trys.pop(); + case 5: + if (abortSignal && abortListener) { + abortSignal.removeEventListener('abort', abortListener); + } - continue; - } + return [7 + /*endfinally*/ + ]; - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } - } + case 6: + return [2 + /*return*/ + ]; + } + }); + }; - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; + this_1 = this; + numTries = 1; + _k.label = 1; -Object.defineProperty(exports, "__esModule", { - value: true -}); -var RESOURCEPATH = '/metrics.json'; + case 1: + if (!(numTries <= this.numRetriesPerRequest + 1)) return [3 + /*break*/ + , 4]; + return [5 + /*yield**/ + , _loop_1(numTries)]; -var Metrics = -/** @class */ -function () { - function Metrics(apiCall) { - this.apiCall = apiCall; - } + case 2: + state_1 = _k.sent(); + if ((0, _typeof2["default"])(state_1) === "object") return [2 + /*return*/ + , state_1.value]; + _k.label = 3; - Metrics.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(RESOURCEPATH)]; + case 3: + numTries++; + return [3 + /*break*/ + , 1]; + + case 4: + this.logger.debug("Request #".concat(requestNumber, ": No retries left. Raising last error")); + return [2 + /*return*/ + , Promise.reject(lastException)]; + } }); }); - }; + }; // Attempts to find the next healthy node, looping through the list of nodes once. + // But if no healthy nodes are found, it will just return the next node, even if it's unhealthy + // so we can try the request for good measure, in case that node has become healthy since - return Metrics; -}(); -exports["default"] = Metrics; + ApiCall.prototype.getNextNode = function (requestNumber) { + if (requestNumber === void 0) { + requestNumber = 0; + } // Check if nearestNode is set and is healthy, if so return it -},{}],65:[function(require,module,exports){ -"use strict"; -var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function (resolve) { - resolve(value); - }); - } + 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')); - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + 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; } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + this.logger.debug("Request #".concat(requestNumber, ": Falling back to individual nodes")); + } // 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(' || '))); + var candidateNode; + + for (var i = 0; i <= this.nodes.length; i++) { + this.currentNodeIndex = (this.currentNodeIndex + 1) % this.nodes.length; + candidateNode = this.nodes[this.currentNodeIndex]; + + if (candidateNode.isHealthy === true || this.nodeDueForHealthcheck(candidateNode, requestNumber)) { + this.logger.debug("Request #".concat(requestNumber, ": Updated current node to Node ").concat(candidateNode.index)); + return candidateNode; } + } // None of the nodes are marked healthy, but some of them could have become healthy since last health check. + // So we will just return the next node. + + + this.logger.debug("Request #".concat(requestNumber, ": No healthy nodes were found. Returning the next node, Node ").concat(candidateNode.index)); + return candidateNode; + }; + + ApiCall.prototype.nodeDueForHealthcheck = function (node, requestNumber) { + if (requestNumber === void 0) { + requestNumber = 0; + } + + var isDueForHealthcheck = Date.now() - node.lastAccessTimestamp > this.healthcheckIntervalSeconds * 1000; + + if (isDueForHealthcheck) { + this.logger.debug("Request #".concat(requestNumber, ": Node ").concat(node.index, " has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds, ". Adding it back into rotation.")); } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); + return isDueForHealthcheck; + }; + + ApiCall.prototype.initializeMetadataForNodes = function () { + var _this = this; + + if (this.nearestNode != null) { + this.nearestNode.index = 'nearestNode'; + this.setNodeHealthcheck(this.nearestNode, HEALTHY); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; + this.nodes.forEach(function (node, i) { + node.index = i; -var __generator = void 0 && (void 0).__generator || function (thisArg, body) { - var _ = { - label: 0, - sent: function sent() { - if (t[0] & 1) throw t[1]; - return t[1]; - }, - trys: [], - ops: [] - }, - f, - y, - t, - g; - return g = { - next: verb(0), - "throw": verb(1), - "return": verb(2) - }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { - return this; - }), g; + _this.setNodeHealthcheck(node, HEALTHY); + }); + }; - function verb(n) { - return function (v) { - return step([n, v]); - }; - } + ApiCall.prototype.setNodeHealthcheck = function (node, isHealthy) { + node.isHealthy = isHealthy; + node.lastAccessTimestamp = Date.now(); + }; - function step(op) { - if (f) throw new TypeError("Generator is already executing."); + ApiCall.prototype.uriFor = function (endpoint, node) { + if (node.url != null) { + return "".concat(node.url).concat(endpoint); + } - while (_) { - try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; + return "".concat(node.protocol, "://").concat(node.host, ":").concat(node.port).concat(node.path).concat(endpoint); + }; - switch (op[0]) { - case 0: - case 1: - t = op; - break; + ApiCall.prototype.defaultHeaders = function () { + var defaultHeaders = {}; - case 4: - _.label++; - return { - value: op[1], - done: false - }; + if (!this.sendApiKeyAsQueryParam) { + defaultHeaders[APIKEYHEADERNAME] = this.apiKey; + } - case 5: - _.label++; - y = op[1]; - op = [0]; - continue; + defaultHeaders['Content-Type'] = 'application/json'; + return defaultHeaders; + }; - case 7: - op = _.ops.pop(); + ApiCall.prototype.timer = function (seconds) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 + /*return*/ + , new Promise(function (resolve) { + return setTimeout(resolve, seconds * 1000); + })]; + }); + }); + }; - _.trys.pop(); + ApiCall.prototype.customErrorForResponse = function (response, messageFromServer) { + var errorMessage = "Request failed with HTTP code ".concat(response.status); - continue; + if (typeof messageFromServer === 'string' && messageFromServer.trim() !== '') { + errorMessage += " | Server said: ".concat(messageFromServer); + } - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; - continue; - } + var error = new TypesenseError_1["default"](errorMessage); - if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; - break; - } + if (response.status === 400) { + error = new Errors_1.RequestMalformed(errorMessage); + } else if (response.status === 401) { + error = new Errors_1.RequestUnauthorized(errorMessage); + } else if (response.status === 404) { + error = new Errors_1.ObjectNotFound(errorMessage); + } else if (response.status === 409) { + error = new Errors_1.ObjectAlreadyExists(errorMessage); + } else if (response.status === 422) { + error = new Errors_1.ObjectUnprocessable(errorMessage); + } else if (response.status >= 500 && response.status <= 599) { + error = new Errors_1.ServerError(errorMessage); + } else { + error = new Errors_1.HTTPError(errorMessage); + } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; - t = op; - break; - } + error.httpStatus = response.status; + return error; + }; - if (t && _.label < t[2]) { - _.label = t[2]; + return ApiCall; +}(); - _.ops.push(op); +exports["default"] = ApiCall; - break; - } +},{"./Errors":59,"./Errors/TypesenseError":58,"@babel/runtime/helpers/interopRequireDefault":1,"@babel/runtime/helpers/typeof":2,"axios":3}],58:[function(require,module,exports){ +"use strict"; - if (t[2]) _.ops.pop(); +var __extends = void 0 && (void 0).__extends || function () { + var _extendStatics = function extendStatics(d, b) { + _extendStatics = Object.setPrototypeOf || { + __proto__: [] + } instanceof Array && function (d, b) { + d.__proto__ = b; + } || function (d, b) { + for (var p in b) { + if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; + } + }; - _.trys.pop(); + return _extendStatics(d, b); + }; - continue; - } + return function (d, b) { + if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - op = body.call(thisArg, _); - } catch (e) { - op = [6, e]; - y = 0; - } finally { - f = t = 0; - } + _extendStatics(d, b); + + function __() { + this.constructor = d; } - if (op[0] & 5) throw op[1]; - return { - value: op[0] ? op[1] : void 0, - done: true - }; - } -}; + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +}(); Object.defineProperty(exports, "__esModule", { value: true }); -var RESOURCEPATH = '/operations'; -var Operations = +var TypesenseError = /** @class */ -function () { - function Operations(apiCall) { - this.apiCall = apiCall; - } +function (_super) { + __extends(TypesenseError, _super); // Source: https://stackoverflow.com/a/58417721/123545 - Operations.prototype.perform = function (operationName, queryParameters) { - if (queryParameters === void 0) { - queryParameters = {}; - } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.post("".concat(RESOURCEPATH, "/").concat(operationName), {}, queryParameters)]; - }); - }); - }; + function TypesenseError(message) { + var _newTarget = this.constructor; - return Operations; -}(); + var _this = _super.call(this, message) || this; -exports["default"] = Operations; + _this.name = _newTarget.name; + Object.setPrototypeOf(_this, _newTarget.prototype); + return _this; + } -},{}],61:[function(require,module,exports){ + return TypesenseError; +}(Error); + +exports["default"] = TypesenseError; + +},{}],46:[function(require,module,exports){ "use strict"; var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { @@ -6817,56 +7391,34 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) { } }; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; - Object.defineProperty(exports, "__esModule", { value: true }); +var RESOURCEPATH = '/debug'; -var Keys_1 = __importDefault(require("./Keys")); - -var Key = +var Debug = /** @class */ function () { - function Key(id, apiCall) { - this.id = id; + function Debug(apiCall) { this.apiCall = apiCall; } - Key.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath())]; - }); - }); - }; - - Key.prototype["delete"] = function () { + Debug.prototype.retrieve = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/ - , this.apiCall["delete"](this.endpointPath())]; - }); - }); - }; - - Key.prototype.endpointPath = function () { - return "".concat(Keys_1["default"].RESOURCEPATH, "/").concat(this.id); + , this.apiCall.get(RESOURCEPATH)]; + }); + }); }; - return Key; + return Debug; }(); -exports["default"] = Key; +exports["default"] = Debug; -},{"./Keys":62}],64:[function(require,module,exports){ +},{}],63:[function(require,module,exports){ "use strict"; var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { @@ -7012,231 +7564,34 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) { } }; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; - Object.defineProperty(exports, "__esModule", { value: true }); +var RESOURCEPATH = '/metrics.json'; -var RequestWithCache_1 = __importDefault(require("./RequestWithCache")); - -var RESOURCEPATH = '/multi_search'; - -var MultiSearch = +var Metrics = /** @class */ function () { - function MultiSearch(apiCall, configuration, useTextContentType) { - if (useTextContentType === void 0) { - useTextContentType = false; - } - + function Metrics(apiCall) { this.apiCall = apiCall; - this.configuration = configuration; - this.useTextContentType = useTextContentType; - this.requestWithCache = new RequestWithCache_1["default"](); } - MultiSearch.prototype.perform = function (searchRequests, commonParams, _a) { - if (commonParams === void 0) { - commonParams = {}; - } - - var _b = _a === void 0 ? {} : _a, - _c = _b.cacheSearchResultsForSeconds, - cacheSearchResultsForSeconds = _c === void 0 ? this.configuration.cacheSearchResultsForSeconds : _c; - + Metrics.prototype.retrieve = function () { return __awaiter(this, void 0, void 0, function () { - var additionalHeaders, additionalQueryParams, queryParams; - return __generator(this, function (_d) { - additionalHeaders = {}; - - if (this.useTextContentType) { - additionalHeaders['content-type'] = 'text/plain'; - } - - additionalQueryParams = {}; - - if (this.configuration.useServerSideSearchCache === true) { - additionalQueryParams['use_cache'] = true; - } - - queryParams = Object.assign({}, commonParams, additionalQueryParams); + return __generator(this, function (_a) { return [2 /*return*/ - , this.requestWithCache.perform(this.apiCall, this.apiCall.post, [RESOURCEPATH, searchRequests, queryParams, additionalHeaders], { - cacheResponseForSeconds: cacheSearchResultsForSeconds - })]; + , this.apiCall.get(RESOURCEPATH)]; }); }); }; - return MultiSearch; -}(); - -exports["default"] = MultiSearch; - -},{"./RequestWithCache":68}],45:[function(require,module,exports){ -"use strict"; - -var __createBinding = void 0 && (void 0).__createBinding || (Object.create ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { - enumerable: true, - get: function get() { - return m[k]; - } - }; - } - - Object.defineProperty(o, k2, desc); -} : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -}); - -var __setModuleDefault = void 0 && (void 0).__setModuleDefault || (Object.create ? function (o, v) { - Object.defineProperty(o, "default", { - enumerable: true, - value: v - }); -} : function (o, v) { - o["default"] = v; -}); - -var __importStar = void 0 && (void 0).__importStar || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) { - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - } - - __setModuleDefault(result, mod); - - return result; -}; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var logger = __importStar(require("loglevel")); - -var Errors_1 = require("./Errors"); - -var Configuration = -/** @class */ -function () { - function Configuration(options) { - var _this = this; - - this.nodes = options.nodes || []; - this.nodes = this.nodes.map(function (node) { - return _this.setDefaultPathInNode(node); - }).map(function (node) { - return _this.setDefaultPortInNode(node); - }); - this.nearestNode = options.nearestNode || null; - this.nearestNode = this.setDefaultPathInNode(this.nearestNode); - this.nearestNode = this.setDefaultPortInNode(this.nearestNode); - this.connectionTimeoutSeconds = options.connectionTimeoutSeconds || options.timeoutSeconds || 10; - this.healthcheckIntervalSeconds = options.healthcheckIntervalSeconds || 15; - this.numRetries = options.numRetries || this.nodes.length + (this.nearestNode == null ? 0 : 1) || 3; - this.retryIntervalSeconds = options.retryIntervalSeconds || 0.1; - this.apiKey = options.apiKey; - this.sendApiKeyAsQueryParam = options.sendApiKeyAsQueryParam || false; - this.cacheSearchResultsForSeconds = 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.logger.setLevel(this.logLevel); - this.additionalHeaders = options.additionalHeaders; - this.showDeprecationWarnings(options); - this.validate(); - } - - 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'); - } - - if (this.nearestNode != null && this.isNodeMissingAnyParameters(this.nearestNode)) { - 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'); - } - - return true; - }; - - Configuration.prototype.validateNodes = function () { - var _this = this; - - return this.nodes.some(function (node) { - return _this.isNodeMissingAnyParameters(node); - }); - }; - - Configuration.prototype.isNodeMissingAnyParameters = function (node) { - return !['protocol', 'host', 'port', 'path'].every(function (key) { - return node.hasOwnProperty(key); - }) && node.url == null; - }; - - Configuration.prototype.setDefaultPathInNode = function (node) { - 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; - break; - - case 'http': - node.port = 80; - break; - } - } - - return node; - }; - - Configuration.prototype.showDeprecationWarnings = function (options) { - if (options.timeoutSeconds) { - 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'); - } - - if (options.readReplicaNodes) { - this.logger.warn('Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12'); - } - }; - - return Configuration; + return Metrics; }(); -exports["default"] = Configuration; +exports["default"] = Metrics; -},{"./Errors":59,"loglevel":36}],62:[function(require,module,exports){ -(function (Buffer){(function (){ +},{}],60:[function(require,module,exports){ "use strict"; var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { @@ -7385,64 +7740,31 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) { Object.defineProperty(exports, "__esModule", { value: true }); +var RESOURCEPATH = '/health'; -var crypto_1 = require("crypto"); - -var RESOURCEPATH = '/keys'; - -var Keys = +var Health = /** @class */ function () { - function Keys(apiCall) { - this.apiCall = apiCall; + function Health(apiCall) { this.apiCall = apiCall; } - Keys.prototype.create = function (params) { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.post(Keys.RESOURCEPATH, params)]; - }); - }); - }; - - Keys.prototype.retrieve = function () { + Health.prototype.retrieve = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/ , this.apiCall.get(RESOURCEPATH)]; - }); - }); - }; - - Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) { - // 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 keyPrefix = searchKey.substr(0, 4); - var rawScopedKey = "".concat(digest).concat(keyPrefix).concat(paramsJSON); - return Buffer.from(rawScopedKey).toString('base64'); + }); + }); }; - Object.defineProperty(Keys, "RESOURCEPATH", { - get: function get() { - return RESOURCEPATH; - }, - enumerable: false, - configurable: true - }); - return Keys; + return Health; }(); -exports["default"] = Keys; - -}).call(this)}).call(this,require("buffer").Buffer) +exports["default"] = Health; -},{"buffer":34,"crypto":33}],43:[function(require,module,exports){ +},{}],65:[function(require,module,exports){ "use strict"; var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { @@ -7588,151 +7910,38 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) { } }; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; - Object.defineProperty(exports, "__esModule", { value: true }); +var RESOURCEPATH = '/operations'; -var Collections_1 = __importDefault(require("./Collections")); - -var Documents_1 = __importDefault(require("./Documents")); - -var Errors_1 = require("./Errors"); - -var Overrides_1 = __importDefault(require("./Overrides")); - -var Override_1 = __importDefault(require("./Override")); - -var Synonyms_1 = __importDefault(require("./Synonyms")); - -var Synonym_1 = __importDefault(require("./Synonym")); - -var Document_1 = require("./Document"); - -var Collection = +var Operations = /** @class */ function () { - function Collection(name, apiCall, configuration) { - this.name = name; - this.apiCall = apiCall; - this.configuration = configuration; - this.individualDocuments = {}; - this.individualOverrides = {}; - this.individualSynonyms = {}; - this.name = name; + function Operations(apiCall) { this.apiCall = apiCall; - this.configuration = configuration; - this._documents = new Documents_1["default"](this.name, this.apiCall, this.configuration); - this._overrides = new Overrides_1["default"](this.name, this.apiCall); - this._synonyms = new Synonyms_1["default"](this.name, this.apiCall); } - Collection.prototype.retrieve = function () { - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath())]; - }); - }); - }; + Operations.prototype.perform = function (operationName, queryParameters) { + if (queryParameters === void 0) { + queryParameters = {}; + } - Collection.prototype["delete"] = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/ - , this.apiCall["delete"](this.endpointPath())]; - }); - }); - }; - - Collection.prototype.exists = function () { - return __awaiter(this, void 0, void 0, function () { - var e_1; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - _a.trys.push([0, 2,, 3]); - - return [4 - /*yield*/ - , this.retrieve()]; - - case 1: - _a.sent(); - - return [2 - /*return*/ - , true]; - - case 2: - e_1 = _a.sent(); - if (e_1 instanceof Errors_1.ObjectNotFound) return [2 - /*return*/ - , false]; - throw e_1; - - case 3: - return [2 - /*return*/ - ]; - } + , this.apiCall.post("".concat(RESOURCEPATH, "/").concat(operationName), {}, queryParameters)]; }); }); }; - Collection.prototype.documents = function (documentId) { - if (!documentId) { - return this._documents; - } else { - if (this.individualDocuments[documentId] === undefined) { - this.individualDocuments[documentId] = new Document_1.Document(this.name, documentId, this.apiCall); - } - - return this.individualDocuments[documentId]; - } - }; - - Collection.prototype.overrides = function (overrideId) { - if (overrideId === undefined) { - return this._overrides; - } else { - if (this.individualOverrides[overrideId] === undefined) { - this.individualOverrides[overrideId] = new Override_1["default"](this.name, overrideId, this.apiCall); - } - - return this.individualOverrides[overrideId]; - } - }; - - Collection.prototype.synonyms = function (synonymId) { - if (synonymId === undefined) { - return this._synonyms; - } else { - if (this.individualSynonyms[synonymId] === undefined) { - this.individualSynonyms[synonymId] = new Synonym_1["default"](this.name, synonymId, this.apiCall); - } - - return this.individualSynonyms[synonymId]; - } - }; - - Collection.prototype.endpointPath = function () { - return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.name); - }; - - return Collection; + return Operations; }(); -exports["default"] = Collection; +exports["default"] = Operations; -},{"./Collections":44,"./Document":47,"./Documents":48,"./Errors":59,"./Override":66,"./Overrides":67,"./Synonym":72,"./Synonyms":73}],66:[function(require,module,exports){ +},{}],61:[function(require,module,exports){ "use strict"; var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { @@ -7888,20 +8097,17 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var Collections_1 = __importDefault(require("./Collections")); - -var Overrides_1 = __importDefault(require("./Overrides")); +var Keys_1 = __importDefault(require("./Keys")); -var Override = +var Key = /** @class */ function () { - function Override(collectionName, overrideId, apiCall) { - this.collectionName = collectionName; - this.overrideId = overrideId; + function Key(id, apiCall) { + this.id = id; this.apiCall = apiCall; } - Override.prototype.retrieve = function () { + Key.prototype.retrieve = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 @@ -7911,7 +8117,7 @@ function () { }); }; - Override.prototype["delete"] = function () { + Key.prototype["delete"] = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 @@ -7921,16 +8127,17 @@ function () { }); }; - Override.prototype.endpointPath = function () { - return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides_1["default"].RESOURCEPATH, "/").concat(this.overrideId); + Key.prototype.endpointPath = function () { + return "".concat(Keys_1["default"].RESOURCEPATH, "/").concat(this.id); }; - return Override; + return Key; }(); -exports["default"] = Override; +exports["default"] = Key; -},{"./Collections":44,"./Overrides":67}],67:[function(require,module,exports){ +},{"./Keys":62}],62:[function(require,module,exports){ +(function (Buffer){(function (){ "use strict"; var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { @@ -8076,65 +8283,67 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) { } }; -var __importDefault = void 0 && (void 0).__importDefault || function (mod) { - return mod && mod.__esModule ? mod : { - "default": mod - }; -}; - Object.defineProperty(exports, "__esModule", { value: true }); -var Collections_1 = __importDefault(require("./Collections")); +var crypto_1 = require("crypto"); -var RESOURCEPATH = '/overrides'; +var RESOURCEPATH = '/keys'; -var Overrides = +var Keys = /** @class */ function () { - function Overrides(collectionName, apiCall) { - this.collectionName = collectionName; + function Keys(apiCall) { + this.apiCall = apiCall; this.apiCall = apiCall; } - Overrides.prototype.upsert = function (overrideId, params) { + Keys.prototype.create = function (params) { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/ - , this.apiCall.put(this.endpointPath(overrideId), params)]; + , this.apiCall.post(Keys.RESOURCEPATH, params)]; }); }); }; - Overrides.prototype.retrieve = function () { + Keys.prototype.retrieve = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/ - , this.apiCall.get(this.endpointPath())]; + , this.apiCall.get(RESOURCEPATH)]; }); }); }; - Overrides.prototype.endpointPath = function (operation) { - return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); + Keys.prototype.generateScopedSearchKey = function (searchKey, parameters) { + // 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 keyPrefix = searchKey.substr(0, 4); + var rawScopedKey = "".concat(digest).concat(keyPrefix).concat(paramsJSON); + return Buffer.from(rawScopedKey).toString('base64'); }; - Object.defineProperty(Overrides, "RESOURCEPATH", { + Object.defineProperty(Keys, "RESOURCEPATH", { get: function get() { return RESOURCEPATH; }, enumerable: false, configurable: true }); - return Overrides; + return Keys; }(); -exports["default"] = Overrides; +exports["default"] = Keys; + +}).call(this)}).call(this,require("buffer").Buffer) -},{"./Collections":44}],72:[function(require,module,exports){ +},{"buffer":34,"crypto":33}],67:[function(require,module,exports){ "use strict"; var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { @@ -8292,47 +8501,53 @@ Object.defineProperty(exports, "__esModule", { var Collections_1 = __importDefault(require("./Collections")); -var Synonyms_1 = __importDefault(require("./Synonyms")); +var RESOURCEPATH = '/overrides'; -var Synonym = +var Overrides = /** @class */ function () { - function Synonym(collectionName, synonymId, apiCall) { + function Overrides(collectionName, apiCall) { this.collectionName = collectionName; - this.synonymId = synonymId; this.apiCall = apiCall; } - Synonym.prototype.retrieve = function () { + Overrides.prototype.upsert = function (overrideId, params) { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/ - , this.apiCall.get(this.endpointPath())]; + , this.apiCall.put(this.endpointPath(overrideId), params)]; }); }); }; - Synonym.prototype["delete"] = function () { + Overrides.prototype.retrieve = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 /*return*/ - , this.apiCall["delete"](this.endpointPath())]; + , this.apiCall.get(this.endpointPath())]; }); }); }; - Synonym.prototype.endpointPath = function () { - return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Synonyms_1["default"].RESOURCEPATH, "/").concat(this.synonymId); + Overrides.prototype.endpointPath = function (operation) { + return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides.RESOURCEPATH).concat(operation === undefined ? '' : '/' + operation); }; - return Synonym; + Object.defineProperty(Overrides, "RESOURCEPATH", { + get: function get() { + return RESOURCEPATH; + }, + enumerable: false, + configurable: true + }); + return Overrides; }(); -exports["default"] = Synonym; +exports["default"] = Overrides; -},{"./Collections":44,"./Synonyms":73}],73:[function(require,module,exports){ +},{"./Collections":44}],73:[function(require,module,exports){ "use strict"; var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { @@ -8536,7 +8751,7 @@ function () { exports["default"] = Synonyms; -},{"./Collections":44}],47:[function(require,module,exports){ +},{"./Collections":44}],66:[function(require,module,exports){ "use strict"; var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { @@ -8691,22 +8906,21 @@ var __importDefault = void 0 && (void 0).__importDefault || function (mod) { Object.defineProperty(exports, "__esModule", { value: true }); -exports.Document = void 0; var Collections_1 = __importDefault(require("./Collections")); -var Documents_1 = __importDefault(require("./Documents")); +var Overrides_1 = __importDefault(require("./Overrides")); -var Document = +var Override = /** @class */ function () { - function Document(collectionName, documentId, apiCall) { + function Override(collectionName, overrideId, apiCall) { this.collectionName = collectionName; - this.documentId = documentId; + this.overrideId = overrideId; this.apiCall = apiCall; } - Document.prototype.retrieve = function () { + Override.prototype.retrieve = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 @@ -8716,7 +8930,7 @@ function () { }); }; - Document.prototype["delete"] = function () { + Override.prototype["delete"] = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { return [2 @@ -8726,60 +8940,18 @@ function () { }); }; - Document.prototype.update = function (partialDocument, options) { - if (options === void 0) { - options = {}; - } - - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.patch(this.endpointPath(), partialDocument, options)]; - }); - }); - }; - - Document.prototype.endpointPath = function () { - return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Documents_1["default"].RESOURCEPATH, "/").concat(this.documentId); + Override.prototype.endpointPath = function () { + return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Overrides_1["default"].RESOURCEPATH, "/").concat(this.overrideId); }; - return Document; + return Override; }(); -exports.Document = Document; +exports["default"] = Override; -},{"./Collections":44,"./Documents":48}],48:[function(require,module,exports){ +},{"./Collections":44,"./Overrides":67}],47:[function(require,module,exports){ "use strict"; -var __extends = void 0 && (void 0).__extends || function () { - var _extendStatics = function extendStatics(d, b) { - _extendStatics = Object.setPrototypeOf || { - __proto__: [] - } instanceof Array && function (d, b) { - d.__proto__ = b; - } || function (d, b) { - for (var p in b) { - if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; - } - }; - - return _extendStatics(d, b); - }; - - return function (d, b) { - if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - - _extendStatics(d, b); - - function __() { - this.constructor = d; - } - - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -}(); - var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { @@ -8923,186 +9095,51 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) { } }; +var __importDefault = void 0 && (void 0).__importDefault || function (mod) { + return mod && mod.__esModule ? mod : { + "default": mod + }; +}; + Object.defineProperty(exports, "__esModule", { value: true }); +exports.Document = void 0; -var Errors_1 = require("./Errors"); +var Collections_1 = __importDefault(require("./Collections")); -var SearchOnlyDocuments_1 = require("./SearchOnlyDocuments"); +var Documents_1 = __importDefault(require("./Documents")); -var Documents = +var Document = /** @class */ -function (_super) { - __extends(Documents, _super); - - function Documents(collectionName, apiCall, configuration) { - return _super.call(this, collectionName, apiCall, configuration) || this; +function () { + function Document(collectionName, documentId, apiCall) { + this.collectionName = collectionName; + this.documentId = documentId; + this.apiCall = apiCall; } - Documents.prototype.create = function (document, options) { - if (options === void 0) { - options = {}; - } - - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - if (!document) throw new Error('No document provided'); - return [2 - /*return*/ - , this.apiCall.post(this.endpointPath(), document, options)]; - }); - }); - }; - - Documents.prototype.upsert = function (document, options) { - if (options === void 0) { - options = {}; - } - - return __awaiter(this, void 0, void 0, function () { - return __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' - }))]; - }); - }); - }; - - Documents.prototype.update = function (document, options) { - if (options === void 0) { - options = {}; - } - - return __awaiter(this, void 0, void 0, function () { - return __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: 'update' - }))]; - }); - }); - }; - - Documents.prototype["delete"] = function (idOrQuery) { - if (idOrQuery === void 0) { - idOrQuery = {}; - } - + Document.prototype.retrieve = function () { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { - if (typeof idOrQuery === 'string') { - return [2 - /*return*/ - , this.apiCall["delete"](this.endpointPath(idOrQuery), idOrQuery)]; - } else { - return [2 - /*return*/ - , this.apiCall["delete"](this.endpointPath(), idOrQuery)]; - } - return [2 /*return*/ - ]; + , this.apiCall.get(this.endpointPath())]; }); }); }; - Documents.prototype.createMany = function (documents, options) { - if (options === void 0) { - options = {}; - } - + Document.prototype["delete"] = function () { return __awaiter(this, void 0, void 0, function () { return __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'); return [2 /*return*/ - , this["import"](documents, options)]; - }); - }); - }; - - Documents.prototype["import"] = function (documents, options) { - if (options === void 0) { - options = {}; - } - - return __awaiter(this, void 0, void 0, function () { - var documentsInJSONLFormat, resultsInJSONLFormat, resultsInJSONFormat, failedItems; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (Array.isArray(documents)) { - try { - documentsInJSONLFormat = documents.map(function (document) { - return JSON.stringify(document); - }).join('\n'); - } catch (error) { - // if rangeerror, throw custom error message - if (RangeError instanceof error && (error === null || error === void 0 ? void 0 : error.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 - - - throw new Error(error); - } - } else { - documentsInJSONLFormat = documents; - } - - return [4 - /*yield*/ - , this.apiCall.performRequest('post', this.endpointPath('import'), { - queryParameters: options, - bodyParameters: documentsInJSONLFormat, - additionalHeaders: { - 'Content-Type': 'text/plain' - } - })]; - - case 1: - resultsInJSONLFormat = _a.sent(); - - if (Array.isArray(documents)) { - resultsInJSONFormat = resultsInJSONLFormat.split('\n').map(function (r) { - return JSON.parse(r); - }); - failedItems = resultsInJSONFormat.filter(function (r) { - return r.success === false; - }); - - if (failedItems.length > 0) { - throw new Errors_1.ImportError("".concat(resultsInJSONFormat.length - failedItems.length, " documents imported successfully, ").concat(failedItems.length, " documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."), resultsInJSONFormat); - } else { - return [2 - /*return*/ - , resultsInJSONFormat]; - } - } else { - return [2 - /*return*/ - , resultsInJSONLFormat]; - } - - return [2 - /*return*/ - ]; - } + , this.apiCall["delete"](this.endpointPath())]; }); }); }; - /** - * Returns a JSONL string for all the documents in this collection - */ - - Documents.prototype["export"] = function (options) { + Document.prototype.update = function (partialDocument, options) { if (options === void 0) { options = {}; } @@ -9111,37 +9148,21 @@ function (_super) { return __generator(this, function (_a) { return [2 /*return*/ - , this.apiCall.get(this.endpointPath('export'), options)]; + , this.apiCall.patch(this.endpointPath(), partialDocument, options)]; }); }); }; - /** - * Returns a NodeJS readable stream of JSONL for all the documents in this collection. - */ - - - Documents.prototype.exportStream = function (options) { - if (options === void 0) { - options = {}; - } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - return [2 - /*return*/ - , this.apiCall.get(this.endpointPath('export'), options, { - responseType: 'stream' - })]; - }); - }); + Document.prototype.endpointPath = function () { + return "".concat(Collections_1["default"].RESOURCEPATH, "/").concat(this.collectionName).concat(Documents_1["default"].RESOURCEPATH, "/").concat(this.documentId); }; - return Documents; -}(SearchOnlyDocuments_1.SearchOnlyDocuments); + return Document; +}(); -exports["default"] = Documents; +exports.Document = Document; -},{"./Errors":59,"./SearchOnlyDocuments":71}],71:[function(require,module,exports){ +},{"./Collections":44,"./Documents":48}],71:[function(require,module,exports){ "use strict"; var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) { diff --git a/dist/typesense.min.js b/dist/typesense.min.js index 59022951..274458a9 100644 --- a/dist/typesense.min.js +++ b/dist/typesense.min.js @@ -1,2 +1,2 @@ -!function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Typesense=t()}(function(){return function r(o,i,s){function a(e,t){if(!i[e]){if(!o[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(u)return u(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}n=i[e]={exports:{}},o[e][0].call(n.exports,function(t){return a(o[e][1][t]||t)},n,n.exports,r,o,i,s)}return i[e].exports}for(var u="function"==typeof require&&require,t=0;t>16&255,i[s++]=e>>8&255,i[s++]=255&e;2===r&&(e=u[t.charCodeAt(n)]<<2|u[t.charCodeAt(n+1)]>>4,i[s++]=255&e);1===r&&(e=u[t.charCodeAt(n)]<<10|u[t.charCodeAt(n+1)]<<4|u[t.charCodeAt(n+2)]>>2,i[s++]=e>>8&255,i[s++]=255&e);return i},n.fromByteArray=function(t){for(var e,n=t.length,r=n%3,o=[],i=0,s=n-r;i>18&63]+a[t>>12&63]+a[t>>6&63]+a[63&t]}(r));return o.join("")}(t,i,s>2]+a[e<<4&63]+"==")):2==r&&(e=(t[n-2]<<8)+t[n-1],o.push(a[e>>10]+a[e>>4&63]+a[e<<2&63]+"="));return o.join("")};for(var a=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=r.length;o>>1;case"base64":return P(t).length;default:if(o)return r?-1:O(t).length;e=(""+e).toLowerCase(),o=!0}}function n(t,e,n){var r,o=!1;if((e=void 0===e||e<0?0:e)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t=t||"utf8";;)switch(t){case"hex":var i=this,s=e,a=n,u=i.length;(!a||a<0||u=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=f.from(e,r)),f.isBuffer(e))return 0===e.length?-1:d(t,e,n,r,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(t,e,n):d(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function d(t,e,n,r,o){var i=1,s=t.length,a=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s/=i=2,a/=2,n/=2}function u(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}if(o)for(var c=-1,l=n;l>8,r=r%256,o.push(r),o.push(n);return o}(e,t.length-n),t,n,r)}function x(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}var h=r,p=h.length;if(p<=g)return String.fromCharCode.apply(String,h);for(var d="",y=0;ye&&(t+=" ... "),""},f.prototype.compare=function(t,e,n,r,o){if(A(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),(e=void 0===e?0:e)<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(o<=r&&n<=e)return 0;if(o<=r)return-1;if(n<=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(i,s),u=this.slice(r,o),c=t.slice(e,n),l=0;l>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||othis.length)throw new RangeError("Attempt to write outside buffer bounds");r=r||"utf8";for(var i,s,a,u=!1;;)switch(r){case"hex":var c=this,l=t,f=e,h=n,p=(f=Number(f)||0,c.length-f);(!h||p<(h=Number(h)))&&(h=p),(p=l.length)/2t.length)throw new RangeError("Index out of range")}function m(t,e,n,r){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function E(t,e,n,r,o){return e=+e,n>>>=0,o||m(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function C(t,e,n,r,o){return e=+e,n>>>=0,o||m(t,0,n,8),i.write(t,e,n,r,52,8),n+8}f.prototype.slice=function(t,e){var n=this.length,n=((t=~~t)<0?(t+=n)<0&&(t=0):n>>=0,e>>>=0,n||y(t,e,this.length);for(var r=this[t],o=1,i=0;++i>>=0,e>>>=0,n||y(t,e,this.length);for(var r=this[t+--e],o=1;0>>=0,e||y(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||y(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||y(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||y(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||y(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||y(t,e,this.length);for(var r=this[t],o=1,i=0;++i>>=0,e>>>=0,n||y(t,e,this.length);for(var r=e,o=1,i=this[t+--r];0>>=0,e||y(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||y(t,2,this.length);e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,e){t>>>=0,e||y(t,2,this.length);e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||y(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||y(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,e){return t>>>=0,e||y(t,4,this.length),i.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||y(t,4,this.length),i.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||y(t,8,this.length),i.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||y(t,8,this.length),i.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||w(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i>>=0,n>>>=0,r||w(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;0<=--o&&(i*=256);)this[e+o]=t/i&255;return e+n},f.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeIntLE=function(t,e,n,r){t=+t,e>>>=0,r||w(this,t,e,n,(r=Math.pow(2,8*n-1))-1,-r);var o=0,i=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+n},f.prototype.writeIntBE=function(t,e,n,r){t=+t,e>>>=0,r||w(this,t,e,n,(r=Math.pow(2,8*n-1))-1,-r);var o=n-1,i=1,s=0;for(this[e+o]=255&t;0<=--o&&(i*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/i>>0)-s&255;return e+n},f.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,1,127,-128),this[e]=255&(t=t<0?255+t+1:t),e+1},f.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||w(this,t,e,4,2147483647,-2147483648),this[e]=(t=t<0?4294967295+t+1:t)>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeFloatLE=function(t,e,n){return E(this,t,e,!0,n)},f.prototype.writeFloatBE=function(t,e,n){return E(this,t,e,!1,n)},f.prototype.writeDoubleLE=function(t,e,n){return C(this,t,e,!0,n)},f.prototype.writeDoubleBE=function(t,e,n){return C(this,t,e,!1,n)},f.prototype.copy=function(t,e,n,r){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n=n||0,r||0===r||(r=this.length),e>=t.length&&(e=t.length),(r=0=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length);var o=(r=t.length-e>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(t=t||0))for(i=e;i>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function P(t){return S.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(_,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function T(t,e,n,r){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function A(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function R(t){return t!=t}}.call(this)}.call(this,j("buffer").Buffer)},{"base64-js":32,buffer:34,ieee754:35}],35:[function(t,e,n){n.read=function(t,e,n,r,o){var i,s,a=8*o-r-1,u=(1<>1,l=-7,f=n?o-1:0,h=n?-1:1,o=t[e+f];for(f+=h,i=o&(1<<-l)-1,o>>=-l,l+=a;0>=-l,l+=r;0>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,i=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(r=Math.pow(2,-s))<1&&(s--,r*=2),2<=(e+=1<=s+l?f/r:f*Math.pow(2,1-l))*r&&(s++,r/=2),c<=s+l?(a=0,s=c):1<=s+l?(a=(e*r-1)*Math.pow(2,o),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,o),s=0));8<=o;t[n+h]=255&a,h+=p,a/=256,o-=8);for(s=s<a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]1e3*this.healthcheckIntervalSeconds;return n&&this.logger.debug("Request #".concat(e,": Node ").concat(t.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),n},a.prototype.initializeMetadataForNodes=function(){var n=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,!0)),this.nodes.forEach(function(t,e){t.index=e,n.setNodeHealthcheck(t,!0)})},a.prototype.setNodeHealthcheck=function(t,e){t.isHealthy=e,t.lastAccessTimestamp=Date.now()},a.prototype.uriFor=function(t,e){return(null!=e.url?"".concat(e.url):"".concat(e.protocol,"://").concat(e.host,":").concat(e.port).concat(e.path)).concat(t)},a.prototype.defaultHeaders=function(){var t={};return this.sendApiKeyAsQueryParam||(t["X-TYPESENSE-API-KEY"]=this.apiKey),t["Content-Type"]="application/json",t},a.prototype.timer=function(e){return s(this,void 0,void 0,function(){return m(this,function(t){return[2,new Promise(function(t){return setTimeout(t,1e3*e)})]})})},a.prototype.customErrorForResponse=function(t,e){var n="Request failed with HTTP code ".concat(t.status),e=("string"==typeof e&&""!==e.trim()&&(n+=" | Server said: ".concat(e)),new i.default(n));return(e=new(400===t.status?o.RequestMalformed:401===t.status?o.RequestUnauthorized:404===t.status?o.ObjectNotFound:409===t.status?o.ObjectAlreadyExists:422===t.status?o.ObjectUnprocessable:500<=t.status&&t.status<=599?o.ServerError:o.HTTPError)(n)).httpStatus=t.status,e},n.default=a},{"./Errors":59,"./Errors/TypesenseError":58,"@babel/runtime/helpers/interopRequireDefault":1,"@babel/runtime/helpers/typeof":2,axios:3}],58:[function(t,e,n){"use strict";r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var r,o,i=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=(Object.defineProperty(n,"__esModule",{value:!0}),o=Error,i(s,o),s);function s(t){var e=this.constructor,t=o.call(this,t)||this;return t.name=e.name,Object.setPrototypeOf(t,e.prototype),t}n.default=i},{}],44:[function(t,e,n){"use strict";var r=function(t,s,a,u){return new(a=a||Promise)(function(n,e){function r(t){try{i(u.next(t))}catch(t){e(t)}}function o(t){try{i(u.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?n(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(r,o)}i((u=u.apply(t,s||[])).next())})},o=function(r,o){var i,s,a,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(n){return function(t){var e=[n,t];if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,s&&(a=2&e[0]?s.return:e[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,e[1])).done)return a;switch(s=0,(e=a?[2&e[0],a.value]:e)[0]){case 0:case 1:a=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,s=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!a||e[1]>a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]a[0]&&e[1]e&&(i=this.responseCache.keys().next().value,this.responseCache.delete(i)),[2,o]}})})},n.default=o},{}],70:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SearchOnlyCollection=void 0;var r=t("./SearchOnlyDocuments");function o(t,e,n){this.name=t,this.apiCall=e,this.configuration=n,this._documents=new r.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}o.prototype.documents=function(){return this._documents},n.SearchOnlyCollection=o},{"./SearchOnlyDocuments":71}]},{},[38])(38)}); +!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Typesense=e()}(function(){return function r(o,i,s){function a(t,e){if(!i[t]){if(!o[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(u)return u(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}n=i[t]={exports:{}},o[t][0].call(n.exports,function(e){return a(o[t][1][e]||e)},n,n.exports,r,o,i,s)}return i[t].exports}for(var u="function"==typeof require&&require,e=0;e>16&255,i[s++]=t>>8&255,i[s++]=255&t;2===r&&(t=u[e.charCodeAt(n)]<<2|u[e.charCodeAt(n+1)]>>4,i[s++]=255&t);1===r&&(t=u[e.charCodeAt(n)]<<10|u[e.charCodeAt(n+1)]<<4|u[e.charCodeAt(n+2)]>>2,i[s++]=t>>8&255,i[s++]=255&t);return i},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,o=[],i=0,s=n-r;i>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}(r));return o.join("")}(e,i,s>2]+a[t<<4&63]+"==")):2==r&&(t=(e[n-2]<<8)+e[n-1],o.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"="));return o.join("")};for(var a=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=r.length;o>>1;case"base64":return P(e).length;default:if(o)return r?-1:O(e).length;t=(""+t).toLowerCase(),o=!0}}function n(e,t,n){var r,o=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var i=this,s=t,a=n,u=i.length;(!a||a<0||u=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=f.from(t,r)),f.isBuffer(t))return 0===t.length?-1:d(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):d(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function d(e,t,n,r,o){var i=1,s=e.length,a=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s/=i=2,a/=2,n/=2}function u(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o)for(var c=-1,l=n;l>8,r=r%256,o.push(r),o.push(n);return o}(t,e.length-n),e,n,r)}function x(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}var h=r,p=h.length;if(p<=g)return String.fromCharCode.apply(String,h);for(var d="",y=0;yt&&(e+=" ... "),""},f.prototype.compare=function(e,t,n,r,o){if(A(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),(t=void 0===t?0:t)<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(o<=r&&n<=t)return 0;if(o<=r)return-1;if(n<=t)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(i,s),u=this.slice(r,o),c=e.slice(t,n),l=0;l>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||othis.length)throw new RangeError("Attempt to write outside buffer bounds");r=r||"utf8";for(var i,s,a,u=!1;;)switch(r){case"hex":var c=this,l=e,f=t,h=n,p=(f=Number(f)||0,c.length-f);(!h||p<(h=Number(h)))&&(h=p),(p=l.length)/2e.length)throw new RangeError("Index out of range")}function m(e,t,n,r){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function E(e,t,n,r,o){return t=+t,n>>>=0,o||m(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function C(e,t,n,r,o){return t=+t,n>>>=0,o||m(e,0,n,8),i.write(e,t,n,r,52,8),n+8}f.prototype.slice=function(e,t){var n=this.length,n=((e=~~e)<0?(e+=n)<0&&(e=0):n>>=0,t>>>=0,n||y(e,t,this.length);for(var r=this[e],o=1,i=0;++i>>=0,t>>>=0,n||y(e,t,this.length);for(var r=this[e+--t],o=1;0>>=0,t||y(e,1,this.length),this[e]},f.prototype.readUInt16LE=function(e,t){return e>>>=0,t||y(e,2,this.length),this[e]|this[e+1]<<8},f.prototype.readUInt16BE=function(e,t){return e>>>=0,t||y(e,2,this.length),this[e]<<8|this[e+1]},f.prototype.readUInt32LE=function(e,t){return e>>>=0,t||y(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},f.prototype.readUInt32BE=function(e,t){return e>>>=0,t||y(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},f.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||y(e,t,this.length);for(var r=this[e],o=1,i=0;++i>>=0,t>>>=0,n||y(e,t,this.length);for(var r=t,o=1,i=this[e+--r];0>>=0,t||y(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},f.prototype.readInt16LE=function(e,t){e>>>=0,t||y(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},f.prototype.readInt16BE=function(e,t){e>>>=0,t||y(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},f.prototype.readInt32LE=function(e,t){return e>>>=0,t||y(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},f.prototype.readInt32BE=function(e,t){return e>>>=0,t||y(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},f.prototype.readFloatLE=function(e,t){return e>>>=0,t||y(e,4,this.length),i.read(this,e,!0,23,4)},f.prototype.readFloatBE=function(e,t){return e>>>=0,t||y(e,4,this.length),i.read(this,e,!1,23,4)},f.prototype.readDoubleLE=function(e,t){return e>>>=0,t||y(e,8,this.length),i.read(this,e,!0,52,8)},f.prototype.readDoubleBE=function(e,t){return e>>>=0,t||y(e,8,this.length),i.read(this,e,!1,52,8)},f.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||w(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,r||w(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;0<=--o&&(i*=256);)this[t+o]=e/i&255;return t+n},f.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,1,255,0),this[t]=255&e,t+1},f.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},f.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeIntLE=function(e,t,n,r){e=+e,t>>>=0,r||w(this,e,t,n,(r=Math.pow(2,8*n-1))-1,-r);var o=0,i=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},f.prototype.writeIntBE=function(e,t,n,r){e=+e,t>>>=0,r||w(this,e,t,n,(r=Math.pow(2,8*n-1))-1,-r);var o=n-1,i=1,s=0;for(this[t+o]=255&e;0<=--o&&(i*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+n},f.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},f.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},f.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},f.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},f.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||w(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},f.prototype.writeFloatLE=function(e,t,n){return E(this,e,t,!0,n)},f.prototype.writeFloatBE=function(e,t,n){return E(this,e,t,!1,n)},f.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},f.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},f.prototype.copy=function(e,t,n,r){if(!f.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n=n||0,r||0===r||(r=this.length),t>=e.length&&(t=e.length),(r=0=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length);var o=(r=e.length-t>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(i=t;i>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function P(e){return S.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(_,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function T(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function A(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function R(e){return e!=e}}.call(this)}.call(this,j("buffer").Buffer)},{"base64-js":32,buffer:34,ieee754:35}],35:[function(e,t,n){n.read=function(e,t,n,r,o){var i,s,a=8*o-r-1,u=(1<>1,l=-7,f=n?o-1:0,h=n?-1:1,o=e[t+f];for(f+=h,i=o&(1<<-l)-1,o>>=-l,l+=a;0>=-l,l+=r;0>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,i=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(r=Math.pow(2,-s))<1&&(s--,r*=2),2<=(t+=1<=s+l?f/r:f*Math.pow(2,1-l))*r&&(s++,r/=2),c<=s+l?(a=0,s=c):1<=s+l?(a=(t*r-1)*Math.pow(2,o),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),s=0));8<=o;e[n+h]=255&a,h+=p,a/=256,o-=8);for(s=s<a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]1e3*this.healthcheckIntervalSeconds;return n&&this.logger.debug("Request #".concat(t,": Node ").concat(e.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),n},a.prototype.initializeMetadataForNodes=function(){var n=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,!0)),this.nodes.forEach(function(e,t){e.index=t,n.setNodeHealthcheck(e,!0)})},a.prototype.setNodeHealthcheck=function(e,t){e.isHealthy=t,e.lastAccessTimestamp=Date.now()},a.prototype.uriFor=function(e,t){return(null!=t.url?"".concat(t.url):"".concat(t.protocol,"://").concat(t.host,":").concat(t.port).concat(t.path)).concat(e)},a.prototype.defaultHeaders=function(){var e={};return this.sendApiKeyAsQueryParam||(e["X-TYPESENSE-API-KEY"]=this.apiKey),e["Content-Type"]="application/json",e},a.prototype.timer=function(t){return s(this,void 0,void 0,function(){return m(this,function(e){return[2,new Promise(function(e){return setTimeout(e,1e3*t)})]})})},a.prototype.customErrorForResponse=function(e,t){var n="Request failed with HTTP code ".concat(e.status),t=("string"==typeof t&&""!==t.trim()&&(n+=" | Server said: ".concat(t)),new i.default(n));return(t=new(400===e.status?o.RequestMalformed:401===e.status?o.RequestUnauthorized:404===e.status?o.ObjectNotFound:409===e.status?o.ObjectAlreadyExists:422===e.status?o.ObjectUnprocessable:500<=e.status&&e.status<=599?o.ServerError:o.HTTPError)(n)).httpStatus=e.status,t},n.default=a},{"./Errors":59,"./Errors/TypesenseError":58,"@babel/runtime/helpers/interopRequireDefault":1,"@babel/runtime/helpers/typeof":2,axios:3}],58:[function(e,t,n){"use strict";r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};var r,o,i=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=(Object.defineProperty(n,"__esModule",{value:!0}),o=Error,i(s,o),s);function s(e){var t=this.constructor,e=o.call(this,e)||this;return e.name=t.name,Object.setPrototypeOf(e,t.prototype),e}n.default=i},{}],46:[function(e,t,n){"use strict";var r=function(e,s,a,u){return new(a=a||Promise)(function(n,t){function r(e){try{i(u.next(e))}catch(e){t(e)}}function o(e){try{i(u.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(r,o)}i((u=u.apply(e,s||[])).next())})},o=function(r,o){var i,s,a,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(n){return function(e){var t=[n,e];if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,s=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]a[0]&&t[1]t&&(i=this.responseCache.keys().next().value,this.responseCache.delete(i)),[2,o]}})})},n.default=o},{}],70:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SearchOnlyCollection=void 0;var r=e("./SearchOnlyDocuments");function o(e,t,n){this.name=e,this.apiCall=t,this.configuration=n,this._documents=new r.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}o.prototype.documents=function(){return this._documents},n.SearchOnlyCollection=o},{"./SearchOnlyDocuments":71}]},{},[38])(38)}); //# sourceMappingURL=typesense.min.js.map diff --git a/dist/typesense.min.js.map b/dist/typesense.min.js.map index 7c6e749c..5399ebbf 100644 --- a/dist/typesense.min.js.map +++ b/dist/typesense.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["node_modules/browser-pack/_prelude.js","node_modules/@babel/runtime/helpers/interopRequireDefault.js","node_modules/@babel/runtime/helpers/typeof.js","node_modules/axios/index.js","node_modules/axios/lib/axios.js","node_modules/axios/lib/adapters/xhr.js","node_modules/axios/lib/utils.js","node_modules/axios/lib/defaults.js","node_modules/axios/lib/helpers/buildURL.js","node_modules/axios/lib/cancel/Cancel.js","node_modules/axios/lib/helpers/parseHeaders.js","node_modules/axios/lib/helpers/cookies.js","node_modules/axios/lib/helpers/isURLSameOrigin.js","node_modules/axios/lib/core/settle.js","node_modules/axios/lib/core/createError.js","node_modules/axios/lib/core/buildFullPath.js","node_modules/axios/lib/helpers/bind.js","node_modules/axios/lib/cancel/isCancel.js","node_modules/axios/lib/helpers/spread.js","node_modules/axios/lib/env/data.js","node_modules/axios/lib/core/mergeConfig.js","node_modules/axios/lib/helpers/isAxiosError.js","node_modules/axios/lib/cancel/CancelToken.js","node_modules/axios/lib/core/Axios.js","node_modules/axios/lib/core/InterceptorManager.js","node_modules/axios/lib/helpers/validator.js","node_modules/axios/lib/core/dispatchRequest.js","node_modules/axios/lib/helpers/combineURLs.js","node_modules/axios/lib/helpers/isAbsoluteURL.js","node_modules/axios/lib/core/enhanceError.js","node_modules/axios/lib/core/transformData.js","node_modules/process/browser.js","node_modules/axios/lib/helpers/normalizeHeaderName.js","node_modules/base64-js/index.js","node_modules/browser-resolve/empty.js","node_modules/buffer/index.js","node_modules/ieee754/index.js","node_modules/loglevel/lib/loglevel.js","src/Typesense.ts","src/Typesense/Errors/index.ts","src/Typesense/SearchClient.ts","src/Typesense/Client.ts","src/Typesense/Alias.ts","src/Typesense/Aliases.ts","src/Typesense/ApiCall.ts","src/Typesense/Errors/TypesenseError.ts","src/Typesense/Collections.ts","src/Typesense/Debug.ts","src/Typesense/Health.ts","src/Typesense/Metrics.ts","src/Typesense/Operations.ts","src/Typesense/Key.ts","src/Typesense/MultiSearch.ts","src/Typesense/Configuration.ts","src/Typesense/Keys.ts","src/Typesense/Collection.ts","src/Typesense/Override.ts","src/Typesense/Overrides.ts","src/Typesense/Synonym.ts","src/Typesense/Synonyms.ts","src/Typesense/Document.ts","src/Typesense/Documents.ts","src/Typesense/SearchOnlyDocuments.ts","src/Typesense/Errors/HTTPError.ts","src/Typesense/Errors/ImportError.ts","src/Typesense/Errors/MissingConfigurationError.ts","src/Typesense/Errors/ObjectAlreadyExists.ts","src/Typesense/Errors/ObjectNotFound.ts","src/Typesense/Errors/ObjectUnprocessable.ts","src/Typesense/Errors/RequestMalformed.ts","src/Typesense/Errors/RequestUnauthorized.ts","src/Typesense/Errors/ServerError.ts","src/Typesense/RequestWithCache.ts","src/Typesense/SearchOnlyCollection.ts"],"names":["f","exports","module","define","amd","window","global","self","this","Typesense","r","e","n","t","o","i","c","require","u","a","Error","code","p","call","length","1","obj","__esModule","default","_typeof","Symbol","iterator","constructor","prototype","utils","bind","Axios","mergeConfig","axios","createInstance","defaultConfig","context","instance","request","extend","create","instanceConfig","Cancel","CancelToken","isCancel","VERSION","version","all","promises","Promise","spread","isAxiosError","settle","cookies","buildURL","buildFullPath","parseHeaders","isURLSameOrigin","createError","defaults","config","resolve","reject","onCanceled","requestData","data","requestHeaders","headers","responseType","done","cancelToken","unsubscribe","signal","removeEventListener","isFormData","xsrfValue","XMLHttpRequest","fullPath","auth","username","password","unescape","encodeURIComponent","Authorization","btoa","baseURL","url","onloadend","response","responseHeaders","getAllResponseHeaders","responseText","status","statusText","value","err","open","method","toUpperCase","params","paramsSerializer","timeout","onreadystatechange","readyState","responseURL","indexOf","setTimeout","onabort","onerror","ontimeout","timeoutErrorMessage","transitional","clarifyTimeoutError","isStandardBrowserEnv","withCredentials","xsrfCookieName","read","undefined","xsrfHeaderName","forEach","val","key","toLowerCase","setRequestHeader","isUndefined","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","type","abort","subscribe","aborted","send","toString","Object","isArray","Array","isArrayBuffer","isObject","isPlainObject","getPrototypeOf","fn","l","hasOwnProperty","isBuffer","isArrayBufferView","result","ArrayBuffer","isView","buffer","isString","isNumber","isDate","isFile","isBlob","isStream","pipe","isURLSearchParams","navigator","product","document","merge","assignValue","slice","arguments","b","thisArg","trim","str","replace","normalizeHeaderName","enhanceError","DEFAULT_CONTENT_TYPE","Content-Type","setContentTypeIfUnset","adapter","silentJSONParsing","forcedJSONParsing","process","transformRequest","stringifySafely","rawValue","parser","encoder","JSON","parse","name","stringify","transformResponse","strictJSONParsing","maxContentLength","maxBodyLength","validateStatus","common","Accept","encode","parts","serializedParams","v","toISOString","push","join","hashmarkIndex","message","__CANCEL__","ignoreDuplicateOf","parsed","split","line","substr","concat","write","expires","path","domain","secure","cookie","Date","toGMTString","match","RegExp","decodeURIComponent","remove","now","originURL","msie","urlParsingNode","resolveURL","setAttribute","href","protocol","host","search","hash","hostname","port","pathname","charAt","test","userAgent","createElement","location","requestURL","error","isAbsoluteURL","combineURLs","requestedURL","args","apply","callback","arr","config1","config2","getMergedValue","target","source","mergeDeepProperties","prop","valueFromConfig2","defaultToConfig2","mergeDirectKeys","mergeMap","timeoutMessage","decompress","transport","httpAgent","httpsAgent","socketPath","responseEncoding","keys","configValue","payload","executor","TypeError","promise","resolvePromise","token","then","_listeners","onfulfilled","_resolve","reason","throwIfRequested","listener","index","splice","InterceptorManager","dispatchRequest","validator","validators","interceptors","configOrUrl","requestInterceptorChain","assertOptions","boolean","synchronousRequestInterceptors","responseInterceptorChain","interceptor","runWhen","synchronous","unshift","fulfilled","rejected","chain","shift","newConfig","onFulfilled","onRejected","getUri","handlers","use","options","eject","id","h","deprecatedWarnings","thing","formatMessage","opt","desc","opts","console","warn","schema","allowUnknown","transformData","throwIfCancellationRequested","relativeURL","toJSON","description","number","fileName","lineNumber","columnNumber","stack","fns","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","clearTimeout","runTimeout","fun","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","len","run","marker","runClearTimeout","Item","array","noop","nextTick","title","browser","env","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","normalizedName","toByteArray","b64","tmp","lens","getLens","validLen","placeHoldersLen","Arr","_byteLength","curByte","revLookup","charCodeAt","fromByteArray","uint8","extraBytes","len2","start","end","output","num","lookup","tripletToBase64","encodeChunk","Uint8Array","34","base64","ieee754","K_MAX_LENGTH","Buffer","INSPECT_MAX_BYTES","createBuffer","RangeError","buf","__proto__","arg","encodingOrOffset","from","allocUnsafe","fromString","string","encoding","isEncoding","byteLength","actual","fromArrayLike","isInstance","byteOffset","valueOf","checked","copy","numberIsNaN","fromObject","toPrimitive","assertSize","size","mustMatch","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","out","toHex","utf8Slice","asciiSlice","ret","Math","min","String","fromCharCode","latin1Slice","utf16leSlice","bytes","res","swap","m","bidirectionalIndexOf","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","readUInt16BE","foundIndex","found","j","asciiWrite","offset","blitBuffer","byteArray","asciiToBytes","ucs2Write","units","hi","lo","utf16leToBytes","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","decodeCodePointsArray","codePoints","MAX_ARGUMENTS_LENGTH","TYPED_ARRAY_SUPPORT","foo","typedArraySupport","defineProperty","enumerable","get","species","configurable","writable","poolSize","alloc","fill","allocUnsafeSlow","_isBuffer","compare","x","y","list","pos","swap16","swap32","swap64","toLocaleString","equals","inspect","max","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","remaining","hexWrite","Number","strLen","parseInt","_arr","checkOffset","ext","checkInt","checkIEEE754","writeFloat","littleEndian","noAssert","writeDouble","newBuf","subarray","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","copyWithin","set","INVALID_BASE64_RE","Infinity","leadSurrogate","base64clean","src","dst","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","d","s","NaN","rt","abs","isNaN","floor","log","LN2","root","definition","undefinedType","isIE","logMethods","bindMethod","methodName","Function","traceForIE","trace","replaceLoggingMethods","level","loggerName","methodFactory","debug","defaultMethodFactory","Logger","defaultLevel","factory","currentLevel","storageKey","getPersistedLevel","storedLevel","localStorage","ignore","exec","levels","TRACE","DEBUG","INFO","WARN","ERROR","SILENT","getLevel","setLevel","persist","levelNum","levelName","persistLevelIfPossible","setDefaultLevel","resetLevel","removeItem","enableAll","disableAll","initialLevel","defaultLogger","_loggersByName","_log","getLogger","noConflict","getLoggers","Client_1","__importDefault","SearchClient_1","Client","Errors","SearchClient","__importStar","HTTPError_1","MissingConfigurationError_1","HTTPError","ObjectAlreadyExists_1","MissingConfigurationError","ObjectNotFound_1","ObjectAlreadyExists","ObjectUnprocessable_1","ObjectNotFound","RequestMalformed_1","ObjectUnprocessable","RequestUnauthorized_1","RequestMalformed","ServerError_1","RequestUnauthorized","ImportError_1","ServerError","TypesenseError_1","ImportError","TypesenseError","Configuration_1","ApiCall_1","MultiSearch_1","SearchOnlyCollection_1","configuration","apiCall","multiSearch","individualCollections","collections","collectionName","SearchOnlyCollection","Collections_1","Collection_1","Aliases_1","Alias_1","Keys_1","Key_1","Debug_1","Metrics_1","Health_1","Operations_1","metrics","health","operations","_collections","_aliases","individualAliases","_keys","individualKeys","aliases","aliasName","Alias","retrieve","endpointPath","RESOURCEPATH","Aliases","upsert","mapping","put","axios_1","Errors_1","ApiCall","apiKey","nodes","nearestNode","connectionTimeoutSeconds","healthcheckIntervalSeconds","numRetriesPerRequest","numRetries","retryIntervalSeconds","sendApiKeyAsQueryParam","additionalUserHeaders","additionalHeaders","logger","initializeMetadataForNodes","currentNodeIndex","endpoint","queryParameters","_a","_b","_c","abortSignal","_d","performRequest","post","bodyParameters","patch","requestType","_e","_f","_g","_h","_j","validate","requestNumber","numTries","node","this_1","getNextNode","abortListener","requestOptions","uriFor","assign","defaultHeaders","transformedData","startsWith","_typeof2","source_1","_l","sent","setNodeHealthcheck","customErrorForResponse","lastException","error_1","timer","isHealthy","nodeDueForHealthcheck","candidateNode","map","isDueForHealthcheck","lastAccessTimestamp","_this","seconds","messageFromServer","errorMessage","httpStatus","_super","__extends","_newTarget","setPrototypeOf","Collections","Debug","Health","Metrics","Operations","perform","operationName","Key","RequestWithCache_1","MultiSearch","useTextContentType","requestWithCache","searchRequests","commonParams","cacheSearchResultsForSeconds","additionalQueryParams","useServerSideSearchCache","queryParams","cacheResponseForSeconds","Configuration","setDefaultPathInNode","setDefaultPortInNode","timeoutSeconds","logLevel","showDeprecationWarnings","validateNodes","isNodeMissingAnyParameters","some","every","masterNode","readReplicaNodes","crypto_1","Keys","generateScopedSearchKey","searchKey","parameters","paramsJSON","digest","createHmac","update","keyPrefix","rawScopedKey","Documents_1","Overrides_1","Override_1","Synonyms_1","Synonym_1","Document_1","Collection","individualDocuments","individualOverrides","individualSynonyms","_documents","_overrides","_synonyms","exists","e_1","documents","documentId","Document","overrides","overrideId","synonyms","synonymId","Override","Overrides","operation","Synonym","Synonyms","partialDocument","SearchOnlyDocuments_1","Documents","SearchOnlyDocuments","action","idOrQuery","createMany","documentsInJSONLFormat","resultsInJSONLFormat","resultsInJSONFormat","failedItems","filter","success","exportStream","searchParameters","importResults","RequestWithCache","responseCache","Map","requestContext","requestFunction","requestFunctionArguments","cacheOptions","maxSize","__spreadArray","requestFunctionArgumentsJSON","cacheEntry","requestTimestamp","oldestEntry","next"],"mappings":"CAAA,SAAAA,GAAA,iBAAAC,SAAA,oBAAAC,OAAAA,OAAAD,QAAAD,IAAA,mBAAAG,QAAAA,OAAAC,IAAAD,OAAA,GAAAH,IAAA,oBAAAK,OAAAA,OAAA,oBAAAC,OAAAA,OAAA,oBAAAC,KAAAA,KAAAC,MAAAC,UAAAT,IAAA,CAAA,WAAA,OAAA,SAAAU,EAAAC,EAAAC,EAAAC,GAAA,SAAAC,EAAAC,EAAAf,GAAA,IAAAY,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,IAAAC,EAAA,mBAAAC,SAAAA,QAAA,IAAAjB,GAAAgB,EAAA,OAAAA,EAAAD,GAAA,GAAA,GAAAG,EAAA,OAAAA,EAAAH,GAAA,GAAA,MAAAI,EAAA,IAAAC,MAAA,uBAAAL,EAAA,MAAAM,KAAA,mBAAAF,EAAAG,EAAAV,EAAAG,GAAA,CAAAd,QAAA,IAAAU,EAAAI,GAAA,GAAAQ,KAAAD,EAAArB,QAAA,SAAAS,GAAA,OAAAI,EAAAH,EAAAI,GAAA,GAAAL,IAAAA,IAAAY,EAAAA,EAAArB,QAAAS,EAAAC,EAAAC,EAAAC,GAAA,OAAAD,EAAAG,GAAAd,QAAA,IAAA,IAAAiB,EAAA,mBAAAD,SAAAA,QAAAF,EAAA,EAAAA,EAAAF,EAAAW,OAAAT,IAAAD,EAAAD,EAAAE,IAAA,OAAAD,EAAA,CAAA,CAAAW,EAAA,CAAA,SAAAR,EAAAf,EAAAD,GCMAC,EAAAD,QANA,SAAAyB,GACA,OAAAA,GAAAA,EAAAC,WA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,K,OAUvF,OAVMpxB,EAAWwoB,EAAA6B,OACjB1vB,KAAKq2B,cAAczS,IAAIiT,EAA8B,CACnDE,iBAAkBjpB,EAClBzI,SAAQA,IAEiBrF,KAAKq2B,cAActb,KAAO4b,IAE7CK,EAAch3B,KAAKq2B,cAAczlB,OAAOqmB,OAAOtxB,MACrD3F,KAAKq2B,cAAL,OAA0BW,IAE5B,CAAA,EAAO3xB,S,UAEX+wB,G,oHC5CA,IAAAf,EAAA50B,EAAA,yBAKE,SAAAkqB,EAA6Blf,EAA+B6e,EAAmCD,GAAlErqB,KAAAyL,KAAAA,EAA+BzL,KAAAsqB,QAAAA,EAAmCtqB,KAAAqqB,cAAAA,EAC7FrqB,KAAKm0B,WAAa,IAAIkB,EAAAE,oBAAoBv1B,KAAKyL,KAAMzL,KAAKsqB,QAAStqB,KAAKqqB,eAG1EM,EAAAlpB,UAAA+yB,UAAA,WACE,OAAOx0B,KAAKm0B,YARH10B,EAAAkrB,qBAUbA,0CzEdA","file":"typesense.min.js","sourcesContent":["(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i