Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

meilisearch

Package Overview
Dependencies
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

meilisearch - npm Package Compare versions

Comparing version 0.10.0 to 0.10.1

4

CHANGELOG.md
## V0.10 (released)
- Fix bug where you could not import the CJS package from a ES6 node environment. #410
## V0.10 (released)
- Build is done 100% with rollup, tsc has been removed #318. Rollup has been updated #283

@@ -4,0 +8,0 @@ - Moved tests to own folder at root #283

24

dist/bundles/meilisearch.cjs.js

@@ -8,14 +8,14 @@ 'use strict';

/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Copyright (c) Microsoft Corporation.
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

@@ -1230,5 +1230,5 @@ /* global Reflect, Promise */

/**
* Change the healthyness to unhealthy
* Set the healthyness to health value
* @memberof Meilisearch
* @method setUnhealthy
* @method changeHealthTo
*/

@@ -1235,0 +1235,0 @@ Meilisearch.prototype.changeHealthTo = function (health) {

"use strict";var t,e=(t=require("axios"))&&"object"==typeof t&&"default"in t?t.default:t,n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Copyright (c) Microsoft Corporation.
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function i(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var r=function(){return(r=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function s(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{c(i.next(t))}catch(t){s(t)}}function u(t){try{c(i.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))}function o(t,e){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var u=function(t){function e(n){var i=t.call(this,n)||this;return i.name="MeiliSearchTimeOutError",i.type=i.constructor.name,Error.captureStackTrace(i,e),i}return i(e,t),e}(Error),c=function(t){function e(e,n){var i,r=t.call(this,e.message)||this;return r.type=r.constructor.name,r.name="MeiliSearchApiError",void 0!==e.response?(r.response={status:e.response.status,statusText:e.response.statusText,path:e.response.config.url,method:e.response.config.method,body:e.response.data},void 0!==(null===(i=e.response.data)||void 0===i?void 0:i.message)&&(r.message=e.response.data.message)):r.request={url:e.request._currentUrl,path:e.config.url,method:e.config.method},void 0!==n&&void 0!==e.stack&&(r.stack=r.name+": "+r.message+"\n"+n.split("\n").slice(1).join("\n")),r}return i(e,t),e}(Error),a=function(){function t(t){void 0!==t.apiKey?this.instance=e.create({baseURL:t.host,headers:{"X-Meili-API-Key":t.apiKey}}):this.instance=e.create({baseURL:t.host}),this.cancelTokenSource=e.CancelToken.source(),this.instance.interceptors.response.use((function(t){return t.data})),this.instance.interceptors.request.use((function(t){return void 0!==t.data?r(r({},t),{data:JSON.stringify(t.data)}):t}))}return t.prototype.get=function(t,e){return s(this,void 0,void 0,(function(){var n,i;return o(this,(function(r){switch(r.label){case 0:n=(new Error).stack,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.instance.get(t,e)];case 2:return[2,r.sent()];case 3:throw i=r.sent(),new c(i,n);case 4:return[2]}}))}))},t.prototype.post=function(t,e,n){return s(this,void 0,void 0,(function(){var i,r;return o(this,(function(s){switch(s.label){case 0:i=(new Error).stack,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.post(t,e,n)];case 2:return[2,s.sent()];case 3:throw r=s.sent(),new c(r,i);case 4:return[2]}}))}))},t.prototype.put=function(t,e,n){return s(this,void 0,void 0,(function(){var i,r;return o(this,(function(s){switch(s.label){case 0:i=(new Error).stack,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.put(t,e,n)];case 2:return[2,s.sent()];case 3:throw r=s.sent(),new c(r,i);case 4:return[2]}}))}))},t.prototype.patch=function(t,e,n){return s(this,void 0,void 0,(function(){var i,r;return o(this,(function(s){switch(s.label){case 0:i=(new Error).stack,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.patch(t,e,n)];case 2:return[2,s.sent()];case 3:throw r=s.sent(),new c(r,i);case 4:return[2]}}))}))},t.prototype.delete=function(t,e){return s(this,void 0,void 0,(function(){var n,i;return o(this,(function(r){switch(r.label){case 0:n=(new Error).stack,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.instance.delete(t,e)];case 2:return[2,r.sent()];case 3:throw i=r.sent(),new c(i,n);case 4:return[2]}}))}))},t}();function h(t){return s(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e){return setTimeout(e,t)}))];case 1:return[2,e.sent()]}}))}))}var d=function(t){function e(e,n){var i=t.call(this,e)||this;return i.uid=n,i}return i(e,t),e.prototype.getUpdateStatus=function(t){return s(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/updates/"+t,[4,this.get(e)];case 1:return[2,n.sent()]}}))}))},e.prototype.waitForPendingUpdate=function(t,e){var n=void 0===e?{}:e,i=n.timeOutMs,r=void 0===i?5e3:i,c=n.intervalMs,a=void 0===c?50:c;return s(this,void 0,void 0,(function(){var e,n;return o(this,(function(i){switch(i.label){case 0:e=Date.now(),i.label=1;case 1:return Date.now()-e<r?[4,this.getUpdateStatus(t)]:[3,4];case 2:return"enqueued"!==(n=i.sent()).status?[2,n]:[4,h(a)];case 3:return i.sent(),[3,1];case 4:throw new u("timeout of "+r+"ms has exceeded on process "+t+" when waiting for pending update to resolve.")}}))}))},e.prototype.getAllUpdateStatus=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/updates",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.search=function(t,e){return s(this,void 0,void 0,(function(){var n,i;return o(this,(function(r){switch(r.label){case 0:return n="/indexes/"+this.uid+"/search",i={q:t},void 0!==e&&(void 0!==e.offset&&(i.offset=e.offset),void 0!==e.limit&&(i.limit=e.limit),void 0!==e.attributesToRetrieve&&(Array.isArray(e.attributesToRetrieve)?i.attributesToRetrieve=e.attributesToRetrieve.join(","):i.attributesToRetrieve=e.attributesToRetrieve),void 0!==e.attributesToCrop&&(Array.isArray(e.attributesToCrop)?i.attributesToCrop=e.attributesToCrop.join(","):i.attributesToCrop=e.attributesToCrop),void 0!==e.cropLength&&(i.cropLength=e.cropLength),void 0!==e.attributesToHighlight&&(Array.isArray(e.attributesToHighlight)?i.attributesToHighlight=e.attributesToHighlight.join(","):i.attributesToHighlight=e.attributesToHighlight),void 0!==e.filters&&(i.filters=e.filters),void 0!==e.matches&&(i.matches=e.matches)),[4,this.get(n,{params:i,cancelToken:this.cancelTokenSource.token})];case 1:return[2,r.sent()]}}))}))},e.prototype.show=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid,[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateIndex=function(t){return s(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid,[4,this.put(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.deleteIndex=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid,[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getStats=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/stats",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getDocuments=function(t){return s(this,void 0,void 0,(function(){var e,n;return o(this,(function(i){switch(i.label){case 0:return e="/indexes/"+this.uid+"/documents",void 0!==t&&Array.isArray(t.attributesToRetrieve)&&(n=t.attributesToRetrieve.join(",")),[4,this.get(e,{params:r(r({},t),void 0!==n?{attributesToRetrieve:n}:{})})];case 1:return[2,i.sent()]}}))}))},e.prototype.getDocument=function(t){return s(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/documents/"+t,[4,this.get(e)];case 1:return[2,n.sent()]}}))}))},e.prototype.addDocuments=function(t,e){return s(this,void 0,void 0,(function(){var n;return o(this,(function(i){switch(i.label){case 0:return n="/indexes/"+this.uid+"/documents",[4,this.post(n,t,{params:e})];case 1:return[2,i.sent()]}}))}))},e.prototype.updateDocuments=function(t,e){return s(this,void 0,void 0,(function(){var n;return o(this,(function(i){switch(i.label){case 0:return n="/indexes/"+this.uid+"/documents",[4,this.put(n,t,{params:e})];case 1:return[2,i.sent()]}}))}))},e.prototype.deleteDocument=function(t){return s(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/documents/"+t,[4,this.delete(e)];case 1:return[2,n.sent()]}}))}))},e.prototype.deleteDocuments=function(t){return s(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/documents/delete-batch",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.deleteAllDocuments=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/documents",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getSettings=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateSettings=function(t){return s(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetSettings=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getSynonyms=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/synonyms",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateSynonyms=function(t){return s(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/synonyms",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetSynonyms=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/synonyms",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getStopWords=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/stop-words",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateStopWords=function(t){return s(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/stop-words",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetStopWords=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/stop-words",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getRankingRules=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/ranking-rules",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateRankingRules=function(t){return s(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/ranking-rules",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetRankingRules=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/ranking-rules",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getDistinctAttribute=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/distinct-attribute",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateDistinctAttribute=function(t){return s(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/distinct-attribute",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetDistinctAttribute=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/distinct-attribute",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getSearchableAttributes=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/searchable-attributes",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateSearchableAttributes=function(t){return s(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/searchable-attributes",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetSearchableAttributes=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/searchable-attributes",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getDisplayedAttributes=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/displayed-attributes",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateDisplayedAttributes=function(t){return s(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/displayed-attributes",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetDisplayedAttributes=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/displayed-attributes",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getAcceptNewFields=function(){return s(this,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/accept-new-fields",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateAcceptNewFields=function(t){return s(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/accept-new-fields",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e}(a),l=function(t){function e(e){var n=t.call(this,e)||this;return n.config=e,n}return i(e,t),e.prototype.getIndex=function(t){return new d(this.config,t)},e.prototype.listIndexes=function(){return s(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return"/indexes",[4,this.get("/indexes")];case 1:return[2,t.sent()]}}))}))},e.prototype.createIndex=function(t){return s(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return"/indexes",[4,this.post("/indexes",t)];case 1:return e=n.sent(),[2,new d(this.config,e.uid)]}}))}))},e.prototype.getKeys=function(){return s(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return"/keys",[4,this.get("/keys")];case 1:return[2,t.sent()]}}))}))},e.prototype.isHealthy=function(){return s(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return"/health",[4,this.get("/health").then((function(t){return!0}))];case 1:return[2,t.sent()]}}))}))},e.prototype.setHealthy=function(){return s(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return"/health",[4,this.put("/health",{health:!0})];case 1:return[2,t.sent()]}}))}))},e.prototype.setUnhealthy=function(){return s(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return"/health",[4,this.put("/health",{health:!1})];case 1:return[2,t.sent()]}}))}))},e.prototype.changeHealthTo=function(t){return s(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return"/health",[4,this.put("/health",{health:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.stats=function(){return s(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return"/stats",[4,this.get("/stats")];case 1:return[2,t.sent()]}}))}))},e.prototype.version=function(){return s(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return"/version",[4,this.get("/version")];case 1:return[2,t.sent()]}}))}))},e.prototype.sysInfo=function(){return s(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return"/sys-info",[4,this.get("/sys-info")];case 1:return[2,t.sent()]}}))}))},e.prototype.prettySysInfo=function(){return s(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return"/sys-info/pretty",[4,this.get("/sys-info/pretty")];case 1:return[2,t.sent()]}}))}))},e}(a);module.exports=l;
//# sourceMappingURL=meilisearch.cjs.min.js.map
import instance from 'axios';
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Copyright (c) Microsoft Corporation.
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

@@ -1225,5 +1225,5 @@ /* global Reflect, Promise */

/**
* Change the healthyness to unhealthy
* Set the healthyness to health value
* @memberof Meilisearch
* @method setUnhealthy
* @method changeHealthTo
*/

@@ -1230,0 +1230,0 @@ Meilisearch.prototype.changeHealthTo = function (health) {

import t from"axios";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Copyright (c) Microsoft Corporation.
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,n)};function n(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function r(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{c(i.next(t))}catch(t){s(t)}}function u(t){try{c(i.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))}function s(t,e){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var o=function(t){function e(n){var i=t.call(this,n)||this;return i.name="MeiliSearchTimeOutError",i.type=i.constructor.name,Error.captureStackTrace(i,e),i}return n(e,t),e}(Error),u=function(t){function e(e,n){var i,r=t.call(this,e.message)||this;return r.type=r.constructor.name,r.name="MeiliSearchApiError",void 0!==e.response?(r.response={status:e.response.status,statusText:e.response.statusText,path:e.response.config.url,method:e.response.config.method,body:e.response.data},void 0!==(null===(i=e.response.data)||void 0===i?void 0:i.message)&&(r.message=e.response.data.message)):r.request={url:e.request._currentUrl,path:e.config.url,method:e.config.method},void 0!==n&&void 0!==e.stack&&(r.stack=r.name+": "+r.message+"\n"+n.split("\n").slice(1).join("\n")),r}return n(e,t),e}(Error),c=function(){function e(e){void 0!==e.apiKey?this.instance=t.create({baseURL:e.host,headers:{"X-Meili-API-Key":e.apiKey}}):this.instance=t.create({baseURL:e.host}),this.cancelTokenSource=t.CancelToken.source(),this.instance.interceptors.response.use((function(t){return t.data})),this.instance.interceptors.request.use((function(t){return void 0!==t.data?i(i({},t),{data:JSON.stringify(t.data)}):t}))}return e.prototype.get=function(t,e){return r(this,void 0,void 0,(function(){var n,i;return s(this,(function(r){switch(r.label){case 0:n=(new Error).stack,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.instance.get(t,e)];case 2:return[2,r.sent()];case 3:throw i=r.sent(),new u(i,n);case 4:return[2]}}))}))},e.prototype.post=function(t,e,n){return r(this,void 0,void 0,(function(){var i,r;return s(this,(function(s){switch(s.label){case 0:i=(new Error).stack,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.post(t,e,n)];case 2:return[2,s.sent()];case 3:throw r=s.sent(),new u(r,i);case 4:return[2]}}))}))},e.prototype.put=function(t,e,n){return r(this,void 0,void 0,(function(){var i,r;return s(this,(function(s){switch(s.label){case 0:i=(new Error).stack,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.put(t,e,n)];case 2:return[2,s.sent()];case 3:throw r=s.sent(),new u(r,i);case 4:return[2]}}))}))},e.prototype.patch=function(t,e,n){return r(this,void 0,void 0,(function(){var i,r;return s(this,(function(s){switch(s.label){case 0:i=(new Error).stack,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.patch(t,e,n)];case 2:return[2,s.sent()];case 3:throw r=s.sent(),new u(r,i);case 4:return[2]}}))}))},e.prototype.delete=function(t,e){return r(this,void 0,void 0,(function(){var n,i;return s(this,(function(r){switch(r.label){case 0:n=(new Error).stack,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.instance.delete(t,e)];case 2:return[2,r.sent()];case 3:throw i=r.sent(),new u(i,n);case 4:return[2]}}))}))},e}();function a(t){return r(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e){return setTimeout(e,t)}))];case 1:return[2,e.sent()]}}))}))}var h=function(t){function e(e,n){var i=t.call(this,e)||this;return i.uid=n,i}return n(e,t),e.prototype.getUpdateStatus=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/updates/"+t,[4,this.get(e)];case 1:return[2,n.sent()]}}))}))},e.prototype.waitForPendingUpdate=function(t,e){var n=void 0===e?{}:e,i=n.timeOutMs,u=void 0===i?5e3:i,c=n.intervalMs,h=void 0===c?50:c;return r(this,void 0,void 0,(function(){var e,n;return s(this,(function(i){switch(i.label){case 0:e=Date.now(),i.label=1;case 1:return Date.now()-e<u?[4,this.getUpdateStatus(t)]:[3,4];case 2:return"enqueued"!==(n=i.sent()).status?[2,n]:[4,a(h)];case 3:return i.sent(),[3,1];case 4:throw new o("timeout of "+u+"ms has exceeded on process "+t+" when waiting for pending update to resolve.")}}))}))},e.prototype.getAllUpdateStatus=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/updates",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.search=function(t,e){return r(this,void 0,void 0,(function(){var n,i;return s(this,(function(r){switch(r.label){case 0:return n="/indexes/"+this.uid+"/search",i={q:t},void 0!==e&&(void 0!==e.offset&&(i.offset=e.offset),void 0!==e.limit&&(i.limit=e.limit),void 0!==e.attributesToRetrieve&&(Array.isArray(e.attributesToRetrieve)?i.attributesToRetrieve=e.attributesToRetrieve.join(","):i.attributesToRetrieve=e.attributesToRetrieve),void 0!==e.attributesToCrop&&(Array.isArray(e.attributesToCrop)?i.attributesToCrop=e.attributesToCrop.join(","):i.attributesToCrop=e.attributesToCrop),void 0!==e.cropLength&&(i.cropLength=e.cropLength),void 0!==e.attributesToHighlight&&(Array.isArray(e.attributesToHighlight)?i.attributesToHighlight=e.attributesToHighlight.join(","):i.attributesToHighlight=e.attributesToHighlight),void 0!==e.filters&&(i.filters=e.filters),void 0!==e.matches&&(i.matches=e.matches)),[4,this.get(n,{params:i,cancelToken:this.cancelTokenSource.token})];case 1:return[2,r.sent()]}}))}))},e.prototype.show=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid,[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateIndex=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid,[4,this.put(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.deleteIndex=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid,[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getStats=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/stats",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getDocuments=function(t){return r(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/indexes/"+this.uid+"/documents",void 0!==t&&Array.isArray(t.attributesToRetrieve)&&(n=t.attributesToRetrieve.join(",")),[4,this.get(e,{params:i(i({},t),void 0!==n?{attributesToRetrieve:n}:{})})];case 1:return[2,r.sent()]}}))}))},e.prototype.getDocument=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/documents/"+t,[4,this.get(e)];case 1:return[2,n.sent()]}}))}))},e.prototype.addDocuments=function(t,e){return r(this,void 0,void 0,(function(){var n;return s(this,(function(i){switch(i.label){case 0:return n="/indexes/"+this.uid+"/documents",[4,this.post(n,t,{params:e})];case 1:return[2,i.sent()]}}))}))},e.prototype.updateDocuments=function(t,e){return r(this,void 0,void 0,(function(){var n;return s(this,(function(i){switch(i.label){case 0:return n="/indexes/"+this.uid+"/documents",[4,this.put(n,t,{params:e})];case 1:return[2,i.sent()]}}))}))},e.prototype.deleteDocument=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/documents/"+t,[4,this.delete(e)];case 1:return[2,n.sent()]}}))}))},e.prototype.deleteDocuments=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/documents/delete-batch",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.deleteAllDocuments=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/documents",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getSettings=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateSettings=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetSettings=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getSynonyms=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/synonyms",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateSynonyms=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/synonyms",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetSynonyms=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/synonyms",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getStopWords=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/stop-words",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateStopWords=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/stop-words",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetStopWords=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/stop-words",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getRankingRules=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/ranking-rules",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateRankingRules=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/ranking-rules",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetRankingRules=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/ranking-rules",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getDistinctAttribute=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/distinct-attribute",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateDistinctAttribute=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/distinct-attribute",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetDistinctAttribute=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/distinct-attribute",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getSearchableAttributes=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/searchable-attributes",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateSearchableAttributes=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/searchable-attributes",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetSearchableAttributes=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/searchable-attributes",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getDisplayedAttributes=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/displayed-attributes",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateDisplayedAttributes=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/displayed-attributes",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetDisplayedAttributes=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/displayed-attributes",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getAcceptNewFields=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/accept-new-fields",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateAcceptNewFields=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/accept-new-fields",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e}(c),d=function(t){function e(e){var n=t.call(this,e)||this;return n.config=e,n}return n(e,t),e.prototype.getIndex=function(t){return new h(this.config,t)},e.prototype.listIndexes=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/indexes",[4,this.get("/indexes")];case 1:return[2,t.sent()]}}))}))},e.prototype.createIndex=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return"/indexes",[4,this.post("/indexes",t)];case 1:return e=n.sent(),[2,new h(this.config,e.uid)]}}))}))},e.prototype.getKeys=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/keys",[4,this.get("/keys")];case 1:return[2,t.sent()]}}))}))},e.prototype.isHealthy=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/health",[4,this.get("/health").then((function(t){return!0}))];case 1:return[2,t.sent()]}}))}))},e.prototype.setHealthy=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/health",[4,this.put("/health",{health:!0})];case 1:return[2,t.sent()]}}))}))},e.prototype.setUnhealthy=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/health",[4,this.put("/health",{health:!1})];case 1:return[2,t.sent()]}}))}))},e.prototype.changeHealthTo=function(t){return r(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return"/health",[4,this.put("/health",{health:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.stats=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/stats",[4,this.get("/stats")];case 1:return[2,t.sent()]}}))}))},e.prototype.version=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/version",[4,this.get("/version")];case 1:return[2,t.sent()]}}))}))},e.prototype.sysInfo=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/sys-info",[4,this.get("/sys-info")];case 1:return[2,t.sent()]}}))}))},e.prototype.prettySysInfo=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/sys-info/pretty",[4,this.get("/sys-info/pretty")];case 1:return[2,t.sent()]}}))}))},e}(c);export default d;
//# sourceMappingURL=meilisearch.esm.min.js.map

@@ -10,14 +10,14 @@ (function (global, factory) {

/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Copyright (c) Microsoft Corporation.
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */

@@ -1232,5 +1232,5 @@ /* global Reflect, Promise */

/**
* Change the healthyness to unhealthy
* Set the healthyness to health value
* @memberof Meilisearch
* @method setUnhealthy
* @method changeHealthTo
*/

@@ -1237,0 +1237,0 @@ Meilisearch.prototype.changeHealthTo = function (health) {

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("axios")):"function"==typeof define&&define.amd?define(["axios"],e):(t=t||self).Meilisearch=e(t.axios)}(this,(function(t){"use strict";t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
Copyright (c) Microsoft Corporation.
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,n)};function n(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function r(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{c(i.next(t))}catch(t){s(t)}}function u(t){try{c(i.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))}function s(t,e){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var o=function(t){function e(n){var i=t.call(this,n)||this;return i.name="MeiliSearchTimeOutError",i.type=i.constructor.name,Error.captureStackTrace(i,e),i}return n(e,t),e}(Error),u=function(t){function e(e,n){var i,r=t.call(this,e.message)||this;return r.type=r.constructor.name,r.name="MeiliSearchApiError",void 0!==e.response?(r.response={status:e.response.status,statusText:e.response.statusText,path:e.response.config.url,method:e.response.config.method,body:e.response.data},void 0!==(null===(i=e.response.data)||void 0===i?void 0:i.message)&&(r.message=e.response.data.message)):r.request={url:e.request._currentUrl,path:e.config.url,method:e.config.method},void 0!==n&&void 0!==e.stack&&(r.stack=r.name+": "+r.message+"\n"+n.split("\n").slice(1).join("\n")),r}return n(e,t),e}(Error),c=function(){function e(e){void 0!==e.apiKey?this.instance=t.create({baseURL:e.host,headers:{"X-Meili-API-Key":e.apiKey}}):this.instance=t.create({baseURL:e.host}),this.cancelTokenSource=t.CancelToken.source(),this.instance.interceptors.response.use((function(t){return t.data})),this.instance.interceptors.request.use((function(t){return void 0!==t.data?i(i({},t),{data:JSON.stringify(t.data)}):t}))}return e.prototype.get=function(t,e){return r(this,void 0,void 0,(function(){var n,i;return s(this,(function(r){switch(r.label){case 0:n=(new Error).stack,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.instance.get(t,e)];case 2:return[2,r.sent()];case 3:throw i=r.sent(),new u(i,n);case 4:return[2]}}))}))},e.prototype.post=function(t,e,n){return r(this,void 0,void 0,(function(){var i,r;return s(this,(function(s){switch(s.label){case 0:i=(new Error).stack,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.post(t,e,n)];case 2:return[2,s.sent()];case 3:throw r=s.sent(),new u(r,i);case 4:return[2]}}))}))},e.prototype.put=function(t,e,n){return r(this,void 0,void 0,(function(){var i,r;return s(this,(function(s){switch(s.label){case 0:i=(new Error).stack,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.put(t,e,n)];case 2:return[2,s.sent()];case 3:throw r=s.sent(),new u(r,i);case 4:return[2]}}))}))},e.prototype.patch=function(t,e,n){return r(this,void 0,void 0,(function(){var i,r;return s(this,(function(s){switch(s.label){case 0:i=(new Error).stack,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.patch(t,e,n)];case 2:return[2,s.sent()];case 3:throw r=s.sent(),new u(r,i);case 4:return[2]}}))}))},e.prototype.delete=function(t,e){return r(this,void 0,void 0,(function(){var n,i;return s(this,(function(r){switch(r.label){case 0:n=(new Error).stack,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.instance.delete(t,e)];case 2:return[2,r.sent()];case 3:throw i=r.sent(),new u(i,n);case 4:return[2]}}))}))},e}();function a(t){return r(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e){return setTimeout(e,t)}))];case 1:return[2,e.sent()]}}))}))}var h=function(t){function e(e,n){var i=t.call(this,e)||this;return i.uid=n,i}return n(e,t),e.prototype.getUpdateStatus=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/updates/"+t,[4,this.get(e)];case 1:return[2,n.sent()]}}))}))},e.prototype.waitForPendingUpdate=function(t,e){var n=void 0===e?{}:e,i=n.timeOutMs,u=void 0===i?5e3:i,c=n.intervalMs,h=void 0===c?50:c;return r(this,void 0,void 0,(function(){var e,n;return s(this,(function(i){switch(i.label){case 0:e=Date.now(),i.label=1;case 1:return Date.now()-e<u?[4,this.getUpdateStatus(t)]:[3,4];case 2:return"enqueued"!==(n=i.sent()).status?[2,n]:[4,a(h)];case 3:return i.sent(),[3,1];case 4:throw new o("timeout of "+u+"ms has exceeded on process "+t+" when waiting for pending update to resolve.")}}))}))},e.prototype.getAllUpdateStatus=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/updates",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.search=function(t,e){return r(this,void 0,void 0,(function(){var n,i;return s(this,(function(r){switch(r.label){case 0:return n="/indexes/"+this.uid+"/search",i={q:t},void 0!==e&&(void 0!==e.offset&&(i.offset=e.offset),void 0!==e.limit&&(i.limit=e.limit),void 0!==e.attributesToRetrieve&&(Array.isArray(e.attributesToRetrieve)?i.attributesToRetrieve=e.attributesToRetrieve.join(","):i.attributesToRetrieve=e.attributesToRetrieve),void 0!==e.attributesToCrop&&(Array.isArray(e.attributesToCrop)?i.attributesToCrop=e.attributesToCrop.join(","):i.attributesToCrop=e.attributesToCrop),void 0!==e.cropLength&&(i.cropLength=e.cropLength),void 0!==e.attributesToHighlight&&(Array.isArray(e.attributesToHighlight)?i.attributesToHighlight=e.attributesToHighlight.join(","):i.attributesToHighlight=e.attributesToHighlight),void 0!==e.filters&&(i.filters=e.filters),void 0!==e.matches&&(i.matches=e.matches)),[4,this.get(n,{params:i,cancelToken:this.cancelTokenSource.token})];case 1:return[2,r.sent()]}}))}))},e.prototype.show=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid,[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateIndex=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid,[4,this.put(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.deleteIndex=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid,[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getStats=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/stats",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getDocuments=function(t){return r(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/indexes/"+this.uid+"/documents",void 0!==t&&Array.isArray(t.attributesToRetrieve)&&(n=t.attributesToRetrieve.join(",")),[4,this.get(e,{params:i(i({},t),void 0!==n?{attributesToRetrieve:n}:{})})];case 1:return[2,r.sent()]}}))}))},e.prototype.getDocument=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/documents/"+t,[4,this.get(e)];case 1:return[2,n.sent()]}}))}))},e.prototype.addDocuments=function(t,e){return r(this,void 0,void 0,(function(){var n;return s(this,(function(i){switch(i.label){case 0:return n="/indexes/"+this.uid+"/documents",[4,this.post(n,t,{params:e})];case 1:return[2,i.sent()]}}))}))},e.prototype.updateDocuments=function(t,e){return r(this,void 0,void 0,(function(){var n;return s(this,(function(i){switch(i.label){case 0:return n="/indexes/"+this.uid+"/documents",[4,this.put(n,t,{params:e})];case 1:return[2,i.sent()]}}))}))},e.prototype.deleteDocument=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/documents/"+t,[4,this.delete(e)];case 1:return[2,n.sent()]}}))}))},e.prototype.deleteDocuments=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/documents/delete-batch",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.deleteAllDocuments=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/documents",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getSettings=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateSettings=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetSettings=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getSynonyms=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/synonyms",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateSynonyms=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/synonyms",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetSynonyms=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/synonyms",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getStopWords=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/stop-words",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateStopWords=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/stop-words",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetStopWords=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/stop-words",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getRankingRules=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/ranking-rules",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateRankingRules=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/ranking-rules",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetRankingRules=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/ranking-rules",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getDistinctAttribute=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/distinct-attribute",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateDistinctAttribute=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/distinct-attribute",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetDistinctAttribute=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/distinct-attribute",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getSearchableAttributes=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/searchable-attributes",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateSearchableAttributes=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/searchable-attributes",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetSearchableAttributes=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/searchable-attributes",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getDisplayedAttributes=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/displayed-attributes",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateDisplayedAttributes=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/displayed-attributes",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e.prototype.resetDisplayedAttributes=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/displayed-attributes",[4,this.delete(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.getAcceptNewFields=function(){return r(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/indexes/"+this.uid+"/settings/accept-new-fields",[4,this.get(t)];case 1:return[2,e.sent()]}}))}))},e.prototype.updateAcceptNewFields=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/indexes/"+this.uid+"/settings/accept-new-fields",[4,this.post(e,t)];case 1:return[2,n.sent()]}}))}))},e}(c);return function(t){function e(e){var n=t.call(this,e)||this;return n.config=e,n}return n(e,t),e.prototype.getIndex=function(t){return new h(this.config,t)},e.prototype.listIndexes=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/indexes",[4,this.get("/indexes")];case 1:return[2,t.sent()]}}))}))},e.prototype.createIndex=function(t){return r(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return"/indexes",[4,this.post("/indexes",t)];case 1:return e=n.sent(),[2,new h(this.config,e.uid)]}}))}))},e.prototype.getKeys=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/keys",[4,this.get("/keys")];case 1:return[2,t.sent()]}}))}))},e.prototype.isHealthy=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/health",[4,this.get("/health").then((function(t){return!0}))];case 1:return[2,t.sent()]}}))}))},e.prototype.setHealthy=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/health",[4,this.put("/health",{health:!0})];case 1:return[2,t.sent()]}}))}))},e.prototype.setUnhealthy=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/health",[4,this.put("/health",{health:!1})];case 1:return[2,t.sent()]}}))}))},e.prototype.changeHealthTo=function(t){return r(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return"/health",[4,this.put("/health",{health:t})];case 1:return[2,e.sent()]}}))}))},e.prototype.stats=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/stats",[4,this.get("/stats")];case 1:return[2,t.sent()]}}))}))},e.prototype.version=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/version",[4,this.get("/version")];case 1:return[2,t.sent()]}}))}))},e.prototype.sysInfo=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/sys-info",[4,this.get("/sys-info")];case 1:return[2,t.sent()]}}))}))},e.prototype.prettySysInfo=function(){return r(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return"/sys-info/pretty",[4,this.get("/sys-info/pretty")];case 1:return[2,t.sent()]}}))}))},e}(c)}));
//# sourceMappingURL=meilisearch.umd.min.js.map

