Socket
Socket
Sign inDemoInstall

@algolia/client-query-suggestions

Package Overview
Dependencies
Maintainers
0
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@algolia/client-query-suggestions - npm Package Compare versions

Comparing version 5.7.0 to 5.8.0

184

dist/browser.d.ts

@@ -15,6 +15,36 @@ import * as _algolia_client_common from '@algolia/client-common';

type ConfigStatus = {
/**
* Name of the Query Suggestions index (case-sensitive).
*/
indexName?: string;
/**
* Whether the creation or update of the Query Suggestions index is in progress.
*/
isRunning?: boolean;
/**
* Date and time when the Query Suggestions index was last built, in RFC 3339 format.
*/
lastBuiltAt?: string;
/**
* Date and time when the Query Suggestions index was last updated successfully.
*/
lastSuccessfulBuiltAt?: string;
/**
* Duration of the last successful build in seconds.
*/
lastSuccessfulBuildDuration?: string;
};
type AppID = {
/**
* Algolia application ID to which this Query Suggestions configuration belongs.
*/
appID?: string;
};
/**
* Languages for deduplicating singular and plural suggestions. If specified, only the more popular form is included.
*/
type Languages = string[] | boolean;
type Languages = Array<string> | boolean;

@@ -47,4 +77,4 @@ /**

replicas?: boolean;
analyticsTags?: string[] | null;
facets?: Facet[] | null;
analyticsTags?: Array<string> | null;
facets?: Array<Facet> | null;
/**

@@ -58,4 +88,4 @@ * Minimum number of hits required to be included as a suggestion. A search query must at least generate `minHits` search results to be included in the Query Suggestions index.

minLetters?: number;
generate?: string[][] | null;
external?: string[] | null;
generate?: Array<Array<string>> | null;
external?: Array<string> | null;
};

@@ -70,5 +100,5 @@

*/
sourceIndices: SourceIndex[];
sourceIndices: Array<SourceIndex>;
languages?: Languages;
exclude?: string[] | null;
exclude?: Array<string> | null;
/**

@@ -85,2 +115,33 @@ * Whether to turn on personalized query suggestions.

/**
* Query Suggestions configuration.
*/
type ConfigurationWithIndex = Record<string, unknown> & Configuration;
/**
* API response for retrieving Query Suggestions configurations.
*/
type ConfigurationResponse = AppID & ConfigurationWithIndex;
/**
* Type of log entry. - `SKIP`. A query is skipped because it doesn\'t match the conditions for successful inclusion. For example, when a query doesn\'t generate enough search results. - `INFO`. An informative log entry. - `ERROR`. The Query Suggestions process encountered an error.
*/
type LogLevel = 'SKIP' | 'INFO' | 'ERROR';
type LogFile = {
/**
* Date and time of the log entry, in RFC 3339 format.
*/
timestamp?: string;
level?: LogLevel;
/**
* Details about this log entry.
*/
message?: string;
/**
* Level indicating the position of a suggestion in a hierarchy of records. For example, a `contextLevel` of 1 indicates that this suggestion belongs to a previous suggestion with `contextLevel` 0.
*/
contextLevel?: number;
};
/**
* Properties for the `customDelete` method.

@@ -96,3 +157,5 @@ */

*/
parameters?: Record<string, any>;
parameters?: {
[key: string]: any;
};
};

@@ -110,3 +173,5 @@ /**

*/
parameters?: Record<string, any>;
parameters?: {
[key: string]: any;
};
};

@@ -124,3 +189,5 @@ /**

*/
parameters?: Record<string, any>;
parameters?: {
[key: string]: any;
};
/**

@@ -142,3 +209,5 @@ * Parameters to send with the custom request.

*/
parameters?: Record<string, any>;
parameters?: {
[key: string]: any;
};
/**

@@ -196,64 +265,3 @@ * Parameters to send with the custom request.

type ConfigStatus = {
/**
* Name of the Query Suggestions index (case-sensitive).
*/
indexName?: string;
/**
* Whether the creation or update of the Query Suggestions index is in progress.
*/
isRunning?: boolean;
/**
* Date and time when the Query Suggestions index was last built, in RFC 3339 format.
*/
lastBuiltAt?: string;
/**
* Date and time when the Query Suggestions index was last updated successfully.
*/
lastSuccessfulBuiltAt?: string;
/**
* Duration of the last successful build in seconds.
*/
lastSuccessfulBuildDuration?: string;
};
type AppID = {
/**
* Algolia application ID to which this Query Suggestions configuration belongs.
*/
appID?: string;
};
/**
* Query Suggestions configuration.
*/
type ConfigurationWithIndex = Configuration & Record<string, unknown>;
/**
* API response for retrieving Query Suggestions configurations.
*/
type ConfigurationResponse = AppID & ConfigurationWithIndex;
/**
* Type of log entry. - `SKIP`. A query is skipped because it doesn\'t match the conditions for successful inclusion. For example, when a query doesn\'t generate enough search results. - `INFO`. An informative log entry. - `ERROR`. The Query Suggestions process encountered an error.
*/
type LogLevel = 'ERROR' | 'INFO' | 'SKIP';
type LogFile = {
/**
* Date and time of the log entry, in RFC 3339 format.
*/
timestamp?: string;
level?: LogLevel;
/**
* Details about this log entry.
*/
message?: string;
/**
* Level indicating the position of a suggestion in a hierarchy of records. For example, a `contextLevel` of 1 indicates that this suggestion belongs to a previous suggestion with `contextLevel` 0.
*/
contextLevel?: number;
};
declare const apiClientVersion = "5.7.0";
declare const apiClientVersion = "5.8.0";
declare const REGIONS: readonly ["eu", "us"];

@@ -297,4 +305,3 @@ type Region = (typeof REGIONS)[number];

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param configurationWithIndex - The configurationWithIndex object.

@@ -306,3 +313,2 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* This method allow you to send requests to the Algolia REST API.
*
* @param customDelete - The customDelete object.

@@ -316,3 +322,2 @@ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customGet - The customGet object.

@@ -326,3 +331,2 @@ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customPost - The customPost object.

@@ -337,3 +341,2 @@ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customPut - The customPut object.

@@ -350,4 +353,3 @@ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param deleteConfig - The deleteConfig object.

@@ -362,7 +364,6 @@ * @param deleteConfig.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
getAllConfigs(requestOptions?: RequestOptions): Promise<ConfigurationResponse[]>;
getAllConfigs(requestOptions?: RequestOptions): Promise<Array<ConfigurationResponse>>;
/**

@@ -372,4 +373,3 @@ * Retrieves a single Query Suggestions configuration by its index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getConfig - The getConfig object.

@@ -384,4 +384,3 @@ * @param getConfig.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getConfigStatus - The getConfigStatus object.

@@ -396,4 +395,3 @@ * @param getConfigStatus.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getLogFile - The getLogFile object.

@@ -408,4 +406,3 @@ * @param getLogFile.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param updateConfig - The updateConfig object.

@@ -426,6 +423,5 @@ * @param updateConfig.indexName - Query Suggestions index name.

declare function querySuggestionsClient(appId: string, apiKey: string, region: Region, options?: ClientOptions): QuerySuggestionsClient;
type QuerySuggestionsClient = ReturnType<typeof createQuerySuggestionsClient>;
declare function querySuggestionsClient(appId: string, apiKey: string, region: Region, options?: ClientOptions): QuerySuggestionsClient;
export { type AppID, type BaseResponse, type ConfigStatus, type Configuration, type ConfigurationResponse, type ConfigurationWithIndex, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteConfigProps, type ErrorBase, type Facet, type GetConfigProps, type GetConfigStatusProps, type GetLogFileProps, type Languages, type LogFile, type LogLevel, type QuerySuggestionsClient, type Region, type SourceIndex, type UpdateConfigProps, apiClientVersion, querySuggestionsClient };
// builds/browser.ts
import { createXhrRequester } from "@algolia/requester-browser-xhr";
import {
createBrowserLocalStorageCache,
createFallbackableCache,
createMemoryCache,
createNullLogger,
createMemoryCache,
createFallbackableCache,
createBrowserLocalStorageCache,
DEFAULT_CONNECT_TIMEOUT_BROWSER,

@@ -11,7 +12,6 @@ DEFAULT_READ_TIMEOUT_BROWSER,

} from "@algolia/client-common";
import { createXhrRequester } from "@algolia/requester-browser-xhr";
// src/querySuggestionsClient.ts
import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
var apiClientVersion = "5.7.0";
var apiClientVersion = "5.8.0";
var REGIONS = ["eu", "us"];

@@ -93,4 +93,3 @@ function getDefaultHosts(region) {

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param configurationWithIndex - The configurationWithIndex object.

@@ -117,3 +116,2 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* This method allow you to send requests to the Algolia REST API.
*
* @param customDelete - The customDelete object.

@@ -141,3 +139,2 @@ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customGet - The customGet object.

@@ -165,3 +162,2 @@ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customPost - The customPost object.

@@ -191,3 +187,2 @@ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customPut - The customPut object.

@@ -219,4 +214,3 @@ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param deleteConfig - The deleteConfig object.

@@ -245,4 +239,3 @@ * @param deleteConfig.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -266,4 +259,3 @@ */

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getConfig - The getConfig object.

@@ -292,4 +284,3 @@ * @param getConfig.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getConfigStatus - The getConfigStatus object.

@@ -318,4 +309,3 @@ * @param getConfigStatus.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getLogFile - The getLogFile object.

@@ -344,4 +334,3 @@ * @param getLogFile.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param updateConfig - The updateConfig object.

@@ -348,0 +337,0 @@ * @param updateConfig.indexName - Query Suggestions index name.

@@ -1,2 +0,2 @@

