@algolia/client-search 4.10.2 → 4.11.0
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/dist/client-search.cjs.js +10 -0
- package/dist/client-search.d.ts +16 -4
- package/dist/client-search.esm.js +10 -1
- package/package.json +4 -4
|
@@ -216,6 +216,15 @@ const copySynonyms = (base) => {
|
|
|
216
216
|
};
|
|
217
217
|
};
|
|
218
218
|
|
|
219
|
+
const customRequest = (base) => {
|
|
220
|
+
return (request, requestOptions) => {
|
|
221
|
+
if (request.method === requesterCommon.MethodEnum.Get) {
|
|
222
|
+
return base.transporter.read(request, requestOptions);
|
|
223
|
+
}
|
|
224
|
+
return base.transporter.write(request, requestOptions);
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
|
|
219
228
|
const deleteApiKey = (base) => {
|
|
220
229
|
return (apiKey, requestOptions) => {
|
|
221
230
|
const wait = (_, waitRequestOptions) => {
|
|
@@ -1294,6 +1303,7 @@ exports.createMissingObjectIDError = createMissingObjectIDError;
|
|
|
1294
1303
|
exports.createObjectNotFoundError = createObjectNotFoundError;
|
|
1295
1304
|
exports.createSearchClient = createSearchClient;
|
|
1296
1305
|
exports.createValidUntilNotFoundError = createValidUntilNotFoundError;
|
|
1306
|
+
exports.customRequest = customRequest;
|
|
1297
1307
|
exports.deleteApiKey = deleteApiKey;
|
|
1298
1308
|
exports.deleteBy = deleteBy;
|
|
1299
1309
|
exports.deleteDictionaryEntries = deleteDictionaryEntries;
|
package/dist/client-search.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AuthModeType } from '@algolia/client-common';
|
|
2
2
|
import { ClientTransporterOptions } from '@algolia/client-common';
|
|
3
3
|
import { CreateClient } from '@algolia/client-common';
|
|
4
|
+
import { Request } from '@algolia/transporter';
|
|
4
5
|
import { RequestOptions } from '@algolia/transporter';
|
|
5
6
|
import { Transporter } from '@algolia/transporter';
|
|
6
7
|
import { WaitablePromise } from '@algolia/client-common';
|
|
@@ -367,6 +368,8 @@ export declare const createSearchClient: CreateClient<SearchClient, SearchClient
|
|
|
367
368
|
|
|
368
369
|
export declare function createValidUntilNotFoundError(): Error;
|
|
369
370
|
|
|
371
|
+
export declare const customRequest: <TResponse = any>(base: SearchClient) => (request: Request, requestOptions?: RequestOptions | undefined) => Readonly<Promise<TResponse>>;
|
|
372
|
+
|
|
370
373
|
export declare const deleteApiKey: (base: SearchClient) => (apiKey: string, requestOptions?: RequestOptions | undefined) => Readonly<WaitablePromise<DeleteApiKeyResponse>>;
|
|
371
374
|
|
|
372
375
|
export declare type DeleteApiKeyResponse = {
|
|
@@ -408,7 +411,7 @@ export declare type DeleteByFiltersOptions = {
|
|
|
408
411
|
/**
|
|
409
412
|
* Search inside a rectangular area (in geo coordinates).
|
|
410
413
|
*/
|
|
411
|
-
readonly insideBoundingBox?: ReadonlyArray<readonly number[]
|
|
414
|
+
readonly insideBoundingBox?: ReadonlyArray<readonly number[]> | string;
|
|
412
415
|
/**
|
|
413
416
|
* Search inside a polygon (in geo coordinates).
|
|
414
417
|
*/
|
|
@@ -532,7 +535,7 @@ export declare type FindAnswersOptions = {
|
|
|
532
535
|
readonly searchParameters?: Omit<SearchOptions, 'attributesToSnippet' | 'hitsPerPage' | 'queryType' | 'naturalLanguages' | 'removeStopWords' | 'ignorePlurals' | 'removeWordsIfNoResults'>;
|
|
533
536
|
};
|
|
534
537
|
|
|
535
|
-
export declare type FindAnswersResponse<TObject = {}> = SearchResponse<TObject> & {
|
|
538
|
+
export declare type FindAnswersResponse<TObject = {}> = Omit<SearchResponse<TObject>, 'hits'> & {
|
|
536
539
|
/**
|
|
537
540
|
* The hits returned by the search.
|
|
538
541
|
*
|
|
@@ -1619,7 +1622,7 @@ export declare type SearchOptions = {
|
|
|
1619
1622
|
/**
|
|
1620
1623
|
* Search inside a rectangular area (in geo coordinates).
|
|
1621
1624
|
*/
|
|
1622
|
-
readonly insideBoundingBox?: ReadonlyArray<readonly number[]
|
|
1625
|
+
readonly insideBoundingBox?: ReadonlyArray<readonly number[]> | string;
|
|
1623
1626
|
/**
|
|
1624
1627
|
* Search inside a polygon (in geo coordinates).
|
|
1625
1628
|
*/
|
|
@@ -1667,6 +1670,15 @@ export declare type SearchOptions = {
|
|
|
1667
1670
|
* less relevant results.
|
|
1668
1671
|
*/
|
|
1669
1672
|
readonly relevancyStrictness?: number;
|
|
1673
|
+
/**
|
|
1674
|
+
* Whether this search should use Dynamic Re-Ranking.
|
|
1675
|
+
* @link https://www.algolia.com/doc/guides/algolia-ai/re-ranking/
|
|
1676
|
+
*
|
|
1677
|
+
* Note: You need to turn on Dynamic Re-Ranking on your index for it to have an effect on
|
|
1678
|
+
* your search results. You can do this through the Re-Ranking page on the dashboard.
|
|
1679
|
+
* This parameter is only used to turn off Dynamic Re-Ranking (with false) at search time.
|
|
1680
|
+
*/
|
|
1681
|
+
readonly enableReRanking?: boolean;
|
|
1670
1682
|
};
|
|
1671
1683
|
|
|
1672
1684
|
export declare type SearchResponse<TObject = {}> = {
|
|
@@ -2254,7 +2266,7 @@ export declare type Settings = {
|
|
|
2254
2266
|
/**
|
|
2255
2267
|
* the ordering of facets (widgets)
|
|
2256
2268
|
*/
|
|
2257
|
-
readonly
|
|
2269
|
+
readonly facets?: {
|
|
2258
2270
|
/**
|
|
2259
2271
|
* pinned order of facet lists
|
|
2260
2272
|
*/
|
|
@@ -212,6 +212,15 @@ const copySynonyms = (base) => {
|
|
|
212
212
|
};
|
|
213
213
|
};
|
|
214
214
|
|
|
215
|
+
const customRequest = (base) => {
|
|
216
|
+
return (request, requestOptions) => {
|
|
217
|
+
if (request.method === MethodEnum.Get) {
|
|
218
|
+
return base.transporter.read(request, requestOptions);
|
|
219
|
+
}
|
|
220
|
+
return base.transporter.write(request, requestOptions);
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
|
|
215
224
|
const deleteApiKey = (base) => {
|
|
216
225
|
return (apiKey, requestOptions) => {
|
|
217
226
|
const wait = (_, waitRequestOptions) => {
|
|
@@ -1264,4 +1273,4 @@ const SynonymEnum = {
|
|
|
1264
1273
|
Placeholder: 'placeholder',
|
|
1265
1274
|
};
|
|
1266
1275
|
|
|
1267
|
-
export { ApiKeyACLEnum, BatchActionEnum, ScopeEnum, StrategyEnum, SynonymEnum, addApiKey, assignUserID, assignUserIDs, batch, browseObjects, browseRules, browseSynonyms, chunkedBatch, clearDictionaryEntries, clearObjects, clearRules, clearSynonyms, copyIndex, copyRules, copySettings, copySynonyms, createBrowsablePromise, createMissingObjectIDError, createObjectNotFoundError, createSearchClient, createValidUntilNotFoundError, deleteApiKey, deleteBy, deleteDictionaryEntries, deleteIndex, deleteObject, deleteObjects, deleteRule, deleteSynonym, exists, findAnswers, findObject, generateSecuredApiKey, getApiKey, getAppTask, getDictionarySettings, getLogs, getObject, getObjectPosition, getObjects, getRule, getSecuredApiKeyRemainingValidity, getSettings, getSynonym, getTask, getTopUserIDs, getUserID, hasPendingMappings, initIndex, listApiKeys, listClusters, listIndices, listUserIDs, moveIndex, multipleBatch, multipleGetObjects, multipleQueries, multipleSearchForFacetValues, partialUpdateObject, partialUpdateObjects, removeUserID, replaceAllObjects, replaceAllRules, replaceAllSynonyms, replaceDictionaryEntries, restoreApiKey, saveDictionaryEntries, saveObject, saveObjects, saveRule, saveRules, saveSynonym, saveSynonyms, search, searchDictionaryEntries, searchForFacetValues, searchRules, searchSynonyms, searchUserIDs, setDictionarySettings, setSettings, updateApiKey, waitAppTask, waitTask };
|
|
1276
|
+
export { ApiKeyACLEnum, BatchActionEnum, ScopeEnum, StrategyEnum, SynonymEnum, addApiKey, assignUserID, assignUserIDs, batch, browseObjects, browseRules, browseSynonyms, chunkedBatch, clearDictionaryEntries, clearObjects, clearRules, clearSynonyms, copyIndex, copyRules, copySettings, copySynonyms, createBrowsablePromise, createMissingObjectIDError, createObjectNotFoundError, createSearchClient, createValidUntilNotFoundError, customRequest, deleteApiKey, deleteBy, deleteDictionaryEntries, deleteIndex, deleteObject, deleteObjects, deleteRule, deleteSynonym, exists, findAnswers, findObject, generateSecuredApiKey, getApiKey, getAppTask, getDictionarySettings, getLogs, getObject, getObjectPosition, getObjects, getRule, getSecuredApiKeyRemainingValidity, getSettings, getSynonym, getTask, getTopUserIDs, getUserID, hasPendingMappings, initIndex, listApiKeys, listClusters, listIndices, listUserIDs, moveIndex, multipleBatch, multipleGetObjects, multipleQueries, multipleSearchForFacetValues, partialUpdateObject, partialUpdateObjects, removeUserID, replaceAllObjects, replaceAllRules, replaceAllSynonyms, replaceDictionaryEntries, restoreApiKey, saveDictionaryEntries, saveObject, saveObjects, saveRule, saveRules, saveSynonym, saveSynonyms, search, searchDictionaryEntries, searchForFacetValues, searchRules, searchSynonyms, searchUserIDs, setDictionarySettings, setSettings, updateApiKey, waitAppTask, waitTask };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algolia/client-search",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.11.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@algolia/client-common": "4.
|
|
20
|
-
"@algolia/requester-common": "4.
|
|
21
|
-
"@algolia/transporter": "4.
|
|
19
|
+
"@algolia/client-common": "4.11.0",
|
|
20
|
+
"@algolia/requester-common": "4.11.0",
|
|
21
|
+
"@algolia/transporter": "4.11.0"
|
|
22
22
|
}
|
|
23
23
|
}
|