@@ -172,3 +172,3 @@ import MeiliAxiosWrapper from './meili-axios-wrapper';

*/
getDistinctAttribute(): Promise<string | void>;
getDistinctAttribute(): Promise<string | null>;
/**

@@ -175,0 +175,0 @@ * Update the distinct-attribute.

@@ -50,5 +50,5 @@ import { Index } from './index';

/**
* Change the healthyness to unhealthy
* Set the healthyness to health value
* @memberof Meilisearch
* @method setUnhealthy
* @method changeHealthTo
*/

@@ -55,0 +55,0 @@ changeHealthTo(health: boolean): Promise<void>;

@@ -1,6 +0,6 @@

// Type definitions for meilisearch 0.10.0
// Type definitions for meilisearch 0.10.1
// Project: https://github.com/meilisearch/meilisearch-js
// Definitions by: cvermand <charlotte@meilisearch.com> <https://github.com/meilisearch>
// Definitions: https://github.com/meilisearch/meilisearch-js
// TypeScript Version: ^3.8.3
// TypeScript Version: 3.9.3

@@ -159,54 +159,54 @@ import { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse, CancelTokenSource } from 'axios';

config: Config;
getIndex(indexUid: string): Index;
listIndexes(): Promise<IndexResponse[]>;
createIndex(data: IndexRequest): Promise<Index>;
getKeys(): Promise<Keys>;
isHealthy(): Promise<boolean>;
setHealthy(): Promise<void>;
setUnhealthy(): Promise<void>;
changeHealthTo(health: boolean): Promise<void>;
stats(): Promise<Stats>;
version(): Promise<Version>;
sysInfo(): Promise<SysInfo>;
prettySysInfo(): Promise<SysInfoPretty>;
getIndex: (indexUid: string) => Index;
listIndexes: () => Promise<IndexResponse[]>;
createIndex: (data: IndexRequest) => Promise<Index>;
getKeys: () => Promise<Keys>;
isHealthy: () => Promise<boolean>;
setHealthy: () => Promise<void>;
setUnhealthy: () => Promise<void>;
changeHealthTo: (health: boolean) => Promise<void>;
stats: () => Promise<Stats>;
version: () => Promise<Version>;
sysInfo: () => Promise<SysInfo>;
prettySysInfo: () => Promise<SysInfoPretty>;
}
export interface IndexInterface extends MeiliAxiosWrapperInterface {
uid: string;
getUpdateStatus(updateId: number): Promise<Update>;
getAllUpdateStatus(): Promise<Update[]>;
search(query: string, options?: SearchParams): Promise<SearchResponse>;
show(): Promise<IndexResponse>;
updateIndex(data: UpdateIndexRequest): Promise<IndexResponse>;
deleteIndex(): Promise<string>;
getStats(): Promise<IndexStats>;
getDocuments(options?: GetDocumentsParams): Promise<Document[]>;
getDocument(documentId: string | number): Promise<Document>;
addDocuments(documents: Document[], options?: AddDocumentParams): Promise<EnqueuedUpdate>;
updateDocuments(documents: Document[], options?: AddDocumentParams): Promise<EnqueuedUpdate>;
deleteDocument(documentId: string | number): Promise<EnqueuedUpdate>;
deleteDocuments(documentsIds: string[] | number[]): Promise<EnqueuedUpdate>;
deleteAllDocuments(): Promise<EnqueuedUpdate>;
getSettings(): Promise<Settings>;
updateSettings(settings: Settings): Promise<EnqueuedUpdate>;
resetSettings(): Promise<EnqueuedUpdate>;
getSynonyms(): Promise<object>;
updateSynonyms(synonyms: object): Promise<object>;
resetSynonyms(): Promise<object>;
getStopWords(): Promise<string[]>;
updateStopWords(stopWords: string[]): Promise<EnqueuedUpdate>;
resetStopWords(): Promise<EnqueuedUpdate>;
getRankingRules(): Promise<string[]>;
updateRankingRules(rankingRules: string[]): Promise<EnqueuedUpdate>;
resetRankingRules(): Promise<EnqueuedUpdate>;
getDistinctAttribute(): Promise<string | void>;
updateDistinctAttribute(distinctAttribute: string): Promise<EnqueuedUpdate>;
resetDistinctAttribute(): Promise<EnqueuedUpdate>;
getSearchableAttributes(): Promise<string[]>;
updateSearchableAttributes(searchableAttributes: string[]): Promise<EnqueuedUpdate>;
resetSearchableAttributes(): Promise<EnqueuedUpdate>;
getDisplayedAttributes(): Promise<string[]>;
updateDisplayedAttributes(displayedAttributes: string[]): Promise<EnqueuedUpdate>;
resetDisplayedAttributes(): Promise<EnqueuedUpdate>;
getAcceptNewFields(): Promise<boolean>;
updateAcceptNewFields(acceptNewFields: boolean): Promise<EnqueuedUpdate>;
getUpdateStatus: (updateId: number) => Promise<Update>;
getAllUpdateStatus: () => Promise<Update[]>;
search: (query: string, options?: SearchParams) => Promise<SearchResponse>;
show: () => Promise<IndexResponse>;
updateIndex: (data: UpdateIndexRequest) => Promise<IndexResponse>;
deleteIndex: () => Promise<string>;
getStats: () => Promise<IndexStats>;
getDocuments: (options?: GetDocumentsParams) => Promise<Document[]>;
getDocument: (documentId: string | number) => Promise<Document>;
addDocuments: (documents: Document[], options?: AddDocumentParams) => Promise<EnqueuedUpdate>;
updateDocuments: (documents: Document[], options?: AddDocumentParams) => Promise<EnqueuedUpdate>;
deleteDocument: (documentId: string | number) => Promise<EnqueuedUpdate>;
deleteDocuments: (documentsIds: string[] | number[]) => Promise<EnqueuedUpdate>;
deleteAllDocuments: () => Promise<EnqueuedUpdate>;
getSettings: () => Promise<Settings>;
updateSettings: (settings: Settings) => Promise<EnqueuedUpdate>;
resetSettings: () => Promise<EnqueuedUpdate>;
getSynonyms: () => Promise<object>;
updateSynonyms: (synonyms: object) => Promise<object>;
resetSynonyms: () => Promise<object>;
getStopWords: () => Promise<string[]>;
updateStopWords: (stopWords: string[]) => Promise<EnqueuedUpdate>;
resetStopWords: () => Promise<EnqueuedUpdate>;
getRankingRules: () => Promise<string[]>;
updateRankingRules: (rankingRules: string[]) => Promise<EnqueuedUpdate>;
resetRankingRules: () => Promise<EnqueuedUpdate>;
getDistinctAttribute: () => Promise<string | null>;
updateDistinctAttribute: (distinctAttribute: string) => Promise<EnqueuedUpdate>;
resetDistinctAttribute: () => Promise<EnqueuedUpdate>;
getSearchableAttributes: () => Promise<string[]>;
updateSearchableAttributes: (searchableAttributes: string[]) => Promise<EnqueuedUpdate>;
resetSearchableAttributes: () => Promise<EnqueuedUpdate>;
getDisplayedAttributes: () => Promise<string[]>;
updateDisplayedAttributes: (displayedAttributes: string[]) => Promise<EnqueuedUpdate>;
resetDisplayedAttributes: () => Promise<EnqueuedUpdate>;
getAcceptNewFields: () => Promise<boolean>;
updateAcceptNewFields: (acceptNewFields: boolean) => Promise<EnqueuedUpdate>;
}

