@algolia/recommend 5.0.0-alpha.8 → 5.0.0-alpha.80

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.
Files changed (287) hide show
  1. package/dist/builds/browser.d.ts +5 -5
  2. package/dist/builds/node.d.ts +5 -5
  3. package/dist/model/advancedSyntaxFeatures.d.ts +1 -1
  4. package/dist/model/advancedSyntaxFeatures.d.ts.map +1 -1
  5. package/dist/model/alternativesAsExact.d.ts +1 -1
  6. package/dist/model/alternativesAsExact.d.ts.map +1 -1
  7. package/dist/model/anchoring.d.ts +5 -0
  8. package/dist/model/anchoring.d.ts.map +1 -0
  9. package/dist/model/aroundPrecision.d.ts +6 -0
  10. package/dist/model/aroundPrecision.d.ts.map +1 -0
  11. package/dist/model/aroundPrecisionFromValueInner.d.ts +5 -0
  12. package/dist/model/aroundPrecisionFromValueInner.d.ts.map +1 -0
  13. package/dist/model/aroundRadius.d.ts +5 -5
  14. package/dist/model/aroundRadius.d.ts.map +1 -1
  15. package/dist/model/aroundRadiusAll.d.ts +1 -1
  16. package/dist/model/aroundRadiusAll.d.ts.map +1 -1
  17. package/dist/model/automaticFacetFilter.d.ts +18 -0
  18. package/dist/model/automaticFacetFilter.d.ts.map +1 -0
  19. package/dist/model/automaticFacetFilters.d.ts +6 -0
  20. package/dist/model/automaticFacetFilters.d.ts.map +1 -0
  21. package/dist/model/baseRecommendRequest.d.ts +14 -17
  22. package/dist/model/baseRecommendRequest.d.ts.map +1 -1
  23. package/dist/model/baseRecommendationsQuery.d.ts +12 -0
  24. package/dist/model/baseRecommendationsQuery.d.ts.map +1 -0
  25. package/dist/model/baseSearchParams.d.ts +3 -3
  26. package/dist/model/baseSearchParams.d.ts.map +1 -1
  27. package/dist/model/baseSearchParamsWithoutQuery.d.ts +118 -122
  28. package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  29. package/dist/model/baseSearchResponse.d.ts +95 -101
  30. package/dist/model/baseSearchResponse.d.ts.map +1 -1
  31. package/dist/model/baseSearchResponseRedirect.d.ts +8 -0
  32. package/dist/model/baseSearchResponseRedirect.d.ts.map +1 -0
  33. package/dist/model/baseTrendingFacetsQuery.d.ts +9 -0
  34. package/dist/model/baseTrendingFacetsQuery.d.ts.map +1 -0
  35. package/dist/model/baseTrendingItemsQuery.d.ts +16 -0
  36. package/dist/model/baseTrendingItemsQuery.d.ts.map +1 -0
  37. package/dist/model/clientMethodProps.d.ts +127 -60
  38. package/dist/model/clientMethodProps.d.ts.map +1 -1
  39. package/dist/model/condition.d.ts +17 -0
  40. package/dist/model/condition.d.ts.map +1 -0
  41. package/dist/model/consequence.d.ts +26 -0
  42. package/dist/model/consequence.d.ts.map +1 -0
  43. package/dist/model/consequenceHide.d.ts +10 -0
  44. package/dist/model/consequenceHide.d.ts.map +1 -0
  45. package/dist/model/consequenceParams.d.ts +5 -0
  46. package/dist/model/consequenceParams.d.ts.map +1 -0
  47. package/dist/model/consequenceQuery.d.ts +6 -0
  48. package/dist/model/consequenceQuery.d.ts.map +1 -0
  49. package/dist/model/consequenceQueryObject.d.ts +12 -0
  50. package/dist/model/consequenceQueryObject.d.ts.map +1 -0
  51. package/dist/model/deletedAtResponse.d.ts +14 -0
  52. package/dist/model/deletedAtResponse.d.ts.map +1 -0
  53. package/dist/model/distinct.d.ts +4 -4
  54. package/dist/model/distinct.d.ts.map +1 -1
  55. package/dist/model/edit.d.ts +13 -0
  56. package/dist/model/edit.d.ts.map +1 -0
  57. package/dist/model/editType.d.ts +5 -0
  58. package/dist/model/editType.d.ts.map +1 -0
  59. package/dist/model/errorBase.d.ts +6 -6
  60. package/dist/model/errorBase.d.ts.map +1 -1
  61. package/dist/model/exactOnSingleWordQuery.d.ts +4 -4
  62. package/dist/model/exactOnSingleWordQuery.d.ts.map +1 -1
  63. package/dist/model/facetFilters.d.ts +5 -5
  64. package/dist/model/facetFilters.d.ts.map +1 -1
  65. package/dist/model/facetOrdering.d.ts +12 -12
  66. package/dist/model/facetOrdering.d.ts.map +1 -1
  67. package/dist/model/facets.d.ts +9 -9
  68. package/dist/model/facets.d.ts.map +1 -1
  69. package/dist/model/facetsStats.d.ts +18 -18
  70. package/dist/model/facetsStats.d.ts.map +1 -1
  71. package/dist/model/getRecommendTaskResponse.d.ts +5 -0
  72. package/dist/model/getRecommendTaskResponse.d.ts.map +1 -0
  73. package/dist/model/getRecommendationsParams.d.ts +10 -10
  74. package/dist/model/getRecommendationsParams.d.ts.map +1 -1
  75. package/dist/model/getRecommendationsResponse.d.ts +4 -4
  76. package/dist/model/getRecommendationsResponse.d.ts.map +1 -1
  77. package/dist/model/highlightResult.d.ts +2 -2
  78. package/dist/model/highlightResult.d.ts.map +1 -1
  79. package/dist/model/highlightResultOption.d.ts +19 -19
  80. package/dist/model/highlightResultOption.d.ts.map +1 -1
  81. package/dist/model/ignorePlurals.d.ts +4 -4
  82. package/dist/model/ignorePlurals.d.ts.map +1 -1
  83. package/dist/model/index.d.ts +86 -53
  84. package/dist/model/index.d.ts.map +1 -1
  85. package/dist/model/indexSettingsAsSearchParams.d.ts +166 -160
  86. package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  87. package/dist/model/matchLevel.d.ts +4 -4
  88. package/dist/model/matchLevel.d.ts.map +1 -1
  89. package/dist/model/matchedGeoLocation.d.ts +14 -14
  90. package/dist/model/matchedGeoLocation.d.ts.map +1 -1
  91. package/dist/model/mixedSearchFilters.d.ts +1 -1
  92. package/dist/model/mixedSearchFilters.d.ts.map +1 -1
  93. package/dist/model/mode.d.ts +5 -0
  94. package/dist/model/mode.d.ts.map +1 -0
  95. package/dist/model/numericFilters.d.ts +5 -5
  96. package/dist/model/numericFilters.d.ts.map +1 -1
  97. package/dist/model/optionalFilters.d.ts +5 -5
  98. package/dist/model/optionalFilters.d.ts.map +1 -1
  99. package/dist/model/params.d.ts +13 -0
  100. package/dist/model/params.d.ts.map +1 -0
  101. package/dist/model/personalization.d.ts +14 -14
  102. package/dist/model/personalization.d.ts.map +1 -1
  103. package/dist/model/promote.d.ts +4 -0
  104. package/dist/model/promote.d.ts.map +1 -0
  105. package/dist/model/promoteObjectID.d.ts +14 -0
  106. package/dist/model/promoteObjectID.d.ts.map +1 -0
  107. package/dist/model/promoteObjectIDs.d.ts +14 -0
  108. package/dist/model/promoteObjectIDs.d.ts.map +1 -0
  109. package/dist/model/queryType.d.ts +4 -4
  110. package/dist/model/queryType.d.ts.map +1 -1
  111. package/dist/model/rankingInfo.d.ts +50 -50
  112. package/dist/model/rankingInfo.d.ts.map +1 -1
  113. package/dist/model/reRankingApplyFilter.d.ts +5 -5
  114. package/dist/model/reRankingApplyFilter.d.ts.map +1 -1
  115. package/dist/model/recommendHit.d.ts +26 -26
  116. package/dist/model/recommendHit.d.ts.map +1 -1
  117. package/dist/model/recommendHits.d.ts +12 -4
  118. package/dist/model/recommendHits.d.ts.map +1 -1
  119. package/dist/model/recommendModels.d.ts +2 -0
  120. package/dist/model/recommendModels.d.ts.map +1 -0
  121. package/dist/model/recommendationModels.d.ts +4 -4
  122. package/dist/model/recommendationModels.d.ts.map +1 -1
  123. package/dist/model/recommendationsQuery.d.ts +4 -0
  124. package/dist/model/recommendationsQuery.d.ts.map +1 -0
  125. package/dist/model/recommendationsRequest.d.ts +4 -3
  126. package/dist/model/recommendationsRequest.d.ts.map +1 -1
  127. package/dist/model/recommendationsResponse.d.ts +3 -3
  128. package/dist/model/recommendationsResponse.d.ts.map +1 -1
  129. package/dist/model/redirectRuleIndexMetadata.d.ts +21 -0
  130. package/dist/model/redirectRuleIndexMetadata.d.ts.map +1 -0
  131. package/dist/model/redirectRuleIndexMetadataData.d.ts +7 -0
  132. package/dist/model/redirectRuleIndexMetadataData.d.ts.map +1 -0
  133. package/dist/model/removeStopWords.d.ts +4 -4
  134. package/dist/model/removeStopWords.d.ts.map +1 -1
  135. package/dist/model/removeWordsIfNoResults.d.ts +4 -4
  136. package/dist/model/removeWordsIfNoResults.d.ts.map +1 -1
  137. package/dist/model/renderingContent.d.ts +7 -7
  138. package/dist/model/renderingContent.d.ts.map +1 -1
  139. package/dist/model/ruleResponse.d.ts +27 -0
  140. package/dist/model/ruleResponse.d.ts.map +1 -0
  141. package/dist/model/ruleResponseMetadata.d.ts +7 -0
  142. package/dist/model/ruleResponseMetadata.d.ts.map +1 -0
  143. package/dist/model/searchParamsObject.d.ts +3 -3
  144. package/dist/model/searchParamsObject.d.ts.map +1 -1
  145. package/dist/model/searchParamsQuery.d.ts +6 -6
  146. package/dist/model/searchParamsQuery.d.ts.map +1 -1
  147. package/dist/model/searchRecommendRulesParams.d.ts +30 -0
  148. package/dist/model/searchRecommendRulesParams.d.ts.map +1 -0
  149. package/dist/model/searchRecommendRulesResponse.d.ts +20 -0
  150. package/dist/model/searchRecommendRulesResponse.d.ts.map +1 -0
  151. package/dist/model/semanticSearch.d.ts +10 -0
  152. package/dist/model/semanticSearch.d.ts.map +1 -0
  153. package/dist/model/snippetResult.d.ts +2 -2
  154. package/dist/model/snippetResult.d.ts.map +1 -1
  155. package/dist/model/snippetResultOption.d.ts +11 -11
  156. package/dist/model/snippetResultOption.d.ts.map +1 -1
  157. package/dist/model/sortRemainingBy.d.ts +4 -4
  158. package/dist/model/sortRemainingBy.d.ts.map +1 -1
  159. package/dist/model/tagFilters.d.ts +5 -5
  160. package/dist/model/tagFilters.d.ts.map +1 -1
  161. package/dist/model/taskStatus.d.ts +5 -0
  162. package/dist/model/taskStatus.d.ts.map +1 -0
  163. package/dist/model/trendingFacetsModel.d.ts +5 -0
  164. package/dist/model/trendingFacetsModel.d.ts.map +1 -0
  165. package/dist/model/trendingFacetsQuery.d.ts +4 -0
  166. package/dist/model/trendingFacetsQuery.d.ts.map +1 -0
  167. package/dist/model/trendingItemsModel.d.ts +5 -0
  168. package/dist/model/trendingItemsModel.d.ts.map +1 -0
  169. package/dist/model/trendingItemsQuery.d.ts +4 -0
  170. package/dist/model/trendingItemsQuery.d.ts.map +1 -0
  171. package/dist/model/typoTolerance.d.ts +5 -5
  172. package/dist/model/typoTolerance.d.ts.map +1 -1
  173. package/dist/model/typoToleranceEnum.d.ts +1 -1
  174. package/dist/model/typoToleranceEnum.d.ts.map +1 -1
  175. package/dist/model/value.d.ts +8 -8
  176. package/dist/model/value.d.ts.map +1 -1
  177. package/dist/recommend.cjs +381 -0
  178. package/dist/recommend.esm.browser.js +553 -468
  179. package/dist/recommend.esm.node.js +370 -235
  180. package/dist/recommend.umd.js +2 -2
  181. package/dist/src/recommendClient.d.ts +129 -81
  182. package/dist/src/recommendClient.d.ts.map +1 -1
  183. package/index.js +1 -1
  184. package/model/advancedSyntaxFeatures.ts +1 -1
  185. package/model/alternativesAsExact.ts +1 -1
  186. package/model/anchoring.ts +6 -0
  187. package/model/aroundPrecision.ts +8 -0
  188. package/model/aroundPrecisionFromValueInner.ts +7 -0
  189. package/model/aroundRadius.ts +2 -2
  190. package/model/aroundRadiusAll.ts +1 -1
  191. package/model/automaticFacetFilter.ts +21 -0
  192. package/model/automaticFacetFilters.ts +8 -0
  193. package/model/baseRecommendRequest.ts +5 -11
  194. package/model/baseRecommendationsQuery.ts +17 -0
  195. package/model/baseSearchParams.ts +1 -1
  196. package/model/baseSearchParamsWithoutQuery.ts +38 -43
  197. package/model/baseSearchResponse.ts +21 -28
  198. package/model/baseSearchResponseRedirect.ts +10 -0
  199. package/model/baseTrendingFacetsQuery.ts +12 -0
  200. package/model/baseTrendingItemsQuery.ts +22 -0
  201. package/model/clientMethodProps.ts +83 -11
  202. package/model/condition.ts +22 -0
  203. package/model/consequence.ts +32 -0
  204. package/model/consequenceHide.ts +11 -0
  205. package/model/consequenceParams.ts +9 -0
  206. package/model/consequenceQuery.ts +8 -0
  207. package/model/consequenceQueryObject.ts +15 -0
  208. package/model/deletedAtResponse.ts +16 -0
  209. package/model/distinct.ts +2 -2
  210. package/model/edit.ts +17 -0
  211. package/model/editType.ts +6 -0
  212. package/model/errorBase.ts +1 -1
  213. package/model/exactOnSingleWordQuery.ts +2 -2
  214. package/model/facetFilters.ts +2 -2
  215. package/model/facetOrdering.ts +3 -3
  216. package/model/facets.ts +2 -2
  217. package/model/facetsStats.ts +5 -5
  218. package/model/getRecommendTaskResponse.ts +7 -0
  219. package/model/getRecommendationsParams.ts +3 -3
  220. package/model/getRecommendationsResponse.ts +1 -1
  221. package/model/highlightResult.ts +1 -1
  222. package/model/highlightResultOption.ts +2 -2
  223. package/model/ignorePlurals.ts +2 -2
  224. package/model/index.ts +39 -6
  225. package/model/indexSettingsAsSearchParams.ts +53 -44
  226. package/model/matchLevel.ts +1 -1
  227. package/model/matchedGeoLocation.ts +1 -1
  228. package/model/mixedSearchFilters.ts +1 -1
  229. package/model/mode.ts +6 -0
  230. package/model/numericFilters.ts +2 -2
  231. package/model/optionalFilters.ts +2 -2
  232. package/model/params.ts +18 -0
  233. package/model/personalization.ts +1 -1
  234. package/model/promote.ts +6 -0
  235. package/model/promoteObjectID.ts +16 -0
  236. package/model/promoteObjectIDs.ts +16 -0
  237. package/model/queryType.ts +2 -2
  238. package/model/rankingInfo.ts +1 -1
  239. package/model/reRankingApplyFilter.ts +2 -2
  240. package/model/recommendHit.ts +4 -4
  241. package/model/recommendHits.ts +11 -1
  242. package/model/recommendModels.ts +7 -0
  243. package/model/recommendationModels.ts +2 -2
  244. package/model/recommendationsQuery.ts +7 -0
  245. package/model/recommendationsRequest.ts +8 -4
  246. package/model/recommendationsResponse.ts +1 -1
  247. package/model/redirectRuleIndexMetadata.ts +27 -0
  248. package/model/redirectRuleIndexMetadataData.ts +8 -0
  249. package/model/removeStopWords.ts +2 -2
  250. package/model/removeWordsIfNoResults.ts +2 -2
  251. package/model/renderingContent.ts +2 -2
  252. package/model/ruleResponse.ts +34 -0
  253. package/model/ruleResponseMetadata.ts +8 -0
  254. package/model/searchParamsObject.ts +1 -1
  255. package/model/searchParamsQuery.ts +2 -2
  256. package/model/searchRecommendRulesParams.ts +36 -0
  257. package/model/searchRecommendRulesResponse.ts +25 -0
  258. package/model/semanticSearch.ts +11 -0
  259. package/model/snippetResult.ts +1 -1
  260. package/model/snippetResultOption.ts +2 -2
  261. package/model/sortRemainingBy.ts +2 -2
  262. package/model/tagFilters.ts +2 -2
  263. package/model/taskStatus.ts +6 -0
  264. package/model/trendingFacetsModel.ts +6 -0
  265. package/model/trendingFacetsQuery.ts +7 -0
  266. package/model/trendingItemsModel.ts +6 -0
  267. package/model/trendingItemsQuery.ts +6 -0
  268. package/model/typoTolerance.ts +2 -2
  269. package/model/typoToleranceEnum.ts +1 -1
  270. package/model/value.ts +1 -1
  271. package/package.json +30 -13
  272. package/dist/model/baseRecommendationRequest.d.ts +0 -9
  273. package/dist/model/baseRecommendationRequest.d.ts.map +0 -1
  274. package/dist/model/baseTrendingRequest.d.ts +0 -13
  275. package/dist/model/baseTrendingRequest.d.ts.map +0 -1
  276. package/dist/model/recommendationRequest.d.ts +0 -4
  277. package/dist/model/recommendationRequest.d.ts.map +0 -1
  278. package/dist/model/trendingModels.d.ts +0 -5
  279. package/dist/model/trendingModels.d.ts.map +0 -1
  280. package/dist/model/trendingRequest.d.ts +0 -4
  281. package/dist/model/trendingRequest.d.ts.map +0 -1
  282. package/dist/recommend.cjs.js +0 -248
  283. package/model/baseRecommendationRequest.ts +0 -12
  284. package/model/baseTrendingRequest.ts +0 -17
  285. package/model/recommendationRequest.ts +0 -7
  286. package/model/trendingModels.ts +0 -6
  287. package/model/trendingRequest.ts +0 -6
