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

@algolia/recommend

Package Overview
Dependencies
Maintainers
3
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@algolia/recommend - npm Package Compare versions

Comparing version 5.0.0-alpha.2 to 5.0.0-alpha.3

dist/model/distinct.d.ts

4

dist/builds/browser.d.ts

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

import type { InitClientOptions } from '@algolia/client-common';
import type { ClientOptions } from '@algolia/client-common';
import type { RecommendClient } from '../src/recommendClient';
export { apiClientVersion, RecommendClient } from '../src/recommendClient';
export * from '../model';
export declare function recommendClient(appId: string, apiKey: string, options?: InitClientOptions): RecommendClient;
export declare function recommendClient(appId: string, apiKey: string, options?: ClientOptions): RecommendClient;
//# sourceMappingURL=browser.d.ts.map

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

import type { InitClientOptions } from '@algolia/client-common';
import type { ClientOptions } from '@algolia/client-common';
import type { RecommendClient } from '../src/recommendClient';
export { apiClientVersion, RecommendClient } from '../src/recommendClient';
export * from '../model';
export declare function recommendClient(appId: string, apiKey: string, options?: InitClientOptions): RecommendClient;
export declare function recommendClient(appId: string, apiKey: string, options?: ClientOptions): RecommendClient;
//# sourceMappingURL=node.d.ts.map

@@ -11,2 +11,3 @@ export * from './advancedSyntaxFeatures';

export * from './baseTrendingRequest';
export * from './distinct';
export * from './errorBase';

@@ -13,0 +14,0 @@ export * from './exactOnSingleWordQuery';

import type { AdvancedSyntaxFeatures } from './advancedSyntaxFeatures';
import type { AlternativesAsExact } from './alternativesAsExact';
import type { Distinct } from './distinct';
import type { ExactOnSingleWordQuery } from './exactOnSingleWordQuery';

@@ -129,7 +130,4 @@ import type { IgnorePlurals } from './ignorePlurals';

advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];
distinct?: Distinct;
/**
* Enables de-duplication or grouping of results.
*/
distinct?: number;
/**
* Whether to take into account an index\'s synonyms for a particular search.

@@ -136,0 +134,0 @@ */

@@ -9,3 +9,3 @@ 'use strict';

// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
const apiClientVersion = '5.0.0-alpha.2';
const apiClientVersion = '5.0.0-alpha.3';
function getDefaultHosts(appId) {

@@ -12,0 +12,0 @@ return [

@@ -726,3 +726,3 @@ function createAuth(appId, apiKey, authMode = 'WithinHeaders') {

// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
const apiClientVersion = '5.0.0-alpha.2';
const apiClientVersion = '5.0.0-alpha.3';
function getDefaultHosts(appId) {

@@ -729,0 +729,0 @@ return [

@@ -5,3 +5,3 @@ import { createAuth, createTransporter, getAlgoliaAgent, shuffle, DEFAULT_CONNECT_TIMEOUT_NODE, DEFAULT_READ_TIMEOUT_NODE, DEFAULT_WRITE_TIMEOUT_NODE, createNullCache, createMemoryCache } from '@algolia/client-common';

// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
const apiClientVersion = '5.0.0-alpha.2';
const apiClientVersion = '5.0.0-alpha.3';
function getDefaultHosts(appId) {

@@ -8,0 +8,0 @@ return [

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

/*! recommend.umd.js | 5.0.0-alpha.2 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/recommend"]={})}(this,(function(e){"use strict";function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(e){let t;const r=`algolia-client-js-${e.key}`;function a(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function s(){return JSON.parse(a().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),a=s()[r];return Promise.all([a||t(),void 0!==a])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=s();return n[JSON.stringify(e)]=t,a().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=s();delete t[JSON.stringify(e)],a().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(r)}))}}function a(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,s,n={miss:()=>Promise.resolve()})=>r.get(e,s,n).catch((()=>a({caches:t}).get(e,s,n))),set:(e,s)=>r.set(e,s).catch((()=>a({caches:t}).set(e,s))),delete:e=>r.delete(e).catch((()=>a({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>a({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,a,s={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=a();return o.then((e=>s.miss(e))).then((()=>o))},set:(r,a)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const n=12e4;function o(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>n},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=n}}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends Error{constructor(e,t){super(e),i(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class l extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class p extends u{constructor(e,t,r){super(e,r,"ApiError"),i(this,"status",void 0),this.status=t}}class d extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}function h(e,t,r){const a=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${t(e[r])?JSON.stringify(e[r]):e[r]}`)).join("&")}(r);let s=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return a.length&&(s+=`?${a}`),s}function m(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:a,algoliaAgent:s,timeouts:n,requester:i,requestsCache:c,responsesCache:u}){async function f(c,u,f=!0){const g=[],y=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,u),O=function(e,t,r){const a={Accept:"application/json",...e,...t,...r},s={};return Object.keys(a).forEach((e=>{const t=a[e];s[e.toLowerCase()]=t})),s}(r,c.headers,u.headers),b="GET"===c.method?{...c.data,...u.data}:{},P={"x-algolia-agent":s.value,...a,...c.queryParameters,...b};if(u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?P[e]=u.queryParameters[e].toString():P[e]=u.queryParameters[e];let v=0;const w=async(e,r)=>{const a=e.pop();if(void 0===a)throw new l(function(e){return e.map((e=>m(e)))}(g));let s=u.timeout;void 0===s&&(s=f?n.read:n.write);const b={data:y,headers:O,method:c.method,url:h(a,c.path,P),connectTimeout:r(v,n.connect),responseTimeout:r(v,s)},j=t=>{const r={request:b,response:t,host:a,triesLeft:e.length};return g.push(r),r},q=await i.send(b);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(q)){const s=j(q);return q.isTimedOut&&v++,console.log("Retryable failure",m(s)),await t.set(a,o(a,q.isTimedOut?"timed out":"down")),w(e,r)}if(function({status:e}){return 2==~~(e/100)}(q))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(q);throw j(q),function({content:e,status:t},r){let a=e;try{a=JSON.parse(e).message}catch(e){}return new p(a,t,r)}(q,g)},j=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),q=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(o(e))))))),a=r.filter((e=>e.isUp())),s=r.filter((e=>e.isTimedOut())),n=[...a,...s];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===s.length&&0===e?1:s.length+3+e)*t}}(j);return w([...q.hosts].reverse(),q.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:s,baseHeaders:r,baseQueryParameters:a,hosts:e,request:function(e,t={}){const s=e.useReadTransporter||"GET"===e.method;if(!s)return f(e,t,s);const n=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return u.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}function g({algoliaAgents:e,client:t,version:r}){const a=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>a.add(e))),a}function y(e,t){if(null==e)return{};var r,a,s=function(e,t){if(null==e)return{};var r,a,s={},n=Object.keys(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||(s[r]=e[r]);return s}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}var O=["appId","apiKey","authMode","algoliaAgents"];function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function P(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?b(Object(a),!0).forEach((function(r){t(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):b(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var v="5.0.0-alpha.2";function w(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const a=Math.floor(Math.random()*(r+1)),s=e[r];t[r]=e[a],t[a]=s}return t}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}e.apiClientVersion=v,e.recommendClient=function(e,n,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!n||"string"!=typeof n)throw new Error("`apiKey` is missing.");return function(e){var t=e.appId,r=e.apiKey,a=e.authMode,s=e.algoliaAgents,n=y(e,O),o=function(e,t,r="WithinHeaders"){const a={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?a:{},queryParameters:()=>"WithinQueryParameters"===r?a:{}}}(t,r,a),i=f(P(P({hosts:w(t)},n),{},{algoliaAgent:g({algoliaAgents:s,client:"Recommend",version:v}),baseHeaders:P(P({"content-type":"text/plain"},o.headers()),n.baseHeaders),baseQueryParameters:P(P({},o.queryParameters()),n.baseQueryParameters)}));return{transporter:i,get _ua(){return i.algoliaAgent.value},addAlgoliaAgent:function(e,t){i.algoliaAgent.add({segment:e,version:t})},del:function(e,t){var r=e.path,a=e.parameters;if(!r)throw new Error("Parameter `path` is required when calling `del`.");var s={method:"DELETE",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return i.request(s,t)},get:function(e,t){var r=e.path,a=e.parameters;if(!r)throw new Error("Parameter `path` is required when calling `get`.");var s={method:"GET",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return i.request(s,t)},getRecommendations:function(e,t){if(!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var r={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return i.request(r,t)},post:function(e,t){var r=e.path,a=e.parameters,s=e.body;if(!r)throw new Error("Parameter `path` is required when calling `post`.");var n={method:"POST",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:s||{}};return i.request(n,t)},put:function(e,t){var r=e.path,a=e.parameters,s=e.body;if(!r)throw new Error("Parameter `path` is required when calling `put`.");var n={method:"PUT",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:s||{}};return i.request(n,t)}}}(function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?j(Object(a),!0).forEach((function(r){t(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):j(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({appId:e,apiKey:n,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const a=(e,a)=>setTimeout((()=>{r.abort(),t({status:0,content:a,isTimedOut:!0})}),e),s=a(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(s),n=a(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(s),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(s),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:a({caches:[r({key:"".concat(v,"-").concat(e)}),s()]})},o))}}));
/*! recommend.umd.js | 5.0.0-alpha.3 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/recommend"]={})}(this,(function(e){"use strict";function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(e){let t;const r=`algolia-client-js-${e.key}`;function a(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function s(){return JSON.parse(a().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),a=s()[r];return Promise.all([a||t(),void 0!==a])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=s();return n[JSON.stringify(e)]=t,a().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=s();delete t[JSON.stringify(e)],a().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(r)}))}}function a(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,s,n={miss:()=>Promise.resolve()})=>r.get(e,s,n).catch((()=>a({caches:t}).get(e,s,n))),set:(e,s)=>r.set(e,s).catch((()=>a({caches:t}).set(e,s))),delete:e=>r.delete(e).catch((()=>a({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>a({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,a,s={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=a();return o.then((e=>s.miss(e))).then((()=>o))},set:(r,a)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const n=12e4;function o(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>n},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=n}}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends Error{constructor(e,t){super(e),i(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class l extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class p extends u{constructor(e,t,r){super(e,r,"ApiError"),i(this,"status",void 0),this.status=t}}class d extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}function h(e,t,r){const a=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${t(e[r])?JSON.stringify(e[r]):e[r]}`)).join("&")}(r);let s=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return a.length&&(s+=`?${a}`),s}function m(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:a,algoliaAgent:s,timeouts:n,requester:i,requestsCache:c,responsesCache:u}){async function f(c,u,f=!0){const g=[],y=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,u),O=function(e,t,r){const a={Accept:"application/json",...e,...t,...r},s={};return Object.keys(a).forEach((e=>{const t=a[e];s[e.toLowerCase()]=t})),s}(r,c.headers,u.headers),b="GET"===c.method?{...c.data,...u.data}:{},P={"x-algolia-agent":s.value,...a,...c.queryParameters,...b};if(u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?P[e]=u.queryParameters[e].toString():P[e]=u.queryParameters[e];let v=0;const w=async(e,r)=>{const a=e.pop();if(void 0===a)throw new l(function(e){return e.map((e=>m(e)))}(g));let s=u.timeout;void 0===s&&(s=f?n.read:n.write);const b={data:y,headers:O,method:c.method,url:h(a,c.path,P),connectTimeout:r(v,n.connect),responseTimeout:r(v,s)},j=t=>{const r={request:b,response:t,host:a,triesLeft:e.length};return g.push(r),r},q=await i.send(b);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(q)){const s=j(q);return q.isTimedOut&&v++,console.log("Retryable failure",m(s)),await t.set(a,o(a,q.isTimedOut?"timed out":"down")),w(e,r)}if(function({status:e}){return 2==~~(e/100)}(q))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(q);throw j(q),function({content:e,status:t},r){let a=e;try{a=JSON.parse(e).message}catch(e){}return new p(a,t,r)}(q,g)},j=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),q=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(o(e))))))),a=r.filter((e=>e.isUp())),s=r.filter((e=>e.isTimedOut())),n=[...a,...s];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===s.length&&0===e?1:s.length+3+e)*t}}(j);return w([...q.hosts].reverse(),q.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:s,baseHeaders:r,baseQueryParameters:a,hosts:e,request:function(e,t={}){const s=e.useReadTransporter||"GET"===e.method;if(!s)return f(e,t,s);const n=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return u.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}function g({algoliaAgents:e,client:t,version:r}){const a=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>a.add(e))),a}function y(e,t){if(null==e)return{};var r,a,s=function(e,t){if(null==e)return{};var r,a,s={},n=Object.keys(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||(s[r]=e[r]);return s}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(s[r]=e[r])}return s}var O=["appId","apiKey","authMode","algoliaAgents"];function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function P(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?b(Object(a),!0).forEach((function(r){t(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):b(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var v="5.0.0-alpha.3";function w(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const a=Math.floor(Math.random()*(r+1)),s=e[r];t[r]=e[a],t[a]=s}return t}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}e.apiClientVersion=v,e.recommendClient=function(e,n,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!n||"string"!=typeof n)throw new Error("`apiKey` is missing.");return function(e){var t=e.appId,r=e.apiKey,a=e.authMode,s=e.algoliaAgents,n=y(e,O),o=function(e,t,r="WithinHeaders"){const a={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?a:{},queryParameters:()=>"WithinQueryParameters"===r?a:{}}}(t,r,a),i=f(P(P({hosts:w(t)},n),{},{algoliaAgent:g({algoliaAgents:s,client:"Recommend",version:v}),baseHeaders:P(P({"content-type":"text/plain"},o.headers()),n.baseHeaders),baseQueryParameters:P(P({},o.queryParameters()),n.baseQueryParameters)}));return{transporter:i,get _ua(){return i.algoliaAgent.value},addAlgoliaAgent:function(e,t){i.algoliaAgent.add({segment:e,version:t})},del:function(e,t){var r=e.path,a=e.parameters;if(!r)throw new Error("Parameter `path` is required when calling `del`.");var s={method:"DELETE",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return i.request(s,t)},get:function(e,t){var r=e.path,a=e.parameters;if(!r)throw new Error("Parameter `path` is required when calling `get`.");var s={method:"GET",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return i.request(s,t)},getRecommendations:function(e,t){if(!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var r={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return i.request(r,t)},post:function(e,t){var r=e.path,a=e.parameters,s=e.body;if(!r)throw new Error("Parameter `path` is required when calling `post`.");var n={method:"POST",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:s||{}};return i.request(n,t)},put:function(e,t){var r=e.path,a=e.parameters,s=e.body;if(!r)throw new Error("Parameter `path` is required when calling `put`.");var n={method:"PUT",path:"/1{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:s||{}};return i.request(n,t)}}}(function(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?j(Object(a),!0).forEach((function(r){t(e,r,a[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):j(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}({appId:e,apiKey:n,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const a=(e,a)=>setTimeout((()=>{r.abort(),t({status:0,content:a,isTimedOut:!0})}),e),s=a(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(s),n=a(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(s),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(s),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:a({caches:[r({key:"".concat(v,"-").concat(e)}),s()]})},o))}}));

@@ -5,3 +5,3 @@ import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';

import type { GetRecommendationsResponse } from '../model/getRecommendationsResponse';
export declare const apiClientVersion = "5.0.0-alpha.2";
export declare const apiClientVersion = "5.0.0-alpha.3";
export declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {

@@ -8,0 +8,0 @@ transporter: import("@algolia/client-common").Transporter;

@@ -7,2 +7,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

model: RecommendationModels;
/**

@@ -9,0 +10,0 @@ * Unique identifier of the object.

@@ -10,2 +10,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

indexName: string;
/**

@@ -15,2 +16,3 @@ * The threshold to use when filtering recommendations by their score.

threshold: number;
/**

@@ -20,4 +22,6 @@ * The max number of recommendations to retrieve. If it\'s set to 0, all the recommendations of the objectID may be returned.

maxRecommendations?: number;
queryParameters?: SearchParamsObject;
fallbackParameters?: SearchParamsObject;
};

@@ -15,2 +15,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

similarQuery?: string;
/**

@@ -20,6 +21,11 @@ * Filter the query with numeric, facet and/or tag filters.

filters?: string;
facetFilters?: FacetFilters;
optionalFilters?: OptionalFilters;
numericFilters?: NumericFilters;
tagFilters?: TagFilters;
/**

@@ -29,2 +35,3 @@ * Determines how to calculate the total score for filtering.

sumOrFiltersScores?: boolean;
/**

@@ -34,2 +41,3 @@ * Retrieve facets and their facet values.

facets?: string[];
/**

@@ -39,2 +47,3 @@ * Maximum number of facet values to return for each facet during a regular search.

maxValuesPerFacet?: number;
/**

@@ -44,2 +53,3 @@ * Force faceting to be applied after de-duplication (via the Distinct setting).

facetingAfterDistinct?: boolean;
/**

@@ -49,2 +59,3 @@ * Controls how facet values are fetched.

sortFacetValuesBy?: string;
/**

@@ -54,2 +65,3 @@ * Specify the page to retrieve.

page?: number;
/**

@@ -59,2 +71,3 @@ * Specify the offset of the first hit to return.

offset?: number;
/**

@@ -64,2 +77,3 @@ * Set the number of hits to retrieve (used only with offset).

length?: number;
/**

@@ -69,2 +83,3 @@ * Search for entries around a central geolocation, enabling a geo search within a circular area.

aroundLatLng?: string;
/**

@@ -74,3 +89,5 @@ * Search for entries around a given location automatically computed from the requester\'s IP address.

aroundLatLngViaIP?: boolean;
aroundRadius?: AroundRadius;
/**

@@ -80,2 +97,3 @@ * Precision of geo search (in meters), to add grouping by geo location to the ranking formula.

aroundPrecision?: number;
/**

@@ -85,2 +103,3 @@ * Minimum radius (in meters) used for a geo search when aroundRadius is not set.

minimumAroundRadius?: number;
/**

@@ -90,2 +109,3 @@ * Search inside a rectangular area (in geo coordinates).

insideBoundingBox?: number[];
/**

@@ -95,2 +115,3 @@ * Search inside a polygon (in geo coordinates).

insidePolygon?: number[];
/**

@@ -100,2 +121,3 @@ * This parameter changes the default values of certain parameters and settings that work best for a natural language query, such as ignorePlurals, removeStopWords, removeWordsIfNoResults, analyticsTags and ruleContexts. These parameters and settings work well together when the query is formatted in natural language instead of keywords, for example when your user performs a voice search.

naturalLanguages?: string[];
/**

@@ -105,2 +127,3 @@ * Enables contextual rules.

ruleContexts?: string[];
/**

@@ -110,2 +133,3 @@ * Define the impact of the Personalization feature.

personalizationImpact?: number;
/**

@@ -115,2 +139,3 @@ * Associates a certain user token with the current search.

userToken?: string;
/**

@@ -120,2 +145,3 @@ * Retrieve detailed ranking information.

getRankingInfo?: boolean;
/**

@@ -125,2 +151,3 @@ * Enable the Click Analytics feature.

clickAnalytics?: boolean;
/**

@@ -130,2 +157,3 @@ * Whether the current query will be taken into account in the Analytics.

analytics?: boolean;
/**

@@ -135,2 +163,3 @@ * List of tags to apply to the query for analytics purposes.

analyticsTags?: string[];
/**

@@ -140,2 +169,3 @@ * Whether to include or exclude a query from the processing-time percentile computation.

percentileComputation?: boolean;
/**

@@ -145,2 +175,3 @@ * Whether this search should participate in running AB tests.

enableABTest?: boolean;
/**

@@ -150,3 +181,4 @@ * Whether this search should use AI Re-Ranking.

enableReRanking?: boolean;
reRankingApplyFilter?: ReRankingApplyFilter | null;
};

@@ -11,2 +11,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

abTestID?: number;
/**

@@ -16,2 +17,3 @@ * If a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used (starting at 1).

abTestVariantID?: number;
/**

@@ -21,2 +23,3 @@ * The computed geo location.

aroundLatLng?: string;
/**

@@ -26,2 +29,3 @@ * The automatically computed radius. For legacy reasons, this parameter is a string and not an integer.

automaticRadius?: string;
/**

@@ -31,2 +35,3 @@ * Whether the facet count is exhaustive or approximate.

exhaustiveFacetsCount?: boolean;
/**

@@ -36,2 +41,3 @@ * Indicate if the nbHits count was exhaustive or approximate.

exhaustiveNbHits: boolean;
/**

@@ -41,2 +47,3 @@ * Indicate if the typo-tolerance search was exhaustive or approximate (only included when typo-tolerance is enabled).

exhaustiveTypo: boolean;
/**

@@ -46,2 +53,3 @@ * A mapping of each facet name to the corresponding facet counts.

facets?: Record<string, Record<string, number>>;
/**

@@ -51,2 +59,3 @@ * Statistics for numerical facets.

facets_stats?: Record<string, FacetsStats>;
/**

@@ -56,2 +65,3 @@ * Set the number of hits per page.

hitsPerPage: number;
/**

@@ -61,2 +71,3 @@ * Index name used for the query.

index?: string;
/**

@@ -66,2 +77,3 @@ * Index name used for the query. In the case of an A/B test, the targeted index isn\'t always the index used by the query.

indexUsed?: string;
/**

@@ -71,2 +83,3 @@ * Used to return warnings about the query.

message?: string;
/**

@@ -76,2 +89,3 @@ * Number of hits that the search query matched.

nbHits: number;
/**

@@ -81,2 +95,3 @@ * Number of pages available for the current query.

nbPages: number;
/**

@@ -86,2 +101,3 @@ * The number of hits selected and sorted by the relevant sort algorithm.

nbSortedHits?: number;
/**

@@ -91,2 +107,3 @@ * Specify the page to retrieve.

page: number;
/**

@@ -96,2 +113,3 @@ * A url-encoded string of all search parameters.

params: string;
/**

@@ -101,2 +119,3 @@ * The query string that will be searched, after normalization.

parsedQuery?: string;
/**

@@ -106,2 +125,3 @@ * Time the server took to process the request, in milliseconds.

processingTimeMS: number;
/**

@@ -111,2 +131,3 @@ * The text to search in the index.

query: string;
/**

@@ -116,2 +137,3 @@ * A markup text indicating which parts of the original query have been removed in order to retrieve a non-empty result set.

queryAfterRemoval?: string;
/**

@@ -121,2 +143,3 @@ * Actual host name of the server that processed the request.

serverUsed?: string;
/**

@@ -126,3 +149,4 @@ * Lets you store custom data in your indices.

userData?: Record<string, any>;
renderingContent?: RenderingContent;
};

@@ -7,2 +7,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

model: TrendingModels;
/**

@@ -12,2 +13,3 @@ * The facet name to use for trending models.

facetName?: string;
/**

@@ -14,0 +16,0 @@ * The facet value to use for trending models.

@@ -11,2 +11,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

facets?: Facets;
/**

@@ -13,0 +14,0 @@ * The ordering of facet values, within an individual list.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

min?: number;
/**

@@ -13,2 +14,3 @@ * The maximum value in the result set.

max?: number;
/**

@@ -18,2 +20,3 @@ * The average facet value in the result set.

avg?: number;
/**

@@ -20,0 +23,0 @@ * The sum of all values in the result set.

@@ -13,3 +13,5 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

value: string;
matchLevel: MatchLevel;
/**

@@ -19,2 +21,3 @@ * List of words from the query that matched the object.

matchedWords: string[];
/**

@@ -21,0 +24,0 @@ * Whether the entire attribute value is highlighted.

@@ -13,2 +13,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

export * from './baseTrendingRequest';
export * from './distinct';
export * from './errorBase';

@@ -15,0 +16,0 @@ export * from './exactOnSingleWordQuery';

@@ -5,2 +5,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

import type { AlternativesAsExact } from './alternativesAsExact';
import type { Distinct } from './distinct';
import type { ExactOnSingleWordQuery } from './exactOnSingleWordQuery';

@@ -19,2 +20,3 @@ import type { IgnorePlurals } from './ignorePlurals';

attributesForFaceting?: string[];
/**

@@ -24,2 +26,3 @@ * List of attributes that can\'t be retrieved at query time.

unretrievableAttributes?: string[];
/**

@@ -29,2 +32,3 @@ * This parameter controls which attributes to retrieve and which not to retrieve.

attributesToRetrieve?: string[];
/**

@@ -34,2 +38,3 @@ * Restricts a given query to look in only a subset of your searchable attributes.

restrictSearchableAttributes?: string[];
/**

@@ -39,2 +44,3 @@ * Controls how Algolia should sort your results.

ranking?: string[];
/**

@@ -44,2 +50,3 @@ * Specifies the custom ranking criterion.

customRanking?: string[];
/**

@@ -49,2 +56,3 @@ * Controls the relevancy threshold below which less relevant results aren\'t included in the results.

relevancyStrictness?: number;
/**

@@ -54,2 +62,3 @@ * List of attributes to highlight.

attributesToHighlight?: string[];
/**

@@ -59,2 +68,3 @@ * List of attributes to snippet, with an optional maximum number of words to snippet.

attributesToSnippet?: string[];
/**

@@ -64,2 +74,3 @@ * The HTML string to insert before the highlighted parts in all highlight and snippet results.

highlightPreTag?: string;
/**

@@ -69,2 +80,3 @@ * The HTML string to insert after the highlighted parts in all highlight and snippet results.

highlightPostTag?: string;
/**

@@ -74,2 +86,3 @@ * String used as an ellipsis indicator when a snippet is truncated.

snippetEllipsisText?: string;
/**

@@ -79,2 +92,3 @@ * Restrict highlighting and snippeting to items that matched the query.

restrictHighlightAndSnippetArrays?: boolean;
/**

@@ -84,2 +98,3 @@ * Set the number of hits per page.

hitsPerPage?: number;
/**

@@ -89,2 +104,3 @@ * Minimum number of characters a word in the query string must contain to accept matches with 1 typo.

minWordSizefor1Typo?: number;
/**

@@ -94,3 +110,5 @@ * Minimum number of characters a word in the query string must contain to accept matches with 2 typos.

minWordSizefor2Typos?: number;
typoTolerance?: TypoTolerance;
/**

@@ -100,2 +118,3 @@ * Whether to allow typos on numbers (\"numeric tokens\") in the query string.

allowTyposOnNumericTokens?: boolean;
/**

@@ -105,4 +124,7 @@ * List of attributes on which you want to disable typo tolerance.

disableTypoToleranceOnAttributes?: string[];
ignorePlurals?: IgnorePlurals;
removeStopWords?: RemoveStopWords;
/**

@@ -112,2 +134,3 @@ * List of characters that the engine shouldn\'t automatically normalize.

keepDiacriticsOnCharacters?: string;
/**

@@ -117,2 +140,3 @@ * Sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection.

queryLanguages?: string[];
/**

@@ -122,2 +146,3 @@ * Splits compound words into their composing atoms in the query.

decompoundQuery?: boolean;
/**

@@ -127,2 +152,3 @@ * Whether Rules should be globally enabled.

enableRules?: boolean;
/**

@@ -132,4 +158,7 @@ * Enable the Personalization feature.

enablePersonalization?: boolean;
queryType?: QueryType;
removeWordsIfNoResults?: RemoveWordsIfNoResults;
/**

@@ -139,2 +168,3 @@ * Enables the advanced query syntax.

advancedSyntax?: boolean;
/**

@@ -144,2 +174,3 @@ * A list of words that should be considered as optional when found in the query.

optionalWords?: string[];
/**

@@ -149,3 +180,5 @@ * List of attributes on which you want to disable the exact ranking criterion.

disableExactOnAttributes?: string[];
exactOnSingleWordQuery?: ExactOnSingleWordQuery;
/**

@@ -155,2 +188,3 @@ * List of alternatives that should be considered an exact match by the exact ranking criterion.

alternativesAsExact?: AlternativesAsExact[];
/**

@@ -160,10 +194,10 @@ * Allows you to specify which advanced syntax features are active when ‘advancedSyntax\' is enabled.

advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];
distinct?: Distinct;
/**
* Enables de-duplication or grouping of results.
*/
distinct?: number;
/**
* Whether to take into account an index\'s synonyms for a particular search.
*/
synonyms?: boolean;
/**

@@ -173,2 +207,3 @@ * Whether to highlight and snippet the original word that matches the synonym or the synonym itself.

replaceSynonymsInHighlight?: boolean;
/**

@@ -178,2 +213,3 @@ * Precision of the proximity ranking criterion.

minProximity?: number;
/**

@@ -183,2 +219,3 @@ * Choose which fields to return in the API response. This parameters applies to search and browse queries.

responseFields?: string[];
/**

@@ -188,2 +225,3 @@ * Maximum number of facet hits to return during a search for facet values. For performance reasons, the maximum allowed number of returned values is 100.

maxFacetHits?: number;
/**

@@ -193,3 +231,4 @@ * When attribute is ranked above proximity in your ranking formula, proximity is used to select which searchable attribute is matched in the attribute ranking stage.

attributeCriteriaComputedByMinProximity?: boolean;
renderingContent?: RenderingContent;
};

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

lat?: number;
/**

@@ -13,2 +14,3 @@ * Longitude of the matched location.

lng?: number;
/**

@@ -15,0 +17,0 @@ * Distance between the matched location and the search location (in meters).

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

filtersScore?: number;
/**

@@ -13,2 +14,3 @@ * The score of the ranking.

rankingScore?: number;
/**

@@ -15,0 +17,0 @@ * The score of the event.

@@ -11,2 +11,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

filters: number;
/**

@@ -16,2 +17,3 @@ * Position of the most important matched attribute in the attributes to index list.

firstMatchedWord: number;
/**

@@ -21,2 +23,3 @@ * Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters).

geoDistance: number;
/**

@@ -26,4 +29,7 @@ * Precision used when computing the geo distance, in meters.

geoPrecision?: number;
matchedGeoLocation?: MatchedGeoLocation;
personalization?: Personalization;
/**

@@ -33,2 +39,3 @@ * Number of exactly matched words.

nbExactWords: number;
/**

@@ -38,2 +45,3 @@ * Number of typos encountered when matching the record.

nbTypos: number;
/**

@@ -43,2 +51,3 @@ * Present and set to true if a Rule promoted the hit.

promoted: boolean;
/**

@@ -48,2 +57,3 @@ * When the query contains more than one word, the sum of the distances between matched words (in meters).

proximityDistance?: number;
/**

@@ -53,2 +63,3 @@ * Custom ranking for the object, expressed as a single integer value.

userScore: number;
/**

@@ -58,2 +69,3 @@ * Number of matched words, including prefixes and typos.

words: number;
/**

@@ -60,0 +72,0 @@ * Wether the record are promoted by the re-ranking strategy.

@@ -15,2 +15,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

objectID: string;
/**

@@ -20,2 +21,3 @@ * Show highlighted section and words matched on a query.

_highlightResult?: Record<string, HighlightResult>;
/**

@@ -25,4 +27,7 @@ * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.

_snippetResult?: Record<string, SnippetResult>;
_rankingInfo?: RankingInfo;
_distinctSeqID?: number;
/**

@@ -29,0 +34,0 @@ * The recommendation score.

@@ -13,3 +13,4 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

value: string;
matchLevel: MatchLevel;
};

@@ -10,3 +10,4 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

order?: string[];
sortRemainingBy?: SortRemainingBy;
};
{
"name": "@algolia/recommend",
"version": "5.0.0-alpha.2",
"version": "5.0.0-alpha.3",
"description": "JavaScript client for recommend",

@@ -24,5 +24,5 @@ "repository": "algolia/algoliasearch-client-javascript",

"dependencies": {
"@algolia/client-common": "5.0.0-alpha.2",
"@algolia/requester-browser-xhr": "5.0.0-alpha.2",
"@algolia/requester-node-http": "5.0.0-alpha.2"
"@algolia/client-common": "5.0.0-alpha.3",
"@algolia/requester-browser-xhr": "5.0.0-alpha.3",
"@algolia/requester-node-http": "5.0.0-alpha.3"
},

@@ -29,0 +29,0 @@ "devDependencies": {

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

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