@algolia/recommend 5.0.0-alpha.11 → 5.0.0-alpha.110
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/dist/builds/browser.d.ts +23 -5
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +23 -5
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/model/advancedSyntaxFeatures.d.ts +1 -1
- package/dist/model/advancedSyntaxFeatures.d.ts.map +1 -1
- package/dist/model/alternativesAsExact.d.ts +1 -1
- package/dist/model/alternativesAsExact.d.ts.map +1 -1
- package/dist/model/anchoring.d.ts +5 -0
- package/dist/model/anchoring.d.ts.map +1 -0
- package/dist/model/aroundPrecision.d.ts +6 -0
- package/dist/model/aroundPrecision.d.ts.map +1 -0
- package/dist/model/aroundPrecisionFromValueInner.d.ts +14 -0
- package/dist/model/aroundPrecisionFromValueInner.d.ts.map +1 -0
- package/dist/model/aroundRadius.d.ts +5 -5
- package/dist/model/aroundRadius.d.ts.map +1 -1
- package/dist/model/aroundRadiusAll.d.ts +4 -1
- package/dist/model/aroundRadiusAll.d.ts.map +1 -1
- package/dist/model/automaticFacetFilter.d.ts +18 -0
- package/dist/model/automaticFacetFilter.d.ts.map +1 -0
- package/dist/model/automaticFacetFilters.d.ts +6 -0
- package/dist/model/automaticFacetFilters.d.ts.map +1 -0
- package/dist/model/baseRecommendRequest.d.ts +14 -17
- package/dist/model/baseRecommendRequest.d.ts.map +1 -1
- package/dist/model/baseRecommendationsQuery.d.ts +12 -0
- package/dist/model/baseRecommendationsQuery.d.ts.map +1 -0
- package/dist/model/baseRecommendedForYouQuery.d.ts +8 -0
- package/dist/model/baseRecommendedForYouQuery.d.ts.map +1 -0
- package/dist/model/baseRecommendedForYouQueryParameters.d.ts +7 -0
- package/dist/model/baseRecommendedForYouQueryParameters.d.ts.map +1 -0
- package/dist/model/baseSearchParams.d.ts +3 -3
- package/dist/model/baseSearchParams.d.ts.map +1 -1
- package/dist/model/baseSearchParamsWithoutQuery.d.ts +114 -122
- package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
- package/dist/model/baseSearchResponse.d.ts +109 -101
- package/dist/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/model/baseTrendingFacetsQuery.d.ts +9 -0
- package/dist/model/baseTrendingFacetsQuery.d.ts.map +1 -0
- package/dist/model/baseTrendingItemsQuery.d.ts +16 -0
- package/dist/model/baseTrendingItemsQuery.d.ts.map +1 -0
- package/dist/model/clientMethodProps.d.ts +127 -60
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/condition.d.ts +21 -0
- package/dist/model/condition.d.ts.map +1 -0
- package/dist/model/consequence.d.ts +26 -0
- package/dist/model/consequence.d.ts.map +1 -0
- package/dist/model/consequenceHide.d.ts +10 -0
- package/dist/model/consequenceHide.d.ts.map +1 -0
- package/dist/model/consequenceParams.d.ts +5 -0
- package/dist/model/consequenceParams.d.ts.map +1 -0
- package/dist/model/consequenceQuery.d.ts +6 -0
- package/dist/model/consequenceQuery.d.ts.map +1 -0
- package/dist/model/consequenceQueryObject.d.ts +12 -0
- package/dist/model/consequenceQueryObject.d.ts.map +1 -0
- package/dist/model/deletedAtResponse.d.ts +14 -0
- package/dist/model/deletedAtResponse.d.ts.map +1 -0
- package/dist/model/distinct.d.ts +4 -4
- package/dist/model/distinct.d.ts.map +1 -1
- package/dist/model/edit.d.ts +13 -0
- package/dist/model/edit.d.ts.map +1 -0
- package/dist/model/editType.d.ts +5 -0
- package/dist/model/editType.d.ts.map +1 -0
- package/dist/model/errorBase.d.ts +6 -6
- package/dist/model/errorBase.d.ts.map +1 -1
- package/dist/model/exactOnSingleWordQuery.d.ts +4 -4
- package/dist/model/exactOnSingleWordQuery.d.ts.map +1 -1
- package/dist/model/exhaustive.d.ts +26 -0
- package/dist/model/exhaustive.d.ts.map +1 -0
- package/dist/model/facetFilters.d.ts +5 -5
- package/dist/model/facetFilters.d.ts.map +1 -1
- package/dist/model/facetOrdering.d.ts +12 -12
- package/dist/model/facetOrdering.d.ts.map +1 -1
- package/dist/model/facets.d.ts +9 -9
- package/dist/model/facets.d.ts.map +1 -1
- package/dist/model/facetsStats.d.ts +18 -18
- package/dist/model/facetsStats.d.ts.map +1 -1
- package/dist/model/getRecommendTaskResponse.d.ts +5 -0
- package/dist/model/getRecommendTaskResponse.d.ts.map +1 -0
- package/dist/model/getRecommendationsParams.d.ts +10 -10
- package/dist/model/getRecommendationsParams.d.ts.map +1 -1
- package/dist/model/getRecommendationsResponse.d.ts +4 -4
- package/dist/model/getRecommendationsResponse.d.ts.map +1 -1
- package/dist/model/highlightResult.d.ts +2 -2
- package/dist/model/highlightResult.d.ts.map +1 -1
- package/dist/model/highlightResultOption.d.ts +19 -19
- package/dist/model/highlightResultOption.d.ts.map +1 -1
- package/dist/model/ignorePlurals.d.ts +5 -4
- package/dist/model/ignorePlurals.d.ts.map +1 -1
- package/dist/model/index.d.ts +95 -53
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/indexSettingsAsSearchParams.d.ts +159 -160
- package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/model/matchLevel.d.ts +4 -4
- package/dist/model/matchLevel.d.ts.map +1 -1
- package/dist/model/matchedGeoLocation.d.ts +14 -14
- package/dist/model/matchedGeoLocation.d.ts.map +1 -1
- package/dist/model/mixedSearchFilters.d.ts +1 -1
- package/dist/model/mixedSearchFilters.d.ts.map +1 -1
- package/dist/model/mode.d.ts +5 -0
- package/dist/model/mode.d.ts.map +1 -0
- package/dist/model/numericFilters.d.ts +5 -5
- package/dist/model/numericFilters.d.ts.map +1 -1
- package/dist/model/optionalFilters.d.ts +5 -5
- package/dist/model/optionalFilters.d.ts.map +1 -1
- package/dist/model/params.d.ts +13 -0
- package/dist/model/params.d.ts.map +1 -0
- package/dist/model/personalization.d.ts +14 -14
- package/dist/model/personalization.d.ts.map +1 -1
- package/dist/model/promote.d.ts +4 -0
- package/dist/model/promote.d.ts.map +1 -0
- package/dist/model/promoteObjectID.d.ts +14 -0
- package/dist/model/promoteObjectID.d.ts.map +1 -0
- package/dist/model/promoteObjectIDs.d.ts +14 -0
- package/dist/model/promoteObjectIDs.d.ts.map +1 -0
- package/dist/model/queryType.d.ts +4 -4
- package/dist/model/queryType.d.ts.map +1 -1
- package/dist/model/rankingInfo.d.ts +53 -50
- package/dist/model/rankingInfo.d.ts.map +1 -1
- package/dist/model/reRankingApplyFilter.d.ts +5 -5
- package/dist/model/reRankingApplyFilter.d.ts.map +1 -1
- package/dist/model/recommendHit.d.ts +26 -26
- package/dist/model/recommendHit.d.ts.map +1 -1
- package/dist/model/recommendModels.d.ts +2 -0
- package/dist/model/recommendModels.d.ts.map +1 -0
- package/dist/model/recommendationModels.d.ts +4 -4
- package/dist/model/recommendationModels.d.ts.map +1 -1
- package/dist/model/recommendationsHit.d.ts +4 -0
- package/dist/model/recommendationsHit.d.ts.map +1 -0
- package/dist/model/recommendationsHits.d.ts +13 -0
- package/dist/model/recommendationsHits.d.ts.map +1 -0
- package/dist/model/recommendationsQuery.d.ts +4 -0
- package/dist/model/recommendationsQuery.d.ts.map +1 -0
- package/dist/model/recommendationsRequest.d.ts +5 -3
- package/dist/model/recommendationsRequest.d.ts.map +1 -1
- package/dist/model/recommendationsResults.d.ts +4 -0
- package/dist/model/recommendationsResults.d.ts.map +1 -0
- package/dist/model/recommendedForYouModel.d.ts +5 -0
- package/dist/model/recommendedForYouModel.d.ts.map +1 -0
- package/dist/model/recommendedForYouQuery.d.ts +4 -0
- package/dist/model/recommendedForYouQuery.d.ts.map +1 -0
- package/dist/model/recommendedForYouQueryParameters.d.ts +4 -0
- package/dist/model/recommendedForYouQueryParameters.d.ts.map +1 -0
- package/dist/model/redirect.d.ts +8 -0
- package/dist/model/redirect.d.ts.map +1 -0
- package/dist/model/redirectRuleIndexMetadata.d.ts +21 -0
- package/dist/model/redirectRuleIndexMetadata.d.ts.map +1 -0
- package/dist/model/redirectRuleIndexMetadataData.d.ts +7 -0
- package/dist/model/redirectRuleIndexMetadataData.d.ts.map +1 -0
- package/dist/model/removeStopWords.d.ts +5 -4
- package/dist/model/removeStopWords.d.ts.map +1 -1
- package/dist/model/removeWordsIfNoResults.d.ts +4 -4
- package/dist/model/removeWordsIfNoResults.d.ts.map +1 -1
- package/dist/model/renderingContent.d.ts +7 -7
- package/dist/model/renderingContent.d.ts.map +1 -1
- package/dist/model/ruleResponse.d.ts +27 -0
- package/dist/model/ruleResponse.d.ts.map +1 -0
- package/dist/model/ruleResponseMetadata.d.ts +7 -0
- package/dist/model/ruleResponseMetadata.d.ts.map +1 -0
- package/dist/model/searchParamsObject.d.ts +3 -3
- package/dist/model/searchParamsObject.d.ts.map +1 -1
- package/dist/model/searchParamsQuery.d.ts +6 -6
- package/dist/model/searchParamsQuery.d.ts.map +1 -1
- package/dist/model/searchRecommendRulesParams.d.ts +26 -0
- package/dist/model/searchRecommendRulesParams.d.ts.map +1 -0
- package/dist/model/searchRecommendRulesResponse.d.ts +20 -0
- package/dist/model/searchRecommendRulesResponse.d.ts.map +1 -0
- package/dist/model/semanticSearch.d.ts +10 -0
- package/dist/model/semanticSearch.d.ts.map +1 -0
- package/dist/model/snippetResult.d.ts +2 -2
- package/dist/model/snippetResult.d.ts.map +1 -1
- package/dist/model/snippetResultOption.d.ts +11 -11
- package/dist/model/snippetResultOption.d.ts.map +1 -1
- package/dist/model/sortRemainingBy.d.ts +4 -4
- package/dist/model/sortRemainingBy.d.ts.map +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 +5 -5
- package/dist/model/tagFilters.d.ts.map +1 -1
- package/dist/model/taskStatus.d.ts +5 -0
- package/dist/model/taskStatus.d.ts.map +1 -0
- package/dist/model/trendingFacetHit.d.ts +18 -0
- package/dist/model/trendingFacetHit.d.ts.map +1 -0
- package/dist/model/trendingFacetsModel.d.ts +5 -0
- package/dist/model/trendingFacetsModel.d.ts.map +1 -0
- package/dist/model/trendingFacetsQuery.d.ts +4 -0
- package/dist/model/trendingFacetsQuery.d.ts.map +1 -0
- package/dist/model/trendingItemsModel.d.ts +5 -0
- package/dist/model/trendingItemsModel.d.ts.map +1 -0
- package/dist/model/trendingItemsQuery.d.ts +4 -0
- package/dist/model/trendingItemsQuery.d.ts.map +1 -0
- package/dist/model/typoTolerance.d.ts +5 -5
- package/dist/model/typoTolerance.d.ts.map +1 -1
- package/dist/model/typoToleranceEnum.d.ts +4 -1
- package/dist/model/typoToleranceEnum.d.ts.map +1 -1
- package/dist/model/value.d.ts +8 -8
- package/dist/model/value.d.ts.map +1 -1
- package/dist/recommend.cjs +390 -0
- package/dist/recommend.esm.browser.js +589 -475
- package/dist/recommend.esm.node.js +379 -235
- package/dist/recommend.umd.js +2 -2
- package/dist/src/recommendClient.d.ts +131 -81
- package/dist/src/recommendClient.d.ts.map +1 -1
- package/index.js +1 -1
- package/model/advancedSyntaxFeatures.ts +1 -1
- package/model/alternativesAsExact.ts +1 -1
- package/model/anchoring.ts +6 -0
- package/model/aroundPrecision.ts +8 -0
- package/model/aroundPrecisionFromValueInner.ts +16 -0
- package/model/aroundRadius.ts +2 -2
- package/model/aroundRadiusAll.ts +4 -1
- package/model/automaticFacetFilter.ts +21 -0
- package/model/automaticFacetFilters.ts +8 -0
- package/model/baseRecommendRequest.ts +5 -11
- package/model/baseRecommendationsQuery.ts +17 -0
- package/model/baseRecommendedForYouQuery.ts +12 -0
- package/model/baseRecommendedForYouQueryParameters.ts +8 -0
- package/model/baseSearchParams.ts +1 -1
- package/model/baseSearchParamsWithoutQuery.ts +36 -46
- package/model/baseSearchResponse.ts +42 -31
- package/model/baseTrendingFacetsQuery.ts +12 -0
- package/model/baseTrendingItemsQuery.ts +22 -0
- package/model/clientMethodProps.ts +91 -19
- package/model/condition.ts +27 -0
- package/model/consequence.ts +32 -0
- package/model/consequenceHide.ts +11 -0
- package/model/consequenceParams.ts +9 -0
- package/model/consequenceQuery.ts +8 -0
- package/model/consequenceQueryObject.ts +15 -0
- package/model/deletedAtResponse.ts +16 -0
- package/model/distinct.ts +2 -2
- package/model/edit.ts +17 -0
- package/model/editType.ts +6 -0
- package/model/errorBase.ts +1 -1
- package/model/exactOnSingleWordQuery.ts +2 -2
- package/model/exhaustive.ts +31 -0
- package/model/facetFilters.ts +2 -2
- package/model/facetOrdering.ts +3 -3
- package/model/facets.ts +3 -3
- package/model/facetsStats.ts +5 -5
- package/model/getRecommendTaskResponse.ts +7 -0
- package/model/getRecommendationsParams.ts +3 -3
- package/model/getRecommendationsResponse.ts +3 -3
- package/model/highlightResult.ts +5 -2
- package/model/highlightResultOption.ts +4 -4
- package/model/ignorePlurals.ts +5 -3
- package/model/index.ts +50 -8
- package/model/indexSettingsAsSearchParams.ts +54 -54
- package/model/matchLevel.ts +2 -2
- package/model/matchedGeoLocation.ts +1 -1
- package/model/mixedSearchFilters.ts +1 -1
- package/model/mode.ts +6 -0
- package/model/numericFilters.ts +2 -2
- package/model/optionalFilters.ts +2 -2
- package/model/params.ts +18 -0
- package/model/personalization.ts +1 -1
- package/model/promote.ts +6 -0
- package/model/promoteObjectID.ts +16 -0
- package/model/promoteObjectIDs.ts +16 -0
- package/model/queryType.ts +2 -2
- package/model/rankingInfo.ts +11 -8
- package/model/reRankingApplyFilter.ts +2 -2
- package/model/recommendHit.ts +6 -6
- package/model/recommendModels.ts +7 -0
- package/model/recommendationModels.ts +2 -2
- package/model/recommendationsHit.ts +6 -0
- package/model/recommendationsHits.ts +17 -0
- package/model/recommendationsQuery.ts +7 -0
- package/model/recommendationsRequest.ts +10 -4
- package/model/recommendationsResults.ts +6 -0
- package/model/recommendedForYouModel.ts +6 -0
- package/model/recommendedForYouQuery.ts +7 -0
- package/model/recommendedForYouQueryParameters.ts +7 -0
- package/model/redirect.ts +10 -0
- package/model/redirectRuleIndexMetadata.ts +27 -0
- package/model/redirectRuleIndexMetadataData.ts +8 -0
- package/model/removeStopWords.ts +5 -3
- package/model/removeWordsIfNoResults.ts +2 -2
- package/model/renderingContent.ts +2 -2
- package/model/ruleResponse.ts +34 -0
- package/model/ruleResponseMetadata.ts +8 -0
- package/model/searchParamsObject.ts +1 -1
- package/model/searchParamsQuery.ts +2 -2
- package/model/searchRecommendRulesParams.ts +31 -0
- package/model/searchRecommendRulesResponse.ts +25 -0
- package/model/semanticSearch.ts +11 -0
- package/model/snippetResult.ts +5 -2
- package/model/snippetResultOption.ts +3 -3
- package/model/sortRemainingBy.ts +2 -2
- package/model/supportedLanguage.ts +74 -0
- package/model/tagFilters.ts +2 -2
- package/model/taskStatus.ts +6 -0
- package/model/trendingFacetHit.ts +21 -0
- package/model/trendingFacetsModel.ts +6 -0
- package/model/trendingFacetsQuery.ts +7 -0
- package/model/trendingItemsModel.ts +6 -0
- package/model/trendingItemsQuery.ts +6 -0
- package/model/typoTolerance.ts +2 -2
- package/model/typoToleranceEnum.ts +4 -1
- package/model/value.ts +2 -2
- package/package.json +10 -9
- package/dist/model/baseRecommendationRequest.d.ts +0 -9
- package/dist/model/baseRecommendationRequest.d.ts.map +0 -1
- package/dist/model/baseTrendingRequest.d.ts +0 -13
- package/dist/model/baseTrendingRequest.d.ts.map +0 -1
- package/dist/model/recommendHits.d.ts +0 -5
- package/dist/model/recommendHits.d.ts.map +0 -1
- package/dist/model/recommendationRequest.d.ts +0 -4
- package/dist/model/recommendationRequest.d.ts.map +0 -1
- package/dist/model/recommendationsResponse.d.ts +0 -4
- package/dist/model/recommendationsResponse.d.ts.map +0 -1
- package/dist/model/trendingModels.d.ts +0 -5
- package/dist/model/trendingModels.d.ts.map +0 -1
- package/dist/model/trendingRequest.d.ts +0 -4
- package/dist/model/trendingRequest.d.ts.map +0 -1
- package/dist/recommend.cjs.js +0 -248
- package/model/baseRecommendationRequest.ts +0 -12
- package/model/baseTrendingRequest.ts +0 -17
- package/model/recommendHits.ts +0 -7
- package/model/recommendationRequest.ts +0 -7
- package/model/recommendationsResponse.ts +0 -6
- package/model/trendingModels.ts +0 -6
- package/model/trendingRequest.ts +0 -6
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { MatchLevel } from './matchLevel';
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
export
|
|
6
|
-
/**
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
value: string;
|
|
10
|
-
matchLevel: MatchLevel;
|
|
11
|
-
};
|
|
1
|
+
import type { MatchLevel } from './matchLevel';
|
|
2
|
+
/**
|
|
3
|
+
* Snippets that show the context around a matching search query.
|
|
4
|
+
*/
|
|
5
|
+
export type SnippetResultOption = {
|
|
6
|
+
/**
|
|
7
|
+
* Highlighted attribute value, including HTML tags.
|
|
8
|
+
*/
|
|
9
|
+
value: string;
|
|
10
|
+
matchLevel: MatchLevel;
|
|
11
|
+
};
|
|
12
12
|
//# sourceMappingURL=snippetResultOption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippetResultOption.d.ts","sourceRoot":"","sources":["../../model/snippetResultOption.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"snippetResultOption.d.ts","sourceRoot":"","sources":["../../model/snippetResultOption.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*/
|
|
4
|
-
export
|
|
1
|
+
/**
|
|
2
|
+
* 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>.
|
|
3
|
+
*/
|
|
4
|
+
export type SortRemainingBy = 'alpha' | 'count' | 'hidden';
|
|
5
5
|
//# sourceMappingURL=sortRemainingBy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortRemainingBy.d.ts","sourceRoot":"","sources":["../../model/sortRemainingBy.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"sortRemainingBy.d.ts","sourceRoot":"","sources":["../../model/sortRemainingBy.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ISO code for a supported language.
|
|
3
|
+
*/
|
|
4
|
+
export type SupportedLanguage = 'af' | 'ar' | 'az' | 'bg' | 'bn' | 'ca' | 'cs' | 'cy' | 'da' | 'de' | 'el' | 'en' | 'eo' | 'es' | 'et' | 'eu' | 'fa' | 'fi' | 'fo' | 'fr' | 'ga' | 'gl' | 'he' | 'hi' | 'hu' | 'hy' | 'id' | 'is' | 'it' | 'ja' | 'ka' | 'kk' | 'ko' | 'ku' | 'ky' | 'lt' | 'lv' | 'mi' | 'mn' | 'mr' | 'ms' | 'mt' | 'nb' | 'nl' | 'no' | 'ns' | 'pl' | 'ps' | 'pt-br' | 'pt' | 'qu' | 'ro' | 'ru' | 'sk' | 'sq' | 'sv' | 'sw' | 'ta' | 'te' | 'th' | 'tl' | 'tn' | 'tr' | 'tt' | 'uk' | 'ur' | 'uz' | 'zh';
|
|
5
|
+
//# sourceMappingURL=supportedLanguage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supportedLanguage.d.ts","sourceRoot":"","sources":["../../model/supportedLanguage.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,OAAO,GACP,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { MixedSearchFilters } from './mixedSearchFilters';
|
|
2
|
-
/**
|
|
3
|
-
* Filter
|
|
4
|
-
*/
|
|
5
|
-
export
|
|
1
|
+
import type { MixedSearchFilters } from './mixedSearchFilters';
|
|
2
|
+
/**
|
|
3
|
+
* Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won\'t get a facet count. The same combination and escaping rules apply as for `facetFilters`.
|
|
4
|
+
*/
|
|
5
|
+
export type TagFilters = MixedSearchFilters[] | string;
|
|
6
6
|
//# sourceMappingURL=tagFilters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tagFilters.d.ts","sourceRoot":"","sources":["../../model/tagFilters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"tagFilters.d.ts","sourceRoot":"","sources":["../../model/tagFilters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,kBAAkB,EAAE,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taskStatus.d.ts","sourceRoot":"","sources":["../../model/taskStatus.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trending facet hit.
|
|
3
|
+
*/
|
|
4
|
+
export type TrendingFacetHit = {
|
|
5
|
+
/**
|
|
6
|
+
* Recommendation score.
|
|
7
|
+
*/
|
|
8
|
+
_score: number;
|
|
9
|
+
/**
|
|
10
|
+
* Facet name for trending models.
|
|
11
|
+
*/
|
|
12
|
+
facetName: string;
|
|
13
|
+
/**
|
|
14
|
+
* Facet value for trending models.
|
|
15
|
+
*/
|
|
16
|
+
facetValue: string;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=trendingFacetHit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trendingFacetHit.d.ts","sourceRoot":"","sources":["../../model/trendingFacetHit.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trendingFacetsModel.d.ts","sourceRoot":"","sources":["../../model/trendingFacetsModel.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BaseRecommendRequest } from './baseRecommendRequest';
|
|
2
|
+
import type { BaseTrendingFacetsQuery } from './baseTrendingFacetsQuery';
|
|
3
|
+
export type TrendingFacetsQuery = BaseRecommendRequest & BaseTrendingFacetsQuery;
|
|
4
|
+
//# sourceMappingURL=trendingFacetsQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trendingFacetsQuery.d.ts","sourceRoot":"","sources":["../../model/trendingFacetsQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEzE,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,GACpD,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trendingItemsModel.d.ts","sourceRoot":"","sources":["../../model/trendingItemsModel.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BaseRecommendRequest } from './baseRecommendRequest';
|
|
2
|
+
import type { BaseTrendingItemsQuery } from './baseTrendingItemsQuery';
|
|
3
|
+
export type TrendingItemsQuery = BaseRecommendRequest & BaseTrendingItemsQuery;
|
|
4
|
+
//# sourceMappingURL=trendingItemsQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trendingItemsQuery.d.ts","sourceRoot":"","sources":["../../model/trendingItemsQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG,sBAAsB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TypoToleranceEnum } from './typoToleranceEnum';
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
export
|
|
1
|
+
import type { TypoToleranceEnum } from './typoToleranceEnum';
|
|
2
|
+
/**
|
|
3
|
+
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active.
|
|
4
|
+
*/
|
|
5
|
+
export type TypoTolerance = TypoToleranceEnum | boolean;
|
|
6
6
|
//# sourceMappingURL=typoTolerance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typoTolerance.d.ts","sourceRoot":"","sources":["../../model/typoTolerance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"typoTolerance.d.ts","sourceRoot":"","sources":["../../model/typoTolerance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,OAAO,CAAC"}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.
|
|
3
|
+
*/
|
|
4
|
+
export type TypoToleranceEnum = 'min' | 'strict';
|
|
2
5
|
//# sourceMappingURL=typoToleranceEnum.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typoToleranceEnum.d.ts","sourceRoot":"","sources":["../../model/typoToleranceEnum.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"typoToleranceEnum.d.ts","sourceRoot":"","sources":["../../model/typoToleranceEnum.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,CAAC"}
|
package/dist/model/value.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { SortRemainingBy } from './sortRemainingBy';
|
|
2
|
-
export
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
order?: string[];
|
|
7
|
-
sortRemainingBy?: SortRemainingBy;
|
|
8
|
-
};
|
|
1
|
+
import type { SortRemainingBy } from './sortRemainingBy';
|
|
2
|
+
export type Value = {
|
|
3
|
+
/**
|
|
4
|
+
* Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
|
|
5
|
+
*/
|
|
6
|
+
order?: string[];
|
|
7
|
+
sortRemainingBy?: SortRemainingBy;
|
|
8
|
+
};
|
|
9
9
|
//# sourceMappingURL=value.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../model/value.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,
|
|
1
|
+
{"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../model/value.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,MAAM,KAAK,GAAG;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAEjB,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC,CAAC"}
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var clientCommon = require('@algolia/client-common');
|
|
4
|
+
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
5
|
+
|
|
6
|
+
// 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.
|
|
7
|
+
const apiClientVersion = '5.0.0-alpha.110';
|
|
8
|
+
function getDefaultHosts(appId) {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
url: `${appId}-dsn.algolia.net`,
|
|
12
|
+
accept: 'read',
|
|
13
|
+
protocol: 'https',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
url: `${appId}.algolia.net`,
|
|
17
|
+
accept: 'write',
|
|
18
|
+
protocol: 'https',
|
|
19
|
+
},
|
|
20
|
+
].concat(clientCommon.shuffle([
|
|
21
|
+
{
|
|
22
|
+
url: `${appId}-1.algolianet.com`,
|
|
23
|
+
accept: 'readWrite',
|
|
24
|
+
protocol: 'https',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
url: `${appId}-2.algolianet.com`,
|
|
28
|
+
accept: 'readWrite',
|
|
29
|
+
protocol: 'https',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
url: `${appId}-3.algolianet.com`,
|
|
33
|
+
accept: 'readWrite',
|
|
34
|
+
protocol: 'https',
|
|
35
|
+
},
|
|
36
|
+
]));
|
|
37
|
+
}
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
39
|
+
function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
|
|
40
|
+
const auth = clientCommon.createAuth(appIdOption, apiKeyOption, authMode);
|
|
41
|
+
const transporter = clientCommon.createTransporter({
|
|
42
|
+
hosts: getDefaultHosts(appIdOption),
|
|
43
|
+
...options,
|
|
44
|
+
algoliaAgent: clientCommon.getAlgoliaAgent({
|
|
45
|
+
algoliaAgents,
|
|
46
|
+
client: 'Recommend',
|
|
47
|
+
version: apiClientVersion,
|
|
48
|
+
}),
|
|
49
|
+
baseHeaders: {
|
|
50
|
+
'content-type': 'text/plain',
|
|
51
|
+
...auth.headers(),
|
|
52
|
+
...options.baseHeaders,
|
|
53
|
+
},
|
|
54
|
+
baseQueryParameters: {
|
|
55
|
+
...auth.queryParameters(),
|
|
56
|
+
...options.baseQueryParameters,
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
return {
|
|
60
|
+
transporter,
|
|
61
|
+
/**
|
|
62
|
+
* The `appId` currently in use.
|
|
63
|
+
*/
|
|
64
|
+
appId: appIdOption,
|
|
65
|
+
/**
|
|
66
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
67
|
+
*/
|
|
68
|
+
clearCache() {
|
|
69
|
+
return Promise.all([
|
|
70
|
+
transporter.requestsCache.clear(),
|
|
71
|
+
transporter.responsesCache.clear(),
|
|
72
|
+
]).then(() => undefined);
|
|
73
|
+
},
|
|
74
|
+
/**
|
|
75
|
+
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
76
|
+
*/
|
|
77
|
+
get _ua() {
|
|
78
|
+
return transporter.algoliaAgent.value;
|
|
79
|
+
},
|
|
80
|
+
/**
|
|
81
|
+
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
82
|
+
*
|
|
83
|
+
* @param segment - The algolia agent (user-agent) segment to add.
|
|
84
|
+
* @param version - The version of the agent.
|
|
85
|
+
*/
|
|
86
|
+
addAlgoliaAgent(segment, version) {
|
|
87
|
+
transporter.algoliaAgent.add({ segment, version });
|
|
88
|
+
},
|
|
89
|
+
/**
|
|
90
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
91
|
+
*
|
|
92
|
+
* @param customDelete - The customDelete object.
|
|
93
|
+
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
94
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
95
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
96
|
+
*/
|
|
97
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
98
|
+
if (!path) {
|
|
99
|
+
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
100
|
+
}
|
|
101
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
102
|
+
const headers = {};
|
|
103
|
+
const queryParameters = parameters ? parameters : {};
|
|
104
|
+
const request = {
|
|
105
|
+
method: 'DELETE',
|
|
106
|
+
path: requestPath,
|
|
107
|
+
queryParameters,
|
|
108
|
+
headers,
|
|
109
|
+
};
|
|
110
|
+
return transporter.request(request, requestOptions);
|
|
111
|
+
},
|
|
112
|
+
/**
|
|
113
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
114
|
+
*
|
|
115
|
+
* @param customGet - The customGet object.
|
|
116
|
+
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
117
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
118
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
119
|
+
*/
|
|
120
|
+
customGet({ path, parameters }, requestOptions) {
|
|
121
|
+
if (!path) {
|
|
122
|
+
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
123
|
+
}
|
|
124
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
125
|
+
const headers = {};
|
|
126
|
+
const queryParameters = parameters ? parameters : {};
|
|
127
|
+
const request = {
|
|
128
|
+
method: 'GET',
|
|
129
|
+
path: requestPath,
|
|
130
|
+
queryParameters,
|
|
131
|
+
headers,
|
|
132
|
+
};
|
|
133
|
+
return transporter.request(request, requestOptions);
|
|
134
|
+
},
|
|
135
|
+
/**
|
|
136
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
137
|
+
*
|
|
138
|
+
* @param customPost - The customPost object.
|
|
139
|
+
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
140
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
141
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
142
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
143
|
+
*/
|
|
144
|
+
customPost({ path, parameters, body }, requestOptions) {
|
|
145
|
+
if (!path) {
|
|
146
|
+
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
147
|
+
}
|
|
148
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
149
|
+
const headers = {};
|
|
150
|
+
const queryParameters = parameters ? parameters : {};
|
|
151
|
+
const request = {
|
|
152
|
+
method: 'POST',
|
|
153
|
+
path: requestPath,
|
|
154
|
+
queryParameters,
|
|
155
|
+
headers,
|
|
156
|
+
data: body ? body : {},
|
|
157
|
+
};
|
|
158
|
+
return transporter.request(request, requestOptions);
|
|
159
|
+
},
|
|
160
|
+
/**
|
|
161
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
162
|
+
*
|
|
163
|
+
* @param customPut - The customPut object.
|
|
164
|
+
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
165
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
166
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
167
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
168
|
+
*/
|
|
169
|
+
customPut({ path, parameters, body }, requestOptions) {
|
|
170
|
+
if (!path) {
|
|
171
|
+
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
172
|
+
}
|
|
173
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
174
|
+
const headers = {};
|
|
175
|
+
const queryParameters = parameters ? parameters : {};
|
|
176
|
+
const request = {
|
|
177
|
+
method: 'PUT',
|
|
178
|
+
path: requestPath,
|
|
179
|
+
queryParameters,
|
|
180
|
+
headers,
|
|
181
|
+
data: body ? body : {},
|
|
182
|
+
};
|
|
183
|
+
return transporter.request(request, requestOptions);
|
|
184
|
+
},
|
|
185
|
+
/**
|
|
186
|
+
* Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
|
|
187
|
+
*
|
|
188
|
+
* Required API Key ACLs:
|
|
189
|
+
* - editSettings.
|
|
190
|
+
*
|
|
191
|
+
* @param deleteRecommendRule - The deleteRecommendRule object.
|
|
192
|
+
* @param deleteRecommendRule.indexName - Name of the index on which to perform the operation.
|
|
193
|
+
* @param deleteRecommendRule.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
194
|
+
* @param deleteRecommendRule.objectID - Unique record identifier.
|
|
195
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
196
|
+
*/
|
|
197
|
+
deleteRecommendRule({ indexName, model, objectID }, requestOptions) {
|
|
198
|
+
if (!indexName) {
|
|
199
|
+
throw new Error('Parameter `indexName` is required when calling `deleteRecommendRule`.');
|
|
200
|
+
}
|
|
201
|
+
if (!model) {
|
|
202
|
+
throw new Error('Parameter `model` is required when calling `deleteRecommendRule`.');
|
|
203
|
+
}
|
|
204
|
+
if (!objectID) {
|
|
205
|
+
throw new Error('Parameter `objectID` is required when calling `deleteRecommendRule`.');
|
|
206
|
+
}
|
|
207
|
+
const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
|
|
208
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
209
|
+
.replace('{model}', encodeURIComponent(model))
|
|
210
|
+
.replace('{objectID}', encodeURIComponent(objectID));
|
|
211
|
+
const headers = {};
|
|
212
|
+
const queryParameters = {};
|
|
213
|
+
const request = {
|
|
214
|
+
method: 'DELETE',
|
|
215
|
+
path: requestPath,
|
|
216
|
+
queryParameters,
|
|
217
|
+
headers,
|
|
218
|
+
};
|
|
219
|
+
return transporter.request(request, requestOptions);
|
|
220
|
+
},
|
|
221
|
+
/**
|
|
222
|
+
* Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
|
|
223
|
+
*
|
|
224
|
+
* Required API Key ACLs:
|
|
225
|
+
* - settings.
|
|
226
|
+
*
|
|
227
|
+
* @param getRecommendRule - The getRecommendRule object.
|
|
228
|
+
* @param getRecommendRule.indexName - Name of the index on which to perform the operation.
|
|
229
|
+
* @param getRecommendRule.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
230
|
+
* @param getRecommendRule.objectID - Unique record identifier.
|
|
231
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
232
|
+
*/
|
|
233
|
+
getRecommendRule({ indexName, model, objectID }, requestOptions) {
|
|
234
|
+
if (!indexName) {
|
|
235
|
+
throw new Error('Parameter `indexName` is required when calling `getRecommendRule`.');
|
|
236
|
+
}
|
|
237
|
+
if (!model) {
|
|
238
|
+
throw new Error('Parameter `model` is required when calling `getRecommendRule`.');
|
|
239
|
+
}
|
|
240
|
+
if (!objectID) {
|
|
241
|
+
throw new Error('Parameter `objectID` is required when calling `getRecommendRule`.');
|
|
242
|
+
}
|
|
243
|
+
const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
|
|
244
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
245
|
+
.replace('{model}', encodeURIComponent(model))
|
|
246
|
+
.replace('{objectID}', encodeURIComponent(objectID));
|
|
247
|
+
const headers = {};
|
|
248
|
+
const queryParameters = {};
|
|
249
|
+
const request = {
|
|
250
|
+
method: 'GET',
|
|
251
|
+
path: requestPath,
|
|
252
|
+
queryParameters,
|
|
253
|
+
headers,
|
|
254
|
+
};
|
|
255
|
+
return transporter.request(request, requestOptions);
|
|
256
|
+
},
|
|
257
|
+
/**
|
|
258
|
+
* 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.
|
|
259
|
+
*
|
|
260
|
+
* Required API Key ACLs:
|
|
261
|
+
* - editSettings.
|
|
262
|
+
*
|
|
263
|
+
* @param getRecommendStatus - The getRecommendStatus object.
|
|
264
|
+
* @param getRecommendStatus.indexName - Name of the index on which to perform the operation.
|
|
265
|
+
* @param getRecommendStatus.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
266
|
+
* @param getRecommendStatus.taskID - Unique identifier of a task. Numeric value (up to 64bits).
|
|
267
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
268
|
+
*/
|
|
269
|
+
getRecommendStatus({ indexName, model, taskID }, requestOptions) {
|
|
270
|
+
if (!indexName) {
|
|
271
|
+
throw new Error('Parameter `indexName` is required when calling `getRecommendStatus`.');
|
|
272
|
+
}
|
|
273
|
+
if (!model) {
|
|
274
|
+
throw new Error('Parameter `model` is required when calling `getRecommendStatus`.');
|
|
275
|
+
}
|
|
276
|
+
if (!taskID) {
|
|
277
|
+
throw new Error('Parameter `taskID` is required when calling `getRecommendStatus`.');
|
|
278
|
+
}
|
|
279
|
+
const requestPath = '/1/indexes/{indexName}/{model}/task/{taskID}'
|
|
280
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
281
|
+
.replace('{model}', encodeURIComponent(model))
|
|
282
|
+
.replace('{taskID}', encodeURIComponent(taskID));
|
|
283
|
+
const headers = {};
|
|
284
|
+
const queryParameters = {};
|
|
285
|
+
const request = {
|
|
286
|
+
method: 'GET',
|
|
287
|
+
path: requestPath,
|
|
288
|
+
queryParameters,
|
|
289
|
+
headers,
|
|
290
|
+
};
|
|
291
|
+
return transporter.request(request, requestOptions);
|
|
292
|
+
},
|
|
293
|
+
/**
|
|
294
|
+
* 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).
|
|
295
|
+
*
|
|
296
|
+
* Required API Key ACLs:
|
|
297
|
+
* - search.
|
|
298
|
+
*
|
|
299
|
+
* @param getRecommendationsParams - The getRecommendationsParams object.
|
|
300
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
301
|
+
*/
|
|
302
|
+
getRecommendations(getRecommendationsParams, requestOptions) {
|
|
303
|
+
if (!getRecommendationsParams) {
|
|
304
|
+
throw new Error('Parameter `getRecommendationsParams` is required when calling `getRecommendations`.');
|
|
305
|
+
}
|
|
306
|
+
if (!getRecommendationsParams.requests) {
|
|
307
|
+
throw new Error('Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.');
|
|
308
|
+
}
|
|
309
|
+
const requestPath = '/1/indexes/*/recommendations';
|
|
310
|
+
const headers = {};
|
|
311
|
+
const queryParameters = {};
|
|
312
|
+
const request = {
|
|
313
|
+
method: 'POST',
|
|
314
|
+
path: requestPath,
|
|
315
|
+
queryParameters,
|
|
316
|
+
headers,
|
|
317
|
+
data: getRecommendationsParams,
|
|
318
|
+
useReadTransporter: true,
|
|
319
|
+
cacheable: true,
|
|
320
|
+
};
|
|
321
|
+
return transporter.request(request, requestOptions);
|
|
322
|
+
},
|
|
323
|
+
/**
|
|
324
|
+
* List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
|
|
325
|
+
*
|
|
326
|
+
* Required API Key ACLs:
|
|
327
|
+
* - settings.
|
|
328
|
+
*
|
|
329
|
+
* @param searchRecommendRules - The searchRecommendRules object.
|
|
330
|
+
* @param searchRecommendRules.indexName - Name of the index on which to perform the operation.
|
|
331
|
+
* @param searchRecommendRules.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
332
|
+
* @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.
|
|
333
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
334
|
+
*/
|
|
335
|
+
searchRecommendRules({ indexName, model, searchRecommendRulesParams, }, requestOptions) {
|
|
336
|
+
if (!indexName) {
|
|
337
|
+
throw new Error('Parameter `indexName` is required when calling `searchRecommendRules`.');
|
|
338
|
+
}
|
|
339
|
+
if (!model) {
|
|
340
|
+
throw new Error('Parameter `model` is required when calling `searchRecommendRules`.');
|
|
341
|
+
}
|
|
342
|
+
const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/search'
|
|
343
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
344
|
+
.replace('{model}', encodeURIComponent(model));
|
|
345
|
+
const headers = {};
|
|
346
|
+
const queryParameters = {};
|
|
347
|
+
const request = {
|
|
348
|
+
method: 'POST',
|
|
349
|
+
path: requestPath,
|
|
350
|
+
queryParameters,
|
|
351
|
+
headers,
|
|
352
|
+
data: searchRecommendRulesParams ? searchRecommendRulesParams : {},
|
|
353
|
+
useReadTransporter: true,
|
|
354
|
+
cacheable: true,
|
|
355
|
+
};
|
|
356
|
+
return transporter.request(request, requestOptions);
|
|
357
|
+
},
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// 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.
|
|
362
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
363
|
+
function recommendClient(appId, apiKey, options) {
|
|
364
|
+
if (!appId || typeof appId !== 'string') {
|
|
365
|
+
throw new Error('`appId` is missing.');
|
|
366
|
+
}
|
|
367
|
+
if (!apiKey || typeof apiKey !== 'string') {
|
|
368
|
+
throw new Error('`apiKey` is missing.');
|
|
369
|
+
}
|
|
370
|
+
return {
|
|
371
|
+
...createRecommendClient({
|
|
372
|
+
appId,
|
|
373
|
+
apiKey,
|
|
374
|
+
timeouts: {
|
|
375
|
+
connect: clientCommon.DEFAULT_CONNECT_TIMEOUT_NODE,
|
|
376
|
+
read: clientCommon.DEFAULT_READ_TIMEOUT_NODE,
|
|
377
|
+
write: clientCommon.DEFAULT_WRITE_TIMEOUT_NODE,
|
|
378
|
+
},
|
|
379
|
+
requester: requesterNodeHttp.createHttpRequester(),
|
|
380
|
+
algoliaAgents: [{ segment: 'Node.js', version: process.versions.node }],
|
|
381
|
+
responsesCache: clientCommon.createNullCache(),
|
|
382
|
+
requestsCache: clientCommon.createNullCache(),
|
|
383
|
+
hostsCache: clientCommon.createMemoryCache(),
|
|
384
|
+
...options,
|
|
385
|
+
}),
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
exports.apiClientVersion = apiClientVersion;
|
|
390
|
+
exports.recommendClient = recommendClient;
|