algoliasearch 5.0.0-alpha.99 → 5.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/builds/browser.ts +22 -18
- package/builds/models.ts +140 -6
- package/builds/node.ts +92 -16
- package/dist/algoliasearch/builds/browser.d.ts +83 -71
- 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 +101 -72
- package/dist/algoliasearch/builds/node.d.ts.map +1 -1
- package/dist/algoliasearch.cjs +1259 -399
- package/dist/algoliasearch.esm.browser.js +1226 -423
- package/dist/algoliasearch.esm.node.js +1260 -400
- package/dist/algoliasearch.umd.js +2 -2
- package/dist/client-abtesting/model/aBTest.d.ts +14 -29
- package/dist/client-abtesting/model/aBTest.d.ts.map +1 -1
- package/dist/client-abtesting/model/aBTestConfiguration.d.ts +12 -0
- package/dist/client-abtesting/model/aBTestConfiguration.d.ts.map +1 -0
- package/dist/client-abtesting/model/aBTestResponse.d.ts +3 -3
- package/dist/client-abtesting/model/abTestsVariant.d.ts +3 -3
- package/dist/client-abtesting/model/addABTestsRequest.d.ts +1 -1
- package/dist/client-abtesting/model/clientMethodProps.d.ts +7 -7
- package/dist/client-abtesting/model/{currenciesValue.d.ts → currency.d.ts} +2 -2
- package/dist/client-abtesting/model/currency.d.ts.map +1 -0
- package/dist/client-abtesting/model/customSearchParams.d.ts +1 -1
- package/dist/client-abtesting/model/effect.d.ts +5 -0
- package/dist/client-abtesting/model/effect.d.ts.map +1 -0
- package/dist/client-abtesting/model/emptySearch.d.ts +10 -0
- package/dist/client-abtesting/model/emptySearch.d.ts.map +1 -0
- package/dist/client-abtesting/model/index.d.ts +7 -1
- package/dist/client-abtesting/model/index.d.ts.map +1 -1
- package/dist/client-abtesting/model/listABTestsResponse.d.ts +2 -2
- package/dist/client-abtesting/model/listABTestsResponse.d.ts.map +1 -1
- package/dist/client-abtesting/model/minimumDetectableEffect.d.ts +12 -0
- package/dist/client-abtesting/model/minimumDetectableEffect.d.ts.map +1 -0
- package/dist/client-abtesting/model/outliers.d.ts +10 -0
- package/dist/client-abtesting/model/outliers.d.ts.map +1 -0
- package/dist/client-abtesting/model/status.d.ts +5 -0
- package/dist/client-abtesting/model/status.d.ts.map +1 -0
- package/dist/client-abtesting/model/variant.d.ts +29 -25
- package/dist/client-abtesting/model/variant.d.ts.map +1 -1
- package/dist/client-abtesting/src/abtestingClient.d.ts +28 -26
- package/dist/client-abtesting/src/abtestingClient.d.ts.map +1 -1
- package/dist/client-analytics/model/clickPositionsInner.d.ts +14 -0
- package/dist/client-analytics/model/clickPositionsInner.d.ts.map +1 -0
- package/dist/client-analytics/model/clientMethodProps.d.ts +161 -90
- package/dist/client-analytics/model/clientMethodProps.d.ts.map +1 -1
- package/dist/client-analytics/model/currenciesValue.d.ts +14 -0
- package/dist/client-analytics/model/currenciesValue.d.ts.map +1 -0
- package/dist/client-analytics/model/dailyAddToCartRates.d.ts +19 -0
- package/dist/client-analytics/model/dailyAddToCartRates.d.ts.map +1 -0
- package/dist/client-analytics/model/dailyAverageClicks.d.ts +15 -0
- package/dist/client-analytics/model/dailyAverageClicks.d.ts.map +1 -0
- package/dist/client-analytics/model/dailyClickThroughRates.d.ts +19 -0
- package/dist/client-analytics/model/dailyClickThroughRates.d.ts.map +1 -0
- package/dist/client-analytics/model/dailyConversionRates.d.ts +19 -0
- package/dist/client-analytics/model/dailyConversionRates.d.ts.map +1 -0
- package/dist/client-analytics/model/dailyNoClickRates.d.ts +19 -0
- package/dist/client-analytics/model/dailyNoClickRates.d.ts.map +1 -0
- package/dist/client-analytics/model/dailyNoResultsRates.d.ts +19 -0
- package/dist/client-analytics/model/dailyNoResultsRates.d.ts.map +1 -0
- package/dist/client-analytics/model/dailyPurchaseRates.d.ts +19 -0
- package/dist/client-analytics/model/dailyPurchaseRates.d.ts.map +1 -0
- package/dist/client-analytics/model/dailyRevenue.d.ts +12 -0
- package/dist/client-analytics/model/dailyRevenue.d.ts.map +1 -0
- package/dist/client-analytics/model/dailySearches.d.ts +11 -0
- package/dist/client-analytics/model/dailySearches.d.ts.map +1 -0
- package/dist/client-analytics/model/dailySearchesNoClicks.d.ts +15 -0
- package/dist/client-analytics/model/dailySearchesNoClicks.d.ts.map +1 -0
- package/dist/client-analytics/model/dailySearchesNoResults.d.ts +15 -0
- package/dist/client-analytics/model/dailySearchesNoResults.d.ts.map +1 -0
- package/dist/client-analytics/model/dailyUsers.d.ts +11 -0
- package/dist/client-analytics/model/dailyUsers.d.ts.map +1 -0
- package/dist/client-analytics/model/getAddToCartRateResponse.d.ts +20 -0
- package/dist/client-analytics/model/getAddToCartRateResponse.d.ts.map +1 -0
- package/dist/client-analytics/model/getAverageClickPositionResponse.d.ts +6 -6
- package/dist/client-analytics/model/getAverageClickPositionResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getClickPositionsResponse.d.ts +3 -3
- package/dist/client-analytics/model/getClickPositionsResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getClickThroughRateResponse.d.ts +7 -7
- package/dist/client-analytics/model/getClickThroughRateResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getConversionRateResponse.d.ts +20 -0
- package/dist/client-analytics/model/getConversionRateResponse.d.ts.map +1 -0
- package/dist/client-analytics/model/getNoClickRateResponse.d.ts +6 -6
- package/dist/client-analytics/model/getNoClickRateResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getNoResultsRateResponse.d.ts +6 -6
- package/dist/client-analytics/model/getNoResultsRateResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getPurchaseRateResponse.d.ts +20 -0
- package/dist/client-analytics/model/getPurchaseRateResponse.d.ts.map +1 -0
- package/dist/client-analytics/model/getRevenue.d.ts +13 -0
- package/dist/client-analytics/model/getRevenue.d.ts.map +1 -0
- package/dist/client-analytics/model/getSearchesCountResponse.d.ts +3 -3
- package/dist/client-analytics/model/getSearchesCountResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getSearchesNoClicksResponse.d.ts +3 -3
- package/dist/client-analytics/model/getSearchesNoClicksResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getSearchesNoResultsResponse.d.ts +3 -3
- package/dist/client-analytics/model/getSearchesNoResultsResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getStatusResponse.d.ts +2 -2
- package/dist/client-analytics/model/getStatusResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getTopCountriesResponse.d.ts +1 -1
- package/dist/client-analytics/model/getTopFilterAttributesResponse.d.ts +1 -1
- package/dist/client-analytics/model/getTopFilterForAttribute.d.ts +2 -4
- package/dist/client-analytics/model/getTopFilterForAttribute.d.ts.map +1 -1
- package/dist/client-analytics/model/getTopFiltersNoResultsResponse.d.ts +2 -2
- package/dist/client-analytics/model/getTopFiltersNoResultsResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getTopFiltersNoResultsValue.d.ts +2 -4
- package/dist/client-analytics/model/getTopFiltersNoResultsValue.d.ts.map +1 -1
- package/dist/client-analytics/model/getTopHitsResponse.d.ts +2 -1
- package/dist/client-analytics/model/getTopHitsResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getTopSearchesResponse.d.ts +2 -1
- package/dist/client-analytics/model/getTopSearchesResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getUsersCountResponse.d.ts +4 -4
- package/dist/client-analytics/model/getUsersCountResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/index.d.ts +23 -11
- package/dist/client-analytics/model/index.d.ts.map +1 -1
- package/dist/client-analytics/model/operator.d.ts +5 -0
- package/dist/client-analytics/model/operator.d.ts.map +1 -0
- package/dist/client-analytics/model/orderBy.d.ts +1 -1
- package/dist/client-analytics/model/topCountry.d.ts +1 -1
- package/dist/client-analytics/model/topHit.d.ts +1 -1
- package/dist/client-analytics/model/topHitWithAnalytics.d.ts +9 -9
- package/dist/client-analytics/model/topHitWithAnalytics.d.ts.map +1 -1
- package/dist/client-analytics/model/topHitWithRevenueAnalytics.d.ts +52 -0
- package/dist/client-analytics/model/topHitWithRevenueAnalytics.d.ts.map +1 -0
- package/dist/client-analytics/model/topHitsResponse.d.ts +1 -1
- package/dist/client-analytics/model/topHitsResponseWithAnalytics.d.ts +1 -1
- package/dist/client-analytics/model/topHitsResponseWithRevenueAnalytics.d.ts +8 -0
- package/dist/client-analytics/model/topHitsResponseWithRevenueAnalytics.d.ts.map +1 -0
- package/dist/client-analytics/model/topSearch.d.ts +3 -3
- package/dist/client-analytics/model/topSearchWithAnalytics.d.ts +17 -12
- package/dist/client-analytics/model/topSearchWithAnalytics.d.ts.map +1 -1
- package/dist/client-analytics/model/topSearchWithRevenueAnalytics.d.ts +65 -0
- package/dist/client-analytics/model/topSearchWithRevenueAnalytics.d.ts.map +1 -0
- package/dist/client-analytics/model/topSearchesResponse.d.ts +1 -1
- package/dist/client-analytics/model/topSearchesResponseWithAnalytics.d.ts +1 -1
- package/dist/client-analytics/model/topSearchesResponseWithRevenueAnalytics.d.ts +8 -0
- package/dist/client-analytics/model/topSearchesResponseWithRevenueAnalytics.d.ts.map +1 -0
- package/dist/client-analytics/src/analyticsClient.d.ts +211 -138
- package/dist/client-analytics/src/analyticsClient.d.ts.map +1 -1
- package/dist/client-personalization/model/clientMethodProps.d.ts +2 -2
- package/dist/client-personalization/model/deleteUserProfileResponse.d.ts +2 -2
- package/dist/client-personalization/model/eventScoring.d.ts +4 -6
- package/dist/client-personalization/model/eventScoring.d.ts.map +1 -1
- package/dist/client-personalization/model/eventType.d.ts +5 -0
- package/dist/client-personalization/model/eventType.d.ts.map +1 -0
- package/dist/client-personalization/model/facetScoring.d.ts +2 -2
- package/dist/client-personalization/model/getUserTokenResponse.d.ts +3 -3
- package/dist/client-personalization/model/index.d.ts +1 -0
- package/dist/client-personalization/model/index.d.ts.map +1 -1
- package/dist/client-personalization/model/personalizationStrategyParams.d.ts +3 -3
- package/dist/client-personalization/src/personalizationClient.d.ts +19 -19
- package/dist/client-personalization/src/personalizationClient.d.ts.map +1 -1
- package/dist/client-search/model/acl.d.ts +1 -1
- package/dist/client-search/model/action.d.ts +1 -1
- package/dist/client-search/model/addApiKeyResponse.d.ts +1 -1
- package/dist/client-search/model/anchoring.d.ts +1 -1
- package/dist/client-search/model/apiKey.d.ts +8 -8
- package/dist/client-search/model/apiKeyOperation.d.ts +2 -0
- package/dist/client-search/model/apiKeyOperation.d.ts.map +1 -0
- package/dist/client-search/model/aroundPrecision.d.ts +1 -1
- package/dist/client-search/model/aroundPrecisionFromValueInner.d.ts +9 -0
- package/dist/client-search/model/aroundPrecisionFromValueInner.d.ts.map +1 -1
- package/dist/client-search/model/aroundRadius.d.ts +1 -1
- package/dist/client-search/model/aroundRadiusAll.d.ts +3 -0
- package/dist/client-search/model/aroundRadiusAll.d.ts.map +1 -1
- package/dist/client-search/model/automaticFacetFilter.d.ts +4 -4
- package/dist/client-search/model/automaticFacetFilters.d.ts +1 -1
- package/dist/client-search/model/baseGetApiKeyResponse.d.ts +1 -1
- package/dist/client-search/model/baseIndexSettings.d.ts +23 -18
- package/dist/client-search/model/baseIndexSettings.d.ts.map +1 -1
- package/dist/client-search/model/baseSearchParamsWithoutQuery.d.ts +26 -29
- package/dist/client-search/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
- package/dist/client-search/model/baseSearchResponse.d.ts +8 -20
- package/dist/client-search/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/client-search/model/batchDictionaryEntriesParams.d.ts +3 -3
- package/dist/client-search/model/batchResponse.d.ts +2 -2
- package/dist/client-search/model/browsePagination.d.ts +19 -0
- package/dist/client-search/model/browsePagination.d.ts.map +1 -0
- package/dist/client-search/model/browseResponse.d.ts +2 -1
- package/dist/client-search/model/browseResponse.d.ts.map +1 -1
- package/dist/client-search/model/builtInOperation.d.ts +2 -2
- package/dist/client-search/model/builtInOperationType.d.ts +1 -1
- package/dist/client-search/model/clientMethodProps.d.ts +137 -70
- package/dist/client-search/model/clientMethodProps.d.ts.map +1 -1
- package/dist/client-search/model/condition.d.ts +7 -3
- package/dist/client-search/model/condition.d.ts.map +1 -1
- package/dist/client-search/model/consequence.d.ts +5 -5
- package/dist/client-search/model/consequenceHide.d.ts +2 -2
- package/dist/client-search/model/consequenceQuery.d.ts +1 -1
- package/dist/client-search/model/consequenceQueryObject.d.ts +2 -2
- package/dist/client-search/model/createdAtResponse.d.ts +1 -1
- package/dist/client-search/model/cursor.d.ts +1 -1
- package/dist/client-search/model/deleteApiKeyResponse.d.ts +1 -1
- package/dist/client-search/model/deleteByParams.d.ts +4 -4
- package/dist/client-search/model/deleteSourceResponse.d.ts +1 -1
- package/dist/client-search/model/deletedAtResponse.d.ts +2 -2
- package/dist/client-search/model/dictionaryEntry.d.ts +6 -8
- package/dist/client-search/model/dictionaryEntry.d.ts.map +1 -1
- package/dist/client-search/model/dictionaryEntryState.d.ts +1 -1
- package/dist/client-search/model/dictionaryLanguage.d.ts +2 -2
- package/dist/client-search/model/dictionarySettingsParams.d.ts +1 -1
- package/dist/client-search/model/distinct.d.ts +1 -1
- package/dist/client-search/model/edit.d.ts +1 -1
- package/dist/client-search/model/exactOnSingleWordQuery.d.ts +1 -1
- package/dist/client-search/model/facetFilters.d.ts +2 -3
- package/dist/client-search/model/facetFilters.d.ts.map +1 -1
- package/dist/client-search/model/facetHits.d.ts +2 -2
- package/dist/client-search/model/facetOrdering.d.ts +2 -2
- package/dist/client-search/model/facets.d.ts +2 -2
- package/dist/client-search/model/fetchedIndex.d.ts +5 -1
- package/dist/client-search/model/fetchedIndex.d.ts.map +1 -1
- package/dist/client-search/model/getObjectsRequest.d.ts +3 -3
- package/dist/client-search/model/getObjectsResponse.d.ts +1 -1
- package/dist/client-search/model/hasPendingMappingsResponse.d.ts +1 -1
- package/dist/client-search/model/highlightResult.d.ts +1 -1
- package/dist/client-search/model/highlightResult.d.ts.map +1 -1
- package/dist/client-search/model/highlightResultOption.d.ts +3 -3
- package/dist/client-search/model/hit.d.ts +4 -4
- package/dist/client-search/model/ignorePlurals.d.ts +3 -2
- package/dist/client-search/model/ignorePlurals.d.ts.map +1 -1
- package/dist/client-search/model/index.d.ts +8 -1
- package/dist/client-search/model/index.d.ts.map +1 -1
- package/dist/client-search/model/indexSettings.d.ts +1 -1
- package/dist/client-search/model/indexSettingsAsSearchParams.d.ts +32 -35
- package/dist/client-search/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/client-search/model/log.d.ts +11 -11
- package/dist/client-search/model/logQuery.d.ts +1 -1
- package/dist/client-search/model/matchLevel.d.ts +1 -1
- package/dist/client-search/model/mode.d.ts +1 -1
- package/dist/client-search/model/multipleBatchRequest.d.ts +1 -1
- package/dist/client-search/model/multipleBatchResponse.d.ts +2 -2
- package/dist/client-search/model/numericFilters.d.ts +2 -3
- package/dist/client-search/model/numericFilters.d.ts.map +1 -1
- package/dist/client-search/model/operationIndexParams.d.ts +2 -2
- package/dist/client-search/model/operationType.d.ts +1 -1
- package/dist/client-search/model/optionalFilters.d.ts +2 -3
- package/dist/client-search/model/optionalFilters.d.ts.map +1 -1
- package/dist/client-search/model/params.d.ts +1 -1
- package/dist/client-search/model/promoteObjectID.d.ts +2 -2
- package/dist/client-search/model/promoteObjectIDs.d.ts +2 -2
- package/dist/client-search/model/queryType.d.ts +1 -1
- package/dist/client-search/model/rankingInfo.d.ts +13 -10
- package/dist/client-search/model/rankingInfo.d.ts.map +1 -1
- package/dist/client-search/model/reRankingApplyFilter.d.ts +2 -3
- package/dist/client-search/model/reRankingApplyFilter.d.ts.map +1 -1
- package/dist/client-search/model/redirect.d.ts +1 -1
- package/dist/client-search/model/redirectURL.d.ts +7 -0
- package/dist/client-search/model/redirectURL.d.ts.map +1 -0
- package/dist/client-search/model/removeStopWords.d.ts +3 -2
- package/dist/client-search/model/removeStopWords.d.ts.map +1 -1
- package/dist/client-search/model/removeUserIdResponse.d.ts +1 -1
- package/dist/client-search/model/removeWordsIfNoResults.d.ts +1 -1
- package/dist/client-search/model/renderingContent.d.ts +3 -1
- package/dist/client-search/model/renderingContent.d.ts.map +1 -1
- package/dist/client-search/model/replaceAllObjectsResponse.d.ts +11 -0
- package/dist/client-search/model/replaceAllObjectsResponse.d.ts.map +1 -0
- package/dist/client-search/model/replaceSourceResponse.d.ts +1 -1
- package/dist/client-search/model/rule.d.ts +5 -5
- package/dist/client-search/model/saveObjectResponse.d.ts +3 -3
- package/dist/client-search/model/saveSynonymResponse.d.ts +2 -2
- package/dist/client-search/model/searchDictionaryEntriesParams.d.ts +5 -7
- package/dist/client-search/model/searchDictionaryEntriesParams.d.ts.map +1 -1
- package/dist/client-search/model/searchDictionaryEntriesResponse.d.ts +20 -0
- package/dist/client-search/model/searchDictionaryEntriesResponse.d.ts.map +1 -0
- package/dist/client-search/model/searchForFacetValuesRequest.d.ts +1 -1
- package/dist/client-search/model/searchForFacetValuesResponse.d.ts +4 -1
- package/dist/client-search/model/searchForFacetValuesResponse.d.ts.map +1 -1
- package/dist/client-search/model/searchForFacetsOptions.d.ts +2 -2
- package/dist/client-search/model/searchForHitsOptions.d.ts +1 -1
- package/dist/client-search/model/searchHits.d.ts +6 -3
- package/dist/client-search/model/searchHits.d.ts.map +1 -1
- package/dist/client-search/model/searchPagination.d.ts +19 -0
- package/dist/client-search/model/searchPagination.d.ts.map +1 -0
- package/dist/client-search/model/searchParamsObject.d.ts +3 -0
- package/dist/client-search/model/searchParamsObject.d.ts.map +1 -1
- package/dist/client-search/model/searchParamsQuery.d.ts +1 -1
- package/dist/client-search/model/searchResponse.d.ts +2 -1
- package/dist/client-search/model/searchResponse.d.ts.map +1 -1
- package/dist/client-search/model/searchRulesParams.d.ts +4 -8
- package/dist/client-search/model/searchRulesParams.d.ts.map +1 -1
- package/dist/client-search/model/searchRulesResponse.d.ts +2 -2
- package/dist/client-search/model/searchStrategy.d.ts +1 -1
- package/dist/client-search/model/searchSynonymsParams.d.ts +2 -2
- package/dist/client-search/model/searchSynonymsResponse.d.ts +2 -2
- package/dist/client-search/model/searchUserIdsParams.d.ts +1 -1
- package/dist/client-search/model/searchUserIdsResponse.d.ts +3 -3
- package/dist/client-search/model/securedApiKeyRestrictions.d.ts +25 -0
- package/dist/client-search/model/securedApiKeyRestrictions.d.ts.map +1 -0
- package/dist/client-search/model/semanticSearch.d.ts +2 -2
- package/dist/client-search/model/snippetResult.d.ts +1 -1
- package/dist/client-search/model/snippetResult.d.ts.map +1 -1
- package/dist/client-search/model/snippetResultOption.d.ts +2 -2
- package/dist/client-search/model/sortRemainingBy.d.ts +1 -1
- package/dist/client-search/model/supportedLanguage.d.ts +5 -0
- package/dist/client-search/model/supportedLanguage.d.ts.map +1 -0
- package/dist/client-search/model/tagFilters.d.ts +2 -3
- package/dist/client-search/model/tagFilters.d.ts.map +1 -1
- package/dist/client-search/model/taskStatus.d.ts +1 -1
- package/dist/client-search/model/timeRange.d.ts +2 -2
- package/dist/client-search/model/typoTolerance.d.ts +1 -1
- package/dist/client-search/model/typoToleranceEnum.d.ts +3 -0
- package/dist/client-search/model/typoToleranceEnum.d.ts.map +1 -1
- package/dist/client-search/model/updateApiKeyResponse.d.ts +1 -1
- package/dist/client-search/model/updatedAtResponse.d.ts +2 -2
- package/dist/client-search/model/updatedAtWithObjectIdResponse.d.ts +3 -3
- package/dist/client-search/model/updatedRuleResponse.d.ts +3 -3
- package/dist/client-search/model/userHit.d.ts +1 -1
- package/dist/client-search/model/userId.d.ts +1 -1
- package/dist/client-search/model/value.d.ts +5 -1
- package/dist/client-search/model/value.d.ts.map +1 -1
- package/dist/client-search/src/searchClient.d.ts +385 -208
- package/dist/client-search/src/searchClient.d.ts.map +1 -1
- package/dist/lite/builds/browser.d.ts +15 -3
- package/dist/lite/builds/browser.d.ts.map +1 -1
- package/dist/lite/builds/node.d.ts +15 -3
- package/dist/lite/builds/node.d.ts.map +1 -1
- package/dist/lite/lite.cjs +45 -6
- package/dist/lite/lite.esm.browser.js +59 -30
- package/dist/lite/lite.esm.node.js +45 -6
- package/dist/lite/lite.umd.js +2 -2
- package/dist/lite/model/acl.d.ts +1 -1
- package/dist/lite/model/apiKey.d.ts +8 -8
- package/dist/lite/model/aroundPrecision.d.ts +1 -1
- package/dist/lite/model/aroundPrecisionFromValueInner.d.ts +9 -0
- package/dist/lite/model/aroundPrecisionFromValueInner.d.ts.map +1 -1
- package/dist/lite/model/aroundRadius.d.ts +1 -1
- package/dist/lite/model/aroundRadiusAll.d.ts +3 -0
- package/dist/lite/model/aroundRadiusAll.d.ts.map +1 -1
- package/dist/lite/model/automaticFacetFilter.d.ts +4 -4
- package/dist/lite/model/automaticFacetFilters.d.ts +1 -1
- package/dist/lite/model/baseGetApiKeyResponse.d.ts +1 -1
- package/dist/lite/model/baseIndexSettings.d.ts +23 -18
- 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/baseSearchParamsWithoutQuery.d.ts +26 -29
- package/dist/lite/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
- package/dist/lite/model/baseSearchResponse.d.ts +8 -20
- package/dist/lite/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/lite/model/boughtTogetherQuery.d.ts +4 -0
- package/dist/lite/model/boughtTogetherQuery.d.ts.map +1 -0
- package/dist/lite/model/browsePagination.d.ts +19 -0
- package/dist/lite/model/browsePagination.d.ts.map +1 -0
- package/dist/lite/model/browseResponse.d.ts +2 -1
- package/dist/lite/model/browseResponse.d.ts.map +1 -1
- package/dist/lite/model/clientMethodProps.d.ts +7 -0
- package/dist/lite/model/clientMethodProps.d.ts.map +1 -1
- package/dist/lite/model/consequenceQuery.d.ts +1 -1
- package/dist/lite/model/consequenceQueryObject.d.ts +2 -2
- package/dist/lite/model/cursor.d.ts +1 -1
- package/dist/lite/model/distinct.d.ts +1 -1
- package/dist/lite/model/edit.d.ts +1 -1
- package/dist/lite/model/exactOnSingleWordQuery.d.ts +1 -1
- package/dist/lite/model/facetFilters.d.ts +2 -3
- package/dist/lite/model/facetFilters.d.ts.map +1 -1
- package/dist/lite/model/facetHits.d.ts +2 -2
- package/dist/lite/model/facetOrdering.d.ts +2 -2
- package/dist/lite/model/facets.d.ts +2 -2
- 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/highlightResult.d.ts +1 -1
- package/dist/lite/model/highlightResult.d.ts.map +1 -1
- package/dist/lite/model/highlightResultOption.d.ts +3 -3
- package/dist/lite/model/hit.d.ts +4 -4
- package/dist/lite/model/ignorePlurals.d.ts +3 -2
- package/dist/lite/model/ignorePlurals.d.ts.map +1 -1
- package/dist/lite/model/index.d.ts +32 -37
- package/dist/lite/model/index.d.ts.map +1 -1
- package/dist/lite/model/indexSettings.d.ts +1 -1
- package/dist/lite/model/indexSettingsAsSearchParams.d.ts +32 -35
- package/dist/lite/model/indexSettingsAsSearchParams.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/matchLevel.d.ts +1 -1
- package/dist/lite/model/mode.d.ts +1 -1
- package/dist/lite/model/numericFilters.d.ts +2 -3
- package/dist/lite/model/numericFilters.d.ts.map +1 -1
- package/dist/lite/model/optionalFilters.d.ts +2 -3
- package/dist/lite/model/optionalFilters.d.ts.map +1 -1
- package/dist/lite/model/params.d.ts +1 -1
- package/dist/lite/model/queryType.d.ts +1 -1
- package/dist/lite/model/rankingInfo.d.ts +13 -10
- package/dist/lite/model/rankingInfo.d.ts.map +1 -1
- package/dist/lite/model/reRankingApplyFilter.d.ts +2 -3
- package/dist/lite/model/reRankingApplyFilter.d.ts.map +1 -1
- package/dist/lite/model/recommendHit.d.ts +27 -0
- package/dist/lite/model/recommendHit.d.ts.map +1 -0
- package/dist/lite/model/recommendationsHit.d.ts +4 -0
- package/dist/lite/model/recommendationsHit.d.ts.map +1 -0
- package/dist/lite/model/recommendationsHits.d.ts +5 -0
- package/dist/lite/model/recommendationsHits.d.ts.map +1 -0
- package/dist/lite/model/recommendationsRequest.d.ts +8 -0
- package/dist/lite/model/recommendationsRequest.d.ts.map +1 -0
- package/dist/lite/model/recommendationsResults.d.ts +5 -0
- package/dist/lite/model/recommendationsResults.d.ts.map +1 -0
- package/dist/lite/model/recommendedForYou.d.ts +7 -0
- package/dist/lite/model/recommendedForYou.d.ts.map +1 -0
- package/dist/lite/model/recommendedForYouModel.d.ts +5 -0
- package/dist/lite/model/recommendedForYouModel.d.ts.map +1 -0
- package/dist/lite/model/recommendedForYouQuery.d.ts +4 -0
- package/dist/lite/model/recommendedForYouQuery.d.ts.map +1 -0
- package/dist/lite/model/redirect.d.ts +1 -1
- package/dist/lite/model/redirectURL.d.ts +7 -0
- package/dist/lite/model/redirectURL.d.ts.map +1 -0
- package/dist/lite/model/relatedModel.d.ts +5 -0
- package/dist/lite/model/relatedModel.d.ts.map +1 -0
- package/dist/lite/model/relatedProducts.d.ts +11 -0
- package/dist/lite/model/relatedProducts.d.ts.map +1 -0
- package/dist/lite/model/relatedQuery.d.ts +4 -0
- package/dist/lite/model/relatedQuery.d.ts.map +1 -0
- package/dist/lite/model/removeStopWords.d.ts +3 -2
- package/dist/lite/model/removeStopWords.d.ts.map +1 -1
- package/dist/lite/model/removeWordsIfNoResults.d.ts +1 -1
- package/dist/lite/model/renderingContent.d.ts +3 -1
- package/dist/lite/model/renderingContent.d.ts.map +1 -1
- package/dist/lite/model/searchForFacetValuesResponse.d.ts +4 -1
- package/dist/lite/model/searchForFacetValuesResponse.d.ts.map +1 -1
- package/dist/lite/model/searchForFacetsOptions.d.ts +2 -2
- package/dist/lite/model/searchForHitsOptions.d.ts +1 -1
- package/dist/lite/model/searchHits.d.ts +6 -3
- package/dist/lite/model/searchHits.d.ts.map +1 -1
- package/dist/lite/model/searchPagination.d.ts +19 -0
- package/dist/lite/model/searchPagination.d.ts.map +1 -0
- package/dist/lite/model/searchParams.d.ts +1 -2
- package/dist/lite/model/searchParams.d.ts.map +1 -1
- package/dist/lite/model/searchParamsObject.d.ts +3 -0
- package/dist/lite/model/searchParamsObject.d.ts.map +1 -1
- package/dist/lite/model/searchParamsQuery.d.ts +1 -1
- package/dist/lite/model/searchResponse.d.ts +2 -1
- package/dist/lite/model/searchResponse.d.ts.map +1 -1
- package/dist/lite/model/searchStrategy.d.ts +1 -1
- package/dist/lite/model/semanticSearch.d.ts +2 -2
- package/dist/lite/model/snippetResult.d.ts +1 -1
- package/dist/lite/model/snippetResult.d.ts.map +1 -1
- package/dist/lite/model/snippetResultOption.d.ts +2 -2
- package/dist/lite/model/sortRemainingBy.d.ts +1 -1
- package/dist/lite/model/supportedLanguage.d.ts +5 -0
- package/dist/lite/model/supportedLanguage.d.ts.map +1 -0
- package/dist/lite/model/tagFilters.d.ts +2 -3
- package/dist/lite/model/tagFilters.d.ts.map +1 -1
- package/dist/lite/model/trendingFacetHit.d.ts +18 -0
- package/dist/lite/model/trendingFacetHit.d.ts.map +1 -0
- package/dist/lite/model/trendingFacets.d.ts +11 -0
- package/dist/lite/model/trendingFacets.d.ts.map +1 -0
- package/dist/lite/model/trendingFacetsModel.d.ts +5 -0
- package/dist/lite/model/trendingFacetsModel.d.ts.map +1 -0
- package/dist/lite/model/trendingFacetsQuery.d.ts +4 -0
- package/dist/lite/model/trendingFacetsQuery.d.ts.map +1 -0
- package/dist/lite/model/trendingItems.d.ts +15 -0
- package/dist/lite/model/trendingItems.d.ts.map +1 -0
- package/dist/lite/model/trendingItemsModel.d.ts +5 -0
- package/dist/lite/model/trendingItemsModel.d.ts.map +1 -0
- package/dist/lite/model/trendingItemsQuery.d.ts +4 -0
- package/dist/lite/model/trendingItemsQuery.d.ts.map +1 -0
- package/dist/lite/model/typoTolerance.d.ts +1 -1
- package/dist/lite/model/typoToleranceEnum.d.ts +3 -0
- package/dist/lite/model/typoToleranceEnum.d.ts.map +1 -1
- package/dist/lite/model/value.d.ts +5 -1
- package/dist/lite/model/value.d.ts.map +1 -1
- package/dist/lite/src/liteClient.d.ts +19 -10
- package/dist/lite/src/liteClient.d.ts.map +1 -1
- package/dist/recommend/model/advancedSyntaxFeatures.d.ts +2 -0
- package/dist/recommend/model/advancedSyntaxFeatures.d.ts.map +1 -0
- package/dist/recommend/model/alternativesAsExact.d.ts +2 -0
- package/dist/recommend/model/alternativesAsExact.d.ts.map +1 -0
- package/dist/recommend/model/aroundPrecision.d.ts +6 -0
- package/dist/recommend/model/aroundPrecision.d.ts.map +1 -0
- package/dist/recommend/model/aroundPrecisionFromValueInner.d.ts +14 -0
- package/dist/recommend/model/aroundPrecisionFromValueInner.d.ts.map +1 -0
- package/dist/recommend/model/aroundRadius.d.ts +6 -0
- package/dist/recommend/model/aroundRadius.d.ts.map +1 -0
- package/dist/recommend/model/aroundRadiusAll.d.ts +5 -0
- package/dist/recommend/model/aroundRadiusAll.d.ts.map +1 -0
- package/dist/recommend/model/autoFacetFilter.d.ts +14 -0
- package/dist/recommend/model/autoFacetFilter.d.ts.map +1 -0
- package/dist/recommend/model/baseRecommendRequest.d.ts +17 -0
- package/dist/recommend/model/baseRecommendRequest.d.ts.map +1 -0
- package/dist/recommend/model/baseSearchParams.d.ts +4 -0
- package/dist/recommend/model/baseSearchParams.d.ts.map +1 -0
- package/dist/recommend/model/baseSearchParamsWithoutQuery.d.ts +116 -0
- package/dist/recommend/model/baseSearchParamsWithoutQuery.d.ts.map +1 -0
- package/dist/recommend/model/baseSearchResponse.d.ts +94 -0
- package/dist/recommend/model/baseSearchResponse.d.ts.map +1 -0
- package/dist/recommend/model/boughtTogetherQuery.d.ts +4 -0
- package/dist/recommend/model/boughtTogetherQuery.d.ts.map +1 -0
- package/dist/recommend/model/clientMethodProps.d.ts +135 -0
- package/dist/recommend/model/clientMethodProps.d.ts.map +1 -0
- package/dist/recommend/model/condition.d.ts +14 -0
- package/dist/recommend/model/condition.d.ts.map +1 -0
- package/dist/recommend/model/consequence.d.ts +18 -0
- package/dist/recommend/model/consequence.d.ts.map +1 -0
- package/dist/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 +94 -0
- package/dist/recommend/model/index.d.ts.map +1 -0
- package/dist/recommend/model/indexSettingsAsSearchParams.d.ts +160 -0
- package/dist/recommend/model/indexSettingsAsSearchParams.d.ts.map +1 -0
- package/dist/recommend/model/lookingSimilar.d.ts +11 -0
- package/dist/recommend/model/lookingSimilar.d.ts.map +1 -0
- package/dist/recommend/model/lookingSimilarModel.d.ts +5 -0
- package/dist/recommend/model/lookingSimilarModel.d.ts.map +1 -0
- package/dist/recommend/model/lookingSimilarQuery.d.ts +4 -0
- package/dist/recommend/model/lookingSimilarQuery.d.ts.map +1 -0
- package/dist/recommend/model/matchLevel.d.ts +5 -0
- package/dist/recommend/model/matchLevel.d.ts.map +1 -0
- package/dist/recommend/model/matchedGeoLocation.d.ts +15 -0
- package/dist/recommend/model/matchedGeoLocation.d.ts.map +1 -0
- package/dist/recommend/model/mode.d.ts +5 -0
- package/dist/recommend/model/mode.d.ts.map +1 -0
- package/dist/recommend/model/numericFilters.d.ts +5 -0
- package/dist/recommend/model/numericFilters.d.ts.map +1 -0
- package/dist/recommend/model/optionalFilters.d.ts +5 -0
- package/dist/recommend/model/optionalFilters.d.ts.map +1 -0
- package/dist/recommend/model/paramsConsequence.d.ts +19 -0
- package/dist/recommend/model/paramsConsequence.d.ts.map +1 -0
- package/dist/recommend/model/personalization.d.ts +15 -0
- package/dist/recommend/model/personalization.d.ts.map +1 -0
- package/dist/recommend/model/promoteConsequenceObject.d.ts +14 -0
- package/dist/recommend/model/promoteConsequenceObject.d.ts.map +1 -0
- package/dist/recommend/model/queryType.d.ts +5 -0
- package/dist/recommend/model/queryType.d.ts.map +1 -0
- package/dist/recommend/model/rankingInfo.d.ts +54 -0
- package/dist/recommend/model/rankingInfo.d.ts.map +1 -0
- package/dist/recommend/model/reRankingApplyFilter.d.ts +5 -0
- package/dist/recommend/model/reRankingApplyFilter.d.ts.map +1 -0
- package/dist/recommend/model/recommendHit.d.ts +27 -0
- package/dist/recommend/model/recommendHit.d.ts.map +1 -0
- package/dist/recommend/model/recommendModels.d.ts +2 -0
- package/dist/recommend/model/recommendModels.d.ts.map +1 -0
- package/dist/recommend/model/recommendRule.d.ts +24 -0
- package/dist/recommend/model/recommendRule.d.ts.map +1 -0
- package/dist/recommend/model/recommendRuleMetadata.d.ts +10 -0
- package/dist/recommend/model/recommendRuleMetadata.d.ts.map +1 -0
- package/dist/recommend/model/recommendationsHit.d.ts +4 -0
- package/dist/recommend/model/recommendationsHit.d.ts.map +1 -0
- package/dist/recommend/model/recommendationsHits.d.ts +5 -0
- package/dist/recommend/model/recommendationsHits.d.ts.map +1 -0
- package/dist/recommend/model/recommendationsRequest.d.ts +8 -0
- package/dist/recommend/model/recommendationsRequest.d.ts.map +1 -0
- package/dist/recommend/model/recommendationsResults.d.ts +5 -0
- package/dist/recommend/model/recommendationsResults.d.ts.map +1 -0
- package/dist/recommend/model/recommendedForYou.d.ts +7 -0
- package/dist/recommend/model/recommendedForYou.d.ts.map +1 -0
- package/dist/recommend/model/recommendedForYouModel.d.ts +5 -0
- package/dist/recommend/model/recommendedForYouModel.d.ts.map +1 -0
- package/dist/recommend/model/recommendedForYouQuery.d.ts +4 -0
- package/dist/recommend/model/recommendedForYouQuery.d.ts.map +1 -0
- package/dist/recommend/model/redirect.d.ts +8 -0
- package/dist/recommend/model/redirect.d.ts.map +1 -0
- package/dist/recommend/model/redirectRuleIndexMetadata.d.ts +21 -0
- package/dist/recommend/model/redirectRuleIndexMetadata.d.ts.map +1 -0
- package/dist/recommend/model/redirectRuleIndexMetadataData.d.ts +7 -0
- package/dist/recommend/model/redirectRuleIndexMetadataData.d.ts.map +1 -0
- package/dist/recommend/model/redirectURL.d.ts +7 -0
- package/dist/recommend/model/redirectURL.d.ts.map +1 -0
- package/dist/recommend/model/relatedModel.d.ts +5 -0
- package/dist/recommend/model/relatedModel.d.ts.map +1 -0
- package/dist/recommend/model/relatedProducts.d.ts +11 -0
- package/dist/recommend/model/relatedProducts.d.ts.map +1 -0
- package/dist/recommend/model/relatedQuery.d.ts +4 -0
- package/dist/recommend/model/relatedQuery.d.ts.map +1 -0
- package/dist/recommend/model/removeStopWords.d.ts +6 -0
- package/dist/recommend/model/removeStopWords.d.ts.map +1 -0
- package/dist/recommend/model/removeWordsIfNoResults.d.ts +5 -0
- package/dist/recommend/model/removeWordsIfNoResults.d.ts.map +1 -0
- package/dist/recommend/model/renderingContent.d.ts +10 -0
- package/dist/recommend/model/renderingContent.d.ts.map +1 -0
- package/dist/recommend/model/searchPagination.d.ts +19 -0
- package/dist/recommend/model/searchPagination.d.ts.map +1 -0
- package/dist/recommend/model/searchParams.d.ts +3 -0
- package/dist/recommend/model/searchParams.d.ts.map +1 -0
- package/dist/recommend/model/searchParamsObject.d.ts +7 -0
- package/dist/recommend/model/searchParamsObject.d.ts.map +1 -0
- package/dist/recommend/model/searchParamsQuery.d.ts +7 -0
- package/dist/recommend/model/searchParamsQuery.d.ts.map +1 -0
- package/dist/recommend/model/searchRecommendRulesParams.d.ts +38 -0
- package/dist/recommend/model/searchRecommendRulesParams.d.ts.map +1 -0
- package/dist/recommend/model/searchRecommendRulesResponse.d.ts +20 -0
- package/dist/recommend/model/searchRecommendRulesResponse.d.ts.map +1 -0
- package/dist/recommend/model/semanticSearch.d.ts +10 -0
- package/dist/recommend/model/semanticSearch.d.ts.map +1 -0
- package/dist/recommend/model/snippetResult.d.ts +3 -0
- package/dist/recommend/model/snippetResult.d.ts.map +1 -0
- package/dist/recommend/model/snippetResultOption.d.ts +12 -0
- package/dist/recommend/model/snippetResultOption.d.ts.map +1 -0
- package/dist/recommend/model/sortRemainingBy.d.ts +5 -0
- package/dist/recommend/model/sortRemainingBy.d.ts.map +1 -0
- package/dist/recommend/model/supportedLanguage.d.ts +5 -0
- package/dist/recommend/model/supportedLanguage.d.ts.map +1 -0
- package/dist/recommend/model/tagFilters.d.ts +5 -0
- package/dist/recommend/model/tagFilters.d.ts.map +1 -0
- package/dist/recommend/model/taskStatus.d.ts +5 -0
- package/dist/recommend/model/taskStatus.d.ts.map +1 -0
- package/dist/recommend/model/trendingFacetHit.d.ts +18 -0
- package/dist/recommend/model/trendingFacetHit.d.ts.map +1 -0
- package/dist/recommend/model/trendingFacets.d.ts +11 -0
- package/dist/recommend/model/trendingFacets.d.ts.map +1 -0
- package/dist/recommend/model/trendingFacetsModel.d.ts +5 -0
- package/dist/recommend/model/trendingFacetsModel.d.ts.map +1 -0
- package/dist/recommend/model/trendingFacetsQuery.d.ts +4 -0
- package/dist/recommend/model/trendingFacetsQuery.d.ts.map +1 -0
- package/dist/recommend/model/trendingItems.d.ts +15 -0
- package/dist/recommend/model/trendingItems.d.ts.map +1 -0
- package/dist/recommend/model/trendingItemsModel.d.ts +5 -0
- package/dist/recommend/model/trendingItemsModel.d.ts.map +1 -0
- package/dist/recommend/model/trendingItemsQuery.d.ts +4 -0
- package/dist/recommend/model/trendingItemsQuery.d.ts.map +1 -0
- package/dist/recommend/model/typoTolerance.d.ts +6 -0
- package/dist/recommend/model/typoTolerance.d.ts.map +1 -0
- package/dist/recommend/model/typoToleranceEnum.d.ts +5 -0
- package/dist/recommend/model/typoToleranceEnum.d.ts.map +1 -0
- package/dist/recommend/model/value.d.ts +13 -0
- package/dist/recommend/model/value.d.ts.map +1 -0
- package/dist/recommend/src/recommendClient.d.ts +132 -0
- package/dist/recommend/src/recommendClient.d.ts.map +1 -0
- package/lite/builds/browser.ts +11 -6
- package/lite/builds/node.ts +10 -5
- package/lite/model/acl.ts +1 -1
- package/lite/model/apiKey.ts +8 -8
- package/lite/model/aroundPrecision.ts +1 -1
- package/lite/model/aroundPrecisionFromValueInner.ts +9 -0
- package/lite/model/aroundRadius.ts +1 -1
- package/lite/model/aroundRadiusAll.ts +3 -0
- package/lite/model/automaticFacetFilter.ts +4 -4
- package/lite/model/automaticFacetFilters.ts +1 -1
- package/lite/model/baseGetApiKeyResponse.ts +1 -1
- package/lite/model/baseIndexSettings.ts +25 -18
- package/lite/model/baseRecommendRequest.ts +22 -0
- package/lite/model/baseSearchParamsWithoutQuery.ts +26 -30
- package/lite/model/baseSearchResponse.ts +9 -24
- package/lite/model/boughtTogetherQuery.ts +7 -0
- package/lite/model/browsePagination.ts +23 -0
- package/lite/model/browseResponse.ts +2 -0
- package/lite/model/clientMethodProps.ts +8 -0
- package/lite/model/consequenceQuery.ts +1 -1
- package/lite/model/consequenceQueryObject.ts +2 -2
- package/lite/model/cursor.ts +1 -1
- package/lite/model/distinct.ts +1 -1
- package/lite/model/edit.ts +1 -1
- package/lite/model/exactOnSingleWordQuery.ts +1 -1
- package/lite/model/facetFilters.ts +2 -4
- package/lite/model/facetHits.ts +2 -2
- package/lite/model/facetOrdering.ts +2 -2
- package/lite/model/facets.ts +2 -2
- package/lite/model/{attributeToUpdate.ts → fallbackParams.ts} +2 -2
- package/lite/model/fbtModel.ts +6 -0
- package/lite/model/{consequenceHide.ts → frequentlyBoughtTogether.ts} +6 -5
- package/lite/model/getRecommendationsParams.ts +13 -0
- package/lite/model/getRecommendationsResponse.ts +7 -0
- package/lite/model/highlightResult.ts +1 -0
- package/lite/model/highlightResultOption.ts +3 -3
- package/lite/model/hit.ts +4 -4
- package/lite/model/ignorePlurals.ts +4 -2
- package/lite/model/index.ts +32 -37
- package/lite/model/indexSettings.ts +1 -1
- package/lite/model/indexSettingsAsSearchParams.ts +32 -36
- package/lite/model/lookingSimilar.ts +15 -0
- package/lite/model/lookingSimilarModel.ts +6 -0
- package/lite/model/lookingSimilarQuery.ts +6 -0
- package/lite/model/matchLevel.ts +1 -1
- package/lite/model/mode.ts +1 -1
- package/lite/model/numericFilters.ts +2 -4
- package/lite/model/optionalFilters.ts +2 -4
- package/lite/model/params.ts +1 -1
- package/lite/model/queryType.ts +1 -1
- package/lite/model/rankingInfo.ts +13 -10
- package/lite/model/reRankingApplyFilter.ts +2 -4
- package/lite/model/recommendHit.ts +34 -0
- package/lite/model/{promote.ts → recommendationsHit.ts} +3 -3
- package/lite/model/{searchParamsString.ts → recommendationsHits.ts} +4 -5
- package/lite/model/recommendationsRequest.ts +16 -0
- package/lite/model/recommendationsResults.ts +9 -0
- package/lite/model/recommendedForYou.ts +10 -0
- package/lite/model/{operationType.ts → recommendedForYouModel.ts} +2 -2
- package/lite/model/recommendedForYouQuery.ts +6 -0
- package/lite/model/redirect.ts +1 -1
- package/lite/model/{dictionaryAction.ts → redirectURL.ts} +4 -2
- package/lite/model/relatedModel.ts +6 -0
- package/lite/model/relatedProducts.ts +15 -0
- package/lite/model/relatedQuery.ts +6 -0
- package/lite/model/removeStopWords.ts +4 -2
- package/lite/model/removeWordsIfNoResults.ts +1 -1
- package/lite/model/renderingContent.ts +4 -1
- package/lite/model/searchForFacetValuesResponse.ts +4 -1
- package/lite/model/searchForFacetsOptions.ts +2 -2
- package/lite/model/searchForHitsOptions.ts +1 -1
- package/lite/model/searchHits.ts +6 -3
- package/lite/model/searchPagination.ts +23 -0
- package/lite/model/searchParams.ts +1 -2
- package/lite/model/searchParamsObject.ts +3 -0
- package/lite/model/searchParamsQuery.ts +1 -1
- package/lite/model/searchResponse.ts +3 -1
- package/lite/model/searchStrategy.ts +1 -1
- package/lite/model/semanticSearch.ts +2 -2
- package/lite/model/snippetResult.ts +2 -1
- package/lite/model/snippetResultOption.ts +2 -2
- package/lite/model/sortRemainingBy.ts +1 -1
- package/lite/model/supportedLanguage.ts +74 -0
- package/lite/model/tagFilters.ts +2 -4
- package/lite/model/trendingFacetHit.ts +21 -0
- package/lite/model/trendingFacets.ts +15 -0
- package/lite/model/trendingFacetsModel.ts +6 -0
- package/lite/model/trendingFacetsQuery.ts +6 -0
- package/lite/model/trendingItems.ts +20 -0
- package/lite/model/{dictionaryEntryState.ts → trendingItemsModel.ts} +2 -2
- package/lite/model/trendingItemsQuery.ts +6 -0
- package/lite/model/typoTolerance.ts +1 -1
- package/lite/model/typoToleranceEnum.ts +3 -0
- package/lite/model/value.ts +6 -1
- package/lite/src/liteClient.ts +64 -12
- package/package.json +19 -15
- package/dist/client-abtesting/model/currenciesValue.d.ts.map +0 -1
- package/dist/client-analytics/model/averageClickEvent.d.ts +0 -15
- package/dist/client-analytics/model/averageClickEvent.d.ts.map +0 -1
- package/dist/client-analytics/model/clickPosition.d.ts +0 -11
- package/dist/client-analytics/model/clickPosition.d.ts.map +0 -1
- package/dist/client-analytics/model/clickThroughRateEvent.d.ts +0 -19
- package/dist/client-analytics/model/clickThroughRateEvent.d.ts.map +0 -1
- package/dist/client-analytics/model/conversionRateEvent.d.ts +0 -19
- package/dist/client-analytics/model/conversionRateEvent.d.ts.map +0 -1
- package/dist/client-analytics/model/getConversationRateResponse.d.ts +0 -20
- package/dist/client-analytics/model/getConversationRateResponse.d.ts.map +0 -1
- package/dist/client-analytics/model/noClickRateEvent.d.ts +0 -19
- package/dist/client-analytics/model/noClickRateEvent.d.ts.map +0 -1
- package/dist/client-analytics/model/noResultsRateEvent.d.ts +0 -19
- package/dist/client-analytics/model/noResultsRateEvent.d.ts.map +0 -1
- package/dist/client-analytics/model/searchEvent.d.ts +0 -11
- package/dist/client-analytics/model/searchEvent.d.ts.map +0 -1
- package/dist/client-analytics/model/searchNoClickEvent.d.ts +0 -15
- package/dist/client-analytics/model/searchNoClickEvent.d.ts.map +0 -1
- package/dist/client-analytics/model/searchNoResultEvent.d.ts +0 -15
- package/dist/client-analytics/model/searchNoResultEvent.d.ts.map +0 -1
- package/dist/client-analytics/model/userWithDate.d.ts +0 -11
- package/dist/client-analytics/model/userWithDate.d.ts.map +0 -1
- package/dist/client-search/model/mixedSearchFilters.d.ts +0 -2
- package/dist/client-search/model/mixedSearchFilters.d.ts.map +0 -1
- package/dist/lite/model/action.d.ts +0 -5
- package/dist/lite/model/action.d.ts.map +0 -1
- package/dist/lite/model/addApiKeyResponse.d.ts +0 -11
- package/dist/lite/model/addApiKeyResponse.d.ts.map +0 -1
- package/dist/lite/model/anchoring.d.ts +0 -5
- package/dist/lite/model/anchoring.d.ts.map +0 -1
- package/dist/lite/model/attributeToUpdate.d.ts +0 -3
- package/dist/lite/model/attributeToUpdate.d.ts.map +0 -1
- package/dist/lite/model/browseParams.d.ts +0 -4
- package/dist/lite/model/browseParams.d.ts.map +0 -1
- package/dist/lite/model/builtInOperation.d.ts +0 -12
- package/dist/lite/model/builtInOperation.d.ts.map +0 -1
- package/dist/lite/model/builtInOperationType.d.ts +0 -5
- package/dist/lite/model/builtInOperationType.d.ts.map +0 -1
- package/dist/lite/model/condition.d.ts +0 -17
- package/dist/lite/model/condition.d.ts.map +0 -1
- package/dist/lite/model/consequence.d.ts +0 -26
- package/dist/lite/model/consequence.d.ts.map +0 -1
- package/dist/lite/model/consequenceHide.d.ts +0 -10
- package/dist/lite/model/consequenceHide.d.ts.map +0 -1
- package/dist/lite/model/deleteByParams.d.ts +0 -27
- package/dist/lite/model/deleteByParams.d.ts.map +0 -1
- package/dist/lite/model/dictionaryAction.d.ts +0 -5
- package/dist/lite/model/dictionaryAction.d.ts.map +0 -1
- package/dist/lite/model/dictionaryEntry.d.ts +0 -28
- package/dist/lite/model/dictionaryEntry.d.ts.map +0 -1
- package/dist/lite/model/dictionaryEntryState.d.ts +0 -5
- package/dist/lite/model/dictionaryEntryState.d.ts.map +0 -1
- package/dist/lite/model/dictionaryLanguage.d.ts +0 -10
- package/dist/lite/model/dictionaryLanguage.d.ts.map +0 -1
- package/dist/lite/model/dictionaryType.d.ts +0 -2
- package/dist/lite/model/dictionaryType.d.ts.map +0 -1
- package/dist/lite/model/fetchedIndex.d.ts +0 -47
- package/dist/lite/model/fetchedIndex.d.ts.map +0 -1
- package/dist/lite/model/languages.d.ts +0 -10
- package/dist/lite/model/languages.d.ts.map +0 -1
- package/dist/lite/model/listIndicesResponse.d.ts +0 -12
- package/dist/lite/model/listIndicesResponse.d.ts.map +0 -1
- package/dist/lite/model/logType.d.ts +0 -2
- package/dist/lite/model/logType.d.ts.map +0 -1
- package/dist/lite/model/mixedSearchFilters.d.ts +0 -2
- package/dist/lite/model/mixedSearchFilters.d.ts.map +0 -1
- package/dist/lite/model/operationType.d.ts +0 -5
- package/dist/lite/model/operationType.d.ts.map +0 -1
- package/dist/lite/model/promote.d.ts +0 -4
- package/dist/lite/model/promote.d.ts.map +0 -1
- package/dist/lite/model/promoteObjectID.d.ts +0 -14
- package/dist/lite/model/promoteObjectID.d.ts.map +0 -1
- package/dist/lite/model/promoteObjectIDs.d.ts +0 -14
- package/dist/lite/model/promoteObjectIDs.d.ts.map +0 -1
- package/dist/lite/model/rule.d.ts +0 -30
- package/dist/lite/model/rule.d.ts.map +0 -1
- package/dist/lite/model/scopeType.d.ts +0 -2
- package/dist/lite/model/scopeType.d.ts.map +0 -1
- package/dist/lite/model/searchParamsString.d.ts +0 -7
- package/dist/lite/model/searchParamsString.d.ts.map +0 -1
- package/dist/lite/model/searchSynonymsResponse.d.ts +0 -12
- package/dist/lite/model/searchSynonymsResponse.d.ts.map +0 -1
- package/dist/lite/model/source.d.ts +0 -14
- package/dist/lite/model/source.d.ts.map +0 -1
- package/dist/lite/model/standardEntries.d.ts +0 -18
- package/dist/lite/model/standardEntries.d.ts.map +0 -1
- package/dist/lite/model/synonymHit.d.ts +0 -36
- package/dist/lite/model/synonymHit.d.ts.map +0 -1
- package/dist/lite/model/synonymType.d.ts +0 -5
- package/dist/lite/model/synonymType.d.ts.map +0 -1
- package/dist/lite/model/taskStatus.d.ts +0 -5
- package/dist/lite/model/taskStatus.d.ts.map +0 -1
- package/dist/lite/model/timeRange.d.ts +0 -11
- package/dist/lite/model/timeRange.d.ts.map +0 -1
- package/dist/lite/model/updatedRuleResponse.d.ts +0 -15
- package/dist/lite/model/updatedRuleResponse.d.ts.map +0 -1
- package/dist/lite/model/userId.d.ts +0 -22
- package/dist/lite/model/userId.d.ts.map +0 -1
- package/lite/model/action.ts +0 -13
- package/lite/model/addApiKeyResponse.ts +0 -13
- package/lite/model/anchoring.ts +0 -6
- package/lite/model/browseParams.ts +0 -6
- package/lite/model/builtInOperation.ts +0 -15
- package/lite/model/builtInOperationType.ts +0 -13
- package/lite/model/condition.ts +0 -22
- package/lite/model/consequence.ts +0 -32
- package/lite/model/deleteByParams.ts +0 -36
- package/lite/model/dictionaryEntry.ts +0 -35
- package/lite/model/dictionaryLanguage.ts +0 -11
- package/lite/model/dictionaryType.ts +0 -3
- package/lite/model/fetchedIndex.ts +0 -58
- package/lite/model/languages.ts +0 -14
- package/lite/model/listIndicesResponse.ts +0 -15
- package/lite/model/logType.ts +0 -3
- package/lite/model/mixedSearchFilters.ts +0 -3
- package/lite/model/promoteObjectID.ts +0 -16
- package/lite/model/promoteObjectIDs.ts +0 -16
- package/lite/model/rule.ts +0 -37
- package/lite/model/scopeType.ts +0 -3
- package/lite/model/searchSynonymsResponse.ts +0 -15
- package/lite/model/source.ts +0 -16
- package/lite/model/standardEntries.ts +0 -21
- package/lite/model/synonymHit.ts +0 -45
- package/lite/model/synonymType.ts +0 -11
- package/lite/model/taskStatus.ts +0 -6
- package/lite/model/timeRange.ts +0 -13
- package/lite/model/updatedRuleResponse.ts +0 -18
- package/lite/model/userId.ts +0 -26
package/dist/algoliasearch.cjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var crypto = require('crypto');
|
|
3
4
|
var clientCommon = require('@algolia/client-common');
|
|
4
5
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
5
6
|
|
|
6
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.
|
|
7
|
-
const apiClientVersion$
|
|
8
|
+
const apiClientVersion$5 = '5.0.0-beta.10';
|
|
8
9
|
const REGIONS$2 = ['de', 'us'];
|
|
9
|
-
function getDefaultHosts$
|
|
10
|
+
function getDefaultHosts$4(region) {
|
|
10
11
|
const url = !region
|
|
11
12
|
? 'analytics.algolia.com'
|
|
12
13
|
: 'analytics.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -16,12 +17,12 @@ function getDefaultHosts$3(region) {
|
|
|
16
17
|
function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
17
18
|
const auth = clientCommon.createAuth(appIdOption, apiKeyOption, authMode);
|
|
18
19
|
const transporter = clientCommon.createTransporter({
|
|
19
|
-
hosts: getDefaultHosts$
|
|
20
|
+
hosts: getDefaultHosts$4(regionOption),
|
|
20
21
|
...options,
|
|
21
22
|
algoliaAgent: clientCommon.getAlgoliaAgent({
|
|
22
23
|
algoliaAgents,
|
|
23
24
|
client: 'Abtesting',
|
|
24
|
-
version: apiClientVersion$
|
|
25
|
+
version: apiClientVersion$5,
|
|
25
26
|
}),
|
|
26
27
|
baseHeaders: {
|
|
27
28
|
'content-type': 'text/plain',
|
|
@@ -64,9 +65,11 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
64
65
|
transporter.algoliaAgent.add({ segment, version });
|
|
65
66
|
},
|
|
66
67
|
/**
|
|
67
|
-
* Creates
|
|
68
|
+
* Creates a new A/B test.
|
|
69
|
+
*
|
|
70
|
+
* Required API Key ACLs:
|
|
71
|
+
* - editSettings.
|
|
68
72
|
*
|
|
69
|
-
* @summary Create an A/B test.
|
|
70
73
|
* @param addABTestsRequest - The addABTestsRequest object.
|
|
71
74
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
72
75
|
*/
|
|
@@ -98,7 +101,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
98
101
|
/**
|
|
99
102
|
* This method allow you to send requests to the Algolia REST API.
|
|
100
103
|
*
|
|
101
|
-
* @summary Send requests to the Algolia REST API.
|
|
102
104
|
* @param customDelete - The customDelete object.
|
|
103
105
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
104
106
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -108,7 +110,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
108
110
|
if (!path) {
|
|
109
111
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
110
112
|
}
|
|
111
|
-
const requestPath = '/
|
|
113
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
112
114
|
const headers = {};
|
|
113
115
|
const queryParameters = parameters ? parameters : {};
|
|
114
116
|
const request = {
|
|
@@ -122,7 +124,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
122
124
|
/**
|
|
123
125
|
* This method allow you to send requests to the Algolia REST API.
|
|
124
126
|
*
|
|
125
|
-
* @summary Send requests to the Algolia REST API.
|
|
126
127
|
* @param customGet - The customGet object.
|
|
127
128
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
128
129
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -132,7 +133,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
132
133
|
if (!path) {
|
|
133
134
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
134
135
|
}
|
|
135
|
-
const requestPath = '/
|
|
136
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
136
137
|
const headers = {};
|
|
137
138
|
const queryParameters = parameters ? parameters : {};
|
|
138
139
|
const request = {
|
|
@@ -146,7 +147,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
146
147
|
/**
|
|
147
148
|
* This method allow you to send requests to the Algolia REST API.
|
|
148
149
|
*
|
|
149
|
-
* @summary Send requests to the Algolia REST API.
|
|
150
150
|
* @param customPost - The customPost object.
|
|
151
151
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
152
152
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -157,7 +157,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
157
157
|
if (!path) {
|
|
158
158
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
159
159
|
}
|
|
160
|
-
const requestPath = '/
|
|
160
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
161
161
|
const headers = {};
|
|
162
162
|
const queryParameters = parameters ? parameters : {};
|
|
163
163
|
const request = {
|
|
@@ -172,7 +172,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
172
172
|
/**
|
|
173
173
|
* This method allow you to send requests to the Algolia REST API.
|
|
174
174
|
*
|
|
175
|
-
* @summary Send requests to the Algolia REST API.
|
|
176
175
|
* @param customPut - The customPut object.
|
|
177
176
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
178
177
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -183,7 +182,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
183
182
|
if (!path) {
|
|
184
183
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
185
184
|
}
|
|
186
|
-
const requestPath = '/
|
|
185
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
187
186
|
const headers = {};
|
|
188
187
|
const queryParameters = parameters ? parameters : {};
|
|
189
188
|
const request = {
|
|
@@ -196,11 +195,13 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
196
195
|
return transporter.request(request, requestOptions);
|
|
197
196
|
},
|
|
198
197
|
/**
|
|
199
|
-
*
|
|
198
|
+
* Deletes an A/B test by its ID.
|
|
199
|
+
*
|
|
200
|
+
* Required API Key ACLs:
|
|
201
|
+
* - editSettings.
|
|
200
202
|
*
|
|
201
|
-
* @summary Delete an A/B test.
|
|
202
203
|
* @param deleteABTest - The deleteABTest object.
|
|
203
|
-
* @param deleteABTest.id - Unique A/B test
|
|
204
|
+
* @param deleteABTest.id - Unique A/B test identifier.
|
|
204
205
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
205
206
|
*/
|
|
206
207
|
deleteABTest({ id }, requestOptions) {
|
|
@@ -219,11 +220,13 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
219
220
|
return transporter.request(request, requestOptions);
|
|
220
221
|
},
|
|
221
222
|
/**
|
|
222
|
-
*
|
|
223
|
+
* Retrieves the details for an A/B test by its ID.
|
|
224
|
+
*
|
|
225
|
+
* Required API Key ACLs:
|
|
226
|
+
* - analytics.
|
|
223
227
|
*
|
|
224
|
-
* @summary Get A/B test details.
|
|
225
228
|
* @param getABTest - The getABTest object.
|
|
226
|
-
* @param getABTest.id - Unique A/B test
|
|
229
|
+
* @param getABTest.id - Unique A/B test identifier.
|
|
227
230
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
228
231
|
*/
|
|
229
232
|
getABTest({ id }, requestOptions) {
|
|
@@ -242,14 +245,16 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
242
245
|
return transporter.request(request, requestOptions);
|
|
243
246
|
},
|
|
244
247
|
/**
|
|
245
|
-
*
|
|
248
|
+
* Lists all A/B tests you configured for this application.
|
|
249
|
+
*
|
|
250
|
+
* Required API Key ACLs:
|
|
251
|
+
* - analytics.
|
|
246
252
|
*
|
|
247
|
-
* @summary List all A/B tests.
|
|
248
253
|
* @param listABTests - The listABTests object.
|
|
249
|
-
* @param listABTests.offset - Position of the
|
|
250
|
-
* @param listABTests.limit - Number of
|
|
251
|
-
* @param listABTests.indexPrefix - Only
|
|
252
|
-
* @param listABTests.indexSuffix - Only
|
|
254
|
+
* @param listABTests.offset - Position of the first item to return.
|
|
255
|
+
* @param listABTests.limit - Number of items to return.
|
|
256
|
+
* @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.
|
|
257
|
+
* @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.
|
|
253
258
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
254
259
|
*/
|
|
255
260
|
listABTests({ offset, limit, indexPrefix, indexSuffix } = {}, requestOptions = undefined) {
|
|
@@ -277,11 +282,13 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
277
282
|
return transporter.request(request, requestOptions);
|
|
278
283
|
},
|
|
279
284
|
/**
|
|
280
|
-
*
|
|
285
|
+
* Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
|
|
286
|
+
*
|
|
287
|
+
* Required API Key ACLs:
|
|
288
|
+
* - editSettings.
|
|
281
289
|
*
|
|
282
|
-
* @summary Stop an A/B test.
|
|
283
290
|
* @param stopABTest - The stopABTest object.
|
|
284
|
-
* @param stopABTest.id - Unique A/B test
|
|
291
|
+
* @param stopABTest.id - Unique A/B test identifier.
|
|
285
292
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
286
293
|
*/
|
|
287
294
|
stopABTest({ id }, requestOptions) {
|
|
@@ -303,9 +310,9 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
303
310
|
}
|
|
304
311
|
|
|
305
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.
|
|
306
|
-
const apiClientVersion$
|
|
313
|
+
const apiClientVersion$4 = '5.0.0-beta.10';
|
|
307
314
|
const REGIONS$1 = ['de', 'us'];
|
|
308
|
-
function getDefaultHosts$
|
|
315
|
+
function getDefaultHosts$3(region) {
|
|
309
316
|
const url = !region
|
|
310
317
|
? 'analytics.algolia.com'
|
|
311
318
|
: 'analytics.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -315,12 +322,12 @@ function getDefaultHosts$2(region) {
|
|
|
315
322
|
function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
316
323
|
const auth = clientCommon.createAuth(appIdOption, apiKeyOption, authMode);
|
|
317
324
|
const transporter = clientCommon.createTransporter({
|
|
318
|
-
hosts: getDefaultHosts$
|
|
325
|
+
hosts: getDefaultHosts$3(regionOption),
|
|
319
326
|
...options,
|
|
320
327
|
algoliaAgent: clientCommon.getAlgoliaAgent({
|
|
321
328
|
algoliaAgents,
|
|
322
329
|
client: 'Analytics',
|
|
323
|
-
version: apiClientVersion$
|
|
330
|
+
version: apiClientVersion$4,
|
|
324
331
|
}),
|
|
325
332
|
baseHeaders: {
|
|
326
333
|
'content-type': 'text/plain',
|
|
@@ -365,7 +372,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
365
372
|
/**
|
|
366
373
|
* This method allow you to send requests to the Algolia REST API.
|
|
367
374
|
*
|
|
368
|
-
* @summary Send requests to the Algolia REST API.
|
|
369
375
|
* @param customDelete - The customDelete object.
|
|
370
376
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
371
377
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -375,7 +381,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
375
381
|
if (!path) {
|
|
376
382
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
377
383
|
}
|
|
378
|
-
const requestPath = '/
|
|
384
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
379
385
|
const headers = {};
|
|
380
386
|
const queryParameters = parameters ? parameters : {};
|
|
381
387
|
const request = {
|
|
@@ -389,7 +395,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
389
395
|
/**
|
|
390
396
|
* This method allow you to send requests to the Algolia REST API.
|
|
391
397
|
*
|
|
392
|
-
* @summary Send requests to the Algolia REST API.
|
|
393
398
|
* @param customGet - The customGet object.
|
|
394
399
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
395
400
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -399,7 +404,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
399
404
|
if (!path) {
|
|
400
405
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
401
406
|
}
|
|
402
|
-
const requestPath = '/
|
|
407
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
403
408
|
const headers = {};
|
|
404
409
|
const queryParameters = parameters ? parameters : {};
|
|
405
410
|
const request = {
|
|
@@ -413,7 +418,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
413
418
|
/**
|
|
414
419
|
* This method allow you to send requests to the Algolia REST API.
|
|
415
420
|
*
|
|
416
|
-
* @summary Send requests to the Algolia REST API.
|
|
417
421
|
* @param customPost - The customPost object.
|
|
418
422
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
419
423
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -424,7 +428,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
424
428
|
if (!path) {
|
|
425
429
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
426
430
|
}
|
|
427
|
-
const requestPath = '/
|
|
431
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
428
432
|
const headers = {};
|
|
429
433
|
const queryParameters = parameters ? parameters : {};
|
|
430
434
|
const request = {
|
|
@@ -439,7 +443,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
439
443
|
/**
|
|
440
444
|
* This method allow you to send requests to the Algolia REST API.
|
|
441
445
|
*
|
|
442
|
-
* @summary Send requests to the Algolia REST API.
|
|
443
446
|
* @param customPut - The customPut object.
|
|
444
447
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
445
448
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -450,7 +453,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
450
453
|
if (!path) {
|
|
451
454
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
452
455
|
}
|
|
453
|
-
const requestPath = '/
|
|
456
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
454
457
|
const headers = {};
|
|
455
458
|
const queryParameters = parameters ? parameters : {};
|
|
456
459
|
const request = {
|
|
@@ -463,14 +466,56 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
463
466
|
return transporter.request(request, requestOptions);
|
|
464
467
|
},
|
|
465
468
|
/**
|
|
466
|
-
*
|
|
469
|
+
* Retrieves the add-to-cart rate for all of your searches with at least one add-to-cart event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
470
|
+
*
|
|
471
|
+
* Required API Key ACLs:
|
|
472
|
+
* - analytics.
|
|
473
|
+
*
|
|
474
|
+
* @param getAddToCartRate - The getAddToCartRate object.
|
|
475
|
+
* @param getAddToCartRate.index - Index name.
|
|
476
|
+
* @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
477
|
+
* @param getAddToCartRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
478
|
+
* @param getAddToCartRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
479
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
480
|
+
*/
|
|
481
|
+
getAddToCartRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
482
|
+
if (!index) {
|
|
483
|
+
throw new Error('Parameter `index` is required when calling `getAddToCartRate`.');
|
|
484
|
+
}
|
|
485
|
+
const requestPath = '/2/conversions/addToCartRate';
|
|
486
|
+
const headers = {};
|
|
487
|
+
const queryParameters = {};
|
|
488
|
+
if (index !== undefined) {
|
|
489
|
+
queryParameters.index = index.toString();
|
|
490
|
+
}
|
|
491
|
+
if (startDate !== undefined) {
|
|
492
|
+
queryParameters.startDate = startDate.toString();
|
|
493
|
+
}
|
|
494
|
+
if (endDate !== undefined) {
|
|
495
|
+
queryParameters.endDate = endDate.toString();
|
|
496
|
+
}
|
|
497
|
+
if (tags !== undefined) {
|
|
498
|
+
queryParameters.tags = tags.toString();
|
|
499
|
+
}
|
|
500
|
+
const request = {
|
|
501
|
+
method: 'GET',
|
|
502
|
+
path: requestPath,
|
|
503
|
+
queryParameters,
|
|
504
|
+
headers,
|
|
505
|
+
};
|
|
506
|
+
return transporter.request(request, requestOptions);
|
|
507
|
+
},
|
|
508
|
+
/**
|
|
509
|
+
* Retrieves the average click position of your search results, including a daily breakdown. The average click position is the average of all clicked search results\' positions. For example, if users only ever click on the first result for any search, the average click position is 1. By default, the analyzed period includes the last eight days including the current day.
|
|
510
|
+
*
|
|
511
|
+
* Required API Key ACLs:
|
|
512
|
+
* - analytics.
|
|
467
513
|
*
|
|
468
|
-
* @summary Get average click position.
|
|
469
514
|
* @param getAverageClickPosition - The getAverageClickPosition object.
|
|
470
|
-
* @param getAverageClickPosition.index - Index name
|
|
471
|
-
* @param getAverageClickPosition.startDate - Start date
|
|
472
|
-
* @param getAverageClickPosition.endDate - End date
|
|
473
|
-
* @param getAverageClickPosition.tags -
|
|
515
|
+
* @param getAverageClickPosition.index - Index name.
|
|
516
|
+
* @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
517
|
+
* @param getAverageClickPosition.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
518
|
+
* @param getAverageClickPosition.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
474
519
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
475
520
|
*/
|
|
476
521
|
getAverageClickPosition({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -501,14 +546,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
501
546
|
return transporter.request(request, requestOptions);
|
|
502
547
|
},
|
|
503
548
|
/**
|
|
504
|
-
*
|
|
549
|
+
* Retrieves the positions in the search results and their associated number of clicks. This lets you check how many clicks the first, second, or tenth search results receive.
|
|
550
|
+
*
|
|
551
|
+
* Required API Key ACLs:
|
|
552
|
+
* - analytics.
|
|
505
553
|
*
|
|
506
|
-
* @summary Get click positions.
|
|
507
554
|
* @param getClickPositions - The getClickPositions object.
|
|
508
|
-
* @param getClickPositions.index - Index name
|
|
509
|
-
* @param getClickPositions.startDate - Start date
|
|
510
|
-
* @param getClickPositions.endDate - End date
|
|
511
|
-
* @param getClickPositions.tags -
|
|
555
|
+
* @param getClickPositions.index - Index name.
|
|
556
|
+
* @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
557
|
+
* @param getClickPositions.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
558
|
+
* @param getClickPositions.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
512
559
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
513
560
|
*/
|
|
514
561
|
getClickPositions({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -539,14 +586,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
539
586
|
return transporter.request(request, requestOptions);
|
|
540
587
|
},
|
|
541
588
|
/**
|
|
542
|
-
*
|
|
589
|
+
* Retrieves the click-through rate for all of your searches with at least one click event, including a daily breakdown By default, the analyzed period includes the last eight days including the current day.
|
|
590
|
+
*
|
|
591
|
+
* Required API Key ACLs:
|
|
592
|
+
* - analytics.
|
|
543
593
|
*
|
|
544
|
-
* @summary Get click-through rate (CTR).
|
|
545
594
|
* @param getClickThroughRate - The getClickThroughRate object.
|
|
546
|
-
* @param getClickThroughRate.index - Index name
|
|
547
|
-
* @param getClickThroughRate.startDate - Start date
|
|
548
|
-
* @param getClickThroughRate.endDate - End date
|
|
549
|
-
* @param getClickThroughRate.tags -
|
|
595
|
+
* @param getClickThroughRate.index - Index name.
|
|
596
|
+
* @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
597
|
+
* @param getClickThroughRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
598
|
+
* @param getClickThroughRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
550
599
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
551
600
|
*/
|
|
552
601
|
getClickThroughRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -577,19 +626,21 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
577
626
|
return transporter.request(request, requestOptions);
|
|
578
627
|
},
|
|
579
628
|
/**
|
|
580
|
-
*
|
|
629
|
+
* Retrieves the conversion rate for all of your searches with at least one conversion event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
581
630
|
*
|
|
582
|
-
*
|
|
583
|
-
*
|
|
584
|
-
*
|
|
585
|
-
* @param
|
|
586
|
-
* @param
|
|
587
|
-
* @param
|
|
631
|
+
* Required API Key ACLs:
|
|
632
|
+
* - analytics.
|
|
633
|
+
*
|
|
634
|
+
* @param getConversionRate - The getConversionRate object.
|
|
635
|
+
* @param getConversionRate.index - Index name.
|
|
636
|
+
* @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
637
|
+
* @param getConversionRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
638
|
+
* @param getConversionRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
588
639
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
589
640
|
*/
|
|
590
|
-
|
|
641
|
+
getConversionRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
591
642
|
if (!index) {
|
|
592
|
-
throw new Error('Parameter `index` is required when calling `
|
|
643
|
+
throw new Error('Parameter `index` is required when calling `getConversionRate`.');
|
|
593
644
|
}
|
|
594
645
|
const requestPath = '/2/conversions/conversionRate';
|
|
595
646
|
const headers = {};
|
|
@@ -615,14 +666,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
615
666
|
return transporter.request(request, requestOptions);
|
|
616
667
|
},
|
|
617
668
|
/**
|
|
618
|
-
*
|
|
669
|
+
* Retrieves the fraction of searches that didn\'t lead to any click within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
670
|
+
*
|
|
671
|
+
* Required API Key ACLs:
|
|
672
|
+
* - analytics.
|
|
619
673
|
*
|
|
620
|
-
* @summary Get no click rate.
|
|
621
674
|
* @param getNoClickRate - The getNoClickRate object.
|
|
622
|
-
* @param getNoClickRate.index - Index name
|
|
623
|
-
* @param getNoClickRate.startDate - Start date
|
|
624
|
-
* @param getNoClickRate.endDate - End date
|
|
625
|
-
* @param getNoClickRate.tags -
|
|
675
|
+
* @param getNoClickRate.index - Index name.
|
|
676
|
+
* @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
677
|
+
* @param getNoClickRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
678
|
+
* @param getNoClickRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
626
679
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
627
680
|
*/
|
|
628
681
|
getNoClickRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -653,14 +706,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
653
706
|
return transporter.request(request, requestOptions);
|
|
654
707
|
},
|
|
655
708
|
/**
|
|
656
|
-
*
|
|
709
|
+
* Retrieves the fraction of searches that didn\'t return any results within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
710
|
+
*
|
|
711
|
+
* Required API Key ACLs:
|
|
712
|
+
* - analytics.
|
|
657
713
|
*
|
|
658
|
-
* @summary Get no results rate.
|
|
659
714
|
* @param getNoResultsRate - The getNoResultsRate object.
|
|
660
|
-
* @param getNoResultsRate.index - Index name
|
|
661
|
-
* @param getNoResultsRate.startDate - Start date
|
|
662
|
-
* @param getNoResultsRate.endDate - End date
|
|
663
|
-
* @param getNoResultsRate.tags -
|
|
715
|
+
* @param getNoResultsRate.index - Index name.
|
|
716
|
+
* @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
717
|
+
* @param getNoResultsRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
718
|
+
* @param getNoResultsRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
664
719
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
665
720
|
*/
|
|
666
721
|
getNoResultsRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -691,14 +746,96 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
691
746
|
return transporter.request(request, requestOptions);
|
|
692
747
|
},
|
|
693
748
|
/**
|
|
694
|
-
*
|
|
749
|
+
* Retrieves the purchase rate for all of your searches with at least one purchase event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
750
|
+
*
|
|
751
|
+
* Required API Key ACLs:
|
|
752
|
+
* - analytics.
|
|
753
|
+
*
|
|
754
|
+
* @param getPurchaseRate - The getPurchaseRate object.
|
|
755
|
+
* @param getPurchaseRate.index - Index name.
|
|
756
|
+
* @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
757
|
+
* @param getPurchaseRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
758
|
+
* @param getPurchaseRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
759
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
760
|
+
*/
|
|
761
|
+
getPurchaseRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
762
|
+
if (!index) {
|
|
763
|
+
throw new Error('Parameter `index` is required when calling `getPurchaseRate`.');
|
|
764
|
+
}
|
|
765
|
+
const requestPath = '/2/conversions/purchaseRate';
|
|
766
|
+
const headers = {};
|
|
767
|
+
const queryParameters = {};
|
|
768
|
+
if (index !== undefined) {
|
|
769
|
+
queryParameters.index = index.toString();
|
|
770
|
+
}
|
|
771
|
+
if (startDate !== undefined) {
|
|
772
|
+
queryParameters.startDate = startDate.toString();
|
|
773
|
+
}
|
|
774
|
+
if (endDate !== undefined) {
|
|
775
|
+
queryParameters.endDate = endDate.toString();
|
|
776
|
+
}
|
|
777
|
+
if (tags !== undefined) {
|
|
778
|
+
queryParameters.tags = tags.toString();
|
|
779
|
+
}
|
|
780
|
+
const request = {
|
|
781
|
+
method: 'GET',
|
|
782
|
+
path: requestPath,
|
|
783
|
+
queryParameters,
|
|
784
|
+
headers,
|
|
785
|
+
};
|
|
786
|
+
return transporter.request(request, requestOptions);
|
|
787
|
+
},
|
|
788
|
+
/**
|
|
789
|
+
* Retrieves revenue-related metrics, such as the total revenue or the average order value. To retrieve revenue-related metrics, sent purchase events. By default, the analyzed period includes the last eight days including the current day.
|
|
790
|
+
*
|
|
791
|
+
* Required API Key ACLs:
|
|
792
|
+
* - analytics.
|
|
793
|
+
*
|
|
794
|
+
* @param getRevenue - The getRevenue object.
|
|
795
|
+
* @param getRevenue.index - Index name.
|
|
796
|
+
* @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
797
|
+
* @param getRevenue.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
798
|
+
* @param getRevenue.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
799
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
800
|
+
*/
|
|
801
|
+
getRevenue({ index, startDate, endDate, tags }, requestOptions) {
|
|
802
|
+
if (!index) {
|
|
803
|
+
throw new Error('Parameter `index` is required when calling `getRevenue`.');
|
|
804
|
+
}
|
|
805
|
+
const requestPath = '/2/conversions/revenue';
|
|
806
|
+
const headers = {};
|
|
807
|
+
const queryParameters = {};
|
|
808
|
+
if (index !== undefined) {
|
|
809
|
+
queryParameters.index = index.toString();
|
|
810
|
+
}
|
|
811
|
+
if (startDate !== undefined) {
|
|
812
|
+
queryParameters.startDate = startDate.toString();
|
|
813
|
+
}
|
|
814
|
+
if (endDate !== undefined) {
|
|
815
|
+
queryParameters.endDate = endDate.toString();
|
|
816
|
+
}
|
|
817
|
+
if (tags !== undefined) {
|
|
818
|
+
queryParameters.tags = tags.toString();
|
|
819
|
+
}
|
|
820
|
+
const request = {
|
|
821
|
+
method: 'GET',
|
|
822
|
+
path: requestPath,
|
|
823
|
+
queryParameters,
|
|
824
|
+
headers,
|
|
825
|
+
};
|
|
826
|
+
return transporter.request(request, requestOptions);
|
|
827
|
+
},
|
|
828
|
+
/**
|
|
829
|
+
* Retrieves the number of searches within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
830
|
+
*
|
|
831
|
+
* Required API Key ACLs:
|
|
832
|
+
* - analytics.
|
|
695
833
|
*
|
|
696
|
-
* @summary Get number of searches.
|
|
697
834
|
* @param getSearchesCount - The getSearchesCount object.
|
|
698
|
-
* @param getSearchesCount.index - Index name
|
|
699
|
-
* @param getSearchesCount.startDate - Start date
|
|
700
|
-
* @param getSearchesCount.endDate - End date
|
|
701
|
-
* @param getSearchesCount.tags -
|
|
835
|
+
* @param getSearchesCount.index - Index name.
|
|
836
|
+
* @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
837
|
+
* @param getSearchesCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
838
|
+
* @param getSearchesCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
702
839
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
703
840
|
*/
|
|
704
841
|
getSearchesCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -729,16 +866,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
729
866
|
return transporter.request(request, requestOptions);
|
|
730
867
|
},
|
|
731
868
|
/**
|
|
732
|
-
*
|
|
869
|
+
* Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
|
|
870
|
+
*
|
|
871
|
+
* Required API Key ACLs:
|
|
872
|
+
* - analytics.
|
|
733
873
|
*
|
|
734
|
-
* @summary Get top searches with no clicks.
|
|
735
874
|
* @param getSearchesNoClicks - The getSearchesNoClicks object.
|
|
736
|
-
* @param getSearchesNoClicks.index - Index name
|
|
737
|
-
* @param getSearchesNoClicks.startDate - Start date
|
|
738
|
-
* @param getSearchesNoClicks.endDate - End date
|
|
739
|
-
* @param getSearchesNoClicks.limit - Number of
|
|
740
|
-
* @param getSearchesNoClicks.offset - Position of the
|
|
741
|
-
* @param getSearchesNoClicks.tags -
|
|
875
|
+
* @param getSearchesNoClicks.index - Index name.
|
|
876
|
+
* @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
877
|
+
* @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
878
|
+
* @param getSearchesNoClicks.limit - Number of items to return.
|
|
879
|
+
* @param getSearchesNoClicks.offset - Position of the first item to return.
|
|
880
|
+
* @param getSearchesNoClicks.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
742
881
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
743
882
|
*/
|
|
744
883
|
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -775,16 +914,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
775
914
|
return transporter.request(request, requestOptions);
|
|
776
915
|
},
|
|
777
916
|
/**
|
|
778
|
-
*
|
|
917
|
+
* Retrieves the most popular searches that didn\'t return any results.
|
|
918
|
+
*
|
|
919
|
+
* Required API Key ACLs:
|
|
920
|
+
* - analytics.
|
|
779
921
|
*
|
|
780
|
-
* @summary Get top searches with no results.
|
|
781
922
|
* @param getSearchesNoResults - The getSearchesNoResults object.
|
|
782
|
-
* @param getSearchesNoResults.index - Index name
|
|
783
|
-
* @param getSearchesNoResults.startDate - Start date
|
|
784
|
-
* @param getSearchesNoResults.endDate - End date
|
|
785
|
-
* @param getSearchesNoResults.limit - Number of
|
|
786
|
-
* @param getSearchesNoResults.offset - Position of the
|
|
787
|
-
* @param getSearchesNoResults.tags -
|
|
923
|
+
* @param getSearchesNoResults.index - Index name.
|
|
924
|
+
* @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
925
|
+
* @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
926
|
+
* @param getSearchesNoResults.limit - Number of items to return.
|
|
927
|
+
* @param getSearchesNoResults.offset - Position of the first item to return.
|
|
928
|
+
* @param getSearchesNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
788
929
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
789
930
|
*/
|
|
790
931
|
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -821,11 +962,13 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
821
962
|
return transporter.request(request, requestOptions);
|
|
822
963
|
},
|
|
823
964
|
/**
|
|
824
|
-
*
|
|
965
|
+
* Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
|
|
966
|
+
*
|
|
967
|
+
* Required API Key ACLs:
|
|
968
|
+
* - analytics.
|
|
825
969
|
*
|
|
826
|
-
* @summary Get Analytics API status.
|
|
827
970
|
* @param getStatus - The getStatus object.
|
|
828
|
-
* @param getStatus.index - Index name
|
|
971
|
+
* @param getStatus.index - Index name.
|
|
829
972
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
830
973
|
*/
|
|
831
974
|
getStatus({ index }, requestOptions) {
|
|
@@ -847,16 +990,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
847
990
|
return transporter.request(request, requestOptions);
|
|
848
991
|
},
|
|
849
992
|
/**
|
|
850
|
-
*
|
|
993
|
+
* Retrieves the countries with the most searches to your index.
|
|
994
|
+
*
|
|
995
|
+
* Required API Key ACLs:
|
|
996
|
+
* - analytics.
|
|
851
997
|
*
|
|
852
|
-
* @summary Get top countries.
|
|
853
998
|
* @param getTopCountries - The getTopCountries object.
|
|
854
|
-
* @param getTopCountries.index - Index name
|
|
855
|
-
* @param getTopCountries.startDate - Start date
|
|
856
|
-
* @param getTopCountries.endDate - End date
|
|
857
|
-
* @param getTopCountries.limit - Number of
|
|
858
|
-
* @param getTopCountries.offset - Position of the
|
|
859
|
-
* @param getTopCountries.tags -
|
|
999
|
+
* @param getTopCountries.index - Index name.
|
|
1000
|
+
* @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1001
|
+
* @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1002
|
+
* @param getTopCountries.limit - Number of items to return.
|
|
1003
|
+
* @param getTopCountries.offset - Position of the first item to return.
|
|
1004
|
+
* @param getTopCountries.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
860
1005
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
861
1006
|
*/
|
|
862
1007
|
getTopCountries({ index, startDate, endDate, limit, offset, tags }, requestOptions) {
|
|
@@ -893,17 +1038,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
893
1038
|
return transporter.request(request, requestOptions);
|
|
894
1039
|
},
|
|
895
1040
|
/**
|
|
896
|
-
*
|
|
1041
|
+
* Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1042
|
+
*
|
|
1043
|
+
* Required API Key ACLs:
|
|
1044
|
+
* - analytics.
|
|
897
1045
|
*
|
|
898
|
-
* @summary Get top filterable attributes.
|
|
899
1046
|
* @param getTopFilterAttributes - The getTopFilterAttributes object.
|
|
900
|
-
* @param getTopFilterAttributes.index - Index name
|
|
901
|
-
* @param getTopFilterAttributes.search -
|
|
902
|
-
* @param getTopFilterAttributes.startDate - Start date
|
|
903
|
-
* @param getTopFilterAttributes.endDate - End date
|
|
904
|
-
* @param getTopFilterAttributes.limit - Number of
|
|
905
|
-
* @param getTopFilterAttributes.offset - Position of the
|
|
906
|
-
* @param getTopFilterAttributes.tags -
|
|
1047
|
+
* @param getTopFilterAttributes.index - Index name.
|
|
1048
|
+
* @param getTopFilterAttributes.search - Search query.
|
|
1049
|
+
* @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1050
|
+
* @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1051
|
+
* @param getTopFilterAttributes.limit - Number of items to return.
|
|
1052
|
+
* @param getTopFilterAttributes.offset - Position of the first item to return.
|
|
1053
|
+
* @param getTopFilterAttributes.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
907
1054
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
908
1055
|
*/
|
|
909
1056
|
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -943,18 +1090,20 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
943
1090
|
return transporter.request(request, requestOptions);
|
|
944
1091
|
},
|
|
945
1092
|
/**
|
|
946
|
-
*
|
|
1093
|
+
* Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1094
|
+
*
|
|
1095
|
+
* Required API Key ACLs:
|
|
1096
|
+
* - analytics.
|
|
947
1097
|
*
|
|
948
|
-
* @summary Get top filter values for an attribute.
|
|
949
1098
|
* @param getTopFilterForAttribute - The getTopFilterForAttribute object.
|
|
950
1099
|
* @param getTopFilterForAttribute.attribute - Attribute name.
|
|
951
|
-
* @param getTopFilterForAttribute.index - Index name
|
|
952
|
-
* @param getTopFilterForAttribute.search -
|
|
953
|
-
* @param getTopFilterForAttribute.startDate - Start date
|
|
954
|
-
* @param getTopFilterForAttribute.endDate - End date
|
|
955
|
-
* @param getTopFilterForAttribute.limit - Number of
|
|
956
|
-
* @param getTopFilterForAttribute.offset - Position of the
|
|
957
|
-
* @param getTopFilterForAttribute.tags -
|
|
1100
|
+
* @param getTopFilterForAttribute.index - Index name.
|
|
1101
|
+
* @param getTopFilterForAttribute.search - Search query.
|
|
1102
|
+
* @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1103
|
+
* @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1104
|
+
* @param getTopFilterForAttribute.limit - Number of items to return.
|
|
1105
|
+
* @param getTopFilterForAttribute.offset - Position of the first item to return.
|
|
1106
|
+
* @param getTopFilterForAttribute.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
958
1107
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
959
1108
|
*/
|
|
960
1109
|
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -997,17 +1146,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
997
1146
|
return transporter.request(request, requestOptions);
|
|
998
1147
|
},
|
|
999
1148
|
/**
|
|
1000
|
-
*
|
|
1149
|
+
* Retrieves the most frequently used filters for a search that didn\'t return any results. To get the most frequent searches without results, use the [Retrieve searches without results](#tag/search/operation/getSearchesNoResults) operation.
|
|
1150
|
+
*
|
|
1151
|
+
* Required API Key ACLs:
|
|
1152
|
+
* - analytics.
|
|
1001
1153
|
*
|
|
1002
|
-
* @summary Get top filters for a no result search.
|
|
1003
1154
|
* @param getTopFiltersNoResults - The getTopFiltersNoResults object.
|
|
1004
|
-
* @param getTopFiltersNoResults.index - Index name
|
|
1005
|
-
* @param getTopFiltersNoResults.search -
|
|
1006
|
-
* @param getTopFiltersNoResults.startDate - Start date
|
|
1007
|
-
* @param getTopFiltersNoResults.endDate - End date
|
|
1008
|
-
* @param getTopFiltersNoResults.limit - Number of
|
|
1009
|
-
* @param getTopFiltersNoResults.offset - Position of the
|
|
1010
|
-
* @param getTopFiltersNoResults.tags -
|
|
1155
|
+
* @param getTopFiltersNoResults.index - Index name.
|
|
1156
|
+
* @param getTopFiltersNoResults.search - Search query.
|
|
1157
|
+
* @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1158
|
+
* @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1159
|
+
* @param getTopFiltersNoResults.limit - Number of items to return.
|
|
1160
|
+
* @param getTopFiltersNoResults.offset - Position of the first item to return.
|
|
1161
|
+
* @param getTopFiltersNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1011
1162
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1012
1163
|
*/
|
|
1013
1164
|
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1047,21 +1198,24 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1047
1198
|
return transporter.request(request, requestOptions);
|
|
1048
1199
|
},
|
|
1049
1200
|
/**
|
|
1050
|
-
*
|
|
1201
|
+
* Retrieves the object IDs of the most frequent search results.
|
|
1202
|
+
*
|
|
1203
|
+
* Required API Key ACLs:
|
|
1204
|
+
* - analytics.
|
|
1051
1205
|
*
|
|
1052
|
-
* @summary Get top hits.
|
|
1053
1206
|
* @param getTopHits - The getTopHits object.
|
|
1054
|
-
* @param getTopHits.index - Index name
|
|
1055
|
-
* @param getTopHits.search -
|
|
1056
|
-
* @param getTopHits.clickAnalytics - Whether to include
|
|
1057
|
-
* @param getTopHits.
|
|
1058
|
-
* @param getTopHits.
|
|
1059
|
-
* @param getTopHits.
|
|
1060
|
-
* @param getTopHits.
|
|
1061
|
-
* @param getTopHits.
|
|
1207
|
+
* @param getTopHits.index - Index name.
|
|
1208
|
+
* @param getTopHits.search - Search query.
|
|
1209
|
+
* @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1210
|
+
* @param getTopHits.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
|
|
1211
|
+
* @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1212
|
+
* @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1213
|
+
* @param getTopHits.limit - Number of items to return.
|
|
1214
|
+
* @param getTopHits.offset - Position of the first item to return.
|
|
1215
|
+
* @param getTopHits.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1062
1216
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1063
1217
|
*/
|
|
1064
|
-
getTopHits({ index, search, clickAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
1218
|
+
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
1065
1219
|
if (!index) {
|
|
1066
1220
|
throw new Error('Parameter `index` is required when calling `getTopHits`.');
|
|
1067
1221
|
}
|
|
@@ -1077,6 +1231,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1077
1231
|
if (clickAnalytics !== undefined) {
|
|
1078
1232
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
1079
1233
|
}
|
|
1234
|
+
if (revenueAnalytics !== undefined) {
|
|
1235
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
1236
|
+
}
|
|
1080
1237
|
if (startDate !== undefined) {
|
|
1081
1238
|
queryParameters.startDate = startDate.toString();
|
|
1082
1239
|
}
|
|
@@ -1101,22 +1258,25 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1101
1258
|
return transporter.request(request, requestOptions);
|
|
1102
1259
|
},
|
|
1103
1260
|
/**
|
|
1104
|
-
* Returns the most popular
|
|
1261
|
+
* Returns the most popular search terms.
|
|
1262
|
+
*
|
|
1263
|
+
* Required API Key ACLs:
|
|
1264
|
+
* - analytics.
|
|
1105
1265
|
*
|
|
1106
|
-
* @summary Get top searches.
|
|
1107
1266
|
* @param getTopSearches - The getTopSearches object.
|
|
1108
|
-
* @param getTopSearches.index - Index name
|
|
1109
|
-
* @param getTopSearches.clickAnalytics - Whether to include
|
|
1110
|
-
* @param getTopSearches.
|
|
1111
|
-
* @param getTopSearches.
|
|
1112
|
-
* @param getTopSearches.
|
|
1267
|
+
* @param getTopSearches.index - Index name.
|
|
1268
|
+
* @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1269
|
+
* @param getTopSearches.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
|
|
1270
|
+
* @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1271
|
+
* @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1272
|
+
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
1113
1273
|
* @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
|
|
1114
|
-
* @param getTopSearches.limit - Number of
|
|
1115
|
-
* @param getTopSearches.offset - Position of the
|
|
1116
|
-
* @param getTopSearches.tags -
|
|
1274
|
+
* @param getTopSearches.limit - Number of items to return.
|
|
1275
|
+
* @param getTopSearches.offset - Position of the first item to return.
|
|
1276
|
+
* @param getTopSearches.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1117
1277
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1118
1278
|
*/
|
|
1119
|
-
getTopSearches({ index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
1279
|
+
getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
1120
1280
|
if (!index) {
|
|
1121
1281
|
throw new Error('Parameter `index` is required when calling `getTopSearches`.');
|
|
1122
1282
|
}
|
|
@@ -1129,6 +1289,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1129
1289
|
if (clickAnalytics !== undefined) {
|
|
1130
1290
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
1131
1291
|
}
|
|
1292
|
+
if (revenueAnalytics !== undefined) {
|
|
1293
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
1294
|
+
}
|
|
1132
1295
|
if (startDate !== undefined) {
|
|
1133
1296
|
queryParameters.startDate = startDate.toString();
|
|
1134
1297
|
}
|
|
@@ -1159,14 +1322,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1159
1322
|
return transporter.request(request, requestOptions);
|
|
1160
1323
|
},
|
|
1161
1324
|
/**
|
|
1162
|
-
*
|
|
1325
|
+
* Retrieves the number of unique users within a time range, including a daily breakdown. Since this endpoint returns the number of unique users, the sum of the daily values might be different from the total number. By default, Algolia distinguishes search users by their IP address, _unless_ you include a pseudonymous user identifier in your search requests with the `userToken` API parameter or `x-algolia-usertoken` request header. By default, the analyzed period includes the last eight days including the current day.
|
|
1326
|
+
*
|
|
1327
|
+
* Required API Key ACLs:
|
|
1328
|
+
* - analytics.
|
|
1163
1329
|
*
|
|
1164
|
-
* @summary Get user count.
|
|
1165
1330
|
* @param getUsersCount - The getUsersCount object.
|
|
1166
|
-
* @param getUsersCount.index - Index name
|
|
1167
|
-
* @param getUsersCount.startDate - Start date
|
|
1168
|
-
* @param getUsersCount.endDate - End date
|
|
1169
|
-
* @param getUsersCount.tags -
|
|
1331
|
+
* @param getUsersCount.index - Index name.
|
|
1332
|
+
* @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1333
|
+
* @param getUsersCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1334
|
+
* @param getUsersCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1170
1335
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1171
1336
|
*/
|
|
1172
1337
|
getUsersCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -1200,9 +1365,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1200
1365
|
}
|
|
1201
1366
|
|
|
1202
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.
|
|
1203
|
-
const apiClientVersion$
|
|
1368
|
+
const apiClientVersion$3 = '5.0.0-beta.10';
|
|
1204
1369
|
const REGIONS = ['eu', 'us'];
|
|
1205
|
-
function getDefaultHosts$
|
|
1370
|
+
function getDefaultHosts$2(region) {
|
|
1206
1371
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
1207
1372
|
return [{ url, accept: 'readWrite', protocol: 'https' }];
|
|
1208
1373
|
}
|
|
@@ -1210,12 +1375,12 @@ function getDefaultHosts$1(region) {
|
|
|
1210
1375
|
function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
1211
1376
|
const auth = clientCommon.createAuth(appIdOption, apiKeyOption, authMode);
|
|
1212
1377
|
const transporter = clientCommon.createTransporter({
|
|
1213
|
-
hosts: getDefaultHosts$
|
|
1378
|
+
hosts: getDefaultHosts$2(regionOption),
|
|
1214
1379
|
...options,
|
|
1215
1380
|
algoliaAgent: clientCommon.getAlgoliaAgent({
|
|
1216
1381
|
algoliaAgents,
|
|
1217
1382
|
client: 'Personalization',
|
|
1218
|
-
version: apiClientVersion$
|
|
1383
|
+
version: apiClientVersion$3,
|
|
1219
1384
|
}),
|
|
1220
1385
|
baseHeaders: {
|
|
1221
1386
|
'content-type': 'text/plain',
|
|
@@ -1260,7 +1425,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1260
1425
|
/**
|
|
1261
1426
|
* This method allow you to send requests to the Algolia REST API.
|
|
1262
1427
|
*
|
|
1263
|
-
* @summary Send requests to the Algolia REST API.
|
|
1264
1428
|
* @param customDelete - The customDelete object.
|
|
1265
1429
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1266
1430
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -1270,7 +1434,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1270
1434
|
if (!path) {
|
|
1271
1435
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
1272
1436
|
}
|
|
1273
|
-
const requestPath = '/
|
|
1437
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1274
1438
|
const headers = {};
|
|
1275
1439
|
const queryParameters = parameters ? parameters : {};
|
|
1276
1440
|
const request = {
|
|
@@ -1284,7 +1448,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1284
1448
|
/**
|
|
1285
1449
|
* This method allow you to send requests to the Algolia REST API.
|
|
1286
1450
|
*
|
|
1287
|
-
* @summary Send requests to the Algolia REST API.
|
|
1288
1451
|
* @param customGet - The customGet object.
|
|
1289
1452
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1290
1453
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -1294,7 +1457,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1294
1457
|
if (!path) {
|
|
1295
1458
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
1296
1459
|
}
|
|
1297
|
-
const requestPath = '/
|
|
1460
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1298
1461
|
const headers = {};
|
|
1299
1462
|
const queryParameters = parameters ? parameters : {};
|
|
1300
1463
|
const request = {
|
|
@@ -1308,7 +1471,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1308
1471
|
/**
|
|
1309
1472
|
* This method allow you to send requests to the Algolia REST API.
|
|
1310
1473
|
*
|
|
1311
|
-
* @summary Send requests to the Algolia REST API.
|
|
1312
1474
|
* @param customPost - The customPost object.
|
|
1313
1475
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1314
1476
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -1319,7 +1481,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1319
1481
|
if (!path) {
|
|
1320
1482
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
1321
1483
|
}
|
|
1322
|
-
const requestPath = '/
|
|
1484
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1323
1485
|
const headers = {};
|
|
1324
1486
|
const queryParameters = parameters ? parameters : {};
|
|
1325
1487
|
const request = {
|
|
@@ -1334,7 +1496,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1334
1496
|
/**
|
|
1335
1497
|
* This method allow you to send requests to the Algolia REST API.
|
|
1336
1498
|
*
|
|
1337
|
-
* @summary Send requests to the Algolia REST API.
|
|
1338
1499
|
* @param customPut - The customPut object.
|
|
1339
1500
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1340
1501
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -1345,7 +1506,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1345
1506
|
if (!path) {
|
|
1346
1507
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
1347
1508
|
}
|
|
1348
|
-
const requestPath = '/
|
|
1509
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1349
1510
|
const headers = {};
|
|
1350
1511
|
const queryParameters = parameters ? parameters : {};
|
|
1351
1512
|
const request = {
|
|
@@ -1358,11 +1519,13 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1358
1519
|
return transporter.request(request, requestOptions);
|
|
1359
1520
|
},
|
|
1360
1521
|
/**
|
|
1361
|
-
*
|
|
1522
|
+
* Deletes a user profile. The response includes a date and time when the user profile can safely be considered deleted.
|
|
1523
|
+
*
|
|
1524
|
+
* Required API Key ACLs:
|
|
1525
|
+
* - recommendation.
|
|
1362
1526
|
*
|
|
1363
|
-
* @summary Delete a user profile.
|
|
1364
1527
|
* @param deleteUserProfile - The deleteUserProfile object.
|
|
1365
|
-
* @param deleteUserProfile.userToken -
|
|
1528
|
+
* @param deleteUserProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.
|
|
1366
1529
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1367
1530
|
*/
|
|
1368
1531
|
deleteUserProfile({ userToken }, requestOptions) {
|
|
@@ -1381,9 +1544,11 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1381
1544
|
return transporter.request(request, requestOptions);
|
|
1382
1545
|
},
|
|
1383
1546
|
/**
|
|
1384
|
-
*
|
|
1547
|
+
* Retrieves the current personalization strategy.
|
|
1548
|
+
*
|
|
1549
|
+
* Required API Key ACLs:
|
|
1550
|
+
* - recommendation.
|
|
1385
1551
|
*
|
|
1386
|
-
* @summary Get the current strategy.
|
|
1387
1552
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1388
1553
|
*/
|
|
1389
1554
|
getPersonalizationStrategy(requestOptions) {
|
|
@@ -1399,11 +1564,13 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1399
1564
|
return transporter.request(request, requestOptions);
|
|
1400
1565
|
},
|
|
1401
1566
|
/**
|
|
1402
|
-
*
|
|
1567
|
+
* Retrieves a user profile and their affinities for different facets.
|
|
1568
|
+
*
|
|
1569
|
+
* Required API Key ACLs:
|
|
1570
|
+
* - recommendation.
|
|
1403
1571
|
*
|
|
1404
|
-
* @summary Get a user profile.
|
|
1405
1572
|
* @param getUserTokenProfile - The getUserTokenProfile object.
|
|
1406
|
-
* @param getUserTokenProfile.userToken -
|
|
1573
|
+
* @param getUserTokenProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.
|
|
1407
1574
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1408
1575
|
*/
|
|
1409
1576
|
getUserTokenProfile({ userToken }, requestOptions) {
|
|
@@ -1422,9 +1589,11 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1422
1589
|
return transporter.request(request, requestOptions);
|
|
1423
1590
|
},
|
|
1424
1591
|
/**
|
|
1425
|
-
*
|
|
1592
|
+
* Creates a new personalization strategy.
|
|
1593
|
+
*
|
|
1594
|
+
* Required API Key ACLs:
|
|
1595
|
+
* - recommendation.
|
|
1426
1596
|
*
|
|
1427
|
-
* @summary Set a new strategy.
|
|
1428
1597
|
* @param personalizationStrategyParams - The personalizationStrategyParams object.
|
|
1429
1598
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1430
1599
|
*/
|
|
@@ -1457,8 +1626,8 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1457
1626
|
}
|
|
1458
1627
|
|
|
1459
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.
|
|
1460
|
-
const apiClientVersion$
|
|
1461
|
-
function getDefaultHosts(appId) {
|
|
1629
|
+
const apiClientVersion$2 = '5.0.0-beta.10';
|
|
1630
|
+
function getDefaultHosts$1(appId) {
|
|
1462
1631
|
return [
|
|
1463
1632
|
{
|
|
1464
1633
|
url: `${appId}-dsn.algolia.net`,
|
|
@@ -1492,12 +1661,12 @@ function getDefaultHosts(appId) {
|
|
|
1492
1661
|
function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
|
|
1493
1662
|
const auth = clientCommon.createAuth(appIdOption, apiKeyOption, authMode);
|
|
1494
1663
|
const transporter = clientCommon.createTransporter({
|
|
1495
|
-
hosts: getDefaultHosts(appIdOption),
|
|
1664
|
+
hosts: getDefaultHosts$1(appIdOption),
|
|
1496
1665
|
...options,
|
|
1497
1666
|
algoliaAgent: clientCommon.getAlgoliaAgent({
|
|
1498
1667
|
algoliaAgents,
|
|
1499
1668
|
client: 'Search',
|
|
1500
|
-
version: apiClientVersion$
|
|
1669
|
+
version: apiClientVersion$2,
|
|
1501
1670
|
}),
|
|
1502
1671
|
baseHeaders: {
|
|
1503
1672
|
'content-type': 'text/plain',
|
|
@@ -1543,7 +1712,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1543
1712
|
* Helper: Wait for a task to be published (completed) for a given `indexName` and `taskID`.
|
|
1544
1713
|
*
|
|
1545
1714
|
* @summary Helper method that waits for a task to be published (completed).
|
|
1546
|
-
* @param waitForTaskOptions - The waitForTaskOptions object.
|
|
1715
|
+
* @param waitForTaskOptions - The `waitForTaskOptions` object.
|
|
1547
1716
|
* @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.
|
|
1548
1717
|
* @param waitForTaskOptions.taskID - The `taskID` returned in the method response.
|
|
1549
1718
|
* @param waitForTaskOptions.maxRetries - The maximum number of retries. 50 by default.
|
|
@@ -1563,11 +1732,34 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1563
1732
|
timeout: () => timeout(retryCount),
|
|
1564
1733
|
});
|
|
1565
1734
|
},
|
|
1735
|
+
/**
|
|
1736
|
+
* Helper: Wait for an application-level task to complete for a given `taskID`.
|
|
1737
|
+
*
|
|
1738
|
+
* @summary Helper method that waits for a task to be published (completed).
|
|
1739
|
+
* @param waitForAppTaskOptions - The `waitForTaskOptions` object.
|
|
1740
|
+
* @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.
|
|
1741
|
+
* @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 50 by default.
|
|
1742
|
+
* @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.
|
|
1743
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1744
|
+
*/
|
|
1745
|
+
waitForAppTask({ taskID, maxRetries = 50, timeout = (retryCount) => Math.min(retryCount * 200, 5000), }, requestOptions) {
|
|
1746
|
+
let retryCount = 0;
|
|
1747
|
+
return clientCommon.createIterablePromise({
|
|
1748
|
+
func: () => this.getAppTask({ taskID }, requestOptions),
|
|
1749
|
+
validate: (response) => response.status === 'published',
|
|
1750
|
+
aggregator: () => (retryCount += 1),
|
|
1751
|
+
error: {
|
|
1752
|
+
validate: () => retryCount >= maxRetries,
|
|
1753
|
+
message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`,
|
|
1754
|
+
},
|
|
1755
|
+
timeout: () => timeout(retryCount),
|
|
1756
|
+
});
|
|
1757
|
+
},
|
|
1566
1758
|
/**
|
|
1567
1759
|
* Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
|
|
1568
1760
|
*
|
|
1569
1761
|
* @summary Helper method that waits for an API key task to be processed.
|
|
1570
|
-
* @param waitForApiKeyOptions - The waitForApiKeyOptions object.
|
|
1762
|
+
* @param waitForApiKeyOptions - The `waitForApiKeyOptions` object.
|
|
1571
1763
|
* @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.
|
|
1572
1764
|
* @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.
|
|
1573
1765
|
* @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.
|
|
@@ -1620,7 +1812,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1620
1812
|
* Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index.
|
|
1621
1813
|
*
|
|
1622
1814
|
* @summary Helper method that iterates on the `browse` method.
|
|
1623
|
-
* @param browseObjects - The browseObjects object.
|
|
1815
|
+
* @param browseObjects - The `browseObjects` object.
|
|
1624
1816
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
1625
1817
|
* @param browseObjects.browseParams - The `browse` parameters.
|
|
1626
1818
|
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is no `cursor` in the response.
|
|
@@ -1646,11 +1838,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1646
1838
|
* Helper: Iterate on the `searchRules` method of the client to allow aggregating rules of an index.
|
|
1647
1839
|
*
|
|
1648
1840
|
* @summary Helper method that iterates on the `searchRules` method.
|
|
1649
|
-
* @param
|
|
1650
|
-
* @param
|
|
1651
|
-
* @param
|
|
1652
|
-
* @param
|
|
1653
|
-
* @param
|
|
1841
|
+
* @param browseRules - The `browseRules` object.
|
|
1842
|
+
* @param browseRules.indexName - The index in which to perform the request.
|
|
1843
|
+
* @param browseRules.searchRulesParams - The `searchRules` method parameters.
|
|
1844
|
+
* @param browseRules.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
|
|
1845
|
+
* @param browseRules.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
1654
1846
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
1655
1847
|
*/
|
|
1656
1848
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
|
|
@@ -1678,11 +1870,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1678
1870
|
* Helper: Iterate on the `searchSynonyms` method of the client to allow aggregating rules of an index.
|
|
1679
1871
|
*
|
|
1680
1872
|
* @summary Helper method that iterates on the `searchSynonyms` method.
|
|
1681
|
-
* @param
|
|
1682
|
-
* @param
|
|
1683
|
-
* @param
|
|
1684
|
-
* @param
|
|
1685
|
-
* @param
|
|
1873
|
+
* @param browseSynonyms - The `browseSynonyms` object.
|
|
1874
|
+
* @param browseSynonyms.indexName - The index in which to perform the request.
|
|
1875
|
+
* @param browseSynonyms.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
|
|
1876
|
+
* @param browseSynonyms.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
1877
|
+
* @param browseSynonyms.searchSynonymsParams - The `searchSynonyms` method parameters.
|
|
1686
1878
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
1687
1879
|
*/
|
|
1688
1880
|
browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }, requestOptions) {
|
|
@@ -1692,16 +1884,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1692
1884
|
hitsPerPage: 1000,
|
|
1693
1885
|
};
|
|
1694
1886
|
return clientCommon.createIterablePromise({
|
|
1695
|
-
func: (
|
|
1696
|
-
|
|
1887
|
+
func: (_) => {
|
|
1888
|
+
const resp = this.searchSynonyms({
|
|
1697
1889
|
indexName,
|
|
1698
1890
|
searchSynonymsParams: {
|
|
1699
1891
|
...params,
|
|
1700
|
-
page:
|
|
1701
|
-
? previousResponse.page + 1
|
|
1702
|
-
: params.page,
|
|
1892
|
+
page: params.page,
|
|
1703
1893
|
},
|
|
1704
1894
|
}, requestOptions);
|
|
1895
|
+
params.page += 1;
|
|
1896
|
+
return resp;
|
|
1705
1897
|
},
|
|
1706
1898
|
validate: (response) => response.nbHits < params.hitsPerPage,
|
|
1707
1899
|
...browseSynonymsOptions,
|
|
@@ -1730,9 +1922,137 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1730
1922
|
return this.search(searchMethodParams, requestOptions);
|
|
1731
1923
|
},
|
|
1732
1924
|
/**
|
|
1733
|
-
*
|
|
1925
|
+
* Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
|
|
1926
|
+
*
|
|
1927
|
+
* @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
|
|
1928
|
+
* @param chunkedBatch - The `chunkedBatch` object.
|
|
1929
|
+
* @param chunkedBatch.indexName - The `indexName` to replace `objects` in.
|
|
1930
|
+
* @param chunkedBatch.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
1931
|
+
* @param chunkedBatch.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
|
|
1932
|
+
* @param chunkedBatch.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
1933
|
+
* @param chunkedBatch.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
1934
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1935
|
+
*/
|
|
1936
|
+
async chunkedBatch({ indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000, }, requestOptions) {
|
|
1937
|
+
let requests = [];
|
|
1938
|
+
const responses = [];
|
|
1939
|
+
const objectEntries = objects.entries();
|
|
1940
|
+
for (const [i, obj] of objectEntries) {
|
|
1941
|
+
requests.push({ action, body: obj });
|
|
1942
|
+
if (requests.length === batchSize || i === objects.length - 1) {
|
|
1943
|
+
responses.push(await this.batch({ indexName, batchWriteParams: { requests } }, requestOptions));
|
|
1944
|
+
requests = [];
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
if (waitForTasks) {
|
|
1948
|
+
for (const resp of responses) {
|
|
1949
|
+
await this.waitForTask({ indexName, taskID: resp.taskID });
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
return responses;
|
|
1953
|
+
},
|
|
1954
|
+
/**
|
|
1955
|
+
* Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
1956
|
+
*
|
|
1957
|
+
* @summary Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
1958
|
+
* @param saveObjects - The `saveObjects` object.
|
|
1959
|
+
* @param saveObjects.indexName - The `indexName` to save `objects` in.
|
|
1960
|
+
* @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
1961
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
1962
|
+
*/
|
|
1963
|
+
async saveObjects({ indexName, objects }, requestOptions) {
|
|
1964
|
+
return await this.chunkedBatch({ indexName, objects, action: 'addObject' }, requestOptions);
|
|
1965
|
+
},
|
|
1966
|
+
/**
|
|
1967
|
+
* Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
|
|
1968
|
+
*
|
|
1969
|
+
* @summary Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
|
|
1970
|
+
* @param deleteObjects - The `deleteObjects` object.
|
|
1971
|
+
* @param deleteObjects.indexName - The `indexName` to delete `objectIDs` from.
|
|
1972
|
+
* @param deleteObjects.objectIDs - The objectIDs to delete.
|
|
1973
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
1974
|
+
*/
|
|
1975
|
+
async deleteObjects({ indexName, objectIDs }, requestOptions) {
|
|
1976
|
+
return await this.chunkedBatch({
|
|
1977
|
+
indexName,
|
|
1978
|
+
objects: objectIDs.map((objectID) => ({ objectID })),
|
|
1979
|
+
action: 'deleteObject',
|
|
1980
|
+
}, requestOptions);
|
|
1981
|
+
},
|
|
1982
|
+
/**
|
|
1983
|
+
* Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
1984
|
+
*
|
|
1985
|
+
* @summary Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
1986
|
+
* @param partialUpdateObjects - The `partialUpdateObjects` object.
|
|
1987
|
+
* @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.
|
|
1988
|
+
* @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.
|
|
1989
|
+
* @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail..
|
|
1990
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1991
|
+
*/
|
|
1992
|
+
async partialUpdateObjects({ indexName, objects, createIfNotExists }, requestOptions) {
|
|
1993
|
+
return await this.chunkedBatch({
|
|
1994
|
+
indexName,
|
|
1995
|
+
objects,
|
|
1996
|
+
action: createIfNotExists
|
|
1997
|
+
? 'partialUpdateObject'
|
|
1998
|
+
: 'partialUpdateObjectNoCreate',
|
|
1999
|
+
}, requestOptions);
|
|
2000
|
+
},
|
|
2001
|
+
/**
|
|
2002
|
+
* 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.
|
|
2003
|
+
* See https://api-clients-automation.netlify.app/docs/contributing/add-new-api-client#5-helpers for implementation details.
|
|
2004
|
+
*
|
|
2005
|
+
* @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.
|
|
2006
|
+
* @param replaceAllObjects - The `replaceAllObjects` object.
|
|
2007
|
+
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
2008
|
+
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
2009
|
+
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.
|
|
2010
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch`, `operationIndex` and `getTask` method and merged with the transporter requestOptions.
|
|
2011
|
+
*/
|
|
2012
|
+
async replaceAllObjects({ indexName, objects, batchSize }, requestOptions) {
|
|
2013
|
+
const randomSuffix = Math.floor(Math.random() * 1000000) + 100000;
|
|
2014
|
+
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
2015
|
+
let copyOperationResponse = await this.operationIndex({
|
|
2016
|
+
indexName,
|
|
2017
|
+
operationIndexParams: {
|
|
2018
|
+
operation: 'copy',
|
|
2019
|
+
destination: tmpIndexName,
|
|
2020
|
+
scope: ['settings', 'rules', 'synonyms'],
|
|
2021
|
+
},
|
|
2022
|
+
}, requestOptions);
|
|
2023
|
+
const batchResponses = await this.chunkedBatch({ indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, requestOptions);
|
|
2024
|
+
await this.waitForTask({
|
|
2025
|
+
indexName: tmpIndexName,
|
|
2026
|
+
taskID: copyOperationResponse.taskID,
|
|
2027
|
+
});
|
|
2028
|
+
copyOperationResponse = await this.operationIndex({
|
|
2029
|
+
indexName,
|
|
2030
|
+
operationIndexParams: {
|
|
2031
|
+
operation: 'copy',
|
|
2032
|
+
destination: tmpIndexName,
|
|
2033
|
+
scope: ['settings', 'rules', 'synonyms'],
|
|
2034
|
+
},
|
|
2035
|
+
}, requestOptions);
|
|
2036
|
+
await this.waitForTask({
|
|
2037
|
+
indexName: tmpIndexName,
|
|
2038
|
+
taskID: copyOperationResponse.taskID,
|
|
2039
|
+
});
|
|
2040
|
+
const moveOperationResponse = await this.operationIndex({
|
|
2041
|
+
indexName: tmpIndexName,
|
|
2042
|
+
operationIndexParams: { operation: 'move', destination: indexName },
|
|
2043
|
+
}, requestOptions);
|
|
2044
|
+
await this.waitForTask({
|
|
2045
|
+
indexName: tmpIndexName,
|
|
2046
|
+
taskID: moveOperationResponse.taskID,
|
|
2047
|
+
});
|
|
2048
|
+
return { copyOperationResponse, batchResponses, moveOperationResponse };
|
|
2049
|
+
},
|
|
2050
|
+
/**
|
|
2051
|
+
* Creates a new API key with specific permissions and restrictions.
|
|
2052
|
+
*
|
|
2053
|
+
* Required API Key ACLs:
|
|
2054
|
+
* - admin.
|
|
1734
2055
|
*
|
|
1735
|
-
* @summary Add API key.
|
|
1736
2056
|
* @param apiKey - The apiKey object.
|
|
1737
2057
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1738
2058
|
*/
|
|
@@ -1756,13 +2076,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1756
2076
|
return transporter.request(request, requestOptions);
|
|
1757
2077
|
},
|
|
1758
2078
|
/**
|
|
1759
|
-
* If
|
|
2079
|
+
* If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
|
|
2080
|
+
*
|
|
2081
|
+
* Required API Key ACLs:
|
|
2082
|
+
* - addObject.
|
|
1760
2083
|
*
|
|
1761
|
-
* @summary Add or update a record (using objectID).
|
|
1762
2084
|
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
1763
|
-
* @param addOrUpdateObject.indexName -
|
|
1764
|
-
* @param addOrUpdateObject.objectID - Unique record
|
|
1765
|
-
* @param addOrUpdateObject.body -
|
|
2085
|
+
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
2086
|
+
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
2087
|
+
* @param addOrUpdateObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
|
|
1766
2088
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1767
2089
|
*/
|
|
1768
2090
|
addOrUpdateObject({ indexName, objectID, body }, requestOptions) {
|
|
@@ -1790,9 +2112,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1790
2112
|
return transporter.request(request, requestOptions);
|
|
1791
2113
|
},
|
|
1792
2114
|
/**
|
|
1793
|
-
*
|
|
2115
|
+
* Adds a source to the list of allowed sources.
|
|
2116
|
+
*
|
|
2117
|
+
* Required API Key ACLs:
|
|
2118
|
+
* - admin.
|
|
1794
2119
|
*
|
|
1795
|
-
* @summary Add a source.
|
|
1796
2120
|
* @param source - Source to add.
|
|
1797
2121
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1798
2122
|
*/
|
|
@@ -1816,11 +2140,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1816
2140
|
return transporter.request(request, requestOptions);
|
|
1817
2141
|
},
|
|
1818
2142
|
/**
|
|
1819
|
-
*
|
|
2143
|
+
* Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
|
|
2144
|
+
*
|
|
2145
|
+
* Required API Key ACLs:
|
|
2146
|
+
* - admin.
|
|
1820
2147
|
*
|
|
1821
|
-
* @summary Assign or move a user ID.
|
|
1822
2148
|
* @param assignUserId - The assignUserId object.
|
|
1823
|
-
* @param assignUserId.xAlgoliaUserID -
|
|
2149
|
+
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
1824
2150
|
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
1825
2151
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1826
2152
|
*/
|
|
@@ -1850,11 +2176,10 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1850
2176
|
return transporter.request(request, requestOptions);
|
|
1851
2177
|
},
|
|
1852
2178
|
/**
|
|
1853
|
-
*
|
|
2179
|
+
* Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\'re specified. - Actions are equivalent to the individual API requests of the same name.
|
|
1854
2180
|
*
|
|
1855
|
-
* @summary Batch write operations on one index.
|
|
1856
2181
|
* @param batch - The batch object.
|
|
1857
|
-
* @param batch.indexName -
|
|
2182
|
+
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
1858
2183
|
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
1859
2184
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1860
2185
|
*/
|
|
@@ -1881,11 +2206,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1881
2206
|
return transporter.request(request, requestOptions);
|
|
1882
2207
|
},
|
|
1883
2208
|
/**
|
|
1884
|
-
*
|
|
2209
|
+
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
2210
|
+
*
|
|
2211
|
+
* Required API Key ACLs:
|
|
2212
|
+
* - admin.
|
|
1885
2213
|
*
|
|
1886
|
-
* @summary Batch assign userIDs.
|
|
1887
2214
|
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
1888
|
-
* @param batchAssignUserIds.xAlgoliaUserID -
|
|
2215
|
+
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
1889
2216
|
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
1890
2217
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1891
2218
|
*/
|
|
@@ -1918,11 +2245,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1918
2245
|
return transporter.request(request, requestOptions);
|
|
1919
2246
|
},
|
|
1920
2247
|
/**
|
|
1921
|
-
*
|
|
2248
|
+
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
2249
|
+
*
|
|
2250
|
+
* Required API Key ACLs:
|
|
2251
|
+
* - editSettings.
|
|
1922
2252
|
*
|
|
1923
|
-
* @summary Batch dictionary entries.
|
|
1924
2253
|
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
1925
|
-
* @param batchDictionaryEntries.dictionaryName - Dictionary to search
|
|
2254
|
+
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
1926
2255
|
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
1927
2256
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1928
2257
|
*/
|
|
@@ -1949,11 +2278,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1949
2278
|
return transporter.request(request, requestOptions);
|
|
1950
2279
|
},
|
|
1951
2280
|
/**
|
|
1952
|
-
*
|
|
2281
|
+
* Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There\'s no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` is evaluated to `true`) If you send these parameters with your browse requests, they\'ll be ignored.
|
|
2282
|
+
*
|
|
2283
|
+
* Required API Key ACLs:
|
|
2284
|
+
* - browse.
|
|
1953
2285
|
*
|
|
1954
|
-
* @summary Get all records from an index.
|
|
1955
2286
|
* @param browse - The browse object.
|
|
1956
|
-
* @param browse.indexName -
|
|
2287
|
+
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
1957
2288
|
* @param browse.browseParams - The browseParams object.
|
|
1958
2289
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1959
2290
|
*/
|
|
@@ -1974,11 +2305,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1974
2305
|
return transporter.request(request, requestOptions);
|
|
1975
2306
|
},
|
|
1976
2307
|
/**
|
|
1977
|
-
*
|
|
2308
|
+
* Deletes only the records from an index while keeping settings, synonyms, and rules.
|
|
2309
|
+
*
|
|
2310
|
+
* Required API Key ACLs:
|
|
2311
|
+
* - deleteIndex.
|
|
1978
2312
|
*
|
|
1979
|
-
* @summary Delete all records from an index.
|
|
1980
2313
|
* @param clearObjects - The clearObjects object.
|
|
1981
|
-
* @param clearObjects.indexName -
|
|
2314
|
+
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
1982
2315
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1983
2316
|
*/
|
|
1984
2317
|
clearObjects({ indexName }, requestOptions) {
|
|
@@ -1997,12 +2330,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1997
2330
|
return transporter.request(request, requestOptions);
|
|
1998
2331
|
},
|
|
1999
2332
|
/**
|
|
2000
|
-
*
|
|
2333
|
+
* Deletes all rules from the index.
|
|
2334
|
+
*
|
|
2335
|
+
* Required API Key ACLs:
|
|
2336
|
+
* - editSettings.
|
|
2001
2337
|
*
|
|
2002
|
-
* @summary Delete all rules.
|
|
2003
2338
|
* @param clearRules - The clearRules object.
|
|
2004
|
-
* @param clearRules.indexName -
|
|
2005
|
-
* @param clearRules.forwardToReplicas -
|
|
2339
|
+
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
2340
|
+
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2006
2341
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2007
2342
|
*/
|
|
2008
2343
|
clearRules({ indexName, forwardToReplicas }, requestOptions) {
|
|
@@ -2024,12 +2359,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2024
2359
|
return transporter.request(request, requestOptions);
|
|
2025
2360
|
},
|
|
2026
2361
|
/**
|
|
2027
|
-
*
|
|
2362
|
+
* Deletes all synonyms from the index.
|
|
2363
|
+
*
|
|
2364
|
+
* Required API Key ACLs:
|
|
2365
|
+
* - editSettings.
|
|
2028
2366
|
*
|
|
2029
|
-
* @summary Delete all synonyms.
|
|
2030
2367
|
* @param clearSynonyms - The clearSynonyms object.
|
|
2031
|
-
* @param clearSynonyms.indexName -
|
|
2032
|
-
* @param clearSynonyms.forwardToReplicas -
|
|
2368
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
2369
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2033
2370
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2034
2371
|
*/
|
|
2035
2372
|
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
@@ -2053,7 +2390,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2053
2390
|
/**
|
|
2054
2391
|
* This method allow you to send requests to the Algolia REST API.
|
|
2055
2392
|
*
|
|
2056
|
-
* @summary Send requests to the Algolia REST API.
|
|
2057
2393
|
* @param customDelete - The customDelete object.
|
|
2058
2394
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2059
2395
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -2063,7 +2399,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2063
2399
|
if (!path) {
|
|
2064
2400
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
2065
2401
|
}
|
|
2066
|
-
const requestPath = '/
|
|
2402
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2067
2403
|
const headers = {};
|
|
2068
2404
|
const queryParameters = parameters ? parameters : {};
|
|
2069
2405
|
const request = {
|
|
@@ -2077,7 +2413,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2077
2413
|
/**
|
|
2078
2414
|
* This method allow you to send requests to the Algolia REST API.
|
|
2079
2415
|
*
|
|
2080
|
-
* @summary Send requests to the Algolia REST API.
|
|
2081
2416
|
* @param customGet - The customGet object.
|
|
2082
2417
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2083
2418
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -2087,7 +2422,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2087
2422
|
if (!path) {
|
|
2088
2423
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
2089
2424
|
}
|
|
2090
|
-
const requestPath = '/
|
|
2425
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2091
2426
|
const headers = {};
|
|
2092
2427
|
const queryParameters = parameters ? parameters : {};
|
|
2093
2428
|
const request = {
|
|
@@ -2101,7 +2436,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2101
2436
|
/**
|
|
2102
2437
|
* This method allow you to send requests to the Algolia REST API.
|
|
2103
2438
|
*
|
|
2104
|
-
* @summary Send requests to the Algolia REST API.
|
|
2105
2439
|
* @param customPost - The customPost object.
|
|
2106
2440
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2107
2441
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -2112,7 +2446,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2112
2446
|
if (!path) {
|
|
2113
2447
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
2114
2448
|
}
|
|
2115
|
-
const requestPath = '/
|
|
2449
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2116
2450
|
const headers = {};
|
|
2117
2451
|
const queryParameters = parameters ? parameters : {};
|
|
2118
2452
|
const request = {
|
|
@@ -2127,7 +2461,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2127
2461
|
/**
|
|
2128
2462
|
* This method allow you to send requests to the Algolia REST API.
|
|
2129
2463
|
*
|
|
2130
|
-
* @summary Send requests to the Algolia REST API.
|
|
2131
2464
|
* @param customPut - The customPut object.
|
|
2132
2465
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2133
2466
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -2138,7 +2471,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2138
2471
|
if (!path) {
|
|
2139
2472
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
2140
2473
|
}
|
|
2141
|
-
const requestPath = '/
|
|
2474
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2142
2475
|
const headers = {};
|
|
2143
2476
|
const queryParameters = parameters ? parameters : {};
|
|
2144
2477
|
const request = {
|
|
@@ -2151,9 +2484,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2151
2484
|
return transporter.request(request, requestOptions);
|
|
2152
2485
|
},
|
|
2153
2486
|
/**
|
|
2154
|
-
*
|
|
2487
|
+
* Deletes the API key.
|
|
2488
|
+
*
|
|
2489
|
+
* Required API Key ACLs:
|
|
2490
|
+
* - admin.
|
|
2155
2491
|
*
|
|
2156
|
-
* @summary Delete API key.
|
|
2157
2492
|
* @param deleteApiKey - The deleteApiKey object.
|
|
2158
2493
|
* @param deleteApiKey.key - API key.
|
|
2159
2494
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2174,11 +2509,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2174
2509
|
return transporter.request(request, requestOptions);
|
|
2175
2510
|
},
|
|
2176
2511
|
/**
|
|
2177
|
-
* This operation doesn\'t
|
|
2512
|
+
* This operation doesn\'t accept empty queries or filters. It\'s more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](tag/Records/operation/batch).
|
|
2513
|
+
*
|
|
2514
|
+
* Required API Key ACLs:
|
|
2515
|
+
* - deleteIndex.
|
|
2178
2516
|
*
|
|
2179
|
-
* @summary Delete all records matching a query.
|
|
2180
2517
|
* @param deleteBy - The deleteBy object.
|
|
2181
|
-
* @param deleteBy.indexName -
|
|
2518
|
+
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
2182
2519
|
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
2183
2520
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2184
2521
|
*/
|
|
@@ -2202,11 +2539,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2202
2539
|
return transporter.request(request, requestOptions);
|
|
2203
2540
|
},
|
|
2204
2541
|
/**
|
|
2205
|
-
*
|
|
2542
|
+
* Deletes an index and all its settings. - Deleting an index doesn\'t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/).
|
|
2543
|
+
*
|
|
2544
|
+
* Required API Key ACLs:
|
|
2545
|
+
* - deleteIndex.
|
|
2206
2546
|
*
|
|
2207
|
-
* @summary Delete index.
|
|
2208
2547
|
* @param deleteIndex - The deleteIndex object.
|
|
2209
|
-
* @param deleteIndex.indexName -
|
|
2548
|
+
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
2210
2549
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2211
2550
|
*/
|
|
2212
2551
|
deleteIndex({ indexName }, requestOptions) {
|
|
@@ -2225,12 +2564,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2225
2564
|
return transporter.request(request, requestOptions);
|
|
2226
2565
|
},
|
|
2227
2566
|
/**
|
|
2228
|
-
* To delete
|
|
2567
|
+
* Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy).
|
|
2568
|
+
*
|
|
2569
|
+
* Required API Key ACLs:
|
|
2570
|
+
* - deleteObject.
|
|
2229
2571
|
*
|
|
2230
|
-
* @summary Delete a record.
|
|
2231
2572
|
* @param deleteObject - The deleteObject object.
|
|
2232
|
-
* @param deleteObject.indexName -
|
|
2233
|
-
* @param deleteObject.objectID - Unique record
|
|
2573
|
+
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
2574
|
+
* @param deleteObject.objectID - Unique record identifier.
|
|
2234
2575
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2235
2576
|
*/
|
|
2236
2577
|
deleteObject({ indexName, objectID }, requestOptions) {
|
|
@@ -2254,13 +2595,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2254
2595
|
return transporter.request(request, requestOptions);
|
|
2255
2596
|
},
|
|
2256
2597
|
/**
|
|
2257
|
-
*
|
|
2598
|
+
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
2599
|
+
*
|
|
2600
|
+
* Required API Key ACLs:
|
|
2601
|
+
* - editSettings.
|
|
2258
2602
|
*
|
|
2259
|
-
* @summary Delete a rule.
|
|
2260
2603
|
* @param deleteRule - The deleteRule object.
|
|
2261
|
-
* @param deleteRule.indexName -
|
|
2604
|
+
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
2262
2605
|
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
2263
|
-
* @param deleteRule.forwardToReplicas -
|
|
2606
|
+
* @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2264
2607
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2265
2608
|
*/
|
|
2266
2609
|
deleteRule({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
@@ -2287,9 +2630,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2287
2630
|
return transporter.request(request, requestOptions);
|
|
2288
2631
|
},
|
|
2289
2632
|
/**
|
|
2290
|
-
*
|
|
2633
|
+
* Deletes a source from the list of allowed sources.
|
|
2634
|
+
*
|
|
2635
|
+
* Required API Key ACLs:
|
|
2636
|
+
* - admin.
|
|
2291
2637
|
*
|
|
2292
|
-
* @summary Remove a source.
|
|
2293
2638
|
* @param deleteSource - The deleteSource object.
|
|
2294
2639
|
* @param deleteSource.source - IP address range of the source.
|
|
2295
2640
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2310,13 +2655,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2310
2655
|
return transporter.request(request, requestOptions);
|
|
2311
2656
|
},
|
|
2312
2657
|
/**
|
|
2313
|
-
*
|
|
2658
|
+
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
2659
|
+
*
|
|
2660
|
+
* Required API Key ACLs:
|
|
2661
|
+
* - editSettings.
|
|
2314
2662
|
*
|
|
2315
|
-
* @summary Delete a synonym.
|
|
2316
2663
|
* @param deleteSynonym - The deleteSynonym object.
|
|
2317
|
-
* @param deleteSynonym.indexName -
|
|
2664
|
+
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
2318
2665
|
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
2319
|
-
* @param deleteSynonym.forwardToReplicas -
|
|
2666
|
+
* @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2320
2667
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2321
2668
|
*/
|
|
2322
2669
|
deleteSynonym({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
@@ -2343,9 +2690,8 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2343
2690
|
return transporter.request(request, requestOptions);
|
|
2344
2691
|
},
|
|
2345
2692
|
/**
|
|
2346
|
-
*
|
|
2693
|
+
* Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key.
|
|
2347
2694
|
*
|
|
2348
|
-
* @summary Get API key permissions.
|
|
2349
2695
|
* @param getApiKey - The getApiKey object.
|
|
2350
2696
|
* @param getApiKey.key - API key.
|
|
2351
2697
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2366,9 +2712,36 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2366
2712
|
return transporter.request(request, requestOptions);
|
|
2367
2713
|
},
|
|
2368
2714
|
/**
|
|
2369
|
-
*
|
|
2715
|
+
* Checks the status of a given application task.
|
|
2716
|
+
*
|
|
2717
|
+
* Required API Key ACLs:
|
|
2718
|
+
* - editSettings.
|
|
2719
|
+
*
|
|
2720
|
+
* @param getAppTask - The getAppTask object.
|
|
2721
|
+
* @param getAppTask.taskID - Unique task identifier.
|
|
2722
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2723
|
+
*/
|
|
2724
|
+
getAppTask({ taskID }, requestOptions) {
|
|
2725
|
+
if (!taskID) {
|
|
2726
|
+
throw new Error('Parameter `taskID` is required when calling `getAppTask`.');
|
|
2727
|
+
}
|
|
2728
|
+
const requestPath = '/1/task/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
2729
|
+
const headers = {};
|
|
2730
|
+
const queryParameters = {};
|
|
2731
|
+
const request = {
|
|
2732
|
+
method: 'GET',
|
|
2733
|
+
path: requestPath,
|
|
2734
|
+
queryParameters,
|
|
2735
|
+
headers,
|
|
2736
|
+
};
|
|
2737
|
+
return transporter.request(request, requestOptions);
|
|
2738
|
+
},
|
|
2739
|
+
/**
|
|
2740
|
+
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
2741
|
+
*
|
|
2742
|
+
* Required API Key ACLs:
|
|
2743
|
+
* - settings.
|
|
2370
2744
|
*
|
|
2371
|
-
* @summary List available languages.
|
|
2372
2745
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2373
2746
|
*/
|
|
2374
2747
|
getDictionaryLanguages(requestOptions) {
|
|
@@ -2384,9 +2757,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2384
2757
|
return transporter.request(request, requestOptions);
|
|
2385
2758
|
},
|
|
2386
2759
|
/**
|
|
2387
|
-
*
|
|
2760
|
+
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
2761
|
+
*
|
|
2762
|
+
* Required API Key ACLs:
|
|
2763
|
+
* - settings.
|
|
2388
2764
|
*
|
|
2389
|
-
* @summary Get stop word settings.
|
|
2390
2765
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2391
2766
|
*/
|
|
2392
2767
|
getDictionarySettings(requestOptions) {
|
|
@@ -2402,14 +2777,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2402
2777
|
return transporter.request(request, requestOptions);
|
|
2403
2778
|
},
|
|
2404
2779
|
/**
|
|
2405
|
-
* The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days.
|
|
2780
|
+
* The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn\'t appear in the logs itself.
|
|
2781
|
+
*
|
|
2782
|
+
* Required API Key ACLs:
|
|
2783
|
+
* - logs.
|
|
2406
2784
|
*
|
|
2407
|
-
* @summary Return the latest log entries.
|
|
2408
2785
|
* @param getLogs - The getLogs object.
|
|
2409
|
-
* @param getLogs.offset - First log entry to retrieve.
|
|
2786
|
+
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
2410
2787
|
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
2411
|
-
* @param getLogs.indexName - Index for which log entries
|
|
2412
|
-
* @param getLogs.type - Type of log entries to retrieve.
|
|
2788
|
+
* @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
|
|
2789
|
+
* @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
|
|
2413
2790
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2414
2791
|
*/
|
|
2415
2792
|
getLogs({ offset, length, indexName, type } = {}, requestOptions = undefined) {
|
|
@@ -2437,13 +2814,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2437
2814
|
return transporter.request(request, requestOptions);
|
|
2438
2815
|
},
|
|
2439
2816
|
/**
|
|
2440
|
-
* To
|
|
2817
|
+
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
|
2818
|
+
*
|
|
2819
|
+
* Required API Key ACLs:
|
|
2820
|
+
* - search.
|
|
2441
2821
|
*
|
|
2442
|
-
* @summary Get a record.
|
|
2443
2822
|
* @param getObject - The getObject object.
|
|
2444
|
-
* @param getObject.indexName -
|
|
2445
|
-
* @param getObject.objectID - Unique record
|
|
2446
|
-
* @param getObject.attributesToRetrieve - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned.
|
|
2823
|
+
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
2824
|
+
* @param getObject.objectID - Unique record identifier.
|
|
2825
|
+
* @param getObject.attributesToRetrieve - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won\'t be retrieved unless the request is authenticated with the admin API key.
|
|
2447
2826
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2448
2827
|
*/
|
|
2449
2828
|
getObject({ indexName, objectID, attributesToRetrieve }, requestOptions) {
|
|
@@ -2470,9 +2849,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2470
2849
|
return transporter.request(request, requestOptions);
|
|
2471
2850
|
},
|
|
2472
2851
|
/**
|
|
2473
|
-
*
|
|
2852
|
+
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
2853
|
+
*
|
|
2854
|
+
* Required API Key ACLs:
|
|
2855
|
+
* - search.
|
|
2474
2856
|
*
|
|
2475
|
-
* @summary Get multiple records.
|
|
2476
2857
|
* @param getObjectsParams - Request object.
|
|
2477
2858
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2478
2859
|
*/
|
|
@@ -2498,11 +2879,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2498
2879
|
return transporter.request(request, requestOptions);
|
|
2499
2880
|
},
|
|
2500
2881
|
/**
|
|
2501
|
-
*
|
|
2882
|
+
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
2883
|
+
*
|
|
2884
|
+
* Required API Key ACLs:
|
|
2885
|
+
* - settings.
|
|
2502
2886
|
*
|
|
2503
|
-
* @summary Get a rule.
|
|
2504
2887
|
* @param getRule - The getRule object.
|
|
2505
|
-
* @param getRule.indexName -
|
|
2888
|
+
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
2506
2889
|
* @param getRule.objectID - Unique identifier of a rule object.
|
|
2507
2890
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2508
2891
|
*/
|
|
@@ -2527,11 +2910,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2527
2910
|
return transporter.request(request, requestOptions);
|
|
2528
2911
|
},
|
|
2529
2912
|
/**
|
|
2530
|
-
*
|
|
2913
|
+
* Retrieves an object with non-null index settings.
|
|
2914
|
+
*
|
|
2915
|
+
* Required API Key ACLs:
|
|
2916
|
+
* - search.
|
|
2531
2917
|
*
|
|
2532
|
-
* @summary Get index settings.
|
|
2533
2918
|
* @param getSettings - The getSettings object.
|
|
2534
|
-
* @param getSettings.indexName -
|
|
2919
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2535
2920
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2536
2921
|
*/
|
|
2537
2922
|
getSettings({ indexName }, requestOptions) {
|
|
@@ -2550,9 +2935,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2550
2935
|
return transporter.request(request, requestOptions);
|
|
2551
2936
|
},
|
|
2552
2937
|
/**
|
|
2553
|
-
*
|
|
2938
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2939
|
+
*
|
|
2940
|
+
* Required API Key ACLs:
|
|
2941
|
+
* - admin.
|
|
2554
2942
|
*
|
|
2555
|
-
* @summary Get all allowed IP addresses.
|
|
2556
2943
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2557
2944
|
*/
|
|
2558
2945
|
getSources(requestOptions) {
|
|
@@ -2568,11 +2955,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2568
2955
|
return transporter.request(request, requestOptions);
|
|
2569
2956
|
},
|
|
2570
2957
|
/**
|
|
2571
|
-
*
|
|
2958
|
+
* Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
2959
|
+
*
|
|
2960
|
+
* Required API Key ACLs:
|
|
2961
|
+
* - settings.
|
|
2572
2962
|
*
|
|
2573
|
-
* @summary Get a synonym object.
|
|
2574
2963
|
* @param getSynonym - The getSynonym object.
|
|
2575
|
-
* @param getSynonym.indexName -
|
|
2964
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2576
2965
|
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2577
2966
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2578
2967
|
*/
|
|
@@ -2597,11 +2986,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2597
2986
|
return transporter.request(request, requestOptions);
|
|
2598
2987
|
},
|
|
2599
2988
|
/**
|
|
2600
|
-
*
|
|
2989
|
+
* Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks\' responses include a task ID that you can use to check the status.
|
|
2990
|
+
*
|
|
2991
|
+
* Required API Key ACLs:
|
|
2992
|
+
* - addObject.
|
|
2601
2993
|
*
|
|
2602
|
-
* @summary Check a task\'s status.
|
|
2603
2994
|
* @param getTask - The getTask object.
|
|
2604
|
-
* @param getTask.indexName -
|
|
2995
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2605
2996
|
* @param getTask.taskID - Unique task identifier.
|
|
2606
2997
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2607
2998
|
*/
|
|
@@ -2626,9 +3017,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2626
3017
|
return transporter.request(request, requestOptions);
|
|
2627
3018
|
},
|
|
2628
3019
|
/**
|
|
2629
|
-
* Get the IDs of the 10 users with the highest number of records per cluster.
|
|
3020
|
+
* Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
|
|
3021
|
+
*
|
|
3022
|
+
* Required API Key ACLs:
|
|
3023
|
+
* - admin.
|
|
2630
3024
|
*
|
|
2631
|
-
* @summary Get top userID.
|
|
2632
3025
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2633
3026
|
*/
|
|
2634
3027
|
getTopUserIds(requestOptions) {
|
|
@@ -2644,11 +3037,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2644
3037
|
return transporter.request(request, requestOptions);
|
|
2645
3038
|
},
|
|
2646
3039
|
/**
|
|
2647
|
-
* Returns the
|
|
3040
|
+
* Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
|
|
3041
|
+
*
|
|
3042
|
+
* Required API Key ACLs:
|
|
3043
|
+
* - admin.
|
|
2648
3044
|
*
|
|
2649
|
-
* @summary Get userID.
|
|
2650
3045
|
* @param getUserId - The getUserId object.
|
|
2651
|
-
* @param getUserId.userID -
|
|
3046
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
2652
3047
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2653
3048
|
*/
|
|
2654
3049
|
getUserId({ userID }, requestOptions) {
|
|
@@ -2669,9 +3064,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2669
3064
|
/**
|
|
2670
3065
|
* To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.
|
|
2671
3066
|
*
|
|
2672
|
-
*
|
|
3067
|
+
* Required API Key ACLs:
|
|
3068
|
+
* - admin.
|
|
3069
|
+
*
|
|
2673
3070
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
2674
|
-
* @param hasPendingMappings.getClusters -
|
|
3071
|
+
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
2675
3072
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2676
3073
|
*/
|
|
2677
3074
|
hasPendingMappings({ getClusters } = {}, requestOptions = undefined) {
|
|
@@ -2690,9 +3087,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2690
3087
|
return transporter.request(request, requestOptions);
|
|
2691
3088
|
},
|
|
2692
3089
|
/**
|
|
2693
|
-
*
|
|
3090
|
+
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
3091
|
+
*
|
|
3092
|
+
* Required API Key ACLs:
|
|
3093
|
+
* - admin.
|
|
2694
3094
|
*
|
|
2695
|
-
* @summary List API keys.
|
|
2696
3095
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2697
3096
|
*/
|
|
2698
3097
|
listApiKeys(requestOptions) {
|
|
@@ -2708,9 +3107,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2708
3107
|
return transporter.request(request, requestOptions);
|
|
2709
3108
|
},
|
|
2710
3109
|
/**
|
|
2711
|
-
*
|
|
3110
|
+
* Lists the available clusters in a multi-cluster setup.
|
|
3111
|
+
*
|
|
3112
|
+
* Required API Key ACLs:
|
|
3113
|
+
* - admin.
|
|
2712
3114
|
*
|
|
2713
|
-
* @summary List clusters.
|
|
2714
3115
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2715
3116
|
*/
|
|
2716
3117
|
listClusters(requestOptions) {
|
|
@@ -2726,12 +3127,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2726
3127
|
return transporter.request(request, requestOptions);
|
|
2727
3128
|
},
|
|
2728
3129
|
/**
|
|
2729
|
-
*
|
|
3130
|
+
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
3131
|
+
*
|
|
3132
|
+
* Required API Key ACLs:
|
|
3133
|
+
* - listIndexes.
|
|
2730
3134
|
*
|
|
2731
|
-
* @summary List indices.
|
|
2732
3135
|
* @param listIndices - The listIndices object.
|
|
2733
|
-
* @param listIndices.page -
|
|
2734
|
-
* @param listIndices.hitsPerPage -
|
|
3136
|
+
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
3137
|
+
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
2735
3138
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2736
3139
|
*/
|
|
2737
3140
|
listIndices({ page, hitsPerPage } = {}, requestOptions = undefined) {
|
|
@@ -2753,12 +3156,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2753
3156
|
return transporter.request(request, requestOptions);
|
|
2754
3157
|
},
|
|
2755
3158
|
/**
|
|
2756
|
-
*
|
|
3159
|
+
* Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
|
|
3160
|
+
*
|
|
3161
|
+
* Required API Key ACLs:
|
|
3162
|
+
* - admin.
|
|
2757
3163
|
*
|
|
2758
|
-
* @summary List userIDs.
|
|
2759
3164
|
* @param listUserIds - The listUserIds object.
|
|
2760
|
-
* @param listUserIds.page -
|
|
2761
|
-
* @param listUserIds.hitsPerPage -
|
|
3165
|
+
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
3166
|
+
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
2762
3167
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2763
3168
|
*/
|
|
2764
3169
|
listUserIds({ page, hitsPerPage } = {}, requestOptions = undefined) {
|
|
@@ -2780,9 +3185,8 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2780
3185
|
return transporter.request(request, requestOptions);
|
|
2781
3186
|
},
|
|
2782
3187
|
/**
|
|
2783
|
-
*
|
|
3188
|
+
* Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name.
|
|
2784
3189
|
*
|
|
2785
|
-
* @summary Batch write operations on multiple indices.
|
|
2786
3190
|
* @param batchParams - The batchParams object.
|
|
2787
3191
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2788
3192
|
*/
|
|
@@ -2806,11 +3210,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2806
3210
|
return transporter.request(request, requestOptions);
|
|
2807
3211
|
},
|
|
2808
3212
|
/**
|
|
2809
|
-
*
|
|
3213
|
+
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
|
|
3214
|
+
*
|
|
3215
|
+
* Required API Key ACLs:
|
|
3216
|
+
* - addObject.
|
|
2810
3217
|
*
|
|
2811
|
-
* @summary Copy, move, or rename an index.
|
|
2812
3218
|
* @param operationIndex - The operationIndex object.
|
|
2813
|
-
* @param operationIndex.indexName -
|
|
3219
|
+
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
2814
3220
|
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
2815
3221
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2816
3222
|
*/
|
|
@@ -2840,14 +3246,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2840
3246
|
return transporter.request(request, requestOptions);
|
|
2841
3247
|
},
|
|
2842
3248
|
/**
|
|
2843
|
-
*
|
|
3249
|
+
* Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor.
|
|
3250
|
+
*
|
|
3251
|
+
* Required API Key ACLs:
|
|
3252
|
+
* - addObject.
|
|
2844
3253
|
*
|
|
2845
|
-
* @summary Update record attributes.
|
|
2846
3254
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2847
|
-
* @param partialUpdateObject.indexName -
|
|
2848
|
-
* @param partialUpdateObject.objectID - Unique record
|
|
2849
|
-
* @param partialUpdateObject.attributesToUpdate -
|
|
2850
|
-
* @param partialUpdateObject.createIfNotExists -
|
|
3255
|
+
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
3256
|
+
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
3257
|
+
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
3258
|
+
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
2851
3259
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2852
3260
|
*/
|
|
2853
3261
|
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }, requestOptions) {
|
|
@@ -2878,11 +3286,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2878
3286
|
return transporter.request(request, requestOptions);
|
|
2879
3287
|
},
|
|
2880
3288
|
/**
|
|
2881
|
-
*
|
|
3289
|
+
* Deletes a user ID and its associated data from the clusters.
|
|
3290
|
+
*
|
|
3291
|
+
* Required API Key ACLs:
|
|
3292
|
+
* - admin.
|
|
2882
3293
|
*
|
|
2883
|
-
* @summary Remove userID.
|
|
2884
3294
|
* @param removeUserId - The removeUserId object.
|
|
2885
|
-
* @param removeUserId.userID -
|
|
3295
|
+
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
2886
3296
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2887
3297
|
*/
|
|
2888
3298
|
removeUserId({ userID }, requestOptions) {
|
|
@@ -2901,9 +3311,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2901
3311
|
return transporter.request(request, requestOptions);
|
|
2902
3312
|
},
|
|
2903
3313
|
/**
|
|
2904
|
-
*
|
|
3314
|
+
* Replaces the list of allowed sources.
|
|
3315
|
+
*
|
|
3316
|
+
* Required API Key ACLs:
|
|
3317
|
+
* - admin.
|
|
2905
3318
|
*
|
|
2906
|
-
* @summary Replace all sources.
|
|
2907
3319
|
* @param replaceSources - The replaceSources object.
|
|
2908
3320
|
* @param replaceSources.source - Allowed sources.
|
|
2909
3321
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2925,9 +3337,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2925
3337
|
return transporter.request(request, requestOptions);
|
|
2926
3338
|
},
|
|
2927
3339
|
/**
|
|
2928
|
-
*
|
|
3340
|
+
* Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can\'t be restored.
|
|
3341
|
+
*
|
|
3342
|
+
* Required API Key ACLs:
|
|
3343
|
+
* - admin.
|
|
2929
3344
|
*
|
|
2930
|
-
* @summary Restore API key.
|
|
2931
3345
|
* @param restoreApiKey - The restoreApiKey object.
|
|
2932
3346
|
* @param restoreApiKey.key - API key.
|
|
2933
3347
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2948,12 +3362,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2948
3362
|
return transporter.request(request, requestOptions);
|
|
2949
3363
|
},
|
|
2950
3364
|
/**
|
|
2951
|
-
*
|
|
3365
|
+
* Adds a record to an index or replace it. - If the record doesn\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\'t exist, a new record is added to your index. - If you add a record to an index that doesn\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
|
|
3366
|
+
*
|
|
3367
|
+
* Required API Key ACLs:
|
|
3368
|
+
* - addObject.
|
|
2952
3369
|
*
|
|
2953
|
-
* @summary Add or update a record.
|
|
2954
3370
|
* @param saveObject - The saveObject object.
|
|
2955
|
-
* @param saveObject.indexName -
|
|
2956
|
-
* @param saveObject.body - The
|
|
3371
|
+
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
3372
|
+
* @param saveObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
|
|
2957
3373
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2958
3374
|
*/
|
|
2959
3375
|
saveObject({ indexName, body }, requestOptions) {
|
|
@@ -2976,14 +3392,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2976
3392
|
return transporter.request(request, requestOptions);
|
|
2977
3393
|
},
|
|
2978
3394
|
/**
|
|
2979
|
-
* To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
|
|
3395
|
+
* If a rule with the specified object ID doesn\'t exist, it\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
|
|
3396
|
+
*
|
|
3397
|
+
* Required API Key ACLs:
|
|
3398
|
+
* - editSettings.
|
|
2980
3399
|
*
|
|
2981
|
-
* @summary Create or update a rule.
|
|
2982
3400
|
* @param saveRule - The saveRule object.
|
|
2983
|
-
* @param saveRule.indexName -
|
|
3401
|
+
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
2984
3402
|
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
2985
3403
|
* @param saveRule.rule - The rule object.
|
|
2986
|
-
* @param saveRule.forwardToReplicas -
|
|
3404
|
+
* @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2987
3405
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2988
3406
|
*/
|
|
2989
3407
|
saveRule({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
|
|
@@ -3017,14 +3435,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3017
3435
|
return transporter.request(request, requestOptions);
|
|
3018
3436
|
},
|
|
3019
3437
|
/**
|
|
3020
|
-
* Create or update multiple rules.
|
|
3438
|
+
* Create or update multiple rules. If a rule with the specified object ID doesn\'t exist, Algolia creates a new one. Otherwise, existing rules are replaced.
|
|
3439
|
+
*
|
|
3440
|
+
* Required API Key ACLs:
|
|
3441
|
+
* - editSettings.
|
|
3021
3442
|
*
|
|
3022
|
-
* @summary Save a batch of rules.
|
|
3023
3443
|
* @param saveRules - The saveRules object.
|
|
3024
|
-
* @param saveRules.indexName -
|
|
3444
|
+
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
3025
3445
|
* @param saveRules.rules - The rules object.
|
|
3026
|
-
* @param saveRules.forwardToReplicas -
|
|
3027
|
-
* @param saveRules.clearExistingRules -
|
|
3446
|
+
* @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3447
|
+
* @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
|
|
3028
3448
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3029
3449
|
*/
|
|
3030
3450
|
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }, requestOptions) {
|
|
@@ -3053,14 +3473,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3053
3473
|
return transporter.request(request, requestOptions);
|
|
3054
3474
|
},
|
|
3055
3475
|
/**
|
|
3056
|
-
*
|
|
3476
|
+
* If a synonym with the specified object ID doesn\'t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms).
|
|
3477
|
+
*
|
|
3478
|
+
* Required API Key ACLs:
|
|
3479
|
+
* - editSettings.
|
|
3057
3480
|
*
|
|
3058
|
-
* @summary Save a synonym.
|
|
3059
3481
|
* @param saveSynonym - The saveSynonym object.
|
|
3060
|
-
* @param saveSynonym.indexName -
|
|
3482
|
+
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
3061
3483
|
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
3062
3484
|
* @param saveSynonym.synonymHit - The synonymHit object.
|
|
3063
|
-
* @param saveSynonym.forwardToReplicas -
|
|
3485
|
+
* @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3064
3486
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3065
3487
|
*/
|
|
3066
3488
|
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
|
|
@@ -3097,14 +3519,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3097
3519
|
return transporter.request(request, requestOptions);
|
|
3098
3520
|
},
|
|
3099
3521
|
/**
|
|
3100
|
-
*
|
|
3522
|
+
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
|
|
3523
|
+
*
|
|
3524
|
+
* Required API Key ACLs:
|
|
3525
|
+
* - editSettings.
|
|
3101
3526
|
*
|
|
3102
|
-
* @summary Save a batch of synonyms.
|
|
3103
3527
|
* @param saveSynonyms - The saveSynonyms object.
|
|
3104
|
-
* @param saveSynonyms.indexName -
|
|
3528
|
+
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3105
3529
|
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
3106
|
-
* @param saveSynonyms.forwardToReplicas -
|
|
3107
|
-
* @param saveSynonyms.replaceExistingSynonyms -
|
|
3530
|
+
* @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3531
|
+
* @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
|
|
3108
3532
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3109
3533
|
*/
|
|
3110
3534
|
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }, requestOptions) {
|
|
@@ -3134,10 +3558,12 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3134
3558
|
return transporter.request(request, requestOptions);
|
|
3135
3559
|
},
|
|
3136
3560
|
/**
|
|
3137
|
-
*
|
|
3561
|
+
* Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters.
|
|
3138
3562
|
*
|
|
3139
|
-
*
|
|
3140
|
-
*
|
|
3563
|
+
* Required API Key ACLs:
|
|
3564
|
+
* - search.
|
|
3565
|
+
*
|
|
3566
|
+
* @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
|
|
3141
3567
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3142
3568
|
*/
|
|
3143
3569
|
search(searchMethodParams, requestOptions) {
|
|
@@ -3184,11 +3610,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3184
3610
|
return transporter.request(request, requestOptions);
|
|
3185
3611
|
},
|
|
3186
3612
|
/**
|
|
3187
|
-
*
|
|
3613
|
+
* Searches for standard and custom dictionary entries.
|
|
3614
|
+
*
|
|
3615
|
+
* Required API Key ACLs:
|
|
3616
|
+
* - settings.
|
|
3188
3617
|
*
|
|
3189
|
-
* @summary Search dictionary entries.
|
|
3190
3618
|
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
3191
|
-
* @param searchDictionaryEntries.dictionaryName - Dictionary to search
|
|
3619
|
+
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
3192
3620
|
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
3193
3621
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3194
3622
|
*/
|
|
@@ -3217,12 +3645,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3217
3645
|
return transporter.request(request, requestOptions);
|
|
3218
3646
|
},
|
|
3219
3647
|
/**
|
|
3220
|
-
*
|
|
3648
|
+
* Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\'t work if you have **more than 65 searchable facets and searchable attributes combined**.
|
|
3649
|
+
*
|
|
3650
|
+
* Required API Key ACLs:
|
|
3651
|
+
* - search.
|
|
3221
3652
|
*
|
|
3222
|
-
* @summary Search for facet values.
|
|
3223
3653
|
* @param searchForFacetValues - The searchForFacetValues object.
|
|
3224
|
-
* @param searchForFacetValues.indexName -
|
|
3225
|
-
* @param searchForFacetValues.facetName - Facet
|
|
3654
|
+
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
3655
|
+
* @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
|
|
3226
3656
|
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
|
|
3227
3657
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3228
3658
|
*/
|
|
@@ -3250,11 +3680,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3250
3680
|
return transporter.request(request, requestOptions);
|
|
3251
3681
|
},
|
|
3252
3682
|
/**
|
|
3253
|
-
*
|
|
3683
|
+
* Searches for rules in your index.
|
|
3684
|
+
*
|
|
3685
|
+
* Required API Key ACLs:
|
|
3686
|
+
* - settings.
|
|
3254
3687
|
*
|
|
3255
|
-
* @summary Search for rules.
|
|
3256
3688
|
* @param searchRules - The searchRules object.
|
|
3257
|
-
* @param searchRules.indexName -
|
|
3689
|
+
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
3258
3690
|
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
3259
3691
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3260
3692
|
*/
|
|
@@ -3277,11 +3709,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3277
3709
|
return transporter.request(request, requestOptions);
|
|
3278
3710
|
},
|
|
3279
3711
|
/**
|
|
3280
|
-
*
|
|
3712
|
+
* Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting.
|
|
3713
|
+
*
|
|
3714
|
+
* Required API Key ACLs:
|
|
3715
|
+
* - search.
|
|
3281
3716
|
*
|
|
3282
|
-
* @summary Search an index.
|
|
3283
3717
|
* @param searchSingleIndex - The searchSingleIndex object.
|
|
3284
|
-
* @param searchSingleIndex.indexName -
|
|
3718
|
+
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
3285
3719
|
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
3286
3720
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3287
3721
|
*/
|
|
@@ -3304,11 +3738,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3304
3738
|
return transporter.request(request, requestOptions);
|
|
3305
3739
|
},
|
|
3306
3740
|
/**
|
|
3307
|
-
*
|
|
3741
|
+
* Searches for synonyms in your index.
|
|
3742
|
+
*
|
|
3743
|
+
* Required API Key ACLs:
|
|
3744
|
+
* - settings.
|
|
3308
3745
|
*
|
|
3309
|
-
* @summary Search for synonyms.
|
|
3310
3746
|
* @param searchSynonyms - The searchSynonyms object.
|
|
3311
|
-
* @param searchSynonyms.indexName -
|
|
3747
|
+
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3312
3748
|
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
3313
3749
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3314
3750
|
*/
|
|
@@ -3331,9 +3767,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3331
3767
|
return transporter.request(request, requestOptions);
|
|
3332
3768
|
},
|
|
3333
3769
|
/**
|
|
3334
|
-
* Since it can take
|
|
3770
|
+
* Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. To ensure rapid updates, the user IDs index isn\'t built at the same time as the mapping. Instead, it\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
|
|
3771
|
+
*
|
|
3772
|
+
* Required API Key ACLs:
|
|
3773
|
+
* - admin.
|
|
3335
3774
|
*
|
|
3336
|
-
* @summary Search for a user ID.
|
|
3337
3775
|
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
3338
3776
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3339
3777
|
*/
|
|
@@ -3359,9 +3797,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3359
3797
|
return transporter.request(request, requestOptions);
|
|
3360
3798
|
},
|
|
3361
3799
|
/**
|
|
3362
|
-
*
|
|
3800
|
+
* Turns standard stop word dictionary entries on or off for a given language.
|
|
3801
|
+
*
|
|
3802
|
+
* Required API Key ACLs:
|
|
3803
|
+
* - editSettings.
|
|
3363
3804
|
*
|
|
3364
|
-
* @summary Set stop word settings.
|
|
3365
3805
|
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
3366
3806
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3367
3807
|
*/
|
|
@@ -3385,13 +3825,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3385
3825
|
return transporter.request(request, requestOptions);
|
|
3386
3826
|
},
|
|
3387
3827
|
/**
|
|
3388
|
-
* Update the specified
|
|
3828
|
+
* Update the specified index settings. Index settings that you don\'t specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index.
|
|
3829
|
+
*
|
|
3830
|
+
* Required API Key ACLs:
|
|
3831
|
+
* - editSettings.
|
|
3389
3832
|
*
|
|
3390
|
-
* @summary Update index settings.
|
|
3391
3833
|
* @param setSettings - The setSettings object.
|
|
3392
|
-
* @param setSettings.indexName -
|
|
3834
|
+
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
3393
3835
|
* @param setSettings.indexSettings - The indexSettings object.
|
|
3394
|
-
* @param setSettings.forwardToReplicas -
|
|
3836
|
+
* @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3395
3837
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3396
3838
|
*/
|
|
3397
3839
|
setSettings({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
|
|
@@ -3417,9 +3859,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3417
3859
|
return transporter.request(request, requestOptions);
|
|
3418
3860
|
},
|
|
3419
3861
|
/**
|
|
3420
|
-
*
|
|
3862
|
+
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
3863
|
+
*
|
|
3864
|
+
* Required API Key ACLs:
|
|
3865
|
+
* - admin.
|
|
3421
3866
|
*
|
|
3422
|
-
* @summary Update an API key.
|
|
3423
3867
|
* @param updateApiKey - The updateApiKey object.
|
|
3424
3868
|
* @param updateApiKey.key - API key.
|
|
3425
3869
|
* @param updateApiKey.apiKey - The apiKey object.
|
|
@@ -3451,7 +3895,369 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3451
3895
|
}
|
|
3452
3896
|
|
|
3453
3897
|
// 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.
|
|
3454
|
-
const apiClientVersion =
|
|
3898
|
+
const apiClientVersion$1 = '5.0.0-beta.10';
|
|
3899
|
+
function getDefaultHosts(appId) {
|
|
3900
|
+
return [
|
|
3901
|
+
{
|
|
3902
|
+
url: `${appId}-dsn.algolia.net`,
|
|
3903
|
+
accept: 'read',
|
|
3904
|
+
protocol: 'https',
|
|
3905
|
+
},
|
|
3906
|
+
{
|
|
3907
|
+
url: `${appId}.algolia.net`,
|
|
3908
|
+
accept: 'write',
|
|
3909
|
+
protocol: 'https',
|
|
3910
|
+
},
|
|
3911
|
+
].concat(clientCommon.shuffle([
|
|
3912
|
+
{
|
|
3913
|
+
url: `${appId}-1.algolianet.com`,
|
|
3914
|
+
accept: 'readWrite',
|
|
3915
|
+
protocol: 'https',
|
|
3916
|
+
},
|
|
3917
|
+
{
|
|
3918
|
+
url: `${appId}-2.algolianet.com`,
|
|
3919
|
+
accept: 'readWrite',
|
|
3920
|
+
protocol: 'https',
|
|
3921
|
+
},
|
|
3922
|
+
{
|
|
3923
|
+
url: `${appId}-3.algolianet.com`,
|
|
3924
|
+
accept: 'readWrite',
|
|
3925
|
+
protocol: 'https',
|
|
3926
|
+
},
|
|
3927
|
+
]));
|
|
3928
|
+
}
|
|
3929
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
3930
|
+
function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
|
|
3931
|
+
const auth = clientCommon.createAuth(appIdOption, apiKeyOption, authMode);
|
|
3932
|
+
const transporter = clientCommon.createTransporter({
|
|
3933
|
+
hosts: getDefaultHosts(appIdOption),
|
|
3934
|
+
...options,
|
|
3935
|
+
algoliaAgent: clientCommon.getAlgoliaAgent({
|
|
3936
|
+
algoliaAgents,
|
|
3937
|
+
client: 'Recommend',
|
|
3938
|
+
version: apiClientVersion$1,
|
|
3939
|
+
}),
|
|
3940
|
+
baseHeaders: {
|
|
3941
|
+
'content-type': 'text/plain',
|
|
3942
|
+
...auth.headers(),
|
|
3943
|
+
...options.baseHeaders,
|
|
3944
|
+
},
|
|
3945
|
+
baseQueryParameters: {
|
|
3946
|
+
...auth.queryParameters(),
|
|
3947
|
+
...options.baseQueryParameters,
|
|
3948
|
+
},
|
|
3949
|
+
});
|
|
3950
|
+
return {
|
|
3951
|
+
transporter,
|
|
3952
|
+
/**
|
|
3953
|
+
* The `appId` currently in use.
|
|
3954
|
+
*/
|
|
3955
|
+
appId: appIdOption,
|
|
3956
|
+
/**
|
|
3957
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
3958
|
+
*/
|
|
3959
|
+
clearCache() {
|
|
3960
|
+
return Promise.all([
|
|
3961
|
+
transporter.requestsCache.clear(),
|
|
3962
|
+
transporter.responsesCache.clear(),
|
|
3963
|
+
]).then(() => undefined);
|
|
3964
|
+
},
|
|
3965
|
+
/**
|
|
3966
|
+
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
3967
|
+
*/
|
|
3968
|
+
get _ua() {
|
|
3969
|
+
return transporter.algoliaAgent.value;
|
|
3970
|
+
},
|
|
3971
|
+
/**
|
|
3972
|
+
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
3973
|
+
*
|
|
3974
|
+
* @param segment - The algolia agent (user-agent) segment to add.
|
|
3975
|
+
* @param version - The version of the agent.
|
|
3976
|
+
*/
|
|
3977
|
+
addAlgoliaAgent(segment, version) {
|
|
3978
|
+
transporter.algoliaAgent.add({ segment, version });
|
|
3979
|
+
},
|
|
3980
|
+
/**
|
|
3981
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
3982
|
+
*
|
|
3983
|
+
* @param customDelete - The customDelete object.
|
|
3984
|
+
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
3985
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
3986
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3987
|
+
*/
|
|
3988
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
3989
|
+
if (!path) {
|
|
3990
|
+
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
3991
|
+
}
|
|
3992
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
3993
|
+
const headers = {};
|
|
3994
|
+
const queryParameters = parameters ? parameters : {};
|
|
3995
|
+
const request = {
|
|
3996
|
+
method: 'DELETE',
|
|
3997
|
+
path: requestPath,
|
|
3998
|
+
queryParameters,
|
|
3999
|
+
headers,
|
|
4000
|
+
};
|
|
4001
|
+
return transporter.request(request, requestOptions);
|
|
4002
|
+
},
|
|
4003
|
+
/**
|
|
4004
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
4005
|
+
*
|
|
4006
|
+
* @param customGet - The customGet object.
|
|
4007
|
+
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
4008
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
4009
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4010
|
+
*/
|
|
4011
|
+
customGet({ path, parameters }, requestOptions) {
|
|
4012
|
+
if (!path) {
|
|
4013
|
+
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
4014
|
+
}
|
|
4015
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
4016
|
+
const headers = {};
|
|
4017
|
+
const queryParameters = parameters ? parameters : {};
|
|
4018
|
+
const request = {
|
|
4019
|
+
method: 'GET',
|
|
4020
|
+
path: requestPath,
|
|
4021
|
+
queryParameters,
|
|
4022
|
+
headers,
|
|
4023
|
+
};
|
|
4024
|
+
return transporter.request(request, requestOptions);
|
|
4025
|
+
},
|
|
4026
|
+
/**
|
|
4027
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
4028
|
+
*
|
|
4029
|
+
* @param customPost - The customPost object.
|
|
4030
|
+
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
4031
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
4032
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
4033
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4034
|
+
*/
|
|
4035
|
+
customPost({ path, parameters, body }, requestOptions) {
|
|
4036
|
+
if (!path) {
|
|
4037
|
+
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
4038
|
+
}
|
|
4039
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
4040
|
+
const headers = {};
|
|
4041
|
+
const queryParameters = parameters ? parameters : {};
|
|
4042
|
+
const request = {
|
|
4043
|
+
method: 'POST',
|
|
4044
|
+
path: requestPath,
|
|
4045
|
+
queryParameters,
|
|
4046
|
+
headers,
|
|
4047
|
+
data: body ? body : {},
|
|
4048
|
+
};
|
|
4049
|
+
return transporter.request(request, requestOptions);
|
|
4050
|
+
},
|
|
4051
|
+
/**
|
|
4052
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
4053
|
+
*
|
|
4054
|
+
* @param customPut - The customPut object.
|
|
4055
|
+
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
4056
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
4057
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
4058
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4059
|
+
*/
|
|
4060
|
+
customPut({ path, parameters, body }, requestOptions) {
|
|
4061
|
+
if (!path) {
|
|
4062
|
+
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
4063
|
+
}
|
|
4064
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
4065
|
+
const headers = {};
|
|
4066
|
+
const queryParameters = parameters ? parameters : {};
|
|
4067
|
+
const request = {
|
|
4068
|
+
method: 'PUT',
|
|
4069
|
+
path: requestPath,
|
|
4070
|
+
queryParameters,
|
|
4071
|
+
headers,
|
|
4072
|
+
data: body ? body : {},
|
|
4073
|
+
};
|
|
4074
|
+
return transporter.request(request, requestOptions);
|
|
4075
|
+
},
|
|
4076
|
+
/**
|
|
4077
|
+
* Deletes a Recommend rule from a recommendation scenario.
|
|
4078
|
+
*
|
|
4079
|
+
* Required API Key ACLs:
|
|
4080
|
+
* - editSettings.
|
|
4081
|
+
*
|
|
4082
|
+
* @param deleteRecommendRule - The deleteRecommendRule object.
|
|
4083
|
+
* @param deleteRecommendRule.indexName - Name of the index on which to perform the operation.
|
|
4084
|
+
* @param deleteRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4085
|
+
* @param deleteRecommendRule.objectID - Unique record identifier.
|
|
4086
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4087
|
+
*/
|
|
4088
|
+
deleteRecommendRule({ indexName, model, objectID }, requestOptions) {
|
|
4089
|
+
if (!indexName) {
|
|
4090
|
+
throw new Error('Parameter `indexName` is required when calling `deleteRecommendRule`.');
|
|
4091
|
+
}
|
|
4092
|
+
if (!model) {
|
|
4093
|
+
throw new Error('Parameter `model` is required when calling `deleteRecommendRule`.');
|
|
4094
|
+
}
|
|
4095
|
+
if (!objectID) {
|
|
4096
|
+
throw new Error('Parameter `objectID` is required when calling `deleteRecommendRule`.');
|
|
4097
|
+
}
|
|
4098
|
+
const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
|
|
4099
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4100
|
+
.replace('{model}', encodeURIComponent(model))
|
|
4101
|
+
.replace('{objectID}', encodeURIComponent(objectID));
|
|
4102
|
+
const headers = {};
|
|
4103
|
+
const queryParameters = {};
|
|
4104
|
+
const request = {
|
|
4105
|
+
method: 'DELETE',
|
|
4106
|
+
path: requestPath,
|
|
4107
|
+
queryParameters,
|
|
4108
|
+
headers,
|
|
4109
|
+
};
|
|
4110
|
+
return transporter.request(request, requestOptions);
|
|
4111
|
+
},
|
|
4112
|
+
/**
|
|
4113
|
+
* Retrieves a Recommend rule that you previously created in the Algolia dashboard.
|
|
4114
|
+
*
|
|
4115
|
+
* Required API Key ACLs:
|
|
4116
|
+
* - settings.
|
|
4117
|
+
*
|
|
4118
|
+
* @param getRecommendRule - The getRecommendRule object.
|
|
4119
|
+
* @param getRecommendRule.indexName - Name of the index on which to perform the operation.
|
|
4120
|
+
* @param getRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4121
|
+
* @param getRecommendRule.objectID - Unique record identifier.
|
|
4122
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4123
|
+
*/
|
|
4124
|
+
getRecommendRule({ indexName, model, objectID }, requestOptions) {
|
|
4125
|
+
if (!indexName) {
|
|
4126
|
+
throw new Error('Parameter `indexName` is required when calling `getRecommendRule`.');
|
|
4127
|
+
}
|
|
4128
|
+
if (!model) {
|
|
4129
|
+
throw new Error('Parameter `model` is required when calling `getRecommendRule`.');
|
|
4130
|
+
}
|
|
4131
|
+
if (!objectID) {
|
|
4132
|
+
throw new Error('Parameter `objectID` is required when calling `getRecommendRule`.');
|
|
4133
|
+
}
|
|
4134
|
+
const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
|
|
4135
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4136
|
+
.replace('{model}', encodeURIComponent(model))
|
|
4137
|
+
.replace('{objectID}', encodeURIComponent(objectID));
|
|
4138
|
+
const headers = {};
|
|
4139
|
+
const queryParameters = {};
|
|
4140
|
+
const request = {
|
|
4141
|
+
method: 'GET',
|
|
4142
|
+
path: requestPath,
|
|
4143
|
+
queryParameters,
|
|
4144
|
+
headers,
|
|
4145
|
+
};
|
|
4146
|
+
return transporter.request(request, requestOptions);
|
|
4147
|
+
},
|
|
4148
|
+
/**
|
|
4149
|
+
* 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.
|
|
4150
|
+
*
|
|
4151
|
+
* Required API Key ACLs:
|
|
4152
|
+
* - editSettings.
|
|
4153
|
+
*
|
|
4154
|
+
* @param getRecommendStatus - The getRecommendStatus object.
|
|
4155
|
+
* @param getRecommendStatus.indexName - Name of the index on which to perform the operation.
|
|
4156
|
+
* @param getRecommendStatus.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4157
|
+
* @param getRecommendStatus.taskID - Unique task identifier.
|
|
4158
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4159
|
+
*/
|
|
4160
|
+
getRecommendStatus({ indexName, model, taskID }, requestOptions) {
|
|
4161
|
+
if (!indexName) {
|
|
4162
|
+
throw new Error('Parameter `indexName` is required when calling `getRecommendStatus`.');
|
|
4163
|
+
}
|
|
4164
|
+
if (!model) {
|
|
4165
|
+
throw new Error('Parameter `model` is required when calling `getRecommendStatus`.');
|
|
4166
|
+
}
|
|
4167
|
+
if (!taskID) {
|
|
4168
|
+
throw new Error('Parameter `taskID` is required when calling `getRecommendStatus`.');
|
|
4169
|
+
}
|
|
4170
|
+
const requestPath = '/1/indexes/{indexName}/{model}/task/{taskID}'
|
|
4171
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4172
|
+
.replace('{model}', encodeURIComponent(model))
|
|
4173
|
+
.replace('{taskID}', encodeURIComponent(taskID));
|
|
4174
|
+
const headers = {};
|
|
4175
|
+
const queryParameters = {};
|
|
4176
|
+
const request = {
|
|
4177
|
+
method: 'GET',
|
|
4178
|
+
path: requestPath,
|
|
4179
|
+
queryParameters,
|
|
4180
|
+
headers,
|
|
4181
|
+
};
|
|
4182
|
+
return transporter.request(request, requestOptions);
|
|
4183
|
+
},
|
|
4184
|
+
/**
|
|
4185
|
+
* Retrieves recommendations from selected AI models.
|
|
4186
|
+
*
|
|
4187
|
+
* Required API Key ACLs:
|
|
4188
|
+
* - search.
|
|
4189
|
+
*
|
|
4190
|
+
* @param getRecommendationsParams - The getRecommendationsParams object.
|
|
4191
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4192
|
+
*/
|
|
4193
|
+
getRecommendations(getRecommendationsParams, requestOptions) {
|
|
4194
|
+
if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {
|
|
4195
|
+
const newSignatureRequest = {
|
|
4196
|
+
requests: getRecommendationsParams,
|
|
4197
|
+
};
|
|
4198
|
+
// eslint-disable-next-line no-param-reassign
|
|
4199
|
+
getRecommendationsParams = newSignatureRequest;
|
|
4200
|
+
}
|
|
4201
|
+
if (!getRecommendationsParams) {
|
|
4202
|
+
throw new Error('Parameter `getRecommendationsParams` is required when calling `getRecommendations`.');
|
|
4203
|
+
}
|
|
4204
|
+
if (!getRecommendationsParams.requests) {
|
|
4205
|
+
throw new Error('Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.');
|
|
4206
|
+
}
|
|
4207
|
+
const requestPath = '/1/indexes/*/recommendations';
|
|
4208
|
+
const headers = {};
|
|
4209
|
+
const queryParameters = {};
|
|
4210
|
+
const request = {
|
|
4211
|
+
method: 'POST',
|
|
4212
|
+
path: requestPath,
|
|
4213
|
+
queryParameters,
|
|
4214
|
+
headers,
|
|
4215
|
+
data: getRecommendationsParams,
|
|
4216
|
+
useReadTransporter: true,
|
|
4217
|
+
cacheable: true,
|
|
4218
|
+
};
|
|
4219
|
+
return transporter.request(request, requestOptions);
|
|
4220
|
+
},
|
|
4221
|
+
/**
|
|
4222
|
+
* Searches for Recommend rules. Use an empty query to list all rules for this recommendation scenario.
|
|
4223
|
+
*
|
|
4224
|
+
* Required API Key ACLs:
|
|
4225
|
+
* - settings.
|
|
4226
|
+
*
|
|
4227
|
+
* @param searchRecommendRules - The searchRecommendRules object.
|
|
4228
|
+
* @param searchRecommendRules.indexName - Name of the index on which to perform the operation.
|
|
4229
|
+
* @param searchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4230
|
+
* @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.
|
|
4231
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4232
|
+
*/
|
|
4233
|
+
searchRecommendRules({ indexName, model, searchRecommendRulesParams, }, requestOptions) {
|
|
4234
|
+
if (!indexName) {
|
|
4235
|
+
throw new Error('Parameter `indexName` is required when calling `searchRecommendRules`.');
|
|
4236
|
+
}
|
|
4237
|
+
if (!model) {
|
|
4238
|
+
throw new Error('Parameter `model` is required when calling `searchRecommendRules`.');
|
|
4239
|
+
}
|
|
4240
|
+
const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/search'
|
|
4241
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4242
|
+
.replace('{model}', encodeURIComponent(model));
|
|
4243
|
+
const headers = {};
|
|
4244
|
+
const queryParameters = {};
|
|
4245
|
+
const request = {
|
|
4246
|
+
method: 'POST',
|
|
4247
|
+
path: requestPath,
|
|
4248
|
+
queryParameters,
|
|
4249
|
+
headers,
|
|
4250
|
+
data: searchRecommendRulesParams ? searchRecommendRulesParams : {},
|
|
4251
|
+
useReadTransporter: true,
|
|
4252
|
+
cacheable: true,
|
|
4253
|
+
};
|
|
4254
|
+
return transporter.request(request, requestOptions);
|
|
4255
|
+
},
|
|
4256
|
+
};
|
|
4257
|
+
}
|
|
4258
|
+
|
|
4259
|
+
// 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.
|
|
4260
|
+
const apiClientVersion = apiClientVersion$2;
|
|
3455
4261
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
3456
4262
|
function algoliasearch(appId, apiKey, options) {
|
|
3457
4263
|
if (!appId || typeof appId !== 'string') {
|
|
@@ -3475,6 +4281,13 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
3475
4281
|
hostsCache: clientCommon.createMemoryCache(),
|
|
3476
4282
|
...options,
|
|
3477
4283
|
};
|
|
4284
|
+
function initRecommend(initOptions = {}) {
|
|
4285
|
+
return createRecommendClient({
|
|
4286
|
+
...commonOptions,
|
|
4287
|
+
...initOptions.options,
|
|
4288
|
+
...initOptions,
|
|
4289
|
+
});
|
|
4290
|
+
}
|
|
3478
4291
|
function initAnalytics(initOptions = {}) {
|
|
3479
4292
|
if (initOptions.region &&
|
|
3480
4293
|
(typeof initOptions.region !== 'string' ||
|
|
@@ -3520,9 +4333,56 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
3520
4333
|
get _ua() {
|
|
3521
4334
|
return this.transporter.algoliaAgent.value;
|
|
3522
4335
|
},
|
|
4336
|
+
initAbtesting,
|
|
3523
4337
|
initAnalytics,
|
|
3524
4338
|
initPersonalization,
|
|
3525
|
-
|
|
4339
|
+
initRecommend,
|
|
4340
|
+
/**
|
|
4341
|
+
* Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.
|
|
4342
|
+
*
|
|
4343
|
+
* @summary Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.
|
|
4344
|
+
* @param generateSecuredApiKey - The `generateSecuredApiKey` object.
|
|
4345
|
+
* @param generateSecuredApiKey.parentApiKey - The base API key from which to generate the new secured one.
|
|
4346
|
+
* @param generateSecuredApiKey.restrictions - A set of properties defining the restrictions of the secured API key.
|
|
4347
|
+
*/
|
|
4348
|
+
generateSecuredApiKey({ parentApiKey, restrictions = {}, }) {
|
|
4349
|
+
let mergedRestrictions = restrictions;
|
|
4350
|
+
if (restrictions.searchParams) {
|
|
4351
|
+
// merge searchParams with the root restrictions
|
|
4352
|
+
mergedRestrictions = {
|
|
4353
|
+
...restrictions,
|
|
4354
|
+
...restrictions.searchParams,
|
|
4355
|
+
};
|
|
4356
|
+
delete mergedRestrictions.searchParams;
|
|
4357
|
+
}
|
|
4358
|
+
mergedRestrictions = Object.keys(mergedRestrictions)
|
|
4359
|
+
.sort()
|
|
4360
|
+
.reduce((acc, key) => {
|
|
4361
|
+
// eslint-disable-next-line no-param-reassign
|
|
4362
|
+
acc[key] = mergedRestrictions[key];
|
|
4363
|
+
return acc;
|
|
4364
|
+
}, {});
|
|
4365
|
+
const queryParameters = clientCommon.serializeQueryParameters(mergedRestrictions);
|
|
4366
|
+
return Buffer.from(crypto.createHmac('sha256', parentApiKey)
|
|
4367
|
+
.update(queryParameters)
|
|
4368
|
+
.digest('hex') + queryParameters).toString('base64');
|
|
4369
|
+
},
|
|
4370
|
+
/**
|
|
4371
|
+
* Helper: Retrieves the remaining validity of the previous generated `securedApiKey`, the `ValidUntil` parameter must have been provided.
|
|
4372
|
+
*
|
|
4373
|
+
* @summary Helper: Retrieves the remaining validity of the previous generated `secured_api_key`, the `ValidUntil` parameter must have been provided.
|
|
4374
|
+
* @param getSecuredApiKeyRemainingValidity - The `getSecuredApiKeyRemainingValidity` object.
|
|
4375
|
+
* @param getSecuredApiKeyRemainingValidity.securedApiKey - The secured API key generated with the `generateSecuredApiKey` method.
|
|
4376
|
+
*/
|
|
4377
|
+
getSecuredApiKeyRemainingValidity({ securedApiKey, }) {
|
|
4378
|
+
const decodedString = Buffer.from(securedApiKey, 'base64').toString('ascii');
|
|
4379
|
+
const regex = /validUntil=(\d+)/;
|
|
4380
|
+
const match = decodedString.match(regex);
|
|
4381
|
+
if (match === null) {
|
|
4382
|
+
throw new Error('validUntil not found in given secured api key.');
|
|
4383
|
+
}
|
|
4384
|
+
return parseInt(match[1], 10) - Math.round(new Date().getTime() / 1000);
|
|
4385
|
+
},
|
|
3526
4386
|
};
|
|
3527
4387
|
}
|
|
3528
4388
|
|