@algolia/client-query-suggestions 5.55.1 → 5.56.0

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.
@@ -4,13 +4,13 @@
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@algolia/client-query-suggestions"] = {}));
5
5
  })(this, (function (exports) { 'use strict';
6
6
 
7
- function Y(t){let e,s=`algolia-client-js-${t.key}`;function r(){return e===void 0&&(e=t.localStorage||window.localStorage),e}function a(){return JSON.parse(r().getItem(s)||"{}")}function u(o){r().setItem(s,JSON.stringify(o));}function p(){return new Promise(o=>setTimeout(o,0))}function i(){let o=t.timeToLive?t.timeToLive*1e3:null,n=a(),c=new Date().getTime(),f=false;return {namespace:Object.fromEntries(Object.entries(n).filter(([,m])=>!m||m.timestamp===void 0||o&&m.timestamp+o<c?(f=true,false):true)),changed:f}}return {get(o,n,c={miss:()=>Promise.resolve()}){return p().then(()=>{let{namespace:f,changed:h}=i(),m=f[JSON.stringify(o)];return h&&u(f),m?m.value:n().then(P=>c.miss(P).then(()=>P))})},set(o,n){return p().then(()=>{let c=a();return c[JSON.stringify(o)]={timestamp:new Date().getTime(),value:n},r().setItem(s,JSON.stringify(c)),n})},delete(o){return p().then(()=>{let n=a();delete n[JSON.stringify(o)],r().setItem(s,JSON.stringify(n));})},clear(){return Promise.resolve().then(()=>{r().removeItem(s);})}}}function ce(){return {get(t,e,s={miss:()=>Promise.resolve()}){return e().then(a=>Promise.all([a,s.miss(a)])).then(([a])=>a)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}function O(t){let e=[...t.caches],s=e.shift();return s===void 0?ce():{get(r,a,u={miss:()=>Promise.resolve()}){return s.get(r,a,u).catch(()=>O({caches:e}).get(r,a,u))},set(r,a){return s.set(r,a).catch(()=>O({caches:e}).set(r,a))},delete(r){return s.delete(r).catch(()=>O({caches:e}).delete(r))},clear(){return s.clear().catch(()=>O({caches:e}).clear())}}}function D(t={serializable:true}){let e={};return {get(s,r,a={miss:()=>Promise.resolve()}){let u=JSON.stringify(s);if(u in e)return Promise.resolve(t.serializable?JSON.parse(e[u]):e[u]);let p=r();return p.then(i=>a.miss(i)).then(()=>p)},set(s,r){return e[JSON.stringify(s)]=t.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete(s){return delete e[JSON.stringify(s)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}function ue(t){let e={value:`Algolia for JavaScript (${t})`,add(s){let r=`; ${s.segment}${s.version!==void 0?` (${s.version})`:""}`;return e.value.indexOf(r)===-1&&(e.value=`${e.value}${r}`),e}};return e}function Z(t,e,s="WithinHeaders"){let r={"x-algolia-api-key":e,"x-algolia-application-id":t};return {headers(){return s==="WithinHeaders"?r:{}},queryParameters(){return s==="WithinQueryParameters"?r:{}}}}function ee({algoliaAgents:t,client:e,version:s}){let r=ue(s).add({segment:e,version:s});return t.forEach(a=>r.add(a)),r}function te(){return {debug(t,e){return Promise.resolve()},info(t,e){return Promise.resolve()},error(t,e){return Promise.resolve()}}}var le=10*1024*1024;async function*de(t){let e=t.getReader();try{for(;;){let{done:s,value:r}=await e.read();if(s)return;yield r;}}finally{e.releaseLock();}}function me(t){return Symbol.asyncIterator in t?t:de(t)}async function*fe(t){let e=new TextDecoder("utf-8"),s=[],r=0,a=false,u=true;for await(let i of me(t)){let o=e.decode(i,{stream:true}),n=0;for(a&&(a=false,o.length>0&&o[0]===`
8
- `&&(n=1));n<o.length;){let c=o.indexOf("\r",n),f=o.indexOf(`
9
- `,n);if(c===-1&&f===-1){let l=o.slice(n);if(s.push(l),r+=l.length,r>le)throw new Error("SSE line buffer exceeded 10MB");break}let h,m;c!==-1&&(f===-1||c<f)?(h=c,c+1<o.length?m=o[c+1]===`
10
- `?2:1:(a=true,m=1)):(h=f,m=1);let P=o.slice(n,h);s.push(P);let q=s.length===1?s[0]:s.join("");s.length=0,r=0,u&&(q.startsWith("\uFEFF")&&(q=q.slice(1)),u=false),yield q,n=h+m;}}let p=e.decode();if(p&&s.push(p),s.length>0){let i=s.join("");u&&i.startsWith("\uFEFF")&&(i=i.slice(1)),yield i;}}var pe=class{data=[];eventType="";lastEventId=null;retry=null;decode(t){if(t==="")return this.dispatch();if(t[0]===":")return null;let e=t.indexOf(":"),s,r;switch(e===-1?(s=t,r=""):(s=t.slice(0,e),r=t.slice(e+1),r[0]===" "&&(r=r.slice(1))),s){case "data":this.data.push(r);break;case "event":this.eventType=r;break;case "id":r.includes("\0")||(this.lastEventId=r);break;case "retry":/^[0-9]+$/.test(r)&&(this.retry=parseInt(r,10));break}return null}dispatch(){let t=this.eventType;if(this.eventType="",this.data.length===0)return null;let e={data:this.data.join(`
11
- `),event:t,id:this.lastEventId,retry:this.retry};return this.data=[],e}};async function*he(t){let e=new pe;for await(let s of fe(t)){let r=e.decode(s);r!==null&&(yield r);}}var ge=750,J=120*1e3;function M(t,e="up"){let s=Date.now();function r(){return e==="up"||Date.now()-s>J}function a(){return e==="timed out"&&Date.now()-s<=J}return {...t,status:e,lastUpdate:s,isUp:r,isTimedOut:a}}var re=class extends Error{name="AlgoliaError";constructor(t,e){super(t),e&&(this.name=e);}};var se=class extends re{stackTrace;constructor(t,e,s){super(t,s),this.stackTrace=e;}},B=class extends se{constructor(t){super("Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support",t,"RetryError");}},G=class extends se{status;constructor(t,e,s,r="ApiError"){super(t,s,r),this.status=e;}},ye=class extends re{response;constructor(t,e){super(t,"DeserializationError"),this.response=e;}},Pe=class extends G{error;constructor(t,e,s,r){super(t,e,r,"DetailedApiError"),this.error=s;}};function X(t,e,s){let r=Ee(s),a=`${t.protocol}://${t.url}${t.port?`:${t.port}`:""}/${e.charAt(0)==="/"?e.substring(1):e}`;return r.length&&(a+=`?${r}`),a}function Ee(t){return Object.keys(t).filter(e=>t[e]!==void 0).sort().map(e=>`${e}=${encodeURIComponent(Object.prototype.toString.call(t[e])==="[object Array]"?t[e].join(","):t[e]).replace(/\+/g,"%20")}`).join("&")}function K(t,e){if(t.method==="GET"||t.data===void 0&&e.data===void 0)return;let s=Array.isArray(t.data)?t.data:{...t.data,...e.data};return JSON.stringify(s)}function V(t,e,s){let r={Accept:"application/json",...t,...e,...s},a={};return Object.keys(r).forEach(u=>{let p=r[u];a[u.toLowerCase()]=p;}),a}function Te(t){if(!(t.status===204||t.content.length===0))try{return JSON.parse(t.content)}catch(e){throw new ye(e.message,t)}}function Re({content:t,status:e},s){try{let r=JSON.parse(t);return "error"in r?new Pe(r.message,e,r.error,s):new G(r.message,e,s)}catch{}return new G(t,e,s)}function ve({isTimedOut:t,status:e}){return !t&&~~e===0}function qe({isTimedOut:t,status:e}){return t||ve({isTimedOut:t,status:e})||~~(e/100)!==2&&~~(e/100)!==4}function Se({status:t}){return ~~(t/100)===2}function xe(t){return t.map(e=>oe(e))}function oe(t){let e=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return {...t,request:{...t.request,headers:{...t.request.headers,...e}}}}function ne({hosts:t,hostsCache:e,baseHeaders:s,logger:r,baseQueryParameters:a,algoliaAgent:u,timeouts:p,requester:i,requestsCache:o,responsesCache:n,compress:c,compression:f}){async function h(l){let d=await Promise.all(l.map(g=>e.get(g,()=>Promise.resolve(M(g))))),x=d.filter(g=>g.isUp()),R=d.filter(g=>g.isTimedOut()),S=[...x,...R];return {hosts:S.length>0?S:l,getTimeout(g,C){return (R.length===0&&g===0?1:R.length+3+g)*C}}}async function m(l,d,x){let R=[],S=K(l,d),y=V(s,l.headers,d.headers),g=f==="gzip"&&S!==void 0&&S.length>ge&&(l.method==="POST"||l.method==="PUT");g&&c===void 0&&r.info("Compression is disabled because no compress method is available.");let C=g&&c!==void 0,k=C?await c(S):S;C&&(y["content-encoding"]="gzip");let N=l.method==="GET"?{...l.data,...d.data}:{},w={...a,...l.queryParameters,...N};if(u.value&&(w["x-algolia-agent"]=u.value),d&&d.queryParameters)for(let E of Object.keys(d.queryParameters))!d.queryParameters[E]||Object.prototype.toString.call(d.queryParameters[E])==="[object Object]"?w[E]=d.queryParameters[E]:w[E]=d.queryParameters[E].toString();let A=0,_=async(E,U)=>{let I=E.pop();if(I===void 0)throw new B(xe(R));let F={...p,...d.timeouts},j={data:k,headers:y,method:l.method,url:X(I,l.path,w),connectTimeout:U(A,F.connect),responseTimeout:U(A,x?F.read:F.write)},W=H=>{let z={request:j,response:H,host:I,triesLeft:E.length};return R.push(z),z},b=await i.send(j);if(qe(b)){let H=W(b);return b.isTimedOut&&A++,r.info("Retryable failure",oe(H)),await e.set(I,M(I,b.isTimedOut?"timed out":"down")),_(E,U)}if(Se(b))return Te(b);throw W(b),Re(b,R)},v=t.filter(E=>E.accept==="readWrite"||(x?E.accept==="read":E.accept==="write")),$=await h(v);return _([...$.hosts].reverse(),$.getTimeout)}function P(l,d={}){let x=()=>m(l,d,R),R=l.useReadTransporter||l.method==="GET";if((d.cacheable||l.cacheable)!==true)return x();let y={request:l,requestOptions:d,transporter:{queryParameters:a,headers:s}};return n.get(y,()=>o.get(y,()=>o.set(y,x()).then(g=>Promise.all([o.delete(y),g]),g=>Promise.all([o.delete(y),Promise.reject(g)])).then(([g,C])=>C)),{miss:g=>n.set(y,g)})}async function*q(l,d={}){if(!i.sendStream)throw new Error("This requester does not support streaming");let x=K(l,d),R=V(s,l.headers,d.headers);R.accept="text/event-stream";let S=l.method==="GET"?{...l.data,...d.data}:{},y={...a,...l.queryParameters,...S};if(u.value&&(y["x-algolia-agent"]=u.value),d&&d.queryParameters)for(let v of Object.keys(d.queryParameters))!d.queryParameters[v]||Object.prototype.toString.call(d.queryParameters[v])==="[object Object]"?y[v]=d.queryParameters[v]:y[v]=d.queryParameters[v].toString();let g=l.useReadTransporter||l.method==="GET",C=t.filter(v=>v.accept==="readWrite"||(g?v.accept==="read":v.accept==="write")),N=(await h(C)).hosts[0];if(!N)throw new B([]);let w={...p,...d.timeouts},A={data:x,headers:R,method:l.method,url:X(N,l.path,y),connectTimeout:w.connect,responseTimeout:g?w.read:w.write},_=await i.sendStream(A);yield*he(_);}return {hostsCache:e,requester:i,timeouts:p,logger:r,algoliaAgent:u,baseHeaders:s,baseQueryParameters:a,hosts:t,request:P,requestStream:q,requestsCache:o,responsesCache:n}}function T(t,e,s){if(s==null||typeof s=="string"&&s.length===0)throw new Error(`Parameter \`${t}\` is required when calling \`${e}\`.`)}function ae(){function t(e){return new Promise(s=>{let r=new XMLHttpRequest;r.open(e.method,e.url,true),Object.keys(e.headers).forEach(i=>r.setRequestHeader(i,e.headers[i]));let a=(i,o)=>setTimeout(()=>{r.abort(),s({status:0,content:o,isTimedOut:true});},i),u=a(e.connectTimeout,"Connection timeout"),p;r.onreadystatechange=()=>{r.readyState>r.OPENED&&p===void 0&&(clearTimeout(u),p=a(e.responseTimeout,"Socket timeout"));},r.onerror=()=>{r.status===0&&(clearTimeout(u),clearTimeout(p),s({content:r.responseText||"Network request failed",status:r.status,isTimedOut:false}));},r.onload=()=>{clearTimeout(u),clearTimeout(p),s({content:r.responseText,status:r.status,isTimedOut:false});},r.send(e.data);})}return {send:t}}var L="5.55.1",Q=["eu","us"];function Ce(t){return [{url:"query-suggestions.{region}.algolia.com".replace("{region}",t),accept:"readWrite",protocol:"https"}]}function ie({appId:t,apiKey:e,authMode:s,algoliaAgents:r,region:a,...u}){let p=Z(t,e,s),i=ne({hosts:Ce(a),...u,algoliaAgent:ee({algoliaAgents:r,client:"QuerySuggestions",version:L}),baseHeaders:{"content-type":"text/plain",...p.headers(),...u.baseHeaders},baseQueryParameters:{...p.queryParameters(),...u.baseQueryParameters}});return {transporter:i,appId:t,apiKey:e,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(o,n){i.algoliaAgent.add({segment:o,version:n});},setClientApiKey({apiKey:o}){!s||s==="WithinHeaders"?i.baseHeaders["x-algolia-api-key"]=o:i.baseQueryParameters["x-algolia-api-key"]=o;},createConfig(o,n){T("configurationWithIndex","createConfig",o);let m={method:"POST",path:"/1/configs",queryParameters:{},headers:{},data:o};return i.request(m,n)},customDelete({path:o,parameters:n},c){T("path","customDelete",o);let P={method:"DELETE",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{}};return i.request(P,c)},customGet({path:o,parameters:n},c){T("path","customGet",o);let P={method:"GET",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{}};return i.request(P,c)},customPost({path:o,parameters:n,body:c},f){T("path","customPost",o);let q={method:"POST",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{},data:c||{}};return i.request(q,f)},customPut({path:o,parameters:n,body:c},f){T("path","customPut",o);let q={method:"PUT",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{},data:c||{}};return i.request(q,f)},deleteConfig({indexName:o},n){T("indexName","deleteConfig",o);let m={method:"DELETE",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return i.request(m,n)},getAllConfigs(o){let h={method:"GET",path:"/1/configs",queryParameters:{},headers:{}};return i.request(h,o)},getConfig({indexName:o},n){T("indexName","getConfig",o);let m={method:"GET",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return i.request(m,n)},getConfigStatus({indexName:o},n){T("indexName","getConfigStatus",o);let m={method:"GET",path:"/1/configs/{indexName}/status".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return i.request(m,n)},getLogFile({indexName:o},n){T("indexName","getLogFile",o);let m={method:"GET",path:"/1/logs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return i.request(m,n)},updateConfig({indexName:o,configuration:n},c){T("indexName","updateConfig",o),T("configuration","updateConfig",n),T("configuration.sourceIndices","updateConfig",n.sourceIndices);let P={method:"PUT",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{},data:n};return i.request(P,c)}}}function tt(t,e,s,r){if(!t||typeof t!="string")throw new Error("`appId` is missing.");if(!e||typeof e!="string")throw new Error("`apiKey` is missing.");if(!s||s&&(typeof s!="string"||!Q.includes(s)))throw new Error(`\`region\` is required and must be one of the following: ${Q.join(", ")}`);let{compression:a,...u}=r||{};return ie({appId:t,apiKey:e,region:s,timeouts:{connect:1e3,read:2e3,write:3e4},logger:te(),requester:ae(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:D(),requestsCache:D({serializable:false}),hostsCache:O({caches:[Y({key:`${L}-${t}`}),D()]}),...u})}
7
+ function Z(e){let t,o=`algolia-client-js-${e.key}`;function s(){return t===void 0&&(t=e.localStorage||window.localStorage),t}function c(){return JSON.parse(s().getItem(o)||"{}")}function p(r){s().setItem(o,JSON.stringify(r));}function P(){return new Promise(r=>setTimeout(r,0))}function i(){let r=e.timeToLive?e.timeToLive*1e3:null,n=c(),a=new Date().getTime(),l=false;return {namespace:Object.fromEntries(Object.entries(n).filter(([,u])=>!u||u.timestamp===void 0||r&&u.timestamp+r<a?(l=true,false):true)),changed:l}}return {get(r,n,a={miss:()=>Promise.resolve()}){return P().then(()=>{let{namespace:l,changed:d}=i(),u=l[JSON.stringify(r)];return d&&p(l),u?u.value:n().then(y=>a.miss(y).then(()=>y))})},set(r,n){return P().then(()=>{let a=c();return a[JSON.stringify(r)]={timestamp:new Date().getTime(),value:n},s().setItem(o,JSON.stringify(a)),n})},delete(r){return P().then(()=>{let n=c();delete n[JSON.stringify(r)],s().setItem(o,JSON.stringify(n));})},clear(){return Promise.resolve().then(()=>{s().removeItem(o);})}}}function le(){return {get(e,t,o={miss:()=>Promise.resolve()}){return t().then(c=>Promise.all([c,o.miss(c)])).then(([c])=>c)},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}function w(e){let t=[...e.caches],o=t.shift();return o===void 0?le():{get(s,c,p={miss:()=>Promise.resolve()}){return o.get(s,c,p).catch(()=>w({caches:t}).get(s,c,p))},set(s,c){return o.set(s,c).catch(()=>w({caches:t}).set(s,c))},delete(s){return o.delete(s).catch(()=>w({caches:t}).delete(s))},clear(){return o.clear().catch(()=>w({caches:t}).clear())}}}function D(e={serializable:true}){let t={};return {get(o,s,c={miss:()=>Promise.resolve()}){let p=JSON.stringify(o);if(p in t)return Promise.resolve(e.serializable?JSON.parse(t[p]):t[p]);let P=s();return P.then(i=>c.miss(i)).then(()=>P)},set(o,s){return t[JSON.stringify(o)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)},delete(o){return delete t[JSON.stringify(o)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}function de(e){let t={value:`Algolia for JavaScript (${e})`,add(o){let s=`; ${o.segment}${o.version!==void 0?` (${o.version})`:""}`;return t.value.indexOf(s)===-1&&(t.value=`${t.value}${s}`),t}};return t}function ee(e,t,o="WithinHeaders"){let s={"x-algolia-api-key":t,"x-algolia-application-id":e};return {headers(){return o==="WithinHeaders"?s:{}},queryParameters(){return o==="WithinQueryParameters"?s:{}}}}function te({algoliaAgents:e,client:t,version:o}){let s=de(o).add({segment:t,version:o});return e.forEach(c=>s.add(c)),s}function re(){return {debug(e,t){return Promise.resolve()},info(e,t){return Promise.resolve()},error(e,t){return Promise.resolve()}}}var me=10*1024*1024;async function*he(e){let t=e.getReader();try{for(;;){let{done:o,value:s}=await t.read();if(o)return;yield s;}}finally{t.releaseLock();}}function pe(e){return Symbol.asyncIterator in e?e:he(e)}async function*fe(e){let t=new TextDecoder("utf-8"),o=[],s=0,c=false,p=true;for await(let i of pe(e)){let r=t.decode(i,{stream:true}),n=0;for(c&&(c=false,r.length>0&&r[0]===`
8
+ `&&(n=1));n<r.length;){let a=r.indexOf("\r",n),l=r.indexOf(`
9
+ `,n);if(a===-1&&l===-1){let b=r.slice(n);if(o.push(b),s+=b.length,s>me)throw new Error("SSE line buffer exceeded 10MB");break}let d,u;a!==-1&&(l===-1||a<l)?(d=a,a+1<r.length?u=r[a+1]===`
10
+ `?2:1:(c=true,u=1)):(d=l,u=1);let y=r.slice(n,d);o.push(y);let T=o.length===1?o[0]:o.join("");o.length=0,s=0,p&&(T.startsWith("\uFEFF")&&(T=T.slice(1)),p=false),yield T,n=d+u;}}let P=t.decode();if(P&&o.push(P),o.length>0){let i=o.join("");p&&i.startsWith("\uFEFF")&&(i=i.slice(1)),yield i;}}var ge=class{data=[];eventType="";lastEventId=null;retry=null;decode(e){if(e==="")return this.dispatch();if(e[0]===":")return null;let t=e.indexOf(":"),o,s;switch(t===-1?(o=e,s=""):(o=e.slice(0,t),s=e.slice(t+1),s[0]===" "&&(s=s.slice(1))),o){case "data":this.data.push(s);break;case "event":this.eventType=s;break;case "id":s.includes("\0")||(this.lastEventId=s);break;case "retry":/^[0-9]+$/.test(s)&&(this.retry=parseInt(s,10));break}return null}dispatch(){let e=this.eventType;if(this.eventType="",this.data.length===0)return null;let t={data:this.data.join(`
11
+ `),event:e,id:this.lastEventId,retry:this.retry};return this.data=[],t}};async function*Pe(e){let t=new ge;for await(let o of fe(e)){let s=t.decode(o);s!==null&&(yield s);}}var ye=750,M=120*1e3;function B(e,t="up"){let o=Date.now();function s(){return t==="up"||Date.now()-o>M}function c(){return t==="timed out"&&Date.now()-o<=M}return {...e,status:t,lastUpdate:o,isUp:s,isTimedOut:c}}var se=class extends Error{name="AlgoliaError";constructor(e,t){super(e),t&&(this.name=t);}};var oe=class extends se{stackTrace;constructor(e,t,o){super(e,o),this.stackTrace=t;}},X=class extends oe{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support",e,"RetryError");}},Q=class extends oe{status;constructor(e,t,o,s="ApiError"){super(e,o,s),this.status=t;}},qe=class extends se{response;constructor(e,t){super(e,"DeserializationError"),this.response=t;}},Te=class extends Q{error;constructor(e,t,o,s){super(e,t,s,"DetailedApiError"),this.error=o;}};function K(e,t,o){let s=Re(o),c=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${t.charAt(0)==="/"?t.substring(1):t}`;return s.length&&(c+=`?${s}`),c}function Re(e){return Object.keys(e).filter(t=>e[t]!==void 0).sort().map(t=>`${t}=${encodeURIComponent(Object.prototype.toString.call(e[t])==="[object Array]"?e[t].join(","):e[t]).replace(/\+/g,"%20")}`).join("&")}function V(e,t){if(e.method==="GET"||e.data===void 0&&t.data===void 0)return;let o=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(o)}function Y(e,t,o){let s={Accept:"application/json",...e,...t,...o},c={};return Object.keys(s).forEach(p=>{let P=s[p];c[p.toLowerCase()]=P;}),c}function ne(e){if(!(e.status===204||e.content.length===0))try{return JSON.parse(e.content)}catch(t){throw new qe(t.message,e)}}function Ee(e){return {status:e.status,headers:e.headers,content:e.content,data:ne(e)}}function Ce({content:e,status:t},o){try{let s=JSON.parse(e);return "error"in s?new Te(s.message,t,s.error,o):new Q(s.message,t,o)}catch{}return new Q(e,t,o)}function Ie({isTimedOut:e,status:t}){return !e&&~~t===0}function xe({isTimedOut:e,status:t}){return e||Ie({isTimedOut:e,status:t})||~~(t/100)!==2&&~~(t/100)!==4}function ve({status:e}){return ~~(e/100)===2}function He(e){return e.map(t=>ae(t))}function ae(e){let t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return {...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function ie({hosts:e,hostsCache:t,baseHeaders:o,logger:s,baseQueryParameters:c,algoliaAgent:p,timeouts:P,requester:i,requestsCache:r,responsesCache:n,compress:a,compression:l}){async function d(m){let h=await Promise.all(m.map(g=>t.get(g,()=>Promise.resolve(B(g))))),I=h.filter(g=>g.isUp()),R=h.filter(g=>g.isTimedOut()),x=[...I,...R];return {hosts:x.length>0?x:m,getTimeout(g,v){return (R.length===0&&g===0?1:R.length+3+g)*v}}}async function u(m,h,I){let R=[],x=V(m,h),q=Y(o,m.headers,h.headers),g=l==="gzip"&&x!==void 0&&x.length>ye&&(m.method==="POST"||m.method==="PUT");g&&a===void 0&&s.info("Compression is disabled because no compress method is available.");let v=g&&a!==void 0,U=v?await a(x):x;v&&(q["content-encoding"]="gzip");let N=m.method==="GET"?{...m.data,...h.data}:{},H={...c,...m.queryParameters,...N};if(p.value&&(H["x-algolia-agent"]=p.value),h&&h.queryParameters)for(let E of Object.keys(h.queryParameters))!h.queryParameters[E]||Object.prototype.toString.call(h.queryParameters[E])==="[object Object]"?H[E]=h.queryParameters[E]:H[E]=h.queryParameters[E].toString();let O=0,W=async(E,_)=>{let A=E.pop();if(A===void 0)throw new X(He(R));let k={...P,...h.timeouts},j={data:U,headers:q,method:m.method,url:K(A,m.path,H),connectTimeout:_(O,k.connect),responseTimeout:_(O,I?k.read:k.write)},z=G=>{let J={request:j,response:G,host:A,triesLeft:E.length};return R.push(J),J},S=await i.send(j);if(xe(S)){let G=z(S);return S.isTimedOut&&O++,s.info("Retryable failure",ae(G)),await t.set(A,B(A,S.isTimedOut?"timed out":"down")),W(E,_)}if(ve(S))return S;throw z(S),Ce(S,R)},C=e.filter(E=>E.accept==="readWrite"||(I?E.accept==="read":E.accept==="write")),$=await d(C);return W([...$.hosts].reverse(),$.getTimeout)}function y(m,h={}){let I=()=>u(m,h,R).then(g=>ne(g)),R=m.useReadTransporter||m.method==="GET";if((h.cacheable||m.cacheable)!==true)return I();let q={request:m,requestOptions:h,transporter:{queryParameters:c,headers:o}};return n.get(q,()=>r.get(q,()=>r.set(q,I()).then(g=>Promise.all([r.delete(q),g]),g=>Promise.all([r.delete(q),Promise.reject(g)])).then(([g,v])=>v)),{miss:g=>n.set(q,g)})}function T(m,h={}){let I=m.useReadTransporter||m.method==="GET";return u(m,h,I).then(R=>Ee(R))}async function*b(m,h={}){if(!i.sendStream)throw new Error("This requester does not support streaming");let I=V(m,h),R=Y(o,m.headers,h.headers);R.accept="text/event-stream";let x=m.method==="GET"?{...m.data,...h.data}:{},q={...c,...m.queryParameters,...x};if(p.value&&(q["x-algolia-agent"]=p.value),h&&h.queryParameters)for(let C of Object.keys(h.queryParameters))!h.queryParameters[C]||Object.prototype.toString.call(h.queryParameters[C])==="[object Object]"?q[C]=h.queryParameters[C]:q[C]=h.queryParameters[C].toString();let g=m.useReadTransporter||m.method==="GET",v=e.filter(C=>C.accept==="readWrite"||(g?C.accept==="read":C.accept==="write")),N=(await d(v)).hosts[0];if(!N)throw new X([]);let H={...P,...h.timeouts},O={data:I,headers:R,method:m.method,url:K(N,m.path,q),connectTimeout:H.connect,responseTimeout:g?H.read:H.write},W=await i.sendStream(O);yield*Pe(W);}return {hostsCache:t,requester:i,timeouts:P,logger:s,algoliaAgent:p,baseHeaders:o,baseQueryParameters:c,hosts:e,request:y,requestWithHttpInfo:T,requestStream:b,requestsCache:r,responsesCache:n}}function f(e,t,o){if(o==null||typeof o=="string"&&o.length===0)throw new Error(`Parameter \`${e}\` is required when calling \`${t}\`.`)}function Se(e){let t={};for(let o of e.trim().split(/[\r\n]+/)){let s=o.indexOf(": ");s>0&&(t[o.slice(0,s).toLowerCase()]=o.slice(s+2));}return t}function ue(){function e(t){return new Promise(o=>{let s=new XMLHttpRequest;s.open(t.method,t.url,true),Object.keys(t.headers).forEach(i=>s.setRequestHeader(i,t.headers[i]));let c=(i,r)=>setTimeout(()=>{s.abort(),o({status:0,content:r,isTimedOut:true});},i),p=c(t.connectTimeout,"Connection timeout"),P;s.onreadystatechange=()=>{s.readyState>s.OPENED&&P===void 0&&(clearTimeout(p),P=c(t.responseTimeout,"Socket timeout"));},s.onerror=()=>{s.status===0&&(clearTimeout(p),clearTimeout(P),o({content:s.responseText||"Network request failed",status:s.status,isTimedOut:false}));},s.onload=()=>{clearTimeout(p),clearTimeout(P),o({content:s.responseText,headers:Se(s.getAllResponseHeaders()),status:s.status,isTimedOut:false});},s.send(t.data);})}return {send:e}}var L="5.56.0",F=["eu","us"];function we(e){return [{url:"query-suggestions.{region}.algolia.com".replace("{region}",e),accept:"readWrite",protocol:"https"}]}function ce({appId:e,apiKey:t,authMode:o,algoliaAgents:s,region:c,...p}){let P=ee(e,t,o),i=ie({hosts:we(c),...p,algoliaAgent:te({algoliaAgents:s,client:"QuerySuggestions",version:L}),baseHeaders:{"content-type":"text/plain",...P.headers(),...p.baseHeaders},baseQueryParameters:{...P.queryParameters(),...p.baseQueryParameters}});return {transporter:i,appId:e,apiKey:t,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(r,n){i.algoliaAgent.add({segment:r,version:n});},setClientApiKey({apiKey:r}){!o||o==="WithinHeaders"?i.baseHeaders["x-algolia-api-key"]=r:i.baseQueryParameters["x-algolia-api-key"]=r;},createConfig(r,n){f("configurationWithIndex","createConfig",r);let u={method:"POST",path:"/1/configs",queryParameters:{},headers:{},data:r};return i.request(u,n)},createConfigWithHTTPInfo(r,n){f("configurationWithIndex","createConfigWithHTTPInfo",r);let u={method:"POST",path:"/1/configs",queryParameters:{},headers:{},data:r};return i.requestWithHttpInfo(u,n)},customDelete({path:r,parameters:n},a){f("path","customDelete",r);let y={method:"DELETE",path:"/{path}".replace("{path}",r),queryParameters:n||{},headers:{}};return i.request(y,a)},customDeleteWithHTTPInfo({path:r,parameters:n},a){f("path","customDeleteWithHTTPInfo",r);let y={method:"DELETE",path:"/{path}".replace("{path}",r),queryParameters:n||{},headers:{}};return i.requestWithHttpInfo(y,a)},customGet({path:r,parameters:n},a){f("path","customGet",r);let y={method:"GET",path:"/{path}".replace("{path}",r),queryParameters:n||{},headers:{}};return i.request(y,a)},customGetWithHTTPInfo({path:r,parameters:n},a){f("path","customGetWithHTTPInfo",r);let y={method:"GET",path:"/{path}".replace("{path}",r),queryParameters:n||{},headers:{}};return i.requestWithHttpInfo(y,a)},customPost({path:r,parameters:n,body:a},l){f("path","customPost",r);let T={method:"POST",path:"/{path}".replace("{path}",r),queryParameters:n||{},headers:{},data:a||{}};return i.request(T,l)},customPostWithHTTPInfo({path:r,parameters:n,body:a},l){f("path","customPostWithHTTPInfo",r);let T={method:"POST",path:"/{path}".replace("{path}",r),queryParameters:n||{},headers:{},data:a||{}};return i.requestWithHttpInfo(T,l)},customPut({path:r,parameters:n,body:a},l){f("path","customPut",r);let T={method:"PUT",path:"/{path}".replace("{path}",r),queryParameters:n||{},headers:{},data:a||{}};return i.request(T,l)},customPutWithHTTPInfo({path:r,parameters:n,body:a},l){f("path","customPutWithHTTPInfo",r);let T={method:"PUT",path:"/{path}".replace("{path}",r),queryParameters:n||{},headers:{},data:a||{}};return i.requestWithHttpInfo(T,l)},deleteConfig({indexName:r},n){f("indexName","deleteConfig",r);let u={method:"DELETE",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(r)),queryParameters:{},headers:{}};return i.request(u,n)},deleteConfigWithHTTPInfo({indexName:r},n){f("indexName","deleteConfigWithHTTPInfo",r);let u={method:"DELETE",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(r)),queryParameters:{},headers:{}};return i.requestWithHttpInfo(u,n)},getAllConfigs(r){let d={method:"GET",path:"/1/configs",queryParameters:{},headers:{}};return i.request(d,r)},getAllConfigsWithHTTPInfo(r){let d={method:"GET",path:"/1/configs",queryParameters:{},headers:{}};return i.requestWithHttpInfo(d,r)},getConfig({indexName:r},n){f("indexName","getConfig",r);let u={method:"GET",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(r)),queryParameters:{},headers:{}};return i.request(u,n)},getConfigWithHTTPInfo({indexName:r},n){f("indexName","getConfigWithHTTPInfo",r);let u={method:"GET",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(r)),queryParameters:{},headers:{}};return i.requestWithHttpInfo(u,n)},getConfigStatus({indexName:r},n){f("indexName","getConfigStatus",r);let u={method:"GET",path:"/1/configs/{indexName}/status".replace("{indexName}",encodeURIComponent(r)),queryParameters:{},headers:{}};return i.request(u,n)},getConfigStatusWithHTTPInfo({indexName:r},n){f("indexName","getConfigStatusWithHTTPInfo",r);let u={method:"GET",path:"/1/configs/{indexName}/status".replace("{indexName}",encodeURIComponent(r)),queryParameters:{},headers:{}};return i.requestWithHttpInfo(u,n)},getLogFile({indexName:r},n){f("indexName","getLogFile",r);let u={method:"GET",path:"/1/logs/{indexName}".replace("{indexName}",encodeURIComponent(r)),queryParameters:{},headers:{}};return i.request(u,n)},getLogFileWithHTTPInfo({indexName:r},n){f("indexName","getLogFileWithHTTPInfo",r);let u={method:"GET",path:"/1/logs/{indexName}".replace("{indexName}",encodeURIComponent(r)),queryParameters:{},headers:{}};return i.requestWithHttpInfo(u,n)},updateConfig({indexName:r,configuration:n},a){f("indexName","updateConfig",r),f("configuration","updateConfig",n),f("configuration.sourceIndices","updateConfig",n.sourceIndices);let y={method:"PUT",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(r)),queryParameters:{},headers:{},data:n};return i.request(y,a)},updateConfigWithHTTPInfo({indexName:r,configuration:n},a){f("indexName","updateConfigWithHTTPInfo",r),f("configuration","updateConfigWithHTTPInfo",n),f("configuration.sourceIndices","updateConfigWithHTTPInfo",n.sourceIndices);let y={method:"PUT",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(r)),queryParameters:{},headers:{},data:n};return i.requestWithHttpInfo(y,a)}}}function ot(e,t,o,s){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(!o||o&&(typeof o!="string"||!F.includes(o)))throw new Error(`\`region\` is required and must be one of the following: ${F.join(", ")}`);let{compression:c,...p}=s||{};return ce({appId:e,apiKey:t,region:o,timeouts:{connect:1e3,read:2e3,write:3e4},logger:re(),requester:ue(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:D(),requestsCache:D({serializable:false}),hostsCache:w({caches:[Z({key:`${L}-${e}`}),D()]}),...p})}
12
12
 
13
13
  exports.apiClientVersion = L;
14
- exports.querySuggestionsClient = tt;
14
+ exports.querySuggestionsClient = ot;
15
15
 
16
16
  }));
@@ -5,7 +5,7 @@ import { createFetchRequester } from "@algolia/requester-fetch";
5
5
 
6
6
  // src/querySuggestionsClient.ts
7
7
  import { createAuth, createTransporter, getAlgoliaAgent, validateRequired } from "@algolia/client-common";
8
- var apiClientVersion = "5.55.1";
8
+ var apiClientVersion = "5.56.0";
9
9
  var REGIONS = ["eu", "us"];
10
10
  function getDefaultHosts(region) {
11
11
  const url = "query-suggestions.{region}.algolia.com".replace("{region}", region);
@@ -104,6 +104,31 @@ function createQuerySuggestionsClient({
104
104
  };
105
105
  return transporter.request(request, requestOptions);
106
106
  },
107
+ /**
108
+ * Creates a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
109
+ *
110
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
111
+ *
112
+ * Required API Key ACLs:
113
+ * - editSettings
114
+ * @param configurationWithIndex - The configurationWithIndex object.
115
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
116
+ * @see createConfig for the plain version.
117
+ */
118
+ createConfigWithHTTPInfo(configurationWithIndex, requestOptions) {
119
+ validateRequired("configurationWithIndex", "createConfigWithHTTPInfo", configurationWithIndex);
120
+ const requestPath = "/1/configs";
121
+ const headers = {};
122
+ const queryParameters = {};
123
+ const request = {
124
+ method: "POST",
125
+ path: requestPath,
126
+ queryParameters,
127
+ headers,
128
+ data: configurationWithIndex
129
+ };
130
+ return transporter.requestWithHttpInfo(request, requestOptions);
131
+ },
107
132
  /**
108
133
  * This method lets you send requests to the Algolia REST API.
109
134
  * @param customDelete - The customDelete object.
@@ -124,6 +149,29 @@ function createQuerySuggestionsClient({
124
149
  };
125
150
  return transporter.request(request, requestOptions);
126
151
  },
152
+ /**
153
+ * This method lets you send requests to the Algolia REST API.
154
+ *
155
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
156
+ * @param customDelete - The customDelete object.
157
+ * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
158
+ * @param customDelete.parameters - Query parameters to apply to the current query.
159
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
160
+ * @see customDelete for the plain version.
161
+ */
162
+ customDeleteWithHTTPInfo({ path, parameters }, requestOptions) {
163
+ validateRequired("path", "customDeleteWithHTTPInfo", path);
164
+ const requestPath = "/{path}".replace("{path}", path);
165
+ const headers = {};
166
+ const queryParameters = parameters ? parameters : {};
167
+ const request = {
168
+ method: "DELETE",
169
+ path: requestPath,
170
+ queryParameters,
171
+ headers
172
+ };
173
+ return transporter.requestWithHttpInfo(request, requestOptions);
174
+ },
127
175
  /**
128
176
  * This method lets you send requests to the Algolia REST API.
129
177
  * @param customGet - The customGet object.
@@ -144,6 +192,29 @@ function createQuerySuggestionsClient({
144
192
  };
145
193
  return transporter.request(request, requestOptions);
146
194
  },
195
+ /**
196
+ * This method lets you send requests to the Algolia REST API.
197
+ *
198
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
199
+ * @param customGet - The customGet object.
200
+ * @param customGet.path - Path of the endpoint, for example `1/newFeature`.
201
+ * @param customGet.parameters - Query parameters to apply to the current query.
202
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
203
+ * @see customGet for the plain version.
204
+ */
205
+ customGetWithHTTPInfo({ path, parameters }, requestOptions) {
206
+ validateRequired("path", "customGetWithHTTPInfo", path);
207
+ const requestPath = "/{path}".replace("{path}", path);
208
+ const headers = {};
209
+ const queryParameters = parameters ? parameters : {};
210
+ const request = {
211
+ method: "GET",
212
+ path: requestPath,
213
+ queryParameters,
214
+ headers
215
+ };
216
+ return transporter.requestWithHttpInfo(request, requestOptions);
217
+ },
147
218
  /**
148
219
  * This method lets you send requests to the Algolia REST API.
149
220
  * @param customPost - The customPost object.
@@ -166,6 +237,31 @@ function createQuerySuggestionsClient({
166
237
  };
167
238
  return transporter.request(request, requestOptions);
168
239
  },
240
+ /**
241
+ * This method lets you send requests to the Algolia REST API.
242
+ *
243
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
244
+ * @param customPost - The customPost object.
245
+ * @param customPost.path - Path of the endpoint, for example `1/newFeature`.
246
+ * @param customPost.parameters - Query parameters to apply to the current query.
247
+ * @param customPost.body - Parameters to send with the custom request.
248
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
249
+ * @see customPost for the plain version.
250
+ */
251
+ customPostWithHTTPInfo({ path, parameters, body }, requestOptions) {
252
+ validateRequired("path", "customPostWithHTTPInfo", path);
253
+ const requestPath = "/{path}".replace("{path}", path);
254
+ const headers = {};
255
+ const queryParameters = parameters ? parameters : {};
256
+ const request = {
257
+ method: "POST",
258
+ path: requestPath,
259
+ queryParameters,
260
+ headers,
261
+ data: body ? body : {}
262
+ };
263
+ return transporter.requestWithHttpInfo(request, requestOptions);
264
+ },
169
265
  /**
170
266
  * This method lets you send requests to the Algolia REST API.
171
267
  * @param customPut - The customPut object.
@@ -188,6 +284,31 @@ function createQuerySuggestionsClient({
188
284
  };
189
285
  return transporter.request(request, requestOptions);
190
286
  },
287
+ /**
288
+ * This method lets you send requests to the Algolia REST API.
289
+ *
290
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
291
+ * @param customPut - The customPut object.
292
+ * @param customPut.path - Path of the endpoint, for example `1/newFeature`.
293
+ * @param customPut.parameters - Query parameters to apply to the current query.
294
+ * @param customPut.body - Parameters to send with the custom request.
295
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
296
+ * @see customPut for the plain version.
297
+ */
298
+ customPutWithHTTPInfo({ path, parameters, body }, requestOptions) {
299
+ validateRequired("path", "customPutWithHTTPInfo", path);
300
+ const requestPath = "/{path}".replace("{path}", path);
301
+ const headers = {};
302
+ const queryParameters = parameters ? parameters : {};
303
+ const request = {
304
+ method: "PUT",
305
+ path: requestPath,
306
+ queryParameters,
307
+ headers,
308
+ data: body ? body : {}
309
+ };
310
+ return transporter.requestWithHttpInfo(request, requestOptions);
311
+ },
191
312
  /**
192
313
  * Deletes a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. To delete the Query Suggestions index itself, use the Search API and the `Delete an index` operation.
193
314
  *
@@ -210,6 +331,31 @@ function createQuerySuggestionsClient({
210
331
  };
211
332
  return transporter.request(request, requestOptions);
212
333
  },
334
+ /**
335
+ * Deletes a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. To delete the Query Suggestions index itself, use the Search API and the `Delete an index` operation.
336
+ *
337
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
338
+ *
339
+ * Required API Key ACLs:
340
+ * - editSettings
341
+ * @param deleteConfig - The deleteConfig object.
342
+ * @param deleteConfig.indexName - Query Suggestions index name.
343
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
344
+ * @see deleteConfig for the plain version.
345
+ */
346
+ deleteConfigWithHTTPInfo({ indexName }, requestOptions) {
347
+ validateRequired("indexName", "deleteConfigWithHTTPInfo", indexName);
348
+ const requestPath = "/1/configs/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
349
+ const headers = {};
350
+ const queryParameters = {};
351
+ const request = {
352
+ method: "DELETE",
353
+ path: requestPath,
354
+ queryParameters,
355
+ headers
356
+ };
357
+ return transporter.requestWithHttpInfo(request, requestOptions);
358
+ },
213
359
  /**
214
360
  * Retrieves all Query Suggestions configurations of your Algolia application.
215
361
  *
@@ -229,6 +375,28 @@ function createQuerySuggestionsClient({
229
375
  };
230
376
  return transporter.request(request, requestOptions);
231
377
  },
378
+ /**
379
+ * Retrieves all Query Suggestions configurations of your Algolia application.
380
+ *
381
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
382
+ *
383
+ * Required API Key ACLs:
384
+ * - settings
385
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
386
+ * @see getAllConfigs for the plain version.
387
+ */
388
+ getAllConfigsWithHTTPInfo(requestOptions) {
389
+ const requestPath = "/1/configs";
390
+ const headers = {};
391
+ const queryParameters = {};
392
+ const request = {
393
+ method: "GET",
394
+ path: requestPath,
395
+ queryParameters,
396
+ headers
397
+ };
398
+ return transporter.requestWithHttpInfo(request, requestOptions);
399
+ },
232
400
  /**
233
401
  * Retrieves a single Query Suggestions configuration by its index name.
234
402
  *
@@ -251,6 +419,31 @@ function createQuerySuggestionsClient({
251
419
  };
252
420
  return transporter.request(request, requestOptions);
253
421
  },
422
+ /**
423
+ * Retrieves a single Query Suggestions configuration by its index name.
424
+ *
425
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
426
+ *
427
+ * Required API Key ACLs:
428
+ * - settings
429
+ * @param getConfig - The getConfig object.
430
+ * @param getConfig.indexName - Query Suggestions index name.
431
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
432
+ * @see getConfig for the plain version.
433
+ */
434
+ getConfigWithHTTPInfo({ indexName }, requestOptions) {
435
+ validateRequired("indexName", "getConfigWithHTTPInfo", indexName);
436
+ const requestPath = "/1/configs/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
437
+ const headers = {};
438
+ const queryParameters = {};
439
+ const request = {
440
+ method: "GET",
441
+ path: requestPath,
442
+ queryParameters,
443
+ headers
444
+ };
445
+ return transporter.requestWithHttpInfo(request, requestOptions);
446
+ },
254
447
  /**
255
448
  * Reports the status of a Query Suggestions index.
256
449
  *
@@ -273,6 +466,31 @@ function createQuerySuggestionsClient({
273
466
  };
274
467
  return transporter.request(request, requestOptions);
275
468
  },
469
+ /**
470
+ * Reports the status of a Query Suggestions index.
471
+ *
472
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
473
+ *
474
+ * Required API Key ACLs:
475
+ * - settings
476
+ * @param getConfigStatus - The getConfigStatus object.
477
+ * @param getConfigStatus.indexName - Query Suggestions index name.
478
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
479
+ * @see getConfigStatus for the plain version.
480
+ */
481
+ getConfigStatusWithHTTPInfo({ indexName }, requestOptions) {
482
+ validateRequired("indexName", "getConfigStatusWithHTTPInfo", indexName);
483
+ const requestPath = "/1/configs/{indexName}/status".replace("{indexName}", encodeURIComponent(indexName));
484
+ const headers = {};
485
+ const queryParameters = {};
486
+ const request = {
487
+ method: "GET",
488
+ path: requestPath,
489
+ queryParameters,
490
+ headers
491
+ };
492
+ return transporter.requestWithHttpInfo(request, requestOptions);
493
+ },
276
494
  /**
277
495
  * Retrieves the logs for a single Query Suggestions index.
278
496
  *
@@ -295,6 +513,31 @@ function createQuerySuggestionsClient({
295
513
  };
296
514
  return transporter.request(request, requestOptions);
297
515
  },
516
+ /**
517
+ * Retrieves the logs for a single Query Suggestions index.
518
+ *
519
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
520
+ *
521
+ * Required API Key ACLs:
522
+ * - settings
523
+ * @param getLogFile - The getLogFile object.
524
+ * @param getLogFile.indexName - Query Suggestions index name.
525
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
526
+ * @see getLogFile for the plain version.
527
+ */
528
+ getLogFileWithHTTPInfo({ indexName }, requestOptions) {
529
+ validateRequired("indexName", "getLogFileWithHTTPInfo", indexName);
530
+ const requestPath = "/1/logs/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
531
+ const headers = {};
532
+ const queryParameters = {};
533
+ const request = {
534
+ method: "GET",
535
+ path: requestPath,
536
+ queryParameters,
537
+ headers
538
+ };
539
+ return transporter.requestWithHttpInfo(request, requestOptions);
540
+ },
298
541
  /**
299
542
  * Updates a QuerySuggestions configuration.
300
543
  *
@@ -320,6 +563,35 @@ function createQuerySuggestionsClient({
320
563
  data: configuration
321
564
  };
322
565
  return transporter.request(request, requestOptions);
566
+ },
567
+ /**
568
+ * Updates a QuerySuggestions configuration.
569
+ *
570
+ * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.
571
+ *
572
+ * Required API Key ACLs:
573
+ * - editSettings
574
+ * @param updateConfig - The updateConfig object.
575
+ * @param updateConfig.indexName - Query Suggestions index name.
576
+ * @param updateConfig.configuration - The configuration object.
577
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
578
+ * @see updateConfig for the plain version.
579
+ */
580
+ updateConfigWithHTTPInfo({ indexName, configuration }, requestOptions) {
581
+ validateRequired("indexName", "updateConfigWithHTTPInfo", indexName);
582
+ validateRequired("configuration", "updateConfigWithHTTPInfo", configuration);
583
+ validateRequired("configuration.sourceIndices", "updateConfigWithHTTPInfo", configuration.sourceIndices);
584
+ const requestPath = "/1/configs/{indexName}".replace("{indexName}", encodeURIComponent(indexName));
585
+ const headers = {};
586
+ const queryParameters = {};
587
+ const request = {
588
+ method: "PUT",
589
+ path: requestPath,
590
+ queryParameters,
591
+ headers,
592
+ data: configuration
593
+ };
594
+ return transporter.requestWithHttpInfo(request, requestOptions);
323
595
  }
324
596
  };
325
597
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../builds/fetch.ts","../../src/querySuggestionsClient.ts"],"sourcesContent":["// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nexport type QuerySuggestionsClient = ReturnType<typeof createQuerySuggestionsClient>;\n\nimport { gzipSync } from 'node:zlib';\n\nimport { createMemoryCache, createNullCache, createNullLogger } from '@algolia/client-common';\nimport { createFetchRequester } from '@algolia/requester-fetch';\n\nimport type { ClientOptions } from '@algolia/client-common';\n\nimport { createQuerySuggestionsClient } from '../src/querySuggestionsClient';\n\nimport type { Region } from '../src/querySuggestionsClient';\nimport { REGIONS } from '../src/querySuggestionsClient';\n\nexport type { Region, RegionOptions } from '../src/querySuggestionsClient';\n\nexport { apiClientVersion } from '../src/querySuggestionsClient';\n\nexport * from '../model';\n\nexport function querySuggestionsClient(\n appId: string,\n apiKey: string,\n region: Region,\n options?: ClientOptions | undefined,\n): QuerySuggestionsClient {\n if (!appId || typeof appId !== 'string') {\n throw new Error('`appId` is missing.');\n }\n\n if (!apiKey || typeof apiKey !== 'string') {\n throw new Error('`apiKey` is missing.');\n }\n\n if (!region || (region && (typeof region !== 'string' || !REGIONS.includes(region)))) {\n throw new Error(`\\`region\\` is required and must be one of the following: ${REGIONS.join(', ')}`);\n }\n\n return {\n ...createQuerySuggestionsClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 2000,\n read: 5000,\n write: 30000,\n },\n logger: createNullLogger(),\n requester: createFetchRequester(),\n algoliaAgents: [{ segment: 'Fetch' }],\n responsesCache: createNullCache(),\n requestsCache: createNullCache(),\n hostsCache: createMemoryCache(),\n compress: async (data: string): Promise<Uint8Array> => gzipSync(Buffer.from(data)),\n ...options,\n }),\n };\n}\n","// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport type {\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\nimport { createAuth, createTransporter, getAlgoliaAgent, validateRequired } from '@algolia/client-common';\n\nimport type { BaseResponse } from '../model/baseResponse';\nimport type { ConfigStatus } from '../model/configStatus';\nimport type { ConfigurationResponse } from '../model/configurationResponse';\nimport type { ConfigurationWithIndex } from '../model/configurationWithIndex';\nimport type { LogFile } from '../model/logFile';\n\nimport type {\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeleteConfigProps,\n GetConfigProps,\n GetConfigStatusProps,\n GetLogFileProps,\n UpdateConfigProps,\n} from '../model/clientMethodProps';\n\nexport const apiClientVersion = '5.55.1';\n\nexport const REGIONS = ['eu', 'us'] as const;\nexport type Region = (typeof REGIONS)[number];\nexport type RegionOptions = { region: Region };\n\nfunction getDefaultHosts(region: Region): Host[] {\n const url = 'query-suggestions.{region}.algolia.com'.replace('{region}', region);\n\n return [{ url, accept: 'readWrite', protocol: 'https' }];\n}\n\nexport function createQuerySuggestionsClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}: CreateClientOptions & RegionOptions) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'QuerySuggestions',\n version: apiClientVersion,\n }),\n baseHeaders: {\n 'content-type': 'text/plain',\n ...auth.headers(),\n ...options.baseHeaders,\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters,\n },\n });\n\n return {\n transporter,\n\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache(): Promise<void> {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return transporter.algoliaAgent.value;\n },\n\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment: string, version?: string | undefined): void {\n transporter.algoliaAgent.add({ segment, version });\n },\n\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }: { apiKey: string }): void {\n if (!authMode || authMode === 'WithinHeaders') {\n transporter.baseHeaders['x-algolia-api-key'] = apiKey;\n } else {\n transporter.baseQueryParameters['x-algolia-api-key'] = apiKey;\n }\n },\n\n /**\n * Creates a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param configurationWithIndex - The configurationWithIndex object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createConfig(\n configurationWithIndex: ConfigurationWithIndex,\n requestOptions?: RequestOptions,\n ): Promise<BaseResponse> {\n validateRequired('configurationWithIndex', 'createConfig', configurationWithIndex);\n\n const requestPath = '/1/configs';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: configurationWithIndex,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete(\n { path, parameters }: CustomDeleteProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n validateRequired('path', 'customDelete', path);\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'DELETE',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>> {\n validateRequired('path', 'customGet', path);\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost(\n { path, parameters, body }: CustomPostProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n validateRequired('path', 'customPost', path);\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut(\n { path, parameters, body }: CustomPutProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n validateRequired('path', 'customPut', path);\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'PUT',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Deletes a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. To delete the Query Suggestions index itself, use the Search API and the `Delete an index` operation.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteConfig - The deleteConfig object.\n * @param deleteConfig.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteConfig({ indexName }: DeleteConfigProps, requestOptions?: RequestOptions): Promise<BaseResponse> {\n validateRequired('indexName', 'deleteConfig', indexName);\n\n const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'DELETE',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves all Query Suggestions configurations of your Algolia application.\n *\n * Required API Key ACLs:\n * - settings\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAllConfigs(requestOptions?: RequestOptions | undefined): Promise<Array<ConfigurationResponse>> {\n const requestPath = '/1/configs';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves a single Query Suggestions configuration by its index name.\n *\n * Required API Key ACLs:\n * - settings\n * @param getConfig - The getConfig object.\n * @param getConfig.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getConfig({ indexName }: GetConfigProps, requestOptions?: RequestOptions): Promise<ConfigurationResponse> {\n validateRequired('indexName', 'getConfig', indexName);\n\n const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Reports the status of a Query Suggestions index.\n *\n * Required API Key ACLs:\n * - settings\n * @param getConfigStatus - The getConfigStatus object.\n * @param getConfigStatus.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getConfigStatus({ indexName }: GetConfigStatusProps, requestOptions?: RequestOptions): Promise<ConfigStatus> {\n validateRequired('indexName', 'getConfigStatus', indexName);\n\n const requestPath = '/1/configs/{indexName}/status'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the logs for a single Query Suggestions index.\n *\n * Required API Key ACLs:\n * - settings\n * @param getLogFile - The getLogFile object.\n * @param getLogFile.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getLogFile({ indexName }: GetLogFileProps, requestOptions?: RequestOptions): Promise<LogFile> {\n validateRequired('indexName', 'getLogFile', indexName);\n\n const requestPath = '/1/logs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Updates a QuerySuggestions configuration.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param updateConfig - The updateConfig object.\n * @param updateConfig.indexName - Query Suggestions index name.\n * @param updateConfig.configuration - The configuration object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateConfig(\n { indexName, configuration }: UpdateConfigProps,\n requestOptions?: RequestOptions,\n ): Promise<BaseResponse> {\n validateRequired('indexName', 'updateConfig', indexName);\n\n validateRequired('configuration', 'updateConfig', configuration);\n\n validateRequired('configuration.sourceIndices', 'updateConfig', configuration.sourceIndices);\n\n const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'PUT',\n path: requestPath,\n queryParameters,\n headers,\n data: configuration,\n };\n\n return transporter.request(request, requestOptions);\n },\n };\n}\n"],"mappings":";AAIA,SAAS,gBAAgB;AAEzB,SAAS,mBAAmB,iBAAiB,wBAAwB;AACrE,SAAS,4BAA4B;;;ACGrC,SAAS,YAAY,mBAAmB,iBAAiB,wBAAwB;AAoB1E,IAAM,mBAAmB;AAEzB,IAAM,UAAU,CAAC,MAAM,IAAI;AAIlC,SAAS,gBAAgB,QAAwB;AAC/C,QAAM,MAAM,yCAAyC,QAAQ,YAAY,MAAM;AAE/E,SAAO,CAAC,EAAE,KAAK,QAAQ,aAAa,UAAU,QAAQ,CAAC;AACzD;AAEO,SAAS,6BAA6B;AAAA,EAC3C,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,GAAG;AACL,GAAwC;AACtC,QAAM,OAAO,WAAW,aAAa,cAAc,QAAQ;AAC3D,QAAM,cAAc,kBAAkB;AAAA,IACpC,OAAO,gBAAgB,YAAY;AAAA,IACnC,GAAG;AAAA,IACH,cAAc,gBAAgB;AAAA,MAC5B;AAAA,MACA,QAAQ;AAAA,MACR,SAAS;AAAA,IACX,CAAC;AAAA,IACD,aAAa;AAAA,MACX,gBAAgB;AAAA,MAChB,GAAG,KAAK,QAAQ;AAAA,MAChB,GAAG,QAAQ;AAAA,IACb;AAAA,IACA,qBAAqB;AAAA,MACnB,GAAG,KAAK,gBAAgB;AAAA,MACxB,GAAG,QAAQ;AAAA,IACb;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL;AAAA;AAAA;AAAA;AAAA,IAKA,OAAO;AAAA;AAAA;AAAA;AAAA,IAKP,QAAQ;AAAA;AAAA;AAAA;AAAA,IAKR,aAA4B;AAC1B,aAAO,QAAQ,IAAI,CAAC,YAAY,cAAc,MAAM,GAAG,YAAY,eAAe,MAAM,CAAC,CAAC,EAAE,KAAK,MAAM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B;AAAA,EACxC;AAEA,MAAI,CAAC,UAAW,WAAW,OAAO,WAAW,YAAY,CAAC,QAAQ,SAAS,MAAM,IAAK;AACpF,UAAM,IAAI,MAAM,4DAA4D,QAAQ,KAAK,IAAI,CAAC,EAAE;AAAA,EAClG;AAEA,SAAO;AAAA,IACL,GAAG,6BAA6B;AAAA,MAC9B;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,QACR,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA,QAAQ,iBAAiB;AAAA,MACzB,WAAW,qBAAqB;AAAA,MAChC,eAAe,CAAC,EAAE,SAAS,QAAQ,CAAC;AAAA,MACpC,gBAAgB,gBAAgB;AAAA,MAChC,eAAe,gBAAgB;AAAA,MAC/B,YAAY,kBAAkB;AAAA,MAC9B,UAAU,OAAO,SAAsC,SAAS,OAAO,KAAK,IAAI,CAAC;AAAA,MACjF,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;","names":[]}
1
+ {"version":3,"sources":["../../builds/fetch.ts","../../src/querySuggestionsClient.ts"],"sourcesContent":["// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nexport type QuerySuggestionsClient = ReturnType<typeof createQuerySuggestionsClient>;\n\nimport { gzipSync } from 'node:zlib';\n\nimport { createMemoryCache, createNullCache, createNullLogger } from '@algolia/client-common';\nimport { createFetchRequester } from '@algolia/requester-fetch';\n\nimport type { ClientOptions } from '@algolia/client-common';\n\nimport { createQuerySuggestionsClient } from '../src/querySuggestionsClient';\n\nimport type { Region } from '../src/querySuggestionsClient';\nimport { REGIONS } from '../src/querySuggestionsClient';\n\nexport type { Region, RegionOptions } from '../src/querySuggestionsClient';\n\nexport { apiClientVersion } from '../src/querySuggestionsClient';\n\nexport * from '../model';\n\nexport function querySuggestionsClient(\n appId: string,\n apiKey: string,\n region: Region,\n options?: ClientOptions | undefined,\n): QuerySuggestionsClient {\n if (!appId || typeof appId !== 'string') {\n throw new Error('`appId` is missing.');\n }\n\n if (!apiKey || typeof apiKey !== 'string') {\n throw new Error('`apiKey` is missing.');\n }\n\n if (!region || (region && (typeof region !== 'string' || !REGIONS.includes(region)))) {\n throw new Error(`\\`region\\` is required and must be one of the following: ${REGIONS.join(', ')}`);\n }\n\n return {\n ...createQuerySuggestionsClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: 2000,\n read: 5000,\n write: 30000,\n },\n logger: createNullLogger(),\n requester: createFetchRequester(),\n algoliaAgents: [{ segment: 'Fetch' }],\n responsesCache: createNullCache(),\n requestsCache: createNullCache(),\n hostsCache: createMemoryCache(),\n compress: async (data: string): Promise<Uint8Array> => gzipSync(Buffer.from(data)),\n ...options,\n }),\n };\n}\n","// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport type {\n AlgoliaHttpResponse,\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\nimport { createAuth, createTransporter, getAlgoliaAgent, validateRequired } from '@algolia/client-common';\n\nimport type { BaseResponse } from '../model/baseResponse';\nimport type { ConfigStatus } from '../model/configStatus';\nimport type { ConfigurationResponse } from '../model/configurationResponse';\nimport type { ConfigurationWithIndex } from '../model/configurationWithIndex';\nimport type { LogFile } from '../model/logFile';\n\nimport type {\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeleteConfigProps,\n GetConfigProps,\n GetConfigStatusProps,\n GetLogFileProps,\n UpdateConfigProps,\n} from '../model/clientMethodProps';\n\nexport const apiClientVersion = '5.56.0';\n\nexport const REGIONS = ['eu', 'us'] as const;\nexport type Region = (typeof REGIONS)[number];\nexport type RegionOptions = { region: Region };\n\nfunction getDefaultHosts(region: Region): Host[] {\n const url = 'query-suggestions.{region}.algolia.com'.replace('{region}', region);\n\n return [{ url, accept: 'readWrite', protocol: 'https' }];\n}\n\nexport function createQuerySuggestionsClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}: CreateClientOptions & RegionOptions) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'QuerySuggestions',\n version: apiClientVersion,\n }),\n baseHeaders: {\n 'content-type': 'text/plain',\n ...auth.headers(),\n ...options.baseHeaders,\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters,\n },\n });\n\n return {\n transporter,\n\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache(): Promise<void> {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return transporter.algoliaAgent.value;\n },\n\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment: string, version?: string | undefined): void {\n transporter.algoliaAgent.add({ segment, version });\n },\n\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }: { apiKey: string }): void {\n if (!authMode || authMode === 'WithinHeaders') {\n transporter.baseHeaders['x-algolia-api-key'] = apiKey;\n } else {\n transporter.baseQueryParameters['x-algolia-api-key'] = apiKey;\n }\n },\n\n /**\n * Creates a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param configurationWithIndex - The configurationWithIndex object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createConfig(\n configurationWithIndex: ConfigurationWithIndex,\n requestOptions?: RequestOptions,\n ): Promise<BaseResponse> {\n validateRequired('configurationWithIndex', 'createConfig', configurationWithIndex);\n\n const requestPath = '/1/configs';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: configurationWithIndex,\n };\n\n return transporter.request(request, requestOptions);\n },\n /**\n * Creates a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.\n *\n * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param configurationWithIndex - The configurationWithIndex object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n * @see createConfig for the plain version.\n */\n createConfigWithHTTPInfo(\n configurationWithIndex: ConfigurationWithIndex,\n requestOptions?: RequestOptions,\n ): Promise<AlgoliaHttpResponse<BaseResponse>> {\n validateRequired('configurationWithIndex', 'createConfigWithHTTPInfo', configurationWithIndex);\n\n const requestPath = '/1/configs';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: configurationWithIndex,\n };\n\n return transporter.requestWithHttpInfo(request, requestOptions);\n },\n\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete(\n { path, parameters }: CustomDeleteProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n validateRequired('path', 'customDelete', path);\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'DELETE',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n *\n * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n * @see customDelete for the plain version.\n */\n customDeleteWithHTTPInfo(\n { path, parameters }: CustomDeleteProps,\n requestOptions?: RequestOptions,\n ): Promise<AlgoliaHttpResponse<Record<string, unknown>>> {\n validateRequired('path', 'customDeleteWithHTTPInfo', path);\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'DELETE',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.requestWithHttpInfo(request, requestOptions);\n },\n\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>> {\n validateRequired('path', 'customGet', path);\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n *\n * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n * @see customGet for the plain version.\n */\n customGetWithHTTPInfo(\n { path, parameters }: CustomGetProps,\n requestOptions?: RequestOptions,\n ): Promise<AlgoliaHttpResponse<Record<string, unknown>>> {\n validateRequired('path', 'customGetWithHTTPInfo', path);\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.requestWithHttpInfo(request, requestOptions);\n },\n\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost(\n { path, parameters, body }: CustomPostProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n validateRequired('path', 'customPost', path);\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n *\n * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n * @see customPost for the plain version.\n */\n customPostWithHTTPInfo(\n { path, parameters, body }: CustomPostProps,\n requestOptions?: RequestOptions,\n ): Promise<AlgoliaHttpResponse<Record<string, unknown>>> {\n validateRequired('path', 'customPostWithHTTPInfo', path);\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.requestWithHttpInfo(request, requestOptions);\n },\n\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut(\n { path, parameters, body }: CustomPutProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n validateRequired('path', 'customPut', path);\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'PUT',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n *\n * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n * @see customPut for the plain version.\n */\n customPutWithHTTPInfo(\n { path, parameters, body }: CustomPutProps,\n requestOptions?: RequestOptions,\n ): Promise<AlgoliaHttpResponse<Record<string, unknown>>> {\n validateRequired('path', 'customPutWithHTTPInfo', path);\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'PUT',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.requestWithHttpInfo(request, requestOptions);\n },\n\n /**\n * Deletes a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. To delete the Query Suggestions index itself, use the Search API and the `Delete an index` operation.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteConfig - The deleteConfig object.\n * @param deleteConfig.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteConfig({ indexName }: DeleteConfigProps, requestOptions?: RequestOptions): Promise<BaseResponse> {\n validateRequired('indexName', 'deleteConfig', indexName);\n\n const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'DELETE',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n /**\n * Deletes a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. To delete the Query Suggestions index itself, use the Search API and the `Delete an index` operation.\n *\n * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteConfig - The deleteConfig object.\n * @param deleteConfig.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n * @see deleteConfig for the plain version.\n */\n deleteConfigWithHTTPInfo(\n { indexName }: DeleteConfigProps,\n requestOptions?: RequestOptions,\n ): Promise<AlgoliaHttpResponse<BaseResponse>> {\n validateRequired('indexName', 'deleteConfigWithHTTPInfo', indexName);\n\n const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'DELETE',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.requestWithHttpInfo(request, requestOptions);\n },\n\n /**\n * Retrieves all Query Suggestions configurations of your Algolia application.\n *\n * Required API Key ACLs:\n * - settings\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAllConfigs(requestOptions?: RequestOptions | undefined): Promise<Array<ConfigurationResponse>> {\n const requestPath = '/1/configs';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves all Query Suggestions configurations of your Algolia application.\n *\n * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.\n *\n * Required API Key ACLs:\n * - settings\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n * @see getAllConfigs for the plain version.\n */\n getAllConfigsWithHTTPInfo(\n requestOptions?: RequestOptions | undefined,\n ): Promise<AlgoliaHttpResponse<Array<ConfigurationResponse>>> {\n const requestPath = '/1/configs';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.requestWithHttpInfo(request, requestOptions);\n },\n\n /**\n * Retrieves a single Query Suggestions configuration by its index name.\n *\n * Required API Key ACLs:\n * - settings\n * @param getConfig - The getConfig object.\n * @param getConfig.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getConfig({ indexName }: GetConfigProps, requestOptions?: RequestOptions): Promise<ConfigurationResponse> {\n validateRequired('indexName', 'getConfig', indexName);\n\n const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves a single Query Suggestions configuration by its index name.\n *\n * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.\n *\n * Required API Key ACLs:\n * - settings\n * @param getConfig - The getConfig object.\n * @param getConfig.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n * @see getConfig for the plain version.\n */\n getConfigWithHTTPInfo(\n { indexName }: GetConfigProps,\n requestOptions?: RequestOptions,\n ): Promise<AlgoliaHttpResponse<ConfigurationResponse>> {\n validateRequired('indexName', 'getConfigWithHTTPInfo', indexName);\n\n const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.requestWithHttpInfo(request, requestOptions);\n },\n\n /**\n * Reports the status of a Query Suggestions index.\n *\n * Required API Key ACLs:\n * - settings\n * @param getConfigStatus - The getConfigStatus object.\n * @param getConfigStatus.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getConfigStatus({ indexName }: GetConfigStatusProps, requestOptions?: RequestOptions): Promise<ConfigStatus> {\n validateRequired('indexName', 'getConfigStatus', indexName);\n\n const requestPath = '/1/configs/{indexName}/status'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n /**\n * Reports the status of a Query Suggestions index.\n *\n * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.\n *\n * Required API Key ACLs:\n * - settings\n * @param getConfigStatus - The getConfigStatus object.\n * @param getConfigStatus.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n * @see getConfigStatus for the plain version.\n */\n getConfigStatusWithHTTPInfo(\n { indexName }: GetConfigStatusProps,\n requestOptions?: RequestOptions,\n ): Promise<AlgoliaHttpResponse<ConfigStatus>> {\n validateRequired('indexName', 'getConfigStatusWithHTTPInfo', indexName);\n\n const requestPath = '/1/configs/{indexName}/status'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.requestWithHttpInfo(request, requestOptions);\n },\n\n /**\n * Retrieves the logs for a single Query Suggestions index.\n *\n * Required API Key ACLs:\n * - settings\n * @param getLogFile - The getLogFile object.\n * @param getLogFile.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getLogFile({ indexName }: GetLogFileProps, requestOptions?: RequestOptions): Promise<LogFile> {\n validateRequired('indexName', 'getLogFile', indexName);\n\n const requestPath = '/1/logs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n /**\n * Retrieves the logs for a single Query Suggestions index.\n *\n * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.\n *\n * Required API Key ACLs:\n * - settings\n * @param getLogFile - The getLogFile object.\n * @param getLogFile.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n * @see getLogFile for the plain version.\n */\n getLogFileWithHTTPInfo(\n { indexName }: GetLogFileProps,\n requestOptions?: RequestOptions,\n ): Promise<AlgoliaHttpResponse<LogFile>> {\n validateRequired('indexName', 'getLogFileWithHTTPInfo', indexName);\n\n const requestPath = '/1/logs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.requestWithHttpInfo(request, requestOptions);\n },\n\n /**\n * Updates a QuerySuggestions configuration.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param updateConfig - The updateConfig object.\n * @param updateConfig.indexName - Query Suggestions index name.\n * @param updateConfig.configuration - The configuration object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateConfig(\n { indexName, configuration }: UpdateConfigProps,\n requestOptions?: RequestOptions,\n ): Promise<BaseResponse> {\n validateRequired('indexName', 'updateConfig', indexName);\n\n validateRequired('configuration', 'updateConfig', configuration);\n\n validateRequired('configuration.sourceIndices', 'updateConfig', configuration.sourceIndices);\n\n const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'PUT',\n path: requestPath,\n queryParameters,\n headers,\n data: configuration,\n };\n\n return transporter.request(request, requestOptions);\n },\n /**\n * Updates a QuerySuggestions configuration.\n *\n * Resolves with the full HTTP response information: status code, headers (when the requester captures them), raw body and deserialized data. Bypasses the requests and responses caches: always performs the API call.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param updateConfig - The updateConfig object.\n * @param updateConfig.indexName - Query Suggestions index name.\n * @param updateConfig.configuration - The configuration object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n * @see updateConfig for the plain version.\n */\n updateConfigWithHTTPInfo(\n { indexName, configuration }: UpdateConfigProps,\n requestOptions?: RequestOptions,\n ): Promise<AlgoliaHttpResponse<BaseResponse>> {\n validateRequired('indexName', 'updateConfigWithHTTPInfo', indexName);\n\n validateRequired('configuration', 'updateConfigWithHTTPInfo', configuration);\n\n validateRequired('configuration.sourceIndices', 'updateConfigWithHTTPInfo', configuration.sourceIndices);\n\n const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'PUT',\n path: requestPath,\n queryParameters,\n headers,\n data: configuration,\n };\n\n return transporter.requestWithHttpInfo(request, requestOptions);\n },\n };\n}\n"],"mappings":";AAIA,SAAS,gBAAgB;AAEzB,SAAS,mBAAmB,iBAAiB,wBAAwB;AACrE,SAAS,4BAA4B;;;ACIrC,SAAS,YAAY,mBAAmB,iBAAiB,wBAAwB;AAoB1E,IAAM,mBAAmB;AAEzB,IAAM,UAAU,CAAC,MAAM,IAAI;AAIlC,SAAS,gBAAgB,QAAwB;AAC/C,QAAM,MAAM,yCAAyC,QAAQ,YAAY,MAAM;AAE/E,SAAO,CAAC,EAAE,KAAK,QAAQ,aAAa,UAAU,QAAQ,CAAC;AACzD;AAEO,SAAS,6BAA6B;AAAA,EAC3C,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,GAAG;AACL,GAAwC;AACtC,QAAM,OAAO,WAAW,aAAa,cAAc,QAAQ;AAC3D,QAAM,cAAc,kBAAkB;AAAA,IACpC,OAAO,gBAAgB,YAAY;AAAA,IACnC,GAAG;AAAA,IACH,cAAc,gBAAgB;AAAA,MAC5B;AAAA,MACA,QAAQ;AAAA,MACR,SAAS;AAAA,IACX,CAAC;AAAA,IACD,aAAa;AAAA,MACX,gBAAgB;AAAA,MAChB,GAAG,KAAK,QAAQ;AAAA,MAChB,GAAG,QAAQ;AAAA,IACb;AAAA,IACA,qBAAqB;AAAA,MACnB,GAAG,KAAK,gBAAgB;AAAA,MACxB,GAAG,QAAQ;AAAA,IACb;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL;AAAA;AAAA;AAAA;AAAA,IAKA,OAAO;AAAA;AAAA;AAAA;AAAA,IAKP,QAAQ;AAAA;AAAA;AAAA;AAAA,IAKR,aAA4B;AAC1B,aAAO,QAAQ,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