@@ -216,8 +216,7 @@ export interface MeiliAxiosWrapperInterface {

cancelTokenSource: CancelTokenSource;
get<T = any, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>;
post(url: string, data: IndexRequest, config?: AxiosRequestConfig): Promise<IndexResponse>;
post<T = any, R = AxiosResponse<EnqueuedUpdate>>(url: string, data?: T, config?: AxiosRequestConfig): Promise<R>;
put<T = any, R = AxiosResponse<T>>(url: string, data?: any, config?: AxiosRequestConfig): Promise<R>;
patch<T = any, R = AxiosResponse<T>>(url: string, data?: any, config?: AxiosRequestConfig): Promise<R>;
delete<T = any, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig): Promise<R>;
get: <T = any, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig) => Promise<R>;
post: ((url: string, data: IndexRequest, config?: AxiosRequestConfig) => Promise<IndexResponse>) & (<T = any, R = AxiosResponse<EnqueuedUpdate>>(url: string, data?: T, config?: AxiosRequestConfig) => Promise<R>);
put: <T = any, R = AxiosResponse<T>>(url: string, data?: any, config?: AxiosRequestConfig) => Promise<R>;
patch: <T = any, R = AxiosResponse<T>>(url: string, data?: any, config?: AxiosRequestConfig) => Promise<R>;
delete: <T = any, R = AxiosResponse<T>>(url: string, config?: AxiosRequestConfig) => Promise<R>;
}

