algoliasearch 5.0.0-alpha.1 → 5.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/builds/browser.ts +13 -10
- package/builds/models.ts +12 -6
- package/builds/node.ts +13 -10
- package/dist/algoliasearch/builds/browser.d.ts +23 -14
- package/dist/algoliasearch/builds/browser.d.ts.map +1 -1
- package/dist/algoliasearch/builds/node.d.ts +23 -14
- package/dist/algoliasearch/builds/node.d.ts.map +1 -1
- package/dist/algoliasearch/lite/builds/browser.d.ts +2 -2
- package/dist/algoliasearch/lite/builds/browser.d.ts.map +1 -1
- package/dist/algoliasearch/lite/builds/node.d.ts +2 -2
- package/dist/algoliasearch/lite/builds/node.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/acl.d.ts +3 -0
- package/dist/algoliasearch/lite/model/acl.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/addApiKeyResponse.d.ts +1 -1
- package/dist/algoliasearch/lite/model/addApiKeyResponse.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/apiKey.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/attributeToUpdate.d.ts +3 -0
- package/dist/algoliasearch/lite/model/attributeToUpdate.d.ts.map +1 -0
- package/dist/algoliasearch/lite/model/automaticFacetFilter.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/baseGetApiKeyResponse.d.ts +11 -0
- package/dist/algoliasearch/lite/model/baseGetApiKeyResponse.d.ts.map +1 -0
- package/dist/algoliasearch/lite/model/baseIndexSettings.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/baseSearchResponse.d.ts +2 -2
- package/dist/algoliasearch/lite/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/browseResponse.d.ts +1 -1
- package/dist/algoliasearch/lite/model/browseResponse.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/builtInOperation.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/condition.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/consequence.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/consequenceQueryObject.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/dictionaryEntry.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/distinct.d.ts +5 -0
- package/dist/algoliasearch/lite/model/distinct.d.ts.map +1 -0
- package/dist/algoliasearch/lite/model/edit.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/facetOrdering.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/facetsStats.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/fetchedIndex.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/getApiKeyResponse.d.ts +4 -0
- package/dist/algoliasearch/lite/model/getApiKeyResponse.d.ts.map +1 -0
- package/dist/algoliasearch/lite/model/highlightResultOption.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/hit.d.ts +1 -1
- package/dist/algoliasearch/lite/model/hit.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/index.d.ts +4 -3
- package/dist/algoliasearch/lite/model/index.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/indexSettingsAsSearchParams.d.ts +2 -4
- package/dist/algoliasearch/lite/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/languages.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/listIndicesResponse.d.ts +1 -1
- package/dist/algoliasearch/lite/model/listIndicesResponse.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/matchedGeoLocation.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/params.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/personalization.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/promoteObjectID.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/promoteObjectIDs.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/rankingInfo.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/rule.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/searchForFacetsOptions.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/searchForHitsOptions.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/searchHits.d.ts +2 -2
- package/dist/algoliasearch/lite/model/searchHits.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/searchMethodParams.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/searchResponse.d.ts +1 -1
- package/dist/algoliasearch/lite/model/searchResponse.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/searchResponses.d.ts +1 -1
- package/dist/algoliasearch/lite/model/searchResponses.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/searchSynonymsResponse.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/snippetResultOption.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/source.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/standardEntries.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/synonymHit.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/synonymHitHighlightResult.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/timeRange.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/updatedRuleResponse.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/userId.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/value.d.ts.map +1 -1
- package/dist/algoliasearch/lite/src/liteClient.d.ts +12 -1
- package/dist/algoliasearch/lite/src/liteClient.d.ts.map +1 -1
- package/dist/algoliasearch.cjs.js +186 -28
- package/dist/algoliasearch.esm.browser.js +214 -56
- package/dist/algoliasearch.esm.node.js +187 -29
- package/dist/algoliasearch.umd.js +2 -2
- package/dist/builds/browser.d.ts +23 -14
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/models.d.ts +11 -8
- package/dist/builds/models.d.ts.map +1 -1
- package/dist/builds/node.d.ts +23 -14
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-abtesting/model/aBTest.d.ts.map +1 -1
- package/dist/client-abtesting/model/aBTestResponse.d.ts.map +1 -1
- package/dist/client-abtesting/model/abTestsVariant.d.ts.map +1 -1
- package/dist/client-abtesting/model/addABTestsRequest.d.ts.map +1 -1
- package/dist/client-abtesting/model/listABTestsResponse.d.ts.map +1 -1
- package/dist/client-abtesting/model/variant.d.ts.map +1 -1
- package/dist/client-abtesting/src/abtestingClient.d.ts +12 -1
- package/dist/client-abtesting/src/abtestingClient.d.ts.map +1 -1
- package/dist/client-analytics/model/averageClickEvent.d.ts.map +1 -1
- package/dist/client-analytics/model/clickPosition.d.ts.map +1 -1
- package/dist/client-analytics/model/clickThroughRateEvent.d.ts.map +1 -1
- package/dist/client-analytics/model/conversionRateEvent.d.ts.map +1 -1
- package/dist/client-analytics/model/getAverageClickPositionResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getClickThroughRateResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getConversationRateResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getNoClickRateResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getNoResultsRateResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getSearchesCountResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/getTopFilterAttribute.d.ts.map +1 -1
- package/dist/client-analytics/model/getTopFilterForAttribute.d.ts.map +1 -1
- package/dist/client-analytics/model/getTopFiltersNoResultsValue.d.ts.map +1 -1
- package/dist/client-analytics/model/getTopFiltersNoResultsValues.d.ts.map +1 -1
- package/dist/client-analytics/model/getUsersCountResponse.d.ts.map +1 -1
- package/dist/client-analytics/model/noClickRateEvent.d.ts.map +1 -1
- package/dist/client-analytics/model/noResultsRateEvent.d.ts.map +1 -1
- package/dist/client-analytics/model/searchEvent.d.ts.map +1 -1
- package/dist/client-analytics/model/searchNoClickEvent.d.ts.map +1 -1
- package/dist/client-analytics/model/searchNoResultEvent.d.ts.map +1 -1
- package/dist/client-analytics/model/topCountry.d.ts.map +1 -1
- package/dist/client-analytics/model/topHit.d.ts.map +1 -1
- package/dist/client-analytics/model/topHitWithAnalytics.d.ts.map +1 -1
- package/dist/client-analytics/model/topSearch.d.ts.map +1 -1
- package/dist/client-analytics/model/topSearchWithAnalytics.d.ts.map +1 -1
- package/dist/client-analytics/model/userWithDate.d.ts.map +1 -1
- package/dist/client-analytics/src/analyticsClient.d.ts +12 -1
- package/dist/client-analytics/src/analyticsClient.d.ts.map +1 -1
- package/dist/client-personalization/model/deleteUserProfileResponse.d.ts.map +1 -1
- package/dist/client-personalization/model/eventScoring.d.ts.map +1 -1
- package/dist/client-personalization/model/facetScoring.d.ts.map +1 -1
- package/dist/client-personalization/model/getUserTokenResponse.d.ts.map +1 -1
- package/dist/client-personalization/model/personalizationStrategyParams.d.ts.map +1 -1
- package/dist/client-personalization/src/personalizationClient.d.ts +12 -1
- package/dist/client-personalization/src/personalizationClient.d.ts.map +1 -1
- package/dist/client-search/model/acl.d.ts +3 -0
- package/dist/client-search/model/acl.d.ts.map +1 -1
- package/dist/client-search/model/addApiKeyResponse.d.ts +1 -1
- package/dist/client-search/model/addApiKeyResponse.d.ts.map +1 -1
- package/dist/client-search/model/apiKey.d.ts.map +1 -1
- package/dist/client-search/model/attributeToUpdate.d.ts +3 -0
- package/dist/client-search/model/attributeToUpdate.d.ts.map +1 -0
- package/dist/client-search/model/automaticFacetFilter.d.ts.map +1 -1
- package/dist/client-search/model/baseGetApiKeyResponse.d.ts +11 -0
- package/dist/client-search/model/baseGetApiKeyResponse.d.ts.map +1 -0
- package/dist/client-search/model/baseIndexSettings.d.ts.map +1 -1
- package/dist/client-search/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
- package/dist/client-search/model/baseSearchResponse.d.ts +2 -2
- package/dist/client-search/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/client-search/model/batchAssignUserIdsParams.d.ts.map +1 -1
- package/dist/client-search/model/batchDictionaryEntriesParams.d.ts.map +1 -1
- package/dist/client-search/model/batchDictionaryEntriesRequest.d.ts.map +1 -1
- package/dist/client-search/model/batchParams.d.ts +2 -2
- package/dist/client-search/model/batchParams.d.ts.map +1 -1
- package/dist/client-search/model/{batchOperation.d.ts → batchRequest.d.ts} +2 -2
- package/dist/client-search/model/batchRequest.d.ts.map +1 -0
- package/dist/client-search/model/batchResponse.d.ts.map +1 -1
- package/dist/client-search/model/batchWriteParams.d.ts +2 -2
- package/dist/client-search/model/batchWriteParams.d.ts.map +1 -1
- package/dist/client-search/model/browseRequest.d.ts.map +1 -1
- package/dist/client-search/model/browseResponse.d.ts +1 -1
- package/dist/client-search/model/browseResponse.d.ts.map +1 -1
- package/dist/client-search/model/builtInOperation.d.ts.map +1 -1
- package/dist/client-search/model/clientMethodProps.d.ts +21 -8
- package/dist/client-search/model/clientMethodProps.d.ts.map +1 -1
- package/dist/client-search/model/condition.d.ts.map +1 -1
- package/dist/client-search/model/consequence.d.ts.map +1 -1
- package/dist/client-search/model/consequenceQueryObject.d.ts.map +1 -1
- package/dist/client-search/model/deletedAtResponse.d.ts.map +1 -1
- package/dist/client-search/model/dictionaryEntry.d.ts.map +1 -1
- package/dist/client-search/model/distinct.d.ts +5 -0
- package/dist/client-search/model/distinct.d.ts.map +1 -0
- package/dist/client-search/model/edit.d.ts.map +1 -1
- package/dist/client-search/model/facetHits.d.ts.map +1 -1
- package/dist/client-search/model/facetOrdering.d.ts.map +1 -1
- package/dist/client-search/model/facetsStats.d.ts.map +1 -1
- package/dist/client-search/model/fetchedIndex.d.ts.map +1 -1
- package/dist/client-search/model/getApiKeyResponse.d.ts +4 -0
- package/dist/client-search/model/getApiKeyResponse.d.ts.map +1 -0
- package/dist/client-search/model/getObjectsParams.d.ts +2 -2
- package/dist/client-search/model/getObjectsParams.d.ts.map +1 -1
- package/dist/client-search/model/{multipleGetObjectsParams.d.ts → getObjectsRequest.d.ts} +2 -2
- package/dist/client-search/model/getObjectsRequest.d.ts.map +1 -0
- package/dist/client-search/model/getObjectsResponse.d.ts +2 -2
- package/dist/client-search/model/getObjectsResponse.d.ts.map +1 -1
- package/dist/client-search/model/hasPendingMappingsResponse.d.ts.map +1 -1
- package/dist/client-search/model/highlightResultOption.d.ts.map +1 -1
- package/dist/client-search/model/hit.d.ts +1 -1
- package/dist/client-search/model/hit.d.ts.map +1 -1
- package/dist/client-search/model/index.d.ts +7 -6
- package/dist/client-search/model/index.d.ts.map +1 -1
- package/dist/client-search/model/indexSettingsAsSearchParams.d.ts +2 -4
- package/dist/client-search/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/client-search/model/languages.d.ts.map +1 -1
- package/dist/client-search/model/listApiKeysResponse.d.ts +2 -2
- package/dist/client-search/model/listApiKeysResponse.d.ts.map +1 -1
- package/dist/client-search/model/listIndicesResponse.d.ts +1 -1
- package/dist/client-search/model/listIndicesResponse.d.ts.map +1 -1
- package/dist/client-search/model/log.d.ts.map +1 -1
- package/dist/client-search/model/logQuery.d.ts.map +1 -1
- package/dist/client-search/model/matchedGeoLocation.d.ts.map +1 -1
- package/dist/client-search/model/{multipleBatchOperation.d.ts → multipleBatchRequest.d.ts} +5 -5
- package/dist/client-search/model/multipleBatchRequest.d.ts.map +1 -0
- package/dist/client-search/model/multipleBatchResponse.d.ts +2 -2
- package/dist/client-search/model/multipleBatchResponse.d.ts.map +1 -1
- package/dist/client-search/model/operationIndexParams.d.ts.map +1 -1
- package/dist/client-search/model/params.d.ts.map +1 -1
- package/dist/client-search/model/personalization.d.ts.map +1 -1
- package/dist/client-search/model/promoteObjectID.d.ts.map +1 -1
- package/dist/client-search/model/promoteObjectIDs.d.ts.map +1 -1
- package/dist/client-search/model/rankingInfo.d.ts.map +1 -1
- package/dist/client-search/model/rule.d.ts.map +1 -1
- package/dist/client-search/model/saveObjectResponse.d.ts +2 -2
- package/dist/client-search/model/saveObjectResponse.d.ts.map +1 -1
- package/dist/client-search/model/saveSynonymResponse.d.ts.map +1 -1
- package/dist/client-search/model/searchDictionaryEntriesParams.d.ts.map +1 -1
- package/dist/client-search/model/searchForFacetValuesRequest.d.ts.map +1 -1
- package/dist/client-search/model/searchForFacetsOptions.d.ts.map +1 -1
- package/dist/client-search/model/searchForHitsOptions.d.ts.map +1 -1
- package/dist/client-search/model/searchHits.d.ts +2 -2
- package/dist/client-search/model/searchHits.d.ts.map +1 -1
- package/dist/client-search/model/searchMethodParams.d.ts.map +1 -1
- package/dist/client-search/model/searchResponse.d.ts +1 -1
- package/dist/client-search/model/searchResponse.d.ts.map +1 -1
- package/dist/client-search/model/searchResponses.d.ts +1 -1
- package/dist/client-search/model/searchResponses.d.ts.map +1 -1
- package/dist/client-search/model/searchRulesParams.d.ts.map +1 -1
- package/dist/client-search/model/searchRulesResponse.d.ts.map +1 -1
- package/dist/client-search/model/searchSynonymsResponse.d.ts.map +1 -1
- package/dist/client-search/model/searchUserIdsParams.d.ts.map +1 -1
- package/dist/client-search/model/searchUserIdsResponse.d.ts.map +1 -1
- package/dist/client-search/model/snippetResultOption.d.ts.map +1 -1
- package/dist/client-search/model/source.d.ts.map +1 -1
- package/dist/client-search/model/standardEntries.d.ts.map +1 -1
- package/dist/client-search/model/synonymHit.d.ts.map +1 -1
- package/dist/client-search/model/synonymHitHighlightResult.d.ts.map +1 -1
- package/dist/client-search/model/timeRange.d.ts.map +1 -1
- package/dist/client-search/model/updateApiKeyResponse.d.ts +1 -1
- package/dist/client-search/model/updateApiKeyResponse.d.ts.map +1 -1
- package/dist/client-search/model/updatedAtResponse.d.ts.map +1 -1
- package/dist/client-search/model/updatedAtWithObjectIdResponse.d.ts.map +1 -1
- package/dist/client-search/model/updatedRuleResponse.d.ts.map +1 -1
- package/dist/client-search/model/userHighlightResult.d.ts.map +1 -1
- package/dist/client-search/model/userHit.d.ts.map +1 -1
- package/dist/client-search/model/userId.d.ts.map +1 -1
- package/dist/client-search/model/value.d.ts.map +1 -1
- package/dist/client-search/src/searchClient.d.ts +65 -15
- package/dist/client-search/src/searchClient.d.ts.map +1 -1
- package/dist/lite/builds/browser.d.ts +23 -14
- package/dist/lite/builds/browser.d.ts.map +1 -1
- package/dist/lite/builds/models.d.ts +11 -8
- package/dist/lite/builds/models.d.ts.map +1 -1
- package/dist/lite/builds/node.d.ts +23 -14
- package/dist/lite/builds/node.d.ts.map +1 -1
- package/dist/lite/lite/builds/browser.d.ts +2 -2
- package/dist/lite/lite/builds/browser.d.ts.map +1 -1
- package/dist/lite/lite/builds/node.d.ts +2 -2
- package/dist/lite/lite/builds/node.d.ts.map +1 -1
- package/dist/lite/lite/model/acl.d.ts +3 -0
- package/dist/lite/lite/model/acl.d.ts.map +1 -1
- package/dist/lite/lite/model/addApiKeyResponse.d.ts +1 -1
- package/dist/lite/lite/model/addApiKeyResponse.d.ts.map +1 -1
- package/dist/lite/lite/model/apiKey.d.ts.map +1 -1
- package/dist/lite/lite/model/attributeToUpdate.d.ts +3 -0
- package/dist/lite/lite/model/attributeToUpdate.d.ts.map +1 -0
- package/dist/lite/lite/model/automaticFacetFilter.d.ts.map +1 -1
- package/dist/lite/lite/model/baseGetApiKeyResponse.d.ts +11 -0
- package/dist/lite/lite/model/baseGetApiKeyResponse.d.ts.map +1 -0
- package/dist/lite/lite/model/baseIndexSettings.d.ts.map +1 -1
- package/dist/lite/lite/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
- package/dist/lite/lite/model/baseSearchResponse.d.ts +2 -2
- package/dist/lite/lite/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/lite/lite/model/browseResponse.d.ts +1 -1
- package/dist/lite/lite/model/browseResponse.d.ts.map +1 -1
- package/dist/lite/lite/model/builtInOperation.d.ts.map +1 -1
- package/dist/lite/lite/model/condition.d.ts.map +1 -1
- package/dist/lite/lite/model/consequence.d.ts.map +1 -1
- package/dist/lite/lite/model/consequenceQueryObject.d.ts.map +1 -1
- package/dist/lite/lite/model/dictionaryEntry.d.ts.map +1 -1
- package/dist/lite/lite/model/distinct.d.ts +5 -0
- package/dist/lite/lite/model/distinct.d.ts.map +1 -0
- package/dist/lite/lite/model/edit.d.ts.map +1 -1
- package/dist/lite/lite/model/facetOrdering.d.ts.map +1 -1
- package/dist/lite/lite/model/facetsStats.d.ts.map +1 -1
- package/dist/lite/lite/model/fetchedIndex.d.ts.map +1 -1
- package/dist/lite/lite/model/getApiKeyResponse.d.ts +4 -0
- package/dist/lite/lite/model/getApiKeyResponse.d.ts.map +1 -0
- package/dist/lite/lite/model/highlightResultOption.d.ts.map +1 -1
- package/dist/lite/lite/model/hit.d.ts +1 -1
- package/dist/lite/lite/model/hit.d.ts.map +1 -1
- package/dist/lite/lite/model/index.d.ts +4 -3
- package/dist/lite/lite/model/index.d.ts.map +1 -1
- package/dist/lite/lite/model/indexSettingsAsSearchParams.d.ts +2 -4
- package/dist/lite/lite/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/lite/lite/model/languages.d.ts.map +1 -1
- package/dist/lite/lite/model/listIndicesResponse.d.ts +1 -1
- package/dist/lite/lite/model/listIndicesResponse.d.ts.map +1 -1
- package/dist/lite/lite/model/matchedGeoLocation.d.ts.map +1 -1
- package/dist/lite/lite/model/params.d.ts.map +1 -1
- package/dist/lite/lite/model/personalization.d.ts.map +1 -1
- package/dist/lite/lite/model/promoteObjectID.d.ts.map +1 -1
- package/dist/lite/lite/model/promoteObjectIDs.d.ts.map +1 -1
- package/dist/lite/lite/model/rankingInfo.d.ts.map +1 -1
- package/dist/lite/lite/model/rule.d.ts.map +1 -1
- package/dist/lite/lite/model/searchForFacetsOptions.d.ts.map +1 -1
- package/dist/lite/lite/model/searchForHitsOptions.d.ts.map +1 -1
- package/dist/lite/lite/model/searchHits.d.ts +2 -2
- package/dist/lite/lite/model/searchHits.d.ts.map +1 -1
- package/dist/lite/lite/model/searchMethodParams.d.ts.map +1 -1
- package/dist/lite/lite/model/searchResponse.d.ts +1 -1
- package/dist/lite/lite/model/searchResponse.d.ts.map +1 -1
- package/dist/lite/lite/model/searchResponses.d.ts +1 -1
- package/dist/lite/lite/model/searchResponses.d.ts.map +1 -1
- package/dist/lite/lite/model/searchSynonymsResponse.d.ts.map +1 -1
- package/dist/lite/lite/model/snippetResultOption.d.ts.map +1 -1
- package/dist/lite/lite/model/source.d.ts.map +1 -1
- package/dist/lite/lite/model/standardEntries.d.ts.map +1 -1
- package/dist/lite/lite/model/synonymHit.d.ts.map +1 -1
- package/dist/lite/lite/model/synonymHitHighlightResult.d.ts.map +1 -1
- package/dist/lite/lite/model/timeRange.d.ts.map +1 -1
- package/dist/lite/lite/model/updatedRuleResponse.d.ts.map +1 -1
- package/dist/lite/lite/model/userId.d.ts.map +1 -1
- package/dist/lite/lite/model/value.d.ts.map +1 -1
- package/dist/lite/lite/src/liteClient.d.ts +12 -1
- package/dist/lite/lite/src/liteClient.d.ts.map +1 -1
- package/dist/lite/lite.cjs.js +14 -1
- package/dist/lite/lite.esm.browser.js +14 -1
- package/dist/lite/lite.esm.node.js +14 -1
- package/dist/lite/lite.umd.js +2 -2
- package/lite/builds/browser.ts +2 -2
- package/lite/builds/node.ts +2 -2
- package/lite/model/acl.ts +3 -0
- package/lite/model/addApiKeyResponse.ts +2 -1
- package/lite/model/apiKey.ts +7 -0
- package/lite/model/{attributeOrBuiltInOperation.ts → attributeToUpdate.ts} +1 -1
- package/lite/model/automaticFacetFilter.ts +2 -0
- package/lite/model/baseGetApiKeyResponse.ts +13 -0
- package/lite/model/baseIndexSettings.ts +13 -0
- package/lite/model/baseSearchParamsWithoutQuery.ts +32 -0
- package/lite/model/baseSearchResponse.ts +26 -2
- package/lite/model/browseResponse.ts +1 -1
- package/lite/model/builtInOperation.ts +1 -0
- package/lite/model/condition.ts +3 -0
- package/lite/model/consequence.ts +4 -0
- package/lite/model/consequenceQueryObject.ts +1 -0
- package/lite/model/dictionaryEntry.ts +5 -0
- package/lite/model/{createdAtObject.ts → distinct.ts} +4 -6
- package/lite/model/edit.ts +2 -0
- package/lite/model/facetOrdering.ts +1 -0
- package/lite/model/facetsStats.ts +3 -0
- package/lite/model/fetchedIndex.ts +10 -0
- package/lite/model/{key.ts → getApiKeyResponse.ts} +2 -2
- package/lite/model/highlightResultOption.ts +3 -0
- package/lite/model/hit.ts +5 -1
- package/lite/model/index.ts +4 -3
- package/lite/model/indexSettingsAsSearchParams.ts +43 -4
- package/lite/model/languages.ts +2 -0
- package/lite/model/listIndicesResponse.ts +2 -1
- package/lite/model/matchedGeoLocation.ts +2 -0
- package/lite/model/params.ts +3 -0
- package/lite/model/personalization.ts +2 -0
- package/lite/model/promoteObjectID.ts +1 -0
- package/lite/model/promoteObjectIDs.ts +1 -0
- package/lite/model/rankingInfo.ts +12 -0
- package/lite/model/rule.ts +5 -0
- package/lite/model/searchForFacetsOptions.ts +4 -0
- package/lite/model/searchForHitsOptions.ts +1 -0
- package/lite/model/searchHits.ts +2 -2
- package/lite/model/searchMethodParams.ts +1 -0
- package/lite/model/searchResponse.ts +2 -1
- package/lite/model/searchResponses.ts +1 -1
- package/lite/model/searchSynonymsResponse.ts +1 -0
- package/lite/model/snippetResultOption.ts +1 -0
- package/lite/model/source.ts +1 -0
- package/lite/model/standardEntries.ts +2 -0
- package/lite/model/synonymHit.ts +8 -0
- package/lite/model/synonymHitHighlightResult.ts +1 -0
- package/lite/model/timeRange.ts +1 -0
- package/lite/model/updatedRuleResponse.ts +2 -0
- package/lite/model/userId.ts +3 -0
- package/lite/model/value.ts +1 -0
- package/lite/src/liteClient.ts +22 -1
- package/package.json +9 -9
- package/dist/algoliasearch/lite/model/attributeOrBuiltInOperation.d.ts +0 -3
- package/dist/algoliasearch/lite/model/attributeOrBuiltInOperation.d.ts.map +0 -1
- package/dist/algoliasearch/lite/model/createdAtObject.d.ts +0 -7
- package/dist/algoliasearch/lite/model/createdAtObject.d.ts.map +0 -1
- package/dist/algoliasearch/lite/model/key.d.ts +0 -4
- package/dist/algoliasearch/lite/model/key.d.ts.map +0 -1
- package/dist/client-search/model/attributeOrBuiltInOperation.d.ts +0 -3
- package/dist/client-search/model/attributeOrBuiltInOperation.d.ts.map +0 -1
- package/dist/client-search/model/batchOperation.d.ts.map +0 -1
- package/dist/client-search/model/createdAtObject.d.ts +0 -7
- package/dist/client-search/model/createdAtObject.d.ts.map +0 -1
- package/dist/client-search/model/key.d.ts +0 -4
- package/dist/client-search/model/key.d.ts.map +0 -1
- package/dist/client-search/model/multipleBatchOperation.d.ts.map +0 -1
- package/dist/client-search/model/multipleGetObjectsParams.d.ts.map +0 -1
- package/dist/lite/lite/model/attributeOrBuiltInOperation.d.ts +0 -3
- package/dist/lite/lite/model/attributeOrBuiltInOperation.d.ts.map +0 -1
- package/dist/lite/lite/model/createdAtObject.d.ts +0 -7
- package/dist/lite/lite/model/createdAtObject.d.ts.map +0 -1
- package/dist/lite/lite/model/key.d.ts +0 -4
- package/dist/lite/lite/model/key.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createAuth, createTransporter, getAlgoliaAgent,
|
|
1
|
+
import { createAuth, createTransporter, getAlgoliaAgent, createIterablePromise, shuffle, DEFAULT_CONNECT_TIMEOUT_NODE, DEFAULT_READ_TIMEOUT_NODE, DEFAULT_WRITE_TIMEOUT_NODE, createNullCache, createMemoryCache } from '@algolia/client-common';
|
|
2
2
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
3
|
|
|
4
4
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
5
|
-
const apiClientVersion$4 = '5.0.0-alpha.
|
|
5
|
+
const apiClientVersion$4 = '5.0.0-alpha.4';
|
|
6
6
|
const REGIONS$2 = ['de', 'us'];
|
|
7
7
|
function getDefaultHosts$3(region) {
|
|
8
8
|
const url = !region
|
|
@@ -33,6 +33,19 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
33
33
|
});
|
|
34
34
|
return {
|
|
35
35
|
transporter,
|
|
36
|
+
/**
|
|
37
|
+
* The `appId` currently in use.
|
|
38
|
+
*/
|
|
39
|
+
appId: appIdOption,
|
|
40
|
+
/**
|
|
41
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
42
|
+
*/
|
|
43
|
+
clearCache() {
|
|
44
|
+
return Promise.all([
|
|
45
|
+
transporter.requestsCache.clear(),
|
|
46
|
+
transporter.responsesCache.clear(),
|
|
47
|
+
]).then(() => undefined);
|
|
48
|
+
},
|
|
36
49
|
/**
|
|
37
50
|
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
38
51
|
*/
|
|
@@ -280,7 +293,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
280
293
|
}
|
|
281
294
|
|
|
282
295
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
283
|
-
const apiClientVersion$3 = '5.0.0-alpha.
|
|
296
|
+
const apiClientVersion$3 = '5.0.0-alpha.4';
|
|
284
297
|
const REGIONS$1 = ['de', 'us'];
|
|
285
298
|
function getDefaultHosts$2(region) {
|
|
286
299
|
const url = !region
|
|
@@ -311,6 +324,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
311
324
|
});
|
|
312
325
|
return {
|
|
313
326
|
transporter,
|
|
327
|
+
/**
|
|
328
|
+
* The `appId` currently in use.
|
|
329
|
+
*/
|
|
330
|
+
appId: appIdOption,
|
|
331
|
+
/**
|
|
332
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
333
|
+
*/
|
|
334
|
+
clearCache() {
|
|
335
|
+
return Promise.all([
|
|
336
|
+
transporter.requestsCache.clear(),
|
|
337
|
+
transporter.responsesCache.clear(),
|
|
338
|
+
]).then(() => undefined);
|
|
339
|
+
},
|
|
314
340
|
/**
|
|
315
341
|
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
316
342
|
*/
|
|
@@ -1164,7 +1190,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1164
1190
|
}
|
|
1165
1191
|
|
|
1166
1192
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
1167
|
-
const apiClientVersion$2 = '5.0.0-alpha.
|
|
1193
|
+
const apiClientVersion$2 = '5.0.0-alpha.4';
|
|
1168
1194
|
const REGIONS = ['eu', 'us'];
|
|
1169
1195
|
function getDefaultHosts$1(region) {
|
|
1170
1196
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -1193,6 +1219,19 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1193
1219
|
});
|
|
1194
1220
|
return {
|
|
1195
1221
|
transporter,
|
|
1222
|
+
/**
|
|
1223
|
+
* The `appId` currently in use.
|
|
1224
|
+
*/
|
|
1225
|
+
appId: appIdOption,
|
|
1226
|
+
/**
|
|
1227
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
1228
|
+
*/
|
|
1229
|
+
clearCache() {
|
|
1230
|
+
return Promise.all([
|
|
1231
|
+
transporter.requestsCache.clear(),
|
|
1232
|
+
transporter.responsesCache.clear(),
|
|
1233
|
+
]).then(() => undefined);
|
|
1234
|
+
},
|
|
1196
1235
|
/**
|
|
1197
1236
|
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
1198
1237
|
*/
|
|
@@ -1408,7 +1447,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1408
1447
|
}
|
|
1409
1448
|
|
|
1410
1449
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
1411
|
-
const apiClientVersion$1 = '5.0.0-alpha.
|
|
1450
|
+
const apiClientVersion$1 = '5.0.0-alpha.4';
|
|
1412
1451
|
function getDefaultHosts(appId) {
|
|
1413
1452
|
return [
|
|
1414
1453
|
{
|
|
@@ -1462,6 +1501,19 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1462
1501
|
});
|
|
1463
1502
|
return {
|
|
1464
1503
|
transporter,
|
|
1504
|
+
/**
|
|
1505
|
+
* The `appId` currently in use.
|
|
1506
|
+
*/
|
|
1507
|
+
appId: appIdOption,
|
|
1508
|
+
/**
|
|
1509
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
1510
|
+
*/
|
|
1511
|
+
clearCache() {
|
|
1512
|
+
return Promise.all([
|
|
1513
|
+
transporter.requestsCache.clear(),
|
|
1514
|
+
transporter.responsesCache.clear(),
|
|
1515
|
+
]).then(() => undefined);
|
|
1516
|
+
},
|
|
1465
1517
|
/**
|
|
1466
1518
|
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
1467
1519
|
*/
|
|
@@ -1478,38 +1530,57 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1478
1530
|
transporter.algoliaAgent.add({ segment, version });
|
|
1479
1531
|
},
|
|
1480
1532
|
/**
|
|
1481
|
-
* Helper: Wait for a task to
|
|
1533
|
+
* Helper: Wait for a task to be published (completed) for a given `indexName` and `taskID`.
|
|
1482
1534
|
*
|
|
1483
|
-
* @summary
|
|
1535
|
+
* @summary Helper method that waits for a task to be published (completed).
|
|
1484
1536
|
* @param waitForTaskOptions - The waitForTaskOptions object.
|
|
1485
1537
|
* @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.
|
|
1486
1538
|
* @param waitForTaskOptions.taskID - The `taskID` returned in the method response.
|
|
1539
|
+
* @param waitForTaskOptions.maxRetries - The maximum number of retries. 50 by default.
|
|
1540
|
+
* @param waitForTaskOptions.timeout - The function to decide how long to wait between retries.
|
|
1487
1541
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1488
1542
|
*/
|
|
1489
|
-
waitForTask({ indexName, taskID,
|
|
1490
|
-
|
|
1491
|
-
|
|
1543
|
+
waitForTask({ indexName, taskID, maxRetries = 50, timeout = (retryCount) => Math.min(retryCount * 200, 5000), }, requestOptions) {
|
|
1544
|
+
let retryCount = 0;
|
|
1545
|
+
return createIterablePromise({
|
|
1492
1546
|
func: () => this.getTask({ indexName, taskID }, requestOptions),
|
|
1493
1547
|
validate: (response) => response.status === 'published',
|
|
1548
|
+
aggregator: () => (retryCount += 1),
|
|
1549
|
+
error: {
|
|
1550
|
+
validate: () => retryCount >= maxRetries,
|
|
1551
|
+
message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`,
|
|
1552
|
+
},
|
|
1553
|
+
timeout: () => timeout(retryCount),
|
|
1494
1554
|
});
|
|
1495
1555
|
},
|
|
1496
1556
|
/**
|
|
1497
1557
|
* Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
|
|
1498
1558
|
*
|
|
1499
|
-
* @summary
|
|
1559
|
+
* @summary Helper method that waits for an API key task to be processed.
|
|
1500
1560
|
* @param waitForApiKeyOptions - The waitForApiKeyOptions object.
|
|
1501
1561
|
* @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.
|
|
1502
1562
|
* @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.
|
|
1503
1563
|
* @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.
|
|
1564
|
+
* @param waitForApiKeyOptions.maxRetries - The maximum number of retries. 50 by default.
|
|
1565
|
+
* @param waitForApiKeyOptions.timeout - The function to decide how long to wait between retries.
|
|
1504
1566
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getApikey` method and merged with the transporter requestOptions.
|
|
1505
1567
|
*/
|
|
1506
|
-
waitForApiKey({ operation, key, apiKey,
|
|
1568
|
+
waitForApiKey({ operation, key, apiKey, maxRetries = 50, timeout = (retryCount) => Math.min(retryCount * 200, 5000), }, requestOptions) {
|
|
1569
|
+
let retryCount = 0;
|
|
1570
|
+
const baseIteratorOptions = {
|
|
1571
|
+
aggregator: () => (retryCount += 1),
|
|
1572
|
+
error: {
|
|
1573
|
+
validate: () => retryCount >= maxRetries,
|
|
1574
|
+
message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`,
|
|
1575
|
+
},
|
|
1576
|
+
timeout: () => timeout(retryCount),
|
|
1577
|
+
};
|
|
1507
1578
|
if (operation === 'update') {
|
|
1508
1579
|
if (!apiKey) {
|
|
1509
1580
|
throw new Error('`apiKey` is required when waiting for an `update` operation.');
|
|
1510
1581
|
}
|
|
1511
|
-
return
|
|
1512
|
-
...
|
|
1582
|
+
return createIterablePromise({
|
|
1583
|
+
...baseIteratorOptions,
|
|
1513
1584
|
func: () => this.getApiKey({ key }, requestOptions),
|
|
1514
1585
|
validate: (response) => {
|
|
1515
1586
|
for (const field of Object.keys(apiKey)) {
|
|
@@ -1527,12 +1598,99 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1527
1598
|
},
|
|
1528
1599
|
});
|
|
1529
1600
|
}
|
|
1530
|
-
return
|
|
1531
|
-
...
|
|
1601
|
+
return createIterablePromise({
|
|
1602
|
+
...baseIteratorOptions,
|
|
1532
1603
|
func: () => this.getApiKey({ key }, requestOptions).catch((error) => error),
|
|
1533
1604
|
validate: (error) => operation === 'add' ? error.status !== 404 : error.status === 404,
|
|
1534
1605
|
});
|
|
1535
1606
|
},
|
|
1607
|
+
/**
|
|
1608
|
+
* Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index.
|
|
1609
|
+
*
|
|
1610
|
+
* @summary Helper method that iterates on the `browse` method.
|
|
1611
|
+
* @param browseObjects - The browseObjects object.
|
|
1612
|
+
* @param browseObjects.indexName - The index in which to perform the request.
|
|
1613
|
+
* @param browseObjects.browseRequest - The `browse` method parameters.
|
|
1614
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
1615
|
+
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
1616
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
1617
|
+
*/
|
|
1618
|
+
browseObjects({ indexName, browseRequest, ...browseObjectsOptions }, requestOptions) {
|
|
1619
|
+
return createIterablePromise({
|
|
1620
|
+
func: (previousResponse) => {
|
|
1621
|
+
return this.browse({
|
|
1622
|
+
indexName,
|
|
1623
|
+
browseRequest: {
|
|
1624
|
+
cursor: previousResponse ? previousResponse.cursor : undefined,
|
|
1625
|
+
...browseRequest,
|
|
1626
|
+
},
|
|
1627
|
+
}, requestOptions);
|
|
1628
|
+
},
|
|
1629
|
+
validate: (response) => response.cursor === undefined,
|
|
1630
|
+
...browseObjectsOptions,
|
|
1631
|
+
});
|
|
1632
|
+
},
|
|
1633
|
+
/**
|
|
1634
|
+
* Helper: Iterate on the `searchRules` method of the client to allow aggregating rules of an index.
|
|
1635
|
+
*
|
|
1636
|
+
* @summary Helper method that iterates on the `searchRules` method.
|
|
1637
|
+
* @param browseObjects - The browseObjects object.
|
|
1638
|
+
* @param browseObjects.indexName - The index in which to perform the request.
|
|
1639
|
+
* @param browseObjects.searchRulesParams - The `searchRules` method parameters.
|
|
1640
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
1641
|
+
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
1642
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
1643
|
+
*/
|
|
1644
|
+
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
|
|
1645
|
+
const params = {
|
|
1646
|
+
hitsPerPage: 1000,
|
|
1647
|
+
...searchRulesParams,
|
|
1648
|
+
};
|
|
1649
|
+
return createIterablePromise({
|
|
1650
|
+
func: (previousResponse) => {
|
|
1651
|
+
return this.searchRules({
|
|
1652
|
+
indexName,
|
|
1653
|
+
searchRulesParams: {
|
|
1654
|
+
...params,
|
|
1655
|
+
page: previousResponse
|
|
1656
|
+
? previousResponse.page + 1
|
|
1657
|
+
: params.page || 0,
|
|
1658
|
+
},
|
|
1659
|
+
}, requestOptions);
|
|
1660
|
+
},
|
|
1661
|
+
validate: (response) => response.nbHits < params.hitsPerPage,
|
|
1662
|
+
...browseRulesOptions,
|
|
1663
|
+
});
|
|
1664
|
+
},
|
|
1665
|
+
/**
|
|
1666
|
+
* Helper: Iterate on the `searchSynonyms` method of the client to allow aggregating rules of an index.
|
|
1667
|
+
*
|
|
1668
|
+
* @summary Helper method that iterates on the `searchSynonyms` method.
|
|
1669
|
+
* @param browseObjects - The browseObjects object.
|
|
1670
|
+
* @param browseObjects.indexName - The index in which to perform the request.
|
|
1671
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
1672
|
+
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
1673
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
1674
|
+
*/
|
|
1675
|
+
browseSynonyms({ indexName, validate, aggregator, ...browseSynonymsOptions }, requestOptions) {
|
|
1676
|
+
const params = {
|
|
1677
|
+
hitsPerPage: 1000,
|
|
1678
|
+
...browseSynonymsOptions,
|
|
1679
|
+
};
|
|
1680
|
+
return createIterablePromise({
|
|
1681
|
+
func: (previousResponse) => {
|
|
1682
|
+
return this.searchSynonyms({
|
|
1683
|
+
...params,
|
|
1684
|
+
indexName,
|
|
1685
|
+
page: previousResponse
|
|
1686
|
+
? previousResponse.page + 1
|
|
1687
|
+
: browseSynonymsOptions.page || 0,
|
|
1688
|
+
}, requestOptions);
|
|
1689
|
+
},
|
|
1690
|
+
validate: (response) => response.nbHits < params.hitsPerPage,
|
|
1691
|
+
...browseSynonymsOptions,
|
|
1692
|
+
});
|
|
1693
|
+
},
|
|
1536
1694
|
/**
|
|
1537
1695
|
* Add a new API Key with specific permissions/restrictions.
|
|
1538
1696
|
*
|
|
@@ -2226,6 +2384,9 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2226
2384
|
if (!getObjectsParams) {
|
|
2227
2385
|
throw new Error('Parameter `getObjectsParams` is required when calling `getObjects`.');
|
|
2228
2386
|
}
|
|
2387
|
+
if (!getObjectsParams.requests) {
|
|
2388
|
+
throw new Error('Parameter `getObjectsParams.requests` is required when calling `getObjects`.');
|
|
2389
|
+
}
|
|
2229
2390
|
const requestPath = '/1/indexes/*/objects';
|
|
2230
2391
|
const headers = {};
|
|
2231
2392
|
const queryParameters = {};
|
|
@@ -2529,6 +2690,9 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2529
2690
|
if (!batchParams) {
|
|
2530
2691
|
throw new Error('Parameter `batchParams` is required when calling `multipleBatch`.');
|
|
2531
2692
|
}
|
|
2693
|
+
if (!batchParams.requests) {
|
|
2694
|
+
throw new Error('Parameter `batchParams.requests` is required when calling `multipleBatch`.');
|
|
2695
|
+
}
|
|
2532
2696
|
const requestPath = '/1/indexes/*/batch';
|
|
2533
2697
|
const headers = {};
|
|
2534
2698
|
const queryParameters = {};
|
|
@@ -2582,19 +2746,19 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2582
2746
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
2583
2747
|
* @param partialUpdateObject.indexName - The index in which to perform the request.
|
|
2584
2748
|
* @param partialUpdateObject.objectID - Unique identifier of an object.
|
|
2585
|
-
* @param partialUpdateObject.
|
|
2749
|
+
* @param partialUpdateObject.attributeToUpdate - List of attributes to update.
|
|
2586
2750
|
* @param partialUpdateObject.createIfNotExists - Creates the record if it does not exist yet.
|
|
2587
2751
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2588
2752
|
*/
|
|
2589
|
-
partialUpdateObject({ indexName, objectID,
|
|
2753
|
+
partialUpdateObject({ indexName, objectID, attributeToUpdate, createIfNotExists, }, requestOptions) {
|
|
2590
2754
|
if (!indexName) {
|
|
2591
2755
|
throw new Error('Parameter `indexName` is required when calling `partialUpdateObject`.');
|
|
2592
2756
|
}
|
|
2593
2757
|
if (!objectID) {
|
|
2594
2758
|
throw new Error('Parameter `objectID` is required when calling `partialUpdateObject`.');
|
|
2595
2759
|
}
|
|
2596
|
-
if (!
|
|
2597
|
-
throw new Error('Parameter `
|
|
2760
|
+
if (!attributeToUpdate) {
|
|
2761
|
+
throw new Error('Parameter `attributeToUpdate` is required when calling `partialUpdateObject`.');
|
|
2598
2762
|
}
|
|
2599
2763
|
const requestPath = '/1/indexes/{indexName}/{objectID}/partial'
|
|
2600
2764
|
.replace('{indexName}', encodeURIComponent(indexName))
|
|
@@ -2609,7 +2773,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2609
2773
|
path: requestPath,
|
|
2610
2774
|
queryParameters,
|
|
2611
2775
|
headers,
|
|
2612
|
-
data:
|
|
2776
|
+
data: attributeToUpdate,
|
|
2613
2777
|
};
|
|
2614
2778
|
return transporter.request(request, requestOptions);
|
|
2615
2779
|
},
|
|
@@ -3047,9 +3211,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3047
3211
|
if (!indexName) {
|
|
3048
3212
|
throw new Error('Parameter `indexName` is required when calling `searchRules`.');
|
|
3049
3213
|
}
|
|
3050
|
-
if (!searchRulesParams) {
|
|
3051
|
-
throw new Error('Parameter `searchRulesParams` is required when calling `searchRules`.');
|
|
3052
|
-
}
|
|
3053
3214
|
const requestPath = '/1/indexes/{indexName}/rules/search'.replace('{indexName}', encodeURIComponent(indexName));
|
|
3054
3215
|
const headers = {};
|
|
3055
3216
|
const queryParameters = {};
|
|
@@ -3058,7 +3219,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3058
3219
|
path: requestPath,
|
|
3059
3220
|
queryParameters,
|
|
3060
3221
|
headers,
|
|
3061
|
-
data: searchRulesParams,
|
|
3222
|
+
data: searchRulesParams ? searchRulesParams : {},
|
|
3062
3223
|
useReadTransporter: true,
|
|
3063
3224
|
cacheable: true,
|
|
3064
3225
|
};
|
|
@@ -3077,9 +3238,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3077
3238
|
if (!indexName) {
|
|
3078
3239
|
throw new Error('Parameter `indexName` is required when calling `searchSingleIndex`.');
|
|
3079
3240
|
}
|
|
3080
|
-
if (!searchParams) {
|
|
3081
|
-
throw new Error('Parameter `searchParams` is required when calling `searchSingleIndex`.');
|
|
3082
|
-
}
|
|
3083
3241
|
const requestPath = '/1/indexes/{indexName}/query'.replace('{indexName}', encodeURIComponent(indexName));
|
|
3084
3242
|
const headers = {};
|
|
3085
3243
|
const queryParameters = {};
|
|
@@ -3088,7 +3246,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3088
3246
|
path: requestPath,
|
|
3089
3247
|
queryParameters,
|
|
3090
3248
|
headers,
|
|
3091
|
-
data: searchParams,
|
|
3249
|
+
data: searchParams ? searchParams : {},
|
|
3092
3250
|
useReadTransporter: true,
|
|
3093
3251
|
cacheable: true,
|
|
3094
3252
|
};
|