algoliasearch 5.0.0-beta.1 → 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/builds/browser.ts +13 -2
- package/builds/models.ts +140 -6
- package/builds/node.ts +37 -4
- package/dist/algoliasearch/builds/browser.d.ts +77 -70
- package/dist/algoliasearch/builds/browser.d.ts.map +1 -1
- package/dist/algoliasearch/builds/models.d.ts +4 -2
- package/dist/algoliasearch/builds/models.d.ts.map +1 -1
- package/dist/algoliasearch/builds/node.d.ts +77 -70
- package/dist/algoliasearch/builds/node.d.ts.map +1 -1
- package/dist/algoliasearch.cjs +524 -29
- package/dist/algoliasearch.esm.browser.js +517 -45
- package/dist/algoliasearch.esm.node.js +524 -29
- package/dist/algoliasearch.umd.js +2 -2
- package/dist/client-abtesting/src/abtestingClient.d.ts +1 -1
- package/dist/client-abtesting/src/abtestingClient.d.ts.map +1 -1
- package/dist/client-analytics/src/analyticsClient.d.ts +1 -1
- package/dist/client-analytics/src/analyticsClient.d.ts.map +1 -1
- package/dist/client-personalization/src/personalizationClient.d.ts +1 -1
- package/dist/client-personalization/src/personalizationClient.d.ts.map +1 -1
- package/dist/client-search/model/baseIndexSettings.d.ts +2 -2
- package/dist/client-search/model/baseIndexSettings.d.ts.map +1 -1
- package/dist/client-search/model/baseSearchResponse.d.ts +2 -18
- package/dist/client-search/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/client-search/model/browsePagination.d.ts +19 -0
- package/dist/client-search/model/browsePagination.d.ts.map +1 -0
- package/dist/client-search/model/browseResponse.d.ts +2 -1
- package/dist/client-search/model/browseResponse.d.ts.map +1 -1
- package/dist/client-search/model/clientMethodProps.d.ts +31 -23
- package/dist/client-search/model/clientMethodProps.d.ts.map +1 -1
- package/dist/client-search/model/facetFilters.d.ts +1 -2
- package/dist/client-search/model/facetFilters.d.ts.map +1 -1
- package/dist/client-search/model/fetchedIndex.d.ts +4 -0
- package/dist/client-search/model/fetchedIndex.d.ts.map +1 -1
- package/dist/client-search/model/index.d.ts +5 -2
- package/dist/client-search/model/index.d.ts.map +1 -1
- package/dist/client-search/model/numericFilters.d.ts +1 -2
- package/dist/client-search/model/numericFilters.d.ts.map +1 -1
- package/dist/client-search/model/optionalFilters.d.ts +1 -2
- package/dist/client-search/model/optionalFilters.d.ts.map +1 -1
- package/dist/client-search/model/rankingInfo.d.ts +3 -3
- package/dist/client-search/model/rankingInfo.d.ts.map +1 -1
- package/dist/client-search/model/reRankingApplyFilter.d.ts +1 -2
- package/dist/client-search/model/reRankingApplyFilter.d.ts.map +1 -1
- package/dist/client-search/model/redirect.d.ts +1 -1
- package/dist/client-search/model/redirectURL.d.ts +7 -0
- package/dist/client-search/model/redirectURL.d.ts.map +1 -0
- package/dist/client-search/model/renderingContent.d.ts +2 -0
- package/dist/client-search/model/renderingContent.d.ts.map +1 -1
- package/dist/client-search/model/replaceAllObjectsResponse.d.ts +11 -0
- package/dist/client-search/model/replaceAllObjectsResponse.d.ts.map +1 -0
- package/dist/client-search/model/searchForFacetValuesResponse.d.ts +1 -1
- package/dist/client-search/model/searchPagination.d.ts +19 -0
- package/dist/client-search/model/searchPagination.d.ts.map +1 -0
- package/dist/client-search/model/searchResponse.d.ts +2 -1
- package/dist/client-search/model/searchResponse.d.ts.map +1 -1
- package/dist/{lite/model/securedAPIKeyRestrictions.d.ts → client-search/model/securedApiKeyRestrictions.d.ts} +2 -2
- package/dist/client-search/model/{securedAPIKeyRestrictions.d.ts.map → securedApiKeyRestrictions.d.ts.map} +1 -1
- package/dist/client-search/model/tagFilters.d.ts +1 -2
- package/dist/client-search/model/tagFilters.d.ts.map +1 -1
- package/dist/client-search/model/value.d.ts +4 -0
- package/dist/client-search/model/value.d.ts.map +1 -1
- package/dist/client-search/src/searchClient.d.ts +67 -12
- package/dist/client-search/src/searchClient.d.ts.map +1 -1
- package/dist/lite/builds/browser.d.ts +4 -3
- package/dist/lite/builds/browser.d.ts.map +1 -1
- package/dist/lite/builds/node.d.ts +4 -3
- package/dist/lite/builds/node.d.ts.map +1 -1
- package/dist/lite/lite.cjs +38 -1
- package/dist/lite/lite.esm.browser.js +48 -18
- package/dist/lite/lite.esm.node.js +38 -1
- package/dist/lite/lite.umd.js +2 -2
- package/dist/lite/model/baseIndexSettings.d.ts +2 -2
- package/dist/lite/model/baseIndexSettings.d.ts.map +1 -1
- package/dist/lite/model/baseRecommendRequest.d.ts +17 -0
- package/dist/lite/model/baseRecommendRequest.d.ts.map +1 -0
- package/dist/lite/model/baseSearchResponse.d.ts +2 -18
- package/dist/lite/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/lite/model/boughtTogetherQuery.d.ts +4 -0
- package/dist/lite/model/boughtTogetherQuery.d.ts.map +1 -0
- package/dist/lite/model/browsePagination.d.ts +19 -0
- package/dist/lite/model/browsePagination.d.ts.map +1 -0
- package/dist/lite/model/browseResponse.d.ts +2 -1
- package/dist/lite/model/browseResponse.d.ts.map +1 -1
- package/dist/lite/model/clientMethodProps.d.ts +7 -0
- package/dist/lite/model/clientMethodProps.d.ts.map +1 -1
- package/dist/lite/model/facetFilters.d.ts +1 -2
- package/dist/lite/model/facetFilters.d.ts.map +1 -1
- package/dist/lite/model/fallbackParams.d.ts +3 -0
- package/dist/lite/model/fallbackParams.d.ts.map +1 -0
- package/dist/lite/model/fbtModel.d.ts +5 -0
- package/dist/lite/model/fbtModel.d.ts.map +1 -0
- package/dist/lite/model/frequentlyBoughtTogether.d.ts +9 -0
- package/dist/lite/model/frequentlyBoughtTogether.d.ts.map +1 -0
- package/dist/lite/model/getRecommendationsParams.d.ts +11 -0
- package/dist/lite/model/getRecommendationsParams.d.ts.map +1 -0
- package/dist/lite/model/getRecommendationsResponse.d.ts +5 -0
- package/dist/lite/model/getRecommendationsResponse.d.ts.map +1 -0
- package/dist/lite/model/index.d.ts +31 -40
- package/dist/lite/model/index.d.ts.map +1 -1
- package/dist/lite/model/lookingSimilar.d.ts +11 -0
- package/dist/lite/model/lookingSimilar.d.ts.map +1 -0
- package/dist/lite/model/lookingSimilarModel.d.ts +5 -0
- package/dist/lite/model/lookingSimilarModel.d.ts.map +1 -0
- package/dist/lite/model/lookingSimilarQuery.d.ts +4 -0
- package/dist/lite/model/lookingSimilarQuery.d.ts.map +1 -0
- package/dist/lite/model/numericFilters.d.ts +1 -2
- package/dist/lite/model/numericFilters.d.ts.map +1 -1
- package/dist/lite/model/optionalFilters.d.ts +1 -2
- package/dist/lite/model/optionalFilters.d.ts.map +1 -1
- package/dist/lite/model/rankingInfo.d.ts +3 -3
- package/dist/lite/model/rankingInfo.d.ts.map +1 -1
- package/dist/lite/model/reRankingApplyFilter.d.ts +1 -2
- package/dist/lite/model/reRankingApplyFilter.d.ts.map +1 -1
- package/dist/lite/model/recommendHit.d.ts +27 -0
- package/dist/lite/model/recommendHit.d.ts.map +1 -0
- package/dist/lite/model/recommendationsHit.d.ts +4 -0
- package/dist/lite/model/recommendationsHit.d.ts.map +1 -0
- package/dist/lite/model/recommendationsHits.d.ts +5 -0
- package/dist/lite/model/recommendationsHits.d.ts.map +1 -0
- package/dist/lite/model/recommendationsRequest.d.ts +8 -0
- package/dist/lite/model/recommendationsRequest.d.ts.map +1 -0
- package/dist/lite/model/recommendationsResults.d.ts +5 -0
- package/dist/lite/model/recommendationsResults.d.ts.map +1 -0
- package/dist/lite/model/recommendedForYou.d.ts +7 -0
- package/dist/lite/model/recommendedForYou.d.ts.map +1 -0
- package/dist/lite/model/recommendedForYouModel.d.ts +5 -0
- package/dist/lite/model/recommendedForYouModel.d.ts.map +1 -0
- package/dist/lite/model/recommendedForYouQuery.d.ts +4 -0
- package/dist/lite/model/recommendedForYouQuery.d.ts.map +1 -0
- package/dist/lite/model/redirect.d.ts +1 -1
- package/dist/lite/model/redirectURL.d.ts +7 -0
- package/dist/lite/model/redirectURL.d.ts.map +1 -0
- package/dist/lite/model/relatedModel.d.ts +5 -0
- package/dist/lite/model/relatedModel.d.ts.map +1 -0
- package/dist/lite/model/relatedProducts.d.ts +11 -0
- package/dist/lite/model/relatedProducts.d.ts.map +1 -0
- package/dist/lite/model/relatedQuery.d.ts +4 -0
- package/dist/lite/model/relatedQuery.d.ts.map +1 -0
- package/dist/lite/model/renderingContent.d.ts +2 -0
- package/dist/lite/model/renderingContent.d.ts.map +1 -1
- package/dist/lite/model/searchForFacetValuesResponse.d.ts +1 -1
- package/dist/lite/model/searchPagination.d.ts +19 -0
- package/dist/lite/model/searchPagination.d.ts.map +1 -0
- package/dist/lite/model/searchParams.d.ts +1 -2
- package/dist/lite/model/searchParams.d.ts.map +1 -1
- package/dist/lite/model/searchResponse.d.ts +2 -1
- package/dist/lite/model/searchResponse.d.ts.map +1 -1
- package/dist/lite/model/tagFilters.d.ts +1 -2
- package/dist/lite/model/tagFilters.d.ts.map +1 -1
- package/dist/lite/model/trendingFacetHit.d.ts +18 -0
- package/dist/lite/model/trendingFacetHit.d.ts.map +1 -0
- package/dist/lite/model/trendingFacets.d.ts +11 -0
- package/dist/lite/model/trendingFacets.d.ts.map +1 -0
- package/dist/lite/model/trendingFacetsModel.d.ts +5 -0
- package/dist/lite/model/trendingFacetsModel.d.ts.map +1 -0
- package/dist/lite/model/trendingFacetsQuery.d.ts +4 -0
- package/dist/lite/model/trendingFacetsQuery.d.ts.map +1 -0
- package/dist/lite/model/trendingItems.d.ts +15 -0
- package/dist/lite/model/trendingItems.d.ts.map +1 -0
- package/dist/lite/model/trendingItemsModel.d.ts +5 -0
- package/dist/lite/model/trendingItemsModel.d.ts.map +1 -0
- package/dist/lite/model/trendingItemsQuery.d.ts +4 -0
- package/dist/lite/model/trendingItemsQuery.d.ts.map +1 -0
- package/dist/lite/model/value.d.ts +4 -0
- package/dist/lite/model/value.d.ts.map +1 -1
- package/dist/lite/src/liteClient.d.ts +14 -2
- package/dist/lite/src/liteClient.d.ts.map +1 -1
- package/dist/recommend/model/advancedSyntaxFeatures.d.ts +2 -0
- package/dist/recommend/model/advancedSyntaxFeatures.d.ts.map +1 -0
- package/dist/recommend/model/alternativesAsExact.d.ts +2 -0
- package/dist/recommend/model/alternativesAsExact.d.ts.map +1 -0
- package/dist/recommend/model/aroundPrecision.d.ts +6 -0
- package/dist/recommend/model/aroundPrecision.d.ts.map +1 -0
- package/dist/recommend/model/aroundPrecisionFromValueInner.d.ts +14 -0
- package/dist/recommend/model/aroundPrecisionFromValueInner.d.ts.map +1 -0
- package/dist/recommend/model/aroundRadius.d.ts +6 -0
- package/dist/recommend/model/aroundRadius.d.ts.map +1 -0
- package/dist/recommend/model/aroundRadiusAll.d.ts +5 -0
- package/dist/recommend/model/aroundRadiusAll.d.ts.map +1 -0
- package/dist/recommend/model/autoFacetFilter.d.ts +14 -0
- package/dist/recommend/model/autoFacetFilter.d.ts.map +1 -0
- package/dist/recommend/model/baseRecommendRequest.d.ts +17 -0
- package/dist/recommend/model/baseRecommendRequest.d.ts.map +1 -0
- package/dist/recommend/model/baseSearchParams.d.ts +4 -0
- package/dist/recommend/model/baseSearchParams.d.ts.map +1 -0
- package/dist/recommend/model/baseSearchParamsWithoutQuery.d.ts +116 -0
- package/dist/recommend/model/baseSearchParamsWithoutQuery.d.ts.map +1 -0
- package/dist/recommend/model/baseSearchResponse.d.ts +94 -0
- package/dist/recommend/model/baseSearchResponse.d.ts.map +1 -0
- package/dist/recommend/model/boughtTogetherQuery.d.ts +4 -0
- package/dist/recommend/model/boughtTogetherQuery.d.ts.map +1 -0
- package/dist/recommend/model/clientMethodProps.d.ts +135 -0
- package/dist/recommend/model/clientMethodProps.d.ts.map +1 -0
- package/dist/recommend/model/condition.d.ts +14 -0
- package/dist/recommend/model/condition.d.ts.map +1 -0
- package/dist/recommend/model/consequence.d.ts +18 -0
- package/dist/recommend/model/consequence.d.ts.map +1 -0
- package/dist/{lite/model/updatedRuleResponse.d.ts → recommend/model/deletedAtResponse.d.ts} +9 -10
- package/dist/recommend/model/deletedAtResponse.d.ts.map +1 -0
- package/dist/recommend/model/distinct.d.ts +5 -0
- package/dist/recommend/model/distinct.d.ts.map +1 -0
- package/dist/recommend/model/errorBase.d.ts +7 -0
- package/dist/recommend/model/errorBase.d.ts.map +1 -0
- package/dist/recommend/model/exactOnSingleWordQuery.d.ts +5 -0
- package/dist/recommend/model/exactOnSingleWordQuery.d.ts.map +1 -0
- package/dist/recommend/model/exhaustive.d.ts +26 -0
- package/dist/recommend/model/exhaustive.d.ts.map +1 -0
- package/dist/recommend/model/facetFilters.d.ts +5 -0
- package/dist/recommend/model/facetFilters.d.ts.map +1 -0
- package/dist/recommend/model/facetOrdering.d.ts +13 -0
- package/dist/recommend/model/facetOrdering.d.ts.map +1 -0
- package/dist/recommend/model/facets.d.ts +10 -0
- package/dist/recommend/model/facets.d.ts.map +1 -0
- package/dist/recommend/model/facetsStats.d.ts +19 -0
- package/dist/recommend/model/facetsStats.d.ts.map +1 -0
- package/dist/recommend/model/fallbackParams.d.ts +3 -0
- package/dist/recommend/model/fallbackParams.d.ts.map +1 -0
- package/dist/recommend/model/fbtModel.d.ts +5 -0
- package/dist/recommend/model/fbtModel.d.ts.map +1 -0
- package/dist/recommend/model/frequentlyBoughtTogether.d.ts +9 -0
- package/dist/recommend/model/frequentlyBoughtTogether.d.ts.map +1 -0
- package/dist/recommend/model/getRecommendTaskResponse.d.ts +5 -0
- package/dist/recommend/model/getRecommendTaskResponse.d.ts.map +1 -0
- package/dist/recommend/model/getRecommendationsParams.d.ts +11 -0
- package/dist/recommend/model/getRecommendationsParams.d.ts.map +1 -0
- package/dist/recommend/model/getRecommendationsResponse.d.ts +5 -0
- package/dist/recommend/model/getRecommendationsResponse.d.ts.map +1 -0
- package/dist/recommend/model/hideConsequenceObject.d.ts +10 -0
- package/dist/recommend/model/hideConsequenceObject.d.ts.map +1 -0
- package/dist/recommend/model/highlightResult.d.ts +3 -0
- package/dist/recommend/model/highlightResult.d.ts.map +1 -0
- package/dist/recommend/model/highlightResultOption.d.ts +20 -0
- package/dist/recommend/model/highlightResultOption.d.ts.map +1 -0
- package/dist/recommend/model/ignorePlurals.d.ts +6 -0
- package/dist/recommend/model/ignorePlurals.d.ts.map +1 -0
- package/dist/recommend/model/index.d.ts +94 -0
- package/dist/recommend/model/index.d.ts.map +1 -0
- package/dist/recommend/model/indexSettingsAsSearchParams.d.ts +160 -0
- package/dist/recommend/model/indexSettingsAsSearchParams.d.ts.map +1 -0
- package/dist/recommend/model/lookingSimilar.d.ts +11 -0
- package/dist/recommend/model/lookingSimilar.d.ts.map +1 -0
- package/dist/recommend/model/lookingSimilarModel.d.ts +5 -0
- package/dist/recommend/model/lookingSimilarModel.d.ts.map +1 -0
- package/dist/recommend/model/lookingSimilarQuery.d.ts +4 -0
- package/dist/recommend/model/lookingSimilarQuery.d.ts.map +1 -0
- package/dist/recommend/model/matchLevel.d.ts +5 -0
- package/dist/recommend/model/matchLevel.d.ts.map +1 -0
- package/dist/recommend/model/matchedGeoLocation.d.ts +15 -0
- package/dist/recommend/model/matchedGeoLocation.d.ts.map +1 -0
- package/dist/recommend/model/mode.d.ts +5 -0
- package/dist/recommend/model/mode.d.ts.map +1 -0
- package/dist/recommend/model/numericFilters.d.ts +5 -0
- package/dist/recommend/model/numericFilters.d.ts.map +1 -0
- package/dist/recommend/model/optionalFilters.d.ts +5 -0
- package/dist/recommend/model/optionalFilters.d.ts.map +1 -0
- package/dist/recommend/model/paramsConsequence.d.ts +19 -0
- package/dist/recommend/model/paramsConsequence.d.ts.map +1 -0
- package/dist/recommend/model/personalization.d.ts +15 -0
- package/dist/recommend/model/personalization.d.ts.map +1 -0
- package/dist/recommend/model/promoteConsequenceObject.d.ts +14 -0
- package/dist/recommend/model/promoteConsequenceObject.d.ts.map +1 -0
- package/dist/recommend/model/queryType.d.ts +5 -0
- package/dist/recommend/model/queryType.d.ts.map +1 -0
- package/dist/recommend/model/rankingInfo.d.ts +54 -0
- package/dist/recommend/model/rankingInfo.d.ts.map +1 -0
- package/dist/recommend/model/reRankingApplyFilter.d.ts +5 -0
- package/dist/recommend/model/reRankingApplyFilter.d.ts.map +1 -0
- package/dist/recommend/model/recommendHit.d.ts +27 -0
- package/dist/recommend/model/recommendHit.d.ts.map +1 -0
- package/dist/recommend/model/recommendModels.d.ts +2 -0
- package/dist/recommend/model/recommendModels.d.ts.map +1 -0
- package/dist/recommend/model/recommendRule.d.ts +24 -0
- package/dist/recommend/model/recommendRule.d.ts.map +1 -0
- package/dist/recommend/model/recommendRuleMetadata.d.ts +10 -0
- package/dist/recommend/model/recommendRuleMetadata.d.ts.map +1 -0
- package/dist/recommend/model/recommendationsHit.d.ts +4 -0
- package/dist/recommend/model/recommendationsHit.d.ts.map +1 -0
- package/dist/recommend/model/recommendationsHits.d.ts +5 -0
- package/dist/recommend/model/recommendationsHits.d.ts.map +1 -0
- package/dist/recommend/model/recommendationsRequest.d.ts +8 -0
- package/dist/recommend/model/recommendationsRequest.d.ts.map +1 -0
- package/dist/recommend/model/recommendationsResults.d.ts +5 -0
- package/dist/recommend/model/recommendationsResults.d.ts.map +1 -0
- package/dist/recommend/model/recommendedForYou.d.ts +7 -0
- package/dist/recommend/model/recommendedForYou.d.ts.map +1 -0
- package/dist/recommend/model/recommendedForYouModel.d.ts +5 -0
- package/dist/recommend/model/recommendedForYouModel.d.ts.map +1 -0
- package/dist/recommend/model/recommendedForYouQuery.d.ts +4 -0
- package/dist/recommend/model/recommendedForYouQuery.d.ts.map +1 -0
- package/dist/recommend/model/redirect.d.ts +8 -0
- package/dist/recommend/model/redirect.d.ts.map +1 -0
- package/dist/recommend/model/redirectRuleIndexMetadata.d.ts +21 -0
- package/dist/recommend/model/redirectRuleIndexMetadata.d.ts.map +1 -0
- package/dist/recommend/model/redirectRuleIndexMetadataData.d.ts +7 -0
- package/dist/recommend/model/redirectRuleIndexMetadataData.d.ts.map +1 -0
- package/dist/recommend/model/redirectURL.d.ts +7 -0
- package/dist/recommend/model/redirectURL.d.ts.map +1 -0
- package/dist/recommend/model/relatedModel.d.ts +5 -0
- package/dist/recommend/model/relatedModel.d.ts.map +1 -0
- package/dist/recommend/model/relatedProducts.d.ts +11 -0
- package/dist/recommend/model/relatedProducts.d.ts.map +1 -0
- package/dist/recommend/model/relatedQuery.d.ts +4 -0
- package/dist/recommend/model/relatedQuery.d.ts.map +1 -0
- package/dist/recommend/model/removeStopWords.d.ts +6 -0
- package/dist/recommend/model/removeStopWords.d.ts.map +1 -0
- package/dist/recommend/model/removeWordsIfNoResults.d.ts +5 -0
- package/dist/recommend/model/removeWordsIfNoResults.d.ts.map +1 -0
- package/dist/recommend/model/renderingContent.d.ts +10 -0
- package/dist/recommend/model/renderingContent.d.ts.map +1 -0
- package/dist/recommend/model/searchPagination.d.ts +19 -0
- package/dist/recommend/model/searchPagination.d.ts.map +1 -0
- package/dist/recommend/model/searchParams.d.ts +3 -0
- package/dist/recommend/model/searchParams.d.ts.map +1 -0
- package/dist/recommend/model/searchParamsObject.d.ts +7 -0
- package/dist/recommend/model/searchParamsObject.d.ts.map +1 -0
- package/dist/recommend/model/searchParamsQuery.d.ts +7 -0
- package/dist/recommend/model/searchParamsQuery.d.ts.map +1 -0
- package/dist/recommend/model/searchRecommendRulesParams.d.ts +38 -0
- package/dist/recommend/model/searchRecommendRulesParams.d.ts.map +1 -0
- package/dist/recommend/model/searchRecommendRulesResponse.d.ts +20 -0
- package/dist/recommend/model/searchRecommendRulesResponse.d.ts.map +1 -0
- package/dist/recommend/model/semanticSearch.d.ts +10 -0
- package/dist/recommend/model/semanticSearch.d.ts.map +1 -0
- package/dist/recommend/model/snippetResult.d.ts +3 -0
- package/dist/recommend/model/snippetResult.d.ts.map +1 -0
- package/dist/recommend/model/snippetResultOption.d.ts +12 -0
- package/dist/recommend/model/snippetResultOption.d.ts.map +1 -0
- package/dist/recommend/model/sortRemainingBy.d.ts +5 -0
- package/dist/recommend/model/sortRemainingBy.d.ts.map +1 -0
- package/dist/recommend/model/supportedLanguage.d.ts +5 -0
- package/dist/recommend/model/supportedLanguage.d.ts.map +1 -0
- package/dist/recommend/model/tagFilters.d.ts +5 -0
- package/dist/recommend/model/tagFilters.d.ts.map +1 -0
- package/dist/recommend/model/taskStatus.d.ts.map +1 -0
- package/dist/recommend/model/trendingFacetHit.d.ts +18 -0
- package/dist/recommend/model/trendingFacetHit.d.ts.map +1 -0
- package/dist/recommend/model/trendingFacets.d.ts +11 -0
- package/dist/recommend/model/trendingFacets.d.ts.map +1 -0
- package/dist/recommend/model/trendingFacetsModel.d.ts +5 -0
- package/dist/recommend/model/trendingFacetsModel.d.ts.map +1 -0
- package/dist/recommend/model/trendingFacetsQuery.d.ts +4 -0
- package/dist/recommend/model/trendingFacetsQuery.d.ts.map +1 -0
- package/dist/recommend/model/trendingItems.d.ts +15 -0
- package/dist/recommend/model/trendingItems.d.ts.map +1 -0
- package/dist/recommend/model/trendingItemsModel.d.ts +5 -0
- package/dist/recommend/model/trendingItemsModel.d.ts.map +1 -0
- package/dist/recommend/model/trendingItemsQuery.d.ts +4 -0
- package/dist/recommend/model/trendingItemsQuery.d.ts.map +1 -0
- package/dist/recommend/model/typoTolerance.d.ts +6 -0
- package/dist/recommend/model/typoTolerance.d.ts.map +1 -0
- package/dist/recommend/model/typoToleranceEnum.d.ts +5 -0
- package/dist/recommend/model/typoToleranceEnum.d.ts.map +1 -0
- package/dist/recommend/model/value.d.ts +13 -0
- package/dist/recommend/model/value.d.ts.map +1 -0
- package/dist/recommend/src/recommendClient.d.ts +132 -0
- package/dist/recommend/src/recommendClient.d.ts.map +1 -0
- package/lite/model/baseIndexSettings.ts +2 -2
- package/lite/model/baseRecommendRequest.ts +22 -0
- package/lite/model/baseSearchResponse.ts +2 -22
- package/lite/model/boughtTogetherQuery.ts +7 -0
- package/lite/model/browsePagination.ts +23 -0
- package/lite/model/browseResponse.ts +2 -0
- package/lite/model/clientMethodProps.ts +8 -0
- package/lite/model/facetFilters.ts +1 -3
- package/lite/model/{attributeToUpdate.ts → fallbackParams.ts} +2 -2
- package/lite/model/{builtInOperationType.ts → fbtModel.ts} +2 -9
- package/lite/model/{consequenceHide.ts → frequentlyBoughtTogether.ts} +5 -4
- package/lite/model/getRecommendationsParams.ts +13 -0
- package/lite/model/{apiKeyOperation.ts → getRecommendationsResponse.ts} +5 -1
- package/lite/model/index.ts +31 -40
- package/lite/model/lookingSimilar.ts +15 -0
- package/lite/model/lookingSimilarModel.ts +6 -0
- package/lite/model/lookingSimilarQuery.ts +6 -0
- package/lite/model/numericFilters.ts +1 -3
- package/lite/model/optionalFilters.ts +1 -3
- package/lite/model/rankingInfo.ts +3 -3
- package/lite/model/reRankingApplyFilter.ts +1 -3
- package/lite/model/recommendHit.ts +34 -0
- package/lite/model/{promote.ts → recommendationsHit.ts} +3 -3
- package/lite/model/{searchParamsString.ts → recommendationsHits.ts} +4 -5
- package/lite/model/recommendationsRequest.ts +16 -0
- package/lite/model/recommendationsResults.ts +9 -0
- package/lite/model/recommendedForYou.ts +10 -0
- package/lite/model/{operationType.ts → recommendedForYouModel.ts} +2 -2
- package/lite/model/recommendedForYouQuery.ts +6 -0
- package/lite/model/redirect.ts +1 -1
- package/lite/model/{dictionaryAction.ts → redirectURL.ts} +4 -2
- package/lite/model/relatedModel.ts +6 -0
- package/lite/model/{promoteObjectID.ts → relatedProducts.ts} +7 -8
- package/lite/model/relatedQuery.ts +6 -0
- package/lite/model/renderingContent.ts +3 -0
- package/lite/model/searchForFacetValuesResponse.ts +1 -1
- package/lite/model/{searchDictionaryEntriesResponse.ts → searchPagination.ts} +7 -9
- package/lite/model/searchParams.ts +1 -2
- package/lite/model/searchResponse.ts +3 -1
- package/lite/model/tagFilters.ts +1 -3
- package/lite/model/trendingFacetHit.ts +21 -0
- package/lite/model/trendingFacets.ts +15 -0
- package/lite/model/trendingFacetsModel.ts +6 -0
- package/lite/model/trendingFacetsQuery.ts +6 -0
- package/lite/model/trendingItems.ts +20 -0
- package/lite/model/{dictionaryEntryState.ts → trendingItemsModel.ts} +2 -2
- package/lite/model/trendingItemsQuery.ts +6 -0
- package/lite/model/value.ts +5 -0
- package/lite/src/liteClient.ts +57 -1
- package/package.json +18 -14
- package/dist/client-search/model/mixedSearchFilters.d.ts +0 -2
- package/dist/client-search/model/mixedSearchFilters.d.ts.map +0 -1
- package/dist/client-search/model/securedAPIKeyRestrictions.d.ts +0 -25
- package/dist/lite/model/action.d.ts +0 -5
- package/dist/lite/model/action.d.ts.map +0 -1
- package/dist/lite/model/addApiKeyResponse.d.ts +0 -11
- package/dist/lite/model/addApiKeyResponse.d.ts.map +0 -1
- package/dist/lite/model/anchoring.d.ts +0 -5
- package/dist/lite/model/anchoring.d.ts.map +0 -1
- package/dist/lite/model/apiKeyOperation.d.ts +0 -2
- package/dist/lite/model/apiKeyOperation.d.ts.map +0 -1
- package/dist/lite/model/attributeToUpdate.d.ts +0 -3
- package/dist/lite/model/attributeToUpdate.d.ts.map +0 -1
- package/dist/lite/model/browseParams.d.ts +0 -4
- package/dist/lite/model/browseParams.d.ts.map +0 -1
- package/dist/lite/model/builtInOperation.d.ts +0 -12
- package/dist/lite/model/builtInOperation.d.ts.map +0 -1
- package/dist/lite/model/builtInOperationType.d.ts +0 -5
- package/dist/lite/model/builtInOperationType.d.ts.map +0 -1
- package/dist/lite/model/condition.d.ts +0 -21
- package/dist/lite/model/condition.d.ts.map +0 -1
- package/dist/lite/model/consequence.d.ts +0 -26
- package/dist/lite/model/consequence.d.ts.map +0 -1
- package/dist/lite/model/consequenceHide.d.ts +0 -10
- package/dist/lite/model/consequenceHide.d.ts.map +0 -1
- package/dist/lite/model/deleteByParams.d.ts +0 -27
- package/dist/lite/model/deleteByParams.d.ts.map +0 -1
- package/dist/lite/model/dictionaryAction.d.ts +0 -5
- package/dist/lite/model/dictionaryAction.d.ts.map +0 -1
- package/dist/lite/model/dictionaryEntry.d.ts +0 -26
- package/dist/lite/model/dictionaryEntry.d.ts.map +0 -1
- package/dist/lite/model/dictionaryEntryState.d.ts +0 -5
- package/dist/lite/model/dictionaryEntryState.d.ts.map +0 -1
- package/dist/lite/model/dictionaryLanguage.d.ts +0 -10
- package/dist/lite/model/dictionaryLanguage.d.ts.map +0 -1
- package/dist/lite/model/dictionaryType.d.ts +0 -2
- package/dist/lite/model/dictionaryType.d.ts.map +0 -1
- package/dist/lite/model/fetchedIndex.d.ts +0 -47
- package/dist/lite/model/fetchedIndex.d.ts.map +0 -1
- package/dist/lite/model/languages.d.ts +0 -10
- package/dist/lite/model/languages.d.ts.map +0 -1
- package/dist/lite/model/listIndicesResponse.d.ts +0 -12
- package/dist/lite/model/listIndicesResponse.d.ts.map +0 -1
- package/dist/lite/model/logType.d.ts +0 -2
- package/dist/lite/model/logType.d.ts.map +0 -1
- package/dist/lite/model/mixedSearchFilters.d.ts +0 -2
- package/dist/lite/model/mixedSearchFilters.d.ts.map +0 -1
- package/dist/lite/model/operationType.d.ts +0 -5
- package/dist/lite/model/operationType.d.ts.map +0 -1
- package/dist/lite/model/promote.d.ts +0 -4
- package/dist/lite/model/promote.d.ts.map +0 -1
- package/dist/lite/model/promoteObjectID.d.ts +0 -14
- package/dist/lite/model/promoteObjectID.d.ts.map +0 -1
- package/dist/lite/model/promoteObjectIDs.d.ts +0 -14
- package/dist/lite/model/promoteObjectIDs.d.ts.map +0 -1
- package/dist/lite/model/rule.d.ts +0 -30
- package/dist/lite/model/rule.d.ts.map +0 -1
- package/dist/lite/model/scopeType.d.ts +0 -2
- package/dist/lite/model/scopeType.d.ts.map +0 -1
- package/dist/lite/model/searchDictionaryEntriesResponse.d.ts +0 -20
- package/dist/lite/model/searchDictionaryEntriesResponse.d.ts.map +0 -1
- package/dist/lite/model/searchParamsString.d.ts +0 -7
- package/dist/lite/model/searchParamsString.d.ts.map +0 -1
- package/dist/lite/model/searchSynonymsResponse.d.ts +0 -12
- package/dist/lite/model/searchSynonymsResponse.d.ts.map +0 -1
- package/dist/lite/model/securedAPIKeyRestrictions.d.ts.map +0 -1
- package/dist/lite/model/source.d.ts +0 -14
- package/dist/lite/model/source.d.ts.map +0 -1
- package/dist/lite/model/standardEntries.d.ts +0 -18
- package/dist/lite/model/standardEntries.d.ts.map +0 -1
- package/dist/lite/model/synonymHit.d.ts +0 -36
- package/dist/lite/model/synonymHit.d.ts.map +0 -1
- package/dist/lite/model/synonymType.d.ts +0 -5
- package/dist/lite/model/synonymType.d.ts.map +0 -1
- package/dist/lite/model/taskStatus.d.ts.map +0 -1
- package/dist/lite/model/timeRange.d.ts +0 -11
- package/dist/lite/model/timeRange.d.ts.map +0 -1
- package/dist/lite/model/updatedRuleResponse.d.ts.map +0 -1
- package/dist/lite/model/userId.d.ts +0 -22
- package/dist/lite/model/userId.d.ts.map +0 -1
- package/lite/model/action.ts +0 -13
- package/lite/model/addApiKeyResponse.ts +0 -13
- package/lite/model/anchoring.ts +0 -6
- package/lite/model/browseParams.ts +0 -6
- package/lite/model/builtInOperation.ts +0 -15
- package/lite/model/condition.ts +0 -27
- package/lite/model/consequence.ts +0 -32
- package/lite/model/deleteByParams.ts +0 -36
- package/lite/model/dictionaryEntry.ts +0 -33
- package/lite/model/dictionaryLanguage.ts +0 -11
- package/lite/model/dictionaryType.ts +0 -3
- package/lite/model/fetchedIndex.ts +0 -58
- package/lite/model/languages.ts +0 -14
- package/lite/model/listIndicesResponse.ts +0 -15
- package/lite/model/logType.ts +0 -3
- package/lite/model/mixedSearchFilters.ts +0 -3
- package/lite/model/promoteObjectIDs.ts +0 -16
- package/lite/model/rule.ts +0 -37
- package/lite/model/scopeType.ts +0 -3
- package/lite/model/searchSynonymsResponse.ts +0 -15
- package/lite/model/securedAPIKeyRestrictions.ts +0 -32
- package/lite/model/source.ts +0 -16
- package/lite/model/standardEntries.ts +0 -21
- package/lite/model/synonymHit.ts +0 -45
- package/lite/model/synonymType.ts +0 -11
- package/lite/model/taskStatus.ts +0 -6
- package/lite/model/timeRange.ts +0 -13
- package/lite/model/updatedRuleResponse.ts +0 -18
- package/lite/model/userId.ts +0 -26
- /package/dist/{lite → recommend}/model/taskStatus.d.ts +0 -0
|
@@ -235,6 +235,14 @@ function createStatefulHost(host, status = 'up') {
|
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
+
function _defineProperty(e, r, t) {
|
|
239
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
240
|
+
value: t,
|
|
241
|
+
enumerable: !0,
|
|
242
|
+
configurable: !0,
|
|
243
|
+
writable: !0
|
|
244
|
+
}) : e[r] = t, e;
|
|
245
|
+
}
|
|
238
246
|
function _toPrimitive(t, r) {
|
|
239
247
|
if ("object" != typeof t || !t) return t;
|
|
240
248
|
var e = t[Symbol.toPrimitive];
|
|
@@ -249,20 +257,6 @@ function _toPropertyKey(t) {
|
|
|
249
257
|
var i = _toPrimitive(t, "string");
|
|
250
258
|
return "symbol" == typeof i ? i : i + "";
|
|
251
259
|
}
|
|
252
|
-
function _defineProperty(obj, key, value) {
|
|
253
|
-
key = _toPropertyKey(key);
|
|
254
|
-
if (key in obj) {
|
|
255
|
-
Object.defineProperty(obj, key, {
|
|
256
|
-
value: value,
|
|
257
|
-
enumerable: true,
|
|
258
|
-
configurable: true,
|
|
259
|
-
writable: true
|
|
260
|
-
});
|
|
261
|
-
} else {
|
|
262
|
-
obj[key] = value;
|
|
263
|
-
}
|
|
264
|
-
return obj;
|
|
265
|
-
}
|
|
266
260
|
|
|
267
261
|
class AlgoliaError extends Error {
|
|
268
262
|
constructor(message, name) {
|
|
@@ -283,7 +277,7 @@ class ErrorWithStackTrace extends AlgoliaError {
|
|
|
283
277
|
}
|
|
284
278
|
class RetryError extends ErrorWithStackTrace {
|
|
285
279
|
constructor(stackTrace) {
|
|
286
|
-
super('Unreachable hosts - your application id may be incorrect. If the error persists, please
|
|
280
|
+
super('Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.', stackTrace, 'RetryError');
|
|
287
281
|
}
|
|
288
282
|
}
|
|
289
283
|
class ApiError extends ErrorWithStackTrace {
|
|
@@ -328,8 +322,7 @@ function serializeUrl(host, path, queryParameters) {
|
|
|
328
322
|
return url;
|
|
329
323
|
}
|
|
330
324
|
function serializeQueryParameters(parameters) {
|
|
331
|
-
|
|
332
|
-
return Object.keys(parameters).map(key => `${key}=${encodeURIComponent(isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key]).replaceAll('+', '%20')}`).join('&');
|
|
325
|
+
return Object.keys(parameters).filter(key => parameters[key] !== undefined).sort().map(key => `${key}=${encodeURIComponent(Object.prototype.toString.call(parameters[key]) === '[object Array]' ? parameters[key].join(',') : parameters[key]).replaceAll('+', '%20')}`).join('&');
|
|
333
326
|
}
|
|
334
327
|
function serializeData(request, requestOptions) {
|
|
335
328
|
if (request.method === 'GET' || request.data === undefined && requestOptions.data === undefined) {
|
|
@@ -682,9 +675,9 @@ const DEFAULT_READ_TIMEOUT_BROWSER = 2000;
|
|
|
682
675
|
const DEFAULT_WRITE_TIMEOUT_BROWSER = 30000;
|
|
683
676
|
|
|
684
677
|
// 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.
|
|
685
|
-
const apiClientVersion$
|
|
678
|
+
const apiClientVersion$5 = '5.0.0-beta.10';
|
|
686
679
|
const REGIONS$2 = ['de', 'us'];
|
|
687
|
-
function getDefaultHosts$
|
|
680
|
+
function getDefaultHosts$4(region) {
|
|
688
681
|
const url = !region
|
|
689
682
|
? 'analytics.algolia.com'
|
|
690
683
|
: 'analytics.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -694,12 +687,12 @@ function getDefaultHosts$3(region) {
|
|
|
694
687
|
function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
695
688
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
696
689
|
const transporter = createTransporter({
|
|
697
|
-
hosts: getDefaultHosts$
|
|
690
|
+
hosts: getDefaultHosts$4(regionOption),
|
|
698
691
|
...options,
|
|
699
692
|
algoliaAgent: getAlgoliaAgent({
|
|
700
693
|
algoliaAgents,
|
|
701
694
|
client: 'Abtesting',
|
|
702
|
-
version: apiClientVersion$
|
|
695
|
+
version: apiClientVersion$5,
|
|
703
696
|
}),
|
|
704
697
|
baseHeaders: {
|
|
705
698
|
'content-type': 'text/plain',
|
|
@@ -987,9 +980,9 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
987
980
|
}
|
|
988
981
|
|
|
989
982
|
// 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.
|
|
990
|
-
const apiClientVersion$
|
|
983
|
+
const apiClientVersion$4 = '5.0.0-beta.10';
|
|
991
984
|
const REGIONS$1 = ['de', 'us'];
|
|
992
|
-
function getDefaultHosts$
|
|
985
|
+
function getDefaultHosts$3(region) {
|
|
993
986
|
const url = !region
|
|
994
987
|
? 'analytics.algolia.com'
|
|
995
988
|
: 'analytics.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -999,12 +992,12 @@ function getDefaultHosts$2(region) {
|
|
|
999
992
|
function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
1000
993
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
1001
994
|
const transporter = createTransporter({
|
|
1002
|
-
hosts: getDefaultHosts$
|
|
995
|
+
hosts: getDefaultHosts$3(regionOption),
|
|
1003
996
|
...options,
|
|
1004
997
|
algoliaAgent: getAlgoliaAgent({
|
|
1005
998
|
algoliaAgents,
|
|
1006
999
|
client: 'Analytics',
|
|
1007
|
-
version: apiClientVersion$
|
|
1000
|
+
version: apiClientVersion$4,
|
|
1008
1001
|
}),
|
|
1009
1002
|
baseHeaders: {
|
|
1010
1003
|
'content-type': 'text/plain',
|
|
@@ -2042,9 +2035,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
2042
2035
|
}
|
|
2043
2036
|
|
|
2044
2037
|
// 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.
|
|
2045
|
-
const apiClientVersion$
|
|
2038
|
+
const apiClientVersion$3 = '5.0.0-beta.10';
|
|
2046
2039
|
const REGIONS = ['eu', 'us'];
|
|
2047
|
-
function getDefaultHosts$
|
|
2040
|
+
function getDefaultHosts$2(region) {
|
|
2048
2041
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
2049
2042
|
return [{ url, accept: 'readWrite', protocol: 'https' }];
|
|
2050
2043
|
}
|
|
@@ -2052,12 +2045,12 @@ function getDefaultHosts$1(region) {
|
|
|
2052
2045
|
function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
2053
2046
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
2054
2047
|
const transporter = createTransporter({
|
|
2055
|
-
hosts: getDefaultHosts$
|
|
2048
|
+
hosts: getDefaultHosts$2(regionOption),
|
|
2056
2049
|
...options,
|
|
2057
2050
|
algoliaAgent: getAlgoliaAgent({
|
|
2058
2051
|
algoliaAgents,
|
|
2059
2052
|
client: 'Personalization',
|
|
2060
|
-
version: apiClientVersion$
|
|
2053
|
+
version: apiClientVersion$3,
|
|
2061
2054
|
}),
|
|
2062
2055
|
baseHeaders: {
|
|
2063
2056
|
'content-type': 'text/plain',
|
|
@@ -2303,8 +2296,8 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
2303
2296
|
}
|
|
2304
2297
|
|
|
2305
2298
|
// 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.
|
|
2306
|
-
const apiClientVersion$
|
|
2307
|
-
function getDefaultHosts(appId) {
|
|
2299
|
+
const apiClientVersion$2 = '5.0.0-beta.10';
|
|
2300
|
+
function getDefaultHosts$1(appId) {
|
|
2308
2301
|
return [
|
|
2309
2302
|
{
|
|
2310
2303
|
url: `${appId}-dsn.algolia.net`,
|
|
@@ -2338,12 +2331,12 @@ function getDefaultHosts(appId) {
|
|
|
2338
2331
|
function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
|
|
2339
2332
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
2340
2333
|
const transporter = createTransporter({
|
|
2341
|
-
hosts: getDefaultHosts(appIdOption),
|
|
2334
|
+
hosts: getDefaultHosts$1(appIdOption),
|
|
2342
2335
|
...options,
|
|
2343
2336
|
algoliaAgent: getAlgoliaAgent({
|
|
2344
2337
|
algoliaAgents,
|
|
2345
2338
|
client: 'Search',
|
|
2346
|
-
version: apiClientVersion$
|
|
2339
|
+
version: apiClientVersion$2,
|
|
2347
2340
|
}),
|
|
2348
2341
|
baseHeaders: {
|
|
2349
2342
|
'content-type': 'text/plain',
|
|
@@ -2409,6 +2402,29 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2409
2402
|
timeout: () => timeout(retryCount),
|
|
2410
2403
|
});
|
|
2411
2404
|
},
|
|
2405
|
+
/**
|
|
2406
|
+
* Helper: Wait for an application-level task to complete for a given `taskID`.
|
|
2407
|
+
*
|
|
2408
|
+
* @summary Helper method that waits for a task to be published (completed).
|
|
2409
|
+
* @param waitForAppTaskOptions - The `waitForTaskOptions` object.
|
|
2410
|
+
* @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.
|
|
2411
|
+
* @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 50 by default.
|
|
2412
|
+
* @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.
|
|
2413
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
2414
|
+
*/
|
|
2415
|
+
waitForAppTask({ taskID, maxRetries = 50, timeout = (retryCount) => Math.min(retryCount * 200, 5000), }, requestOptions) {
|
|
2416
|
+
let retryCount = 0;
|
|
2417
|
+
return createIterablePromise({
|
|
2418
|
+
func: () => this.getAppTask({ taskID }, requestOptions),
|
|
2419
|
+
validate: (response) => response.status === 'published',
|
|
2420
|
+
aggregator: () => (retryCount += 1),
|
|
2421
|
+
error: {
|
|
2422
|
+
validate: () => retryCount >= maxRetries,
|
|
2423
|
+
message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`,
|
|
2424
|
+
},
|
|
2425
|
+
timeout: () => timeout(retryCount),
|
|
2426
|
+
});
|
|
2427
|
+
},
|
|
2412
2428
|
/**
|
|
2413
2429
|
* Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
|
|
2414
2430
|
*
|
|
@@ -2590,9 +2606,10 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2590
2606
|
async chunkedBatch({ indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000, }, requestOptions) {
|
|
2591
2607
|
let requests = [];
|
|
2592
2608
|
const responses = [];
|
|
2593
|
-
|
|
2609
|
+
const objectEntries = objects.entries();
|
|
2610
|
+
for (const [i, obj] of objectEntries) {
|
|
2594
2611
|
requests.push({ action, body: obj });
|
|
2595
|
-
if (
|
|
2612
|
+
if (requests.length === batchSize || i === objects.length - 1) {
|
|
2596
2613
|
responses.push(await this.batch({ indexName, batchWriteParams: { requests } }, requestOptions));
|
|
2597
2614
|
requests = [];
|
|
2598
2615
|
}
|
|
@@ -2604,20 +2621,68 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2604
2621
|
}
|
|
2605
2622
|
return responses;
|
|
2606
2623
|
},
|
|
2624
|
+
/**
|
|
2625
|
+
* Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
2626
|
+
*
|
|
2627
|
+
* @summary Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
2628
|
+
* @param saveObjects - The `saveObjects` object.
|
|
2629
|
+
* @param saveObjects.indexName - The `indexName` to save `objects` in.
|
|
2630
|
+
* @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
2631
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
2632
|
+
*/
|
|
2633
|
+
async saveObjects({ indexName, objects }, requestOptions) {
|
|
2634
|
+
return await this.chunkedBatch({ indexName, objects, action: 'addObject' }, requestOptions);
|
|
2635
|
+
},
|
|
2636
|
+
/**
|
|
2637
|
+
* Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
|
|
2638
|
+
*
|
|
2639
|
+
* @summary Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
|
|
2640
|
+
* @param deleteObjects - The `deleteObjects` object.
|
|
2641
|
+
* @param deleteObjects.indexName - The `indexName` to delete `objectIDs` from.
|
|
2642
|
+
* @param deleteObjects.objectIDs - The objectIDs to delete.
|
|
2643
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
2644
|
+
*/
|
|
2645
|
+
async deleteObjects({ indexName, objectIDs }, requestOptions) {
|
|
2646
|
+
return await this.chunkedBatch({
|
|
2647
|
+
indexName,
|
|
2648
|
+
objects: objectIDs.map((objectID) => ({ objectID })),
|
|
2649
|
+
action: 'deleteObject',
|
|
2650
|
+
}, requestOptions);
|
|
2651
|
+
},
|
|
2652
|
+
/**
|
|
2653
|
+
* Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
2654
|
+
*
|
|
2655
|
+
* @summary Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
2656
|
+
* @param partialUpdateObjects - The `partialUpdateObjects` object.
|
|
2657
|
+
* @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.
|
|
2658
|
+
* @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.
|
|
2659
|
+
* @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail..
|
|
2660
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
2661
|
+
*/
|
|
2662
|
+
async partialUpdateObjects({ indexName, objects, createIfNotExists }, requestOptions) {
|
|
2663
|
+
return await this.chunkedBatch({
|
|
2664
|
+
indexName,
|
|
2665
|
+
objects,
|
|
2666
|
+
action: createIfNotExists
|
|
2667
|
+
? 'partialUpdateObject'
|
|
2668
|
+
: 'partialUpdateObjectNoCreate',
|
|
2669
|
+
}, requestOptions);
|
|
2670
|
+
},
|
|
2607
2671
|
/**
|
|
2608
2672
|
* Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
|
|
2673
|
+
* See https://api-clients-automation.netlify.app/docs/contributing/add-new-api-client#5-helpers for implementation details.
|
|
2609
2674
|
*
|
|
2610
2675
|
* @summary Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
|
|
2611
2676
|
* @param replaceAllObjects - The `replaceAllObjects` object.
|
|
2612
2677
|
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
2613
2678
|
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
2614
|
-
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length
|
|
2615
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
2679
|
+
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.
|
|
2680
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch`, `operationIndex` and `getTask` method and merged with the transporter requestOptions.
|
|
2616
2681
|
*/
|
|
2617
2682
|
async replaceAllObjects({ indexName, objects, batchSize }, requestOptions) {
|
|
2618
|
-
const randomSuffix = Math.
|
|
2683
|
+
const randomSuffix = Math.floor(Math.random() * 1000000) + 100000;
|
|
2619
2684
|
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
2620
|
-
|
|
2685
|
+
let copyOperationResponse = await this.operationIndex({
|
|
2621
2686
|
indexName,
|
|
2622
2687
|
operationIndexParams: {
|
|
2623
2688
|
operation: 'copy',
|
|
@@ -2625,17 +2690,29 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2625
2690
|
scope: ['settings', 'rules', 'synonyms'],
|
|
2626
2691
|
},
|
|
2627
2692
|
}, requestOptions);
|
|
2693
|
+
const batchResponses = await this.chunkedBatch({ indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, requestOptions);
|
|
2628
2694
|
await this.waitForTask({
|
|
2695
|
+
indexName: tmpIndexName,
|
|
2696
|
+
taskID: copyOperationResponse.taskID,
|
|
2697
|
+
});
|
|
2698
|
+
copyOperationResponse = await this.operationIndex({
|
|
2629
2699
|
indexName,
|
|
2700
|
+
operationIndexParams: {
|
|
2701
|
+
operation: 'copy',
|
|
2702
|
+
destination: tmpIndexName,
|
|
2703
|
+
scope: ['settings', 'rules', 'synonyms'],
|
|
2704
|
+
},
|
|
2705
|
+
}, requestOptions);
|
|
2706
|
+
await this.waitForTask({
|
|
2707
|
+
indexName: tmpIndexName,
|
|
2630
2708
|
taskID: copyOperationResponse.taskID,
|
|
2631
2709
|
});
|
|
2632
|
-
const batchResponses = await this.chunkedBatch({ indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, requestOptions);
|
|
2633
2710
|
const moveOperationResponse = await this.operationIndex({
|
|
2634
2711
|
indexName: tmpIndexName,
|
|
2635
2712
|
operationIndexParams: { operation: 'move', destination: indexName },
|
|
2636
2713
|
}, requestOptions);
|
|
2637
2714
|
await this.waitForTask({
|
|
2638
|
-
indexName,
|
|
2715
|
+
indexName: tmpIndexName,
|
|
2639
2716
|
taskID: moveOperationResponse.taskID,
|
|
2640
2717
|
});
|
|
2641
2718
|
return { copyOperationResponse, batchResponses, moveOperationResponse };
|
|
@@ -2871,7 +2948,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2871
2948
|
return transporter.request(request, requestOptions);
|
|
2872
2949
|
},
|
|
2873
2950
|
/**
|
|
2874
|
-
* Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. -
|
|
2951
|
+
* Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There\'s no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` is evaluated to `true`) If you send these parameters with your browse requests, they\'ll be ignored.
|
|
2875
2952
|
*
|
|
2876
2953
|
* Required API Key ACLs:
|
|
2877
2954
|
* - browse.
|
|
@@ -3304,6 +3381,31 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3304
3381
|
};
|
|
3305
3382
|
return transporter.request(request, requestOptions);
|
|
3306
3383
|
},
|
|
3384
|
+
/**
|
|
3385
|
+
* Checks the status of a given application task.
|
|
3386
|
+
*
|
|
3387
|
+
* Required API Key ACLs:
|
|
3388
|
+
* - editSettings.
|
|
3389
|
+
*
|
|
3390
|
+
* @param getAppTask - The getAppTask object.
|
|
3391
|
+
* @param getAppTask.taskID - Unique task identifier.
|
|
3392
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3393
|
+
*/
|
|
3394
|
+
getAppTask({ taskID }, requestOptions) {
|
|
3395
|
+
if (!taskID) {
|
|
3396
|
+
throw new Error('Parameter `taskID` is required when calling `getAppTask`.');
|
|
3397
|
+
}
|
|
3398
|
+
const requestPath = '/1/task/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
3399
|
+
const headers = {};
|
|
3400
|
+
const queryParameters = {};
|
|
3401
|
+
const request = {
|
|
3402
|
+
method: 'GET',
|
|
3403
|
+
path: requestPath,
|
|
3404
|
+
queryParameters,
|
|
3405
|
+
headers,
|
|
3406
|
+
};
|
|
3407
|
+
return transporter.request(request, requestOptions);
|
|
3408
|
+
},
|
|
3307
3409
|
/**
|
|
3308
3410
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
3309
3411
|
*
|
|
@@ -3778,7 +3880,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3778
3880
|
return transporter.request(request, requestOptions);
|
|
3779
3881
|
},
|
|
3780
3882
|
/**
|
|
3781
|
-
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for
|
|
3883
|
+
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
|
|
3782
3884
|
*
|
|
3783
3885
|
* Required API Key ACLs:
|
|
3784
3886
|
* - addObject.
|
|
@@ -4462,6 +4564,368 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
4462
4564
|
};
|
|
4463
4565
|
}
|
|
4464
4566
|
|
|
4567
|
+
// 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.
|
|
4568
|
+
const apiClientVersion$1 = '5.0.0-beta.10';
|
|
4569
|
+
function getDefaultHosts(appId) {
|
|
4570
|
+
return [
|
|
4571
|
+
{
|
|
4572
|
+
url: `${appId}-dsn.algolia.net`,
|
|
4573
|
+
accept: 'read',
|
|
4574
|
+
protocol: 'https',
|
|
4575
|
+
},
|
|
4576
|
+
{
|
|
4577
|
+
url: `${appId}.algolia.net`,
|
|
4578
|
+
accept: 'write',
|
|
4579
|
+
protocol: 'https',
|
|
4580
|
+
},
|
|
4581
|
+
].concat(shuffle([
|
|
4582
|
+
{
|
|
4583
|
+
url: `${appId}-1.algolianet.com`,
|
|
4584
|
+
accept: 'readWrite',
|
|
4585
|
+
protocol: 'https',
|
|
4586
|
+
},
|
|
4587
|
+
{
|
|
4588
|
+
url: `${appId}-2.algolianet.com`,
|
|
4589
|
+
accept: 'readWrite',
|
|
4590
|
+
protocol: 'https',
|
|
4591
|
+
},
|
|
4592
|
+
{
|
|
4593
|
+
url: `${appId}-3.algolianet.com`,
|
|
4594
|
+
accept: 'readWrite',
|
|
4595
|
+
protocol: 'https',
|
|
4596
|
+
},
|
|
4597
|
+
]));
|
|
4598
|
+
}
|
|
4599
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
4600
|
+
function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
|
|
4601
|
+
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
4602
|
+
const transporter = createTransporter({
|
|
4603
|
+
hosts: getDefaultHosts(appIdOption),
|
|
4604
|
+
...options,
|
|
4605
|
+
algoliaAgent: getAlgoliaAgent({
|
|
4606
|
+
algoliaAgents,
|
|
4607
|
+
client: 'Recommend',
|
|
4608
|
+
version: apiClientVersion$1,
|
|
4609
|
+
}),
|
|
4610
|
+
baseHeaders: {
|
|
4611
|
+
'content-type': 'text/plain',
|
|
4612
|
+
...auth.headers(),
|
|
4613
|
+
...options.baseHeaders,
|
|
4614
|
+
},
|
|
4615
|
+
baseQueryParameters: {
|
|
4616
|
+
...auth.queryParameters(),
|
|
4617
|
+
...options.baseQueryParameters,
|
|
4618
|
+
},
|
|
4619
|
+
});
|
|
4620
|
+
return {
|
|
4621
|
+
transporter,
|
|
4622
|
+
/**
|
|
4623
|
+
* The `appId` currently in use.
|
|
4624
|
+
*/
|
|
4625
|
+
appId: appIdOption,
|
|
4626
|
+
/**
|
|
4627
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
4628
|
+
*/
|
|
4629
|
+
clearCache() {
|
|
4630
|
+
return Promise.all([
|
|
4631
|
+
transporter.requestsCache.clear(),
|
|
4632
|
+
transporter.responsesCache.clear(),
|
|
4633
|
+
]).then(() => undefined);
|
|
4634
|
+
},
|
|
4635
|
+
/**
|
|
4636
|
+
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
4637
|
+
*/
|
|
4638
|
+
get _ua() {
|
|
4639
|
+
return transporter.algoliaAgent.value;
|
|
4640
|
+
},
|
|
4641
|
+
/**
|
|
4642
|
+
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
4643
|
+
*
|
|
4644
|
+
* @param segment - The algolia agent (user-agent) segment to add.
|
|
4645
|
+
* @param version - The version of the agent.
|
|
4646
|
+
*/
|
|
4647
|
+
addAlgoliaAgent(segment, version) {
|
|
4648
|
+
transporter.algoliaAgent.add({ segment, version });
|
|
4649
|
+
},
|
|
4650
|
+
/**
|
|
4651
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
4652
|
+
*
|
|
4653
|
+
* @param customDelete - The customDelete object.
|
|
4654
|
+
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
4655
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
4656
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4657
|
+
*/
|
|
4658
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
4659
|
+
if (!path) {
|
|
4660
|
+
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
4661
|
+
}
|
|
4662
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
4663
|
+
const headers = {};
|
|
4664
|
+
const queryParameters = parameters ? parameters : {};
|
|
4665
|
+
const request = {
|
|
4666
|
+
method: 'DELETE',
|
|
4667
|
+
path: requestPath,
|
|
4668
|
+
queryParameters,
|
|
4669
|
+
headers,
|
|
4670
|
+
};
|
|
4671
|
+
return transporter.request(request, requestOptions);
|
|
4672
|
+
},
|
|
4673
|
+
/**
|
|
4674
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
4675
|
+
*
|
|
4676
|
+
* @param customGet - The customGet object.
|
|
4677
|
+
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
4678
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
4679
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4680
|
+
*/
|
|
4681
|
+
customGet({ path, parameters }, requestOptions) {
|
|
4682
|
+
if (!path) {
|
|
4683
|
+
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
4684
|
+
}
|
|
4685
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
4686
|
+
const headers = {};
|
|
4687
|
+
const queryParameters = parameters ? parameters : {};
|
|
4688
|
+
const request = {
|
|
4689
|
+
method: 'GET',
|
|
4690
|
+
path: requestPath,
|
|
4691
|
+
queryParameters,
|
|
4692
|
+
headers,
|
|
4693
|
+
};
|
|
4694
|
+
return transporter.request(request, requestOptions);
|
|
4695
|
+
},
|
|
4696
|
+
/**
|
|
4697
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
4698
|
+
*
|
|
4699
|
+
* @param customPost - The customPost object.
|
|
4700
|
+
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
4701
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
4702
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
4703
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4704
|
+
*/
|
|
4705
|
+
customPost({ path, parameters, body }, requestOptions) {
|
|
4706
|
+
if (!path) {
|
|
4707
|
+
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
4708
|
+
}
|
|
4709
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
4710
|
+
const headers = {};
|
|
4711
|
+
const queryParameters = parameters ? parameters : {};
|
|
4712
|
+
const request = {
|
|
4713
|
+
method: 'POST',
|
|
4714
|
+
path: requestPath,
|
|
4715
|
+
queryParameters,
|
|
4716
|
+
headers,
|
|
4717
|
+
data: body ? body : {},
|
|
4718
|
+
};
|
|
4719
|
+
return transporter.request(request, requestOptions);
|
|
4720
|
+
},
|
|
4721
|
+
/**
|
|
4722
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
4723
|
+
*
|
|
4724
|
+
* @param customPut - The customPut object.
|
|
4725
|
+
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
4726
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
4727
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
4728
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4729
|
+
*/
|
|
4730
|
+
customPut({ path, parameters, body }, requestOptions) {
|
|
4731
|
+
if (!path) {
|
|
4732
|
+
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
4733
|
+
}
|
|
4734
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
4735
|
+
const headers = {};
|
|
4736
|
+
const queryParameters = parameters ? parameters : {};
|
|
4737
|
+
const request = {
|
|
4738
|
+
method: 'PUT',
|
|
4739
|
+
path: requestPath,
|
|
4740
|
+
queryParameters,
|
|
4741
|
+
headers,
|
|
4742
|
+
data: body ? body : {},
|
|
4743
|
+
};
|
|
4744
|
+
return transporter.request(request, requestOptions);
|
|
4745
|
+
},
|
|
4746
|
+
/**
|
|
4747
|
+
* Deletes a Recommend rule from a recommendation scenario.
|
|
4748
|
+
*
|
|
4749
|
+
* Required API Key ACLs:
|
|
4750
|
+
* - editSettings.
|
|
4751
|
+
*
|
|
4752
|
+
* @param deleteRecommendRule - The deleteRecommendRule object.
|
|
4753
|
+
* @param deleteRecommendRule.indexName - Name of the index on which to perform the operation.
|
|
4754
|
+
* @param deleteRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4755
|
+
* @param deleteRecommendRule.objectID - Unique record identifier.
|
|
4756
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4757
|
+
*/
|
|
4758
|
+
deleteRecommendRule({ indexName, model, objectID }, requestOptions) {
|
|
4759
|
+
if (!indexName) {
|
|
4760
|
+
throw new Error('Parameter `indexName` is required when calling `deleteRecommendRule`.');
|
|
4761
|
+
}
|
|
4762
|
+
if (!model) {
|
|
4763
|
+
throw new Error('Parameter `model` is required when calling `deleteRecommendRule`.');
|
|
4764
|
+
}
|
|
4765
|
+
if (!objectID) {
|
|
4766
|
+
throw new Error('Parameter `objectID` is required when calling `deleteRecommendRule`.');
|
|
4767
|
+
}
|
|
4768
|
+
const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
|
|
4769
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4770
|
+
.replace('{model}', encodeURIComponent(model))
|
|
4771
|
+
.replace('{objectID}', encodeURIComponent(objectID));
|
|
4772
|
+
const headers = {};
|
|
4773
|
+
const queryParameters = {};
|
|
4774
|
+
const request = {
|
|
4775
|
+
method: 'DELETE',
|
|
4776
|
+
path: requestPath,
|
|
4777
|
+
queryParameters,
|
|
4778
|
+
headers,
|
|
4779
|
+
};
|
|
4780
|
+
return transporter.request(request, requestOptions);
|
|
4781
|
+
},
|
|
4782
|
+
/**
|
|
4783
|
+
* Retrieves a Recommend rule that you previously created in the Algolia dashboard.
|
|
4784
|
+
*
|
|
4785
|
+
* Required API Key ACLs:
|
|
4786
|
+
* - settings.
|
|
4787
|
+
*
|
|
4788
|
+
* @param getRecommendRule - The getRecommendRule object.
|
|
4789
|
+
* @param getRecommendRule.indexName - Name of the index on which to perform the operation.
|
|
4790
|
+
* @param getRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4791
|
+
* @param getRecommendRule.objectID - Unique record identifier.
|
|
4792
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4793
|
+
*/
|
|
4794
|
+
getRecommendRule({ indexName, model, objectID }, requestOptions) {
|
|
4795
|
+
if (!indexName) {
|
|
4796
|
+
throw new Error('Parameter `indexName` is required when calling `getRecommendRule`.');
|
|
4797
|
+
}
|
|
4798
|
+
if (!model) {
|
|
4799
|
+
throw new Error('Parameter `model` is required when calling `getRecommendRule`.');
|
|
4800
|
+
}
|
|
4801
|
+
if (!objectID) {
|
|
4802
|
+
throw new Error('Parameter `objectID` is required when calling `getRecommendRule`.');
|
|
4803
|
+
}
|
|
4804
|
+
const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
|
|
4805
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4806
|
+
.replace('{model}', encodeURIComponent(model))
|
|
4807
|
+
.replace('{objectID}', encodeURIComponent(objectID));
|
|
4808
|
+
const headers = {};
|
|
4809
|
+
const queryParameters = {};
|
|
4810
|
+
const request = {
|
|
4811
|
+
method: 'GET',
|
|
4812
|
+
path: requestPath,
|
|
4813
|
+
queryParameters,
|
|
4814
|
+
headers,
|
|
4815
|
+
};
|
|
4816
|
+
return transporter.request(request, requestOptions);
|
|
4817
|
+
},
|
|
4818
|
+
/**
|
|
4819
|
+
* 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.
|
|
4820
|
+
*
|
|
4821
|
+
* Required API Key ACLs:
|
|
4822
|
+
* - editSettings.
|
|
4823
|
+
*
|
|
4824
|
+
* @param getRecommendStatus - The getRecommendStatus object.
|
|
4825
|
+
* @param getRecommendStatus.indexName - Name of the index on which to perform the operation.
|
|
4826
|
+
* @param getRecommendStatus.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4827
|
+
* @param getRecommendStatus.taskID - Unique task identifier.
|
|
4828
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4829
|
+
*/
|
|
4830
|
+
getRecommendStatus({ indexName, model, taskID }, requestOptions) {
|
|
4831
|
+
if (!indexName) {
|
|
4832
|
+
throw new Error('Parameter `indexName` is required when calling `getRecommendStatus`.');
|
|
4833
|
+
}
|
|
4834
|
+
if (!model) {
|
|
4835
|
+
throw new Error('Parameter `model` is required when calling `getRecommendStatus`.');
|
|
4836
|
+
}
|
|
4837
|
+
if (!taskID) {
|
|
4838
|
+
throw new Error('Parameter `taskID` is required when calling `getRecommendStatus`.');
|
|
4839
|
+
}
|
|
4840
|
+
const requestPath = '/1/indexes/{indexName}/{model}/task/{taskID}'
|
|
4841
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4842
|
+
.replace('{model}', encodeURIComponent(model))
|
|
4843
|
+
.replace('{taskID}', encodeURIComponent(taskID));
|
|
4844
|
+
const headers = {};
|
|
4845
|
+
const queryParameters = {};
|
|
4846
|
+
const request = {
|
|
4847
|
+
method: 'GET',
|
|
4848
|
+
path: requestPath,
|
|
4849
|
+
queryParameters,
|
|
4850
|
+
headers,
|
|
4851
|
+
};
|
|
4852
|
+
return transporter.request(request, requestOptions);
|
|
4853
|
+
},
|
|
4854
|
+
/**
|
|
4855
|
+
* Retrieves recommendations from selected AI models.
|
|
4856
|
+
*
|
|
4857
|
+
* Required API Key ACLs:
|
|
4858
|
+
* - search.
|
|
4859
|
+
*
|
|
4860
|
+
* @param getRecommendationsParams - The getRecommendationsParams object.
|
|
4861
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4862
|
+
*/
|
|
4863
|
+
getRecommendations(getRecommendationsParams, requestOptions) {
|
|
4864
|
+
if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {
|
|
4865
|
+
const newSignatureRequest = {
|
|
4866
|
+
requests: getRecommendationsParams,
|
|
4867
|
+
};
|
|
4868
|
+
// eslint-disable-next-line no-param-reassign
|
|
4869
|
+
getRecommendationsParams = newSignatureRequest;
|
|
4870
|
+
}
|
|
4871
|
+
if (!getRecommendationsParams) {
|
|
4872
|
+
throw new Error('Parameter `getRecommendationsParams` is required when calling `getRecommendations`.');
|
|
4873
|
+
}
|
|
4874
|
+
if (!getRecommendationsParams.requests) {
|
|
4875
|
+
throw new Error('Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.');
|
|
4876
|
+
}
|
|
4877
|
+
const requestPath = '/1/indexes/*/recommendations';
|
|
4878
|
+
const headers = {};
|
|
4879
|
+
const queryParameters = {};
|
|
4880
|
+
const request = {
|
|
4881
|
+
method: 'POST',
|
|
4882
|
+
path: requestPath,
|
|
4883
|
+
queryParameters,
|
|
4884
|
+
headers,
|
|
4885
|
+
data: getRecommendationsParams,
|
|
4886
|
+
useReadTransporter: true,
|
|
4887
|
+
cacheable: true,
|
|
4888
|
+
};
|
|
4889
|
+
return transporter.request(request, requestOptions);
|
|
4890
|
+
},
|
|
4891
|
+
/**
|
|
4892
|
+
* Searches for Recommend rules. Use an empty query to list all rules for this recommendation scenario.
|
|
4893
|
+
*
|
|
4894
|
+
* Required API Key ACLs:
|
|
4895
|
+
* - settings.
|
|
4896
|
+
*
|
|
4897
|
+
* @param searchRecommendRules - The searchRecommendRules object.
|
|
4898
|
+
* @param searchRecommendRules.indexName - Name of the index on which to perform the operation.
|
|
4899
|
+
* @param searchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4900
|
+
* @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.
|
|
4901
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4902
|
+
*/
|
|
4903
|
+
searchRecommendRules({ indexName, model, searchRecommendRulesParams, }, requestOptions) {
|
|
4904
|
+
if (!indexName) {
|
|
4905
|
+
throw new Error('Parameter `indexName` is required when calling `searchRecommendRules`.');
|
|
4906
|
+
}
|
|
4907
|
+
if (!model) {
|
|
4908
|
+
throw new Error('Parameter `model` is required when calling `searchRecommendRules`.');
|
|
4909
|
+
}
|
|
4910
|
+
const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/search'
|
|
4911
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4912
|
+
.replace('{model}', encodeURIComponent(model));
|
|
4913
|
+
const headers = {};
|
|
4914
|
+
const queryParameters = {};
|
|
4915
|
+
const request = {
|
|
4916
|
+
method: 'POST',
|
|
4917
|
+
path: requestPath,
|
|
4918
|
+
queryParameters,
|
|
4919
|
+
headers,
|
|
4920
|
+
data: searchRecommendRulesParams ? searchRecommendRulesParams : {},
|
|
4921
|
+
useReadTransporter: true,
|
|
4922
|
+
cacheable: true,
|
|
4923
|
+
};
|
|
4924
|
+
return transporter.request(request, requestOptions);
|
|
4925
|
+
},
|
|
4926
|
+
};
|
|
4927
|
+
}
|
|
4928
|
+
|
|
4465
4929
|
function createXhrRequester() {
|
|
4466
4930
|
function send(request) {
|
|
4467
4931
|
return new Promise((resolve) => {
|
|
@@ -4515,7 +4979,7 @@ function createXhrRequester() {
|
|
|
4515
4979
|
}
|
|
4516
4980
|
|
|
4517
4981
|
// 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.
|
|
4518
|
-
const apiClientVersion = apiClientVersion$
|
|
4982
|
+
const apiClientVersion = apiClientVersion$2;
|
|
4519
4983
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
4520
4984
|
function algoliasearch(appId, apiKey, options) {
|
|
4521
4985
|
if (!appId || typeof appId !== 'string') {
|
|
@@ -4545,6 +5009,13 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
4545
5009
|
}),
|
|
4546
5010
|
...options,
|
|
4547
5011
|
};
|
|
5012
|
+
function initRecommend(initOptions = {}) {
|
|
5013
|
+
return createRecommendClient({
|
|
5014
|
+
...commonOptions,
|
|
5015
|
+
...initOptions.options,
|
|
5016
|
+
...initOptions,
|
|
5017
|
+
});
|
|
5018
|
+
}
|
|
4548
5019
|
function initAnalytics(initOptions = {}) {
|
|
4549
5020
|
if (initOptions.region &&
|
|
4550
5021
|
(typeof initOptions.region !== 'string' ||
|
|
@@ -4590,9 +5061,10 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
4590
5061
|
get _ua() {
|
|
4591
5062
|
return this.transporter.algoliaAgent.value;
|
|
4592
5063
|
},
|
|
5064
|
+
initAbtesting,
|
|
4593
5065
|
initAnalytics,
|
|
4594
5066
|
initPersonalization,
|
|
4595
|
-
|
|
5067
|
+
initRecommend,
|
|
4596
5068
|
};
|
|
4597
5069
|
}
|
|
4598
5070
|
|