@algolia/client-query-suggestions 5.0.0-alpha.11 → 5.0.0-alpha.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builds/browser.d.ts +26 -5
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +26 -5
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/{client-query-suggestions.cjs.js → client-query-suggestions.cjs} +364 -353
- package/dist/client-query-suggestions.esm.browser.js +574 -589
- package/dist/client-query-suggestions.esm.node.js +364 -351
- package/dist/client-query-suggestions.umd.js +2 -2
- package/dist/model/appID.d.ts +7 -0
- package/dist/model/appID.d.ts.map +1 -0
- package/dist/model/baseResponse.d.ts +11 -0
- package/dist/model/baseResponse.d.ts.map +1 -0
- package/dist/model/clientMethodProps.d.ts +107 -107
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/errorBase.d.ts +6 -6
- package/dist/model/errorBase.d.ts.map +1 -1
- package/dist/model/facet.d.ts +14 -0
- package/dist/model/facet.d.ts.map +1 -0
- package/dist/model/getConfigStatus200Response.d.ts +23 -0
- package/dist/model/getConfigStatus200Response.d.ts.map +1 -0
- package/dist/model/getLogFile200Response.d.ts +17 -0
- package/dist/model/getLogFile200Response.d.ts.map +1 -0
- package/dist/model/index.d.ts +13 -13
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/languages.d.ts +5 -0
- package/dist/model/languages.d.ts.map +1 -0
- package/dist/model/logLevel.d.ts +4 -4
- package/dist/model/logLevel.d.ts.map +1 -1
- package/dist/model/querySuggestionsConfiguration.d.ts +22 -0
- package/dist/model/querySuggestionsConfiguration.d.ts.map +1 -0
- package/dist/model/querySuggestionsConfigurationResponse.d.ts +7 -0
- package/dist/model/querySuggestionsConfigurationResponse.d.ts.map +1 -0
- package/dist/model/querySuggestionsConfigurationWithIndex.d.ts +6 -0
- package/dist/model/querySuggestionsConfigurationWithIndex.d.ts.map +1 -0
- package/dist/model/sourceIndex.d.ts +26 -31
- package/dist/model/sourceIndex.d.ts.map +1 -1
- package/dist/src/querySuggestionsClient.d.ts +147 -141
- package/dist/src/querySuggestionsClient.d.ts.map +1 -1
- package/index.js +1 -1
- package/model/appID.ts +8 -0
- package/model/baseResponse.ts +13 -0
- package/model/clientMethodProps.ts +50 -50
- package/model/errorBase.ts +1 -1
- package/model/facet.ts +16 -0
- package/model/getConfigStatus200Response.ts +28 -0
- package/model/getLogFile200Response.ts +22 -0
- package/model/index.ts +10 -10
- package/model/languages.ts +6 -0
- package/model/logLevel.ts +2 -2
- package/model/querySuggestionsConfiguration.ts +28 -0
- package/model/querySuggestionsConfigurationResponse.ts +10 -0
- package/model/querySuggestionsConfigurationWithIndex.ts +9 -0
- package/model/sourceIndex.ts +15 -19
- package/package.json +10 -9
- package/dist/model/indexName.d.ts +0 -7
- package/dist/model/indexName.d.ts.map +0 -1
- package/dist/model/logFile.d.ts +0 -17
- package/dist/model/logFile.d.ts.map +0 -1
- package/dist/model/querySuggestionsIndex.d.ts +0 -20
- package/dist/model/querySuggestionsIndex.d.ts.map +0 -1
- package/dist/model/querySuggestionsIndexParam.d.ts +0 -16
- package/dist/model/querySuggestionsIndexParam.d.ts.map +0 -1
- package/dist/model/querySuggestionsIndexWithIndexParam.d.ts +0 -4
- package/dist/model/querySuggestionsIndexWithIndexParam.d.ts.map +0 -1
- package/dist/model/sourceIndexExternal.d.ts +0 -11
- package/dist/model/sourceIndexExternal.d.ts.map +0 -1
- package/dist/model/sourceIndexWithReplicas.d.ts +0 -39
- package/dist/model/sourceIndexWithReplicas.d.ts.map +0 -1
- package/dist/model/status.d.ts +0 -15
- package/dist/model/status.d.ts.map +0 -1
- package/dist/model/successResponse.d.ts +0 -11
- package/dist/model/successResponse.d.ts.map +0 -1
- package/model/indexName.ts +0 -8
- package/model/logFile.ts +0 -22
- package/model/querySuggestionsIndex.ts +0 -25
- package/model/querySuggestionsIndexParam.ts +0 -20
- package/model/querySuggestionsIndexWithIndexParam.ts +0 -7
- package/model/sourceIndexExternal.ts +0 -13
- package/model/sourceIndexWithReplicas.ts +0 -48
- package/model/status.ts +0 -18
- package/model/successResponse.ts +0 -13
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! client-query-suggestions.umd.js | 5.0.0-alpha.
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-query-suggestions"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),s=a()[r];return Promise.all([s||t(),void 0!==s])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]=t,s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),o(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends i{constructor(e,t,r){super(e,r),o(this,"stackTrace",void 0),this.stackTrace=t}}class c extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class l extends u{constructor(e,t,r){super(e,r,"ApiError"),o(this,"status",void 0),this.status=t}}class d extends i{constructor(e,t){super(e,"DeserializationError"),o(this,"response",void 0),this.response=t}}function h(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${t(e[r])?JSON.stringify(e[r]):e[r]}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function m(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function g({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:u,responsesCache:g}){async function p(u,g,p=!0){const f=[],y=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(u,g),P=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,u.headers,g.headers),q="GET"===u.method?{...u.data,...g.data}:{},w={...s,...u.queryParameters,...q};if(a.value&&(w["x-algolia-agent"]=a.value),g&&g.queryParameters)for(const e of Object.keys(g.queryParameters))g.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(g.queryParameters[e])?w[e]=g.queryParameters[e].toString():w[e]=g.queryParameters[e];let v=0;const T=async(e,r)=>{const s=e.pop();if(void 0===s)throw new c(function(e){return e.map((e=>m(e)))}(f));let a=g.timeout;void 0===a&&(a=p?o.read:o.write);const q={data:y,headers:P,method:u.method,url:h(s,u.path,w),connectTimeout:r(v,o.connect),responseTimeout:r(v,a)},x=t=>{const r={request:q,response:t,host:s,triesLeft:e.length};return f.push(r),r},b=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(b)){const a=x(b);return b.isTimedOut&&v++,console.log("Retryable failure",m(a)),await t.set(s,n(s,b.isTimedOut?"timed out":"down")),T(e,r)}if(function({status:e}){return 2==~~(e/100)}(b))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(b);throw x(b),function({content:e,status:t},r){let s=e;try{s=JSON.parse(e).message}catch(e){}return new l(s,t,r)}(b,f)},x=e.filter((e=>"readWrite"===e.accept||(p?"read"===e.accept:"write"===e.accept))),b=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(x);return T([...b.hosts].reverse(),b.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return p(e,t,a);const n=()=>p(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return g.get(o,(()=>u.get(o,(()=>u.set(o,n()).then((e=>Promise.all([u.delete(o),e])),(e=>Promise.all([u.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>g.set(o,e)})},requestsCache:u,responsesCache:g}}function p({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const f="5.0.0-alpha.11",y=["eu","us"];e.apiClientVersion=f,e.querySuggestionsClient=function(e,a,n,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");if(!n||n&&("string"!=typeof n||!y.includes(n)))throw new Error(`\`region\` is required and must be one of the following: ${y.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,region:a,...n}){const o=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),i=g({hosts:(u=a,[{url:"query-suggestions.{region}.algolia.com".replace("{region}",u),accept:"readWrite",protocol:"https"}]),...n,algoliaAgent:p({algoliaAgents:s,client:"QuerySuggestions",version:f}),baseHeaders:{"content-type":"text/plain",...o.headers(),...n.baseHeaders},baseQueryParameters:{...o.queryParameters(),...n.baseQueryParameters}});var u;return{transporter:i,appId:e,clearCache:()=>Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((()=>{})),get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,t){i.algoliaAgent.add({segment:e,version:t})},createConfig(e,t){if(!e)throw new Error("Parameter `querySuggestionsIndexWithIndexParam` is required when calling `createConfig`.");const r={method:"POST",path:"/1/configs",queryParameters:{},headers:{},data:e};return i.request(r,t)},del({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const s={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},deleteConfig({indexName:e},t){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteConfig`.");const r={method:"DELETE",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},get({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const s={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},getAllConfigs(e){const t={method:"GET",path:"/1/configs",queryParameters:{},headers:{}};return i.request(t,e)},getConfig({indexName:e},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getConfig`.");const r={method:"GET",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getConfigStatus({indexName:e},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getConfigStatus`.");const r={method:"GET",path:"/1/configs/{indexName}/status".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getLogFile({indexName:e},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getLogFile`.");const r={method:"GET",path:"/1/logs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},post({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const a={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},put({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const a={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},updateConfig({indexName:e,querySuggestionsIndexParam:t},r){if(!e)throw new Error("Parameter `indexName` is required when calling `updateConfig`.");if(!t)throw new Error("Parameter `querySuggestionsIndexParam` is required when calling `updateConfig`.");if(!t.sourceIndices)throw new Error("Parameter `querySuggestionsIndexParam.sourceIndices` is required when calling `updateConfig`.");const s={method:"PUT",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(s,r)}}}({appId:e,apiKey:a,region:n,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`5.0.0-alpha.11-${e}`}),s()]}),...o})}}));
|
|
1
|
+
/*! client-query-suggestions.umd.js | 5.0.0-alpha.110 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-query-suggestions"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}function n(e){s().setItem(r,JSON.stringify(e))}return{get:(t,r,s={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=a(),s=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(n(s),!t)return;n(Object.fromEntries(Object.entries(s).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),a()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||s.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function o(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function i(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class u extends Error{constructor(e,t){super(e),i(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends u{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class l extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please create a ticket at https://support.algolia.com/ sharing steps we can use to reproduce the issue.",e,"RetryError")}}class d extends c{constructor(e,t,r,s="ApiError"){super(e,r,s),i(this,"status",void 0),this.status=t}}class m extends u{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}class h extends d{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),i(this,"error",void 0),this.error=r}}function p(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r]).replaceAll("+","%20")}`)).join("&")}(r);let a=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return s.length&&(a+=`?${s}`),a}function g(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:u,responsesCache:c}){async function f(u,c,f=!0){const y=[],P=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(u,c),w=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,u.headers,c.headers),q="GET"===u.method?{...u.data,...c.data}:{},v={...s,...u.queryParameters,...q};if(a.value&&(v["x-algolia-agent"]=a.value),c&&c.queryParameters)for(const e of Object.keys(c.queryParameters))c.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(c.queryParameters[e])?v[e]=c.queryParameters[e].toString():v[e]=c.queryParameters[e];let b=0;const T=async(e,r)=>{const s=e.pop();if(void 0===s)throw new l(function(e){return e.map((e=>g(e)))}(y));let a=c.timeout;void 0===a&&(a=f?o.read:o.write);const q={data:P,headers:w,method:u.method,url:p(s,u.path,v),connectTimeout:r(b,o.connect),responseTimeout:r(b,a)},O=t=>{const r={request:q,response:t,host:s,triesLeft:e.length};return y.push(r),r},E=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(E)){const a=O(E);return E.isTimedOut&&b++,console.log("Retryable failure",g(a)),await t.set(s,n(s,E.isTimedOut?"timed out":"down")),T(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new m(t.message,e)}}(E);throw O(E),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new h(s.message,t,s.error,r):new d(s.message,t,r)}catch(e){}return new d(e,t,r)}(E,y)},O=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(O);return T([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return f(e,t,a);const n=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return c.get(o,(()=>u.get(o,(()=>u.set(o,n()).then((e=>Promise.all([u.delete(o),e])),(e=>Promise.all([u.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>c.set(o,e)})},requestsCache:u,responsesCache:c}}function y({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const P="5.0.0-alpha.110",w=["eu","us"];e.apiClientVersion=P,e.querySuggestionsClient=function(e,a,n,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");if(!n||n&&("string"!=typeof n||!w.includes(n)))throw new Error(`\`region\` is required and must be one of the following: ${w.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,region:a,...n}){const o=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),i=f({hosts:(u=a,[{url:"query-suggestions.{region}.algolia.com".replace("{region}",u),accept:"readWrite",protocol:"https"}]),...n,algoliaAgent:y({algoliaAgents:s,client:"QuerySuggestions",version:P}),baseHeaders:{"content-type":"text/plain",...o.headers(),...n.baseHeaders},baseQueryParameters:{...o.queryParameters(),...n.baseQueryParameters}});var u;return{transporter:i,appId:e,clearCache:()=>Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((()=>{})),get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,t){i.algoliaAgent.add({segment:e,version:t})},createConfig(e,t){if(!e)throw new Error("Parameter `querySuggestionsConfigurationWithIndex` is required when calling `createConfig`.");const r={method:"POST",path:"/1/configs",queryParameters:{},headers:{},data:e};return i.request(r,t)},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const s={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const s={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},customPost({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const a={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},customPut({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const a={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},deleteConfig({indexName:e},t){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteConfig`.");const r={method:"DELETE",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getAllConfigs(e){const t={method:"GET",path:"/1/configs",queryParameters:{},headers:{}};return i.request(t,e)},getConfig({indexName:e},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getConfig`.");const r={method:"GET",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getConfigStatus({indexName:e},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getConfigStatus`.");const r={method:"GET",path:"/1/configs/{indexName}/status".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},getLogFile({indexName:e},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getLogFile`.");const r={method:"GET",path:"/1/logs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},updateConfig({indexName:e,querySuggestionsConfiguration:t},r){if(!e)throw new Error("Parameter `indexName` is required when calling `updateConfig`.");if(!t)throw new Error("Parameter `querySuggestionsConfiguration` is required when calling `updateConfig`.");if(!t.sourceIndices)throw new Error("Parameter `querySuggestionsConfiguration.sourceIndices` is required when calling `updateConfig`.");const s={method:"PUT",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:t};return i.request(s,r)}}}({appId:e,apiKey:a,region:n,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`${P}-${e}`}),s()]}),...o})}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appID.d.ts","sourceRoot":"","sources":["../../model/appID.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseResponse.d.ts","sourceRoot":"","sources":["../../model/baseResponse.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
/**
|
|
3
|
-
* Properties for the `
|
|
4
|
-
*/
|
|
5
|
-
export
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
path: string;
|
|
10
|
-
/**
|
|
11
|
-
* Query parameters to
|
|
12
|
-
*/
|
|
13
|
-
parameters?: Record<string, any>;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Properties for the `
|
|
17
|
-
*/
|
|
18
|
-
export
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
*
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
*
|
|
95
|
-
*/
|
|
96
|
-
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* Properties for the `updateConfig` method.
|
|
100
|
-
*/
|
|
101
|
-
export
|
|
102
|
-
/**
|
|
103
|
-
*
|
|
104
|
-
*/
|
|
105
|
-
indexName: string;
|
|
106
|
-
|
|
107
|
-
};
|
|
1
|
+
import type { QuerySuggestionsConfiguration } from './querySuggestionsConfiguration';
|
|
2
|
+
/**
|
|
3
|
+
* Properties for the `customDelete` method.
|
|
4
|
+
*/
|
|
5
|
+
export type CustomDeleteProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
8
|
+
*/
|
|
9
|
+
path: string;
|
|
10
|
+
/**
|
|
11
|
+
* Query parameters to apply to the current query.
|
|
12
|
+
*/
|
|
13
|
+
parameters?: Record<string, any>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Properties for the `customGet` method.
|
|
17
|
+
*/
|
|
18
|
+
export type CustomGetProps = {
|
|
19
|
+
/**
|
|
20
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
21
|
+
*/
|
|
22
|
+
path: string;
|
|
23
|
+
/**
|
|
24
|
+
* Query parameters to apply to the current query.
|
|
25
|
+
*/
|
|
26
|
+
parameters?: Record<string, any>;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Properties for the `customPost` method.
|
|
30
|
+
*/
|
|
31
|
+
export type CustomPostProps = {
|
|
32
|
+
/**
|
|
33
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
34
|
+
*/
|
|
35
|
+
path: string;
|
|
36
|
+
/**
|
|
37
|
+
* Query parameters to apply to the current query.
|
|
38
|
+
*/
|
|
39
|
+
parameters?: Record<string, any>;
|
|
40
|
+
/**
|
|
41
|
+
* Parameters to send with the custom request.
|
|
42
|
+
*/
|
|
43
|
+
body?: Record<string, any>;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Properties for the `customPut` method.
|
|
47
|
+
*/
|
|
48
|
+
export type CustomPutProps = {
|
|
49
|
+
/**
|
|
50
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
51
|
+
*/
|
|
52
|
+
path: string;
|
|
53
|
+
/**
|
|
54
|
+
* Query parameters to apply to the current query.
|
|
55
|
+
*/
|
|
56
|
+
parameters?: Record<string, any>;
|
|
57
|
+
/**
|
|
58
|
+
* Parameters to send with the custom request.
|
|
59
|
+
*/
|
|
60
|
+
body?: Record<string, any>;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Properties for the `deleteConfig` method.
|
|
64
|
+
*/
|
|
65
|
+
export type DeleteConfigProps = {
|
|
66
|
+
/**
|
|
67
|
+
* Query Suggestions index name.
|
|
68
|
+
*/
|
|
69
|
+
indexName: string;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Properties for the `getConfig` method.
|
|
73
|
+
*/
|
|
74
|
+
export type GetConfigProps = {
|
|
75
|
+
/**
|
|
76
|
+
* Query Suggestions index name.
|
|
77
|
+
*/
|
|
78
|
+
indexName: string;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Properties for the `getConfigStatus` method.
|
|
82
|
+
*/
|
|
83
|
+
export type GetConfigStatusProps = {
|
|
84
|
+
/**
|
|
85
|
+
* Query Suggestions index name.
|
|
86
|
+
*/
|
|
87
|
+
indexName: string;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Properties for the `getLogFile` method.
|
|
91
|
+
*/
|
|
92
|
+
export type GetLogFileProps = {
|
|
93
|
+
/**
|
|
94
|
+
* Query Suggestions index name.
|
|
95
|
+
*/
|
|
96
|
+
indexName: string;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Properties for the `updateConfig` method.
|
|
100
|
+
*/
|
|
101
|
+
export type UpdateConfigProps = {
|
|
102
|
+
/**
|
|
103
|
+
* Query Suggestions index name.
|
|
104
|
+
*/
|
|
105
|
+
indexName: string;
|
|
106
|
+
querySuggestionsConfiguration: QuerySuggestionsConfiguration;
|
|
107
|
+
};
|
|
108
108
|
//# sourceMappingURL=clientMethodProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAErF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,6BAA6B,EAAE,6BAA6B,CAAC;CAC9D,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Error.
|
|
3
|
-
*/
|
|
4
|
-
export
|
|
5
|
-
message?: string;
|
|
6
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* Error.
|
|
3
|
+
*/
|
|
4
|
+
export type ErrorBase = Record<string, any> & {
|
|
5
|
+
message?: string;
|
|
6
|
+
};
|
|
7
7
|
//# sourceMappingURL=errorBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["../../model/errorBase.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["../../model/errorBase.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facet.d.ts","sourceRoot":"","sources":["../../model/facet.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type GetConfigStatus200Response = {
|
|
2
|
+
/**
|
|
3
|
+
* Name of the Query Suggestions index.
|
|
4
|
+
*/
|
|
5
|
+
indexName?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Whether the creation or update of the Query Suggestions index is in progress.
|
|
8
|
+
*/
|
|
9
|
+
isRunning?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format when the Query Suggestions index was last built.
|
|
12
|
+
*/
|
|
13
|
+
lastBuiltAt?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format when the Query Suggestions index was last updated successfully.
|
|
16
|
+
*/
|
|
17
|
+
lastSuccessfulBuiltAt?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Duration of the last successful build in seconds.
|
|
20
|
+
*/
|
|
21
|
+
lastSuccessfulBuildDuration?: string;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=getConfigStatus200Response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getConfigStatus200Response.d.ts","sourceRoot":"","sources":["../../model/getConfigStatus200Response.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,0BAA0B,GAAG;IACvC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;CACtC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { LogLevel } from './logLevel';
|
|
2
|
+
export type GetLogFile200Response = {
|
|
3
|
+
/**
|
|
4
|
+
* Timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
|
|
5
|
+
*/
|
|
6
|
+
timestamp?: string;
|
|
7
|
+
level?: LogLevel;
|
|
8
|
+
/**
|
|
9
|
+
* Details about this log entry.
|
|
10
|
+
*/
|
|
11
|
+
message?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Level indicating the position of a suggestion in a hierarchy of records. For example, a `contextLevel` of 1 indicates that this suggestion belongs to a previous suggestion with `contextLevel` 0.
|
|
14
|
+
*/
|
|
15
|
+
contextLevel?: number;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=getLogFile200Response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getLogFile200Response.d.ts","sourceRoot":"","sources":["../../model/getLogFile200Response.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,KAAK,CAAC,EAAE,QAAQ,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC"}
|
package/dist/model/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './clientMethodProps';
|
|
1
|
+
export * from './appID';
|
|
2
|
+
export * from './baseResponse';
|
|
3
|
+
export * from './errorBase';
|
|
4
|
+
export * from './facet';
|
|
5
|
+
export * from './getConfigStatus200Response';
|
|
6
|
+
export * from './getLogFile200Response';
|
|
7
|
+
export * from './languages';
|
|
8
|
+
export * from './logLevel';
|
|
9
|
+
export * from './querySuggestionsConfiguration';
|
|
10
|
+
export * from './querySuggestionsConfigurationResponse';
|
|
11
|
+
export * from './querySuggestionsConfigurationWithIndex';
|
|
12
|
+
export * from './sourceIndex';
|
|
13
|
+
export * from './clientMethodProps';
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":"AAEA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":"AAEA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../../model/languages.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC"}
|
package/dist/model/logLevel.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type of the
|
|
3
|
-
*/
|
|
4
|
-
export
|
|
1
|
+
/**
|
|
2
|
+
* Type of log entry. - `SKIP`. A query is skipped because it doesn\'t match the conditions for successful inclusion. For example, when a query doesn\'t generate enough search results. - `INFO`. An informative log entry. - `ERROR`. The Query Suggestions process encountered an error.
|
|
3
|
+
*/
|
|
4
|
+
export type LogLevel = 'ERROR' | 'INFO' | 'SKIP';
|
|
5
5
|
//# sourceMappingURL=logLevel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logLevel.d.ts","sourceRoot":"","sources":["../../model/logLevel.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"logLevel.d.ts","sourceRoot":"","sources":["../../model/logLevel.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Languages } from './languages';
|
|
2
|
+
import type { SourceIndex } from './sourceIndex';
|
|
3
|
+
/**
|
|
4
|
+
* Query Suggestions configuration.
|
|
5
|
+
*/
|
|
6
|
+
export type QuerySuggestionsConfiguration = {
|
|
7
|
+
/**
|
|
8
|
+
* Algolia indices from which to get the popular searches for query suggestions.
|
|
9
|
+
*/
|
|
10
|
+
sourceIndices: SourceIndex[];
|
|
11
|
+
languages?: Languages;
|
|
12
|
+
exclude?: string[] | null;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to turn on personalized query suggestions.
|
|
15
|
+
*/
|
|
16
|
+
enablePersonalization?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to include suggestions with special characters.
|
|
19
|
+
*/
|
|
20
|
+
allowSpecialCharacters?: boolean;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=querySuggestionsConfiguration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"querySuggestionsConfiguration.d.ts","sourceRoot":"","sources":["../../model/querySuggestionsConfiguration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,aAAa,EAAE,WAAW,EAAE,CAAC;IAE7B,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AppID } from './appID';
|
|
2
|
+
import type { QuerySuggestionsConfigurationWithIndex } from './querySuggestionsConfigurationWithIndex';
|
|
3
|
+
/**
|
|
4
|
+
* API response for retrieving Query Suggestions configurations.
|
|
5
|
+
*/
|
|
6
|
+
export type QuerySuggestionsConfigurationResponse = AppID & QuerySuggestionsConfigurationWithIndex;
|
|
7
|
+
//# sourceMappingURL=querySuggestionsConfigurationResponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"querySuggestionsConfigurationResponse.d.ts","sourceRoot":"","sources":["../../model/querySuggestionsConfigurationResponse.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,0CAA0C,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,KAAK,GACvD,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { QuerySuggestionsConfiguration } from './querySuggestionsConfiguration';
|
|
2
|
+
/**
|
|
3
|
+
* Query Suggestions configuration.
|
|
4
|
+
*/
|
|
5
|
+
export type QuerySuggestionsConfigurationWithIndex = QuerySuggestionsConfiguration & Record<string, any>;
|
|
6
|
+
//# sourceMappingURL=querySuggestionsConfigurationWithIndex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"querySuggestionsConfigurationWithIndex.d.ts","sourceRoot":"","sources":["../../model/querySuggestionsConfigurationWithIndex.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAErF;;GAEG;AACH,MAAM,MAAM,sCAAsC,GAChD,6BAA6B,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC"}
|
|
@@ -1,32 +1,27 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* List of external indices to use to generate custom Query Suggestions.
|
|
29
|
-
*/
|
|
30
|
-
external?: SourceIndexExternal[];
|
|
31
|
-
};
|
|
1
|
+
import type { Facet } from './facet';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration of an Algolia index for Query Suggestions.
|
|
4
|
+
*/
|
|
5
|
+
export type SourceIndex = {
|
|
6
|
+
/**
|
|
7
|
+
* Name of the Algolia index to use as source for query suggestions.
|
|
8
|
+
*/
|
|
9
|
+
indexName: string;
|
|
10
|
+
/**
|
|
11
|
+
* If true, Query Suggestions uses all replica indices to find popular searches. If false, only the primary index is used.
|
|
12
|
+
*/
|
|
13
|
+
replicas?: boolean;
|
|
14
|
+
analyticsTags?: string[] | null;
|
|
15
|
+
facets?: Facet[] | null;
|
|
16
|
+
/**
|
|
17
|
+
* Minimum number of hits required to be included as a suggestion. A search query must at least generate `minHits` search results to be included in the Query Suggestions index.
|
|
18
|
+
*/
|
|
19
|
+
minHits?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Minimum letters required to be included as a suggestion. A search query must be at least `minLetters` long to be included in the Query Suggestions index.
|
|
22
|
+
*/
|
|
23
|
+
minLetters?: number;
|
|
24
|
+
generate?: string[][] | null;
|
|
25
|
+
external?: string[] | null;
|
|
26
|
+
};
|
|
32
27
|
//# sourceMappingURL=sourceIndex.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceIndex.d.ts","sourceRoot":"","sources":["../../model/sourceIndex.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"sourceIndex.d.ts","sourceRoot":"","sources":["../../model/sourceIndex.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAEhC,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,GAAG,IAAI,CAAC;IAE7B,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAC5B,CAAC"}
|