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
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createHmac } from 'crypto';
|
|
2
|
+
import { createAuth, createTransporter, getAlgoliaAgent, createIterablePromise, shuffle, DEFAULT_CONNECT_TIMEOUT_NODE, DEFAULT_READ_TIMEOUT_NODE, DEFAULT_WRITE_TIMEOUT_NODE, createNullCache, createMemoryCache, serializeQueryParameters } from '@algolia/client-common';
|
|
2
3
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
4
|
|
|
4
5
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
5
|
-
const apiClientVersion$
|
|
6
|
+
const apiClientVersion$5 = '5.0.0-beta.10';
|
|
6
7
|
const REGIONS$2 = ['de', 'us'];
|
|
7
|
-
function getDefaultHosts$
|
|
8
|
+
function getDefaultHosts$4(region) {
|
|
8
9
|
const url = !region
|
|
9
10
|
? 'analytics.algolia.com'
|
|
10
11
|
: 'analytics.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -14,12 +15,12 @@ function getDefaultHosts$3(region) {
|
|
|
14
15
|
function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
15
16
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
16
17
|
const transporter = createTransporter({
|
|
17
|
-
hosts: getDefaultHosts$
|
|
18
|
+
hosts: getDefaultHosts$4(regionOption),
|
|
18
19
|
...options,
|
|
19
20
|
algoliaAgent: getAlgoliaAgent({
|
|
20
21
|
algoliaAgents,
|
|
21
22
|
client: 'Abtesting',
|
|
22
|
-
version: apiClientVersion$
|
|
23
|
+
version: apiClientVersion$5,
|
|
23
24
|
}),
|
|
24
25
|
baseHeaders: {
|
|
25
26
|
'content-type': 'text/plain',
|
|
@@ -62,9 +63,11 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
62
63
|
transporter.algoliaAgent.add({ segment, version });
|
|
63
64
|
},
|
|
64
65
|
/**
|
|
65
|
-
* Creates
|
|
66
|
+
* Creates a new A/B test.
|
|
67
|
+
*
|
|
68
|
+
* Required API Key ACLs:
|
|
69
|
+
* - editSettings.
|
|
66
70
|
*
|
|
67
|
-
* @summary Create an A/B test.
|
|
68
71
|
* @param addABTestsRequest - The addABTestsRequest object.
|
|
69
72
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
70
73
|
*/
|
|
@@ -96,7 +99,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
96
99
|
/**
|
|
97
100
|
* This method allow you to send requests to the Algolia REST API.
|
|
98
101
|
*
|
|
99
|
-
* @summary Send requests to the Algolia REST API.
|
|
100
102
|
* @param customDelete - The customDelete object.
|
|
101
103
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
102
104
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -106,7 +108,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
106
108
|
if (!path) {
|
|
107
109
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
108
110
|
}
|
|
109
|
-
const requestPath = '/
|
|
111
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
110
112
|
const headers = {};
|
|
111
113
|
const queryParameters = parameters ? parameters : {};
|
|
112
114
|
const request = {
|
|
@@ -120,7 +122,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
120
122
|
/**
|
|
121
123
|
* This method allow you to send requests to the Algolia REST API.
|
|
122
124
|
*
|
|
123
|
-
* @summary Send requests to the Algolia REST API.
|
|
124
125
|
* @param customGet - The customGet object.
|
|
125
126
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
126
127
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -130,7 +131,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
130
131
|
if (!path) {
|
|
131
132
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
132
133
|
}
|
|
133
|
-
const requestPath = '/
|
|
134
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
134
135
|
const headers = {};
|
|
135
136
|
const queryParameters = parameters ? parameters : {};
|
|
136
137
|
const request = {
|
|
@@ -144,7 +145,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
144
145
|
/**
|
|
145
146
|
* This method allow you to send requests to the Algolia REST API.
|
|
146
147
|
*
|
|
147
|
-
* @summary Send requests to the Algolia REST API.
|
|
148
148
|
* @param customPost - The customPost object.
|
|
149
149
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
150
150
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -155,7 +155,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
155
155
|
if (!path) {
|
|
156
156
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
157
157
|
}
|
|
158
|
-
const requestPath = '/
|
|
158
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
159
159
|
const headers = {};
|
|
160
160
|
const queryParameters = parameters ? parameters : {};
|
|
161
161
|
const request = {
|
|
@@ -170,7 +170,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
170
170
|
/**
|
|
171
171
|
* This method allow you to send requests to the Algolia REST API.
|
|
172
172
|
*
|
|
173
|
-
* @summary Send requests to the Algolia REST API.
|
|
174
173
|
* @param customPut - The customPut object.
|
|
175
174
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
176
175
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -181,7 +180,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
181
180
|
if (!path) {
|
|
182
181
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
183
182
|
}
|
|
184
|
-
const requestPath = '/
|
|
183
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
185
184
|
const headers = {};
|
|
186
185
|
const queryParameters = parameters ? parameters : {};
|
|
187
186
|
const request = {
|
|
@@ -194,11 +193,13 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
194
193
|
return transporter.request(request, requestOptions);
|
|
195
194
|
},
|
|
196
195
|
/**
|
|
197
|
-
*
|
|
196
|
+
* Deletes an A/B test by its ID.
|
|
197
|
+
*
|
|
198
|
+
* Required API Key ACLs:
|
|
199
|
+
* - editSettings.
|
|
198
200
|
*
|
|
199
|
-
* @summary Delete an A/B test.
|
|
200
201
|
* @param deleteABTest - The deleteABTest object.
|
|
201
|
-
* @param deleteABTest.id - Unique A/B test
|
|
202
|
+
* @param deleteABTest.id - Unique A/B test identifier.
|
|
202
203
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
203
204
|
*/
|
|
204
205
|
deleteABTest({ id }, requestOptions) {
|
|
@@ -217,11 +218,13 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
217
218
|
return transporter.request(request, requestOptions);
|
|
218
219
|
},
|
|
219
220
|
/**
|
|
220
|
-
*
|
|
221
|
+
* Retrieves the details for an A/B test by its ID.
|
|
222
|
+
*
|
|
223
|
+
* Required API Key ACLs:
|
|
224
|
+
* - analytics.
|
|
221
225
|
*
|
|
222
|
-
* @summary Get A/B test details.
|
|
223
226
|
* @param getABTest - The getABTest object.
|
|
224
|
-
* @param getABTest.id - Unique A/B test
|
|
227
|
+
* @param getABTest.id - Unique A/B test identifier.
|
|
225
228
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
226
229
|
*/
|
|
227
230
|
getABTest({ id }, requestOptions) {
|
|
@@ -240,14 +243,16 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
240
243
|
return transporter.request(request, requestOptions);
|
|
241
244
|
},
|
|
242
245
|
/**
|
|
243
|
-
*
|
|
246
|
+
* Lists all A/B tests you configured for this application.
|
|
247
|
+
*
|
|
248
|
+
* Required API Key ACLs:
|
|
249
|
+
* - analytics.
|
|
244
250
|
*
|
|
245
|
-
* @summary List all A/B tests.
|
|
246
251
|
* @param listABTests - The listABTests object.
|
|
247
|
-
* @param listABTests.offset - Position of the
|
|
248
|
-
* @param listABTests.limit - Number of
|
|
249
|
-
* @param listABTests.indexPrefix - Only
|
|
250
|
-
* @param listABTests.indexSuffix - Only
|
|
252
|
+
* @param listABTests.offset - Position of the first item to return.
|
|
253
|
+
* @param listABTests.limit - Number of items to return.
|
|
254
|
+
* @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.
|
|
255
|
+
* @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.
|
|
251
256
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
252
257
|
*/
|
|
253
258
|
listABTests({ offset, limit, indexPrefix, indexSuffix } = {}, requestOptions = undefined) {
|
|
@@ -275,11 +280,13 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
275
280
|
return transporter.request(request, requestOptions);
|
|
276
281
|
},
|
|
277
282
|
/**
|
|
278
|
-
*
|
|
283
|
+
* Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
|
|
284
|
+
*
|
|
285
|
+
* Required API Key ACLs:
|
|
286
|
+
* - editSettings.
|
|
279
287
|
*
|
|
280
|
-
* @summary Stop an A/B test.
|
|
281
288
|
* @param stopABTest - The stopABTest object.
|
|
282
|
-
* @param stopABTest.id - Unique A/B test
|
|
289
|
+
* @param stopABTest.id - Unique A/B test identifier.
|
|
283
290
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
284
291
|
*/
|
|
285
292
|
stopABTest({ id }, requestOptions) {
|
|
@@ -301,9 +308,9 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
301
308
|
}
|
|
302
309
|
|
|
303
310
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
304
|
-
const apiClientVersion$
|
|
311
|
+
const apiClientVersion$4 = '5.0.0-beta.10';
|
|
305
312
|
const REGIONS$1 = ['de', 'us'];
|
|
306
|
-
function getDefaultHosts$
|
|
313
|
+
function getDefaultHosts$3(region) {
|
|
307
314
|
const url = !region
|
|
308
315
|
? 'analytics.algolia.com'
|
|
309
316
|
: 'analytics.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -313,12 +320,12 @@ function getDefaultHosts$2(region) {
|
|
|
313
320
|
function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
314
321
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
315
322
|
const transporter = createTransporter({
|
|
316
|
-
hosts: getDefaultHosts$
|
|
323
|
+
hosts: getDefaultHosts$3(regionOption),
|
|
317
324
|
...options,
|
|
318
325
|
algoliaAgent: getAlgoliaAgent({
|
|
319
326
|
algoliaAgents,
|
|
320
327
|
client: 'Analytics',
|
|
321
|
-
version: apiClientVersion$
|
|
328
|
+
version: apiClientVersion$4,
|
|
322
329
|
}),
|
|
323
330
|
baseHeaders: {
|
|
324
331
|
'content-type': 'text/plain',
|
|
@@ -363,7 +370,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
363
370
|
/**
|
|
364
371
|
* This method allow you to send requests to the Algolia REST API.
|
|
365
372
|
*
|
|
366
|
-
* @summary Send requests to the Algolia REST API.
|
|
367
373
|
* @param customDelete - The customDelete object.
|
|
368
374
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
369
375
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -373,7 +379,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
373
379
|
if (!path) {
|
|
374
380
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
375
381
|
}
|
|
376
|
-
const requestPath = '/
|
|
382
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
377
383
|
const headers = {};
|
|
378
384
|
const queryParameters = parameters ? parameters : {};
|
|
379
385
|
const request = {
|
|
@@ -387,7 +393,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
387
393
|
/**
|
|
388
394
|
* This method allow you to send requests to the Algolia REST API.
|
|
389
395
|
*
|
|
390
|
-
* @summary Send requests to the Algolia REST API.
|
|
391
396
|
* @param customGet - The customGet object.
|
|
392
397
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
393
398
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -397,7 +402,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
397
402
|
if (!path) {
|
|
398
403
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
399
404
|
}
|
|
400
|
-
const requestPath = '/
|
|
405
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
401
406
|
const headers = {};
|
|
402
407
|
const queryParameters = parameters ? parameters : {};
|
|
403
408
|
const request = {
|
|
@@ -411,7 +416,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
411
416
|
/**
|
|
412
417
|
* This method allow you to send requests to the Algolia REST API.
|
|
413
418
|
*
|
|
414
|
-
* @summary Send requests to the Algolia REST API.
|
|
415
419
|
* @param customPost - The customPost object.
|
|
416
420
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
417
421
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -422,7 +426,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
422
426
|
if (!path) {
|
|
423
427
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
424
428
|
}
|
|
425
|
-
const requestPath = '/
|
|
429
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
426
430
|
const headers = {};
|
|
427
431
|
const queryParameters = parameters ? parameters : {};
|
|
428
432
|
const request = {
|
|
@@ -437,7 +441,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
437
441
|
/**
|
|
438
442
|
* This method allow you to send requests to the Algolia REST API.
|
|
439
443
|
*
|
|
440
|
-
* @summary Send requests to the Algolia REST API.
|
|
441
444
|
* @param customPut - The customPut object.
|
|
442
445
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
443
446
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -448,7 +451,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
448
451
|
if (!path) {
|
|
449
452
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
450
453
|
}
|
|
451
|
-
const requestPath = '/
|
|
454
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
452
455
|
const headers = {};
|
|
453
456
|
const queryParameters = parameters ? parameters : {};
|
|
454
457
|
const request = {
|
|
@@ -461,14 +464,56 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
461
464
|
return transporter.request(request, requestOptions);
|
|
462
465
|
},
|
|
463
466
|
/**
|
|
464
|
-
*
|
|
467
|
+
* 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.
|
|
468
|
+
*
|
|
469
|
+
* Required API Key ACLs:
|
|
470
|
+
* - analytics.
|
|
471
|
+
*
|
|
472
|
+
* @param getAddToCartRate - The getAddToCartRate object.
|
|
473
|
+
* @param getAddToCartRate.index - Index name.
|
|
474
|
+
* @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
475
|
+
* @param getAddToCartRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
476
|
+
* @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/).
|
|
477
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
478
|
+
*/
|
|
479
|
+
getAddToCartRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
480
|
+
if (!index) {
|
|
481
|
+
throw new Error('Parameter `index` is required when calling `getAddToCartRate`.');
|
|
482
|
+
}
|
|
483
|
+
const requestPath = '/2/conversions/addToCartRate';
|
|
484
|
+
const headers = {};
|
|
485
|
+
const queryParameters = {};
|
|
486
|
+
if (index !== undefined) {
|
|
487
|
+
queryParameters.index = index.toString();
|
|
488
|
+
}
|
|
489
|
+
if (startDate !== undefined) {
|
|
490
|
+
queryParameters.startDate = startDate.toString();
|
|
491
|
+
}
|
|
492
|
+
if (endDate !== undefined) {
|
|
493
|
+
queryParameters.endDate = endDate.toString();
|
|
494
|
+
}
|
|
495
|
+
if (tags !== undefined) {
|
|
496
|
+
queryParameters.tags = tags.toString();
|
|
497
|
+
}
|
|
498
|
+
const request = {
|
|
499
|
+
method: 'GET',
|
|
500
|
+
path: requestPath,
|
|
501
|
+
queryParameters,
|
|
502
|
+
headers,
|
|
503
|
+
};
|
|
504
|
+
return transporter.request(request, requestOptions);
|
|
505
|
+
},
|
|
506
|
+
/**
|
|
507
|
+
* 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.
|
|
508
|
+
*
|
|
509
|
+
* Required API Key ACLs:
|
|
510
|
+
* - analytics.
|
|
465
511
|
*
|
|
466
|
-
* @summary Get average click position.
|
|
467
512
|
* @param getAverageClickPosition - The getAverageClickPosition object.
|
|
468
|
-
* @param getAverageClickPosition.index - Index name
|
|
469
|
-
* @param getAverageClickPosition.startDate - Start date
|
|
470
|
-
* @param getAverageClickPosition.endDate - End date
|
|
471
|
-
* @param getAverageClickPosition.tags -
|
|
513
|
+
* @param getAverageClickPosition.index - Index name.
|
|
514
|
+
* @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
515
|
+
* @param getAverageClickPosition.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
516
|
+
* @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/).
|
|
472
517
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
473
518
|
*/
|
|
474
519
|
getAverageClickPosition({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -499,14 +544,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
499
544
|
return transporter.request(request, requestOptions);
|
|
500
545
|
},
|
|
501
546
|
/**
|
|
502
|
-
*
|
|
547
|
+
* 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.
|
|
548
|
+
*
|
|
549
|
+
* Required API Key ACLs:
|
|
550
|
+
* - analytics.
|
|
503
551
|
*
|
|
504
|
-
* @summary Get click positions.
|
|
505
552
|
* @param getClickPositions - The getClickPositions object.
|
|
506
|
-
* @param getClickPositions.index - Index name
|
|
507
|
-
* @param getClickPositions.startDate - Start date
|
|
508
|
-
* @param getClickPositions.endDate - End date
|
|
509
|
-
* @param getClickPositions.tags -
|
|
553
|
+
* @param getClickPositions.index - Index name.
|
|
554
|
+
* @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
555
|
+
* @param getClickPositions.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
556
|
+
* @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/).
|
|
510
557
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
511
558
|
*/
|
|
512
559
|
getClickPositions({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -537,14 +584,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
537
584
|
return transporter.request(request, requestOptions);
|
|
538
585
|
},
|
|
539
586
|
/**
|
|
540
|
-
*
|
|
587
|
+
* 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.
|
|
588
|
+
*
|
|
589
|
+
* Required API Key ACLs:
|
|
590
|
+
* - analytics.
|
|
541
591
|
*
|
|
542
|
-
* @summary Get click-through rate (CTR).
|
|
543
592
|
* @param getClickThroughRate - The getClickThroughRate object.
|
|
544
|
-
* @param getClickThroughRate.index - Index name
|
|
545
|
-
* @param getClickThroughRate.startDate - Start date
|
|
546
|
-
* @param getClickThroughRate.endDate - End date
|
|
547
|
-
* @param getClickThroughRate.tags -
|
|
593
|
+
* @param getClickThroughRate.index - Index name.
|
|
594
|
+
* @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
595
|
+
* @param getClickThroughRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
596
|
+
* @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/).
|
|
548
597
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
549
598
|
*/
|
|
550
599
|
getClickThroughRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -575,19 +624,21 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
575
624
|
return transporter.request(request, requestOptions);
|
|
576
625
|
},
|
|
577
626
|
/**
|
|
578
|
-
*
|
|
627
|
+
* 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.
|
|
579
628
|
*
|
|
580
|
-
*
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
-
* @param
|
|
584
|
-
* @param
|
|
585
|
-
* @param
|
|
629
|
+
* Required API Key ACLs:
|
|
630
|
+
* - analytics.
|
|
631
|
+
*
|
|
632
|
+
* @param getConversionRate - The getConversionRate object.
|
|
633
|
+
* @param getConversionRate.index - Index name.
|
|
634
|
+
* @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
635
|
+
* @param getConversionRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
636
|
+
* @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/).
|
|
586
637
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
587
638
|
*/
|
|
588
|
-
|
|
639
|
+
getConversionRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
589
640
|
if (!index) {
|
|
590
|
-
throw new Error('Parameter `index` is required when calling `
|
|
641
|
+
throw new Error('Parameter `index` is required when calling `getConversionRate`.');
|
|
591
642
|
}
|
|
592
643
|
const requestPath = '/2/conversions/conversionRate';
|
|
593
644
|
const headers = {};
|
|
@@ -613,14 +664,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
613
664
|
return transporter.request(request, requestOptions);
|
|
614
665
|
},
|
|
615
666
|
/**
|
|
616
|
-
*
|
|
667
|
+
* 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.
|
|
668
|
+
*
|
|
669
|
+
* Required API Key ACLs:
|
|
670
|
+
* - analytics.
|
|
617
671
|
*
|
|
618
|
-
* @summary Get no click rate.
|
|
619
672
|
* @param getNoClickRate - The getNoClickRate object.
|
|
620
|
-
* @param getNoClickRate.index - Index name
|
|
621
|
-
* @param getNoClickRate.startDate - Start date
|
|
622
|
-
* @param getNoClickRate.endDate - End date
|
|
623
|
-
* @param getNoClickRate.tags -
|
|
673
|
+
* @param getNoClickRate.index - Index name.
|
|
674
|
+
* @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
675
|
+
* @param getNoClickRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
676
|
+
* @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/).
|
|
624
677
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
625
678
|
*/
|
|
626
679
|
getNoClickRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -651,14 +704,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
651
704
|
return transporter.request(request, requestOptions);
|
|
652
705
|
},
|
|
653
706
|
/**
|
|
654
|
-
*
|
|
707
|
+
* 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.
|
|
708
|
+
*
|
|
709
|
+
* Required API Key ACLs:
|
|
710
|
+
* - analytics.
|
|
655
711
|
*
|
|
656
|
-
* @summary Get no results rate.
|
|
657
712
|
* @param getNoResultsRate - The getNoResultsRate object.
|
|
658
|
-
* @param getNoResultsRate.index - Index name
|
|
659
|
-
* @param getNoResultsRate.startDate - Start date
|
|
660
|
-
* @param getNoResultsRate.endDate - End date
|
|
661
|
-
* @param getNoResultsRate.tags -
|
|
713
|
+
* @param getNoResultsRate.index - Index name.
|
|
714
|
+
* @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
715
|
+
* @param getNoResultsRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
716
|
+
* @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/).
|
|
662
717
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
663
718
|
*/
|
|
664
719
|
getNoResultsRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -689,14 +744,96 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
689
744
|
return transporter.request(request, requestOptions);
|
|
690
745
|
},
|
|
691
746
|
/**
|
|
692
|
-
*
|
|
747
|
+
* 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.
|
|
748
|
+
*
|
|
749
|
+
* Required API Key ACLs:
|
|
750
|
+
* - analytics.
|
|
751
|
+
*
|
|
752
|
+
* @param getPurchaseRate - The getPurchaseRate object.
|
|
753
|
+
* @param getPurchaseRate.index - Index name.
|
|
754
|
+
* @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
755
|
+
* @param getPurchaseRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
756
|
+
* @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/).
|
|
757
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
758
|
+
*/
|
|
759
|
+
getPurchaseRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
760
|
+
if (!index) {
|
|
761
|
+
throw new Error('Parameter `index` is required when calling `getPurchaseRate`.');
|
|
762
|
+
}
|
|
763
|
+
const requestPath = '/2/conversions/purchaseRate';
|
|
764
|
+
const headers = {};
|
|
765
|
+
const queryParameters = {};
|
|
766
|
+
if (index !== undefined) {
|
|
767
|
+
queryParameters.index = index.toString();
|
|
768
|
+
}
|
|
769
|
+
if (startDate !== undefined) {
|
|
770
|
+
queryParameters.startDate = startDate.toString();
|
|
771
|
+
}
|
|
772
|
+
if (endDate !== undefined) {
|
|
773
|
+
queryParameters.endDate = endDate.toString();
|
|
774
|
+
}
|
|
775
|
+
if (tags !== undefined) {
|
|
776
|
+
queryParameters.tags = tags.toString();
|
|
777
|
+
}
|
|
778
|
+
const request = {
|
|
779
|
+
method: 'GET',
|
|
780
|
+
path: requestPath,
|
|
781
|
+
queryParameters,
|
|
782
|
+
headers,
|
|
783
|
+
};
|
|
784
|
+
return transporter.request(request, requestOptions);
|
|
785
|
+
},
|
|
786
|
+
/**
|
|
787
|
+
* 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.
|
|
788
|
+
*
|
|
789
|
+
* Required API Key ACLs:
|
|
790
|
+
* - analytics.
|
|
791
|
+
*
|
|
792
|
+
* @param getRevenue - The getRevenue object.
|
|
793
|
+
* @param getRevenue.index - Index name.
|
|
794
|
+
* @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
795
|
+
* @param getRevenue.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
796
|
+
* @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/).
|
|
797
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
798
|
+
*/
|
|
799
|
+
getRevenue({ index, startDate, endDate, tags }, requestOptions) {
|
|
800
|
+
if (!index) {
|
|
801
|
+
throw new Error('Parameter `index` is required when calling `getRevenue`.');
|
|
802
|
+
}
|
|
803
|
+
const requestPath = '/2/conversions/revenue';
|
|
804
|
+
const headers = {};
|
|
805
|
+
const queryParameters = {};
|
|
806
|
+
if (index !== undefined) {
|
|
807
|
+
queryParameters.index = index.toString();
|
|
808
|
+
}
|
|
809
|
+
if (startDate !== undefined) {
|
|
810
|
+
queryParameters.startDate = startDate.toString();
|
|
811
|
+
}
|
|
812
|
+
if (endDate !== undefined) {
|
|
813
|
+
queryParameters.endDate = endDate.toString();
|
|
814
|
+
}
|
|
815
|
+
if (tags !== undefined) {
|
|
816
|
+
queryParameters.tags = tags.toString();
|
|
817
|
+
}
|
|
818
|
+
const request = {
|
|
819
|
+
method: 'GET',
|
|
820
|
+
path: requestPath,
|
|
821
|
+
queryParameters,
|
|
822
|
+
headers,
|
|
823
|
+
};
|
|
824
|
+
return transporter.request(request, requestOptions);
|
|
825
|
+
},
|
|
826
|
+
/**
|
|
827
|
+
* 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.
|
|
828
|
+
*
|
|
829
|
+
* Required API Key ACLs:
|
|
830
|
+
* - analytics.
|
|
693
831
|
*
|
|
694
|
-
* @summary Get number of searches.
|
|
695
832
|
* @param getSearchesCount - The getSearchesCount object.
|
|
696
|
-
* @param getSearchesCount.index - Index name
|
|
697
|
-
* @param getSearchesCount.startDate - Start date
|
|
698
|
-
* @param getSearchesCount.endDate - End date
|
|
699
|
-
* @param getSearchesCount.tags -
|
|
833
|
+
* @param getSearchesCount.index - Index name.
|
|
834
|
+
* @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
835
|
+
* @param getSearchesCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
836
|
+
* @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/).
|
|
700
837
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
701
838
|
*/
|
|
702
839
|
getSearchesCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -727,16 +864,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
727
864
|
return transporter.request(request, requestOptions);
|
|
728
865
|
},
|
|
729
866
|
/**
|
|
730
|
-
*
|
|
867
|
+
* Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
|
|
868
|
+
*
|
|
869
|
+
* Required API Key ACLs:
|
|
870
|
+
* - analytics.
|
|
731
871
|
*
|
|
732
|
-
* @summary Get top searches with no clicks.
|
|
733
872
|
* @param getSearchesNoClicks - The getSearchesNoClicks object.
|
|
734
|
-
* @param getSearchesNoClicks.index - Index name
|
|
735
|
-
* @param getSearchesNoClicks.startDate - Start date
|
|
736
|
-
* @param getSearchesNoClicks.endDate - End date
|
|
737
|
-
* @param getSearchesNoClicks.limit - Number of
|
|
738
|
-
* @param getSearchesNoClicks.offset - Position of the
|
|
739
|
-
* @param getSearchesNoClicks.tags -
|
|
873
|
+
* @param getSearchesNoClicks.index - Index name.
|
|
874
|
+
* @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
875
|
+
* @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
876
|
+
* @param getSearchesNoClicks.limit - Number of items to return.
|
|
877
|
+
* @param getSearchesNoClicks.offset - Position of the first item to return.
|
|
878
|
+
* @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/).
|
|
740
879
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
741
880
|
*/
|
|
742
881
|
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -773,16 +912,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
773
912
|
return transporter.request(request, requestOptions);
|
|
774
913
|
},
|
|
775
914
|
/**
|
|
776
|
-
*
|
|
915
|
+
* Retrieves the most popular searches that didn\'t return any results.
|
|
916
|
+
*
|
|
917
|
+
* Required API Key ACLs:
|
|
918
|
+
* - analytics.
|
|
777
919
|
*
|
|
778
|
-
* @summary Get top searches with no results.
|
|
779
920
|
* @param getSearchesNoResults - The getSearchesNoResults object.
|
|
780
|
-
* @param getSearchesNoResults.index - Index name
|
|
781
|
-
* @param getSearchesNoResults.startDate - Start date
|
|
782
|
-
* @param getSearchesNoResults.endDate - End date
|
|
783
|
-
* @param getSearchesNoResults.limit - Number of
|
|
784
|
-
* @param getSearchesNoResults.offset - Position of the
|
|
785
|
-
* @param getSearchesNoResults.tags -
|
|
921
|
+
* @param getSearchesNoResults.index - Index name.
|
|
922
|
+
* @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
923
|
+
* @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
924
|
+
* @param getSearchesNoResults.limit - Number of items to return.
|
|
925
|
+
* @param getSearchesNoResults.offset - Position of the first item to return.
|
|
926
|
+
* @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/).
|
|
786
927
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
787
928
|
*/
|
|
788
929
|
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -819,11 +960,13 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
819
960
|
return transporter.request(request, requestOptions);
|
|
820
961
|
},
|
|
821
962
|
/**
|
|
822
|
-
*
|
|
963
|
+
* Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
|
|
964
|
+
*
|
|
965
|
+
* Required API Key ACLs:
|
|
966
|
+
* - analytics.
|
|
823
967
|
*
|
|
824
|
-
* @summary Get Analytics API status.
|
|
825
968
|
* @param getStatus - The getStatus object.
|
|
826
|
-
* @param getStatus.index - Index name
|
|
969
|
+
* @param getStatus.index - Index name.
|
|
827
970
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
828
971
|
*/
|
|
829
972
|
getStatus({ index }, requestOptions) {
|
|
@@ -845,16 +988,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
845
988
|
return transporter.request(request, requestOptions);
|
|
846
989
|
},
|
|
847
990
|
/**
|
|
848
|
-
*
|
|
991
|
+
* Retrieves the countries with the most searches to your index.
|
|
992
|
+
*
|
|
993
|
+
* Required API Key ACLs:
|
|
994
|
+
* - analytics.
|
|
849
995
|
*
|
|
850
|
-
* @summary Get top countries.
|
|
851
996
|
* @param getTopCountries - The getTopCountries object.
|
|
852
|
-
* @param getTopCountries.index - Index name
|
|
853
|
-
* @param getTopCountries.startDate - Start date
|
|
854
|
-
* @param getTopCountries.endDate - End date
|
|
855
|
-
* @param getTopCountries.limit - Number of
|
|
856
|
-
* @param getTopCountries.offset - Position of the
|
|
857
|
-
* @param getTopCountries.tags -
|
|
997
|
+
* @param getTopCountries.index - Index name.
|
|
998
|
+
* @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
999
|
+
* @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1000
|
+
* @param getTopCountries.limit - Number of items to return.
|
|
1001
|
+
* @param getTopCountries.offset - Position of the first item to return.
|
|
1002
|
+
* @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/).
|
|
858
1003
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
859
1004
|
*/
|
|
860
1005
|
getTopCountries({ index, startDate, endDate, limit, offset, tags }, requestOptions) {
|
|
@@ -891,17 +1036,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
891
1036
|
return transporter.request(request, requestOptions);
|
|
892
1037
|
},
|
|
893
1038
|
/**
|
|
894
|
-
*
|
|
1039
|
+
* Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1040
|
+
*
|
|
1041
|
+
* Required API Key ACLs:
|
|
1042
|
+
* - analytics.
|
|
895
1043
|
*
|
|
896
|
-
* @summary Get top filterable attributes.
|
|
897
1044
|
* @param getTopFilterAttributes - The getTopFilterAttributes object.
|
|
898
|
-
* @param getTopFilterAttributes.index - Index name
|
|
899
|
-
* @param getTopFilterAttributes.search -
|
|
900
|
-
* @param getTopFilterAttributes.startDate - Start date
|
|
901
|
-
* @param getTopFilterAttributes.endDate - End date
|
|
902
|
-
* @param getTopFilterAttributes.limit - Number of
|
|
903
|
-
* @param getTopFilterAttributes.offset - Position of the
|
|
904
|
-
* @param getTopFilterAttributes.tags -
|
|
1045
|
+
* @param getTopFilterAttributes.index - Index name.
|
|
1046
|
+
* @param getTopFilterAttributes.search - Search query.
|
|
1047
|
+
* @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1048
|
+
* @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1049
|
+
* @param getTopFilterAttributes.limit - Number of items to return.
|
|
1050
|
+
* @param getTopFilterAttributes.offset - Position of the first item to return.
|
|
1051
|
+
* @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/).
|
|
905
1052
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
906
1053
|
*/
|
|
907
1054
|
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -941,18 +1088,20 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
941
1088
|
return transporter.request(request, requestOptions);
|
|
942
1089
|
},
|
|
943
1090
|
/**
|
|
944
|
-
*
|
|
1091
|
+
* Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1092
|
+
*
|
|
1093
|
+
* Required API Key ACLs:
|
|
1094
|
+
* - analytics.
|
|
945
1095
|
*
|
|
946
|
-
* @summary Get top filter values for an attribute.
|
|
947
1096
|
* @param getTopFilterForAttribute - The getTopFilterForAttribute object.
|
|
948
1097
|
* @param getTopFilterForAttribute.attribute - Attribute name.
|
|
949
|
-
* @param getTopFilterForAttribute.index - Index name
|
|
950
|
-
* @param getTopFilterForAttribute.search -
|
|
951
|
-
* @param getTopFilterForAttribute.startDate - Start date
|
|
952
|
-
* @param getTopFilterForAttribute.endDate - End date
|
|
953
|
-
* @param getTopFilterForAttribute.limit - Number of
|
|
954
|
-
* @param getTopFilterForAttribute.offset - Position of the
|
|
955
|
-
* @param getTopFilterForAttribute.tags -
|
|
1098
|
+
* @param getTopFilterForAttribute.index - Index name.
|
|
1099
|
+
* @param getTopFilterForAttribute.search - Search query.
|
|
1100
|
+
* @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1101
|
+
* @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1102
|
+
* @param getTopFilterForAttribute.limit - Number of items to return.
|
|
1103
|
+
* @param getTopFilterForAttribute.offset - Position of the first item to return.
|
|
1104
|
+
* @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/).
|
|
956
1105
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
957
1106
|
*/
|
|
958
1107
|
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -995,17 +1144,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
995
1144
|
return transporter.request(request, requestOptions);
|
|
996
1145
|
},
|
|
997
1146
|
/**
|
|
998
|
-
*
|
|
1147
|
+
* 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.
|
|
1148
|
+
*
|
|
1149
|
+
* Required API Key ACLs:
|
|
1150
|
+
* - analytics.
|
|
999
1151
|
*
|
|
1000
|
-
* @summary Get top filters for a no result search.
|
|
1001
1152
|
* @param getTopFiltersNoResults - The getTopFiltersNoResults object.
|
|
1002
|
-
* @param getTopFiltersNoResults.index - Index name
|
|
1003
|
-
* @param getTopFiltersNoResults.search -
|
|
1004
|
-
* @param getTopFiltersNoResults.startDate - Start date
|
|
1005
|
-
* @param getTopFiltersNoResults.endDate - End date
|
|
1006
|
-
* @param getTopFiltersNoResults.limit - Number of
|
|
1007
|
-
* @param getTopFiltersNoResults.offset - Position of the
|
|
1008
|
-
* @param getTopFiltersNoResults.tags -
|
|
1153
|
+
* @param getTopFiltersNoResults.index - Index name.
|
|
1154
|
+
* @param getTopFiltersNoResults.search - Search query.
|
|
1155
|
+
* @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1156
|
+
* @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1157
|
+
* @param getTopFiltersNoResults.limit - Number of items to return.
|
|
1158
|
+
* @param getTopFiltersNoResults.offset - Position of the first item to return.
|
|
1159
|
+
* @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/).
|
|
1009
1160
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1010
1161
|
*/
|
|
1011
1162
|
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1045,21 +1196,24 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1045
1196
|
return transporter.request(request, requestOptions);
|
|
1046
1197
|
},
|
|
1047
1198
|
/**
|
|
1048
|
-
*
|
|
1199
|
+
* Retrieves the object IDs of the most frequent search results.
|
|
1200
|
+
*
|
|
1201
|
+
* Required API Key ACLs:
|
|
1202
|
+
* - analytics.
|
|
1049
1203
|
*
|
|
1050
|
-
* @summary Get top hits.
|
|
1051
1204
|
* @param getTopHits - The getTopHits object.
|
|
1052
|
-
* @param getTopHits.index - Index name
|
|
1053
|
-
* @param getTopHits.search -
|
|
1054
|
-
* @param getTopHits.clickAnalytics - Whether to include
|
|
1055
|
-
* @param getTopHits.
|
|
1056
|
-
* @param getTopHits.
|
|
1057
|
-
* @param getTopHits.
|
|
1058
|
-
* @param getTopHits.
|
|
1059
|
-
* @param getTopHits.
|
|
1205
|
+
* @param getTopHits.index - Index name.
|
|
1206
|
+
* @param getTopHits.search - Search query.
|
|
1207
|
+
* @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1208
|
+
* @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.
|
|
1209
|
+
* @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1210
|
+
* @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1211
|
+
* @param getTopHits.limit - Number of items to return.
|
|
1212
|
+
* @param getTopHits.offset - Position of the first item to return.
|
|
1213
|
+
* @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/).
|
|
1060
1214
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1061
1215
|
*/
|
|
1062
|
-
getTopHits({ index, search, clickAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
1216
|
+
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
1063
1217
|
if (!index) {
|
|
1064
1218
|
throw new Error('Parameter `index` is required when calling `getTopHits`.');
|
|
1065
1219
|
}
|
|
@@ -1075,6 +1229,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1075
1229
|
if (clickAnalytics !== undefined) {
|
|
1076
1230
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
1077
1231
|
}
|
|
1232
|
+
if (revenueAnalytics !== undefined) {
|
|
1233
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
1234
|
+
}
|
|
1078
1235
|
if (startDate !== undefined) {
|
|
1079
1236
|
queryParameters.startDate = startDate.toString();
|
|
1080
1237
|
}
|
|
@@ -1099,22 +1256,25 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1099
1256
|
return transporter.request(request, requestOptions);
|
|
1100
1257
|
},
|
|
1101
1258
|
/**
|
|
1102
|
-
* Returns the most popular
|
|
1259
|
+
* Returns the most popular search terms.
|
|
1260
|
+
*
|
|
1261
|
+
* Required API Key ACLs:
|
|
1262
|
+
* - analytics.
|
|
1103
1263
|
*
|
|
1104
|
-
* @summary Get top searches.
|
|
1105
1264
|
* @param getTopSearches - The getTopSearches object.
|
|
1106
|
-
* @param getTopSearches.index - Index name
|
|
1107
|
-
* @param getTopSearches.clickAnalytics - Whether to include
|
|
1108
|
-
* @param getTopSearches.
|
|
1109
|
-
* @param getTopSearches.
|
|
1110
|
-
* @param getTopSearches.
|
|
1265
|
+
* @param getTopSearches.index - Index name.
|
|
1266
|
+
* @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1267
|
+
* @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.
|
|
1268
|
+
* @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1269
|
+
* @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1270
|
+
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
1111
1271
|
* @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
|
|
1112
|
-
* @param getTopSearches.limit - Number of
|
|
1113
|
-
* @param getTopSearches.offset - Position of the
|
|
1114
|
-
* @param getTopSearches.tags -
|
|
1272
|
+
* @param getTopSearches.limit - Number of items to return.
|
|
1273
|
+
* @param getTopSearches.offset - Position of the first item to return.
|
|
1274
|
+
* @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/).
|
|
1115
1275
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1116
1276
|
*/
|
|
1117
|
-
getTopSearches({ index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
1277
|
+
getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
1118
1278
|
if (!index) {
|
|
1119
1279
|
throw new Error('Parameter `index` is required when calling `getTopSearches`.');
|
|
1120
1280
|
}
|
|
@@ -1127,6 +1287,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1127
1287
|
if (clickAnalytics !== undefined) {
|
|
1128
1288
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
1129
1289
|
}
|
|
1290
|
+
if (revenueAnalytics !== undefined) {
|
|
1291
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
1292
|
+
}
|
|
1130
1293
|
if (startDate !== undefined) {
|
|
1131
1294
|
queryParameters.startDate = startDate.toString();
|
|
1132
1295
|
}
|
|
@@ -1157,14 +1320,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1157
1320
|
return transporter.request(request, requestOptions);
|
|
1158
1321
|
},
|
|
1159
1322
|
/**
|
|
1160
|
-
*
|
|
1323
|
+
* 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.
|
|
1324
|
+
*
|
|
1325
|
+
* Required API Key ACLs:
|
|
1326
|
+
* - analytics.
|
|
1161
1327
|
*
|
|
1162
|
-
* @summary Get user count.
|
|
1163
1328
|
* @param getUsersCount - The getUsersCount object.
|
|
1164
|
-
* @param getUsersCount.index - Index name
|
|
1165
|
-
* @param getUsersCount.startDate - Start date
|
|
1166
|
-
* @param getUsersCount.endDate - End date
|
|
1167
|
-
* @param getUsersCount.tags -
|
|
1329
|
+
* @param getUsersCount.index - Index name.
|
|
1330
|
+
* @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1331
|
+
* @param getUsersCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1332
|
+
* @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/).
|
|
1168
1333
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1169
1334
|
*/
|
|
1170
1335
|
getUsersCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -1198,9 +1363,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1198
1363
|
}
|
|
1199
1364
|
|
|
1200
1365
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
1201
|
-
const apiClientVersion$
|
|
1366
|
+
const apiClientVersion$3 = '5.0.0-beta.10';
|
|
1202
1367
|
const REGIONS = ['eu', 'us'];
|
|
1203
|
-
function getDefaultHosts$
|
|
1368
|
+
function getDefaultHosts$2(region) {
|
|
1204
1369
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
1205
1370
|
return [{ url, accept: 'readWrite', protocol: 'https' }];
|
|
1206
1371
|
}
|
|
@@ -1208,12 +1373,12 @@ function getDefaultHosts$1(region) {
|
|
|
1208
1373
|
function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
|
|
1209
1374
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
1210
1375
|
const transporter = createTransporter({
|
|
1211
|
-
hosts: getDefaultHosts$
|
|
1376
|
+
hosts: getDefaultHosts$2(regionOption),
|
|
1212
1377
|
...options,
|
|
1213
1378
|
algoliaAgent: getAlgoliaAgent({
|
|
1214
1379
|
algoliaAgents,
|
|
1215
1380
|
client: 'Personalization',
|
|
1216
|
-
version: apiClientVersion$
|
|
1381
|
+
version: apiClientVersion$3,
|
|
1217
1382
|
}),
|
|
1218
1383
|
baseHeaders: {
|
|
1219
1384
|
'content-type': 'text/plain',
|
|
@@ -1258,7 +1423,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1258
1423
|
/**
|
|
1259
1424
|
* This method allow you to send requests to the Algolia REST API.
|
|
1260
1425
|
*
|
|
1261
|
-
* @summary Send requests to the Algolia REST API.
|
|
1262
1426
|
* @param customDelete - The customDelete object.
|
|
1263
1427
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1264
1428
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -1268,7 +1432,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1268
1432
|
if (!path) {
|
|
1269
1433
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
1270
1434
|
}
|
|
1271
|
-
const requestPath = '/
|
|
1435
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1272
1436
|
const headers = {};
|
|
1273
1437
|
const queryParameters = parameters ? parameters : {};
|
|
1274
1438
|
const request = {
|
|
@@ -1282,7 +1446,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1282
1446
|
/**
|
|
1283
1447
|
* This method allow you to send requests to the Algolia REST API.
|
|
1284
1448
|
*
|
|
1285
|
-
* @summary Send requests to the Algolia REST API.
|
|
1286
1449
|
* @param customGet - The customGet object.
|
|
1287
1450
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1288
1451
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -1292,7 +1455,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1292
1455
|
if (!path) {
|
|
1293
1456
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
1294
1457
|
}
|
|
1295
|
-
const requestPath = '/
|
|
1458
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1296
1459
|
const headers = {};
|
|
1297
1460
|
const queryParameters = parameters ? parameters : {};
|
|
1298
1461
|
const request = {
|
|
@@ -1306,7 +1469,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1306
1469
|
/**
|
|
1307
1470
|
* This method allow you to send requests to the Algolia REST API.
|
|
1308
1471
|
*
|
|
1309
|
-
* @summary Send requests to the Algolia REST API.
|
|
1310
1472
|
* @param customPost - The customPost object.
|
|
1311
1473
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1312
1474
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -1317,7 +1479,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1317
1479
|
if (!path) {
|
|
1318
1480
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
1319
1481
|
}
|
|
1320
|
-
const requestPath = '/
|
|
1482
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1321
1483
|
const headers = {};
|
|
1322
1484
|
const queryParameters = parameters ? parameters : {};
|
|
1323
1485
|
const request = {
|
|
@@ -1332,7 +1494,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1332
1494
|
/**
|
|
1333
1495
|
* This method allow you to send requests to the Algolia REST API.
|
|
1334
1496
|
*
|
|
1335
|
-
* @summary Send requests to the Algolia REST API.
|
|
1336
1497
|
* @param customPut - The customPut object.
|
|
1337
1498
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1338
1499
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -1343,7 +1504,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1343
1504
|
if (!path) {
|
|
1344
1505
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
1345
1506
|
}
|
|
1346
|
-
const requestPath = '/
|
|
1507
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1347
1508
|
const headers = {};
|
|
1348
1509
|
const queryParameters = parameters ? parameters : {};
|
|
1349
1510
|
const request = {
|
|
@@ -1356,11 +1517,13 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1356
1517
|
return transporter.request(request, requestOptions);
|
|
1357
1518
|
},
|
|
1358
1519
|
/**
|
|
1359
|
-
*
|
|
1520
|
+
* Deletes a user profile. The response includes a date and time when the user profile can safely be considered deleted.
|
|
1521
|
+
*
|
|
1522
|
+
* Required API Key ACLs:
|
|
1523
|
+
* - recommendation.
|
|
1360
1524
|
*
|
|
1361
|
-
* @summary Delete a user profile.
|
|
1362
1525
|
* @param deleteUserProfile - The deleteUserProfile object.
|
|
1363
|
-
* @param deleteUserProfile.userToken -
|
|
1526
|
+
* @param deleteUserProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.
|
|
1364
1527
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1365
1528
|
*/
|
|
1366
1529
|
deleteUserProfile({ userToken }, requestOptions) {
|
|
@@ -1379,9 +1542,11 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1379
1542
|
return transporter.request(request, requestOptions);
|
|
1380
1543
|
},
|
|
1381
1544
|
/**
|
|
1382
|
-
*
|
|
1545
|
+
* Retrieves the current personalization strategy.
|
|
1546
|
+
*
|
|
1547
|
+
* Required API Key ACLs:
|
|
1548
|
+
* - recommendation.
|
|
1383
1549
|
*
|
|
1384
|
-
* @summary Get the current strategy.
|
|
1385
1550
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1386
1551
|
*/
|
|
1387
1552
|
getPersonalizationStrategy(requestOptions) {
|
|
@@ -1397,11 +1562,13 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1397
1562
|
return transporter.request(request, requestOptions);
|
|
1398
1563
|
},
|
|
1399
1564
|
/**
|
|
1400
|
-
*
|
|
1565
|
+
* Retrieves a user profile and their affinities for different facets.
|
|
1566
|
+
*
|
|
1567
|
+
* Required API Key ACLs:
|
|
1568
|
+
* - recommendation.
|
|
1401
1569
|
*
|
|
1402
|
-
* @summary Get a user profile.
|
|
1403
1570
|
* @param getUserTokenProfile - The getUserTokenProfile object.
|
|
1404
|
-
* @param getUserTokenProfile.userToken -
|
|
1571
|
+
* @param getUserTokenProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.
|
|
1405
1572
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1406
1573
|
*/
|
|
1407
1574
|
getUserTokenProfile({ userToken }, requestOptions) {
|
|
@@ -1420,9 +1587,11 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1420
1587
|
return transporter.request(request, requestOptions);
|
|
1421
1588
|
},
|
|
1422
1589
|
/**
|
|
1423
|
-
*
|
|
1590
|
+
* Creates a new personalization strategy.
|
|
1591
|
+
*
|
|
1592
|
+
* Required API Key ACLs:
|
|
1593
|
+
* - recommendation.
|
|
1424
1594
|
*
|
|
1425
|
-
* @summary Set a new strategy.
|
|
1426
1595
|
* @param personalizationStrategyParams - The personalizationStrategyParams object.
|
|
1427
1596
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1428
1597
|
*/
|
|
@@ -1455,8 +1624,8 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1455
1624
|
}
|
|
1456
1625
|
|
|
1457
1626
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
1458
|
-
const apiClientVersion$
|
|
1459
|
-
function getDefaultHosts(appId) {
|
|
1627
|
+
const apiClientVersion$2 = '5.0.0-beta.10';
|
|
1628
|
+
function getDefaultHosts$1(appId) {
|
|
1460
1629
|
return [
|
|
1461
1630
|
{
|
|
1462
1631
|
url: `${appId}-dsn.algolia.net`,
|
|
@@ -1490,12 +1659,12 @@ function getDefaultHosts(appId) {
|
|
|
1490
1659
|
function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
|
|
1491
1660
|
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
1492
1661
|
const transporter = createTransporter({
|
|
1493
|
-
hosts: getDefaultHosts(appIdOption),
|
|
1662
|
+
hosts: getDefaultHosts$1(appIdOption),
|
|
1494
1663
|
...options,
|
|
1495
1664
|
algoliaAgent: getAlgoliaAgent({
|
|
1496
1665
|
algoliaAgents,
|
|
1497
1666
|
client: 'Search',
|
|
1498
|
-
version: apiClientVersion$
|
|
1667
|
+
version: apiClientVersion$2,
|
|
1499
1668
|
}),
|
|
1500
1669
|
baseHeaders: {
|
|
1501
1670
|
'content-type': 'text/plain',
|
|
@@ -1541,7 +1710,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1541
1710
|
* Helper: Wait for a task to be published (completed) for a given `indexName` and `taskID`.
|
|
1542
1711
|
*
|
|
1543
1712
|
* @summary Helper method that waits for a task to be published (completed).
|
|
1544
|
-
* @param waitForTaskOptions - The waitForTaskOptions object.
|
|
1713
|
+
* @param waitForTaskOptions - The `waitForTaskOptions` object.
|
|
1545
1714
|
* @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.
|
|
1546
1715
|
* @param waitForTaskOptions.taskID - The `taskID` returned in the method response.
|
|
1547
1716
|
* @param waitForTaskOptions.maxRetries - The maximum number of retries. 50 by default.
|
|
@@ -1561,11 +1730,34 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1561
1730
|
timeout: () => timeout(retryCount),
|
|
1562
1731
|
});
|
|
1563
1732
|
},
|
|
1733
|
+
/**
|
|
1734
|
+
* Helper: Wait for an application-level task to complete for a given `taskID`.
|
|
1735
|
+
*
|
|
1736
|
+
* @summary Helper method that waits for a task to be published (completed).
|
|
1737
|
+
* @param waitForAppTaskOptions - The `waitForTaskOptions` object.
|
|
1738
|
+
* @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.
|
|
1739
|
+
* @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 50 by default.
|
|
1740
|
+
* @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.
|
|
1741
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1742
|
+
*/
|
|
1743
|
+
waitForAppTask({ taskID, maxRetries = 50, timeout = (retryCount) => Math.min(retryCount * 200, 5000), }, requestOptions) {
|
|
1744
|
+
let retryCount = 0;
|
|
1745
|
+
return createIterablePromise({
|
|
1746
|
+
func: () => this.getAppTask({ taskID }, requestOptions),
|
|
1747
|
+
validate: (response) => response.status === 'published',
|
|
1748
|
+
aggregator: () => (retryCount += 1),
|
|
1749
|
+
error: {
|
|
1750
|
+
validate: () => retryCount >= maxRetries,
|
|
1751
|
+
message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`,
|
|
1752
|
+
},
|
|
1753
|
+
timeout: () => timeout(retryCount),
|
|
1754
|
+
});
|
|
1755
|
+
},
|
|
1564
1756
|
/**
|
|
1565
1757
|
* Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
|
|
1566
1758
|
*
|
|
1567
1759
|
* @summary Helper method that waits for an API key task to be processed.
|
|
1568
|
-
* @param waitForApiKeyOptions - The waitForApiKeyOptions object.
|
|
1760
|
+
* @param waitForApiKeyOptions - The `waitForApiKeyOptions` object.
|
|
1569
1761
|
* @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.
|
|
1570
1762
|
* @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.
|
|
1571
1763
|
* @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.
|
|
@@ -1618,7 +1810,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1618
1810
|
* Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index.
|
|
1619
1811
|
*
|
|
1620
1812
|
* @summary Helper method that iterates on the `browse` method.
|
|
1621
|
-
* @param browseObjects - The browseObjects object.
|
|
1813
|
+
* @param browseObjects - The `browseObjects` object.
|
|
1622
1814
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
1623
1815
|
* @param browseObjects.browseParams - The `browse` parameters.
|
|
1624
1816
|
* @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.
|
|
@@ -1644,11 +1836,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1644
1836
|
* Helper: Iterate on the `searchRules` method of the client to allow aggregating rules of an index.
|
|
1645
1837
|
*
|
|
1646
1838
|
* @summary Helper method that iterates on the `searchRules` method.
|
|
1647
|
-
* @param
|
|
1648
|
-
* @param
|
|
1649
|
-
* @param
|
|
1650
|
-
* @param
|
|
1651
|
-
* @param
|
|
1839
|
+
* @param browseRules - The `browseRules` object.
|
|
1840
|
+
* @param browseRules.indexName - The index in which to perform the request.
|
|
1841
|
+
* @param browseRules.searchRulesParams - The `searchRules` method parameters.
|
|
1842
|
+
* @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).
|
|
1843
|
+
* @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`.
|
|
1652
1844
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
1653
1845
|
*/
|
|
1654
1846
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
|
|
@@ -1676,11 +1868,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1676
1868
|
* Helper: Iterate on the `searchSynonyms` method of the client to allow aggregating rules of an index.
|
|
1677
1869
|
*
|
|
1678
1870
|
* @summary Helper method that iterates on the `searchSynonyms` method.
|
|
1679
|
-
* @param
|
|
1680
|
-
* @param
|
|
1681
|
-
* @param
|
|
1682
|
-
* @param
|
|
1683
|
-
* @param
|
|
1871
|
+
* @param browseSynonyms - The `browseSynonyms` object.
|
|
1872
|
+
* @param browseSynonyms.indexName - The index in which to perform the request.
|
|
1873
|
+
* @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).
|
|
1874
|
+
* @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`.
|
|
1875
|
+
* @param browseSynonyms.searchSynonymsParams - The `searchSynonyms` method parameters.
|
|
1684
1876
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
1685
1877
|
*/
|
|
1686
1878
|
browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }, requestOptions) {
|
|
@@ -1690,16 +1882,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1690
1882
|
hitsPerPage: 1000,
|
|
1691
1883
|
};
|
|
1692
1884
|
return createIterablePromise({
|
|
1693
|
-
func: (
|
|
1694
|
-
|
|
1885
|
+
func: (_) => {
|
|
1886
|
+
const resp = this.searchSynonyms({
|
|
1695
1887
|
indexName,
|
|
1696
1888
|
searchSynonymsParams: {
|
|
1697
1889
|
...params,
|
|
1698
|
-
page:
|
|
1699
|
-
? previousResponse.page + 1
|
|
1700
|
-
: params.page,
|
|
1890
|
+
page: params.page,
|
|
1701
1891
|
},
|
|
1702
1892
|
}, requestOptions);
|
|
1893
|
+
params.page += 1;
|
|
1894
|
+
return resp;
|
|
1703
1895
|
},
|
|
1704
1896
|
validate: (response) => response.nbHits < params.hitsPerPage,
|
|
1705
1897
|
...browseSynonymsOptions,
|
|
@@ -1728,9 +1920,137 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1728
1920
|
return this.search(searchMethodParams, requestOptions);
|
|
1729
1921
|
},
|
|
1730
1922
|
/**
|
|
1731
|
-
*
|
|
1923
|
+
* Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
|
|
1924
|
+
*
|
|
1925
|
+
* @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
|
|
1926
|
+
* @param chunkedBatch - The `chunkedBatch` object.
|
|
1927
|
+
* @param chunkedBatch.indexName - The `indexName` to replace `objects` in.
|
|
1928
|
+
* @param chunkedBatch.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
1929
|
+
* @param chunkedBatch.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
|
|
1930
|
+
* @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.
|
|
1931
|
+
* @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.
|
|
1932
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1933
|
+
*/
|
|
1934
|
+
async chunkedBatch({ indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000, }, requestOptions) {
|
|
1935
|
+
let requests = [];
|
|
1936
|
+
const responses = [];
|
|
1937
|
+
const objectEntries = objects.entries();
|
|
1938
|
+
for (const [i, obj] of objectEntries) {
|
|
1939
|
+
requests.push({ action, body: obj });
|
|
1940
|
+
if (requests.length === batchSize || i === objects.length - 1) {
|
|
1941
|
+
responses.push(await this.batch({ indexName, batchWriteParams: { requests } }, requestOptions));
|
|
1942
|
+
requests = [];
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
if (waitForTasks) {
|
|
1946
|
+
for (const resp of responses) {
|
|
1947
|
+
await this.waitForTask({ indexName, taskID: resp.taskID });
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
return responses;
|
|
1951
|
+
},
|
|
1952
|
+
/**
|
|
1953
|
+
* 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.
|
|
1954
|
+
*
|
|
1955
|
+
* @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.
|
|
1956
|
+
* @param saveObjects - The `saveObjects` object.
|
|
1957
|
+
* @param saveObjects.indexName - The `indexName` to save `objects` in.
|
|
1958
|
+
* @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
1959
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
1960
|
+
*/
|
|
1961
|
+
async saveObjects({ indexName, objects }, requestOptions) {
|
|
1962
|
+
return await this.chunkedBatch({ indexName, objects, action: 'addObject' }, requestOptions);
|
|
1963
|
+
},
|
|
1964
|
+
/**
|
|
1965
|
+
* 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.
|
|
1966
|
+
*
|
|
1967
|
+
* @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.
|
|
1968
|
+
* @param deleteObjects - The `deleteObjects` object.
|
|
1969
|
+
* @param deleteObjects.indexName - The `indexName` to delete `objectIDs` from.
|
|
1970
|
+
* @param deleteObjects.objectIDs - The objectIDs to delete.
|
|
1971
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
1972
|
+
*/
|
|
1973
|
+
async deleteObjects({ indexName, objectIDs }, requestOptions) {
|
|
1974
|
+
return await this.chunkedBatch({
|
|
1975
|
+
indexName,
|
|
1976
|
+
objects: objectIDs.map((objectID) => ({ objectID })),
|
|
1977
|
+
action: 'deleteObject',
|
|
1978
|
+
}, requestOptions);
|
|
1979
|
+
},
|
|
1980
|
+
/**
|
|
1981
|
+
* 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.
|
|
1982
|
+
*
|
|
1983
|
+
* @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.
|
|
1984
|
+
* @param partialUpdateObjects - The `partialUpdateObjects` object.
|
|
1985
|
+
* @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.
|
|
1986
|
+
* @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.
|
|
1987
|
+
* @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail..
|
|
1988
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1989
|
+
*/
|
|
1990
|
+
async partialUpdateObjects({ indexName, objects, createIfNotExists }, requestOptions) {
|
|
1991
|
+
return await this.chunkedBatch({
|
|
1992
|
+
indexName,
|
|
1993
|
+
objects,
|
|
1994
|
+
action: createIfNotExists
|
|
1995
|
+
? 'partialUpdateObject'
|
|
1996
|
+
: 'partialUpdateObjectNoCreate',
|
|
1997
|
+
}, requestOptions);
|
|
1998
|
+
},
|
|
1999
|
+
/**
|
|
2000
|
+
* 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.
|
|
2001
|
+
* See https://api-clients-automation.netlify.app/docs/contributing/add-new-api-client#5-helpers for implementation details.
|
|
2002
|
+
*
|
|
2003
|
+
* @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.
|
|
2004
|
+
* @param replaceAllObjects - The `replaceAllObjects` object.
|
|
2005
|
+
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
2006
|
+
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
2007
|
+
* @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.
|
|
2008
|
+
* @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.
|
|
2009
|
+
*/
|
|
2010
|
+
async replaceAllObjects({ indexName, objects, batchSize }, requestOptions) {
|
|
2011
|
+
const randomSuffix = Math.floor(Math.random() * 1000000) + 100000;
|
|
2012
|
+
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
2013
|
+
let copyOperationResponse = await this.operationIndex({
|
|
2014
|
+
indexName,
|
|
2015
|
+
operationIndexParams: {
|
|
2016
|
+
operation: 'copy',
|
|
2017
|
+
destination: tmpIndexName,
|
|
2018
|
+
scope: ['settings', 'rules', 'synonyms'],
|
|
2019
|
+
},
|
|
2020
|
+
}, requestOptions);
|
|
2021
|
+
const batchResponses = await this.chunkedBatch({ indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, requestOptions);
|
|
2022
|
+
await this.waitForTask({
|
|
2023
|
+
indexName: tmpIndexName,
|
|
2024
|
+
taskID: copyOperationResponse.taskID,
|
|
2025
|
+
});
|
|
2026
|
+
copyOperationResponse = await this.operationIndex({
|
|
2027
|
+
indexName,
|
|
2028
|
+
operationIndexParams: {
|
|
2029
|
+
operation: 'copy',
|
|
2030
|
+
destination: tmpIndexName,
|
|
2031
|
+
scope: ['settings', 'rules', 'synonyms'],
|
|
2032
|
+
},
|
|
2033
|
+
}, requestOptions);
|
|
2034
|
+
await this.waitForTask({
|
|
2035
|
+
indexName: tmpIndexName,
|
|
2036
|
+
taskID: copyOperationResponse.taskID,
|
|
2037
|
+
});
|
|
2038
|
+
const moveOperationResponse = await this.operationIndex({
|
|
2039
|
+
indexName: tmpIndexName,
|
|
2040
|
+
operationIndexParams: { operation: 'move', destination: indexName },
|
|
2041
|
+
}, requestOptions);
|
|
2042
|
+
await this.waitForTask({
|
|
2043
|
+
indexName: tmpIndexName,
|
|
2044
|
+
taskID: moveOperationResponse.taskID,
|
|
2045
|
+
});
|
|
2046
|
+
return { copyOperationResponse, batchResponses, moveOperationResponse };
|
|
2047
|
+
},
|
|
2048
|
+
/**
|
|
2049
|
+
* Creates a new API key with specific permissions and restrictions.
|
|
2050
|
+
*
|
|
2051
|
+
* Required API Key ACLs:
|
|
2052
|
+
* - admin.
|
|
1732
2053
|
*
|
|
1733
|
-
* @summary Add API key.
|
|
1734
2054
|
* @param apiKey - The apiKey object.
|
|
1735
2055
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1736
2056
|
*/
|
|
@@ -1754,13 +2074,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1754
2074
|
return transporter.request(request, requestOptions);
|
|
1755
2075
|
},
|
|
1756
2076
|
/**
|
|
1757
|
-
* If
|
|
2077
|
+
* 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).
|
|
2078
|
+
*
|
|
2079
|
+
* Required API Key ACLs:
|
|
2080
|
+
* - addObject.
|
|
1758
2081
|
*
|
|
1759
|
-
* @summary Add or update a record (using objectID).
|
|
1760
2082
|
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
1761
|
-
* @param addOrUpdateObject.indexName -
|
|
1762
|
-
* @param addOrUpdateObject.objectID - Unique record
|
|
1763
|
-
* @param addOrUpdateObject.body -
|
|
2083
|
+
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
2084
|
+
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
2085
|
+
* @param addOrUpdateObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
|
|
1764
2086
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1765
2087
|
*/
|
|
1766
2088
|
addOrUpdateObject({ indexName, objectID, body }, requestOptions) {
|
|
@@ -1788,9 +2110,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1788
2110
|
return transporter.request(request, requestOptions);
|
|
1789
2111
|
},
|
|
1790
2112
|
/**
|
|
1791
|
-
*
|
|
2113
|
+
* Adds a source to the list of allowed sources.
|
|
2114
|
+
*
|
|
2115
|
+
* Required API Key ACLs:
|
|
2116
|
+
* - admin.
|
|
1792
2117
|
*
|
|
1793
|
-
* @summary Add a source.
|
|
1794
2118
|
* @param source - Source to add.
|
|
1795
2119
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1796
2120
|
*/
|
|
@@ -1814,11 +2138,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1814
2138
|
return transporter.request(request, requestOptions);
|
|
1815
2139
|
},
|
|
1816
2140
|
/**
|
|
1817
|
-
*
|
|
2141
|
+
* 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.
|
|
2142
|
+
*
|
|
2143
|
+
* Required API Key ACLs:
|
|
2144
|
+
* - admin.
|
|
1818
2145
|
*
|
|
1819
|
-
* @summary Assign or move a user ID.
|
|
1820
2146
|
* @param assignUserId - The assignUserId object.
|
|
1821
|
-
* @param assignUserId.xAlgoliaUserID -
|
|
2147
|
+
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
1822
2148
|
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
1823
2149
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1824
2150
|
*/
|
|
@@ -1848,11 +2174,10 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1848
2174
|
return transporter.request(request, requestOptions);
|
|
1849
2175
|
},
|
|
1850
2176
|
/**
|
|
1851
|
-
*
|
|
2177
|
+
* 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.
|
|
1852
2178
|
*
|
|
1853
|
-
* @summary Batch write operations on one index.
|
|
1854
2179
|
* @param batch - The batch object.
|
|
1855
|
-
* @param batch.indexName -
|
|
2180
|
+
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
1856
2181
|
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
1857
2182
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1858
2183
|
*/
|
|
@@ -1879,11 +2204,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1879
2204
|
return transporter.request(request, requestOptions);
|
|
1880
2205
|
},
|
|
1881
2206
|
/**
|
|
1882
|
-
*
|
|
2207
|
+
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
2208
|
+
*
|
|
2209
|
+
* Required API Key ACLs:
|
|
2210
|
+
* - admin.
|
|
1883
2211
|
*
|
|
1884
|
-
* @summary Batch assign userIDs.
|
|
1885
2212
|
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
1886
|
-
* @param batchAssignUserIds.xAlgoliaUserID -
|
|
2213
|
+
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
1887
2214
|
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
1888
2215
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1889
2216
|
*/
|
|
@@ -1916,11 +2243,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1916
2243
|
return transporter.request(request, requestOptions);
|
|
1917
2244
|
},
|
|
1918
2245
|
/**
|
|
1919
|
-
*
|
|
2246
|
+
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
2247
|
+
*
|
|
2248
|
+
* Required API Key ACLs:
|
|
2249
|
+
* - editSettings.
|
|
1920
2250
|
*
|
|
1921
|
-
* @summary Batch dictionary entries.
|
|
1922
2251
|
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
1923
|
-
* @param batchDictionaryEntries.dictionaryName - Dictionary to search
|
|
2252
|
+
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
1924
2253
|
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
1925
2254
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1926
2255
|
*/
|
|
@@ -1947,11 +2276,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1947
2276
|
return transporter.request(request, requestOptions);
|
|
1948
2277
|
},
|
|
1949
2278
|
/**
|
|
1950
|
-
*
|
|
2279
|
+
* 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.
|
|
2280
|
+
*
|
|
2281
|
+
* Required API Key ACLs:
|
|
2282
|
+
* - browse.
|
|
1951
2283
|
*
|
|
1952
|
-
* @summary Get all records from an index.
|
|
1953
2284
|
* @param browse - The browse object.
|
|
1954
|
-
* @param browse.indexName -
|
|
2285
|
+
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
1955
2286
|
* @param browse.browseParams - The browseParams object.
|
|
1956
2287
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1957
2288
|
*/
|
|
@@ -1972,11 +2303,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1972
2303
|
return transporter.request(request, requestOptions);
|
|
1973
2304
|
},
|
|
1974
2305
|
/**
|
|
1975
|
-
*
|
|
2306
|
+
* Deletes only the records from an index while keeping settings, synonyms, and rules.
|
|
2307
|
+
*
|
|
2308
|
+
* Required API Key ACLs:
|
|
2309
|
+
* - deleteIndex.
|
|
1976
2310
|
*
|
|
1977
|
-
* @summary Delete all records from an index.
|
|
1978
2311
|
* @param clearObjects - The clearObjects object.
|
|
1979
|
-
* @param clearObjects.indexName -
|
|
2312
|
+
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
1980
2313
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1981
2314
|
*/
|
|
1982
2315
|
clearObjects({ indexName }, requestOptions) {
|
|
@@ -1995,12 +2328,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1995
2328
|
return transporter.request(request, requestOptions);
|
|
1996
2329
|
},
|
|
1997
2330
|
/**
|
|
1998
|
-
*
|
|
2331
|
+
* Deletes all rules from the index.
|
|
2332
|
+
*
|
|
2333
|
+
* Required API Key ACLs:
|
|
2334
|
+
* - editSettings.
|
|
1999
2335
|
*
|
|
2000
|
-
* @summary Delete all rules.
|
|
2001
2336
|
* @param clearRules - The clearRules object.
|
|
2002
|
-
* @param clearRules.indexName -
|
|
2003
|
-
* @param clearRules.forwardToReplicas -
|
|
2337
|
+
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
2338
|
+
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2004
2339
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2005
2340
|
*/
|
|
2006
2341
|
clearRules({ indexName, forwardToReplicas }, requestOptions) {
|
|
@@ -2022,12 +2357,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2022
2357
|
return transporter.request(request, requestOptions);
|
|
2023
2358
|
},
|
|
2024
2359
|
/**
|
|
2025
|
-
*
|
|
2360
|
+
* Deletes all synonyms from the index.
|
|
2361
|
+
*
|
|
2362
|
+
* Required API Key ACLs:
|
|
2363
|
+
* - editSettings.
|
|
2026
2364
|
*
|
|
2027
|
-
* @summary Delete all synonyms.
|
|
2028
2365
|
* @param clearSynonyms - The clearSynonyms object.
|
|
2029
|
-
* @param clearSynonyms.indexName -
|
|
2030
|
-
* @param clearSynonyms.forwardToReplicas -
|
|
2366
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
2367
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2031
2368
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2032
2369
|
*/
|
|
2033
2370
|
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
@@ -2051,7 +2388,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2051
2388
|
/**
|
|
2052
2389
|
* This method allow you to send requests to the Algolia REST API.
|
|
2053
2390
|
*
|
|
2054
|
-
* @summary Send requests to the Algolia REST API.
|
|
2055
2391
|
* @param customDelete - The customDelete object.
|
|
2056
2392
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2057
2393
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -2061,7 +2397,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2061
2397
|
if (!path) {
|
|
2062
2398
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
2063
2399
|
}
|
|
2064
|
-
const requestPath = '/
|
|
2400
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2065
2401
|
const headers = {};
|
|
2066
2402
|
const queryParameters = parameters ? parameters : {};
|
|
2067
2403
|
const request = {
|
|
@@ -2075,7 +2411,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2075
2411
|
/**
|
|
2076
2412
|
* This method allow you to send requests to the Algolia REST API.
|
|
2077
2413
|
*
|
|
2078
|
-
* @summary Send requests to the Algolia REST API.
|
|
2079
2414
|
* @param customGet - The customGet object.
|
|
2080
2415
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2081
2416
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -2085,7 +2420,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2085
2420
|
if (!path) {
|
|
2086
2421
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
2087
2422
|
}
|
|
2088
|
-
const requestPath = '/
|
|
2423
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2089
2424
|
const headers = {};
|
|
2090
2425
|
const queryParameters = parameters ? parameters : {};
|
|
2091
2426
|
const request = {
|
|
@@ -2099,7 +2434,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2099
2434
|
/**
|
|
2100
2435
|
* This method allow you to send requests to the Algolia REST API.
|
|
2101
2436
|
*
|
|
2102
|
-
* @summary Send requests to the Algolia REST API.
|
|
2103
2437
|
* @param customPost - The customPost object.
|
|
2104
2438
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2105
2439
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -2110,7 +2444,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2110
2444
|
if (!path) {
|
|
2111
2445
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
2112
2446
|
}
|
|
2113
|
-
const requestPath = '/
|
|
2447
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2114
2448
|
const headers = {};
|
|
2115
2449
|
const queryParameters = parameters ? parameters : {};
|
|
2116
2450
|
const request = {
|
|
@@ -2125,7 +2459,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2125
2459
|
/**
|
|
2126
2460
|
* This method allow you to send requests to the Algolia REST API.
|
|
2127
2461
|
*
|
|
2128
|
-
* @summary Send requests to the Algolia REST API.
|
|
2129
2462
|
* @param customPut - The customPut object.
|
|
2130
2463
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2131
2464
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -2136,7 +2469,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2136
2469
|
if (!path) {
|
|
2137
2470
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
2138
2471
|
}
|
|
2139
|
-
const requestPath = '/
|
|
2472
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2140
2473
|
const headers = {};
|
|
2141
2474
|
const queryParameters = parameters ? parameters : {};
|
|
2142
2475
|
const request = {
|
|
@@ -2149,9 +2482,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2149
2482
|
return transporter.request(request, requestOptions);
|
|
2150
2483
|
},
|
|
2151
2484
|
/**
|
|
2152
|
-
*
|
|
2485
|
+
* Deletes the API key.
|
|
2486
|
+
*
|
|
2487
|
+
* Required API Key ACLs:
|
|
2488
|
+
* - admin.
|
|
2153
2489
|
*
|
|
2154
|
-
* @summary Delete API key.
|
|
2155
2490
|
* @param deleteApiKey - The deleteApiKey object.
|
|
2156
2491
|
* @param deleteApiKey.key - API key.
|
|
2157
2492
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2172,11 +2507,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2172
2507
|
return transporter.request(request, requestOptions);
|
|
2173
2508
|
},
|
|
2174
2509
|
/**
|
|
2175
|
-
* This operation doesn\'t
|
|
2510
|
+
* 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).
|
|
2511
|
+
*
|
|
2512
|
+
* Required API Key ACLs:
|
|
2513
|
+
* - deleteIndex.
|
|
2176
2514
|
*
|
|
2177
|
-
* @summary Delete all records matching a query.
|
|
2178
2515
|
* @param deleteBy - The deleteBy object.
|
|
2179
|
-
* @param deleteBy.indexName -
|
|
2516
|
+
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
2180
2517
|
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
2181
2518
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2182
2519
|
*/
|
|
@@ -2200,11 +2537,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2200
2537
|
return transporter.request(request, requestOptions);
|
|
2201
2538
|
},
|
|
2202
2539
|
/**
|
|
2203
|
-
*
|
|
2540
|
+
* 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/).
|
|
2541
|
+
*
|
|
2542
|
+
* Required API Key ACLs:
|
|
2543
|
+
* - deleteIndex.
|
|
2204
2544
|
*
|
|
2205
|
-
* @summary Delete index.
|
|
2206
2545
|
* @param deleteIndex - The deleteIndex object.
|
|
2207
|
-
* @param deleteIndex.indexName -
|
|
2546
|
+
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
2208
2547
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2209
2548
|
*/
|
|
2210
2549
|
deleteIndex({ indexName }, requestOptions) {
|
|
@@ -2223,12 +2562,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2223
2562
|
return transporter.request(request, requestOptions);
|
|
2224
2563
|
},
|
|
2225
2564
|
/**
|
|
2226
|
-
* To delete
|
|
2565
|
+
* 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).
|
|
2566
|
+
*
|
|
2567
|
+
* Required API Key ACLs:
|
|
2568
|
+
* - deleteObject.
|
|
2227
2569
|
*
|
|
2228
|
-
* @summary Delete a record.
|
|
2229
2570
|
* @param deleteObject - The deleteObject object.
|
|
2230
|
-
* @param deleteObject.indexName -
|
|
2231
|
-
* @param deleteObject.objectID - Unique record
|
|
2571
|
+
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
2572
|
+
* @param deleteObject.objectID - Unique record identifier.
|
|
2232
2573
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2233
2574
|
*/
|
|
2234
2575
|
deleteObject({ indexName, objectID }, requestOptions) {
|
|
@@ -2252,13 +2593,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2252
2593
|
return transporter.request(request, requestOptions);
|
|
2253
2594
|
},
|
|
2254
2595
|
/**
|
|
2255
|
-
*
|
|
2596
|
+
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
2597
|
+
*
|
|
2598
|
+
* Required API Key ACLs:
|
|
2599
|
+
* - editSettings.
|
|
2256
2600
|
*
|
|
2257
|
-
* @summary Delete a rule.
|
|
2258
2601
|
* @param deleteRule - The deleteRule object.
|
|
2259
|
-
* @param deleteRule.indexName -
|
|
2602
|
+
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
2260
2603
|
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
2261
|
-
* @param deleteRule.forwardToReplicas -
|
|
2604
|
+
* @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2262
2605
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2263
2606
|
*/
|
|
2264
2607
|
deleteRule({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
@@ -2285,9 +2628,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2285
2628
|
return transporter.request(request, requestOptions);
|
|
2286
2629
|
},
|
|
2287
2630
|
/**
|
|
2288
|
-
*
|
|
2631
|
+
* Deletes a source from the list of allowed sources.
|
|
2632
|
+
*
|
|
2633
|
+
* Required API Key ACLs:
|
|
2634
|
+
* - admin.
|
|
2289
2635
|
*
|
|
2290
|
-
* @summary Remove a source.
|
|
2291
2636
|
* @param deleteSource - The deleteSource object.
|
|
2292
2637
|
* @param deleteSource.source - IP address range of the source.
|
|
2293
2638
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2308,13 +2653,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2308
2653
|
return transporter.request(request, requestOptions);
|
|
2309
2654
|
},
|
|
2310
2655
|
/**
|
|
2311
|
-
*
|
|
2656
|
+
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
2657
|
+
*
|
|
2658
|
+
* Required API Key ACLs:
|
|
2659
|
+
* - editSettings.
|
|
2312
2660
|
*
|
|
2313
|
-
* @summary Delete a synonym.
|
|
2314
2661
|
* @param deleteSynonym - The deleteSynonym object.
|
|
2315
|
-
* @param deleteSynonym.indexName -
|
|
2662
|
+
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
2316
2663
|
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
2317
|
-
* @param deleteSynonym.forwardToReplicas -
|
|
2664
|
+
* @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2318
2665
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2319
2666
|
*/
|
|
2320
2667
|
deleteSynonym({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
@@ -2341,9 +2688,8 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2341
2688
|
return transporter.request(request, requestOptions);
|
|
2342
2689
|
},
|
|
2343
2690
|
/**
|
|
2344
|
-
*
|
|
2691
|
+
* 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.
|
|
2345
2692
|
*
|
|
2346
|
-
* @summary Get API key permissions.
|
|
2347
2693
|
* @param getApiKey - The getApiKey object.
|
|
2348
2694
|
* @param getApiKey.key - API key.
|
|
2349
2695
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2364,9 +2710,36 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2364
2710
|
return transporter.request(request, requestOptions);
|
|
2365
2711
|
},
|
|
2366
2712
|
/**
|
|
2367
|
-
*
|
|
2713
|
+
* Checks the status of a given application task.
|
|
2714
|
+
*
|
|
2715
|
+
* Required API Key ACLs:
|
|
2716
|
+
* - editSettings.
|
|
2717
|
+
*
|
|
2718
|
+
* @param getAppTask - The getAppTask object.
|
|
2719
|
+
* @param getAppTask.taskID - Unique task identifier.
|
|
2720
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2721
|
+
*/
|
|
2722
|
+
getAppTask({ taskID }, requestOptions) {
|
|
2723
|
+
if (!taskID) {
|
|
2724
|
+
throw new Error('Parameter `taskID` is required when calling `getAppTask`.');
|
|
2725
|
+
}
|
|
2726
|
+
const requestPath = '/1/task/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
2727
|
+
const headers = {};
|
|
2728
|
+
const queryParameters = {};
|
|
2729
|
+
const request = {
|
|
2730
|
+
method: 'GET',
|
|
2731
|
+
path: requestPath,
|
|
2732
|
+
queryParameters,
|
|
2733
|
+
headers,
|
|
2734
|
+
};
|
|
2735
|
+
return transporter.request(request, requestOptions);
|
|
2736
|
+
},
|
|
2737
|
+
/**
|
|
2738
|
+
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
2739
|
+
*
|
|
2740
|
+
* Required API Key ACLs:
|
|
2741
|
+
* - settings.
|
|
2368
2742
|
*
|
|
2369
|
-
* @summary List available languages.
|
|
2370
2743
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2371
2744
|
*/
|
|
2372
2745
|
getDictionaryLanguages(requestOptions) {
|
|
@@ -2382,9 +2755,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2382
2755
|
return transporter.request(request, requestOptions);
|
|
2383
2756
|
},
|
|
2384
2757
|
/**
|
|
2385
|
-
*
|
|
2758
|
+
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
2759
|
+
*
|
|
2760
|
+
* Required API Key ACLs:
|
|
2761
|
+
* - settings.
|
|
2386
2762
|
*
|
|
2387
|
-
* @summary Get stop word settings.
|
|
2388
2763
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2389
2764
|
*/
|
|
2390
2765
|
getDictionarySettings(requestOptions) {
|
|
@@ -2400,14 +2775,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2400
2775
|
return transporter.request(request, requestOptions);
|
|
2401
2776
|
},
|
|
2402
2777
|
/**
|
|
2403
|
-
* 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.
|
|
2778
|
+
* 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.
|
|
2779
|
+
*
|
|
2780
|
+
* Required API Key ACLs:
|
|
2781
|
+
* - logs.
|
|
2404
2782
|
*
|
|
2405
|
-
* @summary Return the latest log entries.
|
|
2406
2783
|
* @param getLogs - The getLogs object.
|
|
2407
|
-
* @param getLogs.offset - First log entry to retrieve.
|
|
2784
|
+
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
2408
2785
|
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
2409
|
-
* @param getLogs.indexName - Index for which log entries
|
|
2410
|
-
* @param getLogs.type - Type of log entries to retrieve.
|
|
2786
|
+
* @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
|
|
2787
|
+
* @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
|
|
2411
2788
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2412
2789
|
*/
|
|
2413
2790
|
getLogs({ offset, length, indexName, type } = {}, requestOptions = undefined) {
|
|
@@ -2435,13 +2812,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2435
2812
|
return transporter.request(request, requestOptions);
|
|
2436
2813
|
},
|
|
2437
2814
|
/**
|
|
2438
|
-
* To
|
|
2815
|
+
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
|
2816
|
+
*
|
|
2817
|
+
* Required API Key ACLs:
|
|
2818
|
+
* - search.
|
|
2439
2819
|
*
|
|
2440
|
-
* @summary Get a record.
|
|
2441
2820
|
* @param getObject - The getObject object.
|
|
2442
|
-
* @param getObject.indexName -
|
|
2443
|
-
* @param getObject.objectID - Unique record
|
|
2444
|
-
* @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.
|
|
2821
|
+
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
2822
|
+
* @param getObject.objectID - Unique record identifier.
|
|
2823
|
+
* @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.
|
|
2445
2824
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2446
2825
|
*/
|
|
2447
2826
|
getObject({ indexName, objectID, attributesToRetrieve }, requestOptions) {
|
|
@@ -2468,9 +2847,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2468
2847
|
return transporter.request(request, requestOptions);
|
|
2469
2848
|
},
|
|
2470
2849
|
/**
|
|
2471
|
-
*
|
|
2850
|
+
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
2851
|
+
*
|
|
2852
|
+
* Required API Key ACLs:
|
|
2853
|
+
* - search.
|
|
2472
2854
|
*
|
|
2473
|
-
* @summary Get multiple records.
|
|
2474
2855
|
* @param getObjectsParams - Request object.
|
|
2475
2856
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2476
2857
|
*/
|
|
@@ -2496,11 +2877,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2496
2877
|
return transporter.request(request, requestOptions);
|
|
2497
2878
|
},
|
|
2498
2879
|
/**
|
|
2499
|
-
*
|
|
2880
|
+
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
2881
|
+
*
|
|
2882
|
+
* Required API Key ACLs:
|
|
2883
|
+
* - settings.
|
|
2500
2884
|
*
|
|
2501
|
-
* @summary Get a rule.
|
|
2502
2885
|
* @param getRule - The getRule object.
|
|
2503
|
-
* @param getRule.indexName -
|
|
2886
|
+
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
2504
2887
|
* @param getRule.objectID - Unique identifier of a rule object.
|
|
2505
2888
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2506
2889
|
*/
|
|
@@ -2525,11 +2908,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2525
2908
|
return transporter.request(request, requestOptions);
|
|
2526
2909
|
},
|
|
2527
2910
|
/**
|
|
2528
|
-
*
|
|
2911
|
+
* Retrieves an object with non-null index settings.
|
|
2912
|
+
*
|
|
2913
|
+
* Required API Key ACLs:
|
|
2914
|
+
* - search.
|
|
2529
2915
|
*
|
|
2530
|
-
* @summary Get index settings.
|
|
2531
2916
|
* @param getSettings - The getSettings object.
|
|
2532
|
-
* @param getSettings.indexName -
|
|
2917
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2533
2918
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2534
2919
|
*/
|
|
2535
2920
|
getSettings({ indexName }, requestOptions) {
|
|
@@ -2548,9 +2933,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2548
2933
|
return transporter.request(request, requestOptions);
|
|
2549
2934
|
},
|
|
2550
2935
|
/**
|
|
2551
|
-
*
|
|
2936
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2937
|
+
*
|
|
2938
|
+
* Required API Key ACLs:
|
|
2939
|
+
* - admin.
|
|
2552
2940
|
*
|
|
2553
|
-
* @summary Get all allowed IP addresses.
|
|
2554
2941
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2555
2942
|
*/
|
|
2556
2943
|
getSources(requestOptions) {
|
|
@@ -2566,11 +2953,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2566
2953
|
return transporter.request(request, requestOptions);
|
|
2567
2954
|
},
|
|
2568
2955
|
/**
|
|
2569
|
-
*
|
|
2956
|
+
* Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
2957
|
+
*
|
|
2958
|
+
* Required API Key ACLs:
|
|
2959
|
+
* - settings.
|
|
2570
2960
|
*
|
|
2571
|
-
* @summary Get a synonym object.
|
|
2572
2961
|
* @param getSynonym - The getSynonym object.
|
|
2573
|
-
* @param getSynonym.indexName -
|
|
2962
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2574
2963
|
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2575
2964
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2576
2965
|
*/
|
|
@@ -2595,11 +2984,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2595
2984
|
return transporter.request(request, requestOptions);
|
|
2596
2985
|
},
|
|
2597
2986
|
/**
|
|
2598
|
-
*
|
|
2987
|
+
* 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.
|
|
2988
|
+
*
|
|
2989
|
+
* Required API Key ACLs:
|
|
2990
|
+
* - addObject.
|
|
2599
2991
|
*
|
|
2600
|
-
* @summary Check a task\'s status.
|
|
2601
2992
|
* @param getTask - The getTask object.
|
|
2602
|
-
* @param getTask.indexName -
|
|
2993
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2603
2994
|
* @param getTask.taskID - Unique task identifier.
|
|
2604
2995
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2605
2996
|
*/
|
|
@@ -2624,9 +3015,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2624
3015
|
return transporter.request(request, requestOptions);
|
|
2625
3016
|
},
|
|
2626
3017
|
/**
|
|
2627
|
-
* Get the IDs of the 10 users with the highest number of records per cluster.
|
|
3018
|
+
* 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.
|
|
3019
|
+
*
|
|
3020
|
+
* Required API Key ACLs:
|
|
3021
|
+
* - admin.
|
|
2628
3022
|
*
|
|
2629
|
-
* @summary Get top userID.
|
|
2630
3023
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2631
3024
|
*/
|
|
2632
3025
|
getTopUserIds(requestOptions) {
|
|
@@ -2642,11 +3035,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2642
3035
|
return transporter.request(request, requestOptions);
|
|
2643
3036
|
},
|
|
2644
3037
|
/**
|
|
2645
|
-
* Returns the
|
|
3038
|
+
* 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.
|
|
3039
|
+
*
|
|
3040
|
+
* Required API Key ACLs:
|
|
3041
|
+
* - admin.
|
|
2646
3042
|
*
|
|
2647
|
-
* @summary Get userID.
|
|
2648
3043
|
* @param getUserId - The getUserId object.
|
|
2649
|
-
* @param getUserId.userID -
|
|
3044
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
2650
3045
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2651
3046
|
*/
|
|
2652
3047
|
getUserId({ userID }, requestOptions) {
|
|
@@ -2667,9 +3062,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2667
3062
|
/**
|
|
2668
3063
|
* 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.
|
|
2669
3064
|
*
|
|
2670
|
-
*
|
|
3065
|
+
* Required API Key ACLs:
|
|
3066
|
+
* - admin.
|
|
3067
|
+
*
|
|
2671
3068
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
2672
|
-
* @param hasPendingMappings.getClusters -
|
|
3069
|
+
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
2673
3070
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2674
3071
|
*/
|
|
2675
3072
|
hasPendingMappings({ getClusters } = {}, requestOptions = undefined) {
|
|
@@ -2688,9 +3085,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2688
3085
|
return transporter.request(request, requestOptions);
|
|
2689
3086
|
},
|
|
2690
3087
|
/**
|
|
2691
|
-
*
|
|
3088
|
+
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
3089
|
+
*
|
|
3090
|
+
* Required API Key ACLs:
|
|
3091
|
+
* - admin.
|
|
2692
3092
|
*
|
|
2693
|
-
* @summary List API keys.
|
|
2694
3093
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2695
3094
|
*/
|
|
2696
3095
|
listApiKeys(requestOptions) {
|
|
@@ -2706,9 +3105,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2706
3105
|
return transporter.request(request, requestOptions);
|
|
2707
3106
|
},
|
|
2708
3107
|
/**
|
|
2709
|
-
*
|
|
3108
|
+
* Lists the available clusters in a multi-cluster setup.
|
|
3109
|
+
*
|
|
3110
|
+
* Required API Key ACLs:
|
|
3111
|
+
* - admin.
|
|
2710
3112
|
*
|
|
2711
|
-
* @summary List clusters.
|
|
2712
3113
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2713
3114
|
*/
|
|
2714
3115
|
listClusters(requestOptions) {
|
|
@@ -2724,12 +3125,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2724
3125
|
return transporter.request(request, requestOptions);
|
|
2725
3126
|
},
|
|
2726
3127
|
/**
|
|
2727
|
-
*
|
|
3128
|
+
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
3129
|
+
*
|
|
3130
|
+
* Required API Key ACLs:
|
|
3131
|
+
* - listIndexes.
|
|
2728
3132
|
*
|
|
2729
|
-
* @summary List indices.
|
|
2730
3133
|
* @param listIndices - The listIndices object.
|
|
2731
|
-
* @param listIndices.page -
|
|
2732
|
-
* @param listIndices.hitsPerPage -
|
|
3134
|
+
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
3135
|
+
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
2733
3136
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2734
3137
|
*/
|
|
2735
3138
|
listIndices({ page, hitsPerPage } = {}, requestOptions = undefined) {
|
|
@@ -2751,12 +3154,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2751
3154
|
return transporter.request(request, requestOptions);
|
|
2752
3155
|
},
|
|
2753
3156
|
/**
|
|
2754
|
-
*
|
|
3157
|
+
* 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.
|
|
3158
|
+
*
|
|
3159
|
+
* Required API Key ACLs:
|
|
3160
|
+
* - admin.
|
|
2755
3161
|
*
|
|
2756
|
-
* @summary List userIDs.
|
|
2757
3162
|
* @param listUserIds - The listUserIds object.
|
|
2758
|
-
* @param listUserIds.page -
|
|
2759
|
-
* @param listUserIds.hitsPerPage -
|
|
3163
|
+
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
3164
|
+
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
2760
3165
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2761
3166
|
*/
|
|
2762
3167
|
listUserIds({ page, hitsPerPage } = {}, requestOptions = undefined) {
|
|
@@ -2778,9 +3183,8 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2778
3183
|
return transporter.request(request, requestOptions);
|
|
2779
3184
|
},
|
|
2780
3185
|
/**
|
|
2781
|
-
*
|
|
3186
|
+
* 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.
|
|
2782
3187
|
*
|
|
2783
|
-
* @summary Batch write operations on multiple indices.
|
|
2784
3188
|
* @param batchParams - The batchParams object.
|
|
2785
3189
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2786
3190
|
*/
|
|
@@ -2804,11 +3208,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2804
3208
|
return transporter.request(request, requestOptions);
|
|
2805
3209
|
},
|
|
2806
3210
|
/**
|
|
2807
|
-
*
|
|
3211
|
+
* 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/).
|
|
3212
|
+
*
|
|
3213
|
+
* Required API Key ACLs:
|
|
3214
|
+
* - addObject.
|
|
2808
3215
|
*
|
|
2809
|
-
* @summary Copy, move, or rename an index.
|
|
2810
3216
|
* @param operationIndex - The operationIndex object.
|
|
2811
|
-
* @param operationIndex.indexName -
|
|
3217
|
+
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
2812
3218
|
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
2813
3219
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2814
3220
|
*/
|
|
@@ -2838,14 +3244,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2838
3244
|
return transporter.request(request, requestOptions);
|
|
2839
3245
|
},
|
|
2840
3246
|
/**
|
|
2841
|
-
*
|
|
3247
|
+
* 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.
|
|
3248
|
+
*
|
|
3249
|
+
* Required API Key ACLs:
|
|
3250
|
+
* - addObject.
|
|
2842
3251
|
*
|
|
2843
|
-
* @summary Update record attributes.
|
|
2844
3252
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2845
|
-
* @param partialUpdateObject.indexName -
|
|
2846
|
-
* @param partialUpdateObject.objectID - Unique record
|
|
2847
|
-
* @param partialUpdateObject.attributesToUpdate -
|
|
2848
|
-
* @param partialUpdateObject.createIfNotExists -
|
|
3253
|
+
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
3254
|
+
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
3255
|
+
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
3256
|
+
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
2849
3257
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2850
3258
|
*/
|
|
2851
3259
|
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }, requestOptions) {
|
|
@@ -2876,11 +3284,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2876
3284
|
return transporter.request(request, requestOptions);
|
|
2877
3285
|
},
|
|
2878
3286
|
/**
|
|
2879
|
-
*
|
|
3287
|
+
* Deletes a user ID and its associated data from the clusters.
|
|
3288
|
+
*
|
|
3289
|
+
* Required API Key ACLs:
|
|
3290
|
+
* - admin.
|
|
2880
3291
|
*
|
|
2881
|
-
* @summary Remove userID.
|
|
2882
3292
|
* @param removeUserId - The removeUserId object.
|
|
2883
|
-
* @param removeUserId.userID -
|
|
3293
|
+
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
2884
3294
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2885
3295
|
*/
|
|
2886
3296
|
removeUserId({ userID }, requestOptions) {
|
|
@@ -2899,9 +3309,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2899
3309
|
return transporter.request(request, requestOptions);
|
|
2900
3310
|
},
|
|
2901
3311
|
/**
|
|
2902
|
-
*
|
|
3312
|
+
* Replaces the list of allowed sources.
|
|
3313
|
+
*
|
|
3314
|
+
* Required API Key ACLs:
|
|
3315
|
+
* - admin.
|
|
2903
3316
|
*
|
|
2904
|
-
* @summary Replace all sources.
|
|
2905
3317
|
* @param replaceSources - The replaceSources object.
|
|
2906
3318
|
* @param replaceSources.source - Allowed sources.
|
|
2907
3319
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2923,9 +3335,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2923
3335
|
return transporter.request(request, requestOptions);
|
|
2924
3336
|
},
|
|
2925
3337
|
/**
|
|
2926
|
-
*
|
|
3338
|
+
* 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.
|
|
3339
|
+
*
|
|
3340
|
+
* Required API Key ACLs:
|
|
3341
|
+
* - admin.
|
|
2927
3342
|
*
|
|
2928
|
-
* @summary Restore API key.
|
|
2929
3343
|
* @param restoreApiKey - The restoreApiKey object.
|
|
2930
3344
|
* @param restoreApiKey.key - API key.
|
|
2931
3345
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2946,12 +3360,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2946
3360
|
return transporter.request(request, requestOptions);
|
|
2947
3361
|
},
|
|
2948
3362
|
/**
|
|
2949
|
-
*
|
|
3363
|
+
* 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).
|
|
3364
|
+
*
|
|
3365
|
+
* Required API Key ACLs:
|
|
3366
|
+
* - addObject.
|
|
2950
3367
|
*
|
|
2951
|
-
* @summary Add or update a record.
|
|
2952
3368
|
* @param saveObject - The saveObject object.
|
|
2953
|
-
* @param saveObject.indexName -
|
|
2954
|
-
* @param saveObject.body - The
|
|
3369
|
+
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
3370
|
+
* @param saveObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
|
|
2955
3371
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2956
3372
|
*/
|
|
2957
3373
|
saveObject({ indexName, body }, requestOptions) {
|
|
@@ -2974,14 +3390,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2974
3390
|
return transporter.request(request, requestOptions);
|
|
2975
3391
|
},
|
|
2976
3392
|
/**
|
|
2977
|
-
* To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
|
|
3393
|
+
* 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).
|
|
3394
|
+
*
|
|
3395
|
+
* Required API Key ACLs:
|
|
3396
|
+
* - editSettings.
|
|
2978
3397
|
*
|
|
2979
|
-
* @summary Create or update a rule.
|
|
2980
3398
|
* @param saveRule - The saveRule object.
|
|
2981
|
-
* @param saveRule.indexName -
|
|
3399
|
+
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
2982
3400
|
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
2983
3401
|
* @param saveRule.rule - The rule object.
|
|
2984
|
-
* @param saveRule.forwardToReplicas -
|
|
3402
|
+
* @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2985
3403
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2986
3404
|
*/
|
|
2987
3405
|
saveRule({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
|
|
@@ -3015,14 +3433,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3015
3433
|
return transporter.request(request, requestOptions);
|
|
3016
3434
|
},
|
|
3017
3435
|
/**
|
|
3018
|
-
* Create or update multiple rules.
|
|
3436
|
+
* 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.
|
|
3437
|
+
*
|
|
3438
|
+
* Required API Key ACLs:
|
|
3439
|
+
* - editSettings.
|
|
3019
3440
|
*
|
|
3020
|
-
* @summary Save a batch of rules.
|
|
3021
3441
|
* @param saveRules - The saveRules object.
|
|
3022
|
-
* @param saveRules.indexName -
|
|
3442
|
+
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
3023
3443
|
* @param saveRules.rules - The rules object.
|
|
3024
|
-
* @param saveRules.forwardToReplicas -
|
|
3025
|
-
* @param saveRules.clearExistingRules -
|
|
3444
|
+
* @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3445
|
+
* @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
|
|
3026
3446
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3027
3447
|
*/
|
|
3028
3448
|
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }, requestOptions) {
|
|
@@ -3051,14 +3471,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3051
3471
|
return transporter.request(request, requestOptions);
|
|
3052
3472
|
},
|
|
3053
3473
|
/**
|
|
3054
|
-
*
|
|
3474
|
+
* 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).
|
|
3475
|
+
*
|
|
3476
|
+
* Required API Key ACLs:
|
|
3477
|
+
* - editSettings.
|
|
3055
3478
|
*
|
|
3056
|
-
* @summary Save a synonym.
|
|
3057
3479
|
* @param saveSynonym - The saveSynonym object.
|
|
3058
|
-
* @param saveSynonym.indexName -
|
|
3480
|
+
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
3059
3481
|
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
3060
3482
|
* @param saveSynonym.synonymHit - The synonymHit object.
|
|
3061
|
-
* @param saveSynonym.forwardToReplicas -
|
|
3483
|
+
* @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3062
3484
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3063
3485
|
*/
|
|
3064
3486
|
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
|
|
@@ -3095,14 +3517,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3095
3517
|
return transporter.request(request, requestOptions);
|
|
3096
3518
|
},
|
|
3097
3519
|
/**
|
|
3098
|
-
*
|
|
3520
|
+
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
|
|
3521
|
+
*
|
|
3522
|
+
* Required API Key ACLs:
|
|
3523
|
+
* - editSettings.
|
|
3099
3524
|
*
|
|
3100
|
-
* @summary Save a batch of synonyms.
|
|
3101
3525
|
* @param saveSynonyms - The saveSynonyms object.
|
|
3102
|
-
* @param saveSynonyms.indexName -
|
|
3526
|
+
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3103
3527
|
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
3104
|
-
* @param saveSynonyms.forwardToReplicas -
|
|
3105
|
-
* @param saveSynonyms.replaceExistingSynonyms -
|
|
3528
|
+
* @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3529
|
+
* @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
|
|
3106
3530
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3107
3531
|
*/
|
|
3108
3532
|
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }, requestOptions) {
|
|
@@ -3132,10 +3556,12 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3132
3556
|
return transporter.request(request, requestOptions);
|
|
3133
3557
|
},
|
|
3134
3558
|
/**
|
|
3135
|
-
*
|
|
3559
|
+
* 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.
|
|
3136
3560
|
*
|
|
3137
|
-
*
|
|
3138
|
-
*
|
|
3561
|
+
* Required API Key ACLs:
|
|
3562
|
+
* - search.
|
|
3563
|
+
*
|
|
3564
|
+
* @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
|
|
3139
3565
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3140
3566
|
*/
|
|
3141
3567
|
search(searchMethodParams, requestOptions) {
|
|
@@ -3182,11 +3608,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3182
3608
|
return transporter.request(request, requestOptions);
|
|
3183
3609
|
},
|
|
3184
3610
|
/**
|
|
3185
|
-
*
|
|
3611
|
+
* Searches for standard and custom dictionary entries.
|
|
3612
|
+
*
|
|
3613
|
+
* Required API Key ACLs:
|
|
3614
|
+
* - settings.
|
|
3186
3615
|
*
|
|
3187
|
-
* @summary Search dictionary entries.
|
|
3188
3616
|
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
3189
|
-
* @param searchDictionaryEntries.dictionaryName - Dictionary to search
|
|
3617
|
+
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
3190
3618
|
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
3191
3619
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3192
3620
|
*/
|
|
@@ -3215,12 +3643,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3215
3643
|
return transporter.request(request, requestOptions);
|
|
3216
3644
|
},
|
|
3217
3645
|
/**
|
|
3218
|
-
*
|
|
3646
|
+
* 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**.
|
|
3647
|
+
*
|
|
3648
|
+
* Required API Key ACLs:
|
|
3649
|
+
* - search.
|
|
3219
3650
|
*
|
|
3220
|
-
* @summary Search for facet values.
|
|
3221
3651
|
* @param searchForFacetValues - The searchForFacetValues object.
|
|
3222
|
-
* @param searchForFacetValues.indexName -
|
|
3223
|
-
* @param searchForFacetValues.facetName - Facet
|
|
3652
|
+
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
3653
|
+
* @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.
|
|
3224
3654
|
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
|
|
3225
3655
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3226
3656
|
*/
|
|
@@ -3248,11 +3678,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3248
3678
|
return transporter.request(request, requestOptions);
|
|
3249
3679
|
},
|
|
3250
3680
|
/**
|
|
3251
|
-
*
|
|
3681
|
+
* Searches for rules in your index.
|
|
3682
|
+
*
|
|
3683
|
+
* Required API Key ACLs:
|
|
3684
|
+
* - settings.
|
|
3252
3685
|
*
|
|
3253
|
-
* @summary Search for rules.
|
|
3254
3686
|
* @param searchRules - The searchRules object.
|
|
3255
|
-
* @param searchRules.indexName -
|
|
3687
|
+
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
3256
3688
|
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
3257
3689
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3258
3690
|
*/
|
|
@@ -3275,11 +3707,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3275
3707
|
return transporter.request(request, requestOptions);
|
|
3276
3708
|
},
|
|
3277
3709
|
/**
|
|
3278
|
-
*
|
|
3710
|
+
* 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.
|
|
3711
|
+
*
|
|
3712
|
+
* Required API Key ACLs:
|
|
3713
|
+
* - search.
|
|
3279
3714
|
*
|
|
3280
|
-
* @summary Search an index.
|
|
3281
3715
|
* @param searchSingleIndex - The searchSingleIndex object.
|
|
3282
|
-
* @param searchSingleIndex.indexName -
|
|
3716
|
+
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
3283
3717
|
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
3284
3718
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3285
3719
|
*/
|
|
@@ -3302,11 +3736,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3302
3736
|
return transporter.request(request, requestOptions);
|
|
3303
3737
|
},
|
|
3304
3738
|
/**
|
|
3305
|
-
*
|
|
3739
|
+
* Searches for synonyms in your index.
|
|
3740
|
+
*
|
|
3741
|
+
* Required API Key ACLs:
|
|
3742
|
+
* - settings.
|
|
3306
3743
|
*
|
|
3307
|
-
* @summary Search for synonyms.
|
|
3308
3744
|
* @param searchSynonyms - The searchSynonyms object.
|
|
3309
|
-
* @param searchSynonyms.indexName -
|
|
3745
|
+
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3310
3746
|
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
3311
3747
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3312
3748
|
*/
|
|
@@ -3329,9 +3765,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3329
3765
|
return transporter.request(request, requestOptions);
|
|
3330
3766
|
},
|
|
3331
3767
|
/**
|
|
3332
|
-
* Since it can take
|
|
3768
|
+
* 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).
|
|
3769
|
+
*
|
|
3770
|
+
* Required API Key ACLs:
|
|
3771
|
+
* - admin.
|
|
3333
3772
|
*
|
|
3334
|
-
* @summary Search for a user ID.
|
|
3335
3773
|
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
3336
3774
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3337
3775
|
*/
|
|
@@ -3357,9 +3795,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3357
3795
|
return transporter.request(request, requestOptions);
|
|
3358
3796
|
},
|
|
3359
3797
|
/**
|
|
3360
|
-
*
|
|
3798
|
+
* Turns standard stop word dictionary entries on or off for a given language.
|
|
3799
|
+
*
|
|
3800
|
+
* Required API Key ACLs:
|
|
3801
|
+
* - editSettings.
|
|
3361
3802
|
*
|
|
3362
|
-
* @summary Set stop word settings.
|
|
3363
3803
|
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
3364
3804
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3365
3805
|
*/
|
|
@@ -3383,13 +3823,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3383
3823
|
return transporter.request(request, requestOptions);
|
|
3384
3824
|
},
|
|
3385
3825
|
/**
|
|
3386
|
-
* Update the specified
|
|
3826
|
+
* 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.
|
|
3827
|
+
*
|
|
3828
|
+
* Required API Key ACLs:
|
|
3829
|
+
* - editSettings.
|
|
3387
3830
|
*
|
|
3388
|
-
* @summary Update index settings.
|
|
3389
3831
|
* @param setSettings - The setSettings object.
|
|
3390
|
-
* @param setSettings.indexName -
|
|
3832
|
+
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
3391
3833
|
* @param setSettings.indexSettings - The indexSettings object.
|
|
3392
|
-
* @param setSettings.forwardToReplicas -
|
|
3834
|
+
* @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3393
3835
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3394
3836
|
*/
|
|
3395
3837
|
setSettings({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
|
|
@@ -3415,9 +3857,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3415
3857
|
return transporter.request(request, requestOptions);
|
|
3416
3858
|
},
|
|
3417
3859
|
/**
|
|
3418
|
-
*
|
|
3860
|
+
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
3861
|
+
*
|
|
3862
|
+
* Required API Key ACLs:
|
|
3863
|
+
* - admin.
|
|
3419
3864
|
*
|
|
3420
|
-
* @summary Update an API key.
|
|
3421
3865
|
* @param updateApiKey - The updateApiKey object.
|
|
3422
3866
|
* @param updateApiKey.key - API key.
|
|
3423
3867
|
* @param updateApiKey.apiKey - The apiKey object.
|
|
@@ -3449,7 +3893,369 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3449
3893
|
}
|
|
3450
3894
|
|
|
3451
3895
|
// 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.
|
|
3452
|
-
const apiClientVersion =
|
|
3896
|
+
const apiClientVersion$1 = '5.0.0-beta.10';
|
|
3897
|
+
function getDefaultHosts(appId) {
|
|
3898
|
+
return [
|
|
3899
|
+
{
|
|
3900
|
+
url: `${appId}-dsn.algolia.net`,
|
|
3901
|
+
accept: 'read',
|
|
3902
|
+
protocol: 'https',
|
|
3903
|
+
},
|
|
3904
|
+
{
|
|
3905
|
+
url: `${appId}.algolia.net`,
|
|
3906
|
+
accept: 'write',
|
|
3907
|
+
protocol: 'https',
|
|
3908
|
+
},
|
|
3909
|
+
].concat(shuffle([
|
|
3910
|
+
{
|
|
3911
|
+
url: `${appId}-1.algolianet.com`,
|
|
3912
|
+
accept: 'readWrite',
|
|
3913
|
+
protocol: 'https',
|
|
3914
|
+
},
|
|
3915
|
+
{
|
|
3916
|
+
url: `${appId}-2.algolianet.com`,
|
|
3917
|
+
accept: 'readWrite',
|
|
3918
|
+
protocol: 'https',
|
|
3919
|
+
},
|
|
3920
|
+
{
|
|
3921
|
+
url: `${appId}-3.algolianet.com`,
|
|
3922
|
+
accept: 'readWrite',
|
|
3923
|
+
protocol: 'https',
|
|
3924
|
+
},
|
|
3925
|
+
]));
|
|
3926
|
+
}
|
|
3927
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
3928
|
+
function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
|
|
3929
|
+
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
3930
|
+
const transporter = createTransporter({
|
|
3931
|
+
hosts: getDefaultHosts(appIdOption),
|
|
3932
|
+
...options,
|
|
3933
|
+
algoliaAgent: getAlgoliaAgent({
|
|
3934
|
+
algoliaAgents,
|
|
3935
|
+
client: 'Recommend',
|
|
3936
|
+
version: apiClientVersion$1,
|
|
3937
|
+
}),
|
|
3938
|
+
baseHeaders: {
|
|
3939
|
+
'content-type': 'text/plain',
|
|
3940
|
+
...auth.headers(),
|
|
3941
|
+
...options.baseHeaders,
|
|
3942
|
+
},
|
|
3943
|
+
baseQueryParameters: {
|
|
3944
|
+
...auth.queryParameters(),
|
|
3945
|
+
...options.baseQueryParameters,
|
|
3946
|
+
},
|
|
3947
|
+
});
|
|
3948
|
+
return {
|
|
3949
|
+
transporter,
|
|
3950
|
+
/**
|
|
3951
|
+
* The `appId` currently in use.
|
|
3952
|
+
*/
|
|
3953
|
+
appId: appIdOption,
|
|
3954
|
+
/**
|
|
3955
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
3956
|
+
*/
|
|
3957
|
+
clearCache() {
|
|
3958
|
+
return Promise.all([
|
|
3959
|
+
transporter.requestsCache.clear(),
|
|
3960
|
+
transporter.responsesCache.clear(),
|
|
3961
|
+
]).then(() => undefined);
|
|
3962
|
+
},
|
|
3963
|
+
/**
|
|
3964
|
+
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
3965
|
+
*/
|
|
3966
|
+
get _ua() {
|
|
3967
|
+
return transporter.algoliaAgent.value;
|
|
3968
|
+
},
|
|
3969
|
+
/**
|
|
3970
|
+
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
3971
|
+
*
|
|
3972
|
+
* @param segment - The algolia agent (user-agent) segment to add.
|
|
3973
|
+
* @param version - The version of the agent.
|
|
3974
|
+
*/
|
|
3975
|
+
addAlgoliaAgent(segment, version) {
|
|
3976
|
+
transporter.algoliaAgent.add({ segment, version });
|
|
3977
|
+
},
|
|
3978
|
+
/**
|
|
3979
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
3980
|
+
*
|
|
3981
|
+
* @param customDelete - The customDelete object.
|
|
3982
|
+
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
3983
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
3984
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3985
|
+
*/
|
|
3986
|
+
customDelete({ path, parameters }, requestOptions) {
|
|
3987
|
+
if (!path) {
|
|
3988
|
+
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
3989
|
+
}
|
|
3990
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
3991
|
+
const headers = {};
|
|
3992
|
+
const queryParameters = parameters ? parameters : {};
|
|
3993
|
+
const request = {
|
|
3994
|
+
method: 'DELETE',
|
|
3995
|
+
path: requestPath,
|
|
3996
|
+
queryParameters,
|
|
3997
|
+
headers,
|
|
3998
|
+
};
|
|
3999
|
+
return transporter.request(request, requestOptions);
|
|
4000
|
+
},
|
|
4001
|
+
/**
|
|
4002
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
4003
|
+
*
|
|
4004
|
+
* @param customGet - The customGet object.
|
|
4005
|
+
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
4006
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
4007
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4008
|
+
*/
|
|
4009
|
+
customGet({ path, parameters }, requestOptions) {
|
|
4010
|
+
if (!path) {
|
|
4011
|
+
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
4012
|
+
}
|
|
4013
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
4014
|
+
const headers = {};
|
|
4015
|
+
const queryParameters = parameters ? parameters : {};
|
|
4016
|
+
const request = {
|
|
4017
|
+
method: 'GET',
|
|
4018
|
+
path: requestPath,
|
|
4019
|
+
queryParameters,
|
|
4020
|
+
headers,
|
|
4021
|
+
};
|
|
4022
|
+
return transporter.request(request, requestOptions);
|
|
4023
|
+
},
|
|
4024
|
+
/**
|
|
4025
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
4026
|
+
*
|
|
4027
|
+
* @param customPost - The customPost object.
|
|
4028
|
+
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
4029
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
4030
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
4031
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4032
|
+
*/
|
|
4033
|
+
customPost({ path, parameters, body }, requestOptions) {
|
|
4034
|
+
if (!path) {
|
|
4035
|
+
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
4036
|
+
}
|
|
4037
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
4038
|
+
const headers = {};
|
|
4039
|
+
const queryParameters = parameters ? parameters : {};
|
|
4040
|
+
const request = {
|
|
4041
|
+
method: 'POST',
|
|
4042
|
+
path: requestPath,
|
|
4043
|
+
queryParameters,
|
|
4044
|
+
headers,
|
|
4045
|
+
data: body ? body : {},
|
|
4046
|
+
};
|
|
4047
|
+
return transporter.request(request, requestOptions);
|
|
4048
|
+
},
|
|
4049
|
+
/**
|
|
4050
|
+
* This method allow you to send requests to the Algolia REST API.
|
|
4051
|
+
*
|
|
4052
|
+
* @param customPut - The customPut object.
|
|
4053
|
+
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
4054
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
4055
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
4056
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4057
|
+
*/
|
|
4058
|
+
customPut({ path, parameters, body }, requestOptions) {
|
|
4059
|
+
if (!path) {
|
|
4060
|
+
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
4061
|
+
}
|
|
4062
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
4063
|
+
const headers = {};
|
|
4064
|
+
const queryParameters = parameters ? parameters : {};
|
|
4065
|
+
const request = {
|
|
4066
|
+
method: 'PUT',
|
|
4067
|
+
path: requestPath,
|
|
4068
|
+
queryParameters,
|
|
4069
|
+
headers,
|
|
4070
|
+
data: body ? body : {},
|
|
4071
|
+
};
|
|
4072
|
+
return transporter.request(request, requestOptions);
|
|
4073
|
+
},
|
|
4074
|
+
/**
|
|
4075
|
+
* Deletes a Recommend rule from a recommendation scenario.
|
|
4076
|
+
*
|
|
4077
|
+
* Required API Key ACLs:
|
|
4078
|
+
* - editSettings.
|
|
4079
|
+
*
|
|
4080
|
+
* @param deleteRecommendRule - The deleteRecommendRule object.
|
|
4081
|
+
* @param deleteRecommendRule.indexName - Name of the index on which to perform the operation.
|
|
4082
|
+
* @param deleteRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4083
|
+
* @param deleteRecommendRule.objectID - Unique record identifier.
|
|
4084
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4085
|
+
*/
|
|
4086
|
+
deleteRecommendRule({ indexName, model, objectID }, requestOptions) {
|
|
4087
|
+
if (!indexName) {
|
|
4088
|
+
throw new Error('Parameter `indexName` is required when calling `deleteRecommendRule`.');
|
|
4089
|
+
}
|
|
4090
|
+
if (!model) {
|
|
4091
|
+
throw new Error('Parameter `model` is required when calling `deleteRecommendRule`.');
|
|
4092
|
+
}
|
|
4093
|
+
if (!objectID) {
|
|
4094
|
+
throw new Error('Parameter `objectID` is required when calling `deleteRecommendRule`.');
|
|
4095
|
+
}
|
|
4096
|
+
const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
|
|
4097
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4098
|
+
.replace('{model}', encodeURIComponent(model))
|
|
4099
|
+
.replace('{objectID}', encodeURIComponent(objectID));
|
|
4100
|
+
const headers = {};
|
|
4101
|
+
const queryParameters = {};
|
|
4102
|
+
const request = {
|
|
4103
|
+
method: 'DELETE',
|
|
4104
|
+
path: requestPath,
|
|
4105
|
+
queryParameters,
|
|
4106
|
+
headers,
|
|
4107
|
+
};
|
|
4108
|
+
return transporter.request(request, requestOptions);
|
|
4109
|
+
},
|
|
4110
|
+
/**
|
|
4111
|
+
* Retrieves a Recommend rule that you previously created in the Algolia dashboard.
|
|
4112
|
+
*
|
|
4113
|
+
* Required API Key ACLs:
|
|
4114
|
+
* - settings.
|
|
4115
|
+
*
|
|
4116
|
+
* @param getRecommendRule - The getRecommendRule object.
|
|
4117
|
+
* @param getRecommendRule.indexName - Name of the index on which to perform the operation.
|
|
4118
|
+
* @param getRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4119
|
+
* @param getRecommendRule.objectID - Unique record identifier.
|
|
4120
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4121
|
+
*/
|
|
4122
|
+
getRecommendRule({ indexName, model, objectID }, requestOptions) {
|
|
4123
|
+
if (!indexName) {
|
|
4124
|
+
throw new Error('Parameter `indexName` is required when calling `getRecommendRule`.');
|
|
4125
|
+
}
|
|
4126
|
+
if (!model) {
|
|
4127
|
+
throw new Error('Parameter `model` is required when calling `getRecommendRule`.');
|
|
4128
|
+
}
|
|
4129
|
+
if (!objectID) {
|
|
4130
|
+
throw new Error('Parameter `objectID` is required when calling `getRecommendRule`.');
|
|
4131
|
+
}
|
|
4132
|
+
const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
|
|
4133
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4134
|
+
.replace('{model}', encodeURIComponent(model))
|
|
4135
|
+
.replace('{objectID}', encodeURIComponent(objectID));
|
|
4136
|
+
const headers = {};
|
|
4137
|
+
const queryParameters = {};
|
|
4138
|
+
const request = {
|
|
4139
|
+
method: 'GET',
|
|
4140
|
+
path: requestPath,
|
|
4141
|
+
queryParameters,
|
|
4142
|
+
headers,
|
|
4143
|
+
};
|
|
4144
|
+
return transporter.request(request, requestOptions);
|
|
4145
|
+
},
|
|
4146
|
+
/**
|
|
4147
|
+
* 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.
|
|
4148
|
+
*
|
|
4149
|
+
* Required API Key ACLs:
|
|
4150
|
+
* - editSettings.
|
|
4151
|
+
*
|
|
4152
|
+
* @param getRecommendStatus - The getRecommendStatus object.
|
|
4153
|
+
* @param getRecommendStatus.indexName - Name of the index on which to perform the operation.
|
|
4154
|
+
* @param getRecommendStatus.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4155
|
+
* @param getRecommendStatus.taskID - Unique task identifier.
|
|
4156
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4157
|
+
*/
|
|
4158
|
+
getRecommendStatus({ indexName, model, taskID }, requestOptions) {
|
|
4159
|
+
if (!indexName) {
|
|
4160
|
+
throw new Error('Parameter `indexName` is required when calling `getRecommendStatus`.');
|
|
4161
|
+
}
|
|
4162
|
+
if (!model) {
|
|
4163
|
+
throw new Error('Parameter `model` is required when calling `getRecommendStatus`.');
|
|
4164
|
+
}
|
|
4165
|
+
if (!taskID) {
|
|
4166
|
+
throw new Error('Parameter `taskID` is required when calling `getRecommendStatus`.');
|
|
4167
|
+
}
|
|
4168
|
+
const requestPath = '/1/indexes/{indexName}/{model}/task/{taskID}'
|
|
4169
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4170
|
+
.replace('{model}', encodeURIComponent(model))
|
|
4171
|
+
.replace('{taskID}', encodeURIComponent(taskID));
|
|
4172
|
+
const headers = {};
|
|
4173
|
+
const queryParameters = {};
|
|
4174
|
+
const request = {
|
|
4175
|
+
method: 'GET',
|
|
4176
|
+
path: requestPath,
|
|
4177
|
+
queryParameters,
|
|
4178
|
+
headers,
|
|
4179
|
+
};
|
|
4180
|
+
return transporter.request(request, requestOptions);
|
|
4181
|
+
},
|
|
4182
|
+
/**
|
|
4183
|
+
* Retrieves recommendations from selected AI models.
|
|
4184
|
+
*
|
|
4185
|
+
* Required API Key ACLs:
|
|
4186
|
+
* - search.
|
|
4187
|
+
*
|
|
4188
|
+
* @param getRecommendationsParams - The getRecommendationsParams object.
|
|
4189
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4190
|
+
*/
|
|
4191
|
+
getRecommendations(getRecommendationsParams, requestOptions) {
|
|
4192
|
+
if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {
|
|
4193
|
+
const newSignatureRequest = {
|
|
4194
|
+
requests: getRecommendationsParams,
|
|
4195
|
+
};
|
|
4196
|
+
// eslint-disable-next-line no-param-reassign
|
|
4197
|
+
getRecommendationsParams = newSignatureRequest;
|
|
4198
|
+
}
|
|
4199
|
+
if (!getRecommendationsParams) {
|
|
4200
|
+
throw new Error('Parameter `getRecommendationsParams` is required when calling `getRecommendations`.');
|
|
4201
|
+
}
|
|
4202
|
+
if (!getRecommendationsParams.requests) {
|
|
4203
|
+
throw new Error('Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.');
|
|
4204
|
+
}
|
|
4205
|
+
const requestPath = '/1/indexes/*/recommendations';
|
|
4206
|
+
const headers = {};
|
|
4207
|
+
const queryParameters = {};
|
|
4208
|
+
const request = {
|
|
4209
|
+
method: 'POST',
|
|
4210
|
+
path: requestPath,
|
|
4211
|
+
queryParameters,
|
|
4212
|
+
headers,
|
|
4213
|
+
data: getRecommendationsParams,
|
|
4214
|
+
useReadTransporter: true,
|
|
4215
|
+
cacheable: true,
|
|
4216
|
+
};
|
|
4217
|
+
return transporter.request(request, requestOptions);
|
|
4218
|
+
},
|
|
4219
|
+
/**
|
|
4220
|
+
* Searches for Recommend rules. Use an empty query to list all rules for this recommendation scenario.
|
|
4221
|
+
*
|
|
4222
|
+
* Required API Key ACLs:
|
|
4223
|
+
* - settings.
|
|
4224
|
+
*
|
|
4225
|
+
* @param searchRecommendRules - The searchRecommendRules object.
|
|
4226
|
+
* @param searchRecommendRules.indexName - Name of the index on which to perform the operation.
|
|
4227
|
+
* @param searchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
|
|
4228
|
+
* @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.
|
|
4229
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
4230
|
+
*/
|
|
4231
|
+
searchRecommendRules({ indexName, model, searchRecommendRulesParams, }, requestOptions) {
|
|
4232
|
+
if (!indexName) {
|
|
4233
|
+
throw new Error('Parameter `indexName` is required when calling `searchRecommendRules`.');
|
|
4234
|
+
}
|
|
4235
|
+
if (!model) {
|
|
4236
|
+
throw new Error('Parameter `model` is required when calling `searchRecommendRules`.');
|
|
4237
|
+
}
|
|
4238
|
+
const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/search'
|
|
4239
|
+
.replace('{indexName}', encodeURIComponent(indexName))
|
|
4240
|
+
.replace('{model}', encodeURIComponent(model));
|
|
4241
|
+
const headers = {};
|
|
4242
|
+
const queryParameters = {};
|
|
4243
|
+
const request = {
|
|
4244
|
+
method: 'POST',
|
|
4245
|
+
path: requestPath,
|
|
4246
|
+
queryParameters,
|
|
4247
|
+
headers,
|
|
4248
|
+
data: searchRecommendRulesParams ? searchRecommendRulesParams : {},
|
|
4249
|
+
useReadTransporter: true,
|
|
4250
|
+
cacheable: true,
|
|
4251
|
+
};
|
|
4252
|
+
return transporter.request(request, requestOptions);
|
|
4253
|
+
},
|
|
4254
|
+
};
|
|
4255
|
+
}
|
|
4256
|
+
|
|
4257
|
+
// 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.
|
|
4258
|
+
const apiClientVersion = apiClientVersion$2;
|
|
3453
4259
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
3454
4260
|
function algoliasearch(appId, apiKey, options) {
|
|
3455
4261
|
if (!appId || typeof appId !== 'string') {
|
|
@@ -3473,6 +4279,13 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
3473
4279
|
hostsCache: createMemoryCache(),
|
|
3474
4280
|
...options,
|
|
3475
4281
|
};
|
|
4282
|
+
function initRecommend(initOptions = {}) {
|
|
4283
|
+
return createRecommendClient({
|
|
4284
|
+
...commonOptions,
|
|
4285
|
+
...initOptions.options,
|
|
4286
|
+
...initOptions,
|
|
4287
|
+
});
|
|
4288
|
+
}
|
|
3476
4289
|
function initAnalytics(initOptions = {}) {
|
|
3477
4290
|
if (initOptions.region &&
|
|
3478
4291
|
(typeof initOptions.region !== 'string' ||
|
|
@@ -3518,9 +4331,56 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
3518
4331
|
get _ua() {
|
|
3519
4332
|
return this.transporter.algoliaAgent.value;
|
|
3520
4333
|
},
|
|
4334
|
+
initAbtesting,
|
|
3521
4335
|
initAnalytics,
|
|
3522
4336
|
initPersonalization,
|
|
3523
|
-
|
|
4337
|
+
initRecommend,
|
|
4338
|
+
/**
|
|
4339
|
+
* Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.
|
|
4340
|
+
*
|
|
4341
|
+
* @summary Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.
|
|
4342
|
+
* @param generateSecuredApiKey - The `generateSecuredApiKey` object.
|
|
4343
|
+
* @param generateSecuredApiKey.parentApiKey - The base API key from which to generate the new secured one.
|
|
4344
|
+
* @param generateSecuredApiKey.restrictions - A set of properties defining the restrictions of the secured API key.
|
|
4345
|
+
*/
|
|
4346
|
+
generateSecuredApiKey({ parentApiKey, restrictions = {}, }) {
|
|
4347
|
+
let mergedRestrictions = restrictions;
|
|
4348
|
+
if (restrictions.searchParams) {
|
|
4349
|
+
// merge searchParams with the root restrictions
|
|
4350
|
+
mergedRestrictions = {
|
|
4351
|
+
...restrictions,
|
|
4352
|
+
...restrictions.searchParams,
|
|
4353
|
+
};
|
|
4354
|
+
delete mergedRestrictions.searchParams;
|
|
4355
|
+
}
|
|
4356
|
+
mergedRestrictions = Object.keys(mergedRestrictions)
|
|
4357
|
+
.sort()
|
|
4358
|
+
.reduce((acc, key) => {
|
|
4359
|
+
// eslint-disable-next-line no-param-reassign
|
|
4360
|
+
acc[key] = mergedRestrictions[key];
|
|
4361
|
+
return acc;
|
|
4362
|
+
}, {});
|
|
4363
|
+
const queryParameters = serializeQueryParameters(mergedRestrictions);
|
|
4364
|
+
return Buffer.from(createHmac('sha256', parentApiKey)
|
|
4365
|
+
.update(queryParameters)
|
|
4366
|
+
.digest('hex') + queryParameters).toString('base64');
|
|
4367
|
+
},
|
|
4368
|
+
/**
|
|
4369
|
+
* Helper: Retrieves the remaining validity of the previous generated `securedApiKey`, the `ValidUntil` parameter must have been provided.
|
|
4370
|
+
*
|
|
4371
|
+
* @summary Helper: Retrieves the remaining validity of the previous generated `secured_api_key`, the `ValidUntil` parameter must have been provided.
|
|
4372
|
+
* @param getSecuredApiKeyRemainingValidity - The `getSecuredApiKeyRemainingValidity` object.
|
|
4373
|
+
* @param getSecuredApiKeyRemainingValidity.securedApiKey - The secured API key generated with the `generateSecuredApiKey` method.
|
|
4374
|
+
*/
|
|
4375
|
+
getSecuredApiKeyRemainingValidity({ securedApiKey, }) {
|
|
4376
|
+
const decodedString = Buffer.from(securedApiKey, 'base64').toString('ascii');
|
|
4377
|
+
const regex = /validUntil=(\d+)/;
|
|
4378
|
+
const match = decodedString.match(regex);
|
|
4379
|
+
if (match === null) {
|
|
4380
|
+
throw new Error('validUntil not found in given secured api key.');
|
|
4381
|
+
}
|
|
4382
|
+
return parseInt(match[1], 10) - Math.round(new Date().getTime() / 1000);
|
|
4383
|
+
},
|
|
3524
4384
|
};
|
|
3525
4385
|
}
|
|
3526
4386
|
|