@algolia/client-search 5.36.0 → 5.37.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/README.md +4 -4
- package/dist/browser.d.ts +8 -3
- package/dist/builds/browser.js +6 -2
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +1 -1
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +1 -1
- package/dist/builds/fetch.js +6 -2
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +6 -2
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +6 -2
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +6 -2
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +8 -3
- package/dist/node.d.cts +8 -3
- package/dist/node.d.ts +8 -3
- package/dist/src/searchClient.cjs +6 -2
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +8 -7
- package/dist/src/searchClient.js.map +1 -1
- package/dist/worker.d.ts +8 -3
- package/package.json +5 -5
package/dist/src/searchClient.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getAlgoliaAgent,
|
|
8
8
|
shuffle
|
|
9
9
|
} from "@algolia/client-common";
|
|
10
|
-
var apiClientVersion = "5.
|
|
10
|
+
var apiClientVersion = "5.37.0";
|
|
11
11
|
function getDefaultHosts(appId) {
|
|
12
12
|
return [
|
|
13
13
|
{
|
|
@@ -272,7 +272,7 @@ function createSearchClient({
|
|
|
272
272
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
|
|
273
273
|
const params = {
|
|
274
274
|
...searchRulesParams,
|
|
275
|
-
hitsPerPage: searchRulesParams
|
|
275
|
+
hitsPerPage: (searchRulesParams == null ? void 0 : searchRulesParams.hitsPerPage) || 1e3
|
|
276
276
|
};
|
|
277
277
|
return createIterablePromise({
|
|
278
278
|
func: (previousResponse) => {
|
|
@@ -309,7 +309,7 @@ function createSearchClient({
|
|
|
309
309
|
}, requestOptions) {
|
|
310
310
|
const params = {
|
|
311
311
|
...searchSynonymsParams,
|
|
312
|
-
page: searchSynonymsParams
|
|
312
|
+
page: (searchSynonymsParams == null ? void 0 : searchSynonymsParams.page) || 0,
|
|
313
313
|
hitsPerPage: 1e3
|
|
314
314
|
};
|
|
315
315
|
return createIterablePromise({
|
|
@@ -1365,15 +1365,19 @@ function createSearchClient({
|
|
|
1365
1365
|
* - settings
|
|
1366
1366
|
* @param getSettings - The getSettings object.
|
|
1367
1367
|
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
1368
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
1368
1369
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1369
1370
|
*/
|
|
1370
|
-
getSettings({ indexName }, requestOptions) {
|
|
1371
|
+
getSettings({ indexName, getVersion }, requestOptions) {
|
|
1371
1372
|
if (!indexName) {
|
|
1372
1373
|
throw new Error("Parameter `indexName` is required when calling `getSettings`.");
|
|
1373
1374
|
}
|
|
1374
1375
|
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
1375
1376
|
const headers = {};
|
|
1376
1377
|
const queryParameters = {};
|
|
1378
|
+
if (getVersion !== void 0) {
|
|
1379
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
1380
|
+
}
|
|
1377
1381
|
const request = {
|
|
1378
1382
|
method: "GET",
|
|
1379
1383
|
path: requestPath,
|
|
@@ -2329,7 +2333,4 @@ export {
|
|
|
2329
2333
|
apiClientVersion,
|
|
2330
2334
|
createSearchClient
|
|
2331
2335
|
};
|
|
2332
|
-
//# sourceMappingURL=searchClient.js.mapClientVersion,
|
|
2333
|
-
createSearchClient
|
|
2334
|
-
};
|
|
2335
2336
|
//# sourceMappingURL=searchClient.js.map
|