@@ -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,5 @@
1
+ /**
2
+ * Trending facets model.
3
+ */
4
+ export type TrendingFacetsModel = 'trending-facets';
5
+ //# sourceMappingURL=trendingFacetsModel.d.ts.map
@@ -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,5 @@
1
+ /**
2
+ * Trending items model.
3
+ */
4
+ export type TrendingItemsModel = 'trending-items';
5
+ //# sourceMappingURL=trendingItemsModel.d.ts.map
@@ -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
- * Controls whether typo tolerance is enabled and how it is applied.
4
- */
5
- export declare type TypoTolerance = TypoToleranceEnum | boolean;
1
+ import type { TypoToleranceEnum } from './typoToleranceEnum';
2
+ /**
3
+ * Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied.
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,oBAAY,aAAa,GAAG,iBAAiB,GAAG,OAAO,CAAC"}
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,2 @@
1
- export declare type TypoToleranceEnum = 'min' | 'strict';
1
+ export type TypoToleranceEnum = 'min' | 'strict';
2
2
  //# sourceMappingURL=typoToleranceEnum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typoToleranceEnum.d.ts","sourceRoot":"","sources":["../../model/typoToleranceEnum.ts"],"names":[],"mappings":"AAEA,oBAAY,iBAAiB,GAAG,KAAK,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"typoToleranceEnum.d.ts","sourceRoot":"","sources":["../../model/typoToleranceEnum.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,CAAC"}
@@ -1,9 +1,9 @@
1
- import type { SortRemainingBy } from './sortRemainingBy';
2
- export declare type Value = {
3
- /**
4
- * Pinned order of facet lists.
5
- */
6
- order?: string[];
7
- sortRemainingBy?: SortRemainingBy;
8
- };
1
+ import type { SortRemainingBy } from './sortRemainingBy';
2
+ export type Value = {
3
+ /**
4
+ * Pinned order of facet lists.
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,oBAAY,KAAK,GAAG;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAEjB,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC,CAAC"}
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,381 @@
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.80';
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
+ * @summary Send requests to the Algolia REST API.
93
+ * @param del - The del object.
94
+ * @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
95
+ * @param del.parameters - Query parameters to apply to the current query.
96
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
97
+ */
98
+ del({ path, parameters }, requestOptions) {
99
+ if (!path) {
100
+ throw new Error('Parameter `path` is required when calling `del`.');
101
+ }
102
+ const requestPath = '/1{path}'.replace('{path}', path);
103
+ const headers = {};
104
+ const queryParameters = parameters ? parameters : {};
105
+ const request = {
106
+ method: 'DELETE',
107
+ path: requestPath,
108
+ queryParameters,
109
+ headers,
110
+ };
111
+ return transporter.request(request, requestOptions);
112
+ },
113
+ /**
114
+ * Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
115
+ *
116
+ * @summary Delete a Recommend rule.
117
+ * @param deleteRecommendRule - The deleteRecommendRule object.
118
+ * @param deleteRecommendRule.indexName - Index on which to perform the request.
119
+ * @param deleteRecommendRule.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
120
+ * @param deleteRecommendRule.objectID - Unique record (object) identifier.
121
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
122
+ */
123
+ deleteRecommendRule({ indexName, model, objectID }, requestOptions) {
124
+ if (!indexName) {
125
+ throw new Error('Parameter `indexName` is required when calling `deleteRecommendRule`.');
126
+ }
127
+ if (!model) {
128
+ throw new Error('Parameter `model` is required when calling `deleteRecommendRule`.');
129
+ }
130
+ if (!objectID) {
131
+ throw new Error('Parameter `objectID` is required when calling `deleteRecommendRule`.');
132
+ }
133
+ const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
134
+ .replace('{indexName}', encodeURIComponent(indexName))
135
+ .replace('{model}', encodeURIComponent(model))
136
+ .replace('{objectID}', encodeURIComponent(objectID));
137
+ const headers = {};
138
+ const queryParameters = {};
139
+ const request = {
140
+ method: 'DELETE',
141
+ path: requestPath,
142
+ queryParameters,
143
+ headers,
144
+ };
145
+ return transporter.request(request, requestOptions);
146
+ },
147
+ /**
148
+ * This method allow you to send requests to the Algolia REST API.
149
+ *
150
+ * @summary Send requests to the Algolia REST API.
151
+ * @param get - The get object.
152
+ * @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
153
+ * @param get.parameters - Query parameters to apply to the current query.
154
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
155
+ */
156
+ get({ path, parameters }, requestOptions) {
157
+ if (!path) {
158
+ throw new Error('Parameter `path` is required when calling `get`.');
159
+ }
160
+ const requestPath = '/1{path}'.replace('{path}', path);
161
+ const headers = {};
162
+ const queryParameters = parameters ? parameters : {};
163
+ const request = {
164
+ method: 'GET',
165
+ path: requestPath,
166
+ queryParameters,
167
+ headers,
168
+ };
169
+ return transporter.request(request, requestOptions);
170
+ },
171
+ /**
172
+ * Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
173
+ *
174
+ * @summary Get a Recommend rule.
175
+ * @param getRecommendRule - The getRecommendRule object.
176
+ * @param getRecommendRule.indexName - Index on which to perform the request.
177
+ * @param getRecommendRule.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
178
+ * @param getRecommendRule.objectID - Unique record (object) identifier.
179
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
180
+ */
181
+ getRecommendRule({ indexName, model, objectID }, requestOptions) {
182
+ if (!indexName) {
183
+ throw new Error('Parameter `indexName` is required when calling `getRecommendRule`.');
184
+ }
185
+ if (!model) {
186
+ throw new Error('Parameter `model` is required when calling `getRecommendRule`.');
187
+ }
188
+ if (!objectID) {
189
+ throw new Error('Parameter `objectID` is required when calling `getRecommendRule`.');
190
+ }
191
+ const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
192
+ .replace('{indexName}', encodeURIComponent(indexName))
193
+ .replace('{model}', encodeURIComponent(model))
194
+ .replace('{objectID}', encodeURIComponent(objectID));
195
+ const headers = {};
196
+ const queryParameters = {};
197
+ const request = {
198
+ method: 'GET',
199
+ path: requestPath,
200
+ queryParameters,
201
+ headers,
202
+ };
203
+ return transporter.request(request, requestOptions);
204
+ },
205
+ /**
206
+ * 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.
207
+ *
208
+ * @summary Get a Recommend task\'s status.
209
+ * @param getRecommendStatus - The getRecommendStatus object.
210
+ * @param getRecommendStatus.indexName - Index on which to perform the request.
211
+ * @param getRecommendStatus.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
212
+ * @param getRecommendStatus.taskID - Unique identifier of a task. Numeric value (up to 64bits).
213
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
214
+ */
215
+ getRecommendStatus({ indexName, model, taskID }, requestOptions) {
216
+ if (!indexName) {
217
+ throw new Error('Parameter `indexName` is required when calling `getRecommendStatus`.');
218
+ }
219
+ if (!model) {
220
+ throw new Error('Parameter `model` is required when calling `getRecommendStatus`.');
221
+ }
222
+ if (!taskID) {
223
+ throw new Error('Parameter `taskID` is required when calling `getRecommendStatus`.');
224
+ }
225
+ const requestPath = '/1/indexes/{indexName}/{model}/task/{taskID}'
226
+ .replace('{indexName}', encodeURIComponent(indexName))
227
+ .replace('{model}', encodeURIComponent(model))
228
+ .replace('{taskID}', encodeURIComponent(taskID));
229
+ const headers = {};
230
+ const queryParameters = {};
231
+ const request = {
232
+ method: 'GET',
233
+ path: requestPath,
234
+ queryParameters,
235
+ headers,
236
+ };
237
+ return transporter.request(request, requestOptions);
238
+ },
239
+ /**
240
+ * 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).
241
+ *
242
+ * @summary Get recommendations and trending items.
243
+ * @param getRecommendationsParams - The getRecommendationsParams object.
244
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
245
+ */
246
+ getRecommendations(getRecommendationsParams, requestOptions) {
247
+ if (!getRecommendationsParams) {
248
+ throw new Error('Parameter `getRecommendationsParams` is required when calling `getRecommendations`.');
249
+ }
250
+ if (!getRecommendationsParams.requests) {
251
+ throw new Error('Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.');
252
+ }
253
+ const requestPath = '/1/indexes/*/recommendations';
254
+ const headers = {};
255
+ const queryParameters = {};
256
+ const request = {
257
+ method: 'POST',
258
+ path: requestPath,
259
+ queryParameters,
260
+ headers,
261
+ data: getRecommendationsParams,
262
+ useReadTransporter: true,
263
+ cacheable: true,
264
+ };
265
+ return transporter.request(request, requestOptions);
266
+ },
267
+ /**
268
+ * This method allow you to send requests to the Algolia REST API.
269
+ *
270
+ * @summary Send requests to the Algolia REST API.
271
+ * @param post - The post object.
272
+ * @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
273
+ * @param post.parameters - Query parameters to apply to the current query.
274
+ * @param post.body - Parameters to send with the custom request.
275
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
276
+ */
277
+ post({ path, parameters, body }, requestOptions) {
278
+ if (!path) {
279
+ throw new Error('Parameter `path` is required when calling `post`.');
280
+ }
281
+ const requestPath = '/1{path}'.replace('{path}', path);
282
+ const headers = {};
283
+ const queryParameters = parameters ? parameters : {};
284
+ const request = {
285
+ method: 'POST',
286
+ path: requestPath,
287
+ queryParameters,
288
+ headers,
289
+ data: body ? body : {},
290
+ };
291
+ return transporter.request(request, requestOptions);
292
+ },
293
+ /**
294
+ * This method allow you to send requests to the Algolia REST API.
295
+ *
296
+ * @summary Send requests to the Algolia REST API.
297
+ * @param put - The put object.
298
+ * @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
299
+ * @param put.parameters - Query parameters to apply to the current query.
300
+ * @param put.body - Parameters to send with the custom request.
301
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
302
+ */
303
+ put({ path, parameters, body }, requestOptions) {
304
+ if (!path) {
305
+ throw new Error('Parameter `path` is required when calling `put`.');
306
+ }
307
+ const requestPath = '/1{path}'.replace('{path}', path);
308
+ const headers = {};
309
+ const queryParameters = parameters ? parameters : {};
310
+ const request = {
311
+ method: 'PUT',
312
+ path: requestPath,
313
+ queryParameters,
314
+ headers,
315
+ data: body ? body : {},
316
+ };
317
+ return transporter.request(request, requestOptions);
318
+ },
319
+ /**
320
+ * List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
321
+ *
322
+ * @summary List Recommend rules.
323
+ * @param searchRecommendRules - The searchRecommendRules object.
324
+ * @param searchRecommendRules.indexName - Index on which to perform the request.
325
+ * @param searchRecommendRules.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
326
+ * @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.
327
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
328
+ */
329
+ searchRecommendRules({ indexName, model, searchRecommendRulesParams, }, requestOptions) {
330
+ if (!indexName) {
331
+ throw new Error('Parameter `indexName` is required when calling `searchRecommendRules`.');
332
+ }
333
+ if (!model) {
334
+ throw new Error('Parameter `model` is required when calling `searchRecommendRules`.');
335
+ }
336
+ const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/search'
337
+ .replace('{indexName}', encodeURIComponent(indexName))
338
+ .replace('{model}', encodeURIComponent(model));
339
+ const headers = {};
340
+ const queryParameters = {};
341
+ const request = {
342
+ method: 'POST',
343
+ path: requestPath,
344
+ queryParameters,
345
+ headers,
346
+ data: searchRecommendRulesParams ? searchRecommendRulesParams : {},
347
+ useReadTransporter: true,
348
+ cacheable: true,
349
+ };
350
+ return transporter.request(request, requestOptions);
351
+ },
352
+ };
353
+ }
354
+
355
+ // 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.
356
+ function recommendClient(appId, apiKey, options) {
357
+ if (!appId || typeof appId !== 'string') {
358
+ throw new Error('`appId` is missing.');
359
+ }
360
+ if (!apiKey || typeof apiKey !== 'string') {
361
+ throw new Error('`apiKey` is missing.');
362
+ }
363
+ return createRecommendClient({
364
+ appId,
365
+ apiKey,
366
+ timeouts: {
367
+ connect: clientCommon.DEFAULT_CONNECT_TIMEOUT_NODE,
368
+ read: clientCommon.DEFAULT_READ_TIMEOUT_NODE,
369
+ write: clientCommon.DEFAULT_WRITE_TIMEOUT_NODE,
370
+ },
371
+ requester: requesterNodeHttp.createHttpRequester(),
372
+ algoliaAgents: [{ segment: 'Node.js', version: process.versions.node }],
373
+ responsesCache: clientCommon.createNullCache(),
374
+ requestsCache: clientCommon.createNullCache(),
375
+ hostsCache: clientCommon.createMemoryCache(),
376
+ ...options,
377
+ });
378
+ }
379
+
380
+ exports.apiClientVersion = apiClientVersion;
381
+ exports.recommendClient = recommendClient;