@@ -224,0 +223,0 @@ export interface MeiliSearchApiErrorInterface extends Error {

{
"name": "meilisearch",
"version": "0.10.0",
"version": "0.10.1",
"description": "The MeiliSearch JS client for Node.js and the browser.",

@@ -39,3 +39,3 @@ "keywords": [

"size": "node scripts/file-size ./dist/bundles/meilisearch.umd.min.js ./dist/bundles/meilisearch.esm.min.js",
"style": "yarn format:fix && yarn lint",
"style": "yarn format && yarn lint",
"style:fix": "yarn format:fix && yarn lint:fix",

@@ -63,14 +63,14 @@ "prettier": "prettier \"**/*.{ts,tsx,js,jsx,css,scss,sass,less,md}\"",

"devDependencies": {
"@rollup/plugin-commonjs": "^11.0.2",
"@rollup/plugin-commonjs": "12.0.0",
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-node-resolve": "^7.1.1",
"@types/jest": "^25.2.1",
"@rollup/plugin-node-resolve": "8.0.0",
"@types/jest": "25.2.3",
"@types/prettier": "^2.0.0",
"@typescript-eslint/eslint-plugin": "2",
"@typescript-eslint/parser": "^2.29.0",
"@typescript-eslint/eslint-plugin": "2.34.0",
"@typescript-eslint/parser": "2.34.0",
"brotli-size": "^4.0.0",
"eslint": "6",
"eslint-config-standard-with-typescript": "^16.0.0",
"eslint-config-standard-with-typescript": "^17.0.0",
"eslint-plugin-import": "2",
"eslint-plugin-jsdoc": "^24.0.0",
"eslint-plugin-jsdoc": "^25.4.2",
"eslint-plugin-node": "11",

@@ -81,14 +81,14 @@ "eslint-plugin-promise": "4",

"jest": "^25.2.4",
"jest-watch-typeahead": "^0.4.2",
"jest-watch-typeahead": "^0.5.0",
"kleur": "^3.0.3",
"lint-staged": "^10.1.0",
"lint-staged": "10.2.6",
"prettier": "^2.0.2",
"pretty-bytes": "^5.3.0",
"rollup": "^2.2.0",
"rollup-plugin-terser": "^5.3.0",
"rollup-plugin-terser": "^6.1.0",
"rollup-plugin-typescript2": "^0.27.0",
"shx": "^0.3.2",
"ts-jest": "^25.3.0",
"typescript": "^3.8.3"
"typescript": "3.9.3"
}
}

@@ -13,3 +13,3 @@ <p align="center">

<a href="https://docs.meilisearch.com">Documentation</a> |
<a href="https://docs.meilisearch.com/resources/faq.html">FAQ</a>
<a href="https://docs.meilisearch.com/faq">FAQ</a>
</h4>

@@ -32,3 +32,4 @@

- [🔧 Installation](#-installation)
- [🚀 Getting started](#-getting-started)
- [🎬 Getting started](#-getting-started)
- [🤖 Compatibility with MeiliSearch](#-compatibility-with-meilisearch)
- [🎬 Examples](#-examples)

@@ -39,3 +40,4 @@ - [Indexes](#indexes)

- [Search](#search)
- [🤖 Compatibility with MeiliSearch](#-compatibility-with-meilisearch)
- [⚙️ Development Workflow](#️-development-workflow)
- [📜 API Resources](#-api-resources)

@@ -52,3 +54,3 @@ ## 🔧 Installation

### 🏃‍♀️ Run MeiliSearch
### 🏃‍♀️ Run MeiliSearch <!-- omit in toc -->

@@ -60,3 +62,3 @@ There are many easy ways to [download and run a MeiliSearch instance](https://docs.meilisearch.com/guides/advanced_guides/installation.html#download-and-launch).

```bash
$ docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest --master-key=masterKey
$ docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey
```

@@ -100,3 +102,3 @@

#### Search in index
#### Search in index <!-- omit in toc -->

@@ -126,2 +128,8 @@ ```javascript

## 🤖 Compatibility with MeiliSearch
This package is compatible with the following MeiliSearch versions:
- `v0.10.X`
## 🎬 Examples

@@ -268,3 +276,3 @@

### Install dependencies
### Install dependencies <!-- omit in toc -->

@@ -275,3 +283,3 @@ ```bash

### Tests and Linter
### Tests and Linter <!-- omit in toc -->

@@ -292,3 +300,3 @@ Each PR should pass the tests and the linter to be accepted.

### Release
### Release <!-- omit in toc -->

@@ -314,9 +322,5 @@ MeiliSearch tools follow the [Semantic Versioning Convention](https://semver.org/).

## 🤖 Compatibility with MeiliSearch
This package works for MeiliSearch `>=0.10.x`.
## 📜 API Resources
### Search
### Search <!-- omit in toc -->

@@ -327,3 +331,3 @@ - Make a search request:

### Indexes
### Indexes <!-- omit in toc -->

@@ -358,3 +362,3 @@ - List all indexes:

### Updates
### Updates <!-- omit in toc -->

@@ -373,3 +377,3 @@ - Get One update info:

### Documents
### Documents <!-- omit in toc -->

@@ -394,10 +398,13 @@ - Add or replace multiple documents:

`index.deleteDocument(documentId: string): Promise<EnqueuedUpdate>`
`index.deleteDocument(documentId: string | number): Promise<EnqueuedUpdate>`
- Delete multiple documents:
`index.deleteDocuments(documentsIds: string[]): Promise<EnqueuedUpdate>`
`index.deleteDocuments(documentsIds: string[] | number[]): Promise<EnqueuedUpdate>`
### Settings
- Delete all documents:
`index.deleteAllDocuments(): Promise<Types.EnqueuedUpdate>`
### Settings <!-- omit in toc -->
- Get settings:

@@ -415,3 +422,3 @@

### Synonyms
### Synonyms <!-- omit in toc -->

@@ -430,3 +437,3 @@ - Get synonyms:

### Stop-words
### Stop-words <!-- omit in toc -->

@@ -440,5 +447,5 @@ - Get Stop Words

- Reset Stop Words
`index.updateStopWords(): Promise<EnqueuedUpdate>`
`index.resetStopWords(): Promise<EnqueuedUpdate>`
### Ranking rules
### Ranking rules <!-- omit in toc -->

@@ -454,3 +461,3 @@ - Get Ranking Rules

### Distinct Attribute
### Distinct Attribute <!-- omit in toc -->

@@ -466,3 +473,3 @@ - Get Distinct Attribute

### Searchable Attributes
### Searchable Attributes <!-- omit in toc -->

@@ -478,3 +485,3 @@ - Get Searchable Attributes

### Displayed Attributes
### Displayed Attributes <!-- omit in toc -->

@@ -490,3 +497,3 @@ - Get Displayed Attributes

### Accept new fields
### Accept new fields <!-- omit in toc -->

@@ -499,4 +506,10 @@ - Get Accept new fields

### Healthy
### Keys <!-- omit in toc -->
- Get keys
`client.getKeys(): Promise<Keys>`
### Healthy <!-- omit in toc -->
- Check if the server is healthy

@@ -506,3 +519,3 @@

### Stats
### Stats <!-- omit in toc -->

@@ -513,3 +526,3 @@ - Get database stats

### Version
### Version <!-- omit in toc -->

@@ -520,3 +533,3 @@ - Get binary version

### System
### System <!-- omit in toc -->

@@ -530,1 +543,5 @@ - Get system information

`client.systemInformationPretty(): Promise<SysInfoPretty>`
<hr>
**MeiliSearch** provides and maintains many **SDKs and Integration tools** like this one. We want to provide everyone with an **amazing search experience for any kind of project**. If you want to contribute, make suggestions, or just know what's going on right now, visit us in the [integration-guides](https://github.com/meilisearch/integration-guides) repository.

@@ -452,3 +452,3 @@ /*

*/
async getDistinctAttribute(): Promise<string | void> {
async getDistinctAttribute(): Promise<string | null> {
const url = `/indexes/${this.uid}/settings/distinct-attribute`

@@ -455,0 +455,0 @@

@@ -111,5 +111,5 @@ /*

/**
* Change the healthyness to unhealthy
* Set the healthyness to health value
* @memberof Meilisearch
* @method setUnhealthy
* @method changeHealthTo
*/

@@ -116,0 +116,0 @@ async changeHealthTo(health: boolean): Promise<void> {

@@ -218,14 +218,14 @@ // Type definitions for meilisearch 0.10.0

config: Config
getIndex(indexUid: string): Index
listIndexes(): Promise<IndexResponse[]>
createIndex(data: IndexRequest): Promise<Index>
getKeys(): Promise<Keys>
isHealthy(): Promise<boolean>
setHealthy(): Promise<void>
setUnhealthy(): Promise<void>
changeHealthTo(health: boolean): Promise<void>
stats(): Promise<Stats>
version(): Promise<Version>
sysInfo(): Promise<SysInfo>
prettySysInfo(): Promise<SysInfoPretty>
getIndex: (indexUid: string) => Index
listIndexes: () => Promise<IndexResponse[]>
createIndex: (data: IndexRequest) => Promise<Index>
getKeys: () => Promise<Keys>
isHealthy: () => Promise<boolean>
setHealthy: () => Promise<void>
setUnhealthy: () => Promise<void>
changeHealthTo: (health: boolean) => Promise<void>
stats: () => Promise<Stats>
version: () => Promise<Version>
sysInfo: () => Promise<SysInfo>
prettySysInfo: () => Promise<SysInfoPretty>
}

@@ -235,49 +235,53 @@

uid: string
getUpdateStatus(updateId: number): Promise<Update>
getAllUpdateStatus(): Promise<Update[]>
search(query: string, options?: SearchParams): Promise<SearchResponse>
show(): Promise<IndexResponse>
updateIndex(data: UpdateIndexRequest): Promise<IndexResponse>
deleteIndex(): Promise<string>
getStats(): Promise<IndexStats>
getDocuments(options?: GetDocumentsParams): Promise<Document[]>
getDocument(documentId: string | number): Promise<Document>
addDocuments(
getUpdateStatus: (updateId: number) => Promise<Update>
getAllUpdateStatus: () => Promise<Update[]>
search: (query: string, options?: SearchParams) => Promise<SearchResponse>
show: () => Promise<IndexResponse>
updateIndex: (data: UpdateIndexRequest) => Promise<IndexResponse>
deleteIndex: () => Promise<string>
getStats: () => Promise<IndexStats>
getDocuments: (options?: GetDocumentsParams) => Promise<Document[]>
getDocument: (documentId: string | number) => Promise<Document>
addDocuments: (
documents: Document[],
options?: AddDocumentParams
): Promise<EnqueuedUpdate>
updateDocuments(
) => Promise<EnqueuedUpdate>
updateDocuments: (
documents: Document[],
options?: AddDocumentParams
): Promise<EnqueuedUpdate>
deleteDocument(documentId: string | number): Promise<EnqueuedUpdate>
deleteDocuments(documentsIds: string[] | number[]): Promise<EnqueuedUpdate>
deleteAllDocuments(): Promise<EnqueuedUpdate>
getSettings(): Promise<Settings>
updateSettings(settings: Settings): Promise<EnqueuedUpdate>
resetSettings(): Promise<EnqueuedUpdate>
getSynonyms(): Promise<object>
updateSynonyms(synonyms: object): Promise<object>
resetSynonyms(): Promise<object>
getStopWords(): Promise<string[]>
updateStopWords(stopWords: string[]): Promise<EnqueuedUpdate>
resetStopWords(): Promise<EnqueuedUpdate>
getRankingRules(): Promise<string[]>
updateRankingRules(rankingRules: string[]): Promise<EnqueuedUpdate>
resetRankingRules(): Promise<EnqueuedUpdate>
getDistinctAttribute(): Promise<string | void>
updateDistinctAttribute(distinctAttribute: string): Promise<EnqueuedUpdate>
resetDistinctAttribute(): Promise<EnqueuedUpdate>
getSearchableAttributes(): Promise<string[]>
updateSearchableAttributes(
) => Promise<EnqueuedUpdate>
deleteDocument: (documentId: string | number) => Promise<EnqueuedUpdate>
deleteDocuments: (
documentsIds: string[] | number[]
) => Promise<EnqueuedUpdate>
deleteAllDocuments: () => Promise<EnqueuedUpdate>
getSettings: () => Promise<Settings>
updateSettings: (settings: Settings) => Promise<EnqueuedUpdate>
resetSettings: () => Promise<EnqueuedUpdate>
getSynonyms: () => Promise<object>
updateSynonyms: (synonyms: object) => Promise<object>
resetSynonyms: () => Promise<object>
getStopWords: () => Promise<string[]>
updateStopWords: (stopWords: string[]) => Promise<EnqueuedUpdate>
resetStopWords: () => Promise<EnqueuedUpdate>
getRankingRules: () => Promise<string[]>
updateRankingRules: (rankingRules: string[]) => Promise<EnqueuedUpdate>
resetRankingRules: () => Promise<EnqueuedUpdate>
getDistinctAttribute: () => Promise<string | null>
updateDistinctAttribute: (
distinctAttribute: string
) => Promise<EnqueuedUpdate>
resetDistinctAttribute: () => Promise<EnqueuedUpdate>
getSearchableAttributes: () => Promise<string[]>
updateSearchableAttributes: (
searchableAttributes: string[]
): Promise<EnqueuedUpdate>
resetSearchableAttributes(): Promise<EnqueuedUpdate>
getDisplayedAttributes(): Promise<string[]>
updateDisplayedAttributes(
) => Promise<EnqueuedUpdate>
resetSearchableAttributes: () => Promise<EnqueuedUpdate>
getDisplayedAttributes: () => Promise<string[]>
updateDisplayedAttributes: (
displayedAttributes: string[]
): Promise<EnqueuedUpdate>
resetDisplayedAttributes(): Promise<EnqueuedUpdate>
getAcceptNewFields(): Promise<boolean>
updateAcceptNewFields(acceptNewFields: boolean): Promise<EnqueuedUpdate>
) => Promise<EnqueuedUpdate>
resetDisplayedAttributes: () => Promise<EnqueuedUpdate>
getAcceptNewFields: () => Promise<boolean>
updateAcceptNewFields: (acceptNewFields: boolean) => Promise<EnqueuedUpdate>
}

@@ -288,30 +292,30 @@

cancelTokenSource: CancelTokenSource
get<T = any, R = AxiosResponse<T>>(
get: <T = any, R = AxiosResponse<T>>(
url: string,
config?: AxiosRequestConfig
): Promise<R>
post(
) => Promise<R>
post: ((
url: string,
data: IndexRequest,
config?: AxiosRequestConfig
): Promise<IndexResponse>
post<T = any, R = AxiosResponse<EnqueuedUpdate>>(
) => Promise<IndexResponse>) &
(<T = any, R = AxiosResponse<EnqueuedUpdate>>(
url: string,
data?: T,
config?: AxiosRequestConfig
): Promise<R>
put<T = any, R = AxiosResponse<T>>(
) => Promise<R>)
put: <T = any, R = AxiosResponse<T>>(
url: string,
data?: any,
config?: AxiosRequestConfig
): Promise<R>
patch<T = any, R = AxiosResponse<T>>(
) => Promise<R>
patch: <T = any, R = AxiosResponse<T>>(
url: string,
data?: any,
config?: AxiosRequestConfig
): Promise<R>
delete<T = any, R = AxiosResponse<T>>(
) => Promise<R>
delete: <T = any, R = AxiosResponse<T>>(
url: string,
config?: AxiosRequestConfig
): Promise<R>
) => Promise<R>
}

@@ -318,0 +322,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc