algoliasearch 5.0.0-alpha.98 → 5.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/builds/browser.ts +10 -17
- package/builds/node.ts +58 -15
- package/dist/algoliasearch/builds/browser.d.ts +10 -5
- package/dist/algoliasearch/builds/browser.d.ts.map +1 -1
- package/dist/algoliasearch/builds/node.d.ts +28 -6
- package/dist/algoliasearch/builds/node.d.ts.map +1 -1
- package/dist/algoliasearch.cjs +752 -387
- package/dist/algoliasearch.esm.browser.js +724 -393
- package/dist/algoliasearch.esm.node.js +753 -388
- 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 +22 -17
- 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 +10 -6
- 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/builtInOperation.d.ts +2 -2
- package/dist/client-search/model/builtInOperationType.d.ts +1 -1
- package/dist/client-search/model/clientMethodProps.d.ts +124 -65
- 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 +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 +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 +4 -0
- 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 +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 +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 +10 -7
- package/dist/client-search/model/rankingInfo.d.ts.map +1 -1
- package/dist/client-search/model/reRankingApplyFilter.d.ts +1 -1
- 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 +1 -1
- 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 +3 -0
- 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/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/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 +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 +1 -1
- package/dist/client-search/src/searchClient.d.ts +324 -202
- package/dist/client-search/src/searchClient.d.ts.map +1 -1
- package/dist/lite/builds/browser.d.ts +14 -3
- package/dist/lite/builds/browser.d.ts.map +1 -1
- package/dist/lite/builds/node.d.ts +14 -3
- package/dist/lite/builds/node.d.ts.map +1 -1
- package/dist/lite/lite.cjs +8 -6
- package/dist/lite/lite.esm.browser.js +13 -14
- package/dist/lite/lite.esm.node.js +8 -6
- package/dist/lite/lite.umd.js +2 -2
- package/dist/lite/model/acl.d.ts +1 -1
- package/dist/lite/model/action.d.ts +1 -1
- package/dist/lite/model/addApiKeyResponse.d.ts +1 -1
- package/dist/lite/model/anchoring.d.ts +1 -1
- package/dist/lite/model/apiKey.d.ts +8 -8
- package/dist/lite/model/apiKeyOperation.d.ts +2 -0
- package/dist/lite/model/apiKeyOperation.d.ts.map +1 -0
- 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 +22 -17
- package/dist/lite/model/baseIndexSettings.d.ts.map +1 -1
- 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 +10 -6
- package/dist/lite/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/lite/model/builtInOperation.d.ts +2 -2
- package/dist/lite/model/builtInOperationType.d.ts +1 -1
- package/dist/lite/model/condition.d.ts +7 -3
- package/dist/lite/model/condition.d.ts.map +1 -1
- package/dist/lite/model/consequence.d.ts +5 -5
- package/dist/lite/model/consequenceHide.d.ts +2 -2
- 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/deleteByParams.d.ts +4 -4
- package/dist/lite/model/dictionaryEntry.d.ts +6 -8
- package/dist/lite/model/dictionaryEntry.d.ts.map +1 -1
- package/dist/lite/model/dictionaryEntryState.d.ts +1 -1
- package/dist/lite/model/dictionaryLanguage.d.ts +2 -2
- 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 +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/fetchedIndex.d.ts +1 -1
- 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 +4 -0
- 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/matchLevel.d.ts +1 -1
- package/dist/lite/model/mode.d.ts +1 -1
- package/dist/lite/model/numericFilters.d.ts +1 -1
- package/dist/lite/model/operationType.d.ts +1 -1
- package/dist/lite/model/optionalFilters.d.ts +1 -1
- package/dist/lite/model/params.d.ts +1 -1
- package/dist/lite/model/promoteObjectID.d.ts +2 -2
- package/dist/lite/model/promoteObjectIDs.d.ts +2 -2
- package/dist/lite/model/queryType.d.ts +1 -1
- package/dist/lite/model/rankingInfo.d.ts +10 -7
- package/dist/lite/model/rankingInfo.d.ts.map +1 -1
- package/dist/lite/model/reRankingApplyFilter.d.ts +1 -1
- 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 +1 -1
- package/dist/lite/model/rule.d.ts +5 -5
- package/dist/lite/model/searchDictionaryEntriesResponse.d.ts +20 -0
- package/dist/lite/model/searchDictionaryEntriesResponse.d.ts.map +1 -0
- package/dist/lite/model/searchForFacetValuesResponse.d.ts +3 -0
- 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/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/searchStrategy.d.ts +1 -1
- package/dist/lite/model/searchSynonymsResponse.d.ts +2 -2
- package/dist/lite/model/securedAPIKeyRestrictions.d.ts +25 -0
- package/dist/lite/model/securedAPIKeyRestrictions.d.ts.map +1 -0
- 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 +1 -1
- package/dist/lite/model/taskStatus.d.ts +1 -1
- package/dist/lite/model/timeRange.d.ts +2 -2
- 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/updatedRuleResponse.d.ts +3 -3
- package/dist/lite/model/userId.d.ts +1 -1
- package/dist/lite/model/value.d.ts +1 -1
- package/dist/lite/src/liteClient.d.ts +6 -9
- package/dist/lite/src/liteClient.d.ts.map +1 -1
- package/lite/builds/browser.ts +11 -6
- package/lite/builds/node.ts +10 -5
- package/lite/model/acl.ts +1 -1
- package/lite/model/action.ts +1 -1
- package/lite/model/addApiKeyResponse.ts +1 -1
- package/lite/model/anchoring.ts +1 -1
- package/lite/model/apiKey.ts +8 -8
- package/lite/model/apiKeyOperation.ts +3 -0
- 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 +24 -17
- package/lite/model/baseSearchParamsWithoutQuery.ts +26 -30
- package/lite/model/baseSearchResponse.ts +11 -6
- package/lite/model/builtInOperation.ts +2 -2
- package/lite/model/builtInOperationType.ts +1 -1
- package/lite/model/condition.ts +8 -3
- package/lite/model/consequence.ts +5 -5
- package/lite/model/consequenceHide.ts +2 -2
- package/lite/model/consequenceQuery.ts +1 -1
- package/lite/model/consequenceQueryObject.ts +2 -2
- package/lite/model/cursor.ts +1 -1
- package/lite/model/deleteByParams.ts +4 -4
- package/lite/model/dictionaryEntry.ts +6 -8
- package/lite/model/dictionaryEntryState.ts +1 -1
- package/lite/model/dictionaryLanguage.ts +2 -2
- 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 +1 -1
- package/lite/model/facetHits.ts +2 -2
- package/lite/model/facetOrdering.ts +2 -2
- package/lite/model/facets.ts +2 -2
- package/lite/model/fetchedIndex.ts +1 -1
- 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 +4 -0
- package/lite/model/indexSettings.ts +1 -1
- package/lite/model/indexSettingsAsSearchParams.ts +32 -36
- package/lite/model/matchLevel.ts +1 -1
- package/lite/model/mode.ts +1 -1
- package/lite/model/numericFilters.ts +1 -1
- package/lite/model/operationType.ts +1 -1
- package/lite/model/optionalFilters.ts +1 -1
- package/lite/model/params.ts +1 -1
- package/lite/model/promoteObjectID.ts +2 -2
- package/lite/model/promoteObjectIDs.ts +2 -2
- package/lite/model/queryType.ts +1 -1
- package/lite/model/rankingInfo.ts +10 -7
- package/lite/model/reRankingApplyFilter.ts +1 -1
- package/lite/model/removeStopWords.ts +4 -2
- package/lite/model/removeWordsIfNoResults.ts +1 -1
- package/lite/model/renderingContent.ts +1 -1
- package/lite/model/rule.ts +5 -5
- package/lite/model/searchDictionaryEntriesResponse.ts +25 -0
- package/lite/model/searchForFacetValuesResponse.ts +3 -0
- package/lite/model/searchForFacetsOptions.ts +2 -2
- package/lite/model/searchForHitsOptions.ts +1 -1
- package/lite/model/searchHits.ts +6 -3
- package/lite/model/searchParamsObject.ts +3 -0
- package/lite/model/searchParamsQuery.ts +1 -1
- package/lite/model/searchStrategy.ts +1 -1
- package/lite/model/searchSynonymsResponse.ts +2 -2
- package/lite/model/securedAPIKeyRestrictions.ts +32 -0
- 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 +1 -1
- package/lite/model/taskStatus.ts +1 -1
- package/lite/model/timeRange.ts +2 -2
- package/lite/model/typoTolerance.ts +1 -1
- package/lite/model/typoToleranceEnum.ts +3 -0
- package/lite/model/updatedRuleResponse.ts +3 -3
- package/lite/model/userId.ts +1 -1
- package/lite/model/value.ts +1 -1
- package/lite/src/liteClient.ts +8 -12
- package/package.json +14 -14
- 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
|
@@ -1,8 +1,9 @@
|
|
|
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$4 = '5.0.0-
|
|
6
|
+
const apiClientVersion$4 = '5.0.0-beta.1';
|
|
6
7
|
const REGIONS$2 = ['de', 'us'];
|
|
7
8
|
function getDefaultHosts$3(region) {
|
|
8
9
|
const url = !region
|
|
@@ -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,7 +308,7 @@ 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$3 = '5.0.0-
|
|
311
|
+
const apiClientVersion$3 = '5.0.0-beta.1';
|
|
305
312
|
const REGIONS$1 = ['de', 'us'];
|
|
306
313
|
function getDefaultHosts$2(region) {
|
|
307
314
|
const url = !region
|
|
@@ -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.
|
|
628
|
+
*
|
|
629
|
+
* Required API Key ACLs:
|
|
630
|
+
* - analytics.
|
|
579
631
|
*
|
|
580
|
-
* @
|
|
581
|
-
* @param
|
|
582
|
-
* @param
|
|
583
|
-
* @param
|
|
584
|
-
* @param
|
|
585
|
-
* @param getConversationRate.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
|
|
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.
|
|
1060
|
-
* @param
|
|
1061
|
-
|
|
1062
|
-
|
|
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/).
|
|
1214
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1215
|
+
*/
|
|
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,7 +1363,7 @@ 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$2 = '5.0.0-
|
|
1366
|
+
const apiClientVersion$2 = '5.0.0-beta.1';
|
|
1202
1367
|
const REGIONS = ['eu', 'us'];
|
|
1203
1368
|
function getDefaultHosts$1(region) {
|
|
1204
1369
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -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,7 +1624,7 @@ 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$1 = '5.0.0-
|
|
1627
|
+
const apiClientVersion$1 = '5.0.0-beta.1';
|
|
1459
1628
|
function getDefaultHosts(appId) {
|
|
1460
1629
|
return [
|
|
1461
1630
|
{
|
|
@@ -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.
|
|
@@ -1565,7 +1734,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1565
1734
|
* Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
|
|
1566
1735
|
*
|
|
1567
1736
|
* @summary Helper method that waits for an API key task to be processed.
|
|
1568
|
-
* @param waitForApiKeyOptions - The waitForApiKeyOptions object.
|
|
1737
|
+
* @param waitForApiKeyOptions - The `waitForApiKeyOptions` object.
|
|
1569
1738
|
* @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.
|
|
1570
1739
|
* @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.
|
|
1571
1740
|
* @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.
|
|
@@ -1618,7 +1787,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1618
1787
|
* Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index.
|
|
1619
1788
|
*
|
|
1620
1789
|
* @summary Helper method that iterates on the `browse` method.
|
|
1621
|
-
* @param browseObjects - The browseObjects object.
|
|
1790
|
+
* @param browseObjects - The `browseObjects` object.
|
|
1622
1791
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
1623
1792
|
* @param browseObjects.browseParams - The `browse` parameters.
|
|
1624
1793
|
* @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 +1813,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1644
1813
|
* Helper: Iterate on the `searchRules` method of the client to allow aggregating rules of an index.
|
|
1645
1814
|
*
|
|
1646
1815
|
* @summary Helper method that iterates on the `searchRules` method.
|
|
1647
|
-
* @param
|
|
1648
|
-
* @param
|
|
1649
|
-
* @param
|
|
1650
|
-
* @param
|
|
1651
|
-
* @param
|
|
1816
|
+
* @param browseRules - The `browseRules` object.
|
|
1817
|
+
* @param browseRules.indexName - The index in which to perform the request.
|
|
1818
|
+
* @param browseRules.searchRulesParams - The `searchRules` method parameters.
|
|
1819
|
+
* @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).
|
|
1820
|
+
* @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
1821
|
* @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
1822
|
*/
|
|
1654
1823
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
|
|
@@ -1676,11 +1845,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1676
1845
|
* Helper: Iterate on the `searchSynonyms` method of the client to allow aggregating rules of an index.
|
|
1677
1846
|
*
|
|
1678
1847
|
* @summary Helper method that iterates on the `searchSynonyms` method.
|
|
1679
|
-
* @param
|
|
1680
|
-
* @param
|
|
1681
|
-
* @param
|
|
1682
|
-
* @param
|
|
1683
|
-
* @param
|
|
1848
|
+
* @param browseSynonyms - The `browseSynonyms` object.
|
|
1849
|
+
* @param browseSynonyms.indexName - The index in which to perform the request.
|
|
1850
|
+
* @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).
|
|
1851
|
+
* @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`.
|
|
1852
|
+
* @param browseSynonyms.searchSynonymsParams - The `searchSynonyms` method parameters.
|
|
1684
1853
|
* @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
1854
|
*/
|
|
1686
1855
|
browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }, requestOptions) {
|
|
@@ -1690,16 +1859,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1690
1859
|
hitsPerPage: 1000,
|
|
1691
1860
|
};
|
|
1692
1861
|
return createIterablePromise({
|
|
1693
|
-
func: (
|
|
1694
|
-
|
|
1862
|
+
func: (_) => {
|
|
1863
|
+
const resp = this.searchSynonyms({
|
|
1695
1864
|
indexName,
|
|
1696
1865
|
searchSynonymsParams: {
|
|
1697
1866
|
...params,
|
|
1698
|
-
page:
|
|
1699
|
-
? previousResponse.page + 1
|
|
1700
|
-
: params.page,
|
|
1867
|
+
page: params.page,
|
|
1701
1868
|
},
|
|
1702
1869
|
}, requestOptions);
|
|
1870
|
+
params.page += 1;
|
|
1871
|
+
return resp;
|
|
1703
1872
|
},
|
|
1704
1873
|
validate: (response) => response.nbHits < params.hitsPerPage,
|
|
1705
1874
|
...browseSynonymsOptions,
|
|
@@ -1728,9 +1897,76 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1728
1897
|
return this.search(searchMethodParams, requestOptions);
|
|
1729
1898
|
},
|
|
1730
1899
|
/**
|
|
1731
|
-
*
|
|
1900
|
+
* Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
|
|
1901
|
+
*
|
|
1902
|
+
* @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
|
|
1903
|
+
* @param chunkedBatch - The `chunkedBatch` object.
|
|
1904
|
+
* @param chunkedBatch.indexName - The `indexName` to replace `objects` in.
|
|
1905
|
+
* @param chunkedBatch.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
1906
|
+
* @param chunkedBatch.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
|
|
1907
|
+
* @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.
|
|
1908
|
+
* @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.
|
|
1909
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1910
|
+
*/
|
|
1911
|
+
async chunkedBatch({ indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000, }, requestOptions) {
|
|
1912
|
+
let requests = [];
|
|
1913
|
+
const responses = [];
|
|
1914
|
+
for (const [i, obj] of objects.entries()) {
|
|
1915
|
+
requests.push({ action, body: obj });
|
|
1916
|
+
if (i % batchSize === 0) {
|
|
1917
|
+
responses.push(await this.batch({ indexName, batchWriteParams: { requests } }, requestOptions));
|
|
1918
|
+
requests = [];
|
|
1919
|
+
}
|
|
1920
|
+
}
|
|
1921
|
+
if (waitForTasks) {
|
|
1922
|
+
for (const resp of responses) {
|
|
1923
|
+
await this.waitForTask({ indexName, taskID: resp.taskID });
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
return responses;
|
|
1927
|
+
},
|
|
1928
|
+
/**
|
|
1929
|
+
* 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.
|
|
1930
|
+
*
|
|
1931
|
+
* @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.
|
|
1932
|
+
* @param replaceAllObjects - The `replaceAllObjects` object.
|
|
1933
|
+
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
1934
|
+
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
1935
|
+
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
1936
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1937
|
+
*/
|
|
1938
|
+
async replaceAllObjects({ indexName, objects, batchSize }, requestOptions) {
|
|
1939
|
+
const randomSuffix = Math.random().toString(36).substring(7);
|
|
1940
|
+
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
1941
|
+
const copyOperationResponse = await this.operationIndex({
|
|
1942
|
+
indexName,
|
|
1943
|
+
operationIndexParams: {
|
|
1944
|
+
operation: 'copy',
|
|
1945
|
+
destination: tmpIndexName,
|
|
1946
|
+
scope: ['settings', 'rules', 'synonyms'],
|
|
1947
|
+
},
|
|
1948
|
+
}, requestOptions);
|
|
1949
|
+
await this.waitForTask({
|
|
1950
|
+
indexName,
|
|
1951
|
+
taskID: copyOperationResponse.taskID,
|
|
1952
|
+
});
|
|
1953
|
+
const batchResponses = await this.chunkedBatch({ indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, requestOptions);
|
|
1954
|
+
const moveOperationResponse = await this.operationIndex({
|
|
1955
|
+
indexName: tmpIndexName,
|
|
1956
|
+
operationIndexParams: { operation: 'move', destination: indexName },
|
|
1957
|
+
}, requestOptions);
|
|
1958
|
+
await this.waitForTask({
|
|
1959
|
+
indexName,
|
|
1960
|
+
taskID: moveOperationResponse.taskID,
|
|
1961
|
+
});
|
|
1962
|
+
return { copyOperationResponse, batchResponses, moveOperationResponse };
|
|
1963
|
+
},
|
|
1964
|
+
/**
|
|
1965
|
+
* Creates a new API key with specific permissions and restrictions.
|
|
1966
|
+
*
|
|
1967
|
+
* Required API Key ACLs:
|
|
1968
|
+
* - admin.
|
|
1732
1969
|
*
|
|
1733
|
-
* @summary Add API key.
|
|
1734
1970
|
* @param apiKey - The apiKey object.
|
|
1735
1971
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1736
1972
|
*/
|
|
@@ -1754,13 +1990,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1754
1990
|
return transporter.request(request, requestOptions);
|
|
1755
1991
|
},
|
|
1756
1992
|
/**
|
|
1757
|
-
* If
|
|
1993
|
+
* 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).
|
|
1994
|
+
*
|
|
1995
|
+
* Required API Key ACLs:
|
|
1996
|
+
* - addObject.
|
|
1758
1997
|
*
|
|
1759
|
-
* @summary Add or update a record (using objectID).
|
|
1760
1998
|
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
1761
|
-
* @param addOrUpdateObject.indexName -
|
|
1762
|
-
* @param addOrUpdateObject.objectID - Unique record
|
|
1763
|
-
* @param addOrUpdateObject.body -
|
|
1999
|
+
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
2000
|
+
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
2001
|
+
* @param addOrUpdateObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
|
|
1764
2002
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1765
2003
|
*/
|
|
1766
2004
|
addOrUpdateObject({ indexName, objectID, body }, requestOptions) {
|
|
@@ -1788,9 +2026,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1788
2026
|
return transporter.request(request, requestOptions);
|
|
1789
2027
|
},
|
|
1790
2028
|
/**
|
|
1791
|
-
*
|
|
2029
|
+
* Adds a source to the list of allowed sources.
|
|
2030
|
+
*
|
|
2031
|
+
* Required API Key ACLs:
|
|
2032
|
+
* - admin.
|
|
1792
2033
|
*
|
|
1793
|
-
* @summary Add a source.
|
|
1794
2034
|
* @param source - Source to add.
|
|
1795
2035
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1796
2036
|
*/
|
|
@@ -1814,11 +2054,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1814
2054
|
return transporter.request(request, requestOptions);
|
|
1815
2055
|
},
|
|
1816
2056
|
/**
|
|
1817
|
-
*
|
|
2057
|
+
* 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.
|
|
2058
|
+
*
|
|
2059
|
+
* Required API Key ACLs:
|
|
2060
|
+
* - admin.
|
|
1818
2061
|
*
|
|
1819
|
-
* @summary Assign or move a user ID.
|
|
1820
2062
|
* @param assignUserId - The assignUserId object.
|
|
1821
|
-
* @param assignUserId.xAlgoliaUserID -
|
|
2063
|
+
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
1822
2064
|
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
1823
2065
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1824
2066
|
*/
|
|
@@ -1848,11 +2090,10 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1848
2090
|
return transporter.request(request, requestOptions);
|
|
1849
2091
|
},
|
|
1850
2092
|
/**
|
|
1851
|
-
*
|
|
2093
|
+
* 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
2094
|
*
|
|
1853
|
-
* @summary Batch write operations on one index.
|
|
1854
2095
|
* @param batch - The batch object.
|
|
1855
|
-
* @param batch.indexName -
|
|
2096
|
+
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
1856
2097
|
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
1857
2098
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1858
2099
|
*/
|
|
@@ -1879,11 +2120,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1879
2120
|
return transporter.request(request, requestOptions);
|
|
1880
2121
|
},
|
|
1881
2122
|
/**
|
|
1882
|
-
*
|
|
2123
|
+
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
2124
|
+
*
|
|
2125
|
+
* Required API Key ACLs:
|
|
2126
|
+
* - admin.
|
|
1883
2127
|
*
|
|
1884
|
-
* @summary Batch assign userIDs.
|
|
1885
2128
|
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
1886
|
-
* @param batchAssignUserIds.xAlgoliaUserID -
|
|
2129
|
+
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
1887
2130
|
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
1888
2131
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1889
2132
|
*/
|
|
@@ -1916,11 +2159,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1916
2159
|
return transporter.request(request, requestOptions);
|
|
1917
2160
|
},
|
|
1918
2161
|
/**
|
|
1919
|
-
*
|
|
2162
|
+
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
2163
|
+
*
|
|
2164
|
+
* Required API Key ACLs:
|
|
2165
|
+
* - editSettings.
|
|
1920
2166
|
*
|
|
1921
|
-
* @summary Batch dictionary entries.
|
|
1922
2167
|
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
1923
|
-
* @param batchDictionaryEntries.dictionaryName - Dictionary to search
|
|
2168
|
+
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
1924
2169
|
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
1925
2170
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1926
2171
|
*/
|
|
@@ -1947,11 +2192,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1947
2192
|
return transporter.request(request, requestOptions);
|
|
1948
2193
|
},
|
|
1949
2194
|
/**
|
|
1950
|
-
*
|
|
2195
|
+
* 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. - Deduplication (`distinct`) is turned off. - There\'s no ranking for: typo-tolerance, number of matched words, proximity, geo distance.
|
|
2196
|
+
*
|
|
2197
|
+
* Required API Key ACLs:
|
|
2198
|
+
* - browse.
|
|
1951
2199
|
*
|
|
1952
|
-
* @summary Get all records from an index.
|
|
1953
2200
|
* @param browse - The browse object.
|
|
1954
|
-
* @param browse.indexName -
|
|
2201
|
+
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
1955
2202
|
* @param browse.browseParams - The browseParams object.
|
|
1956
2203
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1957
2204
|
*/
|
|
@@ -1972,11 +2219,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1972
2219
|
return transporter.request(request, requestOptions);
|
|
1973
2220
|
},
|
|
1974
2221
|
/**
|
|
1975
|
-
*
|
|
2222
|
+
* Deletes only the records from an index while keeping settings, synonyms, and rules.
|
|
2223
|
+
*
|
|
2224
|
+
* Required API Key ACLs:
|
|
2225
|
+
* - deleteIndex.
|
|
1976
2226
|
*
|
|
1977
|
-
* @summary Delete all records from an index.
|
|
1978
2227
|
* @param clearObjects - The clearObjects object.
|
|
1979
|
-
* @param clearObjects.indexName -
|
|
2228
|
+
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
1980
2229
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1981
2230
|
*/
|
|
1982
2231
|
clearObjects({ indexName }, requestOptions) {
|
|
@@ -1995,12 +2244,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1995
2244
|
return transporter.request(request, requestOptions);
|
|
1996
2245
|
},
|
|
1997
2246
|
/**
|
|
1998
|
-
*
|
|
2247
|
+
* Deletes all rules from the index.
|
|
2248
|
+
*
|
|
2249
|
+
* Required API Key ACLs:
|
|
2250
|
+
* - editSettings.
|
|
1999
2251
|
*
|
|
2000
|
-
* @summary Delete all rules.
|
|
2001
2252
|
* @param clearRules - The clearRules object.
|
|
2002
|
-
* @param clearRules.indexName -
|
|
2003
|
-
* @param clearRules.forwardToReplicas -
|
|
2253
|
+
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
2254
|
+
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2004
2255
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2005
2256
|
*/
|
|
2006
2257
|
clearRules({ indexName, forwardToReplicas }, requestOptions) {
|
|
@@ -2022,12 +2273,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2022
2273
|
return transporter.request(request, requestOptions);
|
|
2023
2274
|
},
|
|
2024
2275
|
/**
|
|
2025
|
-
*
|
|
2276
|
+
* Deletes all synonyms from the index.
|
|
2277
|
+
*
|
|
2278
|
+
* Required API Key ACLs:
|
|
2279
|
+
* - editSettings.
|
|
2026
2280
|
*
|
|
2027
|
-
* @summary Delete all synonyms.
|
|
2028
2281
|
* @param clearSynonyms - The clearSynonyms object.
|
|
2029
|
-
* @param clearSynonyms.indexName -
|
|
2030
|
-
* @param clearSynonyms.forwardToReplicas -
|
|
2282
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
2283
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2031
2284
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2032
2285
|
*/
|
|
2033
2286
|
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
@@ -2051,7 +2304,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2051
2304
|
/**
|
|
2052
2305
|
* This method allow you to send requests to the Algolia REST API.
|
|
2053
2306
|
*
|
|
2054
|
-
* @summary Send requests to the Algolia REST API.
|
|
2055
2307
|
* @param customDelete - The customDelete object.
|
|
2056
2308
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2057
2309
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -2061,7 +2313,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2061
2313
|
if (!path) {
|
|
2062
2314
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
2063
2315
|
}
|
|
2064
|
-
const requestPath = '/
|
|
2316
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2065
2317
|
const headers = {};
|
|
2066
2318
|
const queryParameters = parameters ? parameters : {};
|
|
2067
2319
|
const request = {
|
|
@@ -2075,7 +2327,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2075
2327
|
/**
|
|
2076
2328
|
* This method allow you to send requests to the Algolia REST API.
|
|
2077
2329
|
*
|
|
2078
|
-
* @summary Send requests to the Algolia REST API.
|
|
2079
2330
|
* @param customGet - The customGet object.
|
|
2080
2331
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2081
2332
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -2085,7 +2336,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2085
2336
|
if (!path) {
|
|
2086
2337
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
2087
2338
|
}
|
|
2088
|
-
const requestPath = '/
|
|
2339
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2089
2340
|
const headers = {};
|
|
2090
2341
|
const queryParameters = parameters ? parameters : {};
|
|
2091
2342
|
const request = {
|
|
@@ -2099,7 +2350,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2099
2350
|
/**
|
|
2100
2351
|
* This method allow you to send requests to the Algolia REST API.
|
|
2101
2352
|
*
|
|
2102
|
-
* @summary Send requests to the Algolia REST API.
|
|
2103
2353
|
* @param customPost - The customPost object.
|
|
2104
2354
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2105
2355
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -2110,7 +2360,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2110
2360
|
if (!path) {
|
|
2111
2361
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
2112
2362
|
}
|
|
2113
|
-
const requestPath = '/
|
|
2363
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2114
2364
|
const headers = {};
|
|
2115
2365
|
const queryParameters = parameters ? parameters : {};
|
|
2116
2366
|
const request = {
|
|
@@ -2125,7 +2375,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2125
2375
|
/**
|
|
2126
2376
|
* This method allow you to send requests to the Algolia REST API.
|
|
2127
2377
|
*
|
|
2128
|
-
* @summary Send requests to the Algolia REST API.
|
|
2129
2378
|
* @param customPut - The customPut object.
|
|
2130
2379
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2131
2380
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -2136,7 +2385,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2136
2385
|
if (!path) {
|
|
2137
2386
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
2138
2387
|
}
|
|
2139
|
-
const requestPath = '/
|
|
2388
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2140
2389
|
const headers = {};
|
|
2141
2390
|
const queryParameters = parameters ? parameters : {};
|
|
2142
2391
|
const request = {
|
|
@@ -2149,9 +2398,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2149
2398
|
return transporter.request(request, requestOptions);
|
|
2150
2399
|
},
|
|
2151
2400
|
/**
|
|
2152
|
-
*
|
|
2401
|
+
* Deletes the API key.
|
|
2402
|
+
*
|
|
2403
|
+
* Required API Key ACLs:
|
|
2404
|
+
* - admin.
|
|
2153
2405
|
*
|
|
2154
|
-
* @summary Delete API key.
|
|
2155
2406
|
* @param deleteApiKey - The deleteApiKey object.
|
|
2156
2407
|
* @param deleteApiKey.key - API key.
|
|
2157
2408
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2172,11 +2423,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2172
2423
|
return transporter.request(request, requestOptions);
|
|
2173
2424
|
},
|
|
2174
2425
|
/**
|
|
2175
|
-
* This operation doesn\'t
|
|
2426
|
+
* 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).
|
|
2427
|
+
*
|
|
2428
|
+
* Required API Key ACLs:
|
|
2429
|
+
* - deleteIndex.
|
|
2176
2430
|
*
|
|
2177
|
-
* @summary Delete all records matching a query.
|
|
2178
2431
|
* @param deleteBy - The deleteBy object.
|
|
2179
|
-
* @param deleteBy.indexName -
|
|
2432
|
+
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
2180
2433
|
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
2181
2434
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2182
2435
|
*/
|
|
@@ -2200,11 +2453,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2200
2453
|
return transporter.request(request, requestOptions);
|
|
2201
2454
|
},
|
|
2202
2455
|
/**
|
|
2203
|
-
*
|
|
2456
|
+
* 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/).
|
|
2457
|
+
*
|
|
2458
|
+
* Required API Key ACLs:
|
|
2459
|
+
* - deleteIndex.
|
|
2204
2460
|
*
|
|
2205
|
-
* @summary Delete index.
|
|
2206
2461
|
* @param deleteIndex - The deleteIndex object.
|
|
2207
|
-
* @param deleteIndex.indexName -
|
|
2462
|
+
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
2208
2463
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2209
2464
|
*/
|
|
2210
2465
|
deleteIndex({ indexName }, requestOptions) {
|
|
@@ -2223,12 +2478,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2223
2478
|
return transporter.request(request, requestOptions);
|
|
2224
2479
|
},
|
|
2225
2480
|
/**
|
|
2226
|
-
* To delete
|
|
2481
|
+
* 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).
|
|
2482
|
+
*
|
|
2483
|
+
* Required API Key ACLs:
|
|
2484
|
+
* - deleteObject.
|
|
2227
2485
|
*
|
|
2228
|
-
* @summary Delete a record.
|
|
2229
2486
|
* @param deleteObject - The deleteObject object.
|
|
2230
|
-
* @param deleteObject.indexName -
|
|
2231
|
-
* @param deleteObject.objectID - Unique record
|
|
2487
|
+
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
2488
|
+
* @param deleteObject.objectID - Unique record identifier.
|
|
2232
2489
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2233
2490
|
*/
|
|
2234
2491
|
deleteObject({ indexName, objectID }, requestOptions) {
|
|
@@ -2252,13 +2509,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2252
2509
|
return transporter.request(request, requestOptions);
|
|
2253
2510
|
},
|
|
2254
2511
|
/**
|
|
2255
|
-
*
|
|
2512
|
+
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
2513
|
+
*
|
|
2514
|
+
* Required API Key ACLs:
|
|
2515
|
+
* - editSettings.
|
|
2256
2516
|
*
|
|
2257
|
-
* @summary Delete a rule.
|
|
2258
2517
|
* @param deleteRule - The deleteRule object.
|
|
2259
|
-
* @param deleteRule.indexName -
|
|
2518
|
+
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
2260
2519
|
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
2261
|
-
* @param deleteRule.forwardToReplicas -
|
|
2520
|
+
* @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2262
2521
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2263
2522
|
*/
|
|
2264
2523
|
deleteRule({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
@@ -2285,9 +2544,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2285
2544
|
return transporter.request(request, requestOptions);
|
|
2286
2545
|
},
|
|
2287
2546
|
/**
|
|
2288
|
-
*
|
|
2547
|
+
* Deletes a source from the list of allowed sources.
|
|
2548
|
+
*
|
|
2549
|
+
* Required API Key ACLs:
|
|
2550
|
+
* - admin.
|
|
2289
2551
|
*
|
|
2290
|
-
* @summary Remove a source.
|
|
2291
2552
|
* @param deleteSource - The deleteSource object.
|
|
2292
2553
|
* @param deleteSource.source - IP address range of the source.
|
|
2293
2554
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2308,13 +2569,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2308
2569
|
return transporter.request(request, requestOptions);
|
|
2309
2570
|
},
|
|
2310
2571
|
/**
|
|
2311
|
-
*
|
|
2572
|
+
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
2573
|
+
*
|
|
2574
|
+
* Required API Key ACLs:
|
|
2575
|
+
* - editSettings.
|
|
2312
2576
|
*
|
|
2313
|
-
* @summary Delete a synonym.
|
|
2314
2577
|
* @param deleteSynonym - The deleteSynonym object.
|
|
2315
|
-
* @param deleteSynonym.indexName -
|
|
2578
|
+
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
2316
2579
|
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
2317
|
-
* @param deleteSynonym.forwardToReplicas -
|
|
2580
|
+
* @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2318
2581
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2319
2582
|
*/
|
|
2320
2583
|
deleteSynonym({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
@@ -2341,9 +2604,8 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2341
2604
|
return transporter.request(request, requestOptions);
|
|
2342
2605
|
},
|
|
2343
2606
|
/**
|
|
2344
|
-
*
|
|
2607
|
+
* 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
2608
|
*
|
|
2346
|
-
* @summary Get API key permissions.
|
|
2347
2609
|
* @param getApiKey - The getApiKey object.
|
|
2348
2610
|
* @param getApiKey.key - API key.
|
|
2349
2611
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2364,9 +2626,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2364
2626
|
return transporter.request(request, requestOptions);
|
|
2365
2627
|
},
|
|
2366
2628
|
/**
|
|
2367
|
-
* Lists
|
|
2629
|
+
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
2630
|
+
*
|
|
2631
|
+
* Required API Key ACLs:
|
|
2632
|
+
* - settings.
|
|
2368
2633
|
*
|
|
2369
|
-
* @summary List available languages.
|
|
2370
2634
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2371
2635
|
*/
|
|
2372
2636
|
getDictionaryLanguages(requestOptions) {
|
|
@@ -2382,9 +2646,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2382
2646
|
return transporter.request(request, requestOptions);
|
|
2383
2647
|
},
|
|
2384
2648
|
/**
|
|
2385
|
-
*
|
|
2649
|
+
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
2650
|
+
*
|
|
2651
|
+
* Required API Key ACLs:
|
|
2652
|
+
* - settings.
|
|
2386
2653
|
*
|
|
2387
|
-
* @summary Get stop word settings.
|
|
2388
2654
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2389
2655
|
*/
|
|
2390
2656
|
getDictionarySettings(requestOptions) {
|
|
@@ -2400,14 +2666,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2400
2666
|
return transporter.request(request, requestOptions);
|
|
2401
2667
|
},
|
|
2402
2668
|
/**
|
|
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.
|
|
2669
|
+
* 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.
|
|
2670
|
+
*
|
|
2671
|
+
* Required API Key ACLs:
|
|
2672
|
+
* - logs.
|
|
2404
2673
|
*
|
|
2405
|
-
* @summary Return the latest log entries.
|
|
2406
2674
|
* @param getLogs - The getLogs object.
|
|
2407
|
-
* @param getLogs.offset - First log entry to retrieve.
|
|
2675
|
+
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
2408
2676
|
* @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.
|
|
2677
|
+
* @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
|
|
2678
|
+
* @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
|
|
2411
2679
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2412
2680
|
*/
|
|
2413
2681
|
getLogs({ offset, length, indexName, type } = {}, requestOptions = undefined) {
|
|
@@ -2435,13 +2703,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2435
2703
|
return transporter.request(request, requestOptions);
|
|
2436
2704
|
},
|
|
2437
2705
|
/**
|
|
2438
|
-
* To
|
|
2706
|
+
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
|
2707
|
+
*
|
|
2708
|
+
* Required API Key ACLs:
|
|
2709
|
+
* - search.
|
|
2439
2710
|
*
|
|
2440
|
-
* @summary Get a record.
|
|
2441
2711
|
* @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.
|
|
2712
|
+
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
2713
|
+
* @param getObject.objectID - Unique record identifier.
|
|
2714
|
+
* @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
2715
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2446
2716
|
*/
|
|
2447
2717
|
getObject({ indexName, objectID, attributesToRetrieve }, requestOptions) {
|
|
@@ -2468,9 +2738,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2468
2738
|
return transporter.request(request, requestOptions);
|
|
2469
2739
|
},
|
|
2470
2740
|
/**
|
|
2471
|
-
*
|
|
2741
|
+
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
2742
|
+
*
|
|
2743
|
+
* Required API Key ACLs:
|
|
2744
|
+
* - search.
|
|
2472
2745
|
*
|
|
2473
|
-
* @summary Get multiple records.
|
|
2474
2746
|
* @param getObjectsParams - Request object.
|
|
2475
2747
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2476
2748
|
*/
|
|
@@ -2496,11 +2768,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2496
2768
|
return transporter.request(request, requestOptions);
|
|
2497
2769
|
},
|
|
2498
2770
|
/**
|
|
2499
|
-
*
|
|
2771
|
+
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
2772
|
+
*
|
|
2773
|
+
* Required API Key ACLs:
|
|
2774
|
+
* - settings.
|
|
2500
2775
|
*
|
|
2501
|
-
* @summary Get a rule.
|
|
2502
2776
|
* @param getRule - The getRule object.
|
|
2503
|
-
* @param getRule.indexName -
|
|
2777
|
+
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
2504
2778
|
* @param getRule.objectID - Unique identifier of a rule object.
|
|
2505
2779
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2506
2780
|
*/
|
|
@@ -2525,11 +2799,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2525
2799
|
return transporter.request(request, requestOptions);
|
|
2526
2800
|
},
|
|
2527
2801
|
/**
|
|
2528
|
-
*
|
|
2802
|
+
* Retrieves an object with non-null index settings.
|
|
2803
|
+
*
|
|
2804
|
+
* Required API Key ACLs:
|
|
2805
|
+
* - search.
|
|
2529
2806
|
*
|
|
2530
|
-
* @summary Get index settings.
|
|
2531
2807
|
* @param getSettings - The getSettings object.
|
|
2532
|
-
* @param getSettings.indexName -
|
|
2808
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2533
2809
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2534
2810
|
*/
|
|
2535
2811
|
getSettings({ indexName }, requestOptions) {
|
|
@@ -2548,9 +2824,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2548
2824
|
return transporter.request(request, requestOptions);
|
|
2549
2825
|
},
|
|
2550
2826
|
/**
|
|
2551
|
-
*
|
|
2827
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2828
|
+
*
|
|
2829
|
+
* Required API Key ACLs:
|
|
2830
|
+
* - admin.
|
|
2552
2831
|
*
|
|
2553
|
-
* @summary Get all allowed IP addresses.
|
|
2554
2832
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2555
2833
|
*/
|
|
2556
2834
|
getSources(requestOptions) {
|
|
@@ -2566,11 +2844,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2566
2844
|
return transporter.request(request, requestOptions);
|
|
2567
2845
|
},
|
|
2568
2846
|
/**
|
|
2569
|
-
*
|
|
2847
|
+
* Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
2848
|
+
*
|
|
2849
|
+
* Required API Key ACLs:
|
|
2850
|
+
* - settings.
|
|
2570
2851
|
*
|
|
2571
|
-
* @summary Get a synonym object.
|
|
2572
2852
|
* @param getSynonym - The getSynonym object.
|
|
2573
|
-
* @param getSynonym.indexName -
|
|
2853
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2574
2854
|
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2575
2855
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2576
2856
|
*/
|
|
@@ -2595,11 +2875,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2595
2875
|
return transporter.request(request, requestOptions);
|
|
2596
2876
|
},
|
|
2597
2877
|
/**
|
|
2598
|
-
*
|
|
2878
|
+
* 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.
|
|
2879
|
+
*
|
|
2880
|
+
* Required API Key ACLs:
|
|
2881
|
+
* - addObject.
|
|
2599
2882
|
*
|
|
2600
|
-
* @summary Check a task\'s status.
|
|
2601
2883
|
* @param getTask - The getTask object.
|
|
2602
|
-
* @param getTask.indexName -
|
|
2884
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2603
2885
|
* @param getTask.taskID - Unique task identifier.
|
|
2604
2886
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2605
2887
|
*/
|
|
@@ -2624,9 +2906,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2624
2906
|
return transporter.request(request, requestOptions);
|
|
2625
2907
|
},
|
|
2626
2908
|
/**
|
|
2627
|
-
* Get the IDs of the 10 users with the highest number of records per cluster.
|
|
2909
|
+
* 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.
|
|
2910
|
+
*
|
|
2911
|
+
* Required API Key ACLs:
|
|
2912
|
+
* - admin.
|
|
2628
2913
|
*
|
|
2629
|
-
* @summary Get top userID.
|
|
2630
2914
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2631
2915
|
*/
|
|
2632
2916
|
getTopUserIds(requestOptions) {
|
|
@@ -2642,11 +2926,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2642
2926
|
return transporter.request(request, requestOptions);
|
|
2643
2927
|
},
|
|
2644
2928
|
/**
|
|
2645
|
-
* Returns the
|
|
2929
|
+
* 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.
|
|
2930
|
+
*
|
|
2931
|
+
* Required API Key ACLs:
|
|
2932
|
+
* - admin.
|
|
2646
2933
|
*
|
|
2647
|
-
* @summary Get userID.
|
|
2648
2934
|
* @param getUserId - The getUserId object.
|
|
2649
|
-
* @param getUserId.userID -
|
|
2935
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
2650
2936
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2651
2937
|
*/
|
|
2652
2938
|
getUserId({ userID }, requestOptions) {
|
|
@@ -2667,9 +2953,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2667
2953
|
/**
|
|
2668
2954
|
* 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
2955
|
*
|
|
2670
|
-
*
|
|
2956
|
+
* Required API Key ACLs:
|
|
2957
|
+
* - admin.
|
|
2958
|
+
*
|
|
2671
2959
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
2672
|
-
* @param hasPendingMappings.getClusters -
|
|
2960
|
+
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
2673
2961
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2674
2962
|
*/
|
|
2675
2963
|
hasPendingMappings({ getClusters } = {}, requestOptions = undefined) {
|
|
@@ -2688,9 +2976,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2688
2976
|
return transporter.request(request, requestOptions);
|
|
2689
2977
|
},
|
|
2690
2978
|
/**
|
|
2691
|
-
*
|
|
2979
|
+
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
2980
|
+
*
|
|
2981
|
+
* Required API Key ACLs:
|
|
2982
|
+
* - admin.
|
|
2692
2983
|
*
|
|
2693
|
-
* @summary List API keys.
|
|
2694
2984
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2695
2985
|
*/
|
|
2696
2986
|
listApiKeys(requestOptions) {
|
|
@@ -2706,9 +2996,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2706
2996
|
return transporter.request(request, requestOptions);
|
|
2707
2997
|
},
|
|
2708
2998
|
/**
|
|
2709
|
-
*
|
|
2999
|
+
* Lists the available clusters in a multi-cluster setup.
|
|
3000
|
+
*
|
|
3001
|
+
* Required API Key ACLs:
|
|
3002
|
+
* - admin.
|
|
2710
3003
|
*
|
|
2711
|
-
* @summary List clusters.
|
|
2712
3004
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2713
3005
|
*/
|
|
2714
3006
|
listClusters(requestOptions) {
|
|
@@ -2724,12 +3016,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2724
3016
|
return transporter.request(request, requestOptions);
|
|
2725
3017
|
},
|
|
2726
3018
|
/**
|
|
2727
|
-
*
|
|
3019
|
+
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
3020
|
+
*
|
|
3021
|
+
* Required API Key ACLs:
|
|
3022
|
+
* - listIndexes.
|
|
2728
3023
|
*
|
|
2729
|
-
* @summary List indices.
|
|
2730
3024
|
* @param listIndices - The listIndices object.
|
|
2731
|
-
* @param listIndices.page -
|
|
2732
|
-
* @param listIndices.hitsPerPage -
|
|
3025
|
+
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
3026
|
+
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
2733
3027
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2734
3028
|
*/
|
|
2735
3029
|
listIndices({ page, hitsPerPage } = {}, requestOptions = undefined) {
|
|
@@ -2751,12 +3045,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2751
3045
|
return transporter.request(request, requestOptions);
|
|
2752
3046
|
},
|
|
2753
3047
|
/**
|
|
2754
|
-
*
|
|
3048
|
+
* 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.
|
|
3049
|
+
*
|
|
3050
|
+
* Required API Key ACLs:
|
|
3051
|
+
* - admin.
|
|
2755
3052
|
*
|
|
2756
|
-
* @summary List userIDs.
|
|
2757
3053
|
* @param listUserIds - The listUserIds object.
|
|
2758
|
-
* @param listUserIds.page -
|
|
2759
|
-
* @param listUserIds.hitsPerPage -
|
|
3054
|
+
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
3055
|
+
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
2760
3056
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2761
3057
|
*/
|
|
2762
3058
|
listUserIds({ page, hitsPerPage } = {}, requestOptions = undefined) {
|
|
@@ -2778,9 +3074,8 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2778
3074
|
return transporter.request(request, requestOptions);
|
|
2779
3075
|
},
|
|
2780
3076
|
/**
|
|
2781
|
-
*
|
|
3077
|
+
* 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
3078
|
*
|
|
2783
|
-
* @summary Batch write operations on multiple indices.
|
|
2784
3079
|
* @param batchParams - The batchParams object.
|
|
2785
3080
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2786
3081
|
*/
|
|
@@ -2804,11 +3099,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2804
3099
|
return transporter.request(request, requestOptions);
|
|
2805
3100
|
},
|
|
2806
3101
|
/**
|
|
2807
|
-
*
|
|
3102
|
+
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and 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/).
|
|
3103
|
+
*
|
|
3104
|
+
* Required API Key ACLs:
|
|
3105
|
+
* - addObject.
|
|
2808
3106
|
*
|
|
2809
|
-
* @summary Copy, move, or rename an index.
|
|
2810
3107
|
* @param operationIndex - The operationIndex object.
|
|
2811
|
-
* @param operationIndex.indexName -
|
|
3108
|
+
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
2812
3109
|
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
2813
3110
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2814
3111
|
*/
|
|
@@ -2838,14 +3135,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2838
3135
|
return transporter.request(request, requestOptions);
|
|
2839
3136
|
},
|
|
2840
3137
|
/**
|
|
2841
|
-
*
|
|
3138
|
+
* 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.
|
|
3139
|
+
*
|
|
3140
|
+
* Required API Key ACLs:
|
|
3141
|
+
* - addObject.
|
|
2842
3142
|
*
|
|
2843
|
-
* @summary Update record attributes.
|
|
2844
3143
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2845
|
-
* @param partialUpdateObject.indexName -
|
|
2846
|
-
* @param partialUpdateObject.objectID - Unique record
|
|
2847
|
-
* @param partialUpdateObject.attributesToUpdate -
|
|
2848
|
-
* @param partialUpdateObject.createIfNotExists -
|
|
3144
|
+
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
3145
|
+
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
3146
|
+
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
3147
|
+
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
2849
3148
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2850
3149
|
*/
|
|
2851
3150
|
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }, requestOptions) {
|
|
@@ -2876,11 +3175,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2876
3175
|
return transporter.request(request, requestOptions);
|
|
2877
3176
|
},
|
|
2878
3177
|
/**
|
|
2879
|
-
*
|
|
3178
|
+
* Deletes a user ID and its associated data from the clusters.
|
|
3179
|
+
*
|
|
3180
|
+
* Required API Key ACLs:
|
|
3181
|
+
* - admin.
|
|
2880
3182
|
*
|
|
2881
|
-
* @summary Remove userID.
|
|
2882
3183
|
* @param removeUserId - The removeUserId object.
|
|
2883
|
-
* @param removeUserId.userID -
|
|
3184
|
+
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
2884
3185
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2885
3186
|
*/
|
|
2886
3187
|
removeUserId({ userID }, requestOptions) {
|
|
@@ -2899,9 +3200,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2899
3200
|
return transporter.request(request, requestOptions);
|
|
2900
3201
|
},
|
|
2901
3202
|
/**
|
|
2902
|
-
*
|
|
3203
|
+
* Replaces the list of allowed sources.
|
|
3204
|
+
*
|
|
3205
|
+
* Required API Key ACLs:
|
|
3206
|
+
* - admin.
|
|
2903
3207
|
*
|
|
2904
|
-
* @summary Replace all sources.
|
|
2905
3208
|
* @param replaceSources - The replaceSources object.
|
|
2906
3209
|
* @param replaceSources.source - Allowed sources.
|
|
2907
3210
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2923,9 +3226,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2923
3226
|
return transporter.request(request, requestOptions);
|
|
2924
3227
|
},
|
|
2925
3228
|
/**
|
|
2926
|
-
*
|
|
3229
|
+
* 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.
|
|
3230
|
+
*
|
|
3231
|
+
* Required API Key ACLs:
|
|
3232
|
+
* - admin.
|
|
2927
3233
|
*
|
|
2928
|
-
* @summary Restore API key.
|
|
2929
3234
|
* @param restoreApiKey - The restoreApiKey object.
|
|
2930
3235
|
* @param restoreApiKey.key - API key.
|
|
2931
3236
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2946,12 +3251,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2946
3251
|
return transporter.request(request, requestOptions);
|
|
2947
3252
|
},
|
|
2948
3253
|
/**
|
|
2949
|
-
*
|
|
3254
|
+
* 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).
|
|
3255
|
+
*
|
|
3256
|
+
* Required API Key ACLs:
|
|
3257
|
+
* - addObject.
|
|
2950
3258
|
*
|
|
2951
|
-
* @summary Add or update a record.
|
|
2952
3259
|
* @param saveObject - The saveObject object.
|
|
2953
|
-
* @param saveObject.indexName -
|
|
2954
|
-
* @param saveObject.body - The
|
|
3260
|
+
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
3261
|
+
* @param saveObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
|
|
2955
3262
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2956
3263
|
*/
|
|
2957
3264
|
saveObject({ indexName, body }, requestOptions) {
|
|
@@ -2974,14 +3281,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2974
3281
|
return transporter.request(request, requestOptions);
|
|
2975
3282
|
},
|
|
2976
3283
|
/**
|
|
2977
|
-
* To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
|
|
3284
|
+
* 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).
|
|
3285
|
+
*
|
|
3286
|
+
* Required API Key ACLs:
|
|
3287
|
+
* - editSettings.
|
|
2978
3288
|
*
|
|
2979
|
-
* @summary Create or update a rule.
|
|
2980
3289
|
* @param saveRule - The saveRule object.
|
|
2981
|
-
* @param saveRule.indexName -
|
|
3290
|
+
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
2982
3291
|
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
2983
3292
|
* @param saveRule.rule - The rule object.
|
|
2984
|
-
* @param saveRule.forwardToReplicas -
|
|
3293
|
+
* @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2985
3294
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2986
3295
|
*/
|
|
2987
3296
|
saveRule({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
|
|
@@ -3015,14 +3324,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3015
3324
|
return transporter.request(request, requestOptions);
|
|
3016
3325
|
},
|
|
3017
3326
|
/**
|
|
3018
|
-
* Create or update multiple rules.
|
|
3327
|
+
* 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.
|
|
3328
|
+
*
|
|
3329
|
+
* Required API Key ACLs:
|
|
3330
|
+
* - editSettings.
|
|
3019
3331
|
*
|
|
3020
|
-
* @summary Save a batch of rules.
|
|
3021
3332
|
* @param saveRules - The saveRules object.
|
|
3022
|
-
* @param saveRules.indexName -
|
|
3333
|
+
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
3023
3334
|
* @param saveRules.rules - The rules object.
|
|
3024
|
-
* @param saveRules.forwardToReplicas -
|
|
3025
|
-
* @param saveRules.clearExistingRules -
|
|
3335
|
+
* @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3336
|
+
* @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
|
|
3026
3337
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3027
3338
|
*/
|
|
3028
3339
|
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }, requestOptions) {
|
|
@@ -3051,14 +3362,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3051
3362
|
return transporter.request(request, requestOptions);
|
|
3052
3363
|
},
|
|
3053
3364
|
/**
|
|
3054
|
-
*
|
|
3365
|
+
* 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).
|
|
3366
|
+
*
|
|
3367
|
+
* Required API Key ACLs:
|
|
3368
|
+
* - editSettings.
|
|
3055
3369
|
*
|
|
3056
|
-
* @summary Save a synonym.
|
|
3057
3370
|
* @param saveSynonym - The saveSynonym object.
|
|
3058
|
-
* @param saveSynonym.indexName -
|
|
3371
|
+
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
3059
3372
|
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
3060
3373
|
* @param saveSynonym.synonymHit - The synonymHit object.
|
|
3061
|
-
* @param saveSynonym.forwardToReplicas -
|
|
3374
|
+
* @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3062
3375
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3063
3376
|
*/
|
|
3064
3377
|
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
|
|
@@ -3095,14 +3408,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3095
3408
|
return transporter.request(request, requestOptions);
|
|
3096
3409
|
},
|
|
3097
3410
|
/**
|
|
3098
|
-
*
|
|
3411
|
+
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
|
|
3412
|
+
*
|
|
3413
|
+
* Required API Key ACLs:
|
|
3414
|
+
* - editSettings.
|
|
3099
3415
|
*
|
|
3100
|
-
* @summary Save a batch of synonyms.
|
|
3101
3416
|
* @param saveSynonyms - The saveSynonyms object.
|
|
3102
|
-
* @param saveSynonyms.indexName -
|
|
3417
|
+
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3103
3418
|
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
3104
|
-
* @param saveSynonyms.forwardToReplicas -
|
|
3105
|
-
* @param saveSynonyms.replaceExistingSynonyms -
|
|
3419
|
+
* @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3420
|
+
* @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
|
|
3106
3421
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3107
3422
|
*/
|
|
3108
3423
|
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }, requestOptions) {
|
|
@@ -3132,10 +3447,12 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3132
3447
|
return transporter.request(request, requestOptions);
|
|
3133
3448
|
},
|
|
3134
3449
|
/**
|
|
3135
|
-
*
|
|
3450
|
+
* 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
3451
|
*
|
|
3137
|
-
*
|
|
3138
|
-
*
|
|
3452
|
+
* Required API Key ACLs:
|
|
3453
|
+
* - search.
|
|
3454
|
+
*
|
|
3455
|
+
* @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
|
|
3139
3456
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3140
3457
|
*/
|
|
3141
3458
|
search(searchMethodParams, requestOptions) {
|
|
@@ -3182,11 +3499,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3182
3499
|
return transporter.request(request, requestOptions);
|
|
3183
3500
|
},
|
|
3184
3501
|
/**
|
|
3185
|
-
*
|
|
3502
|
+
* Searches for standard and custom dictionary entries.
|
|
3503
|
+
*
|
|
3504
|
+
* Required API Key ACLs:
|
|
3505
|
+
* - settings.
|
|
3186
3506
|
*
|
|
3187
|
-
* @summary Search dictionary entries.
|
|
3188
3507
|
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
3189
|
-
* @param searchDictionaryEntries.dictionaryName - Dictionary to search
|
|
3508
|
+
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
3190
3509
|
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
3191
3510
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3192
3511
|
*/
|
|
@@ -3215,12 +3534,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3215
3534
|
return transporter.request(request, requestOptions);
|
|
3216
3535
|
},
|
|
3217
3536
|
/**
|
|
3218
|
-
*
|
|
3537
|
+
* 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**.
|
|
3538
|
+
*
|
|
3539
|
+
* Required API Key ACLs:
|
|
3540
|
+
* - search.
|
|
3219
3541
|
*
|
|
3220
|
-
* @summary Search for facet values.
|
|
3221
3542
|
* @param searchForFacetValues - The searchForFacetValues object.
|
|
3222
|
-
* @param searchForFacetValues.indexName -
|
|
3223
|
-
* @param searchForFacetValues.facetName - Facet
|
|
3543
|
+
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
3544
|
+
* @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
3545
|
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
|
|
3225
3546
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3226
3547
|
*/
|
|
@@ -3248,11 +3569,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3248
3569
|
return transporter.request(request, requestOptions);
|
|
3249
3570
|
},
|
|
3250
3571
|
/**
|
|
3251
|
-
*
|
|
3572
|
+
* Searches for rules in your index.
|
|
3573
|
+
*
|
|
3574
|
+
* Required API Key ACLs:
|
|
3575
|
+
* - settings.
|
|
3252
3576
|
*
|
|
3253
|
-
* @summary Search for rules.
|
|
3254
3577
|
* @param searchRules - The searchRules object.
|
|
3255
|
-
* @param searchRules.indexName -
|
|
3578
|
+
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
3256
3579
|
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
3257
3580
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3258
3581
|
*/
|
|
@@ -3275,11 +3598,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3275
3598
|
return transporter.request(request, requestOptions);
|
|
3276
3599
|
},
|
|
3277
3600
|
/**
|
|
3278
|
-
*
|
|
3601
|
+
* 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.
|
|
3602
|
+
*
|
|
3603
|
+
* Required API Key ACLs:
|
|
3604
|
+
* - search.
|
|
3279
3605
|
*
|
|
3280
|
-
* @summary Search an index.
|
|
3281
3606
|
* @param searchSingleIndex - The searchSingleIndex object.
|
|
3282
|
-
* @param searchSingleIndex.indexName -
|
|
3607
|
+
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
3283
3608
|
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
3284
3609
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3285
3610
|
*/
|
|
@@ -3302,11 +3627,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3302
3627
|
return transporter.request(request, requestOptions);
|
|
3303
3628
|
},
|
|
3304
3629
|
/**
|
|
3305
|
-
*
|
|
3630
|
+
* Searches for synonyms in your index.
|
|
3631
|
+
*
|
|
3632
|
+
* Required API Key ACLs:
|
|
3633
|
+
* - settings.
|
|
3306
3634
|
*
|
|
3307
|
-
* @summary Search for synonyms.
|
|
3308
3635
|
* @param searchSynonyms - The searchSynonyms object.
|
|
3309
|
-
* @param searchSynonyms.indexName -
|
|
3636
|
+
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3310
3637
|
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
3311
3638
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3312
3639
|
*/
|
|
@@ -3329,9 +3656,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3329
3656
|
return transporter.request(request, requestOptions);
|
|
3330
3657
|
},
|
|
3331
3658
|
/**
|
|
3332
|
-
* Since it can take
|
|
3659
|
+
* 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).
|
|
3660
|
+
*
|
|
3661
|
+
* Required API Key ACLs:
|
|
3662
|
+
* - admin.
|
|
3333
3663
|
*
|
|
3334
|
-
* @summary Search for a user ID.
|
|
3335
3664
|
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
3336
3665
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3337
3666
|
*/
|
|
@@ -3357,9 +3686,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3357
3686
|
return transporter.request(request, requestOptions);
|
|
3358
3687
|
},
|
|
3359
3688
|
/**
|
|
3360
|
-
*
|
|
3689
|
+
* Turns standard stop word dictionary entries on or off for a given language.
|
|
3690
|
+
*
|
|
3691
|
+
* Required API Key ACLs:
|
|
3692
|
+
* - editSettings.
|
|
3361
3693
|
*
|
|
3362
|
-
* @summary Set stop word settings.
|
|
3363
3694
|
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
3364
3695
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3365
3696
|
*/
|
|
@@ -3383,13 +3714,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3383
3714
|
return transporter.request(request, requestOptions);
|
|
3384
3715
|
},
|
|
3385
3716
|
/**
|
|
3386
|
-
* Update the specified
|
|
3717
|
+
* 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.
|
|
3718
|
+
*
|
|
3719
|
+
* Required API Key ACLs:
|
|
3720
|
+
* - editSettings.
|
|
3387
3721
|
*
|
|
3388
|
-
* @summary Update index settings.
|
|
3389
3722
|
* @param setSettings - The setSettings object.
|
|
3390
|
-
* @param setSettings.indexName -
|
|
3723
|
+
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
3391
3724
|
* @param setSettings.indexSettings - The indexSettings object.
|
|
3392
|
-
* @param setSettings.forwardToReplicas -
|
|
3725
|
+
* @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3393
3726
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3394
3727
|
*/
|
|
3395
3728
|
setSettings({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
|
|
@@ -3415,9 +3748,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3415
3748
|
return transporter.request(request, requestOptions);
|
|
3416
3749
|
},
|
|
3417
3750
|
/**
|
|
3418
|
-
*
|
|
3751
|
+
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
3752
|
+
*
|
|
3753
|
+
* Required API Key ACLs:
|
|
3754
|
+
* - admin.
|
|
3419
3755
|
*
|
|
3420
|
-
* @summary Update an API key.
|
|
3421
3756
|
* @param updateApiKey - The updateApiKey object.
|
|
3422
3757
|
* @param updateApiKey.key - API key.
|
|
3423
3758
|
* @param updateApiKey.apiKey - The apiKey object.
|
|
@@ -3521,6 +3856,36 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
3521
3856
|
initAnalytics,
|
|
3522
3857
|
initPersonalization,
|
|
3523
3858
|
initAbtesting,
|
|
3859
|
+
/**
|
|
3860
|
+
* Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.
|
|
3861
|
+
*
|
|
3862
|
+
* @summary Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.
|
|
3863
|
+
* @param generateSecuredApiKey - The `generateSecuredApiKey` object.
|
|
3864
|
+
* @param generateSecuredApiKey.parentApiKey - The base API key from which to generate the new secured one.
|
|
3865
|
+
* @param generateSecuredApiKey.restrictions - A set of properties defining the restrictions of the secured API key.
|
|
3866
|
+
*/
|
|
3867
|
+
generateSecuredApiKey({ parentApiKey, restrictions = {}, }) {
|
|
3868
|
+
const queryParameters = serializeQueryParameters(restrictions);
|
|
3869
|
+
return Buffer.from(createHmac('sha256', parentApiKey)
|
|
3870
|
+
.update(queryParameters)
|
|
3871
|
+
.digest('hex') + queryParameters).toString('base64');
|
|
3872
|
+
},
|
|
3873
|
+
/**
|
|
3874
|
+
* Helper: Retrieves the remaining validity of the previous generated `securedApiKey`, the `ValidUntil` parameter must have been provided.
|
|
3875
|
+
*
|
|
3876
|
+
* @summary Helper: Retrieves the remaining validity of the previous generated `secured_api_key`, the `ValidUntil` parameter must have been provided.
|
|
3877
|
+
* @param getSecuredApiKeyRemainingValidity - The `getSecuredApiKeyRemainingValidity` object.
|
|
3878
|
+
* @param getSecuredApiKeyRemainingValidity.securedApiKey - The secured API key generated with the `generateSecuredApiKey` method.
|
|
3879
|
+
*/
|
|
3880
|
+
getSecuredApiKeyRemainingValidity({ securedApiKey, }) {
|
|
3881
|
+
const decodedString = Buffer.from(securedApiKey, 'base64').toString('ascii');
|
|
3882
|
+
const regex = /validUntil=(\d+)/;
|
|
3883
|
+
const match = decodedString.match(regex);
|
|
3884
|
+
if (match === null) {
|
|
3885
|
+
throw new Error('validUntil not found in given secured api key.');
|
|
3886
|
+
}
|
|
3887
|
+
return parseInt(match[1], 10) - Math.round(new Date().getTime() / 1000);
|
|
3888
|
+
},
|
|
3524
3889
|
};
|
|
3525
3890
|
}
|
|
3526
3891
|
|