algoliasearch 5.0.0-beta.3 → 5.0.0-beta.5
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/builds/browser.ts +13 -2
- package/builds/models.ts +136 -6
- package/builds/node.ts +37 -4
- package/dist/algoliasearch/builds/browser.d.ts +74 -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 +74 -72
- package/dist/algoliasearch/builds/node.d.ts.map +1 -1
- package/dist/algoliasearch.cjs +421 -22
- package/dist/algoliasearch.esm.browser.js +405 -23
- package/dist/algoliasearch.esm.node.js +421 -22
- 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 +2 -2
- 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/src/searchClient.d.ts +8 -7
- 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/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 +9 -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/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
|
@@ -3,9 +3,9 @@ import { createAuth, createTransporter, getAlgoliaAgent, createIterablePromise,
|
|
|
3
3
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
4
4
|
|
|
5
5
|
// 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.
|
|
6
|
-
const apiClientVersion$
|
|
6
|
+
const apiClientVersion$5 = '5.0.0-beta.5';
|
|
7
7
|
const REGIONS$2 = ['de', 'us'];
|
|
8
|
-
function getDefaultHosts$
|
|
8
|
+
function getDefaultHosts$4(region) {
|
|
9
9
|
const url = !region
|
|
10
10
|
? 'analytics.algolia.com'
|
|
11
11
|
: 'analytics.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -15,12 +15,12 @@ function getDefaultHosts$3(region) {
|
|
|
15
15
|
function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
16
16
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
17
17
|
const transporter = createTransporter({
|
|
18
|
-
hosts: getDefaultHosts$
|
|
18
|
+
hosts: getDefaultHosts$4(regionOption),
|
|
19
19
|
...options,
|
|
20
20
|
algoliaAgent: getAlgoliaAgent({
|
|
21
21
|
algoliaAgents,
|
|
22
22
|
client: 'Abtesting',
|
|
23
|
-
version: apiClientVersion$
|
|
23
|
+
version: apiClientVersion$5,
|
|
24
24
|
}),
|
|
25
25
|
baseHeaders: {
|
|
26
26
|
'content-type': 'text/plain',
|
|
@@ -308,9 +308,9 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
// 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.
|
|
311
|
-
const apiClientVersion$
|
|
311
|
+
const apiClientVersion$4 = '5.0.0-beta.5';
|
|
312
312
|
const REGIONS$1 = ['de', 'us'];
|
|
313
|
-
function getDefaultHosts$
|
|
313
|
+
function getDefaultHosts$3(region) {
|
|
314
314
|
const url = !region
|
|
315
315
|
? 'analytics.algolia.com'
|
|
316
316
|
: 'analytics.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -320,12 +320,12 @@ function getDefaultHosts$2(region) {
|
|
|
320
320
|
function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
321
321
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
322
322
|
const transporter = createTransporter({
|
|
323
|
-
hosts: getDefaultHosts$
|
|
323
|
+
hosts: getDefaultHosts$3(regionOption),
|
|
324
324
|
...options,
|
|
325
325
|
algoliaAgent: getAlgoliaAgent({
|
|
326
326
|
algoliaAgents,
|
|
327
327
|
client: 'Analytics',
|
|
328
|
-
version: apiClientVersion$
|
|
328
|
+
version: apiClientVersion$4,
|
|
329
329
|
}),
|
|
330
330
|
baseHeaders: {
|
|
331
331
|
'content-type': 'text/plain',
|
|
@@ -1363,9 +1363,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1363
1363
|
}
|
|
1364
1364
|
|
|
1365
1365
|
// 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.
|
|
1366
|
-
const apiClientVersion$
|
|
1366
|
+
const apiClientVersion$3 = '5.0.0-beta.5';
|
|
1367
1367
|
const REGIONS = ['eu', 'us'];
|
|
1368
|
-
function getDefaultHosts$
|
|
1368
|
+
function getDefaultHosts$2(region) {
|
|
1369
1369
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
1370
1370
|
return [{ url, accept: 'readWrite', protocol: 'https' }];
|
|
1371
1371
|
}
|
|
@@ -1373,12 +1373,12 @@ function getDefaultHosts$1(region) {
|
|
|
1373
1373
|
function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
1374
1374
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
1375
1375
|
const transporter = createTransporter({
|
|
1376
|
-
hosts: getDefaultHosts$
|
|
1376
|
+
hosts: getDefaultHosts$2(regionOption),
|
|
1377
1377
|
...options,
|
|
1378
1378
|
algoliaAgent: getAlgoliaAgent({
|
|
1379
1379
|
algoliaAgents,
|
|
1380
1380
|
client: 'Personalization',
|
|
1381
|
-
version: apiClientVersion$
|
|
1381
|
+
version: apiClientVersion$3,
|
|
1382
1382
|
}),
|
|
1383
1383
|
baseHeaders: {
|
|
1384
1384
|
'content-type': 'text/plain',
|
|
@@ -1624,8 +1624,8 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1624
1624
|
}
|
|
1625
1625
|
|
|
1626
1626
|
// 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.
|
|
1627
|
-
const apiClientVersion$
|
|
1628
|
-
function getDefaultHosts(appId) {
|
|
1627
|
+
const apiClientVersion$2 = '5.0.0-beta.5';
|
|
1628
|
+
function getDefaultHosts$1(appId) {
|
|
1629
1629
|
return [
|
|
1630
1630
|
{
|
|
1631
1631
|
url: `${appId}-dsn.algolia.net`,
|
|
@@ -1659,12 +1659,12 @@ function getDefaultHosts(appId) {
|
|
|
1659
1659
|
function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
|
|
1660
1660
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
1661
1661
|
const transporter = createTransporter({
|
|
1662
|
-
hosts: getDefaultHosts(appIdOption),
|
|
1662
|
+
hosts: getDefaultHosts$1(appIdOption),
|
|
1663
1663
|
...options,
|
|
1664
1664
|
algoliaAgent: getAlgoliaAgent({
|
|
1665
1665
|
algoliaAgents,
|
|
1666
1666
|
client: 'Search',
|
|
1667
|
-
version: apiClientVersion$
|
|
1667
|
+
version: apiClientVersion$2,
|
|
1668
1668
|
}),
|
|
1669
1669
|
baseHeaders: {
|
|
1670
1670
|
'content-type': 'text/plain',
|
|
@@ -1951,6 +1951,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1951
1951
|
},
|
|
1952
1952
|
/**
|
|
1953
1953
|
* 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.
|
|
1954
|
+
* See https://api-clients-automation.netlify.app/docs/contributing/add-new-api-client#5-helpers for implementation details.
|
|
1954
1955
|
*
|
|
1955
1956
|
* @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.
|
|
1956
1957
|
* @param replaceAllObjects - The `replaceAllObjects` object.
|
|
@@ -1962,7 +1963,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1962
1963
|
async replaceAllObjects({ indexName, objects, batchSize }, requestOptions) {
|
|
1963
1964
|
const randomSuffix = Math.random().toString(36).substring(7);
|
|
1964
1965
|
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
1965
|
-
|
|
1966
|
+
let copyOperationResponse = await this.operationIndex({
|
|
1966
1967
|
indexName,
|
|
1967
1968
|
operationIndexParams: {
|
|
1968
1969
|
operation: 'copy',
|
|
@@ -1970,17 +1971,29 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1970
1971
|
scope: ['settings', 'rules', 'synonyms'],
|
|
1971
1972
|
},
|
|
1972
1973
|
}, requestOptions);
|
|
1974
|
+
const batchResponses = await this.chunkedBatch({ indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, requestOptions);
|
|
1973
1975
|
await this.waitForTask({
|
|
1976
|
+
indexName: tmpIndexName,
|
|
1977
|
+
taskID: copyOperationResponse.taskID,
|
|
1978
|
+
});
|
|
1979
|
+
copyOperationResponse = await this.operationIndex({
|
|
1974
1980
|
indexName,
|
|
1981
|
+
operationIndexParams: {
|
|
1982
|
+
operation: 'copy',
|
|
1983
|
+
destination: tmpIndexName,
|
|
1984
|
+
scope: ['settings', 'rules', 'synonyms'],
|
|
1985
|
+
},
|
|
1986
|
+
}, requestOptions);
|
|
1987
|
+
await this.waitForTask({
|
|
1988
|
+
indexName: tmpIndexName,
|
|
1975
1989
|
taskID: copyOperationResponse.taskID,
|
|
1976
1990
|
});
|
|
1977
|
-
const batchResponses = await this.chunkedBatch({ indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, requestOptions);
|
|
1978
1991
|
const moveOperationResponse = await this.operationIndex({
|
|
1979
1992
|
indexName: tmpIndexName,
|
|
1980
1993
|
operationIndexParams: { operation: 'move', destination: indexName },
|
|
1981
1994
|
}, requestOptions);
|
|
1982
1995
|
await this.waitForTask({
|
|
1983
|
-
indexName,
|
|
1996
|
+
indexName: tmpIndexName,
|
|
1984
1997
|
taskID: moveOperationResponse.taskID,
|
|
1985
1998
|
});
|
|
1986
1999
|
return { copyOperationResponse, batchResponses, moveOperationResponse };
|
|
@@ -3833,7 +3846,369 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3833
3846
|
}
|
|
3834
3847
|
|
|
3835
3848
|
// 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.
|
|
3836
|
-
const apiClientVersion =
|
|
3849
|
+
const apiClientVersion$1 = '5.0.0-beta.5';
|
|
3850
|
+
function getDefaultHosts(appId) {
|
|
3851
|
+
return [
|
|
3852
|
+
{
|
|
3853
|
+
url: `${appId}-dsn.algolia.net`,
|
|
3854
|
+
accept: 'read',
|
|
3855
|
+
protocol: 'https',
|
|
3856
|
+
},
|
|
3857
|
+
{
|
|
3858
|
+
url: `${appId}.algolia.net`,
|
|
3859
|
+
accept: 'write',
|
|
3860
|
+
protocol: 'https',
|
|
3861
|
+
},
|
|
3862
|
+
].concat(shuffle([
|
|
3863
|
+
{
|
|
3864
|
+
url: `${appId}-1.algolianet.com`,
|
|
3865
|
+
accept: 'readWrite',
|
|
3866
|
+
protocol: 'https',
|
|
3867
|
+
},
|
|
3868
|
+
{
|
|
3869
|
+
url: `${appId}-2.algolianet.com`,
|
|
3870
|
+
accept: 'readWrite',
|
|
3871
|
+
protocol: 'https',
|
|
3872
|
+
},
|
|
3873
|
+
{
|
|
3874
|
+
url: `${appId}-3.algolianet.com`,
|
|
3875
|
+
accept: 'readWrite',
|
|
3876
|
+
protocol: 'https',
|
|
3877
|
+
},
|
|
3878
|
+
]));
|
|
3879
|
+
}
|
|
3880
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
3881
|
+
function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
|
|
3882
|
+
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
3883
|
+
const transporter = createTransporter({
|
|
3884
|
+
hosts: getDefaultHosts(appIdOption),
|
|
3885
|
+
...options,
|
|
3886
|
+
algoliaAgent: getAlgoliaAgent({
|
|
3887
|
+
algoliaAgents,
|
|
3888
|
+
client: 'Recommend',
|
|
3889
|
+
version: apiClientVersion$1,
|
|
3890
|
+
}),
|
|
3891
|
+
baseHeaders: {
|
|
3892
|
+
'content-type': 'text/plain',
|
|
3893
|
+
...auth.headers(),
|
|
3894
|
+
...options.baseHeaders,
|
|
3895
|
+
},
|
|
3896
|
+
baseQueryParameters: {
|
|
3897
|
+
...auth.queryParameters(),
|
|
3898
|
+
...options.baseQueryParameters,
|
|
3899
|
+
},
|
|
3900
|
+
});
|
|
3901
|
+
return {
|
|
3902
|
+
transporter,
|
|
3903
|
+
/**
|
|
3904
|
+
* The `appId` currently in use.
|
|
3905
|
+
*/
|
|
3906
|
+
appId: appIdOption,
|
|
3907
|
+
/**
|
|
3908
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
3909
|
+
*/
|
|
3910
|
+
clearCache() {
|
|
3911
|
+
return Promise.all([
|
|
3912
|
+
transporter.requestsCache.clear(),
|
|
3913
|
+
transporter.responsesCache.clear(),
|
|
3914
|
+
]).then(() => undefined);
|
|
3915
|
+
},
|
|
3916
|
+
/**
|
|
3917
|
+
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
3918
|
+
*/
|
|
3919
|
+
get _ua() {
|
|
3920
|
+
return transporter.algoliaAgent.value;
|
|
3921
|
+
},
|
|
3922
|
+
/**
|
|
3923
|
+
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
3924
|
+
*
|
|
3925
|
+
* @param segment - The algolia agent (user-agent) segment to add.
|
|
3926
|
+
* @param version - The version of the agent.
|
|
3927
|
+
*/
|
|
3928
|
+
addAlgoliaAgent(segment, version) {
|
|
3929
|
+
transporter.algoliaAgent.add({ segment, version });
|
|
3930
|
+
},
|
|
3931
|
+
/**
|
|
3932
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
3933
|
+
*
|
|
3934
|
+
* @param customDelete - The customDelete object.
|
|
3935
|
+
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
3936
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
3937
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3938
|
+
*/
|
|
3939
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
3940
|
+
if (!path) {
|
|
3941
|
+
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
3942
|
+
}
|
|
3943
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
3944
|
+
const headers = {};
|
|
3945
|
+
const queryParameters = parameters ? parameters : {};
|
|
3946
|
+
const request = {
|
|
3947
|
+
method: 'DELETE',
|
|
3948
|
+
path: requestPath,
|
|
3949
|
+
queryParameters,
|
|
3950
|
+
headers,
|
|
3951
|
+
};
|
|
3952
|
+
return transporter.request(request, requestOptions);
|
|
3953
|
+
},
|
|
3954
|
+
/**
|
|
3955
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
3956
|
+
*
|
|
3957
|
+
* @param customGet - The customGet object.
|
|
3958
|
+
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
3959
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
3960
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3961
|
+
*/
|
|
3962
|
+
customGet({ path, parameters }, requestOptions) {
|
|
3963
|
+
if (!path) {
|
|
3964
|
+
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
3965
|
+
}
|
|
3966
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
3967
|
+
const headers = {};
|
|
3968
|
+
const queryParameters = parameters ? parameters : {};
|
|
3969
|
+
const request = {
|
|
3970
|
+
method: 'GET',
|
|
3971
|
+
path: requestPath,
|
|
3972
|
+
queryParameters,
|
|
3973
|
+
headers,
|
|
3974
|
+
};
|
|
3975
|
+
return transporter.request(request, requestOptions);
|
|
3976
|
+
},
|
|
3977
|
+
/**
|
|
3978
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
3979
|
+
*
|
|
3980
|
+
* @param customPost - The customPost object.
|
|
3981
|
+
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
3982
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
3983
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
3984
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3985
|
+
*/
|
|
3986
|
+
customPost({ path, parameters, body }, requestOptions) {
|
|
3987
|
+
if (!path) {
|
|
3988
|
+
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
3989
|
+
}
|
|
3990
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
3991
|
+
const headers = {};
|
|
3992
|
+
const queryParameters = parameters ? parameters : {};
|
|
3993
|
+
const request = {
|
|
3994
|
+
method: 'POST',
|
|
3995
|
+
path: requestPath,
|
|
3996
|
+
queryParameters,
|
|
3997
|
+
headers,
|
|
3998
|
+
data: body ? body : {},
|
|
3999
|
+
};
|
|
4000
|
+
return transporter.request(request, requestOptions);
|
|
4001
|
+
},
|
|
4002
|
+
/**
|
|
4003
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
4004
|
+
*
|
|
4005
|
+
* @param customPut - The customPut object.
|
|
4006
|
+
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
4007
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
4008
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
4009
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4010
|
+
*/
|
|
4011
|
+
customPut({ path, parameters, body }, requestOptions) {
|
|
4012
|
+
if (!path) {
|
|
4013
|
+
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
4014
|
+
}
|
|
4015
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
4016
|
+
const headers = {};
|
|
4017
|
+
const queryParameters = parameters ? parameters : {};
|
|
4018
|
+
const request = {
|
|
4019
|
+
method: 'PUT',
|
|
4020
|
+
path: requestPath,
|
|
4021
|
+
queryParameters,
|
|
4022
|
+
headers,
|
|
4023
|
+
data: body ? body : {},
|
|
4024
|
+
};
|
|
4025
|
+
return transporter.request(request, requestOptions);
|
|
4026
|
+
},
|
|
4027
|
+
/**
|
|
4028
|
+
* Deletes a Recommend rule from a recommendation scenario.
|
|
4029
|
+
*
|
|
4030
|
+
* Required API Key ACLs:
|
|
4031
|
+
* - editSettings.
|
|
4032
|
+
*
|
|
4033
|
+
* @param deleteRecommendRule - The deleteRecommendRule object.
|
|
4034
|
+
* @param deleteRecommendRule.indexName - Name of the index on which to perform the operation.
|
|
4035
|
+
* @param deleteRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4036
|
+
* @param deleteRecommendRule.objectID - Unique record identifier.
|
|
4037
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4038
|
+
*/
|
|
4039
|
+
deleteRecommendRule({ indexName, model, objectID }, requestOptions) {
|
|
4040
|
+
if (!indexName) {
|
|
4041
|
+
throw new Error('Parameter `indexName` is required when calling `deleteRecommendRule`.');
|
|
4042
|
+
}
|
|
4043
|
+
if (!model) {
|
|
4044
|
+
throw new Error('Parameter `model` is required when calling `deleteRecommendRule`.');
|
|
4045
|
+
}
|
|
4046
|
+
if (!objectID) {
|
|
4047
|
+
throw new Error('Parameter `objectID` is required when calling `deleteRecommendRule`.');
|
|
4048
|
+
}
|
|
4049
|
+
const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
|
|
4050
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4051
|
+
.replace('{model}', encodeURIComponent(model))
|
|
4052
|
+
.replace('{objectID}', encodeURIComponent(objectID));
|
|
4053
|
+
const headers = {};
|
|
4054
|
+
const queryParameters = {};
|
|
4055
|
+
const request = {
|
|
4056
|
+
method: 'DELETE',
|
|
4057
|
+
path: requestPath,
|
|
4058
|
+
queryParameters,
|
|
4059
|
+
headers,
|
|
4060
|
+
};
|
|
4061
|
+
return transporter.request(request, requestOptions);
|
|
4062
|
+
},
|
|
4063
|
+
/**
|
|
4064
|
+
* Retrieves a Recommend rule that you previously created in the Algolia dashboard.
|
|
4065
|
+
*
|
|
4066
|
+
* Required API Key ACLs:
|
|
4067
|
+
* - settings.
|
|
4068
|
+
*
|
|
4069
|
+
* @param getRecommendRule - The getRecommendRule object.
|
|
4070
|
+
* @param getRecommendRule.indexName - Name of the index on which to perform the operation.
|
|
4071
|
+
* @param getRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4072
|
+
* @param getRecommendRule.objectID - Unique record identifier.
|
|
4073
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4074
|
+
*/
|
|
4075
|
+
getRecommendRule({ indexName, model, objectID }, requestOptions) {
|
|
4076
|
+
if (!indexName) {
|
|
4077
|
+
throw new Error('Parameter `indexName` is required when calling `getRecommendRule`.');
|
|
4078
|
+
}
|
|
4079
|
+
if (!model) {
|
|
4080
|
+
throw new Error('Parameter `model` is required when calling `getRecommendRule`.');
|
|
4081
|
+
}
|
|
4082
|
+
if (!objectID) {
|
|
4083
|
+
throw new Error('Parameter `objectID` is required when calling `getRecommendRule`.');
|
|
4084
|
+
}
|
|
4085
|
+
const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
|
|
4086
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4087
|
+
.replace('{model}', encodeURIComponent(model))
|
|
4088
|
+
.replace('{objectID}', encodeURIComponent(objectID));
|
|
4089
|
+
const headers = {};
|
|
4090
|
+
const queryParameters = {};
|
|
4091
|
+
const request = {
|
|
4092
|
+
method: 'GET',
|
|
4093
|
+
path: requestPath,
|
|
4094
|
+
queryParameters,
|
|
4095
|
+
headers,
|
|
4096
|
+
};
|
|
4097
|
+
return transporter.request(request, requestOptions);
|
|
4098
|
+
},
|
|
4099
|
+
/**
|
|
4100
|
+
* 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.
|
|
4101
|
+
*
|
|
4102
|
+
* Required API Key ACLs:
|
|
4103
|
+
* - editSettings.
|
|
4104
|
+
*
|
|
4105
|
+
* @param getRecommendStatus - The getRecommendStatus object.
|
|
4106
|
+
* @param getRecommendStatus.indexName - Name of the index on which to perform the operation.
|
|
4107
|
+
* @param getRecommendStatus.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4108
|
+
* @param getRecommendStatus.taskID - Unique task identifier.
|
|
4109
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4110
|
+
*/
|
|
4111
|
+
getRecommendStatus({ indexName, model, taskID }, requestOptions) {
|
|
4112
|
+
if (!indexName) {
|
|
4113
|
+
throw new Error('Parameter `indexName` is required when calling `getRecommendStatus`.');
|
|
4114
|
+
}
|
|
4115
|
+
if (!model) {
|
|
4116
|
+
throw new Error('Parameter `model` is required when calling `getRecommendStatus`.');
|
|
4117
|
+
}
|
|
4118
|
+
if (!taskID) {
|
|
4119
|
+
throw new Error('Parameter `taskID` is required when calling `getRecommendStatus`.');
|
|
4120
|
+
}
|
|
4121
|
+
const requestPath = '/1/indexes/{indexName}/{model}/task/{taskID}'
|
|
4122
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4123
|
+
.replace('{model}', encodeURIComponent(model))
|
|
4124
|
+
.replace('{taskID}', encodeURIComponent(taskID));
|
|
4125
|
+
const headers = {};
|
|
4126
|
+
const queryParameters = {};
|
|
4127
|
+
const request = {
|
|
4128
|
+
method: 'GET',
|
|
4129
|
+
path: requestPath,
|
|
4130
|
+
queryParameters,
|
|
4131
|
+
headers,
|
|
4132
|
+
};
|
|
4133
|
+
return transporter.request(request, requestOptions);
|
|
4134
|
+
},
|
|
4135
|
+
/**
|
|
4136
|
+
* Retrieves recommendations from selected AI models.
|
|
4137
|
+
*
|
|
4138
|
+
* Required API Key ACLs:
|
|
4139
|
+
* - search.
|
|
4140
|
+
*
|
|
4141
|
+
* @param getRecommendationsParams - The getRecommendationsParams object.
|
|
4142
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4143
|
+
*/
|
|
4144
|
+
getRecommendations(getRecommendationsParams, requestOptions) {
|
|
4145
|
+
if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {
|
|
4146
|
+
const newSignatureRequest = {
|
|
4147
|
+
requests: getRecommendationsParams,
|
|
4148
|
+
};
|
|
4149
|
+
// eslint-disable-next-line no-param-reassign
|
|
4150
|
+
getRecommendationsParams = newSignatureRequest;
|
|
4151
|
+
}
|
|
4152
|
+
if (!getRecommendationsParams) {
|
|
4153
|
+
throw new Error('Parameter `getRecommendationsParams` is required when calling `getRecommendations`.');
|
|
4154
|
+
}
|
|
4155
|
+
if (!getRecommendationsParams.requests) {
|
|
4156
|
+
throw new Error('Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.');
|
|
4157
|
+
}
|
|
4158
|
+
const requestPath = '/1/indexes/*/recommendations';
|
|
4159
|
+
const headers = {};
|
|
4160
|
+
const queryParameters = {};
|
|
4161
|
+
const request = {
|
|
4162
|
+
method: 'POST',
|
|
4163
|
+
path: requestPath,
|
|
4164
|
+
queryParameters,
|
|
4165
|
+
headers,
|
|
4166
|
+
data: getRecommendationsParams,
|
|
4167
|
+
useReadTransporter: true,
|
|
4168
|
+
cacheable: true,
|
|
4169
|
+
};
|
|
4170
|
+
return transporter.request(request, requestOptions);
|
|
4171
|
+
},
|
|
4172
|
+
/**
|
|
4173
|
+
* Searches for Recommend rules. Use an empty query to list all rules for this recommendation scenario.
|
|
4174
|
+
*
|
|
4175
|
+
* Required API Key ACLs:
|
|
4176
|
+
* - settings.
|
|
4177
|
+
*
|
|
4178
|
+
* @param searchRecommendRules - The searchRecommendRules object.
|
|
4179
|
+
* @param searchRecommendRules.indexName - Name of the index on which to perform the operation.
|
|
4180
|
+
* @param searchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4181
|
+
* @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.
|
|
4182
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4183
|
+
*/
|
|
4184
|
+
searchRecommendRules({ indexName, model, searchRecommendRulesParams, }, requestOptions) {
|
|
4185
|
+
if (!indexName) {
|
|
4186
|
+
throw new Error('Parameter `indexName` is required when calling `searchRecommendRules`.');
|
|
4187
|
+
}
|
|
4188
|
+
if (!model) {
|
|
4189
|
+
throw new Error('Parameter `model` is required when calling `searchRecommendRules`.');
|
|
4190
|
+
}
|
|
4191
|
+
const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/search'
|
|
4192
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4193
|
+
.replace('{model}', encodeURIComponent(model));
|
|
4194
|
+
const headers = {};
|
|
4195
|
+
const queryParameters = {};
|
|
4196
|
+
const request = {
|
|
4197
|
+
method: 'POST',
|
|
4198
|
+
path: requestPath,
|
|
4199
|
+
queryParameters,
|
|
4200
|
+
headers,
|
|
4201
|
+
data: searchRecommendRulesParams ? searchRecommendRulesParams : {},
|
|
4202
|
+
useReadTransporter: true,
|
|
4203
|
+
cacheable: true,
|
|
4204
|
+
};
|
|
4205
|
+
return transporter.request(request, requestOptions);
|
|
4206
|
+
},
|
|
4207
|
+
};
|
|
4208
|
+
}
|
|
4209
|
+
|
|
4210
|
+
// 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.
|
|
4211
|
+
const apiClientVersion = apiClientVersion$2;
|
|
3837
4212
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
3838
4213
|
function algoliasearch(appId, apiKey, options) {
|
|
3839
4214
|
if (!appId || typeof appId !== 'string') {
|
|
@@ -3857,6 +4232,13 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
3857
4232
|
hostsCache: createMemoryCache(),
|
|
3858
4233
|
...options,
|
|
3859
4234
|
};
|
|
4235
|
+
function initRecommend(initOptions = {}) {
|
|
4236
|
+
return createRecommendClient({
|
|
4237
|
+
...commonOptions,
|
|
4238
|
+
...initOptions.options,
|
|
4239
|
+
...initOptions,
|
|
4240
|
+
});
|
|
4241
|
+
}
|
|
3860
4242
|
function initAnalytics(initOptions = {}) {
|
|
3861
4243
|
if (initOptions.region &&
|
|
3862
4244
|
(typeof initOptions.region !== 'string' ||
|
|
@@ -3902,9 +4284,10 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
3902
4284
|
get _ua() {
|
|
3903
4285
|
return this.transporter.algoliaAgent.value;
|
|
3904
4286
|
},
|
|
4287
|
+
initAbtesting,
|
|
3905
4288
|
initAnalytics,
|
|
3906
4289
|
initPersonalization,
|
|
3907
|
-
|
|
4290
|
+
initRecommend,
|
|
3908
4291
|
/**
|
|
3909
4292
|
* Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.
|
|
3910
4293
|
*
|
|
@@ -3914,7 +4297,23 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
3914
4297
|
* @param generateSecuredApiKey.restrictions - A set of properties defining the restrictions of the secured API key.
|
|
3915
4298
|
*/
|
|
3916
4299
|
generateSecuredApiKey({ parentApiKey, restrictions = {}, }) {
|
|
3917
|
-
|
|
4300
|
+
let mergedRestrictions = restrictions;
|
|
4301
|
+
if (restrictions.searchParams) {
|
|
4302
|
+
// merge searchParams with the root restrictions
|
|
4303
|
+
mergedRestrictions = {
|
|
4304
|
+
...restrictions,
|
|
4305
|
+
...restrictions.searchParams,
|
|
4306
|
+
};
|
|
4307
|
+
delete mergedRestrictions.searchParams;
|
|
4308
|
+
}
|
|
4309
|
+
mergedRestrictions = Object.keys(mergedRestrictions)
|
|
4310
|
+
.sort()
|
|
4311
|
+
.reduce((acc, key) => {
|
|
4312
|
+
// eslint-disable-next-line no-param-reassign
|
|
4313
|
+
acc[key] = mergedRestrictions[key];
|
|
4314
|
+
return acc;
|
|
4315
|
+
}, {});
|
|
4316
|
+
const queryParameters = serializeQueryParameters(mergedRestrictions);
|
|
3918
4317
|
return Buffer.from(createHmac('sha256', parentApiKey)
|
|
3919
4318
|
.update(queryParameters)
|
|
3920
4319
|
.digest('hex') + queryParameters).toString('base64');
|