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