Socket
Socket
Sign inDemoInstall

@algolia/recommend

Package Overview
Dependencies
Maintainers
3
Versions
180
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.110 to 5.0.0-alpha.111

dist/model/autoFacetFilter.d.ts

2

dist/builds/browser.d.ts

@@ -19,3 +19,3 @@ import type { ClientOptions } from '@algolia/client-common';

deleteRecommendRule({ indexName, model, objectID }: import("../model").DeleteRecommendRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").DeletedAtResponse>;
getRecommendRule({ indexName, model, objectID }: import("../model").GetRecommendRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").RuleResponse>;
getRecommendRule({ indexName, model, objectID }: import("../model").GetRecommendRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").RecommendRule>;
getRecommendStatus({ indexName, model, taskID }: import("../model").GetRecommendStatusProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetRecommendTaskResponse>;

@@ -22,0 +22,0 @@ getRecommendations(getRecommendationsParams: import("../model").GetRecommendationsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetRecommendationsResponse>;

@@ -19,3 +19,3 @@ import type { ClientOptions } from '@algolia/client-common';

deleteRecommendRule({ indexName, model, objectID }: import("../model").DeleteRecommendRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").DeletedAtResponse>;
getRecommendRule({ indexName, model, objectID }: import("../model").GetRecommendRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").RuleResponse>;
getRecommendRule({ indexName, model, objectID }: import("../model").GetRecommendRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").RecommendRule>;
getRecommendStatus({ indexName, model, taskID }: import("../model").GetRecommendStatusProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetRecommendTaskResponse>;

@@ -22,0 +22,0 @@ getRecommendations(getRecommendationsParams: import("../model").GetRecommendationsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetRecommendationsResponse>;

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

import type { SearchParams } from './searchParams';
export type BaseRecommendRequest = {

@@ -7,10 +8,11 @@ /**

/**
* Recommendations with a confidence score lower than `threshold` won\'t appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are.
* Minimum score a recommendation must have to be included in the response.
*/
threshold?: number;
threshold: number;
/**
* Maximum number of recommendations to retrieve. If 0, all recommendations will be returned.
* Maximum number of recommendations to retrieve. By default, all recommendations are returned and no fallback request is made. Depending on the available recommendations and the other request parameters, the actual number of recommendations may be lower than this value.
*/
maxRecommendations?: number;
queryParameters?: SearchParams;
};
//# sourceMappingURL=baseRecommendRequest.d.ts.map

@@ -13,3 +13,3 @@ import type { AroundPrecision } from './aroundPrecision';

/**
* Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
*/

@@ -16,0 +16,0 @@ filters?: string;

@@ -72,3 +72,3 @@ import type { RecommendModels } from './recommendModels';

/**
* [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
*/

@@ -90,3 +90,3 @@ model: RecommendModels;

/**
* [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
*/

@@ -108,7 +108,7 @@ model: RecommendModels;

/**
* [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
*/
model: RecommendModels;
/**
* Unique identifier of a task. Numeric value (up to 64bits).
* Unique task identifier.
*/

@@ -126,3 +126,3 @@ taskID: number;

/**
* [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
*/

@@ -129,0 +129,0 @@ model: RecommendModels;

@@ -1,21 +0,14 @@

import type { Anchoring } from './anchoring';
/**
* Condition that triggers the rule. If not specified, the rule is triggered for all recommendations.
*/
export type Condition = {
/**
* Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\".
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
*/
pattern?: string;
anchoring?: Anchoring;
filters?: string;
/**
* Whether the pattern should match plurals, synonyms, and typos.
*/
alternatives?: boolean;
/**
* An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters.
*/
context?: string;
/**
* Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter.
*/
filters?: string;
};
//# sourceMappingURL=condition.d.ts.map

@@ -1,26 +0,18 @@

import type { ConsequenceHide } from './consequenceHide';
import type { ConsequenceParams } from './consequenceParams';
import type { Promote } from './promote';
import type { HideConsequenceObject } from './hideConsequenceObject';
import type { ParamsConsequence } from './paramsConsequence';
import type { PromoteConsequenceObject } from './promoteConsequenceObject';
/**
* Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences).
* Effect of the rule.
*/
export type Consequence = {
params?: ConsequenceParams;
/**
* Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each.
* Exclude items from recommendations.
*/
promote?: Promote[];
hide?: HideConsequenceObject[];
/**
* Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won\'t be shown.
* Place items at specific positions in the list of recommendations.
*/
filterPromotes?: boolean;
/**
* Records you want to hide from the search results.
*/
hide?: ConsequenceHide[];
/**
* A JSON object with custom data that will be appended to the `userData` array in the response. This object isn\'t interpreted by the API and is limited to 1&nbsp;kB of minified JSON.
*/
userData?: any | null;
promote?: PromoteConsequenceObject[];
params?: ParamsConsequence;
};
//# sourceMappingURL=consequence.d.ts.map

@@ -10,3 +10,3 @@ /**

/**
* Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was deleted, in RFC 3339 format.
*/

@@ -13,0 +13,0 @@ deletedAt: string;

/**
* Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word. <dl> <dt><code>attribute</code></dt> <dd> The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\". </dd> <dt><code>none</code></dt> <dd> The Exact ranking criterion is ignored on single-word searches. </dd> <dt><code>word</code></dt> <dd> The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word. </dd> </dl> If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won\'t.
* Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word. - `attribute`. The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\". - `none`. The Exact ranking criterion is ignored on single-word searches. - `word`. The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word. Only exact matches will be highlighted, partial and prefix matches won\'t.
*/
export type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word';
//# sourceMappingURL=exactOnSingleWordQuery.d.ts.map
import type { RecommendationsRequest } from './recommendationsRequest';
/**
* Recommend parameters.
* Recommend request body.
*/
export type GetRecommendationsParams = {
/**
* Request parameters depend on the model (recommendations or trending).
* Recommendation request with parameters depending on the requested model.
*/

@@ -9,0 +9,0 @@ requests: RecommendationsRequest[];

export * from './advancedSyntaxFeatures';
export * from './alternativesAsExact';
export * from './anchoring';
export * from './aroundPrecision';

@@ -8,23 +7,12 @@ export * from './aroundPrecisionFromValueInner';

export * from './aroundRadiusAll';
export * from './automaticFacetFilter';
export * from './automaticFacetFilters';
export * from './autoFacetFilter';
export * from './baseRecommendRequest';
export * from './baseRecommendationsQuery';
export * from './baseRecommendedForYouQuery';
export * from './baseRecommendedForYouQueryParameters';
export * from './baseSearchParams';
export * from './baseSearchParamsWithoutQuery';
export * from './baseSearchResponse';
export * from './baseTrendingFacetsQuery';
export * from './baseTrendingItemsQuery';
export * from './boughtTogetherQuery';
export * from './condition';
export * from './consequence';
export * from './consequenceHide';
export * from './consequenceParams';
export * from './consequenceQuery';
export * from './consequenceQueryObject';
export * from './deletedAtResponse';
export * from './distinct';
export * from './edit';
export * from './editType';
export * from './errorBase';

@@ -37,5 +25,9 @@ export * from './exactOnSingleWordQuery';

export * from './facetsStats';
export * from './fallbackParams';
export * from './fbtModel';
export * from './frequentlyBoughtTogether';
export * from './getRecommendTaskResponse';
export * from './getRecommendationsParams';
export * from './getRecommendationsResponse';
export * from './hideConsequenceObject';
export * from './highlightResult';

@@ -45,2 +37,5 @@ export * from './highlightResultOption';

export * from './indexSettingsAsSearchParams';
export * from './lookingSimilar';
export * from './lookingSimilarModel';
export * from './lookingSimilarQuery';
export * from './matchLevel';

@@ -52,7 +47,5 @@ export * from './matchedGeoLocation';

export * from './optionalFilters';
export * from './params';
export * from './paramsConsequence';
export * from './personalization';
export * from './promote';
export * from './promoteObjectID';
export * from './promoteObjectIDs';
export * from './promoteConsequenceObject';
export * from './queryType';

@@ -63,19 +56,21 @@ export * from './rankingInfo';

export * from './recommendModels';
export * from './recommendationModels';
export * from './recommendRule';
export * from './recommendRuleMetadata';
export * from './recommendationsHit';
export * from './recommendationsHits';
export * from './recommendationsQuery';
export * from './recommendationsRequest';
export * from './recommendationsResults';
export * from './recommendedForYou';
export * from './recommendedForYouModel';
export * from './recommendedForYouQuery';
export * from './recommendedForYouQueryParameters';
export * from './redirect';
export * from './redirectRuleIndexMetadata';
export * from './redirectRuleIndexMetadataData';
export * from './relatedModel';
export * from './relatedProducts';
export * from './relatedQuery';
export * from './removeStopWords';
export * from './removeWordsIfNoResults';
export * from './renderingContent';
export * from './ruleResponse';
export * from './ruleResponseMetadata';
export * from './searchParams';
export * from './searchParamsObject';

@@ -93,4 +88,6 @@ export * from './searchParamsQuery';

export * from './trendingFacetHit';
export * from './trendingFacets';
export * from './trendingFacetsModel';
export * from './trendingFacetsQuery';
export * from './trendingItems';
export * from './trendingItemsModel';

@@ -97,0 +94,0 @@ export * from './trendingItemsQuery';

@@ -21,7 +21,7 @@ import type { AdvancedSyntaxFeatures } from './advancedSyntaxFeatures';

/**
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
*/
ranking?: string[];
/**
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
*/

@@ -118,7 +118,7 @@ customRanking?: string[];

/**
* Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. <dl> <dt><code>ignorePlurals</code></dt> <dd> Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. </dd> <dt><code>singleWordSynonym</code></dt> <dd> Single-word synonyms, such as \"NY/NYC\" are considered exact matches. </dd> <dt><code>multiWordsSynonym</code></dt> <dd> Multi-word synonyms, such as \"NY/New York\" are considered exact matches. </dd> </dl>.
* Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
*/
alternativesAsExact?: AlternativesAsExact[];
/**
* Advanced search syntax features you want to support. <dl> <dt><code>exactPhrase</code></dt> <dd> Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". </dd> <dt><code>excludeWords</code></dt> <dd> Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". </dd> </dl> This setting only has an effect if `advancedSyntax` is true.
* Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
*/

@@ -148,3 +148,3 @@ advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];

/**
* Order in which to retrieve facet values. <dl> <dt><code>count</code></dt> <dd> Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Retrieve facet values alphabetically.</dd> </dl> This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
* Order in which to retrieve facet values. - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Retrieve facet values alphabetically. This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
*/

@@ -151,0 +151,0 @@ sortFacetValuesBy?: string;

import type { RecommendationsHit } from './recommendationsHit';
export type RecommendationsHits = {
hits: RecommendationsHit[];
/**
* Search query.
*/
query?: string;
/**
* URL-encoded string of all search parameters.
*/
params?: string;
};
//# sourceMappingURL=recommendationsHits.d.ts.map

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

import type { RecommendationsQuery } from './recommendationsQuery';
import type { BoughtTogetherQuery } from './boughtTogetherQuery';
import type { LookingSimilarQuery } from './lookingSimilarQuery';
import type { RecommendedForYouQuery } from './recommendedForYouQuery';
import type { RelatedQuery } from './relatedQuery';
import type { TrendingFacetsQuery } from './trendingFacetsQuery';
import type { TrendingItemsQuery } from './trendingItemsQuery';
export type RecommendationsRequest = RecommendationsQuery | RecommendedForYouQuery | TrendingFacetsQuery | TrendingItemsQuery;
export type RecommendationsRequest = BoughtTogetherQuery | LookingSimilarQuery | RecommendedForYouQuery | RelatedQuery | TrendingFacetsQuery | TrendingItemsQuery;
//# sourceMappingURL=recommendationsRequest.d.ts.map
/**
* Recommended for you model.
* \"Recommened for you\" model.
*/
export type RecommendedForYouModel = 'recommended-for-you';
//# sourceMappingURL=recommendedForYouModel.d.ts.map
import type { BaseRecommendRequest } from './baseRecommendRequest';
import type { BaseRecommendedForYouQuery } from './baseRecommendedForYouQuery';
export type RecommendedForYouQuery = BaseRecommendedForYouQuery & BaseRecommendRequest;
import type { RecommendedForYou } from './recommendedForYou';
export type RecommendedForYouQuery = BaseRecommendRequest & RecommendedForYou;
//# sourceMappingURL=recommendedForYouQuery.d.ts.map
/**
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. <dl> <dt><code>none</code></dt> <dd>No words are removed when a query doesn\'t return results.</dd> <dt><code>lastWords</code></dt> <dd>Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>firstWords</code></dt> <dd>Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>allOptional</code></dt> <dd>Treat all words as optional.</dd> </dl> For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
*/
export type RemoveWordsIfNoResults = 'allOptional' | 'firstWords' | 'lastWords' | 'none';
//# sourceMappingURL=removeWordsIfNoResults.d.ts.map
/**
* Recommend rules search parameters.
* Recommend rules parameters.
*/

@@ -10,3 +10,3 @@ export type SearchRecommendRulesParams = {

/**
* Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules).
* Only search for rules with matching context.
*/

@@ -23,6 +23,18 @@ context?: string;

/**
* Restricts responses to enabled rules. When absent (default), _all_ rules are retrieved.
* Whether to only show rules where the value of their `enabled` property matches this parameter. If absent, show all rules, regardless of their `enabled` property.
*/
enabled?: boolean | null;
enabled?: boolean;
/**
* Filter expression. This only searches for rules matching the filter expression.
*/
filters?: string;
/**
* Include facets and facet values in the response. Use `[\'*\']` to include all facets.
*/
facets?: string[];
/**
* Maximum number of values to return for each facet.
*/
maxValuesPerFacet?: number;
};
//# sourceMappingURL=searchRecommendRulesParams.d.ts.map

@@ -1,7 +0,7 @@

import type { RuleResponse } from './ruleResponse';
import type { RecommendRule } from './recommendRule';
export type SearchRecommendRulesResponse = {
/**
* Fetched rules.
* Recommend rules that match the search criteria.
*/
hits: RuleResponse[];
hits: RecommendRule[];
/**

@@ -8,0 +8,0 @@ * Number of results (hits).

/**
* Order of facet values that aren\'t explicitly positioned with the `order` setting. <dl> <dt><code>count</code></dt> <dd> Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Sort facet values alphabetically.</dd> <dt><code>hidden</code></dt> <dd>Don\'t show facet values that aren\'t explicitly positioned.</dd> </dl>.
* Order of facet values that aren\'t explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don\'t show facet values that aren\'t explicitly positioned.
*/
export type SortRemainingBy = 'alpha' | 'count' | 'hidden';
//# sourceMappingURL=sortRemainingBy.d.ts.map

@@ -10,7 +10,7 @@ /**

/**
* Facet name for trending models.
* Facet attribute. To be used in combination with `facetValue`. If specified, only recommendations matching the facet filter will be returned.
*/
facetName: string;
/**
* Facet value for trending models.
* Facet value. To be used in combination with `facetName`. If specified, only recommendations matching the facet filter will be returned.
*/

@@ -17,0 +17,0 @@ facetValue: string;

/**
* Trending facets model.
* Trending facet values model. This model recommends trending facet values for the specified facet attribute.
*/
export type TrendingFacetsModel = 'trending-facets';
//# sourceMappingURL=trendingFacetsModel.d.ts.map
import type { BaseRecommendRequest } from './baseRecommendRequest';
import type { BaseTrendingFacetsQuery } from './baseTrendingFacetsQuery';
export type TrendingFacetsQuery = BaseRecommendRequest & BaseTrendingFacetsQuery;
import type { TrendingFacets } from './trendingFacets';
export type TrendingFacetsQuery = BaseRecommendRequest & TrendingFacets;
//# sourceMappingURL=trendingFacetsQuery.d.ts.map
/**
* Trending items model.
* Trending items model. Trending items are determined from the number of conversion events collected on them.
*/
export type TrendingItemsModel = 'trending-items';
//# sourceMappingURL=trendingItemsModel.d.ts.map
import type { BaseRecommendRequest } from './baseRecommendRequest';
import type { BaseTrendingItemsQuery } from './baseTrendingItemsQuery';
export type TrendingItemsQuery = BaseRecommendRequest & BaseTrendingItemsQuery;
import type { TrendingItems } from './trendingItems';
export type TrendingItemsQuery = BaseRecommendRequest & TrendingItems;
//# sourceMappingURL=trendingItemsQuery.d.ts.map

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

// 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.
const apiClientVersion = '5.0.0-alpha.110';
const apiClientVersion = '5.0.0-alpha.111';
function getDefaultHosts(appId) {

@@ -880,3 +880,3 @@ return [

/**
* Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
* Deletes a Recommend rule from a recommendation scenario.
*

@@ -888,3 +888,3 @@ * Required API Key ACLs:

* @param deleteRecommendRule.indexName - Name of the index on which to perform the operation.
* @param deleteRecommendRule.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param deleteRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param deleteRecommendRule.objectID - Unique record identifier.

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

/**
* Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
* Retrieves a Recommend rule that you previously created in the Algolia dashboard.
*

@@ -926,3 +926,3 @@ * Required API Key ACLs:

* @param getRecommendRule.indexName - Name of the index on which to perform the operation.
* @param getRecommendRule.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param getRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param getRecommendRule.objectID - Unique record identifier.

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

/**
* Some operations, such as deleting a Recommend rule, will respond with a `taskID` value. Use this value here to check the status of that task.
* Checks the status of a given task. Deleting a Recommend rule is asynchronous. When you delete a rule, a task is created on a queue and completed depending on the load on the server. The API response includes a task ID that you can use to check the status.
*

@@ -964,4 +964,4 @@ * Required API Key ACLs:

* @param getRecommendStatus.indexName - Name of the index on which to perform the operation.
* @param getRecommendStatus.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param getRecommendStatus.taskID - Unique identifier of a task. Numeric value (up to 64bits).
* @param getRecommendStatus.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param getRecommendStatus.taskID - Unique task identifier.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -994,3 +994,3 @@ */

/**
* Returns results from either recommendation or trending models: - **Recommendations** are provided by the [Related Products](https://www.algolia.com/doc/guides/algolia-recommend/overview/#related-products-and-related-content) and [Frequently Bought Together](https://www.algolia.com/doc/guides/algolia-recommend/overview/#frequently-bought-together) models - **Trending** models are [Trending Items and Trending Facet Values](https://www.algolia.com/doc/guides/algolia-recommend/overview/#trending-items-and-trending-facet-values).
* Retrieves recommendations from selected AI models.
*

@@ -1025,3 +1025,3 @@ * Required API Key ACLs:

/**
* List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
* Searches for Recommend rules. Use an empty query to list all rules for this recommendation scenario.
*

@@ -1033,3 +1033,3 @@ * Required API Key ACLs:

* @param searchRecommendRules.indexName - Name of the index on which to perform the operation.
* @param searchRecommendRules.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param searchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.

@@ -1036,0 +1036,0 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -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';

// 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.
const apiClientVersion = '5.0.0-alpha.110';
const apiClientVersion = '5.0.0-alpha.111';
function getDefaultHosts(appId) {

@@ -185,3 +185,3 @@ return [

/**
* Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
* Deletes a Recommend rule from a recommendation scenario.
*

@@ -193,3 +193,3 @@ * Required API Key ACLs:

* @param deleteRecommendRule.indexName - Name of the index on which to perform the operation.
* @param deleteRecommendRule.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param deleteRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param deleteRecommendRule.objectID - Unique record identifier.

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

/**
* Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
* Retrieves a Recommend rule that you previously created in the Algolia dashboard.
*

@@ -231,3 +231,3 @@ * Required API Key ACLs:

* @param getRecommendRule.indexName - Name of the index on which to perform the operation.
* @param getRecommendRule.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param getRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param getRecommendRule.objectID - Unique record identifier.

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

/**
* Some operations, such as deleting a Recommend rule, will respond with a `taskID` value. Use this value here to check the status of that task.
* Checks the status of a given task. Deleting a Recommend rule is asynchronous. When you delete a rule, a task is created on a queue and completed depending on the load on the server. The API response includes a task ID that you can use to check the status.
*

@@ -269,4 +269,4 @@ * Required API Key ACLs:

* @param getRecommendStatus.indexName - Name of the index on which to perform the operation.
* @param getRecommendStatus.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param getRecommendStatus.taskID - Unique identifier of a task. Numeric value (up to 64bits).
* @param getRecommendStatus.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param getRecommendStatus.taskID - Unique task identifier.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -299,3 +299,3 @@ */

/**
* Returns results from either recommendation or trending models: - **Recommendations** are provided by the [Related Products](https://www.algolia.com/doc/guides/algolia-recommend/overview/#related-products-and-related-content) and [Frequently Bought Together](https://www.algolia.com/doc/guides/algolia-recommend/overview/#frequently-bought-together) models - **Trending** models are [Trending Items and Trending Facet Values](https://www.algolia.com/doc/guides/algolia-recommend/overview/#trending-items-and-trending-facet-values).
* Retrieves recommendations from selected AI models.
*

@@ -330,3 +330,3 @@ * Required API Key ACLs:

/**
* List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
* Searches for Recommend rules. Use an empty query to list all rules for this recommendation scenario.
*

@@ -338,3 +338,3 @@ * Required API Key ACLs:

* @param searchRecommendRules.indexName - Name of the index on which to perform the operation.
* @param searchRecommendRules.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param searchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.

@@ -341,0 +341,0 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

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

/*! recommend.umd.js | 5.0.0-alpha.110 | © 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){let t;const r=`algolia-client-js-${e.key}`;function a(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function o(){return JSON.parse(a().getItem(r)||"{}")}function s(e){a().setItem(r,JSON.stringify(e))}return{get:(t,r,a={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),a=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(s(a),!t)return;s(Object.fromEntries(Object.entries(a).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),o()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||a.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=o();return s[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},a().setItem(r,JSON.stringify(s)),t})),delete:e=>Promise.resolve().then((()=>{const t=o();delete t[JSON.stringify(e)],a().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(r)}))}}function r(e){const t=[...e.caches],a=t.shift();return void 0===a?{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,o,s={miss:()=>Promise.resolve()})=>a.get(e,o,s).catch((()=>r({caches:t}).get(e,o,s))),set:(e,o)=>a.set(e,o).catch((()=>r({caches:t}).set(e,o))),delete:e=>a.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>a.clear().catch((()=>r({caches:t}).clear()))}}function a(e={serializable:!0}){let t={};return{get(r,a,o={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const n=a();return n.then((e=>o.miss(e))).then((()=>n))},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 o=12e4;function s(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>o},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=o}}}function n(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function i(e,t,r){return(t=n(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 l extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class u extends l{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please create a ticket at https://support.algolia.com/ sharing steps we can use to reproduce the issue.",e,"RetryError")}}class m extends l{constructor(e,t,r,a="ApiError"){super(e,r,a),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}}class h extends m{constructor(e,t,r,a){super(e,t,a,"DetailedApiError"),i(this,"error",void 0),this.error=r}}function p(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}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r]).replaceAll("+","%20")}`)).join("&")}(r);let o=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return a.length&&(o+=`?${a}`),o}function g(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:a,algoliaAgent:o,timeouts:n,requester:i,requestsCache:c,responsesCache:l}){async function f(c,l,f=!0){const w=[],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,l),P=function(e,t,r){const a={Accept:"application/json",...e,...t,...r},o={};return Object.keys(a).forEach((e=>{const t=a[e];o[e.toLowerCase()]=t})),o}(r,c.headers,l.headers),q="GET"===c.method?{...c.data,...l.data}:{},b={...a,...c.queryParameters,...q};if(o.value&&(b["x-algolia-agent"]=o.value),l&&l.queryParameters)for(const e of Object.keys(l.queryParameters))l.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(l.queryParameters[e])?b[e]=l.queryParameters[e].toString():b[e]=l.queryParameters[e];let v=0;const R=async(e,r)=>{const a=e.pop();if(void 0===a)throw new u(function(e){return e.map((e=>g(e)))}(w));let o=l.timeout;void 0===o&&(o=f?n.read:n.write);const q={data:y,headers:P,method:c.method,url:p(a,c.path,b),connectTimeout:r(v,n.connect),responseTimeout:r(v,o)},T=t=>{const r={request:q,response:t,host:a,triesLeft:e.length};return w.push(r),r},O=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(O)){const o=T(O);return O.isTimedOut&&v++,console.log("Retryable failure",g(o)),await t.set(a,s(a,O.isTimedOut?"timed out":"down")),R(e,r)}if(function({status:e}){return 2==~~(e/100)}(O))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(O);throw T(O),function({content:e,status:t},r){try{const a=JSON.parse(e);return"error"in a?new h(a.message,t,a.error,r):new m(a.message,t,r)}catch(e){}return new m(e,t,r)}(O,w)},T=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),O=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(s(e))))))),a=r.filter((e=>e.isUp())),o=r.filter((e=>e.isTimedOut())),n=[...a,...o];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===o.length&&0===e?1:o.length+3+e)*t}}(T);return R([...O.hosts].reverse(),O.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:o,baseHeaders:r,baseQueryParameters:a,hosts:e,request:function(e,t={}){const o=e.useReadTransporter||"GET"===e.method;if(!o)return f(e,t,o);const s=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return s();const n={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return l.get(n,(()=>c.get(n,(()=>c.set(n,s()).then((e=>Promise.all([c.delete(n),e])),(e=>Promise.all([c.delete(n),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>l.set(n,e)})},requestsCache:c,responsesCache:l}}function w({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}const y="5.0.0-alpha.110";function P(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${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)),o=e[r];t[r]=e[a],t[a]=o}return t}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}e.apiClientVersion=y,e.recommendClient=function(e,o,s){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!o||"string"!=typeof o)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:a,...o}){const s=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:{}}}(e,t,r),n=f({hosts:P(e),...o,algoliaAgent:w({algoliaAgents:a,client:"Recommend",version:y}),baseHeaders:{"content-type":"text/plain",...s.headers(),...o.baseHeaders},baseQueryParameters:{...s.queryParameters(),...o.baseQueryParameters}});return{transporter:n,appId:e,clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{})),get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,t){n.algoliaAgent.add({segment:e,version:t})},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const a={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(a,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const a={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(a,r)},customPost({path:e,parameters:t,body:r},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const o={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,a)},customPut({path:e,parameters:t,body:r},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const o={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,a)},deleteRecommendRule({indexName:e,model:t,objectID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRecommendRule`.");if(!t)throw new Error("Parameter `model` is required when calling `deleteRecommendRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRecommendRule`.");const o={method:"DELETE",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(o,a)},getRecommendRule({indexName:e,model:t,objectID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendRule`.");if(!t)throw new Error("Parameter `model` is required when calling `getRecommendRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getRecommendRule`.");const o={method:"GET",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(o,a)},getRecommendStatus({indexName:e,model:t,taskID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendStatus`.");if(!t)throw new Error("Parameter `model` is required when calling `getRecommendStatus`.");if(!r)throw new Error("Parameter `taskID` is required when calling `getRecommendStatus`.");const o={method:"GET",path:"/1/indexes/{indexName}/{model}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(o,a)},getRecommendations(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`.");const r={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return n.request(r,t)},searchRecommendRules({indexName:e,model:t,searchRecommendRulesParams:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRecommendRules`.");if(!t)throw new Error("Parameter `model` is required when calling `searchRecommendRules`.");const o={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/search".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return n.request(o,a)}}}({appId:e,apiKey:o,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),o=a(e.connectTimeout,"Connection timeout");let s;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===s&&(clearTimeout(o),s=a(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(s),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(s),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:a(),requestsCache:a({serializable:!1}),hostsCache:r({caches:[t({key:`${y}-${e}`}),a()]}),...s})}}));
/*! recommend.umd.js | 5.0.0-alpha.111 | © 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){let t;const r=`algolia-client-js-${e.key}`;function a(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function o(){return JSON.parse(a().getItem(r)||"{}")}function s(e){a().setItem(r,JSON.stringify(e))}return{get:(t,r,a={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),a=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(s(a),!t)return;s(Object.fromEntries(Object.entries(a).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),o()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||a.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=o();return s[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},a().setItem(r,JSON.stringify(s)),t})),delete:e=>Promise.resolve().then((()=>{const t=o();delete t[JSON.stringify(e)],a().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(r)}))}}function r(e){const t=[...e.caches],a=t.shift();return void 0===a?{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,o,s={miss:()=>Promise.resolve()})=>a.get(e,o,s).catch((()=>r({caches:t}).get(e,o,s))),set:(e,o)=>a.set(e,o).catch((()=>r({caches:t}).set(e,o))),delete:e=>a.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>a.clear().catch((()=>r({caches:t}).clear()))}}function a(e={serializable:!0}){let t={};return{get(r,a,o={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const n=a();return n.then((e=>o.miss(e))).then((()=>n))},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 o=12e4;function s(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>o},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=o}}}function n(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function i(e,t,r){return(t=n(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 l extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class u extends l{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please create a ticket at https://support.algolia.com/ sharing steps we can use to reproduce the issue.",e,"RetryError")}}class m extends l{constructor(e,t,r,a="ApiError"){super(e,r,a),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}}class h extends m{constructor(e,t,r,a){super(e,t,a,"DetailedApiError"),i(this,"error",void 0),this.error=r}}function p(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}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r]).replaceAll("+","%20")}`)).join("&")}(r);let o=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return a.length&&(o+=`?${a}`),o}function g(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:a,algoliaAgent:o,timeouts:n,requester:i,requestsCache:c,responsesCache:l}){async function f(c,l,f=!0){const w=[],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,l),P=function(e,t,r){const a={Accept:"application/json",...e,...t,...r},o={};return Object.keys(a).forEach((e=>{const t=a[e];o[e.toLowerCase()]=t})),o}(r,c.headers,l.headers),q="GET"===c.method?{...c.data,...l.data}:{},b={...a,...c.queryParameters,...q};if(o.value&&(b["x-algolia-agent"]=o.value),l&&l.queryParameters)for(const e of Object.keys(l.queryParameters))l.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(l.queryParameters[e])?b[e]=l.queryParameters[e].toString():b[e]=l.queryParameters[e];let v=0;const R=async(e,r)=>{const a=e.pop();if(void 0===a)throw new u(function(e){return e.map((e=>g(e)))}(w));let o=l.timeout;void 0===o&&(o=f?n.read:n.write);const q={data:y,headers:P,method:c.method,url:p(a,c.path,b),connectTimeout:r(v,n.connect),responseTimeout:r(v,o)},T=t=>{const r={request:q,response:t,host:a,triesLeft:e.length};return w.push(r),r},O=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(O)){const o=T(O);return O.isTimedOut&&v++,console.log("Retryable failure",g(o)),await t.set(a,s(a,O.isTimedOut?"timed out":"down")),R(e,r)}if(function({status:e}){return 2==~~(e/100)}(O))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(O);throw T(O),function({content:e,status:t},r){try{const a=JSON.parse(e);return"error"in a?new h(a.message,t,a.error,r):new m(a.message,t,r)}catch(e){}return new m(e,t,r)}(O,w)},T=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),O=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(s(e))))))),a=r.filter((e=>e.isUp())),o=r.filter((e=>e.isTimedOut())),n=[...a,...o];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===o.length&&0===e?1:o.length+3+e)*t}}(T);return R([...O.hosts].reverse(),O.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:o,baseHeaders:r,baseQueryParameters:a,hosts:e,request:function(e,t={}){const o=e.useReadTransporter||"GET"===e.method;if(!o)return f(e,t,o);const s=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return s();const n={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return l.get(n,(()=>c.get(n,(()=>c.set(n,s()).then((e=>Promise.all([c.delete(n),e])),(e=>Promise.all([c.delete(n),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>l.set(n,e)})},requestsCache:c,responsesCache:l}}function w({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}const y="5.0.0-alpha.111";function P(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${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)),o=e[r];t[r]=e[a],t[a]=o}return t}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}e.apiClientVersion=y,e.recommendClient=function(e,o,s){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!o||"string"!=typeof o)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:a,...o}){const s=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:{}}}(e,t,r),n=f({hosts:P(e),...o,algoliaAgent:w({algoliaAgents:a,client:"Recommend",version:y}),baseHeaders:{"content-type":"text/plain",...s.headers(),...o.baseHeaders},baseQueryParameters:{...s.queryParameters(),...o.baseQueryParameters}});return{transporter:n,appId:e,clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{})),get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,t){n.algoliaAgent.add({segment:e,version:t})},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const a={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(a,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const a={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(a,r)},customPost({path:e,parameters:t,body:r},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const o={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,a)},customPut({path:e,parameters:t,body:r},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const o={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,a)},deleteRecommendRule({indexName:e,model:t,objectID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRecommendRule`.");if(!t)throw new Error("Parameter `model` is required when calling `deleteRecommendRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRecommendRule`.");const o={method:"DELETE",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(o,a)},getRecommendRule({indexName:e,model:t,objectID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendRule`.");if(!t)throw new Error("Parameter `model` is required when calling `getRecommendRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getRecommendRule`.");const o={method:"GET",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(o,a)},getRecommendStatus({indexName:e,model:t,taskID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendStatus`.");if(!t)throw new Error("Parameter `model` is required when calling `getRecommendStatus`.");if(!r)throw new Error("Parameter `taskID` is required when calling `getRecommendStatus`.");const o={method:"GET",path:"/1/indexes/{indexName}/{model}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(o,a)},getRecommendations(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`.");const r={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return n.request(r,t)},searchRecommendRules({indexName:e,model:t,searchRecommendRulesParams:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRecommendRules`.");if(!t)throw new Error("Parameter `model` is required when calling `searchRecommendRules`.");const o={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/search".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return n.request(o,a)}}}({appId:e,apiKey:o,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),o=a(e.connectTimeout,"Connection timeout");let s;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===s&&(clearTimeout(o),s=a(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(s),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(s),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:a(),requestsCache:a({serializable:!1}),hostsCache:r({caches:[t({key:`${y}-${e}`}),a()]}),...s})}}));

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

import type { GetRecommendationsResponse } from '../model/getRecommendationsResponse';
import type { RuleResponse } from '../model/ruleResponse';
import type { RecommendRule } from '../model/recommendRule';
import type { SearchRecommendRulesResponse } from '../model/searchRecommendRulesResponse';
export declare const apiClientVersion = "5.0.0-alpha.110";
export declare const apiClientVersion = "5.0.0-alpha.111";
export declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {

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

/**
* Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
* Deletes a Recommend rule from a recommendation scenario.
*

@@ -79,3 +79,3 @@ * Required API Key ACLs:

* @param deleteRecommendRule.indexName - Name of the index on which to perform the operation.
* @param deleteRecommendRule.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param deleteRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param deleteRecommendRule.objectID - Unique record identifier.

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

/**
* Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
* Retrieves a Recommend rule that you previously created in the Algolia dashboard.
*

@@ -94,9 +94,9 @@ * Required API Key ACLs:

* @param getRecommendRule.indexName - Name of the index on which to perform the operation.
* @param getRecommendRule.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param getRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param getRecommendRule.objectID - Unique record identifier.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
getRecommendRule({ indexName, model, objectID }: GetRecommendRuleProps, requestOptions?: RequestOptions): Promise<RuleResponse>;
getRecommendRule({ indexName, model, objectID }: GetRecommendRuleProps, requestOptions?: RequestOptions): Promise<RecommendRule>;
/**
* Some operations, such as deleting a Recommend rule, will respond with a `taskID` value. Use this value here to check the status of that task.
* Checks the status of a given task. Deleting a Recommend rule is asynchronous. When you delete a rule, a task is created on a queue and completed depending on the load on the server. The API response includes a task ID that you can use to check the status.
*

@@ -108,4 +108,4 @@ * Required API Key ACLs:

* @param getRecommendStatus.indexName - Name of the index on which to perform the operation.
* @param getRecommendStatus.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param getRecommendStatus.taskID - Unique identifier of a task. Numeric value (up to 64bits).
* @param getRecommendStatus.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param getRecommendStatus.taskID - Unique task identifier.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -115,3 +115,3 @@ */

/**
* Returns results from either recommendation or trending models: - **Recommendations** are provided by the [Related Products](https://www.algolia.com/doc/guides/algolia-recommend/overview/#related-products-and-related-content) and [Frequently Bought Together](https://www.algolia.com/doc/guides/algolia-recommend/overview/#frequently-bought-together) models - **Trending** models are [Trending Items and Trending Facet Values](https://www.algolia.com/doc/guides/algolia-recommend/overview/#trending-items-and-trending-facet-values).
* Retrieves recommendations from selected AI models.
*

@@ -126,3 +126,3 @@ * Required API Key ACLs:

/**
* List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
* Searches for Recommend rules. Use an empty query to list all rules for this recommendation scenario.
*

@@ -134,3 +134,3 @@ * Required API Key ACLs:

* @param searchRecommendRules.indexName - Name of the index on which to perform the operation.
* @param searchRecommendRules.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param searchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.

@@ -137,0 +137,0 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

// 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 { SearchParams } from './searchParams';
export type BaseRecommendRequest = {

@@ -10,10 +12,12 @@ /**

/**
* Recommendations with a confidence score lower than `threshold` won\'t appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are.
* Minimum score a recommendation must have to be included in the response.
*/
threshold?: number;
threshold: number;
/**
* Maximum number of recommendations to retrieve. If 0, all recommendations will be returned.
* Maximum number of recommendations to retrieve. By default, all recommendations are returned and no fallback request is made. Depending on the available recommendations and the other request parameters, the actual number of recommendations may be lower than this value.
*/
maxRecommendations?: number;
queryParameters?: SearchParams;
};

@@ -17,3 +17,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.

/**
* Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
*/

@@ -20,0 +20,0 @@ filters?: string;

@@ -79,3 +79,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.

/**
* [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
*/

@@ -98,3 +98,3 @@ model: RecommendModels;

/**
* [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
*/

@@ -117,7 +117,7 @@ model: RecommendModels;

/**
* [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
*/
model: RecommendModels;
/**
* Unique identifier of a task. Numeric value (up to 64bits).
* Unique task identifier.
*/

@@ -136,3 +136,3 @@ taskID: number;

/**
* [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
* [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
*/

@@ -139,0 +139,0 @@ model: RecommendModels;

// 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 { Anchoring } from './anchoring';
/**
* Condition that triggers the rule. If not specified, the rule is triggered for all recommendations.
*/
export type Condition = {
/**
* Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\".
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
*/
pattern?: string;
filters?: string;
anchoring?: Anchoring;
/**
* Whether the pattern should match plurals, synonyms, and typos.
*/
alternatives?: boolean;
/**
* An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters.
*/
context?: string;
/**
* Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter.
*/
filters?: string;
};
// 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 { ConsequenceHide } from './consequenceHide';
import type { ConsequenceParams } from './consequenceParams';
import type { Promote } from './promote';
import type { HideConsequenceObject } from './hideConsequenceObject';
import type { ParamsConsequence } from './paramsConsequence';
import type { PromoteConsequenceObject } from './promoteConsequenceObject';
/**
* Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences).
* Effect of the rule.
*/
export type Consequence = {
params?: ConsequenceParams;
/**
* Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each.
* Exclude items from recommendations.
*/
promote?: Promote[];
hide?: HideConsequenceObject[];
/**
* Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won\'t be shown.
* Place items at specific positions in the list of recommendations.
*/
filterPromotes?: boolean;
promote?: PromoteConsequenceObject[];
/**
* Records you want to hide from the search results.
*/
hide?: ConsequenceHide[];
/**
* A JSON object with custom data that will be appended to the `userData` array in the response. This object isn\'t interpreted by the API and is limited to 1&nbsp;kB of minified JSON.
*/
userData?: any | null;
params?: ParamsConsequence;
};

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

/**
* Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was deleted, in RFC 3339 format.
*/
deletedAt: string;
};
// 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.
/**
* Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word. <dl> <dt><code>attribute</code></dt> <dd> The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\". </dd> <dt><code>none</code></dt> <dd> The Exact ranking criterion is ignored on single-word searches. </dd> <dt><code>word</code></dt> <dd> The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word. </dd> </dl> If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won\'t.
* Determines how the [Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes) is computed when the search query has only one word. - `attribute`. The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\". - `none`. The Exact ranking criterion is ignored on single-word searches. - `word`. The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word. Only exact matches will be highlighted, partial and prefix matches won\'t.
*/
export type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word';

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

/**
* Recommend parameters.
* Recommend request body.
*/
export type GetRecommendationsParams = {
/**
* Request parameters depend on the model (recommendations or trending).
* Recommendation request with parameters depending on the requested model.
*/
requests: RecommendationsRequest[];
};

@@ -5,3 +5,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 * from './alternativesAsExact';
export * from './anchoring';
export * from './aroundPrecision';

@@ -11,23 +10,12 @@ export * from './aroundPrecisionFromValueInner';

export * from './aroundRadiusAll';
export * from './automaticFacetFilter';
export * from './automaticFacetFilters';
export * from './autoFacetFilter';
export * from './baseRecommendRequest';
export * from './baseRecommendationsQuery';
export * from './baseRecommendedForYouQuery';
export * from './baseRecommendedForYouQueryParameters';
export * from './baseSearchParams';
export * from './baseSearchParamsWithoutQuery';
export * from './baseSearchResponse';
export * from './baseTrendingFacetsQuery';
export * from './baseTrendingItemsQuery';
export * from './boughtTogetherQuery';
export * from './condition';
export * from './consequence';
export * from './consequenceHide';
export * from './consequenceParams';
export * from './consequenceQuery';
export * from './consequenceQueryObject';
export * from './deletedAtResponse';
export * from './distinct';
export * from './edit';
export * from './editType';
export * from './errorBase';

@@ -40,5 +28,9 @@ export * from './exactOnSingleWordQuery';

export * from './facetsStats';
export * from './fallbackParams';
export * from './fbtModel';
export * from './frequentlyBoughtTogether';
export * from './getRecommendTaskResponse';
export * from './getRecommendationsParams';
export * from './getRecommendationsResponse';
export * from './hideConsequenceObject';
export * from './highlightResult';

@@ -48,2 +40,5 @@ export * from './highlightResultOption';

export * from './indexSettingsAsSearchParams';
export * from './lookingSimilar';
export * from './lookingSimilarModel';
export * from './lookingSimilarQuery';
export * from './matchLevel';

@@ -55,7 +50,5 @@ export * from './matchedGeoLocation';

export * from './optionalFilters';
export * from './params';
export * from './paramsConsequence';
export * from './personalization';
export * from './promote';
export * from './promoteObjectID';
export * from './promoteObjectIDs';
export * from './promoteConsequenceObject';
export * from './queryType';

@@ -66,19 +59,21 @@ export * from './rankingInfo';

export * from './recommendModels';
export * from './recommendationModels';
export * from './recommendRule';
export * from './recommendRuleMetadata';
export * from './recommendationsHit';
export * from './recommendationsHits';
export * from './recommendationsQuery';
export * from './recommendationsRequest';
export * from './recommendationsResults';
export * from './recommendedForYou';
export * from './recommendedForYouModel';
export * from './recommendedForYouQuery';
export * from './recommendedForYouQueryParameters';
export * from './redirect';
export * from './redirectRuleIndexMetadata';
export * from './redirectRuleIndexMetadataData';
export * from './relatedModel';
export * from './relatedProducts';
export * from './relatedQuery';
export * from './removeStopWords';
export * from './removeWordsIfNoResults';
export * from './renderingContent';
export * from './ruleResponse';
export * from './ruleResponseMetadata';
export * from './searchParams';
export * from './searchParamsObject';

@@ -96,4 +91,6 @@ export * from './searchParamsQuery';

export * from './trendingFacetHit';
export * from './trendingFacets';
export * from './trendingFacetsModel';
export * from './trendingFacetsQuery';
export * from './trendingItems';
export * from './trendingItemsModel';

@@ -100,0 +97,0 @@ export * from './trendingItemsQuery';

@@ -25,3 +25,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.

/**
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
*/

@@ -31,3 +31,3 @@ ranking?: string[];

/**
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
*/

@@ -153,3 +153,3 @@ customRanking?: string[];

/**
* Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. <dl> <dt><code>ignorePlurals</code></dt> <dd> Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. </dd> <dt><code>singleWordSynonym</code></dt> <dd> Single-word synonyms, such as \"NY/NYC\" are considered exact matches. </dd> <dt><code>multiWordsSynonym</code></dt> <dd> Multi-word synonyms, such as \"NY/New York\" are considered exact matches. </dd> </dl>.
* Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
*/

@@ -159,3 +159,3 @@ alternativesAsExact?: AlternativesAsExact[];

/**
* Advanced search syntax features you want to support. <dl> <dt><code>exactPhrase</code></dt> <dd> Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". </dd> <dt><code>excludeWords</code></dt> <dd> Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". </dd> </dl> This setting only has an effect if `advancedSyntax` is true.
* Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
*/

@@ -192,3 +192,3 @@ advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];

/**
* Order in which to retrieve facet values. <dl> <dt><code>count</code></dt> <dd> Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Retrieve facet values alphabetically.</dd> </dl> This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
* Order in which to retrieve facet values. - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Retrieve facet values alphabetically. This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
*/

@@ -195,0 +195,0 @@ sortFacetValuesBy?: string;

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

hits: RecommendationsHit[];
/**
* Search query.
*/
query?: string;
/**
* URL-encoded string of all search parameters.
*/
params?: string;
};
// 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 { RecommendationsQuery } from './recommendationsQuery';
import type { BoughtTogetherQuery } from './boughtTogetherQuery';
import type { LookingSimilarQuery } from './lookingSimilarQuery';
import type { RecommendedForYouQuery } from './recommendedForYouQuery';
import type { RelatedQuery } from './relatedQuery';
import type { TrendingFacetsQuery } from './trendingFacetsQuery';

@@ -9,5 +11,7 @@ import type { TrendingItemsQuery } from './trendingItemsQuery';

export type RecommendationsRequest =
| RecommendationsQuery
| BoughtTogetherQuery
| LookingSimilarQuery
| RecommendedForYouQuery
| RelatedQuery
| TrendingFacetsQuery
| TrendingItemsQuery;
// 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.
/**
* Recommended for you model.
* \"Recommened for you\" model.
*/
export type RecommendedForYouModel = 'recommended-for-you';
// 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 { BaseRecommendRequest } from './baseRecommendRequest';
import type { BaseRecommendedForYouQuery } from './baseRecommendedForYouQuery';
import type { RecommendedForYou } from './recommendedForYou';
export type RecommendedForYouQuery = BaseRecommendedForYouQuery &
BaseRecommendRequest;
export type RecommendedForYouQuery = BaseRecommendRequest & RecommendedForYou;
// 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.
/**
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. <dl> <dt><code>none</code></dt> <dd>No words are removed when a query doesn\'t return results.</dd> <dt><code>lastWords</code></dt> <dd>Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>firstWords</code></dt> <dd>Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>allOptional</code></dt> <dd>Treat all words as optional.</dd> </dl> For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
*/

@@ -6,0 +6,0 @@ export type RemoveWordsIfNoResults =

// 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.
/**
* Recommend rules search parameters.
* Recommend rules parameters.
*/

@@ -13,3 +13,3 @@ export type SearchRecommendRulesParams = {

/**
* Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules).
* Only search for rules with matching context.
*/

@@ -29,5 +29,20 @@ context?: string;

/**
* Restricts responses to enabled rules. When absent (default), _all_ rules are retrieved.
* Whether to only show rules where the value of their `enabled` property matches this parameter. If absent, show all rules, regardless of their `enabled` property.
*/
enabled?: boolean | null;
enabled?: boolean;
/**
* Filter expression. This only searches for rules matching the filter expression.
*/
filters?: string;
/**
* Include facets and facet values in the response. Use `[\'*\']` to include all facets.
*/
facets?: string[];
/**
* Maximum number of values to return for each facet.
*/
maxValuesPerFacet?: number;
};
// 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 { RuleResponse } from './ruleResponse';
import type { RecommendRule } from './recommendRule';
export type SearchRecommendRulesResponse = {
/**
* Fetched rules.
* Recommend rules that match the search criteria.
*/
hits: RuleResponse[];
hits: RecommendRule[];

@@ -11,0 +11,0 @@ /**

// 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.
/**
* Order of facet values that aren\'t explicitly positioned with the `order` setting. <dl> <dt><code>count</code></dt> <dd> Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Sort facet values alphabetically.</dd> <dt><code>hidden</code></dt> <dd>Don\'t show facet values that aren\'t explicitly positioned.</dd> </dl>.
* Order of facet values that aren\'t explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don\'t show facet values that aren\'t explicitly positioned.
*/
export type SortRemainingBy = 'alpha' | 'count' | 'hidden';

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

/**
* Facet name for trending models.
* Facet attribute. To be used in combination with `facetValue`. If specified, only recommendations matching the facet filter will be returned.
*/

@@ -19,5 +19,5 @@ facetName: string;

/**
* Facet value for trending models.
* Facet value. To be used in combination with `facetName`. If specified, only recommendations matching the facet filter will be returned.
*/
facetValue: string;
};
// 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.
/**
* Trending facets model.
* Trending facet values model. This model recommends trending facet values for the specified facet attribute.
*/
export type TrendingFacetsModel = 'trending-facets';
// 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 { BaseRecommendRequest } from './baseRecommendRequest';
import type { BaseTrendingFacetsQuery } from './baseTrendingFacetsQuery';
import type { TrendingFacets } from './trendingFacets';
export type TrendingFacetsQuery = BaseRecommendRequest &
BaseTrendingFacetsQuery;
export type TrendingFacetsQuery = BaseRecommendRequest & TrendingFacets;
// 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.
/**
* Trending items model.
* Trending items model. Trending items are determined from the number of conversion events collected on them.
*/
export type TrendingItemsModel = 'trending-items';
// 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 { BaseRecommendRequest } from './baseRecommendRequest';
import type { BaseTrendingItemsQuery } from './baseTrendingItemsQuery';
import type { TrendingItems } from './trendingItems';
export type TrendingItemsQuery = BaseRecommendRequest & BaseTrendingItemsQuery;
export type TrendingItemsQuery = BaseRecommendRequest & TrendingItems;
{
"name": "@algolia/recommend",
"version": "5.0.0-alpha.110",
"version": "5.0.0-alpha.111",
"description": "JavaScript client for recommend",

@@ -42,10 +42,10 @@ "repository": "algolia/algoliasearch-client-javascript",

"dependencies": {
"@algolia/client-common": "5.0.0-alpha.111",
"@algolia/requester-browser-xhr": "5.0.0-alpha.111",
"@algolia/requester-node-http": "5.0.0-alpha.111"
"@algolia/client-common": "5.0.0-alpha.112",
"@algolia/requester-browser-xhr": "5.0.0-alpha.112",
"@algolia/requester-node-http": "5.0.0-alpha.112"
},
"devDependencies": {
"@types/node": "20.11.30",
"rollup": "4.13.2",
"typescript": "5.4.3"
"@types/node": "20.12.5",
"rollup": "4.14.0",
"typescript": "5.4.4"
},

@@ -52,0 +52,0 @@ "engines": {

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