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
package/dist/algoliasearch.cjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var crypto = require('crypto');
|
|
3
4
|
var clientCommon = require('@algolia/client-common');
|
|
4
5
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
5
6
|
|
|
6
7
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
7
|
-
const apiClientVersion$4 = '5.0.0-
|
|
8
|
+
const apiClientVersion$4 = '5.0.0-beta.1';
|
|
8
9
|
const REGIONS$2 = ['de', 'us'];
|
|
9
10
|
function getDefaultHosts$3(region) {
|
|
10
11
|
const url = !region
|
|
@@ -64,9 +65,11 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
64
65
|
transporter.algoliaAgent.add({ segment, version });
|
|
65
66
|
},
|
|
66
67
|
/**
|
|
67
|
-
* Creates
|
|
68
|
+
* Creates a new A/B test.
|
|
69
|
+
*
|
|
70
|
+
* Required API Key ACLs:
|
|
71
|
+
* - editSettings.
|
|
68
72
|
*
|
|
69
|
-
* @summary Create an A/B test.
|
|
70
73
|
* @param addABTestsRequest - The addABTestsRequest object.
|
|
71
74
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
72
75
|
*/
|
|
@@ -98,7 +101,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
98
101
|
/**
|
|
99
102
|
* This method allow you to send requests to the Algolia REST API.
|
|
100
103
|
*
|
|
101
|
-
* @summary Send requests to the Algolia REST API.
|
|
102
104
|
* @param customDelete - The customDelete object.
|
|
103
105
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
104
106
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -108,7 +110,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
108
110
|
if (!path) {
|
|
109
111
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
110
112
|
}
|
|
111
|
-
const requestPath = '/
|
|
113
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
112
114
|
const headers = {};
|
|
113
115
|
const queryParameters = parameters ? parameters : {};
|
|
114
116
|
const request = {
|
|
@@ -122,7 +124,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
122
124
|
/**
|
|
123
125
|
* This method allow you to send requests to the Algolia REST API.
|
|
124
126
|
*
|
|
125
|
-
* @summary Send requests to the Algolia REST API.
|
|
126
127
|
* @param customGet - The customGet object.
|
|
127
128
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
128
129
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -132,7 +133,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
132
133
|
if (!path) {
|
|
133
134
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
134
135
|
}
|
|
135
|
-
const requestPath = '/
|
|
136
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
136
137
|
const headers = {};
|
|
137
138
|
const queryParameters = parameters ? parameters : {};
|
|
138
139
|
const request = {
|
|
@@ -146,7 +147,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
146
147
|
/**
|
|
147
148
|
* This method allow you to send requests to the Algolia REST API.
|
|
148
149
|
*
|
|
149
|
-
* @summary Send requests to the Algolia REST API.
|
|
150
150
|
* @param customPost - The customPost object.
|
|
151
151
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
152
152
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -157,7 +157,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
157
157
|
if (!path) {
|
|
158
158
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
159
159
|
}
|
|
160
|
-
const requestPath = '/
|
|
160
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
161
161
|
const headers = {};
|
|
162
162
|
const queryParameters = parameters ? parameters : {};
|
|
163
163
|
const request = {
|
|
@@ -172,7 +172,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
172
172
|
/**
|
|
173
173
|
* This method allow you to send requests to the Algolia REST API.
|
|
174
174
|
*
|
|
175
|
-
* @summary Send requests to the Algolia REST API.
|
|
176
175
|
* @param customPut - The customPut object.
|
|
177
176
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
178
177
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -183,7 +182,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
183
182
|
if (!path) {
|
|
184
183
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
185
184
|
}
|
|
186
|
-
const requestPath = '/
|
|
185
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
187
186
|
const headers = {};
|
|
188
187
|
const queryParameters = parameters ? parameters : {};
|
|
189
188
|
const request = {
|
|
@@ -196,11 +195,13 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
196
195
|
return transporter.request(request, requestOptions);
|
|
197
196
|
},
|
|
198
197
|
/**
|
|
199
|
-
*
|
|
198
|
+
* Deletes an A/B test by its ID.
|
|
199
|
+
*
|
|
200
|
+
* Required API Key ACLs:
|
|
201
|
+
* - editSettings.
|
|
200
202
|
*
|
|
201
|
-
* @summary Delete an A/B test.
|
|
202
203
|
* @param deleteABTest - The deleteABTest object.
|
|
203
|
-
* @param deleteABTest.id - Unique A/B test
|
|
204
|
+
* @param deleteABTest.id - Unique A/B test identifier.
|
|
204
205
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
205
206
|
*/
|
|
206
207
|
deleteABTest({ id }, requestOptions) {
|
|
@@ -219,11 +220,13 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
219
220
|
return transporter.request(request, requestOptions);
|
|
220
221
|
},
|
|
221
222
|
/**
|
|
222
|
-
*
|
|
223
|
+
* Retrieves the details for an A/B test by its ID.
|
|
224
|
+
*
|
|
225
|
+
* Required API Key ACLs:
|
|
226
|
+
* - analytics.
|
|
223
227
|
*
|
|
224
|
-
* @summary Get A/B test details.
|
|
225
228
|
* @param getABTest - The getABTest object.
|
|
226
|
-
* @param getABTest.id - Unique A/B test
|
|
229
|
+
* @param getABTest.id - Unique A/B test identifier.
|
|
227
230
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
228
231
|
*/
|
|
229
232
|
getABTest({ id }, requestOptions) {
|
|
@@ -242,14 +245,16 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
242
245
|
return transporter.request(request, requestOptions);
|
|
243
246
|
},
|
|
244
247
|
/**
|
|
245
|
-
*
|
|
248
|
+
* Lists all A/B tests you configured for this application.
|
|
249
|
+
*
|
|
250
|
+
* Required API Key ACLs:
|
|
251
|
+
* - analytics.
|
|
246
252
|
*
|
|
247
|
-
* @summary List all A/B tests.
|
|
248
253
|
* @param listABTests - The listABTests object.
|
|
249
|
-
* @param listABTests.offset - Position of the
|
|
250
|
-
* @param listABTests.limit - Number of
|
|
251
|
-
* @param listABTests.indexPrefix - Only
|
|
252
|
-
* @param listABTests.indexSuffix - Only
|
|
254
|
+
* @param listABTests.offset - Position of the first item to return.
|
|
255
|
+
* @param listABTests.limit - Number of items to return.
|
|
256
|
+
* @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.
|
|
257
|
+
* @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.
|
|
253
258
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
254
259
|
*/
|
|
255
260
|
listABTests({ offset, limit, indexPrefix, indexSuffix } = {}, requestOptions = undefined) {
|
|
@@ -277,11 +282,13 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
277
282
|
return transporter.request(request, requestOptions);
|
|
278
283
|
},
|
|
279
284
|
/**
|
|
280
|
-
*
|
|
285
|
+
* Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
|
|
286
|
+
*
|
|
287
|
+
* Required API Key ACLs:
|
|
288
|
+
* - editSettings.
|
|
281
289
|
*
|
|
282
|
-
* @summary Stop an A/B test.
|
|
283
290
|
* @param stopABTest - The stopABTest object.
|
|
284
|
-
* @param stopABTest.id - Unique A/B test
|
|
291
|
+
* @param stopABTest.id - Unique A/B test identifier.
|
|
285
292
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
286
293
|
*/
|
|
287
294
|
stopABTest({ id }, requestOptions) {
|
|
@@ -303,7 +310,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
303
310
|
}
|
|
304
311
|
|
|
305
312
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
306
|
-
const apiClientVersion$3 = '5.0.0-
|
|
313
|
+
const apiClientVersion$3 = '5.0.0-beta.1';
|
|
307
314
|
const REGIONS$1 = ['de', 'us'];
|
|
308
315
|
function getDefaultHosts$2(region) {
|
|
309
316
|
const url = !region
|
|
@@ -365,7 +372,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
365
372
|
/**
|
|
366
373
|
* This method allow you to send requests to the Algolia REST API.
|
|
367
374
|
*
|
|
368
|
-
* @summary Send requests to the Algolia REST API.
|
|
369
375
|
* @param customDelete - The customDelete object.
|
|
370
376
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
371
377
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -375,7 +381,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
375
381
|
if (!path) {
|
|
376
382
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
377
383
|
}
|
|
378
|
-
const requestPath = '/
|
|
384
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
379
385
|
const headers = {};
|
|
380
386
|
const queryParameters = parameters ? parameters : {};
|
|
381
387
|
const request = {
|
|
@@ -389,7 +395,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
389
395
|
/**
|
|
390
396
|
* This method allow you to send requests to the Algolia REST API.
|
|
391
397
|
*
|
|
392
|
-
* @summary Send requests to the Algolia REST API.
|
|
393
398
|
* @param customGet - The customGet object.
|
|
394
399
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
395
400
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -399,7 +404,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
399
404
|
if (!path) {
|
|
400
405
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
401
406
|
}
|
|
402
|
-
const requestPath = '/
|
|
407
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
403
408
|
const headers = {};
|
|
404
409
|
const queryParameters = parameters ? parameters : {};
|
|
405
410
|
const request = {
|
|
@@ -413,7 +418,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
413
418
|
/**
|
|
414
419
|
* This method allow you to send requests to the Algolia REST API.
|
|
415
420
|
*
|
|
416
|
-
* @summary Send requests to the Algolia REST API.
|
|
417
421
|
* @param customPost - The customPost object.
|
|
418
422
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
419
423
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -424,7 +428,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
424
428
|
if (!path) {
|
|
425
429
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
426
430
|
}
|
|
427
|
-
const requestPath = '/
|
|
431
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
428
432
|
const headers = {};
|
|
429
433
|
const queryParameters = parameters ? parameters : {};
|
|
430
434
|
const request = {
|
|
@@ -439,7 +443,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
439
443
|
/**
|
|
440
444
|
* This method allow you to send requests to the Algolia REST API.
|
|
441
445
|
*
|
|
442
|
-
* @summary Send requests to the Algolia REST API.
|
|
443
446
|
* @param customPut - The customPut object.
|
|
444
447
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
445
448
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -450,7 +453,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
450
453
|
if (!path) {
|
|
451
454
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
452
455
|
}
|
|
453
|
-
const requestPath = '/
|
|
456
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
454
457
|
const headers = {};
|
|
455
458
|
const queryParameters = parameters ? parameters : {};
|
|
456
459
|
const request = {
|
|
@@ -463,14 +466,56 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
463
466
|
return transporter.request(request, requestOptions);
|
|
464
467
|
},
|
|
465
468
|
/**
|
|
466
|
-
*
|
|
469
|
+
* Retrieves the add-to-cart rate for all of your searches with at least one add-to-cart event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
470
|
+
*
|
|
471
|
+
* Required API Key ACLs:
|
|
472
|
+
* - analytics.
|
|
473
|
+
*
|
|
474
|
+
* @param getAddToCartRate - The getAddToCartRate object.
|
|
475
|
+
* @param getAddToCartRate.index - Index name.
|
|
476
|
+
* @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
477
|
+
* @param getAddToCartRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
478
|
+
* @param getAddToCartRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
479
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
480
|
+
*/
|
|
481
|
+
getAddToCartRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
482
|
+
if (!index) {
|
|
483
|
+
throw new Error('Parameter `index` is required when calling `getAddToCartRate`.');
|
|
484
|
+
}
|
|
485
|
+
const requestPath = '/2/conversions/addToCartRate';
|
|
486
|
+
const headers = {};
|
|
487
|
+
const queryParameters = {};
|
|
488
|
+
if (index !== undefined) {
|
|
489
|
+
queryParameters.index = index.toString();
|
|
490
|
+
}
|
|
491
|
+
if (startDate !== undefined) {
|
|
492
|
+
queryParameters.startDate = startDate.toString();
|
|
493
|
+
}
|
|
494
|
+
if (endDate !== undefined) {
|
|
495
|
+
queryParameters.endDate = endDate.toString();
|
|
496
|
+
}
|
|
497
|
+
if (tags !== undefined) {
|
|
498
|
+
queryParameters.tags = tags.toString();
|
|
499
|
+
}
|
|
500
|
+
const request = {
|
|
501
|
+
method: 'GET',
|
|
502
|
+
path: requestPath,
|
|
503
|
+
queryParameters,
|
|
504
|
+
headers,
|
|
505
|
+
};
|
|
506
|
+
return transporter.request(request, requestOptions);
|
|
507
|
+
},
|
|
508
|
+
/**
|
|
509
|
+
* Retrieves the average click position of your search results, including a daily breakdown. The average click position is the average of all clicked search results\' positions. For example, if users only ever click on the first result for any search, the average click position is 1. By default, the analyzed period includes the last eight days including the current day.
|
|
510
|
+
*
|
|
511
|
+
* Required API Key ACLs:
|
|
512
|
+
* - analytics.
|
|
467
513
|
*
|
|
468
|
-
* @summary Get average click position.
|
|
469
514
|
* @param getAverageClickPosition - The getAverageClickPosition object.
|
|
470
|
-
* @param getAverageClickPosition.index - Index name
|
|
471
|
-
* @param getAverageClickPosition.startDate - Start date
|
|
472
|
-
* @param getAverageClickPosition.endDate - End date
|
|
473
|
-
* @param getAverageClickPosition.tags -
|
|
515
|
+
* @param getAverageClickPosition.index - Index name.
|
|
516
|
+
* @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
517
|
+
* @param getAverageClickPosition.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
518
|
+
* @param getAverageClickPosition.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
474
519
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
475
520
|
*/
|
|
476
521
|
getAverageClickPosition({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -501,14 +546,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
501
546
|
return transporter.request(request, requestOptions);
|
|
502
547
|
},
|
|
503
548
|
/**
|
|
504
|
-
*
|
|
549
|
+
* Retrieves the positions in the search results and their associated number of clicks. This lets you check how many clicks the first, second, or tenth search results receive.
|
|
550
|
+
*
|
|
551
|
+
* Required API Key ACLs:
|
|
552
|
+
* - analytics.
|
|
505
553
|
*
|
|
506
|
-
* @summary Get click positions.
|
|
507
554
|
* @param getClickPositions - The getClickPositions object.
|
|
508
|
-
* @param getClickPositions.index - Index name
|
|
509
|
-
* @param getClickPositions.startDate - Start date
|
|
510
|
-
* @param getClickPositions.endDate - End date
|
|
511
|
-
* @param getClickPositions.tags -
|
|
555
|
+
* @param getClickPositions.index - Index name.
|
|
556
|
+
* @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
557
|
+
* @param getClickPositions.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
558
|
+
* @param getClickPositions.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
512
559
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
513
560
|
*/
|
|
514
561
|
getClickPositions({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -539,14 +586,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
539
586
|
return transporter.request(request, requestOptions);
|
|
540
587
|
},
|
|
541
588
|
/**
|
|
542
|
-
*
|
|
589
|
+
* Retrieves the click-through rate for all of your searches with at least one click event, including a daily breakdown By default, the analyzed period includes the last eight days including the current day.
|
|
590
|
+
*
|
|
591
|
+
* Required API Key ACLs:
|
|
592
|
+
* - analytics.
|
|
543
593
|
*
|
|
544
|
-
* @summary Get click-through rate (CTR).
|
|
545
594
|
* @param getClickThroughRate - The getClickThroughRate object.
|
|
546
|
-
* @param getClickThroughRate.index - Index name
|
|
547
|
-
* @param getClickThroughRate.startDate - Start date
|
|
548
|
-
* @param getClickThroughRate.endDate - End date
|
|
549
|
-
* @param getClickThroughRate.tags -
|
|
595
|
+
* @param getClickThroughRate.index - Index name.
|
|
596
|
+
* @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
597
|
+
* @param getClickThroughRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
598
|
+
* @param getClickThroughRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
550
599
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
551
600
|
*/
|
|
552
601
|
getClickThroughRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -577,19 +626,21 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
577
626
|
return transporter.request(request, requestOptions);
|
|
578
627
|
},
|
|
579
628
|
/**
|
|
580
|
-
*
|
|
629
|
+
* Retrieves the conversion rate for all of your searches with at least one conversion event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
630
|
+
*
|
|
631
|
+
* Required API Key ACLs:
|
|
632
|
+
* - analytics.
|
|
581
633
|
*
|
|
582
|
-
* @
|
|
583
|
-
* @param
|
|
584
|
-
* @param
|
|
585
|
-
* @param
|
|
586
|
-
* @param
|
|
587
|
-
* @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.
|
|
634
|
+
* @param getConversionRate - The getConversionRate object.
|
|
635
|
+
* @param getConversionRate.index - Index name.
|
|
636
|
+
* @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
637
|
+
* @param getConversionRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
638
|
+
* @param getConversionRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
588
639
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
589
640
|
*/
|
|
590
|
-
|
|
641
|
+
getConversionRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
591
642
|
if (!index) {
|
|
592
|
-
throw new Error('Parameter `index` is required when calling `
|
|
643
|
+
throw new Error('Parameter `index` is required when calling `getConversionRate`.');
|
|
593
644
|
}
|
|
594
645
|
const requestPath = '/2/conversions/conversionRate';
|
|
595
646
|
const headers = {};
|
|
@@ -615,14 +666,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
615
666
|
return transporter.request(request, requestOptions);
|
|
616
667
|
},
|
|
617
668
|
/**
|
|
618
|
-
*
|
|
669
|
+
* Retrieves the fraction of searches that didn\'t lead to any click within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
670
|
+
*
|
|
671
|
+
* Required API Key ACLs:
|
|
672
|
+
* - analytics.
|
|
619
673
|
*
|
|
620
|
-
* @summary Get no click rate.
|
|
621
674
|
* @param getNoClickRate - The getNoClickRate object.
|
|
622
|
-
* @param getNoClickRate.index - Index name
|
|
623
|
-
* @param getNoClickRate.startDate - Start date
|
|
624
|
-
* @param getNoClickRate.endDate - End date
|
|
625
|
-
* @param getNoClickRate.tags -
|
|
675
|
+
* @param getNoClickRate.index - Index name.
|
|
676
|
+
* @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
677
|
+
* @param getNoClickRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
678
|
+
* @param getNoClickRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
626
679
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
627
680
|
*/
|
|
628
681
|
getNoClickRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -653,14 +706,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
653
706
|
return transporter.request(request, requestOptions);
|
|
654
707
|
},
|
|
655
708
|
/**
|
|
656
|
-
*
|
|
709
|
+
* Retrieves the fraction of searches that didn\'t return any results within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
710
|
+
*
|
|
711
|
+
* Required API Key ACLs:
|
|
712
|
+
* - analytics.
|
|
657
713
|
*
|
|
658
|
-
* @summary Get no results rate.
|
|
659
714
|
* @param getNoResultsRate - The getNoResultsRate object.
|
|
660
|
-
* @param getNoResultsRate.index - Index name
|
|
661
|
-
* @param getNoResultsRate.startDate - Start date
|
|
662
|
-
* @param getNoResultsRate.endDate - End date
|
|
663
|
-
* @param getNoResultsRate.tags -
|
|
715
|
+
* @param getNoResultsRate.index - Index name.
|
|
716
|
+
* @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
717
|
+
* @param getNoResultsRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
718
|
+
* @param getNoResultsRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
664
719
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
665
720
|
*/
|
|
666
721
|
getNoResultsRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -691,14 +746,96 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
691
746
|
return transporter.request(request, requestOptions);
|
|
692
747
|
},
|
|
693
748
|
/**
|
|
694
|
-
*
|
|
749
|
+
* Retrieves the purchase rate for all of your searches with at least one purchase event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
750
|
+
*
|
|
751
|
+
* Required API Key ACLs:
|
|
752
|
+
* - analytics.
|
|
753
|
+
*
|
|
754
|
+
* @param getPurchaseRate - The getPurchaseRate object.
|
|
755
|
+
* @param getPurchaseRate.index - Index name.
|
|
756
|
+
* @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
757
|
+
* @param getPurchaseRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
758
|
+
* @param getPurchaseRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
759
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
760
|
+
*/
|
|
761
|
+
getPurchaseRate({ index, startDate, endDate, tags }, requestOptions) {
|
|
762
|
+
if (!index) {
|
|
763
|
+
throw new Error('Parameter `index` is required when calling `getPurchaseRate`.');
|
|
764
|
+
}
|
|
765
|
+
const requestPath = '/2/conversions/purchaseRate';
|
|
766
|
+
const headers = {};
|
|
767
|
+
const queryParameters = {};
|
|
768
|
+
if (index !== undefined) {
|
|
769
|
+
queryParameters.index = index.toString();
|
|
770
|
+
}
|
|
771
|
+
if (startDate !== undefined) {
|
|
772
|
+
queryParameters.startDate = startDate.toString();
|
|
773
|
+
}
|
|
774
|
+
if (endDate !== undefined) {
|
|
775
|
+
queryParameters.endDate = endDate.toString();
|
|
776
|
+
}
|
|
777
|
+
if (tags !== undefined) {
|
|
778
|
+
queryParameters.tags = tags.toString();
|
|
779
|
+
}
|
|
780
|
+
const request = {
|
|
781
|
+
method: 'GET',
|
|
782
|
+
path: requestPath,
|
|
783
|
+
queryParameters,
|
|
784
|
+
headers,
|
|
785
|
+
};
|
|
786
|
+
return transporter.request(request, requestOptions);
|
|
787
|
+
},
|
|
788
|
+
/**
|
|
789
|
+
* Retrieves revenue-related metrics, such as the total revenue or the average order value. To retrieve revenue-related metrics, sent purchase events. By default, the analyzed period includes the last eight days including the current day.
|
|
790
|
+
*
|
|
791
|
+
* Required API Key ACLs:
|
|
792
|
+
* - analytics.
|
|
793
|
+
*
|
|
794
|
+
* @param getRevenue - The getRevenue object.
|
|
795
|
+
* @param getRevenue.index - Index name.
|
|
796
|
+
* @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
797
|
+
* @param getRevenue.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
798
|
+
* @param getRevenue.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
799
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
800
|
+
*/
|
|
801
|
+
getRevenue({ index, startDate, endDate, tags }, requestOptions) {
|
|
802
|
+
if (!index) {
|
|
803
|
+
throw new Error('Parameter `index` is required when calling `getRevenue`.');
|
|
804
|
+
}
|
|
805
|
+
const requestPath = '/2/conversions/revenue';
|
|
806
|
+
const headers = {};
|
|
807
|
+
const queryParameters = {};
|
|
808
|
+
if (index !== undefined) {
|
|
809
|
+
queryParameters.index = index.toString();
|
|
810
|
+
}
|
|
811
|
+
if (startDate !== undefined) {
|
|
812
|
+
queryParameters.startDate = startDate.toString();
|
|
813
|
+
}
|
|
814
|
+
if (endDate !== undefined) {
|
|
815
|
+
queryParameters.endDate = endDate.toString();
|
|
816
|
+
}
|
|
817
|
+
if (tags !== undefined) {
|
|
818
|
+
queryParameters.tags = tags.toString();
|
|
819
|
+
}
|
|
820
|
+
const request = {
|
|
821
|
+
method: 'GET',
|
|
822
|
+
path: requestPath,
|
|
823
|
+
queryParameters,
|
|
824
|
+
headers,
|
|
825
|
+
};
|
|
826
|
+
return transporter.request(request, requestOptions);
|
|
827
|
+
},
|
|
828
|
+
/**
|
|
829
|
+
* Retrieves the number of searches within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
830
|
+
*
|
|
831
|
+
* Required API Key ACLs:
|
|
832
|
+
* - analytics.
|
|
695
833
|
*
|
|
696
|
-
* @summary Get number of searches.
|
|
697
834
|
* @param getSearchesCount - The getSearchesCount object.
|
|
698
|
-
* @param getSearchesCount.index - Index name
|
|
699
|
-
* @param getSearchesCount.startDate - Start date
|
|
700
|
-
* @param getSearchesCount.endDate - End date
|
|
701
|
-
* @param getSearchesCount.tags -
|
|
835
|
+
* @param getSearchesCount.index - Index name.
|
|
836
|
+
* @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
837
|
+
* @param getSearchesCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
838
|
+
* @param getSearchesCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
702
839
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
703
840
|
*/
|
|
704
841
|
getSearchesCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -729,16 +866,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
729
866
|
return transporter.request(request, requestOptions);
|
|
730
867
|
},
|
|
731
868
|
/**
|
|
732
|
-
*
|
|
869
|
+
* Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
|
|
870
|
+
*
|
|
871
|
+
* Required API Key ACLs:
|
|
872
|
+
* - analytics.
|
|
733
873
|
*
|
|
734
|
-
* @summary Get top searches with no clicks.
|
|
735
874
|
* @param getSearchesNoClicks - The getSearchesNoClicks object.
|
|
736
|
-
* @param getSearchesNoClicks.index - Index name
|
|
737
|
-
* @param getSearchesNoClicks.startDate - Start date
|
|
738
|
-
* @param getSearchesNoClicks.endDate - End date
|
|
739
|
-
* @param getSearchesNoClicks.limit - Number of
|
|
740
|
-
* @param getSearchesNoClicks.offset - Position of the
|
|
741
|
-
* @param getSearchesNoClicks.tags -
|
|
875
|
+
* @param getSearchesNoClicks.index - Index name.
|
|
876
|
+
* @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
877
|
+
* @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
878
|
+
* @param getSearchesNoClicks.limit - Number of items to return.
|
|
879
|
+
* @param getSearchesNoClicks.offset - Position of the first item to return.
|
|
880
|
+
* @param getSearchesNoClicks.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
742
881
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
743
882
|
*/
|
|
744
883
|
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -775,16 +914,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
775
914
|
return transporter.request(request, requestOptions);
|
|
776
915
|
},
|
|
777
916
|
/**
|
|
778
|
-
*
|
|
917
|
+
* Retrieves the most popular searches that didn\'t return any results.
|
|
918
|
+
*
|
|
919
|
+
* Required API Key ACLs:
|
|
920
|
+
* - analytics.
|
|
779
921
|
*
|
|
780
|
-
* @summary Get top searches with no results.
|
|
781
922
|
* @param getSearchesNoResults - The getSearchesNoResults object.
|
|
782
|
-
* @param getSearchesNoResults.index - Index name
|
|
783
|
-
* @param getSearchesNoResults.startDate - Start date
|
|
784
|
-
* @param getSearchesNoResults.endDate - End date
|
|
785
|
-
* @param getSearchesNoResults.limit - Number of
|
|
786
|
-
* @param getSearchesNoResults.offset - Position of the
|
|
787
|
-
* @param getSearchesNoResults.tags -
|
|
923
|
+
* @param getSearchesNoResults.index - Index name.
|
|
924
|
+
* @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
925
|
+
* @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
926
|
+
* @param getSearchesNoResults.limit - Number of items to return.
|
|
927
|
+
* @param getSearchesNoResults.offset - Position of the first item to return.
|
|
928
|
+
* @param getSearchesNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
788
929
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
789
930
|
*/
|
|
790
931
|
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -821,11 +962,13 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
821
962
|
return transporter.request(request, requestOptions);
|
|
822
963
|
},
|
|
823
964
|
/**
|
|
824
|
-
*
|
|
965
|
+
* Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
|
|
966
|
+
*
|
|
967
|
+
* Required API Key ACLs:
|
|
968
|
+
* - analytics.
|
|
825
969
|
*
|
|
826
|
-
* @summary Get Analytics API status.
|
|
827
970
|
* @param getStatus - The getStatus object.
|
|
828
|
-
* @param getStatus.index - Index name
|
|
971
|
+
* @param getStatus.index - Index name.
|
|
829
972
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
830
973
|
*/
|
|
831
974
|
getStatus({ index }, requestOptions) {
|
|
@@ -847,16 +990,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
847
990
|
return transporter.request(request, requestOptions);
|
|
848
991
|
},
|
|
849
992
|
/**
|
|
850
|
-
*
|
|
993
|
+
* Retrieves the countries with the most searches to your index.
|
|
994
|
+
*
|
|
995
|
+
* Required API Key ACLs:
|
|
996
|
+
* - analytics.
|
|
851
997
|
*
|
|
852
|
-
* @summary Get top countries.
|
|
853
998
|
* @param getTopCountries - The getTopCountries object.
|
|
854
|
-
* @param getTopCountries.index - Index name
|
|
855
|
-
* @param getTopCountries.startDate - Start date
|
|
856
|
-
* @param getTopCountries.endDate - End date
|
|
857
|
-
* @param getTopCountries.limit - Number of
|
|
858
|
-
* @param getTopCountries.offset - Position of the
|
|
859
|
-
* @param getTopCountries.tags -
|
|
999
|
+
* @param getTopCountries.index - Index name.
|
|
1000
|
+
* @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1001
|
+
* @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1002
|
+
* @param getTopCountries.limit - Number of items to return.
|
|
1003
|
+
* @param getTopCountries.offset - Position of the first item to return.
|
|
1004
|
+
* @param getTopCountries.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
860
1005
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
861
1006
|
*/
|
|
862
1007
|
getTopCountries({ index, startDate, endDate, limit, offset, tags }, requestOptions) {
|
|
@@ -893,17 +1038,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
893
1038
|
return transporter.request(request, requestOptions);
|
|
894
1039
|
},
|
|
895
1040
|
/**
|
|
896
|
-
*
|
|
1041
|
+
* Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1042
|
+
*
|
|
1043
|
+
* Required API Key ACLs:
|
|
1044
|
+
* - analytics.
|
|
897
1045
|
*
|
|
898
|
-
* @summary Get top filterable attributes.
|
|
899
1046
|
* @param getTopFilterAttributes - The getTopFilterAttributes object.
|
|
900
|
-
* @param getTopFilterAttributes.index - Index name
|
|
901
|
-
* @param getTopFilterAttributes.search -
|
|
902
|
-
* @param getTopFilterAttributes.startDate - Start date
|
|
903
|
-
* @param getTopFilterAttributes.endDate - End date
|
|
904
|
-
* @param getTopFilterAttributes.limit - Number of
|
|
905
|
-
* @param getTopFilterAttributes.offset - Position of the
|
|
906
|
-
* @param getTopFilterAttributes.tags -
|
|
1047
|
+
* @param getTopFilterAttributes.index - Index name.
|
|
1048
|
+
* @param getTopFilterAttributes.search - Search query.
|
|
1049
|
+
* @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1050
|
+
* @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1051
|
+
* @param getTopFilterAttributes.limit - Number of items to return.
|
|
1052
|
+
* @param getTopFilterAttributes.offset - Position of the first item to return.
|
|
1053
|
+
* @param getTopFilterAttributes.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
907
1054
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
908
1055
|
*/
|
|
909
1056
|
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -943,18 +1090,20 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
943
1090
|
return transporter.request(request, requestOptions);
|
|
944
1091
|
},
|
|
945
1092
|
/**
|
|
946
|
-
*
|
|
1093
|
+
* Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1094
|
+
*
|
|
1095
|
+
* Required API Key ACLs:
|
|
1096
|
+
* - analytics.
|
|
947
1097
|
*
|
|
948
|
-
* @summary Get top filter values for an attribute.
|
|
949
1098
|
* @param getTopFilterForAttribute - The getTopFilterForAttribute object.
|
|
950
1099
|
* @param getTopFilterForAttribute.attribute - Attribute name.
|
|
951
|
-
* @param getTopFilterForAttribute.index - Index name
|
|
952
|
-
* @param getTopFilterForAttribute.search -
|
|
953
|
-
* @param getTopFilterForAttribute.startDate - Start date
|
|
954
|
-
* @param getTopFilterForAttribute.endDate - End date
|
|
955
|
-
* @param getTopFilterForAttribute.limit - Number of
|
|
956
|
-
* @param getTopFilterForAttribute.offset - Position of the
|
|
957
|
-
* @param getTopFilterForAttribute.tags -
|
|
1100
|
+
* @param getTopFilterForAttribute.index - Index name.
|
|
1101
|
+
* @param getTopFilterForAttribute.search - Search query.
|
|
1102
|
+
* @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1103
|
+
* @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1104
|
+
* @param getTopFilterForAttribute.limit - Number of items to return.
|
|
1105
|
+
* @param getTopFilterForAttribute.offset - Position of the first item to return.
|
|
1106
|
+
* @param getTopFilterForAttribute.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
958
1107
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
959
1108
|
*/
|
|
960
1109
|
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -997,17 +1146,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
997
1146
|
return transporter.request(request, requestOptions);
|
|
998
1147
|
},
|
|
999
1148
|
/**
|
|
1000
|
-
*
|
|
1149
|
+
* Retrieves the most frequently used filters for a search that didn\'t return any results. To get the most frequent searches without results, use the [Retrieve searches without results](#tag/search/operation/getSearchesNoResults) operation.
|
|
1150
|
+
*
|
|
1151
|
+
* Required API Key ACLs:
|
|
1152
|
+
* - analytics.
|
|
1001
1153
|
*
|
|
1002
|
-
* @summary Get top filters for a no result search.
|
|
1003
1154
|
* @param getTopFiltersNoResults - The getTopFiltersNoResults object.
|
|
1004
|
-
* @param getTopFiltersNoResults.index - Index name
|
|
1005
|
-
* @param getTopFiltersNoResults.search -
|
|
1006
|
-
* @param getTopFiltersNoResults.startDate - Start date
|
|
1007
|
-
* @param getTopFiltersNoResults.endDate - End date
|
|
1008
|
-
* @param getTopFiltersNoResults.limit - Number of
|
|
1009
|
-
* @param getTopFiltersNoResults.offset - Position of the
|
|
1010
|
-
* @param getTopFiltersNoResults.tags -
|
|
1155
|
+
* @param getTopFiltersNoResults.index - Index name.
|
|
1156
|
+
* @param getTopFiltersNoResults.search - Search query.
|
|
1157
|
+
* @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1158
|
+
* @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1159
|
+
* @param getTopFiltersNoResults.limit - Number of items to return.
|
|
1160
|
+
* @param getTopFiltersNoResults.offset - Position of the first item to return.
|
|
1161
|
+
* @param getTopFiltersNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1011
1162
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1012
1163
|
*/
|
|
1013
1164
|
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
@@ -1047,21 +1198,24 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1047
1198
|
return transporter.request(request, requestOptions);
|
|
1048
1199
|
},
|
|
1049
1200
|
/**
|
|
1050
|
-
*
|
|
1201
|
+
* Retrieves the object IDs of the most frequent search results.
|
|
1202
|
+
*
|
|
1203
|
+
* Required API Key ACLs:
|
|
1204
|
+
* - analytics.
|
|
1051
1205
|
*
|
|
1052
|
-
* @summary Get top hits.
|
|
1053
1206
|
* @param getTopHits - The getTopHits object.
|
|
1054
|
-
* @param getTopHits.index - Index name
|
|
1055
|
-
* @param getTopHits.search -
|
|
1056
|
-
* @param getTopHits.clickAnalytics - Whether to include
|
|
1057
|
-
* @param getTopHits.
|
|
1058
|
-
* @param getTopHits.
|
|
1059
|
-
* @param getTopHits.
|
|
1060
|
-
* @param getTopHits.
|
|
1061
|
-
* @param getTopHits.
|
|
1062
|
-
* @param
|
|
1063
|
-
|
|
1064
|
-
|
|
1207
|
+
* @param getTopHits.index - Index name.
|
|
1208
|
+
* @param getTopHits.search - Search query.
|
|
1209
|
+
* @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1210
|
+
* @param getTopHits.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
|
|
1211
|
+
* @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1212
|
+
* @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1213
|
+
* @param getTopHits.limit - Number of items to return.
|
|
1214
|
+
* @param getTopHits.offset - Position of the first item to return.
|
|
1215
|
+
* @param getTopHits.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1216
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1217
|
+
*/
|
|
1218
|
+
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
|
|
1065
1219
|
if (!index) {
|
|
1066
1220
|
throw new Error('Parameter `index` is required when calling `getTopHits`.');
|
|
1067
1221
|
}
|
|
@@ -1077,6 +1231,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1077
1231
|
if (clickAnalytics !== undefined) {
|
|
1078
1232
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
1079
1233
|
}
|
|
1234
|
+
if (revenueAnalytics !== undefined) {
|
|
1235
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
1236
|
+
}
|
|
1080
1237
|
if (startDate !== undefined) {
|
|
1081
1238
|
queryParameters.startDate = startDate.toString();
|
|
1082
1239
|
}
|
|
@@ -1101,22 +1258,25 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1101
1258
|
return transporter.request(request, requestOptions);
|
|
1102
1259
|
},
|
|
1103
1260
|
/**
|
|
1104
|
-
* Returns the most popular
|
|
1261
|
+
* Returns the most popular search terms.
|
|
1262
|
+
*
|
|
1263
|
+
* Required API Key ACLs:
|
|
1264
|
+
* - analytics.
|
|
1105
1265
|
*
|
|
1106
|
-
* @summary Get top searches.
|
|
1107
1266
|
* @param getTopSearches - The getTopSearches object.
|
|
1108
|
-
* @param getTopSearches.index - Index name
|
|
1109
|
-
* @param getTopSearches.clickAnalytics - Whether to include
|
|
1110
|
-
* @param getTopSearches.
|
|
1111
|
-
* @param getTopSearches.
|
|
1112
|
-
* @param getTopSearches.
|
|
1267
|
+
* @param getTopSearches.index - Index name.
|
|
1268
|
+
* @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1269
|
+
* @param getTopSearches.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
|
|
1270
|
+
* @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1271
|
+
* @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1272
|
+
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
1113
1273
|
* @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
|
|
1114
|
-
* @param getTopSearches.limit - Number of
|
|
1115
|
-
* @param getTopSearches.offset - Position of the
|
|
1116
|
-
* @param getTopSearches.tags -
|
|
1274
|
+
* @param getTopSearches.limit - Number of items to return.
|
|
1275
|
+
* @param getTopSearches.offset - Position of the first item to return.
|
|
1276
|
+
* @param getTopSearches.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1117
1277
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1118
1278
|
*/
|
|
1119
|
-
getTopSearches({ index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
1279
|
+
getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
|
|
1120
1280
|
if (!index) {
|
|
1121
1281
|
throw new Error('Parameter `index` is required when calling `getTopSearches`.');
|
|
1122
1282
|
}
|
|
@@ -1129,6 +1289,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1129
1289
|
if (clickAnalytics !== undefined) {
|
|
1130
1290
|
queryParameters.clickAnalytics = clickAnalytics.toString();
|
|
1131
1291
|
}
|
|
1292
|
+
if (revenueAnalytics !== undefined) {
|
|
1293
|
+
queryParameters.revenueAnalytics = revenueAnalytics.toString();
|
|
1294
|
+
}
|
|
1132
1295
|
if (startDate !== undefined) {
|
|
1133
1296
|
queryParameters.startDate = startDate.toString();
|
|
1134
1297
|
}
|
|
@@ -1159,14 +1322,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1159
1322
|
return transporter.request(request, requestOptions);
|
|
1160
1323
|
},
|
|
1161
1324
|
/**
|
|
1162
|
-
*
|
|
1325
|
+
* Retrieves the number of unique users within a time range, including a daily breakdown. Since this endpoint returns the number of unique users, the sum of the daily values might be different from the total number. By default, Algolia distinguishes search users by their IP address, _unless_ you include a pseudonymous user identifier in your search requests with the `userToken` API parameter or `x-algolia-usertoken` request header. By default, the analyzed period includes the last eight days including the current day.
|
|
1326
|
+
*
|
|
1327
|
+
* Required API Key ACLs:
|
|
1328
|
+
* - analytics.
|
|
1163
1329
|
*
|
|
1164
|
-
* @summary Get user count.
|
|
1165
1330
|
* @param getUsersCount - The getUsersCount object.
|
|
1166
|
-
* @param getUsersCount.index - Index name
|
|
1167
|
-
* @param getUsersCount.startDate - Start date
|
|
1168
|
-
* @param getUsersCount.endDate - End date
|
|
1169
|
-
* @param getUsersCount.tags -
|
|
1331
|
+
* @param getUsersCount.index - Index name.
|
|
1332
|
+
* @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1333
|
+
* @param getUsersCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1334
|
+
* @param getUsersCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1170
1335
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1171
1336
|
*/
|
|
1172
1337
|
getUsersCount({ index, startDate, endDate, tags }, requestOptions) {
|
|
@@ -1200,7 +1365,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1200
1365
|
}
|
|
1201
1366
|
|
|
1202
1367
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
1203
|
-
const apiClientVersion$2 = '5.0.0-
|
|
1368
|
+
const apiClientVersion$2 = '5.0.0-beta.1';
|
|
1204
1369
|
const REGIONS = ['eu', 'us'];
|
|
1205
1370
|
function getDefaultHosts$1(region) {
|
|
1206
1371
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -1260,7 +1425,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1260
1425
|
/**
|
|
1261
1426
|
* This method allow you to send requests to the Algolia REST API.
|
|
1262
1427
|
*
|
|
1263
|
-
* @summary Send requests to the Algolia REST API.
|
|
1264
1428
|
* @param customDelete - The customDelete object.
|
|
1265
1429
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1266
1430
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -1270,7 +1434,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1270
1434
|
if (!path) {
|
|
1271
1435
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
1272
1436
|
}
|
|
1273
|
-
const requestPath = '/
|
|
1437
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1274
1438
|
const headers = {};
|
|
1275
1439
|
const queryParameters = parameters ? parameters : {};
|
|
1276
1440
|
const request = {
|
|
@@ -1284,7 +1448,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1284
1448
|
/**
|
|
1285
1449
|
* This method allow you to send requests to the Algolia REST API.
|
|
1286
1450
|
*
|
|
1287
|
-
* @summary Send requests to the Algolia REST API.
|
|
1288
1451
|
* @param customGet - The customGet object.
|
|
1289
1452
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1290
1453
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -1294,7 +1457,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1294
1457
|
if (!path) {
|
|
1295
1458
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
1296
1459
|
}
|
|
1297
|
-
const requestPath = '/
|
|
1460
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1298
1461
|
const headers = {};
|
|
1299
1462
|
const queryParameters = parameters ? parameters : {};
|
|
1300
1463
|
const request = {
|
|
@@ -1308,7 +1471,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1308
1471
|
/**
|
|
1309
1472
|
* This method allow you to send requests to the Algolia REST API.
|
|
1310
1473
|
*
|
|
1311
|
-
* @summary Send requests to the Algolia REST API.
|
|
1312
1474
|
* @param customPost - The customPost object.
|
|
1313
1475
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1314
1476
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -1319,7 +1481,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1319
1481
|
if (!path) {
|
|
1320
1482
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
1321
1483
|
}
|
|
1322
|
-
const requestPath = '/
|
|
1484
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1323
1485
|
const headers = {};
|
|
1324
1486
|
const queryParameters = parameters ? parameters : {};
|
|
1325
1487
|
const request = {
|
|
@@ -1334,7 +1496,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1334
1496
|
/**
|
|
1335
1497
|
* This method allow you to send requests to the Algolia REST API.
|
|
1336
1498
|
*
|
|
1337
|
-
* @summary Send requests to the Algolia REST API.
|
|
1338
1499
|
* @param customPut - The customPut object.
|
|
1339
1500
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
1340
1501
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -1345,7 +1506,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1345
1506
|
if (!path) {
|
|
1346
1507
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
1347
1508
|
}
|
|
1348
|
-
const requestPath = '/
|
|
1509
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
1349
1510
|
const headers = {};
|
|
1350
1511
|
const queryParameters = parameters ? parameters : {};
|
|
1351
1512
|
const request = {
|
|
@@ -1358,11 +1519,13 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1358
1519
|
return transporter.request(request, requestOptions);
|
|
1359
1520
|
},
|
|
1360
1521
|
/**
|
|
1361
|
-
*
|
|
1522
|
+
* Deletes a user profile. The response includes a date and time when the user profile can safely be considered deleted.
|
|
1523
|
+
*
|
|
1524
|
+
* Required API Key ACLs:
|
|
1525
|
+
* - recommendation.
|
|
1362
1526
|
*
|
|
1363
|
-
* @summary Delete a user profile.
|
|
1364
1527
|
* @param deleteUserProfile - The deleteUserProfile object.
|
|
1365
|
-
* @param deleteUserProfile.userToken -
|
|
1528
|
+
* @param deleteUserProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.
|
|
1366
1529
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1367
1530
|
*/
|
|
1368
1531
|
deleteUserProfile({ userToken }, requestOptions) {
|
|
@@ -1381,9 +1544,11 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1381
1544
|
return transporter.request(request, requestOptions);
|
|
1382
1545
|
},
|
|
1383
1546
|
/**
|
|
1384
|
-
*
|
|
1547
|
+
* Retrieves the current personalization strategy.
|
|
1548
|
+
*
|
|
1549
|
+
* Required API Key ACLs:
|
|
1550
|
+
* - recommendation.
|
|
1385
1551
|
*
|
|
1386
|
-
* @summary Get the current strategy.
|
|
1387
1552
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1388
1553
|
*/
|
|
1389
1554
|
getPersonalizationStrategy(requestOptions) {
|
|
@@ -1399,11 +1564,13 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1399
1564
|
return transporter.request(request, requestOptions);
|
|
1400
1565
|
},
|
|
1401
1566
|
/**
|
|
1402
|
-
*
|
|
1567
|
+
* Retrieves a user profile and their affinities for different facets.
|
|
1568
|
+
*
|
|
1569
|
+
* Required API Key ACLs:
|
|
1570
|
+
* - recommendation.
|
|
1403
1571
|
*
|
|
1404
|
-
* @summary Get a user profile.
|
|
1405
1572
|
* @param getUserTokenProfile - The getUserTokenProfile object.
|
|
1406
|
-
* @param getUserTokenProfile.userToken -
|
|
1573
|
+
* @param getUserTokenProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.
|
|
1407
1574
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1408
1575
|
*/
|
|
1409
1576
|
getUserTokenProfile({ userToken }, requestOptions) {
|
|
@@ -1422,9 +1589,11 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1422
1589
|
return transporter.request(request, requestOptions);
|
|
1423
1590
|
},
|
|
1424
1591
|
/**
|
|
1425
|
-
*
|
|
1592
|
+
* Creates a new personalization strategy.
|
|
1593
|
+
*
|
|
1594
|
+
* Required API Key ACLs:
|
|
1595
|
+
* - recommendation.
|
|
1426
1596
|
*
|
|
1427
|
-
* @summary Set a new strategy.
|
|
1428
1597
|
* @param personalizationStrategyParams - The personalizationStrategyParams object.
|
|
1429
1598
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1430
1599
|
*/
|
|
@@ -1457,7 +1626,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1457
1626
|
}
|
|
1458
1627
|
|
|
1459
1628
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
1460
|
-
const apiClientVersion$1 = '5.0.0-
|
|
1629
|
+
const apiClientVersion$1 = '5.0.0-beta.1';
|
|
1461
1630
|
function getDefaultHosts(appId) {
|
|
1462
1631
|
return [
|
|
1463
1632
|
{
|
|
@@ -1543,7 +1712,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1543
1712
|
* Helper: Wait for a task to be published (completed) for a given `indexName` and `taskID`.
|
|
1544
1713
|
*
|
|
1545
1714
|
* @summary Helper method that waits for a task to be published (completed).
|
|
1546
|
-
* @param waitForTaskOptions - The waitForTaskOptions object.
|
|
1715
|
+
* @param waitForTaskOptions - The `waitForTaskOptions` object.
|
|
1547
1716
|
* @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.
|
|
1548
1717
|
* @param waitForTaskOptions.taskID - The `taskID` returned in the method response.
|
|
1549
1718
|
* @param waitForTaskOptions.maxRetries - The maximum number of retries. 50 by default.
|
|
@@ -1567,7 +1736,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1567
1736
|
* Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
|
|
1568
1737
|
*
|
|
1569
1738
|
* @summary Helper method that waits for an API key task to be processed.
|
|
1570
|
-
* @param waitForApiKeyOptions - The waitForApiKeyOptions object.
|
|
1739
|
+
* @param waitForApiKeyOptions - The `waitForApiKeyOptions` object.
|
|
1571
1740
|
* @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.
|
|
1572
1741
|
* @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.
|
|
1573
1742
|
* @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.
|
|
@@ -1620,7 +1789,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1620
1789
|
* Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index.
|
|
1621
1790
|
*
|
|
1622
1791
|
* @summary Helper method that iterates on the `browse` method.
|
|
1623
|
-
* @param browseObjects - The browseObjects object.
|
|
1792
|
+
* @param browseObjects - The `browseObjects` object.
|
|
1624
1793
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
1625
1794
|
* @param browseObjects.browseParams - The `browse` parameters.
|
|
1626
1795
|
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is no `cursor` in the response.
|
|
@@ -1646,11 +1815,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1646
1815
|
* Helper: Iterate on the `searchRules` method of the client to allow aggregating rules of an index.
|
|
1647
1816
|
*
|
|
1648
1817
|
* @summary Helper method that iterates on the `searchRules` method.
|
|
1649
|
-
* @param
|
|
1650
|
-
* @param
|
|
1651
|
-
* @param
|
|
1652
|
-
* @param
|
|
1653
|
-
* @param
|
|
1818
|
+
* @param browseRules - The `browseRules` object.
|
|
1819
|
+
* @param browseRules.indexName - The index in which to perform the request.
|
|
1820
|
+
* @param browseRules.searchRulesParams - The `searchRules` method parameters.
|
|
1821
|
+
* @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).
|
|
1822
|
+
* @param browseRules.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
1654
1823
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
1655
1824
|
*/
|
|
1656
1825
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
|
|
@@ -1678,11 +1847,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1678
1847
|
* Helper: Iterate on the `searchSynonyms` method of the client to allow aggregating rules of an index.
|
|
1679
1848
|
*
|
|
1680
1849
|
* @summary Helper method that iterates on the `searchSynonyms` method.
|
|
1681
|
-
* @param
|
|
1682
|
-
* @param
|
|
1683
|
-
* @param
|
|
1684
|
-
* @param
|
|
1685
|
-
* @param
|
|
1850
|
+
* @param browseSynonyms - The `browseSynonyms` object.
|
|
1851
|
+
* @param browseSynonyms.indexName - The index in which to perform the request.
|
|
1852
|
+
* @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).
|
|
1853
|
+
* @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`.
|
|
1854
|
+
* @param browseSynonyms.searchSynonymsParams - The `searchSynonyms` method parameters.
|
|
1686
1855
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
1687
1856
|
*/
|
|
1688
1857
|
browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }, requestOptions) {
|
|
@@ -1692,16 +1861,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1692
1861
|
hitsPerPage: 1000,
|
|
1693
1862
|
};
|
|
1694
1863
|
return clientCommon.createIterablePromise({
|
|
1695
|
-
func: (
|
|
1696
|
-
|
|
1864
|
+
func: (_) => {
|
|
1865
|
+
const resp = this.searchSynonyms({
|
|
1697
1866
|
indexName,
|
|
1698
1867
|
searchSynonymsParams: {
|
|
1699
1868
|
...params,
|
|
1700
|
-
page:
|
|
1701
|
-
? previousResponse.page + 1
|
|
1702
|
-
: params.page,
|
|
1869
|
+
page: params.page,
|
|
1703
1870
|
},
|
|
1704
1871
|
}, requestOptions);
|
|
1872
|
+
params.page += 1;
|
|
1873
|
+
return resp;
|
|
1705
1874
|
},
|
|
1706
1875
|
validate: (response) => response.nbHits < params.hitsPerPage,
|
|
1707
1876
|
...browseSynonymsOptions,
|
|
@@ -1730,9 +1899,76 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1730
1899
|
return this.search(searchMethodParams, requestOptions);
|
|
1731
1900
|
},
|
|
1732
1901
|
/**
|
|
1733
|
-
*
|
|
1902
|
+
* Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
|
|
1903
|
+
*
|
|
1904
|
+
* @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
|
|
1905
|
+
* @param chunkedBatch - The `chunkedBatch` object.
|
|
1906
|
+
* @param chunkedBatch.indexName - The `indexName` to replace `objects` in.
|
|
1907
|
+
* @param chunkedBatch.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
1908
|
+
* @param chunkedBatch.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
|
|
1909
|
+
* @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.
|
|
1910
|
+
* @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.
|
|
1911
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1912
|
+
*/
|
|
1913
|
+
async chunkedBatch({ indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000, }, requestOptions) {
|
|
1914
|
+
let requests = [];
|
|
1915
|
+
const responses = [];
|
|
1916
|
+
for (const [i, obj] of objects.entries()) {
|
|
1917
|
+
requests.push({ action, body: obj });
|
|
1918
|
+
if (i % batchSize === 0) {
|
|
1919
|
+
responses.push(await this.batch({ indexName, batchWriteParams: { requests } }, requestOptions));
|
|
1920
|
+
requests = [];
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
if (waitForTasks) {
|
|
1924
|
+
for (const resp of responses) {
|
|
1925
|
+
await this.waitForTask({ indexName, taskID: resp.taskID });
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
return responses;
|
|
1929
|
+
},
|
|
1930
|
+
/**
|
|
1931
|
+
* 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
|
+
*
|
|
1933
|
+
* @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.
|
|
1934
|
+
* @param replaceAllObjects - The `replaceAllObjects` object.
|
|
1935
|
+
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
1936
|
+
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
1937
|
+
* @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.
|
|
1938
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1939
|
+
*/
|
|
1940
|
+
async replaceAllObjects({ indexName, objects, batchSize }, requestOptions) {
|
|
1941
|
+
const randomSuffix = Math.random().toString(36).substring(7);
|
|
1942
|
+
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
1943
|
+
const copyOperationResponse = await this.operationIndex({
|
|
1944
|
+
indexName,
|
|
1945
|
+
operationIndexParams: {
|
|
1946
|
+
operation: 'copy',
|
|
1947
|
+
destination: tmpIndexName,
|
|
1948
|
+
scope: ['settings', 'rules', 'synonyms'],
|
|
1949
|
+
},
|
|
1950
|
+
}, requestOptions);
|
|
1951
|
+
await this.waitForTask({
|
|
1952
|
+
indexName,
|
|
1953
|
+
taskID: copyOperationResponse.taskID,
|
|
1954
|
+
});
|
|
1955
|
+
const batchResponses = await this.chunkedBatch({ indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, requestOptions);
|
|
1956
|
+
const moveOperationResponse = await this.operationIndex({
|
|
1957
|
+
indexName: tmpIndexName,
|
|
1958
|
+
operationIndexParams: { operation: 'move', destination: indexName },
|
|
1959
|
+
}, requestOptions);
|
|
1960
|
+
await this.waitForTask({
|
|
1961
|
+
indexName,
|
|
1962
|
+
taskID: moveOperationResponse.taskID,
|
|
1963
|
+
});
|
|
1964
|
+
return { copyOperationResponse, batchResponses, moveOperationResponse };
|
|
1965
|
+
},
|
|
1966
|
+
/**
|
|
1967
|
+
* Creates a new API key with specific permissions and restrictions.
|
|
1968
|
+
*
|
|
1969
|
+
* Required API Key ACLs:
|
|
1970
|
+
* - admin.
|
|
1734
1971
|
*
|
|
1735
|
-
* @summary Add API key.
|
|
1736
1972
|
* @param apiKey - The apiKey object.
|
|
1737
1973
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1738
1974
|
*/
|
|
@@ -1756,13 +1992,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1756
1992
|
return transporter.request(request, requestOptions);
|
|
1757
1993
|
},
|
|
1758
1994
|
/**
|
|
1759
|
-
* If
|
|
1995
|
+
* 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).
|
|
1996
|
+
*
|
|
1997
|
+
* Required API Key ACLs:
|
|
1998
|
+
* - addObject.
|
|
1760
1999
|
*
|
|
1761
|
-
* @summary Add or update a record (using objectID).
|
|
1762
2000
|
* @param addOrUpdateObject - The addOrUpdateObject object.
|
|
1763
|
-
* @param addOrUpdateObject.indexName -
|
|
1764
|
-
* @param addOrUpdateObject.objectID - Unique record
|
|
1765
|
-
* @param addOrUpdateObject.body -
|
|
2001
|
+
* @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
2002
|
+
* @param addOrUpdateObject.objectID - Unique record identifier.
|
|
2003
|
+
* @param addOrUpdateObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
|
|
1766
2004
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1767
2005
|
*/
|
|
1768
2006
|
addOrUpdateObject({ indexName, objectID, body }, requestOptions) {
|
|
@@ -1790,9 +2028,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1790
2028
|
return transporter.request(request, requestOptions);
|
|
1791
2029
|
},
|
|
1792
2030
|
/**
|
|
1793
|
-
*
|
|
2031
|
+
* Adds a source to the list of allowed sources.
|
|
2032
|
+
*
|
|
2033
|
+
* Required API Key ACLs:
|
|
2034
|
+
* - admin.
|
|
1794
2035
|
*
|
|
1795
|
-
* @summary Add a source.
|
|
1796
2036
|
* @param source - Source to add.
|
|
1797
2037
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1798
2038
|
*/
|
|
@@ -1816,11 +2056,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1816
2056
|
return transporter.request(request, requestOptions);
|
|
1817
2057
|
},
|
|
1818
2058
|
/**
|
|
1819
|
-
*
|
|
2059
|
+
* 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.
|
|
2060
|
+
*
|
|
2061
|
+
* Required API Key ACLs:
|
|
2062
|
+
* - admin.
|
|
1820
2063
|
*
|
|
1821
|
-
* @summary Assign or move a user ID.
|
|
1822
2064
|
* @param assignUserId - The assignUserId object.
|
|
1823
|
-
* @param assignUserId.xAlgoliaUserID -
|
|
2065
|
+
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
1824
2066
|
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.
|
|
1825
2067
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1826
2068
|
*/
|
|
@@ -1850,11 +2092,10 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1850
2092
|
return transporter.request(request, requestOptions);
|
|
1851
2093
|
},
|
|
1852
2094
|
/**
|
|
1853
|
-
*
|
|
2095
|
+
* Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\'re specified. - Actions are equivalent to the individual API requests of the same name.
|
|
1854
2096
|
*
|
|
1855
|
-
* @summary Batch write operations on one index.
|
|
1856
2097
|
* @param batch - The batch object.
|
|
1857
|
-
* @param batch.indexName -
|
|
2098
|
+
* @param batch.indexName - Name of the index on which to perform the operation.
|
|
1858
2099
|
* @param batch.batchWriteParams - The batchWriteParams object.
|
|
1859
2100
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1860
2101
|
*/
|
|
@@ -1881,11 +2122,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1881
2122
|
return transporter.request(request, requestOptions);
|
|
1882
2123
|
},
|
|
1883
2124
|
/**
|
|
1884
|
-
*
|
|
2125
|
+
* Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
|
|
2126
|
+
*
|
|
2127
|
+
* Required API Key ACLs:
|
|
2128
|
+
* - admin.
|
|
1885
2129
|
*
|
|
1886
|
-
* @summary Batch assign userIDs.
|
|
1887
2130
|
* @param batchAssignUserIds - The batchAssignUserIds object.
|
|
1888
|
-
* @param batchAssignUserIds.xAlgoliaUserID -
|
|
2131
|
+
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
|
|
1889
2132
|
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
|
|
1890
2133
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1891
2134
|
*/
|
|
@@ -1918,11 +2161,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1918
2161
|
return transporter.request(request, requestOptions);
|
|
1919
2162
|
},
|
|
1920
2163
|
/**
|
|
1921
|
-
*
|
|
2164
|
+
* Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
|
|
2165
|
+
*
|
|
2166
|
+
* Required API Key ACLs:
|
|
2167
|
+
* - editSettings.
|
|
1922
2168
|
*
|
|
1923
|
-
* @summary Batch dictionary entries.
|
|
1924
2169
|
* @param batchDictionaryEntries - The batchDictionaryEntries object.
|
|
1925
|
-
* @param batchDictionaryEntries.dictionaryName - Dictionary to search
|
|
2170
|
+
* @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
1926
2171
|
* @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
|
|
1927
2172
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1928
2173
|
*/
|
|
@@ -1949,11 +2194,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1949
2194
|
return transporter.request(request, requestOptions);
|
|
1950
2195
|
},
|
|
1951
2196
|
/**
|
|
1952
|
-
*
|
|
2197
|
+
* 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.
|
|
2198
|
+
*
|
|
2199
|
+
* Required API Key ACLs:
|
|
2200
|
+
* - browse.
|
|
1953
2201
|
*
|
|
1954
|
-
* @summary Get all records from an index.
|
|
1955
2202
|
* @param browse - The browse object.
|
|
1956
|
-
* @param browse.indexName -
|
|
2203
|
+
* @param browse.indexName - Name of the index on which to perform the operation.
|
|
1957
2204
|
* @param browse.browseParams - The browseParams object.
|
|
1958
2205
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1959
2206
|
*/
|
|
@@ -1974,11 +2221,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1974
2221
|
return transporter.request(request, requestOptions);
|
|
1975
2222
|
},
|
|
1976
2223
|
/**
|
|
1977
|
-
*
|
|
2224
|
+
* Deletes only the records from an index while keeping settings, synonyms, and rules.
|
|
2225
|
+
*
|
|
2226
|
+
* Required API Key ACLs:
|
|
2227
|
+
* - deleteIndex.
|
|
1978
2228
|
*
|
|
1979
|
-
* @summary Delete all records from an index.
|
|
1980
2229
|
* @param clearObjects - The clearObjects object.
|
|
1981
|
-
* @param clearObjects.indexName -
|
|
2230
|
+
* @param clearObjects.indexName - Name of the index on which to perform the operation.
|
|
1982
2231
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1983
2232
|
*/
|
|
1984
2233
|
clearObjects({ indexName }, requestOptions) {
|
|
@@ -1997,12 +2246,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1997
2246
|
return transporter.request(request, requestOptions);
|
|
1998
2247
|
},
|
|
1999
2248
|
/**
|
|
2000
|
-
*
|
|
2249
|
+
* Deletes all rules from the index.
|
|
2250
|
+
*
|
|
2251
|
+
* Required API Key ACLs:
|
|
2252
|
+
* - editSettings.
|
|
2001
2253
|
*
|
|
2002
|
-
* @summary Delete all rules.
|
|
2003
2254
|
* @param clearRules - The clearRules object.
|
|
2004
|
-
* @param clearRules.indexName -
|
|
2005
|
-
* @param clearRules.forwardToReplicas -
|
|
2255
|
+
* @param clearRules.indexName - Name of the index on which to perform the operation.
|
|
2256
|
+
* @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2006
2257
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2007
2258
|
*/
|
|
2008
2259
|
clearRules({ indexName, forwardToReplicas }, requestOptions) {
|
|
@@ -2024,12 +2275,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2024
2275
|
return transporter.request(request, requestOptions);
|
|
2025
2276
|
},
|
|
2026
2277
|
/**
|
|
2027
|
-
*
|
|
2278
|
+
* Deletes all synonyms from the index.
|
|
2279
|
+
*
|
|
2280
|
+
* Required API Key ACLs:
|
|
2281
|
+
* - editSettings.
|
|
2028
2282
|
*
|
|
2029
|
-
* @summary Delete all synonyms.
|
|
2030
2283
|
* @param clearSynonyms - The clearSynonyms object.
|
|
2031
|
-
* @param clearSynonyms.indexName -
|
|
2032
|
-
* @param clearSynonyms.forwardToReplicas -
|
|
2284
|
+
* @param clearSynonyms.indexName - Name of the index on which to perform the operation.
|
|
2285
|
+
* @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2033
2286
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2034
2287
|
*/
|
|
2035
2288
|
clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
|
|
@@ -2053,7 +2306,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2053
2306
|
/**
|
|
2054
2307
|
* This method allow you to send requests to the Algolia REST API.
|
|
2055
2308
|
*
|
|
2056
|
-
* @summary Send requests to the Algolia REST API.
|
|
2057
2309
|
* @param customDelete - The customDelete object.
|
|
2058
2310
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2059
2311
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -2063,7 +2315,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2063
2315
|
if (!path) {
|
|
2064
2316
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
2065
2317
|
}
|
|
2066
|
-
const requestPath = '/
|
|
2318
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2067
2319
|
const headers = {};
|
|
2068
2320
|
const queryParameters = parameters ? parameters : {};
|
|
2069
2321
|
const request = {
|
|
@@ -2077,7 +2329,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2077
2329
|
/**
|
|
2078
2330
|
* This method allow you to send requests to the Algolia REST API.
|
|
2079
2331
|
*
|
|
2080
|
-
* @summary Send requests to the Algolia REST API.
|
|
2081
2332
|
* @param customGet - The customGet object.
|
|
2082
2333
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2083
2334
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -2087,7 +2338,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2087
2338
|
if (!path) {
|
|
2088
2339
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
2089
2340
|
}
|
|
2090
|
-
const requestPath = '/
|
|
2341
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2091
2342
|
const headers = {};
|
|
2092
2343
|
const queryParameters = parameters ? parameters : {};
|
|
2093
2344
|
const request = {
|
|
@@ -2101,7 +2352,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2101
2352
|
/**
|
|
2102
2353
|
* This method allow you to send requests to the Algolia REST API.
|
|
2103
2354
|
*
|
|
2104
|
-
* @summary Send requests to the Algolia REST API.
|
|
2105
2355
|
* @param customPost - The customPost object.
|
|
2106
2356
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2107
2357
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -2112,7 +2362,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2112
2362
|
if (!path) {
|
|
2113
2363
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
2114
2364
|
}
|
|
2115
|
-
const requestPath = '/
|
|
2365
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2116
2366
|
const headers = {};
|
|
2117
2367
|
const queryParameters = parameters ? parameters : {};
|
|
2118
2368
|
const request = {
|
|
@@ -2127,7 +2377,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2127
2377
|
/**
|
|
2128
2378
|
* This method allow you to send requests to the Algolia REST API.
|
|
2129
2379
|
*
|
|
2130
|
-
* @summary Send requests to the Algolia REST API.
|
|
2131
2380
|
* @param customPut - The customPut object.
|
|
2132
2381
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
2133
2382
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -2138,7 +2387,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2138
2387
|
if (!path) {
|
|
2139
2388
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
2140
2389
|
}
|
|
2141
|
-
const requestPath = '/
|
|
2390
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
2142
2391
|
const headers = {};
|
|
2143
2392
|
const queryParameters = parameters ? parameters : {};
|
|
2144
2393
|
const request = {
|
|
@@ -2151,9 +2400,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2151
2400
|
return transporter.request(request, requestOptions);
|
|
2152
2401
|
},
|
|
2153
2402
|
/**
|
|
2154
|
-
*
|
|
2403
|
+
* Deletes the API key.
|
|
2404
|
+
*
|
|
2405
|
+
* Required API Key ACLs:
|
|
2406
|
+
* - admin.
|
|
2155
2407
|
*
|
|
2156
|
-
* @summary Delete API key.
|
|
2157
2408
|
* @param deleteApiKey - The deleteApiKey object.
|
|
2158
2409
|
* @param deleteApiKey.key - API key.
|
|
2159
2410
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2174,11 +2425,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2174
2425
|
return transporter.request(request, requestOptions);
|
|
2175
2426
|
},
|
|
2176
2427
|
/**
|
|
2177
|
-
* This operation doesn\'t
|
|
2428
|
+
* 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).
|
|
2429
|
+
*
|
|
2430
|
+
* Required API Key ACLs:
|
|
2431
|
+
* - deleteIndex.
|
|
2178
2432
|
*
|
|
2179
|
-
* @summary Delete all records matching a query.
|
|
2180
2433
|
* @param deleteBy - The deleteBy object.
|
|
2181
|
-
* @param deleteBy.indexName -
|
|
2434
|
+
* @param deleteBy.indexName - Name of the index on which to perform the operation.
|
|
2182
2435
|
* @param deleteBy.deleteByParams - The deleteByParams object.
|
|
2183
2436
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2184
2437
|
*/
|
|
@@ -2202,11 +2455,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2202
2455
|
return transporter.request(request, requestOptions);
|
|
2203
2456
|
},
|
|
2204
2457
|
/**
|
|
2205
|
-
*
|
|
2458
|
+
* 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/).
|
|
2459
|
+
*
|
|
2460
|
+
* Required API Key ACLs:
|
|
2461
|
+
* - deleteIndex.
|
|
2206
2462
|
*
|
|
2207
|
-
* @summary Delete index.
|
|
2208
2463
|
* @param deleteIndex - The deleteIndex object.
|
|
2209
|
-
* @param deleteIndex.indexName -
|
|
2464
|
+
* @param deleteIndex.indexName - Name of the index on which to perform the operation.
|
|
2210
2465
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2211
2466
|
*/
|
|
2212
2467
|
deleteIndex({ indexName }, requestOptions) {
|
|
@@ -2225,12 +2480,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2225
2480
|
return transporter.request(request, requestOptions);
|
|
2226
2481
|
},
|
|
2227
2482
|
/**
|
|
2228
|
-
* To delete
|
|
2483
|
+
* 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).
|
|
2484
|
+
*
|
|
2485
|
+
* Required API Key ACLs:
|
|
2486
|
+
* - deleteObject.
|
|
2229
2487
|
*
|
|
2230
|
-
* @summary Delete a record.
|
|
2231
2488
|
* @param deleteObject - The deleteObject object.
|
|
2232
|
-
* @param deleteObject.indexName -
|
|
2233
|
-
* @param deleteObject.objectID - Unique record
|
|
2489
|
+
* @param deleteObject.indexName - Name of the index on which to perform the operation.
|
|
2490
|
+
* @param deleteObject.objectID - Unique record identifier.
|
|
2234
2491
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2235
2492
|
*/
|
|
2236
2493
|
deleteObject({ indexName, objectID }, requestOptions) {
|
|
@@ -2254,13 +2511,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2254
2511
|
return transporter.request(request, requestOptions);
|
|
2255
2512
|
},
|
|
2256
2513
|
/**
|
|
2257
|
-
*
|
|
2514
|
+
* Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
2515
|
+
*
|
|
2516
|
+
* Required API Key ACLs:
|
|
2517
|
+
* - editSettings.
|
|
2258
2518
|
*
|
|
2259
|
-
* @summary Delete a rule.
|
|
2260
2519
|
* @param deleteRule - The deleteRule object.
|
|
2261
|
-
* @param deleteRule.indexName -
|
|
2520
|
+
* @param deleteRule.indexName - Name of the index on which to perform the operation.
|
|
2262
2521
|
* @param deleteRule.objectID - Unique identifier of a rule object.
|
|
2263
|
-
* @param deleteRule.forwardToReplicas -
|
|
2522
|
+
* @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2264
2523
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2265
2524
|
*/
|
|
2266
2525
|
deleteRule({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
@@ -2287,9 +2546,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2287
2546
|
return transporter.request(request, requestOptions);
|
|
2288
2547
|
},
|
|
2289
2548
|
/**
|
|
2290
|
-
*
|
|
2549
|
+
* Deletes a source from the list of allowed sources.
|
|
2550
|
+
*
|
|
2551
|
+
* Required API Key ACLs:
|
|
2552
|
+
* - admin.
|
|
2291
2553
|
*
|
|
2292
|
-
* @summary Remove a source.
|
|
2293
2554
|
* @param deleteSource - The deleteSource object.
|
|
2294
2555
|
* @param deleteSource.source - IP address range of the source.
|
|
2295
2556
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2310,13 +2571,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2310
2571
|
return transporter.request(request, requestOptions);
|
|
2311
2572
|
},
|
|
2312
2573
|
/**
|
|
2313
|
-
*
|
|
2574
|
+
* Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
2575
|
+
*
|
|
2576
|
+
* Required API Key ACLs:
|
|
2577
|
+
* - editSettings.
|
|
2314
2578
|
*
|
|
2315
|
-
* @summary Delete a synonym.
|
|
2316
2579
|
* @param deleteSynonym - The deleteSynonym object.
|
|
2317
|
-
* @param deleteSynonym.indexName -
|
|
2580
|
+
* @param deleteSynonym.indexName - Name of the index on which to perform the operation.
|
|
2318
2581
|
* @param deleteSynonym.objectID - Unique identifier of a synonym object.
|
|
2319
|
-
* @param deleteSynonym.forwardToReplicas -
|
|
2582
|
+
* @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2320
2583
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2321
2584
|
*/
|
|
2322
2585
|
deleteSynonym({ indexName, objectID, forwardToReplicas }, requestOptions) {
|
|
@@ -2343,9 +2606,8 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2343
2606
|
return transporter.request(request, requestOptions);
|
|
2344
2607
|
},
|
|
2345
2608
|
/**
|
|
2346
|
-
*
|
|
2609
|
+
* Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key.
|
|
2347
2610
|
*
|
|
2348
|
-
* @summary Get API key permissions.
|
|
2349
2611
|
* @param getApiKey - The getApiKey object.
|
|
2350
2612
|
* @param getApiKey.key - API key.
|
|
2351
2613
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2366,9 +2628,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2366
2628
|
return transporter.request(request, requestOptions);
|
|
2367
2629
|
},
|
|
2368
2630
|
/**
|
|
2369
|
-
* Lists
|
|
2631
|
+
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
2632
|
+
*
|
|
2633
|
+
* Required API Key ACLs:
|
|
2634
|
+
* - settings.
|
|
2370
2635
|
*
|
|
2371
|
-
* @summary List available languages.
|
|
2372
2636
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2373
2637
|
*/
|
|
2374
2638
|
getDictionaryLanguages(requestOptions) {
|
|
@@ -2384,9 +2648,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2384
2648
|
return transporter.request(request, requestOptions);
|
|
2385
2649
|
},
|
|
2386
2650
|
/**
|
|
2387
|
-
*
|
|
2651
|
+
* Retrieves the languages for which standard dictionary entries are turned off.
|
|
2652
|
+
*
|
|
2653
|
+
* Required API Key ACLs:
|
|
2654
|
+
* - settings.
|
|
2388
2655
|
*
|
|
2389
|
-
* @summary Get stop word settings.
|
|
2390
2656
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2391
2657
|
*/
|
|
2392
2658
|
getDictionarySettings(requestOptions) {
|
|
@@ -2402,14 +2668,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2402
2668
|
return transporter.request(request, requestOptions);
|
|
2403
2669
|
},
|
|
2404
2670
|
/**
|
|
2405
|
-
* The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days.
|
|
2671
|
+
* 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.
|
|
2672
|
+
*
|
|
2673
|
+
* Required API Key ACLs:
|
|
2674
|
+
* - logs.
|
|
2406
2675
|
*
|
|
2407
|
-
* @summary Return the latest log entries.
|
|
2408
2676
|
* @param getLogs - The getLogs object.
|
|
2409
|
-
* @param getLogs.offset - First log entry to retrieve.
|
|
2677
|
+
* @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
|
|
2410
2678
|
* @param getLogs.length - Maximum number of entries to retrieve.
|
|
2411
|
-
* @param getLogs.indexName - Index for which log entries
|
|
2412
|
-
* @param getLogs.type - Type of log entries to retrieve.
|
|
2679
|
+
* @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
|
|
2680
|
+
* @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
|
|
2413
2681
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2414
2682
|
*/
|
|
2415
2683
|
getLogs({ offset, length, indexName, type } = {}, requestOptions = undefined) {
|
|
@@ -2437,13 +2705,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2437
2705
|
return transporter.request(request, requestOptions);
|
|
2438
2706
|
},
|
|
2439
2707
|
/**
|
|
2440
|
-
* To
|
|
2708
|
+
* Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
|
|
2709
|
+
*
|
|
2710
|
+
* Required API Key ACLs:
|
|
2711
|
+
* - search.
|
|
2441
2712
|
*
|
|
2442
|
-
* @summary Get a record.
|
|
2443
2713
|
* @param getObject - The getObject object.
|
|
2444
|
-
* @param getObject.indexName -
|
|
2445
|
-
* @param getObject.objectID - Unique record
|
|
2446
|
-
* @param getObject.attributesToRetrieve - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned.
|
|
2714
|
+
* @param getObject.indexName - Name of the index on which to perform the operation.
|
|
2715
|
+
* @param getObject.objectID - Unique record identifier.
|
|
2716
|
+
* @param getObject.attributesToRetrieve - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won\'t be retrieved unless the request is authenticated with the admin API key.
|
|
2447
2717
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2448
2718
|
*/
|
|
2449
2719
|
getObject({ indexName, objectID, attributesToRetrieve }, requestOptions) {
|
|
@@ -2470,9 +2740,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2470
2740
|
return transporter.request(request, requestOptions);
|
|
2471
2741
|
},
|
|
2472
2742
|
/**
|
|
2473
|
-
*
|
|
2743
|
+
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
2744
|
+
*
|
|
2745
|
+
* Required API Key ACLs:
|
|
2746
|
+
* - search.
|
|
2474
2747
|
*
|
|
2475
|
-
* @summary Get multiple records.
|
|
2476
2748
|
* @param getObjectsParams - Request object.
|
|
2477
2749
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2478
2750
|
*/
|
|
@@ -2498,11 +2770,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2498
2770
|
return transporter.request(request, requestOptions);
|
|
2499
2771
|
},
|
|
2500
2772
|
/**
|
|
2501
|
-
*
|
|
2773
|
+
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
2774
|
+
*
|
|
2775
|
+
* Required API Key ACLs:
|
|
2776
|
+
* - settings.
|
|
2502
2777
|
*
|
|
2503
|
-
* @summary Get a rule.
|
|
2504
2778
|
* @param getRule - The getRule object.
|
|
2505
|
-
* @param getRule.indexName -
|
|
2779
|
+
* @param getRule.indexName - Name of the index on which to perform the operation.
|
|
2506
2780
|
* @param getRule.objectID - Unique identifier of a rule object.
|
|
2507
2781
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2508
2782
|
*/
|
|
@@ -2527,11 +2801,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2527
2801
|
return transporter.request(request, requestOptions);
|
|
2528
2802
|
},
|
|
2529
2803
|
/**
|
|
2530
|
-
*
|
|
2804
|
+
* Retrieves an object with non-null index settings.
|
|
2805
|
+
*
|
|
2806
|
+
* Required API Key ACLs:
|
|
2807
|
+
* - search.
|
|
2531
2808
|
*
|
|
2532
|
-
* @summary Get index settings.
|
|
2533
2809
|
* @param getSettings - The getSettings object.
|
|
2534
|
-
* @param getSettings.indexName -
|
|
2810
|
+
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
2535
2811
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2536
2812
|
*/
|
|
2537
2813
|
getSettings({ indexName }, requestOptions) {
|
|
@@ -2550,9 +2826,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2550
2826
|
return transporter.request(request, requestOptions);
|
|
2551
2827
|
},
|
|
2552
2828
|
/**
|
|
2553
|
-
*
|
|
2829
|
+
* Retrieves all allowed IP addresses with access to your application.
|
|
2830
|
+
*
|
|
2831
|
+
* Required API Key ACLs:
|
|
2832
|
+
* - admin.
|
|
2554
2833
|
*
|
|
2555
|
-
* @summary Get all allowed IP addresses.
|
|
2556
2834
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2557
2835
|
*/
|
|
2558
2836
|
getSources(requestOptions) {
|
|
@@ -2568,11 +2846,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2568
2846
|
return transporter.request(request, requestOptions);
|
|
2569
2847
|
},
|
|
2570
2848
|
/**
|
|
2571
|
-
*
|
|
2849
|
+
* Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
2850
|
+
*
|
|
2851
|
+
* Required API Key ACLs:
|
|
2852
|
+
* - settings.
|
|
2572
2853
|
*
|
|
2573
|
-
* @summary Get a synonym object.
|
|
2574
2854
|
* @param getSynonym - The getSynonym object.
|
|
2575
|
-
* @param getSynonym.indexName -
|
|
2855
|
+
* @param getSynonym.indexName - Name of the index on which to perform the operation.
|
|
2576
2856
|
* @param getSynonym.objectID - Unique identifier of a synonym object.
|
|
2577
2857
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2578
2858
|
*/
|
|
@@ -2597,11 +2877,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2597
2877
|
return transporter.request(request, requestOptions);
|
|
2598
2878
|
},
|
|
2599
2879
|
/**
|
|
2600
|
-
*
|
|
2880
|
+
* 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.
|
|
2881
|
+
*
|
|
2882
|
+
* Required API Key ACLs:
|
|
2883
|
+
* - addObject.
|
|
2601
2884
|
*
|
|
2602
|
-
* @summary Check a task\'s status.
|
|
2603
2885
|
* @param getTask - The getTask object.
|
|
2604
|
-
* @param getTask.indexName -
|
|
2886
|
+
* @param getTask.indexName - Name of the index on which to perform the operation.
|
|
2605
2887
|
* @param getTask.taskID - Unique task identifier.
|
|
2606
2888
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2607
2889
|
*/
|
|
@@ -2626,9 +2908,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2626
2908
|
return transporter.request(request, requestOptions);
|
|
2627
2909
|
},
|
|
2628
2910
|
/**
|
|
2629
|
-
* Get the IDs of the 10 users with the highest number of records per cluster.
|
|
2911
|
+
* 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.
|
|
2912
|
+
*
|
|
2913
|
+
* Required API Key ACLs:
|
|
2914
|
+
* - admin.
|
|
2630
2915
|
*
|
|
2631
|
-
* @summary Get top userID.
|
|
2632
2916
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2633
2917
|
*/
|
|
2634
2918
|
getTopUserIds(requestOptions) {
|
|
@@ -2644,11 +2928,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2644
2928
|
return transporter.request(request, requestOptions);
|
|
2645
2929
|
},
|
|
2646
2930
|
/**
|
|
2647
|
-
* Returns the
|
|
2931
|
+
* 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.
|
|
2932
|
+
*
|
|
2933
|
+
* Required API Key ACLs:
|
|
2934
|
+
* - admin.
|
|
2648
2935
|
*
|
|
2649
|
-
* @summary Get userID.
|
|
2650
2936
|
* @param getUserId - The getUserId object.
|
|
2651
|
-
* @param getUserId.userID -
|
|
2937
|
+
* @param getUserId.userID - Unique identifier of the user who makes the search request.
|
|
2652
2938
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2653
2939
|
*/
|
|
2654
2940
|
getUserId({ userID }, requestOptions) {
|
|
@@ -2669,9 +2955,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2669
2955
|
/**
|
|
2670
2956
|
* To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.
|
|
2671
2957
|
*
|
|
2672
|
-
*
|
|
2958
|
+
* Required API Key ACLs:
|
|
2959
|
+
* - admin.
|
|
2960
|
+
*
|
|
2673
2961
|
* @param hasPendingMappings - The hasPendingMappings object.
|
|
2674
|
-
* @param hasPendingMappings.getClusters -
|
|
2962
|
+
* @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
|
|
2675
2963
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2676
2964
|
*/
|
|
2677
2965
|
hasPendingMappings({ getClusters } = {}, requestOptions = undefined) {
|
|
@@ -2690,9 +2978,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2690
2978
|
return transporter.request(request, requestOptions);
|
|
2691
2979
|
},
|
|
2692
2980
|
/**
|
|
2693
|
-
*
|
|
2981
|
+
* Lists all API keys associated with your Algolia application, including their permissions and restrictions.
|
|
2982
|
+
*
|
|
2983
|
+
* Required API Key ACLs:
|
|
2984
|
+
* - admin.
|
|
2694
2985
|
*
|
|
2695
|
-
* @summary List API keys.
|
|
2696
2986
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2697
2987
|
*/
|
|
2698
2988
|
listApiKeys(requestOptions) {
|
|
@@ -2708,9 +2998,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2708
2998
|
return transporter.request(request, requestOptions);
|
|
2709
2999
|
},
|
|
2710
3000
|
/**
|
|
2711
|
-
*
|
|
3001
|
+
* Lists the available clusters in a multi-cluster setup.
|
|
3002
|
+
*
|
|
3003
|
+
* Required API Key ACLs:
|
|
3004
|
+
* - admin.
|
|
2712
3005
|
*
|
|
2713
|
-
* @summary List clusters.
|
|
2714
3006
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2715
3007
|
*/
|
|
2716
3008
|
listClusters(requestOptions) {
|
|
@@ -2726,12 +3018,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2726
3018
|
return transporter.request(request, requestOptions);
|
|
2727
3019
|
},
|
|
2728
3020
|
/**
|
|
2729
|
-
*
|
|
3021
|
+
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
3022
|
+
*
|
|
3023
|
+
* Required API Key ACLs:
|
|
3024
|
+
* - listIndexes.
|
|
2730
3025
|
*
|
|
2731
|
-
* @summary List indices.
|
|
2732
3026
|
* @param listIndices - The listIndices object.
|
|
2733
|
-
* @param listIndices.page -
|
|
2734
|
-
* @param listIndices.hitsPerPage -
|
|
3027
|
+
* @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
3028
|
+
* @param listIndices.hitsPerPage - Number of hits per page.
|
|
2735
3029
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2736
3030
|
*/
|
|
2737
3031
|
listIndices({ page, hitsPerPage } = {}, requestOptions = undefined) {
|
|
@@ -2753,12 +3047,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2753
3047
|
return transporter.request(request, requestOptions);
|
|
2754
3048
|
},
|
|
2755
3049
|
/**
|
|
2756
|
-
*
|
|
3050
|
+
* 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.
|
|
3051
|
+
*
|
|
3052
|
+
* Required API Key ACLs:
|
|
3053
|
+
* - admin.
|
|
2757
3054
|
*
|
|
2758
|
-
* @summary List userIDs.
|
|
2759
3055
|
* @param listUserIds - The listUserIds object.
|
|
2760
|
-
* @param listUserIds.page -
|
|
2761
|
-
* @param listUserIds.hitsPerPage -
|
|
3056
|
+
* @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
|
|
3057
|
+
* @param listUserIds.hitsPerPage - Number of hits per page.
|
|
2762
3058
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2763
3059
|
*/
|
|
2764
3060
|
listUserIds({ page, hitsPerPage } = {}, requestOptions = undefined) {
|
|
@@ -2780,9 +3076,8 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2780
3076
|
return transporter.request(request, requestOptions);
|
|
2781
3077
|
},
|
|
2782
3078
|
/**
|
|
2783
|
-
*
|
|
3079
|
+
* Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name.
|
|
2784
3080
|
*
|
|
2785
|
-
* @summary Batch write operations on multiple indices.
|
|
2786
3081
|
* @param batchParams - The batchParams object.
|
|
2787
3082
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2788
3083
|
*/
|
|
@@ -2806,11 +3101,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2806
3101
|
return transporter.request(request, requestOptions);
|
|
2807
3102
|
},
|
|
2808
3103
|
/**
|
|
2809
|
-
*
|
|
3104
|
+
* 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/).
|
|
3105
|
+
*
|
|
3106
|
+
* Required API Key ACLs:
|
|
3107
|
+
* - addObject.
|
|
2810
3108
|
*
|
|
2811
|
-
* @summary Copy, move, or rename an index.
|
|
2812
3109
|
* @param operationIndex - The operationIndex object.
|
|
2813
|
-
* @param operationIndex.indexName -
|
|
3110
|
+
* @param operationIndex.indexName - Name of the index on which to perform the operation.
|
|
2814
3111
|
* @param operationIndex.operationIndexParams - The operationIndexParams object.
|
|
2815
3112
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2816
3113
|
*/
|
|
@@ -2840,14 +3137,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2840
3137
|
return transporter.request(request, requestOptions);
|
|
2841
3138
|
},
|
|
2842
3139
|
/**
|
|
2843
|
-
*
|
|
3140
|
+
* 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.
|
|
3141
|
+
*
|
|
3142
|
+
* Required API Key ACLs:
|
|
3143
|
+
* - addObject.
|
|
2844
3144
|
*
|
|
2845
|
-
* @summary Update record attributes.
|
|
2846
3145
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2847
|
-
* @param partialUpdateObject.indexName -
|
|
2848
|
-
* @param partialUpdateObject.objectID - Unique record
|
|
2849
|
-
* @param partialUpdateObject.attributesToUpdate -
|
|
2850
|
-
* @param partialUpdateObject.createIfNotExists -
|
|
3146
|
+
* @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
|
|
3147
|
+
* @param partialUpdateObject.objectID - Unique record identifier.
|
|
3148
|
+
* @param partialUpdateObject.attributesToUpdate - Attributes with their values.
|
|
3149
|
+
* @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
|
|
2851
3150
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2852
3151
|
*/
|
|
2853
3152
|
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }, requestOptions) {
|
|
@@ -2878,11 +3177,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2878
3177
|
return transporter.request(request, requestOptions);
|
|
2879
3178
|
},
|
|
2880
3179
|
/**
|
|
2881
|
-
*
|
|
3180
|
+
* Deletes a user ID and its associated data from the clusters.
|
|
3181
|
+
*
|
|
3182
|
+
* Required API Key ACLs:
|
|
3183
|
+
* - admin.
|
|
2882
3184
|
*
|
|
2883
|
-
* @summary Remove userID.
|
|
2884
3185
|
* @param removeUserId - The removeUserId object.
|
|
2885
|
-
* @param removeUserId.userID -
|
|
3186
|
+
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
|
|
2886
3187
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2887
3188
|
*/
|
|
2888
3189
|
removeUserId({ userID }, requestOptions) {
|
|
@@ -2901,9 +3202,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2901
3202
|
return transporter.request(request, requestOptions);
|
|
2902
3203
|
},
|
|
2903
3204
|
/**
|
|
2904
|
-
*
|
|
3205
|
+
* Replaces the list of allowed sources.
|
|
3206
|
+
*
|
|
3207
|
+
* Required API Key ACLs:
|
|
3208
|
+
* - admin.
|
|
2905
3209
|
*
|
|
2906
|
-
* @summary Replace all sources.
|
|
2907
3210
|
* @param replaceSources - The replaceSources object.
|
|
2908
3211
|
* @param replaceSources.source - Allowed sources.
|
|
2909
3212
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2925,9 +3228,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2925
3228
|
return transporter.request(request, requestOptions);
|
|
2926
3229
|
},
|
|
2927
3230
|
/**
|
|
2928
|
-
*
|
|
3231
|
+
* 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.
|
|
3232
|
+
*
|
|
3233
|
+
* Required API Key ACLs:
|
|
3234
|
+
* - admin.
|
|
2929
3235
|
*
|
|
2930
|
-
* @summary Restore API key.
|
|
2931
3236
|
* @param restoreApiKey - The restoreApiKey object.
|
|
2932
3237
|
* @param restoreApiKey.key - API key.
|
|
2933
3238
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -2948,12 +3253,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2948
3253
|
return transporter.request(request, requestOptions);
|
|
2949
3254
|
},
|
|
2950
3255
|
/**
|
|
2951
|
-
*
|
|
3256
|
+
* 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).
|
|
3257
|
+
*
|
|
3258
|
+
* Required API Key ACLs:
|
|
3259
|
+
* - addObject.
|
|
2952
3260
|
*
|
|
2953
|
-
* @summary Add or update a record.
|
|
2954
3261
|
* @param saveObject - The saveObject object.
|
|
2955
|
-
* @param saveObject.indexName -
|
|
2956
|
-
* @param saveObject.body - The
|
|
3262
|
+
* @param saveObject.indexName - Name of the index on which to perform the operation.
|
|
3263
|
+
* @param saveObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
|
|
2957
3264
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2958
3265
|
*/
|
|
2959
3266
|
saveObject({ indexName, body }, requestOptions) {
|
|
@@ -2976,14 +3283,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2976
3283
|
return transporter.request(request, requestOptions);
|
|
2977
3284
|
},
|
|
2978
3285
|
/**
|
|
2979
|
-
* To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
|
|
3286
|
+
* 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).
|
|
3287
|
+
*
|
|
3288
|
+
* Required API Key ACLs:
|
|
3289
|
+
* - editSettings.
|
|
2980
3290
|
*
|
|
2981
|
-
* @summary Create or update a rule.
|
|
2982
3291
|
* @param saveRule - The saveRule object.
|
|
2983
|
-
* @param saveRule.indexName -
|
|
3292
|
+
* @param saveRule.indexName - Name of the index on which to perform the operation.
|
|
2984
3293
|
* @param saveRule.objectID - Unique identifier of a rule object.
|
|
2985
3294
|
* @param saveRule.rule - The rule object.
|
|
2986
|
-
* @param saveRule.forwardToReplicas -
|
|
3295
|
+
* @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
|
|
2987
3296
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2988
3297
|
*/
|
|
2989
3298
|
saveRule({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
|
|
@@ -3017,14 +3326,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3017
3326
|
return transporter.request(request, requestOptions);
|
|
3018
3327
|
},
|
|
3019
3328
|
/**
|
|
3020
|
-
* Create or update multiple rules.
|
|
3329
|
+
* 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.
|
|
3330
|
+
*
|
|
3331
|
+
* Required API Key ACLs:
|
|
3332
|
+
* - editSettings.
|
|
3021
3333
|
*
|
|
3022
|
-
* @summary Save a batch of rules.
|
|
3023
3334
|
* @param saveRules - The saveRules object.
|
|
3024
|
-
* @param saveRules.indexName -
|
|
3335
|
+
* @param saveRules.indexName - Name of the index on which to perform the operation.
|
|
3025
3336
|
* @param saveRules.rules - The rules object.
|
|
3026
|
-
* @param saveRules.forwardToReplicas -
|
|
3027
|
-
* @param saveRules.clearExistingRules -
|
|
3337
|
+
* @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3338
|
+
* @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
|
|
3028
3339
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3029
3340
|
*/
|
|
3030
3341
|
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }, requestOptions) {
|
|
@@ -3053,14 +3364,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3053
3364
|
return transporter.request(request, requestOptions);
|
|
3054
3365
|
},
|
|
3055
3366
|
/**
|
|
3056
|
-
*
|
|
3367
|
+
* 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).
|
|
3368
|
+
*
|
|
3369
|
+
* Required API Key ACLs:
|
|
3370
|
+
* - editSettings.
|
|
3057
3371
|
*
|
|
3058
|
-
* @summary Save a synonym.
|
|
3059
3372
|
* @param saveSynonym - The saveSynonym object.
|
|
3060
|
-
* @param saveSynonym.indexName -
|
|
3373
|
+
* @param saveSynonym.indexName - Name of the index on which to perform the operation.
|
|
3061
3374
|
* @param saveSynonym.objectID - Unique identifier of a synonym object.
|
|
3062
3375
|
* @param saveSynonym.synonymHit - The synonymHit object.
|
|
3063
|
-
* @param saveSynonym.forwardToReplicas -
|
|
3376
|
+
* @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3064
3377
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3065
3378
|
*/
|
|
3066
3379
|
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
|
|
@@ -3097,14 +3410,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3097
3410
|
return transporter.request(request, requestOptions);
|
|
3098
3411
|
},
|
|
3099
3412
|
/**
|
|
3100
|
-
*
|
|
3413
|
+
* If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
|
|
3414
|
+
*
|
|
3415
|
+
* Required API Key ACLs:
|
|
3416
|
+
* - editSettings.
|
|
3101
3417
|
*
|
|
3102
|
-
* @summary Save a batch of synonyms.
|
|
3103
3418
|
* @param saveSynonyms - The saveSynonyms object.
|
|
3104
|
-
* @param saveSynonyms.indexName -
|
|
3419
|
+
* @param saveSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3105
3420
|
* @param saveSynonyms.synonymHit - The synonymHit object.
|
|
3106
|
-
* @param saveSynonyms.forwardToReplicas -
|
|
3107
|
-
* @param saveSynonyms.replaceExistingSynonyms -
|
|
3421
|
+
* @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3422
|
+
* @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
|
|
3108
3423
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3109
3424
|
*/
|
|
3110
3425
|
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }, requestOptions) {
|
|
@@ -3134,10 +3449,12 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3134
3449
|
return transporter.request(request, requestOptions);
|
|
3135
3450
|
},
|
|
3136
3451
|
/**
|
|
3137
|
-
*
|
|
3452
|
+
* Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters.
|
|
3138
3453
|
*
|
|
3139
|
-
*
|
|
3140
|
-
*
|
|
3454
|
+
* Required API Key ACLs:
|
|
3455
|
+
* - search.
|
|
3456
|
+
*
|
|
3457
|
+
* @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
|
|
3141
3458
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3142
3459
|
*/
|
|
3143
3460
|
search(searchMethodParams, requestOptions) {
|
|
@@ -3184,11 +3501,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3184
3501
|
return transporter.request(request, requestOptions);
|
|
3185
3502
|
},
|
|
3186
3503
|
/**
|
|
3187
|
-
*
|
|
3504
|
+
* Searches for standard and custom dictionary entries.
|
|
3505
|
+
*
|
|
3506
|
+
* Required API Key ACLs:
|
|
3507
|
+
* - settings.
|
|
3188
3508
|
*
|
|
3189
|
-
* @summary Search dictionary entries.
|
|
3190
3509
|
* @param searchDictionaryEntries - The searchDictionaryEntries object.
|
|
3191
|
-
* @param searchDictionaryEntries.dictionaryName - Dictionary to search
|
|
3510
|
+
* @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
|
|
3192
3511
|
* @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
|
|
3193
3512
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3194
3513
|
*/
|
|
@@ -3217,12 +3536,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3217
3536
|
return transporter.request(request, requestOptions);
|
|
3218
3537
|
},
|
|
3219
3538
|
/**
|
|
3220
|
-
*
|
|
3539
|
+
* 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**.
|
|
3540
|
+
*
|
|
3541
|
+
* Required API Key ACLs:
|
|
3542
|
+
* - search.
|
|
3221
3543
|
*
|
|
3222
|
-
* @summary Search for facet values.
|
|
3223
3544
|
* @param searchForFacetValues - The searchForFacetValues object.
|
|
3224
|
-
* @param searchForFacetValues.indexName -
|
|
3225
|
-
* @param searchForFacetValues.facetName - Facet
|
|
3545
|
+
* @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
|
|
3546
|
+
* @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
|
|
3226
3547
|
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
|
|
3227
3548
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3228
3549
|
*/
|
|
@@ -3250,11 +3571,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3250
3571
|
return transporter.request(request, requestOptions);
|
|
3251
3572
|
},
|
|
3252
3573
|
/**
|
|
3253
|
-
*
|
|
3574
|
+
* Searches for rules in your index.
|
|
3575
|
+
*
|
|
3576
|
+
* Required API Key ACLs:
|
|
3577
|
+
* - settings.
|
|
3254
3578
|
*
|
|
3255
|
-
* @summary Search for rules.
|
|
3256
3579
|
* @param searchRules - The searchRules object.
|
|
3257
|
-
* @param searchRules.indexName -
|
|
3580
|
+
* @param searchRules.indexName - Name of the index on which to perform the operation.
|
|
3258
3581
|
* @param searchRules.searchRulesParams - The searchRulesParams object.
|
|
3259
3582
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3260
3583
|
*/
|
|
@@ -3277,11 +3600,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3277
3600
|
return transporter.request(request, requestOptions);
|
|
3278
3601
|
},
|
|
3279
3602
|
/**
|
|
3280
|
-
*
|
|
3603
|
+
* 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.
|
|
3604
|
+
*
|
|
3605
|
+
* Required API Key ACLs:
|
|
3606
|
+
* - search.
|
|
3281
3607
|
*
|
|
3282
|
-
* @summary Search an index.
|
|
3283
3608
|
* @param searchSingleIndex - The searchSingleIndex object.
|
|
3284
|
-
* @param searchSingleIndex.indexName -
|
|
3609
|
+
* @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
|
|
3285
3610
|
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
3286
3611
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3287
3612
|
*/
|
|
@@ -3304,11 +3629,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3304
3629
|
return transporter.request(request, requestOptions);
|
|
3305
3630
|
},
|
|
3306
3631
|
/**
|
|
3307
|
-
*
|
|
3632
|
+
* Searches for synonyms in your index.
|
|
3633
|
+
*
|
|
3634
|
+
* Required API Key ACLs:
|
|
3635
|
+
* - settings.
|
|
3308
3636
|
*
|
|
3309
|
-
* @summary Search for synonyms.
|
|
3310
3637
|
* @param searchSynonyms - The searchSynonyms object.
|
|
3311
|
-
* @param searchSynonyms.indexName -
|
|
3638
|
+
* @param searchSynonyms.indexName - Name of the index on which to perform the operation.
|
|
3312
3639
|
* @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
|
|
3313
3640
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3314
3641
|
*/
|
|
@@ -3331,9 +3658,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3331
3658
|
return transporter.request(request, requestOptions);
|
|
3332
3659
|
},
|
|
3333
3660
|
/**
|
|
3334
|
-
* Since it can take
|
|
3661
|
+
* 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).
|
|
3662
|
+
*
|
|
3663
|
+
* Required API Key ACLs:
|
|
3664
|
+
* - admin.
|
|
3335
3665
|
*
|
|
3336
|
-
* @summary Search for a user ID.
|
|
3337
3666
|
* @param searchUserIdsParams - The searchUserIdsParams object.
|
|
3338
3667
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3339
3668
|
*/
|
|
@@ -3359,9 +3688,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3359
3688
|
return transporter.request(request, requestOptions);
|
|
3360
3689
|
},
|
|
3361
3690
|
/**
|
|
3362
|
-
*
|
|
3691
|
+
* Turns standard stop word dictionary entries on or off for a given language.
|
|
3692
|
+
*
|
|
3693
|
+
* Required API Key ACLs:
|
|
3694
|
+
* - editSettings.
|
|
3363
3695
|
*
|
|
3364
|
-
* @summary Set stop word settings.
|
|
3365
3696
|
* @param dictionarySettingsParams - The dictionarySettingsParams object.
|
|
3366
3697
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3367
3698
|
*/
|
|
@@ -3385,13 +3716,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3385
3716
|
return transporter.request(request, requestOptions);
|
|
3386
3717
|
},
|
|
3387
3718
|
/**
|
|
3388
|
-
* Update the specified
|
|
3719
|
+
* 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.
|
|
3720
|
+
*
|
|
3721
|
+
* Required API Key ACLs:
|
|
3722
|
+
* - editSettings.
|
|
3389
3723
|
*
|
|
3390
|
-
* @summary Update index settings.
|
|
3391
3724
|
* @param setSettings - The setSettings object.
|
|
3392
|
-
* @param setSettings.indexName -
|
|
3725
|
+
* @param setSettings.indexName - Name of the index on which to perform the operation.
|
|
3393
3726
|
* @param setSettings.indexSettings - The indexSettings object.
|
|
3394
|
-
* @param setSettings.forwardToReplicas -
|
|
3727
|
+
* @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
|
|
3395
3728
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3396
3729
|
*/
|
|
3397
3730
|
setSettings({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
|
|
@@ -3417,9 +3750,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3417
3750
|
return transporter.request(request, requestOptions);
|
|
3418
3751
|
},
|
|
3419
3752
|
/**
|
|
3420
|
-
*
|
|
3753
|
+
* Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
|
|
3754
|
+
*
|
|
3755
|
+
* Required API Key ACLs:
|
|
3756
|
+
* - admin.
|
|
3421
3757
|
*
|
|
3422
|
-
* @summary Update an API key.
|
|
3423
3758
|
* @param updateApiKey - The updateApiKey object.
|
|
3424
3759
|
* @param updateApiKey.key - API key.
|
|
3425
3760
|
* @param updateApiKey.apiKey - The apiKey object.
|
|
@@ -3523,6 +3858,36 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
3523
3858
|
initAnalytics,
|
|
3524
3859
|
initPersonalization,
|
|
3525
3860
|
initAbtesting,
|
|
3861
|
+
/**
|
|
3862
|
+
* Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.
|
|
3863
|
+
*
|
|
3864
|
+
* @summary Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.
|
|
3865
|
+
* @param generateSecuredApiKey - The `generateSecuredApiKey` object.
|
|
3866
|
+
* @param generateSecuredApiKey.parentApiKey - The base API key from which to generate the new secured one.
|
|
3867
|
+
* @param generateSecuredApiKey.restrictions - A set of properties defining the restrictions of the secured API key.
|
|
3868
|
+
*/
|
|
3869
|
+
generateSecuredApiKey({ parentApiKey, restrictions = {}, }) {
|
|
3870
|
+
const queryParameters = clientCommon.serializeQueryParameters(restrictions);
|
|
3871
|
+
return Buffer.from(crypto.createHmac('sha256', parentApiKey)
|
|
3872
|
+
.update(queryParameters)
|
|
3873
|
+
.digest('hex') + queryParameters).toString('base64');
|
|
3874
|
+
},
|
|
3875
|
+
/**
|
|
3876
|
+
* Helper: Retrieves the remaining validity of the previous generated `securedApiKey`, the `ValidUntil` parameter must have been provided.
|
|
3877
|
+
*
|
|
3878
|
+
* @summary Helper: Retrieves the remaining validity of the previous generated `secured_api_key`, the `ValidUntil` parameter must have been provided.
|
|
3879
|
+
* @param getSecuredApiKeyRemainingValidity - The `getSecuredApiKeyRemainingValidity` object.
|
|
3880
|
+
* @param getSecuredApiKeyRemainingValidity.securedApiKey - The secured API key generated with the `generateSecuredApiKey` method.
|
|
3881
|
+
*/
|
|
3882
|
+
getSecuredApiKeyRemainingValidity({ securedApiKey, }) {
|
|
3883
|
+
const decodedString = Buffer.from(securedApiKey, 'base64').toString('ascii');
|
|
3884
|
+
const regex = /validUntil=(\d+)/;
|
|
3885
|
+
const match = decodedString.match(regex);
|
|
3886
|
+
if (match === null) {
|
|
3887
|
+
throw new Error('validUntil not found in given secured api key.');
|
|
3888
|
+
}
|
|
3889
|
+
return parseInt(match[1], 10) - Math.round(new Date().getTime() / 1000);
|
|
3890
|
+
},
|
|
3526
3891
|
};
|
|
3527
3892
|
}
|
|
3528
3893
|
|