@algolia/recommend 5.0.0-alpha.99 → 5.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/builds/browser.d.ts +21 -3
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +21 -3
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/model/aroundPrecision.d.ts +1 -1
- package/dist/model/aroundPrecisionFromValueInner.d.ts +9 -0
- package/dist/model/aroundPrecisionFromValueInner.d.ts.map +1 -1
- package/dist/model/aroundRadius.d.ts +1 -1
- package/dist/model/aroundRadiusAll.d.ts +3 -0
- package/dist/model/aroundRadiusAll.d.ts.map +1 -1
- package/dist/model/autoFacetFilter.d.ts +14 -0
- package/dist/model/autoFacetFilter.d.ts.map +1 -0
- package/dist/model/baseRecommendRequest.d.ts +6 -4
- package/dist/model/baseRecommendRequest.d.ts.map +1 -1
- package/dist/model/baseSearchParamsWithoutQuery.d.ts +26 -29
- package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
- package/dist/model/baseSearchResponse.d.ts +8 -20
- package/dist/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/model/boughtTogetherQuery.d.ts +4 -0
- package/dist/model/boughtTogetherQuery.d.ts.map +1 -0
- package/dist/model/clientMethodProps.d.ts +18 -11
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/condition.d.ts +6 -9
- package/dist/model/condition.d.ts.map +1 -1
- package/dist/model/consequence.d.ts +9 -17
- package/dist/model/consequence.d.ts.map +1 -1
- package/dist/model/deletedAtResponse.d.ts +2 -2
- package/dist/model/distinct.d.ts +1 -1
- package/dist/model/exactOnSingleWordQuery.d.ts +1 -1
- package/dist/model/facetFilters.d.ts +2 -3
- package/dist/model/facetFilters.d.ts.map +1 -1
- package/dist/model/facetOrdering.d.ts +2 -2
- package/dist/model/facets.d.ts +2 -2
- package/dist/model/fallbackParams.d.ts +3 -0
- package/dist/model/fallbackParams.d.ts.map +1 -0
- package/dist/model/fbtModel.d.ts +5 -0
- package/dist/model/fbtModel.d.ts.map +1 -0
- package/dist/model/frequentlyBoughtTogether.d.ts +9 -0
- package/dist/model/frequentlyBoughtTogether.d.ts.map +1 -0
- package/dist/model/getRecommendationsParams.d.ts +2 -2
- package/dist/model/hideConsequenceObject.d.ts +10 -0
- package/dist/model/hideConsequenceObject.d.ts.map +1 -0
- package/dist/model/highlightResult.d.ts +1 -1
- package/dist/model/highlightResult.d.ts.map +1 -1
- package/dist/model/highlightResultOption.d.ts +3 -3
- package/dist/model/ignorePlurals.d.ts +3 -2
- package/dist/model/ignorePlurals.d.ts.map +1 -1
- package/dist/model/index.d.ts +23 -24
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/indexSettingsAsSearchParams.d.ts +32 -35
- package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/model/lookingSimilar.d.ts +11 -0
- package/dist/model/lookingSimilar.d.ts.map +1 -0
- package/dist/model/lookingSimilarModel.d.ts +5 -0
- package/dist/model/lookingSimilarModel.d.ts.map +1 -0
- package/dist/model/lookingSimilarQuery.d.ts +4 -0
- package/dist/model/lookingSimilarQuery.d.ts.map +1 -0
- package/dist/model/matchLevel.d.ts +1 -1
- package/dist/model/mode.d.ts +1 -1
- package/dist/model/numericFilters.d.ts +2 -3
- package/dist/model/numericFilters.d.ts.map +1 -1
- package/dist/model/optionalFilters.d.ts +2 -3
- package/dist/model/optionalFilters.d.ts.map +1 -1
- package/dist/model/paramsConsequence.d.ts +19 -0
- package/dist/model/paramsConsequence.d.ts.map +1 -0
- package/dist/model/promoteConsequenceObject.d.ts +14 -0
- package/dist/model/promoteConsequenceObject.d.ts.map +1 -0
- package/dist/model/queryType.d.ts +1 -1
- package/dist/model/rankingInfo.d.ts +13 -10
- package/dist/model/rankingInfo.d.ts.map +1 -1
- package/dist/model/reRankingApplyFilter.d.ts +2 -3
- package/dist/model/reRankingApplyFilter.d.ts.map +1 -1
- package/dist/model/recommendHit.d.ts +3 -3
- package/dist/model/recommendRule.d.ts +24 -0
- package/dist/model/recommendRule.d.ts.map +1 -0
- package/dist/model/recommendRuleMetadata.d.ts +10 -0
- package/dist/model/recommendRuleMetadata.d.ts.map +1 -0
- package/dist/model/recommendationsHits.d.ts +0 -8
- package/dist/model/recommendationsHits.d.ts.map +1 -1
- package/dist/model/recommendationsRequest.d.ts +4 -2
- package/dist/model/recommendationsRequest.d.ts.map +1 -1
- package/dist/model/recommendationsResults.d.ts +2 -1
- package/dist/model/recommendationsResults.d.ts.map +1 -1
- package/dist/model/recommendedForYou.d.ts +7 -0
- package/dist/model/recommendedForYou.d.ts.map +1 -0
- package/dist/model/recommendedForYouModel.d.ts +1 -1
- package/dist/model/recommendedForYouQuery.d.ts +2 -2
- package/dist/model/recommendedForYouQuery.d.ts.map +1 -1
- package/dist/model/redirect.d.ts +1 -1
- package/dist/model/redirectURL.d.ts +7 -0
- package/dist/model/redirectURL.d.ts.map +1 -0
- package/dist/model/relatedModel.d.ts +5 -0
- package/dist/model/relatedModel.d.ts.map +1 -0
- package/dist/model/relatedProducts.d.ts +11 -0
- package/dist/model/relatedProducts.d.ts.map +1 -0
- package/dist/model/relatedQuery.d.ts +4 -0
- package/dist/model/relatedQuery.d.ts.map +1 -0
- package/dist/model/removeStopWords.d.ts +3 -2
- package/dist/model/removeStopWords.d.ts.map +1 -1
- package/dist/model/removeWordsIfNoResults.d.ts +1 -1
- package/dist/model/renderingContent.d.ts +3 -1
- package/dist/model/renderingContent.d.ts.map +1 -1
- package/dist/model/searchPagination.d.ts +19 -0
- package/dist/model/searchPagination.d.ts.map +1 -0
- package/dist/model/searchParams.d.ts +3 -0
- package/dist/model/searchParams.d.ts.map +1 -0
- package/dist/model/searchParamsObject.d.ts +3 -0
- package/dist/model/searchParamsObject.d.ts.map +1 -1
- package/dist/model/searchParamsQuery.d.ts +1 -1
- package/dist/model/searchRecommendRulesParams.d.ts +18 -6
- package/dist/model/searchRecommendRulesParams.d.ts.map +1 -1
- package/dist/model/searchRecommendRulesResponse.d.ts +6 -6
- package/dist/model/searchRecommendRulesResponse.d.ts.map +1 -1
- package/dist/model/semanticSearch.d.ts +2 -2
- package/dist/model/snippetResult.d.ts +1 -1
- package/dist/model/snippetResult.d.ts.map +1 -1
- package/dist/model/snippetResultOption.d.ts +2 -2
- package/dist/model/sortRemainingBy.d.ts +1 -1
- package/dist/model/supportedLanguage.d.ts +5 -0
- package/dist/model/supportedLanguage.d.ts.map +1 -0
- package/dist/model/tagFilters.d.ts +2 -3
- package/dist/model/tagFilters.d.ts.map +1 -1
- package/dist/model/taskStatus.d.ts +1 -1
- package/dist/model/trendingFacetHit.d.ts +2 -2
- package/dist/model/trendingFacets.d.ts +11 -0
- package/dist/model/trendingFacets.d.ts.map +1 -0
- package/dist/model/trendingFacetsModel.d.ts +1 -1
- package/dist/model/trendingFacetsQuery.d.ts +2 -2
- package/dist/model/trendingFacetsQuery.d.ts.map +1 -1
- package/dist/model/trendingItems.d.ts +15 -0
- package/dist/model/trendingItems.d.ts.map +1 -0
- package/dist/model/trendingItemsModel.d.ts +1 -1
- package/dist/model/trendingItemsQuery.d.ts +2 -2
- package/dist/model/trendingItemsQuery.d.ts.map +1 -1
- package/dist/model/typoTolerance.d.ts +1 -1
- package/dist/model/typoToleranceEnum.d.ts +3 -0
- package/dist/model/typoToleranceEnum.d.ts.map +1 -1
- package/dist/model/value.d.ts +5 -1
- package/dist/model/value.d.ts.map +1 -1
- package/dist/recommend.cjs +61 -45
- package/dist/recommend.esm.browser.js +58 -54
- package/dist/recommend.esm.node.js +61 -45
- package/dist/recommend.umd.js +2 -2
- package/dist/src/recommendClient.d.ts +36 -34
- package/dist/src/recommendClient.d.ts.map +1 -1
- package/model/aroundPrecision.ts +1 -1
- package/model/aroundPrecisionFromValueInner.ts +9 -0
- package/model/aroundRadius.ts +1 -1
- package/model/aroundRadiusAll.ts +3 -0
- package/model/autoFacetFilter.ts +16 -0
- package/model/baseRecommendRequest.ts +8 -4
- package/model/baseSearchParamsWithoutQuery.ts +26 -30
- package/model/baseSearchResponse.ts +9 -24
- package/model/{recommendationsQuery.ts → boughtTogetherQuery.ts} +3 -3
- package/model/clientMethodProps.ts +19 -11
- package/model/condition.ts +6 -12
- package/model/consequence.ts +9 -19
- package/model/deletedAtResponse.ts +2 -2
- package/model/distinct.ts +1 -1
- package/model/exactOnSingleWordQuery.ts +1 -1
- package/model/facetFilters.ts +2 -4
- package/model/facetOrdering.ts +2 -2
- package/model/facets.ts +2 -2
- package/model/{recommendationModels.ts → fallbackParams.ts} +3 -4
- package/model/fbtModel.ts +6 -0
- package/model/{consequenceHide.ts → frequentlyBoughtTogether.ts} +6 -5
- package/model/getRecommendationsParams.ts +2 -2
- package/model/hideConsequenceObject.ts +11 -0
- package/model/highlightResult.ts +1 -0
- package/model/highlightResultOption.ts +3 -3
- package/model/ignorePlurals.ts +4 -2
- package/model/index.ts +23 -24
- package/model/indexSettingsAsSearchParams.ts +32 -36
- package/model/lookingSimilar.ts +15 -0
- package/model/lookingSimilarModel.ts +6 -0
- package/model/lookingSimilarQuery.ts +6 -0
- package/model/matchLevel.ts +1 -1
- package/model/mode.ts +1 -1
- package/model/numericFilters.ts +2 -4
- package/model/optionalFilters.ts +2 -4
- package/model/paramsConsequence.ts +23 -0
- package/model/promoteConsequenceObject.ts +16 -0
- package/model/queryType.ts +1 -1
- package/model/rankingInfo.ts +13 -10
- package/model/reRankingApplyFilter.ts +2 -4
- package/model/recommendHit.ts +3 -3
- package/model/{ruleResponse.ts → recommendRule.ts} +7 -10
- package/model/{ruleResponseMetadata.ts → recommendRuleMetadata.ts} +5 -2
- package/model/recommendationsHits.ts +0 -10
- package/model/recommendationsRequest.ts +6 -2
- package/model/recommendationsResults.ts +4 -1
- package/model/{baseRecommendedForYouQuery.ts → recommendedForYou.ts} +3 -5
- package/model/recommendedForYouModel.ts +1 -1
- package/model/recommendedForYouQuery.ts +2 -3
- package/model/redirect.ts +1 -1
- package/model/{editType.ts → redirectURL.ts} +4 -2
- package/model/relatedModel.ts +6 -0
- package/model/relatedProducts.ts +15 -0
- package/model/relatedQuery.ts +6 -0
- package/model/removeStopWords.ts +4 -2
- package/model/removeWordsIfNoResults.ts +1 -1
- package/model/renderingContent.ts +4 -1
- package/model/searchPagination.ts +23 -0
- package/model/{mixedSearchFilters.ts → searchParams.ts} +3 -1
- package/model/searchParamsObject.ts +3 -0
- package/model/searchParamsQuery.ts +1 -1
- package/model/searchRecommendRulesParams.ts +21 -6
- package/model/searchRecommendRulesResponse.ts +6 -6
- package/model/semanticSearch.ts +2 -2
- package/model/snippetResult.ts +2 -1
- package/model/snippetResultOption.ts +2 -2
- package/model/sortRemainingBy.ts +1 -1
- package/model/supportedLanguage.ts +74 -0
- package/model/tagFilters.ts +2 -4
- package/model/taskStatus.ts +1 -1
- package/model/trendingFacetHit.ts +2 -2
- package/model/{baseTrendingFacetsQuery.ts → trendingFacets.ts} +7 -4
- package/model/trendingFacetsModel.ts +1 -1
- package/model/trendingFacetsQuery.ts +2 -3
- package/model/trendingItems.ts +20 -0
- package/model/trendingItemsModel.ts +1 -1
- package/model/trendingItemsQuery.ts +2 -2
- package/model/typoTolerance.ts +1 -1
- package/model/typoToleranceEnum.ts +3 -0
- package/model/value.ts +6 -1
- package/package.json +11 -8
- package/dist/model/anchoring.d.ts +0 -5
- package/dist/model/anchoring.d.ts.map +0 -1
- package/dist/model/automaticFacetFilter.d.ts +0 -18
- package/dist/model/automaticFacetFilter.d.ts.map +0 -1
- package/dist/model/automaticFacetFilters.d.ts +0 -6
- package/dist/model/automaticFacetFilters.d.ts.map +0 -1
- package/dist/model/baseRecommendationsQuery.d.ts +0 -12
- package/dist/model/baseRecommendationsQuery.d.ts.map +0 -1
- package/dist/model/baseRecommendedForYouQuery.d.ts +0 -8
- package/dist/model/baseRecommendedForYouQuery.d.ts.map +0 -1
- package/dist/model/baseRecommendedForYouQueryParameters.d.ts +0 -7
- package/dist/model/baseRecommendedForYouQueryParameters.d.ts.map +0 -1
- package/dist/model/baseTrendingFacetsQuery.d.ts +0 -9
- package/dist/model/baseTrendingFacetsQuery.d.ts.map +0 -1
- package/dist/model/baseTrendingItemsQuery.d.ts +0 -16
- package/dist/model/baseTrendingItemsQuery.d.ts.map +0 -1
- package/dist/model/consequenceHide.d.ts +0 -10
- package/dist/model/consequenceHide.d.ts.map +0 -1
- package/dist/model/consequenceParams.d.ts +0 -5
- package/dist/model/consequenceParams.d.ts.map +0 -1
- package/dist/model/consequenceQuery.d.ts +0 -6
- package/dist/model/consequenceQuery.d.ts.map +0 -1
- package/dist/model/consequenceQueryObject.d.ts +0 -12
- package/dist/model/consequenceQueryObject.d.ts.map +0 -1
- package/dist/model/edit.d.ts +0 -13
- package/dist/model/edit.d.ts.map +0 -1
- package/dist/model/editType.d.ts +0 -5
- package/dist/model/editType.d.ts.map +0 -1
- package/dist/model/mixedSearchFilters.d.ts +0 -2
- package/dist/model/mixedSearchFilters.d.ts.map +0 -1
- package/dist/model/params.d.ts +0 -13
- package/dist/model/params.d.ts.map +0 -1
- package/dist/model/promote.d.ts +0 -4
- package/dist/model/promote.d.ts.map +0 -1
- package/dist/model/promoteObjectID.d.ts +0 -14
- package/dist/model/promoteObjectID.d.ts.map +0 -1
- package/dist/model/promoteObjectIDs.d.ts +0 -14
- package/dist/model/promoteObjectIDs.d.ts.map +0 -1
- package/dist/model/recommendationModels.d.ts +0 -5
- package/dist/model/recommendationModels.d.ts.map +0 -1
- package/dist/model/recommendationsQuery.d.ts +0 -4
- package/dist/model/recommendationsQuery.d.ts.map +0 -1
- package/dist/model/recommendedForYouQueryParameters.d.ts +0 -4
- package/dist/model/recommendedForYouQueryParameters.d.ts.map +0 -1
- package/dist/model/ruleResponse.d.ts +0 -27
- package/dist/model/ruleResponse.d.ts.map +0 -1
- package/dist/model/ruleResponseMetadata.d.ts +0 -7
- package/dist/model/ruleResponseMetadata.d.ts.map +0 -1
- package/model/anchoring.ts +0 -6
- package/model/automaticFacetFilter.ts +0 -21
- package/model/automaticFacetFilters.ts +0 -8
- package/model/baseRecommendationsQuery.ts +0 -17
- package/model/baseRecommendedForYouQueryParameters.ts +0 -8
- package/model/baseTrendingItemsQuery.ts +0 -22
- package/model/consequenceParams.ts +0 -9
- package/model/consequenceQuery.ts +0 -8
- package/model/consequenceQueryObject.ts +0 -15
- package/model/edit.ts +0 -17
- package/model/params.ts +0 -18
- package/model/promote.ts +0 -6
- package/model/promoteObjectID.ts +0 -16
- package/model/promoteObjectIDs.ts +0 -16
- package/model/recommendedForYouQueryParameters.ts +0 -7
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
|
|
2
|
-
import type { CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteRecommendRuleProps, GetRecommendRuleProps, GetRecommendStatusProps, SearchRecommendRulesProps } from '../model/clientMethodProps';
|
|
2
|
+
import type { CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteRecommendRuleProps, GetRecommendRuleProps, GetRecommendStatusProps, LegacyGetRecommendationsParams, SearchRecommendRulesProps } from '../model/clientMethodProps';
|
|
3
3
|
import type { DeletedAtResponse } from '../model/deletedAtResponse';
|
|
4
4
|
import type { GetRecommendTaskResponse } from '../model/getRecommendTaskResponse';
|
|
5
5
|
import type { GetRecommendationsParams } from '../model/getRecommendationsParams';
|
|
6
6
|
import type { GetRecommendationsResponse } from '../model/getRecommendationsResponse';
|
|
7
|
-
import type {
|
|
7
|
+
import type { RecommendRule } from '../model/recommendRule';
|
|
8
8
|
import type { SearchRecommendRulesResponse } from '../model/searchRecommendRulesResponse';
|
|
9
|
-
export declare const apiClientVersion = "5.0.0-
|
|
9
|
+
export declare const apiClientVersion = "5.0.0-beta.10";
|
|
10
10
|
export declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
11
11
|
transporter: import("@algolia/client-common").Transporter;
|
|
12
12
|
/**
|
|
@@ -31,7 +31,6 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
|
|
|
31
31
|
/**
|
|
32
32
|
* This method allow you to send requests to the Algolia REST API.
|
|
33
33
|
*
|
|
34
|
-
* @summary Send requests to the Algolia REST API.
|
|
35
34
|
* @param customDelete - The customDelete object.
|
|
36
35
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
37
36
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -41,7 +40,6 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
|
|
|
41
40
|
/**
|
|
42
41
|
* This method allow you to send requests to the Algolia REST API.
|
|
43
42
|
*
|
|
44
|
-
* @summary Send requests to the Algolia REST API.
|
|
45
43
|
* @param customGet - The customGet object.
|
|
46
44
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
47
45
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -51,7 +49,6 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
|
|
|
51
49
|
/**
|
|
52
50
|
* This method allow you to send requests to the Algolia REST API.
|
|
53
51
|
*
|
|
54
|
-
* @summary Send requests to the Algolia REST API.
|
|
55
52
|
* @param customPost - The customPost object.
|
|
56
53
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
57
54
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -62,7 +59,6 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
|
|
|
62
59
|
/**
|
|
63
60
|
* This method allow you to send requests to the Algolia REST API.
|
|
64
61
|
*
|
|
65
|
-
* @summary Send requests to the Algolia REST API.
|
|
66
62
|
* @param customPut - The customPut object.
|
|
67
63
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
68
64
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -71,60 +67,66 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
|
|
|
71
67
|
*/
|
|
72
68
|
customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
73
69
|
/**
|
|
74
|
-
*
|
|
70
|
+
* Deletes a Recommend rule from a recommendation scenario.
|
|
71
|
+
*
|
|
72
|
+
* Required API Key ACLs:
|
|
73
|
+
* - editSettings.
|
|
75
74
|
*
|
|
76
|
-
* @summary Delete a Recommend rule.
|
|
77
75
|
* @param deleteRecommendRule - The deleteRecommendRule object.
|
|
78
|
-
* @param deleteRecommendRule.indexName -
|
|
79
|
-
* @param deleteRecommendRule.model - [Recommend
|
|
80
|
-
* @param deleteRecommendRule.objectID - Unique record
|
|
76
|
+
* @param deleteRecommendRule.indexName - Name of the index on which to perform the operation.
|
|
77
|
+
* @param deleteRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
78
|
+
* @param deleteRecommendRule.objectID - Unique record identifier.
|
|
81
79
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
82
80
|
*/
|
|
83
81
|
deleteRecommendRule({ indexName, model, objectID }: DeleteRecommendRuleProps, requestOptions?: RequestOptions): Promise<DeletedAtResponse>;
|
|
84
82
|
/**
|
|
85
|
-
*
|
|
83
|
+
* Retrieves a Recommend rule that you previously created in the Algolia dashboard.
|
|
84
|
+
*
|
|
85
|
+
* Required API Key ACLs:
|
|
86
|
+
* - settings.
|
|
86
87
|
*
|
|
87
|
-
* @summary Get a Recommend rule.
|
|
88
88
|
* @param getRecommendRule - The getRecommendRule object.
|
|
89
|
-
* @param getRecommendRule.indexName -
|
|
90
|
-
* @param getRecommendRule.model - [Recommend
|
|
91
|
-
* @param getRecommendRule.objectID - Unique record
|
|
89
|
+
* @param getRecommendRule.indexName - Name of the index on which to perform the operation.
|
|
90
|
+
* @param getRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
91
|
+
* @param getRecommendRule.objectID - Unique record identifier.
|
|
92
92
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
93
93
|
*/
|
|
94
|
-
getRecommendRule({ indexName, model, objectID }: GetRecommendRuleProps, requestOptions?: RequestOptions): Promise<
|
|
94
|
+
getRecommendRule({ indexName, model, objectID }: GetRecommendRuleProps, requestOptions?: RequestOptions): Promise<RecommendRule>;
|
|
95
95
|
/**
|
|
96
|
-
*
|
|
96
|
+
* 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.
|
|
97
|
+
*
|
|
98
|
+
* Required API Key ACLs:
|
|
99
|
+
* - editSettings.
|
|
97
100
|
*
|
|
98
|
-
* @summary Get a Recommend task\'s status.
|
|
99
101
|
* @param getRecommendStatus - The getRecommendStatus object.
|
|
100
|
-
* @param getRecommendStatus.indexName -
|
|
101
|
-
* @param getRecommendStatus.model - [Recommend
|
|
102
|
-
* @param getRecommendStatus.taskID - Unique
|
|
102
|
+
* @param getRecommendStatus.indexName - Name of the index on which to perform the operation.
|
|
103
|
+
* @param getRecommendStatus.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
104
|
+
* @param getRecommendStatus.taskID - Unique task identifier.
|
|
103
105
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
104
106
|
*/
|
|
105
107
|
getRecommendStatus({ indexName, model, taskID }: GetRecommendStatusProps, requestOptions?: RequestOptions): Promise<GetRecommendTaskResponse>;
|
|
106
108
|
/**
|
|
107
|
-
*
|
|
109
|
+
* Retrieves recommendations from selected AI models.
|
|
110
|
+
*
|
|
111
|
+
* Required API Key ACLs:
|
|
112
|
+
* - search.
|
|
108
113
|
*
|
|
109
|
-
* @summary Get recommendations and trending items.
|
|
110
114
|
* @param getRecommendationsParams - The getRecommendationsParams object.
|
|
111
115
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
112
116
|
*/
|
|
113
|
-
getRecommendations(getRecommendationsParams: GetRecommendationsParams, requestOptions?: RequestOptions): Promise<GetRecommendationsResponse>;
|
|
117
|
+
getRecommendations(getRecommendationsParams: GetRecommendationsParams | LegacyGetRecommendationsParams, requestOptions?: RequestOptions): Promise<GetRecommendationsResponse>;
|
|
114
118
|
/**
|
|
115
|
-
*
|
|
119
|
+
* Searches for Recommend rules. Use an empty query to list all rules for this recommendation scenario.
|
|
120
|
+
*
|
|
121
|
+
* Required API Key ACLs:
|
|
122
|
+
* - settings.
|
|
116
123
|
*
|
|
117
|
-
* @summary List Recommend rules.
|
|
118
124
|
* @param searchRecommendRules - The searchRecommendRules object.
|
|
119
|
-
* @param searchRecommendRules.indexName -
|
|
120
|
-
* @param searchRecommendRules.model - [Recommend
|
|
125
|
+
* @param searchRecommendRules.indexName - Name of the index on which to perform the operation.
|
|
126
|
+
* @param searchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
121
127
|
* @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.
|
|
122
128
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
123
129
|
*/
|
|
124
130
|
searchRecommendRules({ indexName, model, searchRecommendRulesParams, }: SearchRecommendRulesProps, requestOptions?: RequestOptions): Promise<SearchRecommendRulesResponse>;
|
|
125
131
|
};
|
|
126
|
-
/**
|
|
127
|
-
* The client type.
|
|
128
|
-
*/
|
|
129
|
-
export type RecommendClient = ReturnType<typeof createRecommendClient>;
|
|
130
132
|
//# sourceMappingURL=recommendClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommendClient.d.ts","sourceRoot":"","sources":["../../src/recommendClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,mBAAmB,
|
|
1
|
+
{"version":3,"file":"recommendClient.d.ts","sourceRoot":"","sources":["../../src/recommendClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,mBAAmB,EAKnB,cAAc,EACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,8BAA8B,EAC9B,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAE1F,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAsChD,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,GAAG,OAAO,EACX,EAAE,mBAAmB;;IAwBlB;;OAEG;;IAGH;;OAEG;kBACW,OAAO,CAAC,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;OAOG;uCAEqB,iBAAiB,mBACtB,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;OAOG;oCAEqB,cAAc,mBACnB,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;OAQG;2CAE2B,eAAe,mBAC1B,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;OAQG;0CAE2B,cAAc,mBACzB,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;;;;OAWG;wDAE+B,wBAAwB,mBACvC,cAAc,GAC9B,OAAO,CAAC,iBAAiB,CAAC;IAqC7B;;;;;;;;;;;OAWG;qDAE+B,qBAAqB,mBACpC,cAAc,GAC9B,OAAO,CAAC,aAAa,CAAC;IAqCzB;;;;;;;;;;;OAWG;qDAE6B,uBAAuB,mBACpC,cAAc,GAC9B,OAAO,CAAC,wBAAwB,CAAC;IAoCpC;;;;;;;;OAQG;iDAGG,wBAAwB,GACxB,8BAA8B,mBACjB,cAAc,GAC9B,OAAO,CAAC,0BAA0B,CAAC;IAuCtC;;;;;;;;;;;OAWG;4EAME,yBAAyB,mBACX,cAAc,GAC9B,OAAO,CAAC,4BAA4B,CAAC;EAiC3C"}
|
package/model/aroundPrecision.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
import type { AroundPrecisionFromValueInner } from './aroundPrecisionFromValueInner';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Precision of a
|
|
6
|
+
* Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal.
|
|
7
7
|
*/
|
|
8
8
|
export type AroundPrecision = AroundPrecisionFromValueInner[] | number;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
// 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.
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Range object with lower and upper values in meters to define custom ranges.
|
|
5
|
+
*/
|
|
3
6
|
export type AroundPrecisionFromValueInner = {
|
|
7
|
+
/**
|
|
8
|
+
* Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
|
|
9
|
+
*/
|
|
4
10
|
from?: number;
|
|
5
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
|
|
14
|
+
*/
|
|
6
15
|
value?: number;
|
|
7
16
|
};
|
package/model/aroundRadius.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
import type { AroundRadiusAll } from './aroundRadiusAll';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates.
|
|
7
7
|
*/
|
|
8
8
|
export type AroundRadius = AroundRadiusAll | number;
|
package/model/aroundRadiusAll.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
// 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.
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Return all records with a valid `_geoloc` attribute. Don\'t filter by distance.
|
|
5
|
+
*/
|
|
3
6
|
export type AroundRadiusAll = 'all';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// 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.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Facet attribute. Only recommendations with the same value (or only recommendations with a different value) as the original viewed item are included.
|
|
5
|
+
*/
|
|
6
|
+
export type AutoFacetFilter = {
|
|
7
|
+
/**
|
|
8
|
+
* Facet attribute.
|
|
9
|
+
*/
|
|
10
|
+
facet?: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Whether the filter is negative. If true, recommendations must not have the same value for the `facet` attribute. If false, recommendations must have the same value for the `facet` attribute.
|
|
14
|
+
*/
|
|
15
|
+
negative?: boolean;
|
|
16
|
+
};
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
// 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.
|
|
2
2
|
|
|
3
|
+
import type { SearchParams } from './searchParams';
|
|
4
|
+
|
|
3
5
|
export type BaseRecommendRequest = {
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
7
|
+
* Index name (case-sensitive).
|
|
6
8
|
*/
|
|
7
9
|
indexName: string;
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
|
-
*
|
|
12
|
+
* Minimum score a recommendation must have to be included in the response.
|
|
11
13
|
*/
|
|
12
|
-
threshold
|
|
14
|
+
threshold: number;
|
|
13
15
|
|
|
14
16
|
/**
|
|
15
|
-
* Maximum number of recommendations to retrieve.
|
|
17
|
+
* 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.
|
|
16
18
|
*/
|
|
17
19
|
maxRecommendations?: number;
|
|
20
|
+
|
|
21
|
+
queryParameters?: SearchParams;
|
|
18
22
|
};
|
|
@@ -5,16 +5,17 @@ import type { AroundRadius } from './aroundRadius';
|
|
|
5
5
|
import type { FacetFilters } from './facetFilters';
|
|
6
6
|
import type { NumericFilters } from './numericFilters';
|
|
7
7
|
import type { OptionalFilters } from './optionalFilters';
|
|
8
|
+
import type { SupportedLanguage } from './supportedLanguage';
|
|
8
9
|
import type { TagFilters } from './tagFilters';
|
|
9
10
|
|
|
10
11
|
export type BaseSearchParamsWithoutQuery = {
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
+
* Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results.
|
|
13
14
|
*/
|
|
14
15
|
similarQuery?: string;
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
|
-
* [
|
|
18
|
+
* 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/).
|
|
18
19
|
*/
|
|
19
20
|
filters?: string;
|
|
20
21
|
|
|
@@ -27,47 +28,47 @@ export type BaseSearchParamsWithoutQuery = {
|
|
|
27
28
|
tagFilters?: TagFilters;
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
|
-
*
|
|
31
|
+
* Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).
|
|
31
32
|
*/
|
|
32
33
|
sumOrFiltersScores?: boolean;
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
|
-
* Restricts a
|
|
36
|
+
* Restricts a search to a subset of your searchable attributes. Attribute names are case-sensitive.
|
|
36
37
|
*/
|
|
37
38
|
restrictSearchableAttributes?: string[];
|
|
38
39
|
|
|
39
40
|
/**
|
|
40
|
-
*
|
|
41
|
+
* Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
|
|
41
42
|
*/
|
|
42
43
|
facets?: string[];
|
|
43
44
|
|
|
44
45
|
/**
|
|
45
|
-
*
|
|
46
|
+
* Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It\'s usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.
|
|
46
47
|
*/
|
|
47
48
|
facetingAfterDistinct?: boolean;
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
|
-
* Page
|
|
51
|
+
* Page of search results to retrieve.
|
|
51
52
|
*/
|
|
52
53
|
page?: number;
|
|
53
54
|
|
|
54
55
|
/**
|
|
55
|
-
*
|
|
56
|
+
* Position of the first hit to retrieve.
|
|
56
57
|
*/
|
|
57
58
|
offset?: number;
|
|
58
59
|
|
|
59
60
|
/**
|
|
60
|
-
*
|
|
61
|
+
* Number of hits to retrieve (used in combination with `offset`).
|
|
61
62
|
*/
|
|
62
63
|
length?: number;
|
|
63
64
|
|
|
64
65
|
/**
|
|
65
|
-
*
|
|
66
|
+
* Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
|
|
66
67
|
*/
|
|
67
68
|
aroundLatLng?: string;
|
|
68
69
|
|
|
69
70
|
/**
|
|
70
|
-
*
|
|
71
|
+
* Whether to obtain the coordinates from the request\'s IP address.
|
|
71
72
|
*/
|
|
72
73
|
aroundLatLngViaIP?: boolean;
|
|
73
74
|
|
|
@@ -76,62 +77,57 @@ export type BaseSearchParamsWithoutQuery = {
|
|
|
76
77
|
aroundPrecision?: AroundPrecision;
|
|
77
78
|
|
|
78
79
|
/**
|
|
79
|
-
* Minimum radius (in meters)
|
|
80
|
+
* Minimum radius (in meters) for a search around a location when `aroundRadius` isn\'t set.
|
|
80
81
|
*/
|
|
81
82
|
minimumAroundRadius?: number;
|
|
82
83
|
|
|
83
84
|
/**
|
|
84
|
-
*
|
|
85
|
+
* Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
|
|
85
86
|
*/
|
|
86
87
|
insideBoundingBox?: number[][];
|
|
87
88
|
|
|
88
89
|
/**
|
|
89
|
-
*
|
|
90
|
+
* Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
|
|
90
91
|
*/
|
|
91
92
|
insidePolygon?: number[][];
|
|
92
93
|
|
|
93
94
|
/**
|
|
94
|
-
*
|
|
95
|
+
* ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
|
|
95
96
|
*/
|
|
96
|
-
naturalLanguages?:
|
|
97
|
+
naturalLanguages?: SupportedLanguage[];
|
|
97
98
|
|
|
98
99
|
/**
|
|
99
|
-
* Assigns
|
|
100
|
+
* Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
|
|
100
101
|
*/
|
|
101
102
|
ruleContexts?: string[];
|
|
102
103
|
|
|
103
104
|
/**
|
|
104
|
-
*
|
|
105
|
+
* Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
|
|
105
106
|
*/
|
|
106
107
|
personalizationImpact?: number;
|
|
107
108
|
|
|
108
109
|
/**
|
|
109
|
-
*
|
|
110
|
+
* Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
|
|
110
111
|
*/
|
|
111
112
|
userToken?: string;
|
|
112
113
|
|
|
113
114
|
/**
|
|
114
|
-
*
|
|
115
|
+
* Whether the search response should include detailed ranking information.
|
|
115
116
|
*/
|
|
116
117
|
getRankingInfo?: boolean;
|
|
117
118
|
|
|
118
119
|
/**
|
|
119
|
-
*
|
|
120
|
-
*/
|
|
121
|
-
explain?: string[];
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Whether to take into account an index\'s synonyms for a particular search.
|
|
120
|
+
* Whether to take into account an index\'s synonyms for this search.
|
|
125
121
|
*/
|
|
126
122
|
synonyms?: boolean;
|
|
127
123
|
|
|
128
124
|
/**
|
|
129
|
-
*
|
|
125
|
+
* Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
|
|
130
126
|
*/
|
|
131
127
|
clickAnalytics?: boolean;
|
|
132
128
|
|
|
133
129
|
/**
|
|
134
|
-
*
|
|
130
|
+
* Whether this search will be included in Analytics.
|
|
135
131
|
*/
|
|
136
132
|
analytics?: boolean;
|
|
137
133
|
|
|
@@ -141,12 +137,12 @@ export type BaseSearchParamsWithoutQuery = {
|
|
|
141
137
|
analyticsTags?: string[];
|
|
142
138
|
|
|
143
139
|
/**
|
|
144
|
-
* Whether to include
|
|
140
|
+
* Whether to include this search when calculating processing-time percentiles.
|
|
145
141
|
*/
|
|
146
142
|
percentileComputation?: boolean;
|
|
147
143
|
|
|
148
144
|
/**
|
|
149
|
-
*
|
|
145
|
+
* Whether to enable A/B testing for this search.
|
|
150
146
|
*/
|
|
151
147
|
enableABTest?: boolean;
|
|
152
148
|
};
|
|
@@ -22,7 +22,7 @@ export type BaseSearchResponse = Record<string, any> & {
|
|
|
22
22
|
aroundLatLng?: string;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Distance from a central coordinate provided by `aroundLatLng`.
|
|
26
26
|
*/
|
|
27
27
|
automaticRadius?: string;
|
|
28
28
|
|
|
@@ -44,7 +44,7 @@ export type BaseSearchResponse = Record<string, any> & {
|
|
|
44
44
|
exhaustiveTypo?: boolean;
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Facet counts.
|
|
48
48
|
*/
|
|
49
49
|
facets?: Record<string, Record<string, number>>;
|
|
50
50
|
|
|
@@ -53,11 +53,6 @@ export type BaseSearchResponse = Record<string, any> & {
|
|
|
53
53
|
*/
|
|
54
54
|
facets_stats?: Record<string, FacetsStats>;
|
|
55
55
|
|
|
56
|
-
/**
|
|
57
|
-
* Number of hits per page.
|
|
58
|
-
*/
|
|
59
|
-
hitsPerPage: number;
|
|
60
|
-
|
|
61
56
|
/**
|
|
62
57
|
* Index name used for the query.
|
|
63
58
|
*/
|
|
@@ -73,26 +68,11 @@ export type BaseSearchResponse = Record<string, any> & {
|
|
|
73
68
|
*/
|
|
74
69
|
message?: string;
|
|
75
70
|
|
|
76
|
-
/**
|
|
77
|
-
* Number of hits the search query matched.
|
|
78
|
-
*/
|
|
79
|
-
nbHits: number;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Number of pages of results for the current query.
|
|
83
|
-
*/
|
|
84
|
-
nbPages: number;
|
|
85
|
-
|
|
86
71
|
/**
|
|
87
72
|
* Number of hits selected and sorted by the relevant sort algorithm.
|
|
88
73
|
*/
|
|
89
74
|
nbSortedHits?: number;
|
|
90
75
|
|
|
91
|
-
/**
|
|
92
|
-
* Page to retrieve (the first page is `0`, not `1`).
|
|
93
|
-
*/
|
|
94
|
-
page: number;
|
|
95
|
-
|
|
96
76
|
/**
|
|
97
77
|
* Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) query string that will be searched.
|
|
98
78
|
*/
|
|
@@ -128,7 +108,12 @@ export type BaseSearchResponse = Record<string, any> & {
|
|
|
128
108
|
serverUsed?: string;
|
|
129
109
|
|
|
130
110
|
/**
|
|
131
|
-
*
|
|
111
|
+
* An object with custom data. You can store up to 32kB as custom data.
|
|
112
|
+
*/
|
|
113
|
+
userData?: Record<string, any>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
|
|
132
117
|
*/
|
|
133
|
-
|
|
118
|
+
queryID?: string;
|
|
134
119
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// 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.
|
|
2
2
|
|
|
3
3
|
import type { BaseRecommendRequest } from './baseRecommendRequest';
|
|
4
|
-
import type {
|
|
4
|
+
import type { FrequentlyBoughtTogether } from './frequentlyBoughtTogether';
|
|
5
5
|
|
|
6
|
-
export type
|
|
7
|
-
|
|
6
|
+
export type BoughtTogetherQuery = BaseRecommendRequest &
|
|
7
|
+
FrequentlyBoughtTogether;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// 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.
|
|
2
2
|
|
|
3
3
|
import type { RecommendModels } from './recommendModels';
|
|
4
|
+
import type { RecommendationsRequest } from './recommendationsRequest';
|
|
4
5
|
import type { SearchRecommendRulesParams } from './searchRecommendRulesParams';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -72,15 +73,15 @@ export type CustomPutProps = {
|
|
|
72
73
|
*/
|
|
73
74
|
export type DeleteRecommendRuleProps = {
|
|
74
75
|
/**
|
|
75
|
-
*
|
|
76
|
+
* Name of the index on which to perform the operation.
|
|
76
77
|
*/
|
|
77
78
|
indexName: string;
|
|
78
79
|
/**
|
|
79
|
-
* [Recommend
|
|
80
|
+
* [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
80
81
|
*/
|
|
81
82
|
model: RecommendModels;
|
|
82
83
|
/**
|
|
83
|
-
* Unique record
|
|
84
|
+
* Unique record identifier.
|
|
84
85
|
*/
|
|
85
86
|
objectID: string;
|
|
86
87
|
};
|
|
@@ -90,15 +91,15 @@ export type DeleteRecommendRuleProps = {
|
|
|
90
91
|
*/
|
|
91
92
|
export type GetRecommendRuleProps = {
|
|
92
93
|
/**
|
|
93
|
-
*
|
|
94
|
+
* Name of the index on which to perform the operation.
|
|
94
95
|
*/
|
|
95
96
|
indexName: string;
|
|
96
97
|
/**
|
|
97
|
-
* [Recommend
|
|
98
|
+
* [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
98
99
|
*/
|
|
99
100
|
model: RecommendModels;
|
|
100
101
|
/**
|
|
101
|
-
* Unique record
|
|
102
|
+
* Unique record identifier.
|
|
102
103
|
*/
|
|
103
104
|
objectID: string;
|
|
104
105
|
};
|
|
@@ -108,29 +109,36 @@ export type GetRecommendRuleProps = {
|
|
|
108
109
|
*/
|
|
109
110
|
export type GetRecommendStatusProps = {
|
|
110
111
|
/**
|
|
111
|
-
*
|
|
112
|
+
* Name of the index on which to perform the operation.
|
|
112
113
|
*/
|
|
113
114
|
indexName: string;
|
|
114
115
|
/**
|
|
115
|
-
* [Recommend
|
|
116
|
+
* [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
116
117
|
*/
|
|
117
118
|
model: RecommendModels;
|
|
118
119
|
/**
|
|
119
|
-
* Unique
|
|
120
|
+
* Unique task identifier.
|
|
120
121
|
*/
|
|
121
122
|
taskID: number;
|
|
122
123
|
};
|
|
123
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Recommend method signature compatible with the `algoliasearch` v4 package. When using this signature, extra computation will be required to make it match the new signature.
|
|
127
|
+
*
|
|
128
|
+
* @deprecated This signature will be removed from the next major version, we recommend using the `GetRecommendationsParams` type for performances and future proof reasons.
|
|
129
|
+
*/
|
|
130
|
+
export type LegacyGetRecommendationsParams = RecommendationsRequest[];
|
|
131
|
+
|
|
124
132
|
/**
|
|
125
133
|
* Properties for the `searchRecommendRules` method.
|
|
126
134
|
*/
|
|
127
135
|
export type SearchRecommendRulesProps = {
|
|
128
136
|
/**
|
|
129
|
-
*
|
|
137
|
+
* Name of the index on which to perform the operation.
|
|
130
138
|
*/
|
|
131
139
|
indexName: string;
|
|
132
140
|
/**
|
|
133
|
-
* [Recommend
|
|
141
|
+
* [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
134
142
|
*/
|
|
135
143
|
model: RecommendModels;
|
|
136
144
|
searchRecommendRulesParams?: SearchRecommendRulesParams;
|
package/model/condition.ts
CHANGED
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
// 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.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Condition that triggers the rule. If not specified, the rule is triggered for all recommendations.
|
|
5
|
+
*/
|
|
5
6
|
export type Condition = {
|
|
6
7
|
/**
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
pattern?: string;
|
|
10
|
-
|
|
11
|
-
anchoring?: Anchoring;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Whether the pattern matches on plurals, synonyms, and typos.
|
|
8
|
+
* 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/).
|
|
15
9
|
*/
|
|
16
|
-
|
|
10
|
+
filters?: string;
|
|
17
11
|
|
|
18
12
|
/**
|
|
19
|
-
*
|
|
13
|
+
* 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.
|
|
20
14
|
*/
|
|
21
15
|
context?: string;
|
|
22
16
|
};
|