algoliasearch 5.0.0-beta.4 → 5.0.0-beta.6
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 +136 -6
- package/builds/node.ts +37 -4
- package/dist/algoliasearch/builds/browser.d.ts +77 -72
- 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 -72
- package/dist/algoliasearch/builds/node.d.ts.map +1 -1
- package/dist/algoliasearch.cjs +454 -21
- package/dist/algoliasearch.esm.browser.js +438 -22
- package/dist/algoliasearch.esm.node.js +454 -21
- 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 -2
- package/dist/client-search/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/client-search/model/clientMethodProps.d.ts +15 -2
- package/dist/client-search/model/clientMethodProps.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 +1 -1
- package/dist/client-search/model/{securedAPIKeyRestrictions.d.ts → 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/value.d.ts +4 -0
- package/dist/client-search/model/value.d.ts.map +1 -1
- package/dist/client-search/src/searchClient.d.ts +40 -9
- 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 +39 -3
- 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 -2
- 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/clientMethodProps.d.ts +7 -0
- package/dist/lite/model/clientMethodProps.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 +28 -1
- 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/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 +4 -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/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/searchParams.d.ts +1 -2
- package/dist/lite/model/searchParams.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 +110 -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/recommend/model/deletedAtResponse.d.ts +14 -0
- 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 +92 -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 +4 -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/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 +8 -0
- package/dist/recommend/model/renderingContent.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 +5 -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 -2
- package/lite/model/boughtTogetherQuery.ts +7 -0
- package/lite/model/clientMethodProps.ts +8 -0
- package/lite/model/fallbackParams.ts +5 -0
- package/lite/model/fbtModel.ts +6 -0
- package/lite/model/frequentlyBoughtTogether.ts +12 -0
- package/lite/model/getRecommendationsParams.ts +13 -0
- package/lite/model/getRecommendationsResponse.ts +7 -0
- package/lite/model/index.ts +28 -1
- package/lite/model/lookingSimilar.ts +15 -0
- package/lite/model/lookingSimilarModel.ts +6 -0
- package/lite/model/lookingSimilarQuery.ts +6 -0
- package/lite/model/recommendHit.ts +34 -0
- package/lite/model/recommendationsHit.ts +6 -0
- package/lite/model/recommendationsHits.ts +7 -0
- package/lite/model/recommendationsRequest.ts +16 -0
- package/lite/model/recommendationsResults.ts +6 -0
- package/lite/model/recommendedForYou.ts +10 -0
- package/lite/model/{searchParamsString.ts → recommendedForYouModel.ts} +4 -6
- package/lite/model/recommendedForYouQuery.ts +6 -0
- package/lite/model/relatedModel.ts +6 -0
- package/lite/model/relatedProducts.ts +15 -0
- package/lite/model/relatedQuery.ts +6 -0
- package/lite/model/searchParams.ts +1 -2
- 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/trendingItemsModel.ts +6 -0
- package/lite/model/trendingItemsQuery.ts +6 -0
- package/lite/model/value.ts +5 -0
- package/lite/src/liteClient.ts +57 -1
- package/package.json +15 -11
- package/dist/lite/model/searchParamsString.d.ts +0 -7
- package/dist/lite/model/searchParamsString.d.ts.map +0 -1
|
@@ -322,8 +322,7 @@ function serializeUrl(host, path, queryParameters) {
|
|
|
322
322
|
return url;
|
|
323
323
|
}
|
|
324
324
|
function serializeQueryParameters(parameters) {
|
|
325
|
-
|
|
326
|
-
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('&');
|
|
327
326
|
}
|
|
328
327
|
function serializeData(request, requestOptions) {
|
|
329
328
|
if (request.method === 'GET' || request.data === undefined && requestOptions.data === undefined) {
|
|
@@ -676,9 +675,9 @@ const DEFAULT_READ_TIMEOUT_BROWSER = 2000;
|
|
|
676
675
|
const DEFAULT_WRITE_TIMEOUT_BROWSER = 30000;
|
|
677
676
|
|
|
678
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.
|
|
679
|
-
const apiClientVersion$
|
|
678
|
+
const apiClientVersion$5 = '5.0.0-beta.6';
|
|
680
679
|
const REGIONS$2 = ['de', 'us'];
|
|
681
|
-
function getDefaultHosts$
|
|
680
|
+
function getDefaultHosts$4(region) {
|
|
682
681
|
const url = !region
|
|
683
682
|
? 'analytics.algolia.com'
|
|
684
683
|
: 'analytics.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -688,12 +687,12 @@ function getDefaultHosts$3(region) {
|
|
|
688
687
|
function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
689
688
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
690
689
|
const transporter = createTransporter({
|
|
691
|
-
hosts: getDefaultHosts$
|
|
690
|
+
hosts: getDefaultHosts$4(regionOption),
|
|
692
691
|
...options,
|
|
693
692
|
algoliaAgent: getAlgoliaAgent({
|
|
694
693
|
algoliaAgents,
|
|
695
694
|
client: 'Abtesting',
|
|
696
|
-
version: apiClientVersion$
|
|
695
|
+
version: apiClientVersion$5,
|
|
697
696
|
}),
|
|
698
697
|
baseHeaders: {
|
|
699
698
|
'content-type': 'text/plain',
|
|
@@ -981,9 +980,9 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
981
980
|
}
|
|
982
981
|
|
|
983
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.
|
|
984
|
-
const apiClientVersion$
|
|
983
|
+
const apiClientVersion$4 = '5.0.0-beta.6';
|
|
985
984
|
const REGIONS$1 = ['de', 'us'];
|
|
986
|
-
function getDefaultHosts$
|
|
985
|
+
function getDefaultHosts$3(region) {
|
|
987
986
|
const url = !region
|
|
988
987
|
? 'analytics.algolia.com'
|
|
989
988
|
: 'analytics.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -993,12 +992,12 @@ function getDefaultHosts$2(region) {
|
|
|
993
992
|
function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
994
993
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
995
994
|
const transporter = createTransporter({
|
|
996
|
-
hosts: getDefaultHosts$
|
|
995
|
+
hosts: getDefaultHosts$3(regionOption),
|
|
997
996
|
...options,
|
|
998
997
|
algoliaAgent: getAlgoliaAgent({
|
|
999
998
|
algoliaAgents,
|
|
1000
999
|
client: 'Analytics',
|
|
1001
|
-
version: apiClientVersion$
|
|
1000
|
+
version: apiClientVersion$4,
|
|
1002
1001
|
}),
|
|
1003
1002
|
baseHeaders: {
|
|
1004
1003
|
'content-type': 'text/plain',
|
|
@@ -2036,9 +2035,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
2036
2035
|
}
|
|
2037
2036
|
|
|
2038
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.
|
|
2039
|
-
const apiClientVersion$
|
|
2038
|
+
const apiClientVersion$3 = '5.0.0-beta.6';
|
|
2040
2039
|
const REGIONS = ['eu', 'us'];
|
|
2041
|
-
function getDefaultHosts$
|
|
2040
|
+
function getDefaultHosts$2(region) {
|
|
2042
2041
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
2043
2042
|
return [{ url, accept: 'readWrite', protocol: 'https' }];
|
|
2044
2043
|
}
|
|
@@ -2046,12 +2045,12 @@ function getDefaultHosts$1(region) {
|
|
|
2046
2045
|
function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
2047
2046
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
2048
2047
|
const transporter = createTransporter({
|
|
2049
|
-
hosts: getDefaultHosts$
|
|
2048
|
+
hosts: getDefaultHosts$2(regionOption),
|
|
2050
2049
|
...options,
|
|
2051
2050
|
algoliaAgent: getAlgoliaAgent({
|
|
2052
2051
|
algoliaAgents,
|
|
2053
2052
|
client: 'Personalization',
|
|
2054
|
-
version: apiClientVersion$
|
|
2053
|
+
version: apiClientVersion$3,
|
|
2055
2054
|
}),
|
|
2056
2055
|
baseHeaders: {
|
|
2057
2056
|
'content-type': 'text/plain',
|
|
@@ -2297,8 +2296,8 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
2297
2296
|
}
|
|
2298
2297
|
|
|
2299
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.
|
|
2300
|
-
const apiClientVersion$
|
|
2301
|
-
function getDefaultHosts(appId) {
|
|
2299
|
+
const apiClientVersion$2 = '5.0.0-beta.6';
|
|
2300
|
+
function getDefaultHosts$1(appId) {
|
|
2302
2301
|
return [
|
|
2303
2302
|
{
|
|
2304
2303
|
url: `${appId}-dsn.algolia.net`,
|
|
@@ -2332,12 +2331,12 @@ function getDefaultHosts(appId) {
|
|
|
2332
2331
|
function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
|
|
2333
2332
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
2334
2333
|
const transporter = createTransporter({
|
|
2335
|
-
hosts: getDefaultHosts(appIdOption),
|
|
2334
|
+
hosts: getDefaultHosts$1(appIdOption),
|
|
2336
2335
|
...options,
|
|
2337
2336
|
algoliaAgent: getAlgoliaAgent({
|
|
2338
2337
|
algoliaAgents,
|
|
2339
2338
|
client: 'Search',
|
|
2340
|
-
version: apiClientVersion$
|
|
2339
|
+
version: apiClientVersion$2,
|
|
2341
2340
|
}),
|
|
2342
2341
|
baseHeaders: {
|
|
2343
2342
|
'content-type': 'text/plain',
|
|
@@ -2622,6 +2621,53 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2622
2621
|
}
|
|
2623
2622
|
return responses;
|
|
2624
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
|
+
},
|
|
2625
2671
|
/**
|
|
2626
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.
|
|
2627
2673
|
* See https://api-clients-automation.netlify.app/docs/contributing/add-new-api-client#5-helpers for implementation details.
|
|
@@ -2631,10 +2677,10 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2631
2677
|
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
2632
2678
|
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
2633
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.
|
|
2634
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
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.
|
|
2635
2681
|
*/
|
|
2636
2682
|
async replaceAllObjects({ indexName, objects, batchSize }, requestOptions) {
|
|
2637
|
-
const randomSuffix = Math.
|
|
2683
|
+
const randomSuffix = Math.floor(Math.random() * 1000000) + 100000;
|
|
2638
2684
|
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
2639
2685
|
let copyOperationResponse = await this.operationIndex({
|
|
2640
2686
|
indexName,
|
|
@@ -4518,6 +4564,368 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
4518
4564
|
};
|
|
4519
4565
|
}
|
|
4520
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.6';
|
|
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
|
+
|
|
4521
4929
|
function createXhrRequester() {
|
|
4522
4930
|
function send(request) {
|
|
4523
4931
|
return new Promise((resolve) => {
|
|
@@ -4571,7 +4979,7 @@ function createXhrRequester() {
|
|
|
4571
4979
|
}
|
|
4572
4980
|
|
|
4573
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.
|
|
4574
|
-
const apiClientVersion = apiClientVersion$
|
|
4982
|
+
const apiClientVersion = apiClientVersion$2;
|
|
4575
4983
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
4576
4984
|
function algoliasearch(appId, apiKey, options) {
|
|
4577
4985
|
if (!appId || typeof appId !== 'string') {
|
|
@@ -4601,6 +5009,13 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
4601
5009
|
}),
|
|
4602
5010
|
...options,
|
|
4603
5011
|
};
|
|
5012
|
+
function initRecommend(initOptions = {}) {
|
|
5013
|
+
return createRecommendClient({
|
|
5014
|
+
...commonOptions,
|
|
5015
|
+
...initOptions.options,
|
|
5016
|
+
...initOptions,
|
|
5017
|
+
});
|
|
5018
|
+
}
|
|
4604
5019
|
function initAnalytics(initOptions = {}) {
|
|
4605
5020
|
if (initOptions.region &&
|
|
4606
5021
|
(typeof initOptions.region !== 'string' ||
|
|
@@ -4646,9 +5061,10 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
4646
5061
|
get _ua() {
|
|
4647
5062
|
return this.transporter.algoliaAgent.value;
|
|
4648
5063
|
},
|
|
5064
|
+
initAbtesting,
|
|
4649
5065
|
initAnalytics,
|
|
4650
5066
|
initPersonalization,
|
|
4651
|
-
|
|
5067
|
+
initRecommend,
|
|
4652
5068
|
};
|
|
4653
5069
|
}
|
|
4654
5070
|
|