function Q(r){let e,s=`algolia-client-js-${r.key}`;function t(){return e===void 0&&(e=r.localStorage||window.localStorage),e}function i(){return JSON.parse(t().getItem(s)||"{}")}function m(a){t().setItem(s,JSON.stringify(a))}function g(){let a=r.timeToLive?r.timeToLive*1e3:null,o=i(),n=Object.fromEntries(Object.entries(o).filter(([,d])=>d.timestamp!==void 0));if(m(n),!a)return;let c=Object.fromEntries(Object.entries(n).filter(([,d])=>{let p=new Date().getTime();return!(d.timestamp+a<p)}));m(c)}return{get(a,o,n={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(g(),i()[JSON.stringify(a)])).then(c=>Promise.all([c?c.value:o(),c!==void 0])).then(([c,d])=>Promise.all([c,d||n.miss(c)])).then(([c])=>c)},set(a,o){return Promise.resolve().then(()=>{let n=i();return n[JSON.stringify(a)]={timestamp:new Date().getTime(),value:o},t().setItem(s,JSON.stringify(n)),o})},delete(a){return Promise.resolve().then(()=>{let o=i();delete o[JSON.stringify(a)],t().setItem(s,JSON.stringify(o))})},clear(){return Promise.resolve().then(()=>{t().removeItem(s)})}}}function ee(){return{get(r,e,s={miss:()=>Promise.resolve()}){return e().then(i=>Promise.all([i,s.miss(i)])).then(([i])=>i)},set(r,e){return Promise.resolve(e)},delete(r){return Promise.resolve()},clear(){return Promise.resolve()}}}function T(r){let e=[...r.caches],s=e.shift();return s===void 0?ee():{get(t,i,m={miss:()=>Promise.resolve()}){return s.get(t,i,m).catch(()=>T({caches:e}).get(t,i,m))},set(t,i){return s.set(t,i).catch(()=>T({caches:e}).set(t,i))},delete(t){return s.delete(t).catch(()=>T({caches:e}).delete(t))},clear(){return s.clear().catch(()=>T({caches:e}).clear())}}}function v(r={serializable:!0}){let e={};return{get(s,t,i={miss:()=>Promise.resolve()}){let m=JSON.stringify(s);if(m in e)return Promise.resolve(r.serializable?JSON.parse(e[m]):e[m]);let g=t();return g.then(a=>i.miss(a)).then(()=>g)},set(s,t){return e[JSON.stringify(s)]=r.serializable?JSON.stringify(t):t,Promise.resolve(t)},delete(s){return delete e[JSON.stringify(s)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}var G=1e3,F=2e3,$=3e4;function re(r){let e={value:`Algolia for JavaScript (${r})`,add(s){let t=`; ${s.segment}${s.version!==void 0?` (${s.version})`:""}`;return e.value.indexOf(t)===-1&&(e.value=`${e.value}${t}`),e}};return e}function j(r,e,s="WithinHeaders"){let t={"x-algolia-api-key":e,"x-algolia-application-id":r};return{headers(){return s==="WithinHeaders"?t:{}},queryParameters(){return s==="WithinQueryParameters"?t:{}}}}function J({algoliaAgents:r,client:e,version:s}){let t=re(s).add({segment:e,version:s});return r.forEach(i=>t.add(i)),t}function M(){return{debug(r,e){return Promise.resolve()},info(r,e){return Promise.resolve()},error(r,e){return Promise.resolve()}}}var k=2*60*1e3;function W(r,e="up"){let s=Date.now();function t(){return e==="up"||Date.now()-s>k}function i(){return e==="timed out"&&Date.now()-s<=k}return{...r,status:e,lastUpdate:s,isUp:t,isTimedOut:i}}var z=class extends Error{name="AlgoliaError";constructor(r,e){super(r),e&&(this.name=e)}},B=class extends z{stackTrace;constructor(r,e,s){super(r,s),this.stackTrace=e}},te=class extends B{constructor(r){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",r,"RetryError")}},b=class extends B{status;constructor(r,e,s,t="ApiError"){super(r,s,t),this.status=e}},se=class extends z{response;constructor(r,e){super(r,"DeserializationError"),this.response=e}},oe=class extends b{error;constructor(r,e,s,t){super(r,e,t,"DetailedApiError"),this.error=s}};function ne(r,e,s){let t=ae(s),i=`${r.protocol}://${r.url}${r.port?`:${r.port}`:""}/${e.charAt(0)==="/"?e.substring(1):e}`;return t.length&&(i+=`?${t}`),i}function ae(r){return Object.keys(r).filter(e=>r[e]!==void 0).sort().map(e=>`${e}=${encodeURIComponent(Object.prototype.toString.call(r[e])==="[object Array]"?r[e].join(","):r[e]).replaceAll("+","%20")}`).join("&")}function ie(r,e){if(r.method==="GET"||r.data===void 0&&e.data===void 0)return;let s=Array.isArray(r.data)?r.data:{...r.data,...e.data};return JSON.stringify(s)}function ue(r,e,s){let t={Accept:"application/json",...r,...e,...s},i={};return Object.keys(t).forEach(m=>{let g=t[m];i[m.toLowerCase()]=g}),i}function ce(r){try{return JSON.parse(r.content)}catch(e){throw new se(e.message,r)}}function le({content:r,status:e},s){try{let t=JSON.parse(r);return"error"in t?new oe(t.message,e,t.error,s):new b(t.message,e,s)}catch{}return new b(r,e,s)}function me({isTimedOut:r,status:e}){return!r&&~~e===0}function de({isTimedOut:r,status:e}){return r||me({isTimedOut:r,status:e})||~~(e/100)!==2&&~~(e/100)!==4}function he({status:r}){return~~(r/100)===2}function ge(r){return r.map(e=>X(e))}function X(r){let e=r.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...r,request:{...r.request,headers:{...r.request.headers,...e}}}}function K({hosts:r,hostsCache:e,baseHeaders:s,logger:t,baseQueryParameters:i,algoliaAgent:m,timeouts:g,requester:a,requestsCache:o,responsesCache:n}){async function c(u){let l=await Promise.all(u.map(h=>e.get(h,()=>Promise.resolve(W(h))))),P=l.filter(h=>h.isUp()),y=l.filter(h=>h.isTimedOut()),w=[...P,...y];return{hosts:w.length>0?w:u,getTimeout(h,E){return(y.length===0&&h===0?1:y.length+3+h)*E}}}async function d(u,l,P=!0){let y=[],w=ie(u,l),q=ue(s,u.headers,l.headers),h=u.method==="GET"?{...u.data,...l.data}:{},E={...i,...u.queryParameters,...h};if(m.value&&(E["x-algolia-agent"]=m.value),l&&l.queryParameters)for(let f of Object.keys(l.queryParameters))!l.queryParameters[f]||Object.prototype.toString.call(l.queryParameters[f])==="[object Object]"?E[f]=l.queryParameters[f]:E[f]=l.queryParameters[f].toString();let O=0,I=async(f,x)=>{let C=f.pop();if(C===void 0)throw new te(ge(y));let A={...g,...l.timeouts},U={data:w,headers:q,method:u.method,url:ne(C,u.path,E),connectTimeout:x(O,A.connect),responseTimeout:x(O,P?A.read:A.write)},L=N=>{let H={request:U,response:N,host:C,triesLeft:f.length};return y.push(H),H},R=await a.send(U);if(de(R)){let N=L(R);return R.isTimedOut&&O++,t.info("Retryable failure",X(N)),await e.set(C,W(C,R.isTimedOut?"timed out":"down")),I(f,x)}if(he(R))return ce(R);throw L(R),le(R,y)},Z=r.filter(f=>f.accept==="readWrite"||(P?f.accept==="read":f.accept==="write")),D=await c(Z);return I([...D.hosts].reverse(),D.getTimeout)}function p(u,l={}){let P=u.useReadTransporter||u.method==="GET";if(!P)return d(u,l,P);let y=()=>d(u,l);if((l.cacheable||u.cacheable)!==!0)return y();let q={request:u,requestOptions:l,transporter:{queryParameters:i,headers:s}};return n.get(q,()=>o.get(q,()=>o.set(q,y()).then(h=>Promise.all([o.delete(q),h]),h=>Promise.all([o.delete(q),Promise.reject(h)])).then(([h,E])=>E)),{miss:h=>n.set(q,h)})}return{hostsCache:e,requester:a,timeouts:g,logger:t,algoliaAgent:m,baseHeaders:s,baseQueryParameters:i,hosts:r,request:p,requestsCache:o,responsesCache:n}}function V(){function r(e){return new Promise(s=>{let t=new XMLHttpRequest;t.open(e.method,e.url,!0),Object.keys(e.headers).forEach(a=>t.setRequestHeader(a,e.headers[a]));let i=(a,o)=>setTimeout(()=>{t.abort(),s({status:0,content:o,isTimedOut:!0})},a),m=i(e.connectTimeout,"Connection timeout"),g;t.onreadystatechange=()=>{t.readyState>t.OPENED&&g===void 0&&(clearTimeout(m),g=i(e.responseTimeout,"Socket timeout"))},t.onerror=()=>{t.status===0&&(clearTimeout(m),clearTimeout(g),s({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(m),clearTimeout(g),s({content:t.responseText,status:t.status,isTimedOut:!1})},t.send(e.data)})}return{send:r}}var S="5.7.0",_=["eu","us"];function pe(r){return[{url:"query-suggestions.{region}.algolia.com".replace("{region}",r),accept:"readWrite",protocol:"https"}]}function Y({appId:r,apiKey:e,authMode:s,algoliaAgents:t,region:i,...m}){let g=j(r,e,s),a=K({hosts:pe(i),...m,algoliaAgent:J({algoliaAgents:t,client:"QuerySuggestions",version:S}),baseHeaders:{"content-type":"text/plain",...g.headers(),...m.baseHeaders},baseQueryParameters:{...g.queryParameters(),...m.baseQueryParameters}});return{transporter:a,appId:r,clearCache(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then(()=>{})},get _ua(){return a.algoliaAgent.value},addAlgoliaAgent(o,n){a.algoliaAgent.add({segment:o,version:n})},setClientApiKey({apiKey:o}){!s||s==="WithinHeaders"?a.baseHeaders["x-algolia-api-key"]=o:a.baseQueryParameters["x-algolia-api-key"]=o},createConfig(o,n){if(!o)throw new Error("Parameter `configurationWithIndex` is required when calling `createConfig`.");let u={method:"POST",path:"/1/configs",queryParameters:{},headers:{},data:o};return a.request(u,n)},customDelete({path:o,parameters:n},c){if(!o)throw new Error("Parameter `path` is required when calling `customDelete`.");let l={method:"DELETE",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{}};return a.request(l,c)},customGet({path:o,parameters:n},c){if(!o)throw new Error("Parameter `path` is required when calling `customGet`.");let l={method:"GET",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{}};return a.request(l,c)},customPost({path:o,parameters:n,body:c},d){if(!o)throw new Error("Parameter `path` is required when calling `customPost`.");let P={method:"POST",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{},data:c||{}};return a.request(P,d)},customPut({path:o,parameters:n,body:c},d){if(!o)throw new Error("Parameter `path` is required when calling `customPut`.");let P={method:"PUT",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{},data:c||{}};return a.request(P,d)},deleteConfig({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `deleteConfig`.");let u={method:"DELETE",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},getAllConfigs(o){let p={method:"GET",path:"/1/configs",queryParameters:{},headers:{}};return a.request(p,o)},getConfig({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `getConfig`.");let u={method:"GET",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},getConfigStatus({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `getConfigStatus`.");let u={method:"GET",path:"/1/configs/{indexName}/status".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},getLogFile({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `getLogFile`.");let u={method:"GET",path:"/1/logs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},updateConfig({indexName:o,configuration:n},c){if(!o)throw new Error("Parameter `indexName` is required when calling `updateConfig`.");if(!n)throw new Error("Parameter `configuration` is required when calling `updateConfig`.");if(!n.sourceIndices)throw new Error("Parameter `configuration.sourceIndices` is required when calling `updateConfig`.");let l={method:"PUT",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{},data:n};return a.request(l,c)}}}function Fe(r,e,s,t){if(!r||typeof r!="string")throw new Error("`appId` is missing.");if(!e||typeof e!="string")throw new Error("`apiKey` is missing.");if(!s||s&&(typeof s!="string"||!_.includes(s)))throw new Error(`\`region\` is required and must be one of the following: ${_.join(", ")}`);return Y({appId:r,apiKey:e,region:s,timeouts:{connect:G,read:F,write:$},logger:M(),requester:V(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:v(),requestsCache:v({serializable:!1}),hostsCache:T({caches:[Q({key:`${S}-${r}`}),v()]}),...t})}export{S as apiClientVersion,Fe as querySuggestionsClient};
function k(){function r(e){return new Promise(s=>{let t=new XMLHttpRequest;t.open(e.method,e.url,!0),Object.keys(e.headers).forEach(a=>t.setRequestHeader(a,e.headers[a]));let i=(a,o)=>setTimeout(()=>{t.abort(),s({status:0,content:o,isTimedOut:!0})},a),m=i(e.connectTimeout,"Connection timeout"),g;t.onreadystatechange=()=>{t.readyState>t.OPENED&&g===void 0&&(clearTimeout(m),g=i(e.responseTimeout,"Socket timeout"))},t.onerror=()=>{t.status===0&&(clearTimeout(m),clearTimeout(g),s({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(m),clearTimeout(g),s({content:t.responseText,status:t.status,isTimedOut:!1})},t.send(e.data)})}return{send:r}}function G(r){let e,s=`algolia-client-js-${r.key}`;function t(){return e===void 0&&(e=r.localStorage||window.localStorage),e}function i(){return JSON.parse(t().getItem(s)||"{}")}function m(a){t().setItem(s,JSON.stringify(a))}function g(){let a=r.timeToLive?r.timeToLive*1e3:null,o=i(),n=Object.fromEntries(Object.entries(o).filter(([,d])=>d.timestamp!==void 0));if(m(n),!a)return;let c=Object.fromEntries(Object.entries(n).filter(([,d])=>{let p=new Date().getTime();return!(d.timestamp+a<p)}));m(c)}return{get(a,o,n={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(g(),i()[JSON.stringify(a)])).then(c=>Promise.all([c?c.value:o(),c!==void 0])).then(([c,d])=>Promise.all([c,d||n.miss(c)])).then(([c])=>c)},set(a,o){return Promise.resolve().then(()=>{let n=i();return n[JSON.stringify(a)]={timestamp:new Date().getTime(),value:o},t().setItem(s,JSON.stringify(n)),o})},delete(a){return Promise.resolve().then(()=>{let o=i();delete o[JSON.stringify(a)],t().setItem(s,JSON.stringify(o))})},clear(){return Promise.resolve().then(()=>{t().removeItem(s)})}}}function ee(){return{get(r,e,s={miss:()=>Promise.resolve()}){return e().then(i=>Promise.all([i,s.miss(i)])).then(([i])=>i)},set(r,e){return Promise.resolve(e)},delete(r){return Promise.resolve()},clear(){return Promise.resolve()}}}function T(r){let e=[...r.caches],s=e.shift();return s===void 0?ee():{get(t,i,m={miss:()=>Promise.resolve()}){return s.get(t,i,m).catch(()=>T({caches:e}).get(t,i,m))},set(t,i){return s.set(t,i).catch(()=>T({caches:e}).set(t,i))},delete(t){return s.delete(t).catch(()=>T({caches:e}).delete(t))},clear(){return s.clear().catch(()=>T({caches:e}).clear())}}}function v(r={serializable:!0}){let e={};return{get(s,t,i={miss:()=>Promise.resolve()}){let m=JSON.stringify(s);if(m in e)return Promise.resolve(r.serializable?JSON.parse(e[m]):e[m]);let g=t();return g.then(a=>i.miss(a)).then(()=>g)},set(s,t){return e[JSON.stringify(s)]=r.serializable?JSON.stringify(t):t,Promise.resolve(t)},delete(s){return delete e[JSON.stringify(s)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}var F=1e3,$=2e3,j=3e4;function re(r){let e={value:`Algolia for JavaScript (${r})`,add(s){let t=`; ${s.segment}${s.version!==void 0?` (${s.version})`:""}`;return e.value.indexOf(t)===-1&&(e.value=`${e.value}${t}`),e}};return e}function J(r,e,s="WithinHeaders"){let t={"x-algolia-api-key":e,"x-algolia-application-id":r};return{headers(){return s==="WithinHeaders"?t:{}},queryParameters(){return s==="WithinQueryParameters"?t:{}}}}function M({algoliaAgents:r,client:e,version:s}){let t=re(s).add({segment:e,version:s});return r.forEach(i=>t.add(i)),t}function z(){return{debug(r,e){return Promise.resolve()},info(r,e){return Promise.resolve()},error(r,e){return Promise.resolve()}}}var W=2*60*1e3;function Q(r,e="up"){let s=Date.now();function t(){return e==="up"||Date.now()-s>W}function i(){return e==="timed out"&&Date.now()-s<=W}return{...r,status:e,lastUpdate:s,isUp:t,isTimedOut:i}}var B=class extends Error{name="AlgoliaError";constructor(r,e){super(r),e&&(this.name=e)}},X=class extends B{stackTrace;constructor(r,e,s){super(r,s),this.stackTrace=e}},te=class extends X{constructor(r){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",r,"RetryError")}},b=class extends X{status;constructor(r,e,s,t="ApiError"){super(r,s,t),this.status=e}},se=class extends B{response;constructor(r,e){super(r,"DeserializationError"),this.response=e}},oe=class extends b{error;constructor(r,e,s,t){super(r,e,t,"DetailedApiError"),this.error=s}};function ne(r,e,s){let t=ae(s),i=`${r.protocol}://${r.url}${r.port?`:${r.port}`:""}/${e.charAt(0)==="/"?e.substring(1):e}`;return t.length&&(i+=`?${t}`),i}function ae(r){return Object.keys(r).filter(e=>r[e]!==void 0).sort().map(e=>`${e}=${encodeURIComponent(Object.prototype.toString.call(r[e])==="[object Array]"?r[e].join(","):r[e]).replace(/\+/g,"%20")}`).join("&")}function ie(r,e){if(r.method==="GET"||r.data===void 0&&e.data===void 0)return;let s=Array.isArray(r.data)?r.data:{...r.data,...e.data};return JSON.stringify(s)}function ue(r,e,s){let t={Accept:"application/json",...r,...e,...s},i={};return Object.keys(t).forEach(m=>{let g=t[m];i[m.toLowerCase()]=g}),i}function ce(r){try{return JSON.parse(r.content)}catch(e){throw new se(e.message,r)}}function le({content:r,status:e},s){try{let t=JSON.parse(r);return"error"in t?new oe(t.message,e,t.error,s):new b(t.message,e,s)}catch{}return new b(r,e,s)}function me({isTimedOut:r,status:e}){return!r&&~~e===0}function de({isTimedOut:r,status:e}){return r||me({isTimedOut:r,status:e})||~~(e/100)!==2&&~~(e/100)!==4}function he({status:r}){return~~(r/100)===2}function ge(r){return r.map(e=>K(e))}function K(r){let e=r.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...r,request:{...r.request,headers:{...r.request.headers,...e}}}}function V({hosts:r,hostsCache:e,baseHeaders:s,logger:t,baseQueryParameters:i,algoliaAgent:m,timeouts:g,requester:a,requestsCache:o,responsesCache:n}){async function c(u){let l=await Promise.all(u.map(h=>e.get(h,()=>Promise.resolve(Q(h))))),P=l.filter(h=>h.isUp()),y=l.filter(h=>h.isTimedOut()),w=[...P,...y];return{hosts:w.length>0?w:u,getTimeout(h,E){return(y.length===0&&h===0?1:y.length+3+h)*E}}}async function d(u,l,P=!0){let y=[],w=ie(u,l),q=ue(s,u.headers,l.headers),h=u.method==="GET"?{...u.data,...l.data}:{},E={...i,...u.queryParameters,...h};if(m.value&&(E["x-algolia-agent"]=m.value),l&&l.queryParameters)for(let f of Object.keys(l.queryParameters))!l.queryParameters[f]||Object.prototype.toString.call(l.queryParameters[f])==="[object Object]"?E[f]=l.queryParameters[f]:E[f]=l.queryParameters[f].toString();let O=0,I=async(f,x)=>{let C=f.pop();if(C===void 0)throw new te(ge(y));let A={...g,...l.timeouts},U={data:w,headers:q,method:u.method,url:ne(C,u.path,E),connectTimeout:x(O,A.connect),responseTimeout:x(O,P?A.read:A.write)},L=N=>{let H={request:U,response:N,host:C,triesLeft:f.length};return y.push(H),H},R=await a.send(U);if(de(R)){let N=L(R);return R.isTimedOut&&O++,t.info("Retryable failure",K(N)),await e.set(C,Q(C,R.isTimedOut?"timed out":"down")),I(f,x)}if(he(R))return ce(R);throw L(R),le(R,y)},Z=r.filter(f=>f.accept==="readWrite"||(P?f.accept==="read":f.accept==="write")),D=await c(Z);return I([...D.hosts].reverse(),D.getTimeout)}function p(u,l={}){let P=u.useReadTransporter||u.method==="GET";if(!P)return d(u,l,P);let y=()=>d(u,l);if((l.cacheable||u.cacheable)!==!0)return y();let q={request:u,requestOptions:l,transporter:{queryParameters:i,headers:s}};return n.get(q,()=>o.get(q,()=>o.set(q,y()).then(h=>Promise.all([o.delete(q),h]),h=>Promise.all([o.delete(q),Promise.reject(h)])).then(([h,E])=>E)),{miss:h=>n.set(q,h)})}return{hostsCache:e,requester:a,timeouts:g,logger:t,algoliaAgent:m,baseHeaders:s,baseQueryParameters:i,hosts:r,request:p,requestsCache:o,responsesCache:n}}var S="5.8.0",_=["eu","us"];function pe(r){return[{url:"query-suggestions.{region}.algolia.com".replace("{region}",r),accept:"readWrite",protocol:"https"}]}function Y({appId:r,apiKey:e,authMode:s,algoliaAgents:t,region:i,...m}){let g=J(r,e,s),a=V({hosts:pe(i),...m,algoliaAgent:M({algoliaAgents:t,client:"QuerySuggestions",version:S}),baseHeaders:{"content-type":"text/plain",...g.headers(),...m.baseHeaders},baseQueryParameters:{...g.queryParameters(),...m.baseQueryParameters}});return{transporter:a,appId:r,clearCache(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then(()=>{})},get _ua(){return a.algoliaAgent.value},addAlgoliaAgent(o,n){a.algoliaAgent.add({segment:o,version:n})},setClientApiKey({apiKey:o}){!s||s==="WithinHeaders"?a.baseHeaders["x-algolia-api-key"]=o:a.baseQueryParameters["x-algolia-api-key"]=o},createConfig(o,n){if(!o)throw new Error("Parameter `configurationWithIndex` is required when calling `createConfig`.");let u={method:"POST",path:"/1/configs",queryParameters:{},headers:{},data:o};return a.request(u,n)},customDelete({path:o,parameters:n},c){if(!o)throw new Error("Parameter `path` is required when calling `customDelete`.");let l={method:"DELETE",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{}};return a.request(l,c)},customGet({path:o,parameters:n},c){if(!o)throw new Error("Parameter `path` is required when calling `customGet`.");let l={method:"GET",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{}};return a.request(l,c)},customPost({path:o,parameters:n,body:c},d){if(!o)throw new Error("Parameter `path` is required when calling `customPost`.");let P={method:"POST",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{},data:c||{}};return a.request(P,d)},customPut({path:o,parameters:n,body:c},d){if(!o)throw new Error("Parameter `path` is required when calling `customPut`.");let P={method:"PUT",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{},data:c||{}};return a.request(P,d)},deleteConfig({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `deleteConfig`.");let u={method:"DELETE",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},getAllConfigs(o){let p={method:"GET",path:"/1/configs",queryParameters:{},headers:{}};return a.request(p,o)},getConfig({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `getConfig`.");let u={method:"GET",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},getConfigStatus({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `getConfigStatus`.");let u={method:"GET",path:"/1/configs/{indexName}/status".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},getLogFile({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `getLogFile`.");let u={method:"GET",path:"/1/logs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},updateConfig({indexName:o,configuration:n},c){if(!o)throw new Error("Parameter `indexName` is required when calling `updateConfig`.");if(!n)throw new Error("Parameter `configuration` is required when calling `updateConfig`.");if(!n.sourceIndices)throw new Error("Parameter `configuration.sourceIndices` is required when calling `updateConfig`.");let l={method:"PUT",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{},data:n};return a.request(l,c)}}}function Je(r,e,s,t){if(!r||typeof r!="string")throw new Error("`appId` is missing.");if(!e||typeof e!="string")throw new Error("`apiKey` is missing.");if(!s||s&&(typeof s!="string"||!_.includes(s)))throw new Error(`\`region\` is required and must be one of the following: ${_.join(", ")}`);return Y({appId:r,apiKey:e,region:s,timeouts:{connect:F,read:$,write:j},logger:z(),requester:k(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:v(),requestsCache:v({serializable:!1}),hostsCache:T({caches:[G({key:`${S}-${r}`}),v()]}),...t})}export{S as apiClientVersion,Je as querySuggestionsClient};
//# sourceMappingURL=browser.min.js.map

@@ -7,7 +7,7 @@ (function (global, factory) {

function Q(r){let e,s=`algolia-client-js-${r.key}`;function t(){return e===void 0&&(e=r.localStorage||window.localStorage),e}function i(){return JSON.parse(t().getItem(s)||"{}")}function m(a){t().setItem(s,JSON.stringify(a));}function g(){let a=r.timeToLive?r.timeToLive*1e3:null,o=i(),n=Object.fromEntries(Object.entries(o).filter(([,d])=>d.timestamp!==void 0));if(m(n),!a)return;let c=Object.fromEntries(Object.entries(n).filter(([,d])=>{let p=new Date().getTime();return !(d.timestamp+a<p)}));m(c);}return {get(a,o,n={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(g(),i()[JSON.stringify(a)])).then(c=>Promise.all([c?c.value:o(),c!==void 0])).then(([c,d])=>Promise.all([c,d||n.miss(c)])).then(([c])=>c)},set(a,o){return Promise.resolve().then(()=>{let n=i();return n[JSON.stringify(a)]={timestamp:new Date().getTime(),value:o},t().setItem(s,JSON.stringify(n)),o})},delete(a){return Promise.resolve().then(()=>{let o=i();delete o[JSON.stringify(a)],t().setItem(s,JSON.stringify(o));})},clear(){return Promise.resolve().then(()=>{t().removeItem(s);})}}}function ee(){return {get(r,e,s={miss:()=>Promise.resolve()}){return e().then(i=>Promise.all([i,s.miss(i)])).then(([i])=>i)},set(r,e){return Promise.resolve(e)},delete(r){return Promise.resolve()},clear(){return Promise.resolve()}}}function T(r){let e=[...r.caches],s=e.shift();return s===void 0?ee():{get(t,i,m={miss:()=>Promise.resolve()}){return s.get(t,i,m).catch(()=>T({caches:e}).get(t,i,m))},set(t,i){return s.set(t,i).catch(()=>T({caches:e}).set(t,i))},delete(t){return s.delete(t).catch(()=>T({caches:e}).delete(t))},clear(){return s.clear().catch(()=>T({caches:e}).clear())}}}function v(r={serializable:!0}){let e={};return {get(s,t,i={miss:()=>Promise.resolve()}){let m=JSON.stringify(s);if(m in e)return Promise.resolve(r.serializable?JSON.parse(e[m]):e[m]);let g=t();return g.then(a=>i.miss(a)).then(()=>g)},set(s,t){return e[JSON.stringify(s)]=r.serializable?JSON.stringify(t):t,Promise.resolve(t)},delete(s){return delete e[JSON.stringify(s)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}var G=1e3,F=2e3,$=3e4;function re(r){let e={value:`Algolia for JavaScript (${r})`,add(s){let t=`; ${s.segment}${s.version!==void 0?` (${s.version})`:""}`;return e.value.indexOf(t)===-1&&(e.value=`${e.value}${t}`),e}};return e}function j(r,e,s="WithinHeaders"){let t={"x-algolia-api-key":e,"x-algolia-application-id":r};return {headers(){return s==="WithinHeaders"?t:{}},queryParameters(){return s==="WithinQueryParameters"?t:{}}}}function J({algoliaAgents:r,client:e,version:s}){let t=re(s).add({segment:e,version:s});return r.forEach(i=>t.add(i)),t}function M(){return {debug(r,e){return Promise.resolve()},info(r,e){return Promise.resolve()},error(r,e){return Promise.resolve()}}}var k=2*60*1e3;function W(r,e="up"){let s=Date.now();function t(){return e==="up"||Date.now()-s>k}function i(){return e==="timed out"&&Date.now()-s<=k}return {...r,status:e,lastUpdate:s,isUp:t,isTimedOut:i}}var z=class extends Error{name="AlgoliaError";constructor(r,e){super(r),e&&(this.name=e);}},B=class extends z{stackTrace;constructor(r,e,s){super(r,s),this.stackTrace=e;}},te=class extends B{constructor(r){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",r,"RetryError");}},b=class extends B{status;constructor(r,e,s,t="ApiError"){super(r,s,t),this.status=e;}},se=class extends z{response;constructor(r,e){super(r,"DeserializationError"),this.response=e;}},oe=class extends b{error;constructor(r,e,s,t){super(r,e,t,"DetailedApiError"),this.error=s;}};function ne(r,e,s){let t=ae(s),i=`${r.protocol}://${r.url}${r.port?`:${r.port}`:""}/${e.charAt(0)==="/"?e.substring(1):e}`;return t.length&&(i+=`?${t}`),i}function ae(r){return Object.keys(r).filter(e=>r[e]!==void 0).sort().map(e=>`${e}=${encodeURIComponent(Object.prototype.toString.call(r[e])==="[object Array]"?r[e].join(","):r[e]).replaceAll("+","%20")}`).join("&")}function ie(r,e){if(r.method==="GET"||r.data===void 0&&e.data===void 0)return;let s=Array.isArray(r.data)?r.data:{...r.data,...e.data};return JSON.stringify(s)}function ue(r,e,s){let t={Accept:"application/json",...r,...e,...s},i={};return Object.keys(t).forEach(m=>{let g=t[m];i[m.toLowerCase()]=g;}),i}function ce(r){try{return JSON.parse(r.content)}catch(e){throw new se(e.message,r)}}function le({content:r,status:e},s){try{let t=JSON.parse(r);return "error"in t?new oe(t.message,e,t.error,s):new b(t.message,e,s)}catch{}return new b(r,e,s)}function me({isTimedOut:r,status:e}){return !r&&~~e===0}function de({isTimedOut:r,status:e}){return r||me({isTimedOut:r,status:e})||~~(e/100)!==2&&~~(e/100)!==4}function he({status:r}){return ~~(r/100)===2}function ge(r){return r.map(e=>X(e))}function X(r){let e=r.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return {...r,request:{...r.request,headers:{...r.request.headers,...e}}}}function K({hosts:r,hostsCache:e,baseHeaders:s,logger:t,baseQueryParameters:i,algoliaAgent:m,timeouts:g,requester:a,requestsCache:o,responsesCache:n}){async function c(u){let l=await Promise.all(u.map(h=>e.get(h,()=>Promise.resolve(W(h))))),P=l.filter(h=>h.isUp()),y=l.filter(h=>h.isTimedOut()),w=[...P,...y];return {hosts:w.length>0?w:u,getTimeout(h,E){return (y.length===0&&h===0?1:y.length+3+h)*E}}}async function d(u,l,P=!0){let y=[],w=ie(u,l),q=ue(s,u.headers,l.headers),h=u.method==="GET"?{...u.data,...l.data}:{},E={...i,...u.queryParameters,...h};if(m.value&&(E["x-algolia-agent"]=m.value),l&&l.queryParameters)for(let f of Object.keys(l.queryParameters))!l.queryParameters[f]||Object.prototype.toString.call(l.queryParameters[f])==="[object Object]"?E[f]=l.queryParameters[f]:E[f]=l.queryParameters[f].toString();let O=0,I=async(f,x)=>{let C=f.pop();if(C===void 0)throw new te(ge(y));let A={...g,...l.timeouts},U={data:w,headers:q,method:u.method,url:ne(C,u.path,E),connectTimeout:x(O,A.connect),responseTimeout:x(O,P?A.read:A.write)},L=N=>{let H={request:U,response:N,host:C,triesLeft:f.length};return y.push(H),H},R=await a.send(U);if(de(R)){let N=L(R);return R.isTimedOut&&O++,t.info("Retryable failure",X(N)),await e.set(C,W(C,R.isTimedOut?"timed out":"down")),I(f,x)}if(he(R))return ce(R);throw L(R),le(R,y)},Z=r.filter(f=>f.accept==="readWrite"||(P?f.accept==="read":f.accept==="write")),D=await c(Z);return I([...D.hosts].reverse(),D.getTimeout)}function p(u,l={}){let P=u.useReadTransporter||u.method==="GET";if(!P)return d(u,l,P);let y=()=>d(u,l);if((l.cacheable||u.cacheable)!==!0)return y();let q={request:u,requestOptions:l,transporter:{queryParameters:i,headers:s}};return n.get(q,()=>o.get(q,()=>o.set(q,y()).then(h=>Promise.all([o.delete(q),h]),h=>Promise.all([o.delete(q),Promise.reject(h)])).then(([h,E])=>E)),{miss:h=>n.set(q,h)})}return {hostsCache:e,requester:a,timeouts:g,logger:t,algoliaAgent:m,baseHeaders:s,baseQueryParameters:i,hosts:r,request:p,requestsCache:o,responsesCache:n}}function V(){function r(e){return new Promise(s=>{let t=new XMLHttpRequest;t.open(e.method,e.url,!0),Object.keys(e.headers).forEach(a=>t.setRequestHeader(a,e.headers[a]));let i=(a,o)=>setTimeout(()=>{t.abort(),s({status:0,content:o,isTimedOut:!0});},a),m=i(e.connectTimeout,"Connection timeout"),g;t.onreadystatechange=()=>{t.readyState>t.OPENED&&g===void 0&&(clearTimeout(m),g=i(e.responseTimeout,"Socket timeout"));},t.onerror=()=>{t.status===0&&(clearTimeout(m),clearTimeout(g),s({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}));},t.onload=()=>{clearTimeout(m),clearTimeout(g),s({content:t.responseText,status:t.status,isTimedOut:!1});},t.send(e.data);})}return {send:r}}var S="5.7.0",_=["eu","us"];function pe(r){return [{url:"query-suggestions.{region}.algolia.com".replace("{region}",r),accept:"readWrite",protocol:"https"}]}function Y({appId:r,apiKey:e,authMode:s,algoliaAgents:t,region:i,...m}){let g=j(r,e,s),a=K({hosts:pe(i),...m,algoliaAgent:J({algoliaAgents:t,client:"QuerySuggestions",version:S}),baseHeaders:{"content-type":"text/plain",...g.headers(),...m.baseHeaders},baseQueryParameters:{...g.queryParameters(),...m.baseQueryParameters}});return {transporter:a,appId:r,clearCache(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then(()=>{})},get _ua(){return a.algoliaAgent.value},addAlgoliaAgent(o,n){a.algoliaAgent.add({segment:o,version:n});},setClientApiKey({apiKey:o}){!s||s==="WithinHeaders"?a.baseHeaders["x-algolia-api-key"]=o:a.baseQueryParameters["x-algolia-api-key"]=o;},createConfig(o,n){if(!o)throw new Error("Parameter `configurationWithIndex` is required when calling `createConfig`.");let u={method:"POST",path:"/1/configs",queryParameters:{},headers:{},data:o};return a.request(u,n)},customDelete({path:o,parameters:n},c){if(!o)throw new Error("Parameter `path` is required when calling `customDelete`.");let l={method:"DELETE",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{}};return a.request(l,c)},customGet({path:o,parameters:n},c){if(!o)throw new Error("Parameter `path` is required when calling `customGet`.");let l={method:"GET",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{}};return a.request(l,c)},customPost({path:o,parameters:n,body:c},d){if(!o)throw new Error("Parameter `path` is required when calling `customPost`.");let P={method:"POST",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{},data:c||{}};return a.request(P,d)},customPut({path:o,parameters:n,body:c},d){if(!o)throw new Error("Parameter `path` is required when calling `customPut`.");let P={method:"PUT",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{},data:c||{}};return a.request(P,d)},deleteConfig({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `deleteConfig`.");let u={method:"DELETE",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},getAllConfigs(o){let p={method:"GET",path:"/1/configs",queryParameters:{},headers:{}};return a.request(p,o)},getConfig({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `getConfig`.");let u={method:"GET",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},getConfigStatus({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `getConfigStatus`.");let u={method:"GET",path:"/1/configs/{indexName}/status".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},getLogFile({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `getLogFile`.");let u={method:"GET",path:"/1/logs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},updateConfig({indexName:o,configuration:n},c){if(!o)throw new Error("Parameter `indexName` is required when calling `updateConfig`.");if(!n)throw new Error("Parameter `configuration` is required when calling `updateConfig`.");if(!n.sourceIndices)throw new Error("Parameter `configuration.sourceIndices` is required when calling `updateConfig`.");let l={method:"PUT",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{},data:n};return a.request(l,c)}}}function Fe(r,e,s,t){if(!r||typeof r!="string")throw new Error("`appId` is missing.");if(!e||typeof e!="string")throw new Error("`apiKey` is missing.");if(!s||s&&(typeof s!="string"||!_.includes(s)))throw new Error(`\`region\` is required and must be one of the following: ${_.join(", ")}`);return Y({appId:r,apiKey:e,region:s,timeouts:{connect:G,read:F,write:$},logger:M(),requester:V(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:v(),requestsCache:v({serializable:!1}),hostsCache:T({caches:[Q({key:`${S}-${r}`}),v()]}),...t})}
function k(){function r(e){return new Promise(s=>{let t=new XMLHttpRequest;t.open(e.method,e.url,!0),Object.keys(e.headers).forEach(a=>t.setRequestHeader(a,e.headers[a]));let i=(a,o)=>setTimeout(()=>{t.abort(),s({status:0,content:o,isTimedOut:!0});},a),m=i(e.connectTimeout,"Connection timeout"),g;t.onreadystatechange=()=>{t.readyState>t.OPENED&&g===void 0&&(clearTimeout(m),g=i(e.responseTimeout,"Socket timeout"));},t.onerror=()=>{t.status===0&&(clearTimeout(m),clearTimeout(g),s({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}));},t.onload=()=>{clearTimeout(m),clearTimeout(g),s({content:t.responseText,status:t.status,isTimedOut:!1});},t.send(e.data);})}return {send:r}}function G(r){let e,s=`algolia-client-js-${r.key}`;function t(){return e===void 0&&(e=r.localStorage||window.localStorage),e}function i(){return JSON.parse(t().getItem(s)||"{}")}function m(a){t().setItem(s,JSON.stringify(a));}function g(){let a=r.timeToLive?r.timeToLive*1e3:null,o=i(),n=Object.fromEntries(Object.entries(o).filter(([,d])=>d.timestamp!==void 0));if(m(n),!a)return;let c=Object.fromEntries(Object.entries(n).filter(([,d])=>{let p=new Date().getTime();return !(d.timestamp+a<p)}));m(c);}return {get(a,o,n={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(g(),i()[JSON.stringify(a)])).then(c=>Promise.all([c?c.value:o(),c!==void 0])).then(([c,d])=>Promise.all([c,d||n.miss(c)])).then(([c])=>c)},set(a,o){return Promise.resolve().then(()=>{let n=i();return n[JSON.stringify(a)]={timestamp:new Date().getTime(),value:o},t().setItem(s,JSON.stringify(n)),o})},delete(a){return Promise.resolve().then(()=>{let o=i();delete o[JSON.stringify(a)],t().setItem(s,JSON.stringify(o));})},clear(){return Promise.resolve().then(()=>{t().removeItem(s);})}}}function ee(){return {get(r,e,s={miss:()=>Promise.resolve()}){return e().then(i=>Promise.all([i,s.miss(i)])).then(([i])=>i)},set(r,e){return Promise.resolve(e)},delete(r){return Promise.resolve()},clear(){return Promise.resolve()}}}function T(r){let e=[...r.caches],s=e.shift();return s===void 0?ee():{get(t,i,m={miss:()=>Promise.resolve()}){return s.get(t,i,m).catch(()=>T({caches:e}).get(t,i,m))},set(t,i){return s.set(t,i).catch(()=>T({caches:e}).set(t,i))},delete(t){return s.delete(t).catch(()=>T({caches:e}).delete(t))},clear(){return s.clear().catch(()=>T({caches:e}).clear())}}}function v(r={serializable:!0}){let e={};return {get(s,t,i={miss:()=>Promise.resolve()}){let m=JSON.stringify(s);if(m in e)return Promise.resolve(r.serializable?JSON.parse(e[m]):e[m]);let g=t();return g.then(a=>i.miss(a)).then(()=>g)},set(s,t){return e[JSON.stringify(s)]=r.serializable?JSON.stringify(t):t,Promise.resolve(t)},delete(s){return delete e[JSON.stringify(s)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}var F=1e3,$=2e3,j=3e4;function re(r){let e={value:`Algolia for JavaScript (${r})`,add(s){let t=`; ${s.segment}${s.version!==void 0?` (${s.version})`:""}`;return e.value.indexOf(t)===-1&&(e.value=`${e.value}${t}`),e}};return e}function J(r,e,s="WithinHeaders"){let t={"x-algolia-api-key":e,"x-algolia-application-id":r};return {headers(){return s==="WithinHeaders"?t:{}},queryParameters(){return s==="WithinQueryParameters"?t:{}}}}function M({algoliaAgents:r,client:e,version:s}){let t=re(s).add({segment:e,version:s});return r.forEach(i=>t.add(i)),t}function z(){return {debug(r,e){return Promise.resolve()},info(r,e){return Promise.resolve()},error(r,e){return Promise.resolve()}}}var W=2*60*1e3;function Q(r,e="up"){let s=Date.now();function t(){return e==="up"||Date.now()-s>W}function i(){return e==="timed out"&&Date.now()-s<=W}return {...r,status:e,lastUpdate:s,isUp:t,isTimedOut:i}}var B=class extends Error{name="AlgoliaError";constructor(r,e){super(r),e&&(this.name=e);}},X=class extends B{stackTrace;constructor(r,e,s){super(r,s),this.stackTrace=e;}},te=class extends X{constructor(r){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",r,"RetryError");}},b=class extends X{status;constructor(r,e,s,t="ApiError"){super(r,s,t),this.status=e;}},se=class extends B{response;constructor(r,e){super(r,"DeserializationError"),this.response=e;}},oe=class extends b{error;constructor(r,e,s,t){super(r,e,t,"DetailedApiError"),this.error=s;}};function ne(r,e,s){let t=ae(s),i=`${r.protocol}://${r.url}${r.port?`:${r.port}`:""}/${e.charAt(0)==="/"?e.substring(1):e}`;return t.length&&(i+=`?${t}`),i}function ae(r){return Object.keys(r).filter(e=>r[e]!==void 0).sort().map(e=>`${e}=${encodeURIComponent(Object.prototype.toString.call(r[e])==="[object Array]"?r[e].join(","):r[e]).replace(/\+/g,"%20")}`).join("&")}function ie(r,e){if(r.method==="GET"||r.data===void 0&&e.data===void 0)return;let s=Array.isArray(r.data)?r.data:{...r.data,...e.data};return JSON.stringify(s)}function ue(r,e,s){let t={Accept:"application/json",...r,...e,...s},i={};return Object.keys(t).forEach(m=>{let g=t[m];i[m.toLowerCase()]=g;}),i}function ce(r){try{return JSON.parse(r.content)}catch(e){throw new se(e.message,r)}}function le({content:r,status:e},s){try{let t=JSON.parse(r);return "error"in t?new oe(t.message,e,t.error,s):new b(t.message,e,s)}catch{}return new b(r,e,s)}function me({isTimedOut:r,status:e}){return !r&&~~e===0}function de({isTimedOut:r,status:e}){return r||me({isTimedOut:r,status:e})||~~(e/100)!==2&&~~(e/100)!==4}function he({status:r}){return ~~(r/100)===2}function ge(r){return r.map(e=>K(e))}function K(r){let e=r.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return {...r,request:{...r.request,headers:{...r.request.headers,...e}}}}function V({hosts:r,hostsCache:e,baseHeaders:s,logger:t,baseQueryParameters:i,algoliaAgent:m,timeouts:g,requester:a,requestsCache:o,responsesCache:n}){async function c(u){let l=await Promise.all(u.map(h=>e.get(h,()=>Promise.resolve(Q(h))))),P=l.filter(h=>h.isUp()),y=l.filter(h=>h.isTimedOut()),w=[...P,...y];return {hosts:w.length>0?w:u,getTimeout(h,E){return (y.length===0&&h===0?1:y.length+3+h)*E}}}async function d(u,l,P=!0){let y=[],w=ie(u,l),q=ue(s,u.headers,l.headers),h=u.method==="GET"?{...u.data,...l.data}:{},E={...i,...u.queryParameters,...h};if(m.value&&(E["x-algolia-agent"]=m.value),l&&l.queryParameters)for(let f of Object.keys(l.queryParameters))!l.queryParameters[f]||Object.prototype.toString.call(l.queryParameters[f])==="[object Object]"?E[f]=l.queryParameters[f]:E[f]=l.queryParameters[f].toString();let O=0,I=async(f,x)=>{let C=f.pop();if(C===void 0)throw new te(ge(y));let A={...g,...l.timeouts},U={data:w,headers:q,method:u.method,url:ne(C,u.path,E),connectTimeout:x(O,A.connect),responseTimeout:x(O,P?A.read:A.write)},L=N=>{let H={request:U,response:N,host:C,triesLeft:f.length};return y.push(H),H},R=await a.send(U);if(de(R)){let N=L(R);return R.isTimedOut&&O++,t.info("Retryable failure",K(N)),await e.set(C,Q(C,R.isTimedOut?"timed out":"down")),I(f,x)}if(he(R))return ce(R);throw L(R),le(R,y)},Z=r.filter(f=>f.accept==="readWrite"||(P?f.accept==="read":f.accept==="write")),D=await c(Z);return I([...D.hosts].reverse(),D.getTimeout)}function p(u,l={}){let P=u.useReadTransporter||u.method==="GET";if(!P)return d(u,l,P);let y=()=>d(u,l);if((l.cacheable||u.cacheable)!==!0)return y();let q={request:u,requestOptions:l,transporter:{queryParameters:i,headers:s}};return n.get(q,()=>o.get(q,()=>o.set(q,y()).then(h=>Promise.all([o.delete(q),h]),h=>Promise.all([o.delete(q),Promise.reject(h)])).then(([h,E])=>E)),{miss:h=>n.set(q,h)})}return {hostsCache:e,requester:a,timeouts:g,logger:t,algoliaAgent:m,baseHeaders:s,baseQueryParameters:i,hosts:r,request:p,requestsCache:o,responsesCache:n}}var S="5.8.0",_=["eu","us"];function pe(r){return [{url:"query-suggestions.{region}.algolia.com".replace("{region}",r),accept:"readWrite",protocol:"https"}]}function Y({appId:r,apiKey:e,authMode:s,algoliaAgents:t,region:i,...m}){let g=J(r,e,s),a=V({hosts:pe(i),...m,algoliaAgent:M({algoliaAgents:t,client:"QuerySuggestions",version:S}),baseHeaders:{"content-type":"text/plain",...g.headers(),...m.baseHeaders},baseQueryParameters:{...g.queryParameters(),...m.baseQueryParameters}});return {transporter:a,appId:r,clearCache(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then(()=>{})},get _ua(){return a.algoliaAgent.value},addAlgoliaAgent(o,n){a.algoliaAgent.add({segment:o,version:n});},setClientApiKey({apiKey:o}){!s||s==="WithinHeaders"?a.baseHeaders["x-algolia-api-key"]=o:a.baseQueryParameters["x-algolia-api-key"]=o;},createConfig(o,n){if(!o)throw new Error("Parameter `configurationWithIndex` is required when calling `createConfig`.");let u={method:"POST",path:"/1/configs",queryParameters:{},headers:{},data:o};return a.request(u,n)},customDelete({path:o,parameters:n},c){if(!o)throw new Error("Parameter `path` is required when calling `customDelete`.");let l={method:"DELETE",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{}};return a.request(l,c)},customGet({path:o,parameters:n},c){if(!o)throw new Error("Parameter `path` is required when calling `customGet`.");let l={method:"GET",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{}};return a.request(l,c)},customPost({path:o,parameters:n,body:c},d){if(!o)throw new Error("Parameter `path` is required when calling `customPost`.");let P={method:"POST",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{},data:c||{}};return a.request(P,d)},customPut({path:o,parameters:n,body:c},d){if(!o)throw new Error("Parameter `path` is required when calling `customPut`.");let P={method:"PUT",path:"/{path}".replace("{path}",o),queryParameters:n||{},headers:{},data:c||{}};return a.request(P,d)},deleteConfig({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `deleteConfig`.");let u={method:"DELETE",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},getAllConfigs(o){let p={method:"GET",path:"/1/configs",queryParameters:{},headers:{}};return a.request(p,o)},getConfig({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `getConfig`.");let u={method:"GET",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},getConfigStatus({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `getConfigStatus`.");let u={method:"GET",path:"/1/configs/{indexName}/status".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},getLogFile({indexName:o},n){if(!o)throw new Error("Parameter `indexName` is required when calling `getLogFile`.");let u={method:"GET",path:"/1/logs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{}};return a.request(u,n)},updateConfig({indexName:o,configuration:n},c){if(!o)throw new Error("Parameter `indexName` is required when calling `updateConfig`.");if(!n)throw new Error("Parameter `configuration` is required when calling `updateConfig`.");if(!n.sourceIndices)throw new Error("Parameter `configuration.sourceIndices` is required when calling `updateConfig`.");let l={method:"PUT",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(o)),queryParameters:{},headers:{},data:n};return a.request(l,c)}}}function Je(r,e,s,t){if(!r||typeof r!="string")throw new Error("`appId` is missing.");if(!e||typeof e!="string")throw new Error("`apiKey` is missing.");if(!s||s&&(typeof s!="string"||!_.includes(s)))throw new Error(`\`region\` is required and must be one of the following: ${_.join(", ")}`);return Y({appId:r,apiKey:e,region:s,timeouts:{connect:F,read:$,write:j},logger:z(),requester:k(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:v(),requestsCache:v({serializable:!1}),hostsCache:T({caches:[G({key:`${S}-${r}`}),v()]}),...t})}
exports.apiClientVersion = S;
exports.querySuggestionsClient = Fe;
exports.querySuggestionsClient = Je;
}));
// builds/fetch.ts
import {
createNullLogger,
createMemoryCache,
createNullCache,
createNullLogger,
DEFAULT_CONNECT_TIMEOUT_NODE,

@@ -14,3 +14,3 @@ DEFAULT_READ_TIMEOUT_NODE,

import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
var apiClientVersion = "5.7.0";
var apiClientVersion = "5.8.0";
var REGIONS = ["eu", "us"];

@@ -92,4 +92,3 @@ function getDefaultHosts(region) {

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param configurationWithIndex - The configurationWithIndex object.

@@ -116,3 +115,2 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* This method allow you to send requests to the Algolia REST API.
*
* @param customDelete - The customDelete object.

@@ -140,3 +138,2 @@ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customGet - The customGet object.

@@ -164,3 +161,2 @@ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customPost - The customPost object.

@@ -190,3 +186,2 @@ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customPut - The customPut object.

@@ -218,4 +213,3 @@ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param deleteConfig - The deleteConfig object.

@@ -244,4 +238,3 @@ * @param deleteConfig.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -265,4 +258,3 @@ */

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getConfig - The getConfig object.

@@ -291,4 +283,3 @@ * @param getConfig.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getConfigStatus - The getConfigStatus object.

@@ -317,4 +308,3 @@ * @param getConfigStatus.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getLogFile - The getLogFile object.

@@ -343,4 +333,3 @@ * @param getLogFile.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param updateConfig - The updateConfig object.

@@ -347,0 +336,0 @@ * @param updateConfig.indexName - Query Suggestions index name.

// builds/node.ts
import { createHttpRequester } from "@algolia/requester-node-http";
import {
createNullLogger,
createMemoryCache,
createNullCache,
createNullLogger,
DEFAULT_CONNECT_TIMEOUT_NODE,

@@ -10,7 +11,6 @@ DEFAULT_READ_TIMEOUT_NODE,

} from "@algolia/client-common";
import { createHttpRequester } from "@algolia/requester-node-http";
// src/querySuggestionsClient.ts
import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
var apiClientVersion = "5.7.0";
var apiClientVersion = "5.8.0";
var REGIONS = ["eu", "us"];

@@ -92,4 +92,3 @@ function getDefaultHosts(region) {

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param configurationWithIndex - The configurationWithIndex object.

@@ -116,3 +115,2 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* This method allow you to send requests to the Algolia REST API.
*
* @param customDelete - The customDelete object.

@@ -140,3 +138,2 @@ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customGet - The customGet object.

@@ -164,3 +161,2 @@ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customPost - The customPost object.

@@ -190,3 +186,2 @@ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customPut - The customPut object.

@@ -218,4 +213,3 @@ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param deleteConfig - The deleteConfig object.

@@ -244,4 +238,3 @@ * @param deleteConfig.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -265,4 +258,3 @@ */

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getConfig - The getConfig object.

@@ -291,4 +283,3 @@ * @param getConfig.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getConfigStatus - The getConfigStatus object.

@@ -317,4 +308,3 @@ * @param getConfigStatus.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getLogFile - The getLogFile object.

@@ -343,4 +333,3 @@ * @param getLogFile.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param updateConfig - The updateConfig object.

@@ -347,0 +336,0 @@ * @param updateConfig.indexName - Query Suggestions index name.

@@ -15,6 +15,36 @@ import * as _algolia_client_common from '@algolia/client-common';

type ConfigStatus = {
/**
* Name of the Query Suggestions index (case-sensitive).
*/
indexName?: string;
/**
* Whether the creation or update of the Query Suggestions index is in progress.
*/
isRunning?: boolean;
/**
* Date and time when the Query Suggestions index was last built, in RFC 3339 format.
*/
lastBuiltAt?: string;
/**
* Date and time when the Query Suggestions index was last updated successfully.
*/
lastSuccessfulBuiltAt?: string;
/**
* Duration of the last successful build in seconds.
*/
lastSuccessfulBuildDuration?: string;
};
type AppID = {
/**
* Algolia application ID to which this Query Suggestions configuration belongs.
*/
appID?: string;
};
/**
* Languages for deduplicating singular and plural suggestions. If specified, only the more popular form is included.
*/
type Languages = string[] | boolean;
type Languages = Array<string> | boolean;

@@ -47,4 +77,4 @@ /**

replicas?: boolean;
analyticsTags?: string[] | null;
facets?: Facet[] | null;
analyticsTags?: Array<string> | null;
facets?: Array<Facet> | null;
/**

@@ -58,4 +88,4 @@ * Minimum number of hits required to be included as a suggestion. A search query must at least generate `minHits` search results to be included in the Query Suggestions index.

minLetters?: number;
generate?: string[][] | null;
external?: string[] | null;
generate?: Array<Array<string>> | null;
external?: Array<string> | null;
};

@@ -70,5 +100,5 @@

*/
sourceIndices: SourceIndex[];
sourceIndices: Array<SourceIndex>;
languages?: Languages;
exclude?: string[] | null;
exclude?: Array<string> | null;
/**

@@ -85,2 +115,33 @@ * Whether to turn on personalized query suggestions.

/**
* Query Suggestions configuration.
*/
type ConfigurationWithIndex = Record<string, unknown> & Configuration;
/**
* API response for retrieving Query Suggestions configurations.
*/
type ConfigurationResponse = AppID & ConfigurationWithIndex;
/**
* Type of log entry. - `SKIP`. A query is skipped because it doesn\'t match the conditions for successful inclusion. For example, when a query doesn\'t generate enough search results. - `INFO`. An informative log entry. - `ERROR`. The Query Suggestions process encountered an error.
*/
type LogLevel = 'SKIP' | 'INFO' | 'ERROR';
type LogFile = {
/**
* Date and time of the log entry, in RFC 3339 format.
*/
timestamp?: string;
level?: LogLevel;
/**
* Details about this log entry.
*/
message?: string;
/**
* Level indicating the position of a suggestion in a hierarchy of records. For example, a `contextLevel` of 1 indicates that this suggestion belongs to a previous suggestion with `contextLevel` 0.
*/
contextLevel?: number;
};
/**
* Properties for the `customDelete` method.

@@ -96,3 +157,5 @@ */

*/
parameters?: Record<string, any>;
parameters?: {
[key: string]: any;
};
};

@@ -110,3 +173,5 @@ /**

*/
parameters?: Record<string, any>;
parameters?: {
[key: string]: any;
};
};

@@ -124,3 +189,5 @@ /**

*/
parameters?: Record<string, any>;
parameters?: {
[key: string]: any;
};
/**

@@ -142,3 +209,5 @@ * Parameters to send with the custom request.

*/
parameters?: Record<string, any>;
parameters?: {
[key: string]: any;
};
/**

@@ -196,64 +265,3 @@ * Parameters to send with the custom request.

type ConfigStatus = {
/**
* Name of the Query Suggestions index (case-sensitive).
*/
indexName?: string;
/**
* Whether the creation or update of the Query Suggestions index is in progress.
*/
isRunning?: boolean;
/**
* Date and time when the Query Suggestions index was last built, in RFC 3339 format.
*/
lastBuiltAt?: string;
/**
* Date and time when the Query Suggestions index was last updated successfully.
*/
lastSuccessfulBuiltAt?: string;
/**
* Duration of the last successful build in seconds.
*/
lastSuccessfulBuildDuration?: string;
};
type AppID = {
/**
* Algolia application ID to which this Query Suggestions configuration belongs.
*/
appID?: string;
};
/**
* Query Suggestions configuration.
*/
type ConfigurationWithIndex = Configuration & Record<string, unknown>;
/**
* API response for retrieving Query Suggestions configurations.
*/
type ConfigurationResponse = AppID & ConfigurationWithIndex;
/**
* Type of log entry. - `SKIP`. A query is skipped because it doesn\'t match the conditions for successful inclusion. For example, when a query doesn\'t generate enough search results. - `INFO`. An informative log entry. - `ERROR`. The Query Suggestions process encountered an error.
*/
type LogLevel = 'ERROR' | 'INFO' | 'SKIP';
type LogFile = {
/**
* Date and time of the log entry, in RFC 3339 format.
*/
timestamp?: string;
level?: LogLevel;
/**
* Details about this log entry.
*/
message?: string;
/**
* Level indicating the position of a suggestion in a hierarchy of records. For example, a `contextLevel` of 1 indicates that this suggestion belongs to a previous suggestion with `contextLevel` 0.
*/
contextLevel?: number;
};
declare const apiClientVersion = "5.7.0";
declare const apiClientVersion = "5.8.0";
declare const REGIONS: readonly ["eu", "us"];

@@ -297,4 +305,3 @@ type Region = (typeof REGIONS)[number];

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param configurationWithIndex - The configurationWithIndex object.

@@ -306,3 +313,2 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* This method allow you to send requests to the Algolia REST API.
*
* @param customDelete - The customDelete object.

@@ -316,3 +322,2 @@ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customGet - The customGet object.

@@ -326,3 +331,2 @@ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customPost - The customPost object.

@@ -337,3 +341,2 @@ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customPut - The customPut object.

@@ -350,4 +353,3 @@ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param deleteConfig - The deleteConfig object.

@@ -362,7 +364,6 @@ * @param deleteConfig.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
getAllConfigs(requestOptions?: RequestOptions): Promise<ConfigurationResponse[]>;
getAllConfigs(requestOptions?: RequestOptions): Promise<Array<ConfigurationResponse>>;
/**

@@ -372,4 +373,3 @@ * Retrieves a single Query Suggestions configuration by its index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getConfig - The getConfig object.

@@ -384,4 +384,3 @@ * @param getConfig.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getConfigStatus - The getConfigStatus object.

@@ -396,4 +395,3 @@ * @param getConfigStatus.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getLogFile - The getLogFile object.

@@ -408,4 +406,3 @@ * @param getLogFile.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param updateConfig - The updateConfig object.

@@ -412,0 +409,0 @@ * @param updateConfig.indexName - Query Suggestions index name.

@@ -15,6 +15,36 @@ import * as _algolia_client_common from '@algolia/client-common';

type ConfigStatus = {
/**
* Name of the Query Suggestions index (case-sensitive).
*/
indexName?: string;
/**
* Whether the creation or update of the Query Suggestions index is in progress.
*/
isRunning?: boolean;
/**
* Date and time when the Query Suggestions index was last built, in RFC 3339 format.
*/
lastBuiltAt?: string;
/**
* Date and time when the Query Suggestions index was last updated successfully.
*/
lastSuccessfulBuiltAt?: string;
/**
* Duration of the last successful build in seconds.
*/
lastSuccessfulBuildDuration?: string;
};
type AppID = {
/**
* Algolia application ID to which this Query Suggestions configuration belongs.
*/
appID?: string;
};
/**
* Languages for deduplicating singular and plural suggestions. If specified, only the more popular form is included.
*/
type Languages = string[] | boolean;
type Languages = Array<string> | boolean;

@@ -47,4 +77,4 @@ /**

replicas?: boolean;
analyticsTags?: string[] | null;
facets?: Facet[] | null;
analyticsTags?: Array<string> | null;
facets?: Array<Facet> | null;
/**

@@ -58,4 +88,4 @@ * Minimum number of hits required to be included as a suggestion. A search query must at least generate `minHits` search results to be included in the Query Suggestions index.

minLetters?: number;
generate?: string[][] | null;
external?: string[] | null;
generate?: Array<Array<string>> | null;
external?: Array<string> | null;
};

@@ -70,5 +100,5 @@

*/
sourceIndices: SourceIndex[];
sourceIndices: Array<SourceIndex>;
languages?: Languages;
exclude?: string[] | null;
exclude?: Array<string> | null;
/**

@@ -85,2 +115,33 @@ * Whether to turn on personalized query suggestions.

/**
* Query Suggestions configuration.
*/
type ConfigurationWithIndex = Record<string, unknown> & Configuration;
/**
* API response for retrieving Query Suggestions configurations.
*/
type ConfigurationResponse = AppID & ConfigurationWithIndex;
/**
* Type of log entry. - `SKIP`. A query is skipped because it doesn\'t match the conditions for successful inclusion. For example, when a query doesn\'t generate enough search results. - `INFO`. An informative log entry. - `ERROR`. The Query Suggestions process encountered an error.
*/
type LogLevel = 'SKIP' | 'INFO' | 'ERROR';
type LogFile = {
/**
* Date and time of the log entry, in RFC 3339 format.
*/
timestamp?: string;
level?: LogLevel;
/**
* Details about this log entry.
*/
message?: string;
/**
* Level indicating the position of a suggestion in a hierarchy of records. For example, a `contextLevel` of 1 indicates that this suggestion belongs to a previous suggestion with `contextLevel` 0.
*/
contextLevel?: number;
};
/**
* Properties for the `customDelete` method.

@@ -96,3 +157,5 @@ */

*/
parameters?: Record<string, any>;
parameters?: {
[key: string]: any;
};
};

@@ -110,3 +173,5 @@ /**

*/
parameters?: Record<string, any>;
parameters?: {
[key: string]: any;
};
};

@@ -124,3 +189,5 @@ /**

*/
parameters?: Record<string, any>;
parameters?: {
[key: string]: any;
};
/**

@@ -142,3 +209,5 @@ * Parameters to send with the custom request.

*/
parameters?: Record<string, any>;
parameters?: {
[key: string]: any;
};
/**

@@ -196,64 +265,3 @@ * Parameters to send with the custom request.

type ConfigStatus = {
/**
* Name of the Query Suggestions index (case-sensitive).
*/
indexName?: string;
/**
* Whether the creation or update of the Query Suggestions index is in progress.
*/
isRunning?: boolean;
/**
* Date and time when the Query Suggestions index was last built, in RFC 3339 format.
*/
lastBuiltAt?: string;
/**
* Date and time when the Query Suggestions index was last updated successfully.
*/
lastSuccessfulBuiltAt?: string;
/**
* Duration of the last successful build in seconds.
*/
lastSuccessfulBuildDuration?: string;
};
type AppID = {
/**
* Algolia application ID to which this Query Suggestions configuration belongs.
*/
appID?: string;
};
/**
* Query Suggestions configuration.
*/
type ConfigurationWithIndex = Configuration & Record<string, unknown>;
/**
* API response for retrieving Query Suggestions configurations.
*/
type ConfigurationResponse = AppID & ConfigurationWithIndex;
/**
* Type of log entry. - `SKIP`. A query is skipped because it doesn\'t match the conditions for successful inclusion. For example, when a query doesn\'t generate enough search results. - `INFO`. An informative log entry. - `ERROR`. The Query Suggestions process encountered an error.
*/
type LogLevel = 'ERROR' | 'INFO' | 'SKIP';
type LogFile = {
/**
* Date and time of the log entry, in RFC 3339 format.
*/
timestamp?: string;
level?: LogLevel;
/**
* Details about this log entry.
*/
message?: string;
/**
* Level indicating the position of a suggestion in a hierarchy of records. For example, a `contextLevel` of 1 indicates that this suggestion belongs to a previous suggestion with `contextLevel` 0.
*/
contextLevel?: number;
};
declare const apiClientVersion = "5.7.0";
declare const apiClientVersion = "5.8.0";
declare const REGIONS: readonly ["eu", "us"];

@@ -297,4 +305,3 @@ type Region = (typeof REGIONS)[number];

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param configurationWithIndex - The configurationWithIndex object.

@@ -306,3 +313,2 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* This method allow you to send requests to the Algolia REST API.
*
* @param customDelete - The customDelete object.

@@ -316,3 +322,2 @@ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customGet - The customGet object.

@@ -326,3 +331,2 @@ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customPost - The customPost object.

@@ -337,3 +341,2 @@ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customPut - The customPut object.

@@ -350,4 +353,3 @@ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param deleteConfig - The deleteConfig object.

@@ -362,7 +364,6 @@ * @param deleteConfig.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
getAllConfigs(requestOptions?: RequestOptions): Promise<ConfigurationResponse[]>;
getAllConfigs(requestOptions?: RequestOptions): Promise<Array<ConfigurationResponse>>;
/**

@@ -372,4 +373,3 @@ * Retrieves a single Query Suggestions configuration by its index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getConfig - The getConfig object.

@@ -384,4 +384,3 @@ * @param getConfig.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getConfigStatus - The getConfigStatus object.

@@ -396,4 +395,3 @@ * @param getConfigStatus.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getLogFile - The getLogFile object.

@@ -408,4 +406,3 @@ * @param getLogFile.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param updateConfig - The updateConfig object.

@@ -412,0 +409,0 @@ * @param updateConfig.indexName - Query Suggestions index name.

// src/querySuggestionsClient.ts
import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
var apiClientVersion = "5.7.0";
var apiClientVersion = "5.8.0";
var REGIONS = ["eu", "us"];

@@ -80,4 +80,3 @@ function getDefaultHosts(region) {

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param configurationWithIndex - The configurationWithIndex object.

@@ -104,3 +103,2 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* This method allow you to send requests to the Algolia REST API.
*
* @param customDelete - The customDelete object.

@@ -128,3 +126,2 @@ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customGet - The customGet object.

@@ -152,3 +149,2 @@ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customPost - The customPost object.

@@ -178,3 +174,2 @@ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.

* This method allow you to send requests to the Algolia REST API.
*
* @param customPut - The customPut object.

@@ -206,4 +201,3 @@ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param deleteConfig - The deleteConfig object.

@@ -232,4 +226,3 @@ * @param deleteConfig.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -253,4 +246,3 @@ */

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getConfig - The getConfig object.

@@ -279,4 +271,3 @@ * @param getConfig.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getConfigStatus - The getConfigStatus object.

@@ -305,4 +296,3 @@ * @param getConfigStatus.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - settings.
*
* - settings
* @param getLogFile - The getLogFile object.

@@ -331,4 +321,3 @@ * @param getLogFile.indexName - Query Suggestions index name.

* Required API Key ACLs:
* - editSettings.
*
* - editSettings
* @param updateConfig - The updateConfig object.

@@ -335,0 +324,0 @@ * @param updateConfig.indexName - Query Suggestions index name.

// eslint-disable-next-line import/no-commonjs,import/extensions
module.exports = require('./dist/builds/node.cjs');
module.exports = require('./dist/builds/node.cjs');
// 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.
import type { Configuration } from './configuration';
import { Configuration } from '../model/configuration';

@@ -16,3 +16,3 @@ /**

*/
parameters?: Record<string, any>;
parameters?: { [key: string]: any };
};

@@ -31,3 +31,3 @@

*/
parameters?: Record<string, any>;
parameters?: { [key: string]: any };
};

@@ -46,3 +46,3 @@

*/
parameters?: Record<string, any>;
parameters?: { [key: string]: any };
/**

@@ -65,3 +65,3 @@ * Parameters to send with the custom request.

*/
parameters?: Record<string, any>;
parameters?: { [key: string]: any };
/**

@@ -68,0 +68,0 @@ * Parameters to send with the custom request.

@@ -13,7 +13,7 @@ // 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.

*/
sourceIndices: SourceIndex[];
sourceIndices: Array<SourceIndex>;
languages?: Languages;
exclude?: string[] | null;
exclude?: Array<string> | null;

@@ -20,0 +20,0 @@ /**

@@ -8,2 +8,2 @@ // 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.

*/
export type ConfigurationWithIndex = Configuration & Record<string, unknown>;
export type ConfigurationWithIndex = Record<string, unknown> & Configuration;

@@ -5,2 +5,3 @@ // 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.

export * from './baseResponse';
export * from './clientMethodProps';
export * from './configStatus';

@@ -16,2 +17,1 @@ export * from './configuration';

export * from './sourceIndex';
export * from './clientMethodProps';

@@ -6,2 +6,2 @@ // 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.

*/
export type Languages = string[] | boolean;
export type Languages = Array<string> | boolean;

@@ -6,2 +6,2 @@ // 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.

*/
export type LogLevel = 'ERROR' | 'INFO' | 'SKIP';
export type LogLevel = 'SKIP' | 'INFO' | 'ERROR';

@@ -19,5 +19,5 @@ // 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.

analyticsTags?: string[] | null;
analyticsTags?: Array<string> | null;
facets?: Facet[] | null;
facets?: Array<Facet> | null;

@@ -34,5 +34,5 @@ /**

generate?: string[][] | null;
generate?: Array<Array<string>> | null;
external?: string[] | null;
external?: Array<string> | null;
};
{
"version": "5.7.0",
"version": "5.8.0",
"repository": {

@@ -52,6 +52,6 @@ "type": "git",

"dependencies": {
"@algolia/client-common": "5.7.0",
"@algolia/requester-browser-xhr": "5.7.0",
"@algolia/requester-fetch": "5.7.0",
"@algolia/requester-node-http": "5.7.0"
"@algolia/client-common": "5.8.0",
"@algolia/requester-browser-xhr": "5.8.0",
"@algolia/requester-fetch": "5.8.0",
"@algolia/requester-node-http": "5.8.0"
},

@@ -62,3 +62,3 @@ "devDependencies": {

"publint": "0.2.11",
"rollup": "4.22.5",
"rollup": "4.24.0",
"tsup": "8.3.0",

@@ -65,0 +65,0 @@ "typescript": "5.6.2"

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

To get started, you first need to install @algolia/client-query-suggestions (or any other available API client package).

@@ -42,9 +41,8 @@ All of our clients comes with type definition, and are available for both browser and node environments.

```bash
yarn add @algolia/client-query-suggestions@5.7.0
yarn add @algolia/client-query-suggestions@5.8.0
# or
npm install @algolia/client-query-suggestions@5.7.0
npm install @algolia/client-query-suggestions@5.8.0
# or
pnpm add @algolia/client-query-suggestions@5.7.0
pnpm add @algolia/client-query-suggestions@5.8.0
```

@@ -57,3 +55,3 @@

```html
<script src="https://cdn.jsdelivr.net/npm/@algolia/client-query-suggestions@5.7.0/dist/builds/browser.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@algolia/client-query-suggestions@5.8.0/dist/builds/browser.umd.js"></script>
```

@@ -79,2 +77,2 @@

The Algolia JavaScript API Client is an open-sourced software licensed under the [MIT license](LICENSE).
The Algolia JavaScript API Client is an open-sourced software licensed under the [MIT license](LICENSE).

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc