@algolia/client-search 5.36.0 → 5.38.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 +7 -7
package/README.md
CHANGED
|
@@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse
|
|
|
41
41
|
### With a package manager
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
yarn add @algolia/client-search@5.
|
|
44
|
+
yarn add @algolia/client-search@5.38.0
|
|
45
45
|
# or
|
|
46
|
-
npm install @algolia/client-search@5.
|
|
46
|
+
npm install @algolia/client-search@5.38.0
|
|
47
47
|
# or
|
|
48
|
-
pnpm add @algolia/client-search@5.
|
|
48
|
+
pnpm add @algolia/client-search@5.38.0
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
### Without a package manager
|
|
@@ -53,7 +53,7 @@ pnpm add @algolia/client-search@5.36.0
|
|
|
53
53
|
Add the following JavaScript snippet to the <head> of your website:
|
|
54
54
|
|
|
55
55
|
```html
|
|
56
|
-
<script src="https://cdn.jsdelivr.net/npm/@algolia/client-search@5.
|
|
56
|
+
<script src="https://cdn.jsdelivr.net/npm/@algolia/client-search@5.38.0/dist/builds/browser.umd.js"></script>
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
### Usage
|
package/dist/browser.d.ts
CHANGED
|
@@ -1486,7 +1486,7 @@ type Consequence = {
|
|
|
1486
1486
|
*/
|
|
1487
1487
|
promote?: Array<Promote> | undefined;
|
|
1488
1488
|
/**
|
|
1489
|
-
*
|
|
1489
|
+
* Determines whether promoted records must also match active filters for the consequence to apply. This ensures user-applied filters take priority and irrelevant matches aren\'t shown. For example, if you promote a record with `color: red` but the user filters for `color: blue`, the \"red\" record won\'t be shown. > In the Algolia dashboard, when you use the **Pin an item** consequence, `filterPromotes` appears as the checkbox: **Pinned items must match active filters to be displayed.** For examples, see [Promote results with rules](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/promote-hits/#promote-results-matching-active-filters).
|
|
1490
1490
|
*/
|
|
1491
1491
|
filterPromotes?: boolean | undefined;
|
|
1492
1492
|
/**
|
|
@@ -2597,6 +2597,10 @@ type GetSettingsProps = {
|
|
|
2597
2597
|
* Name of the index on which to perform the operation.
|
|
2598
2598
|
*/
|
|
2599
2599
|
indexName: string;
|
|
2600
|
+
/**
|
|
2601
|
+
* When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
2602
|
+
*/
|
|
2603
|
+
getVersion?: number | undefined;
|
|
2600
2604
|
};
|
|
2601
2605
|
/**
|
|
2602
2606
|
* Properties for the `getSynonym` method.
|
|
@@ -3051,7 +3055,7 @@ type AccountCopyIndexOptions = {
|
|
|
3051
3055
|
batchSize?: number | undefined;
|
|
3052
3056
|
};
|
|
3053
3057
|
|
|
3054
|
-
declare const apiClientVersion = "5.
|
|
3058
|
+
declare const apiClientVersion = "5.38.0";
|
|
3055
3059
|
declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
3056
3060
|
transporter: _algolia_client_common.Transporter;
|
|
3057
3061
|
/**
|
|
@@ -3559,9 +3563,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3559
3563
|
* - settings
|
|
3560
3564
|
* @param getSettings - The getSettings object.
|
|
3561
3565
|
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
3566
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
3562
3567
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3563
3568
|
*/
|
|
3564
|
-
getSettings({ indexName }: GetSettingsProps, requestOptions?: RequestOptions): Promise<SettingsResponse>;
|
|
3569
|
+
getSettings({ indexName, getVersion }: GetSettingsProps, requestOptions?: RequestOptions): Promise<SettingsResponse>;
|
|
3565
3570
|
/**
|
|
3566
3571
|
* Retrieves all allowed IP addresses with access to your application.
|
|
3567
3572
|
*
|
package/dist/builds/browser.js
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
getAlgoliaAgent,
|
|
17
17
|
shuffle
|
|
18
18
|
} from "@algolia/client-common";
|
|
19
|
-
var apiClientVersion = "5.
|
|
19
|
+
var apiClientVersion = "5.38.0";
|
|
20
20
|
function getDefaultHosts(appId) {
|
|
21
21
|
return [
|
|
22
22
|
{
|
|
@@ -1374,15 +1374,19 @@ function createSearchClient({
|
|
|
1374
1374
|
* - settings
|
|
1375
1375
|
* @param getSettings - The getSettings object.
|
|
1376
1376
|
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
1377
|
+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
|
|
1377
1378
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1378
1379
|
*/
|
|
1379
|
-
getSettings({ indexName }, requestOptions) {
|
|
1380
|
+
getSettings({ indexName, getVersion }, requestOptions) {
|
|
1380
1381
|
if (!indexName) {
|
|
1381
1382
|
throw new Error("Parameter `indexName` is required when calling `getSettings`.");
|
|
1382
1383
|
}
|
|
1383
1384
|
const requestPath = "/1/indexes/{indexName}/settings".replace("{indexName}", encodeURIComponent(indexName));
|
|
1384
1385
|
const headers = {};
|
|
1385
1386
|
const queryParameters = {};
|
|
1387
|
+
if (getVersion !== void 0) {
|
|
1388
|
+
queryParameters["getVersion"] = getVersion.toString();
|
|
1389
|
+
}
|
|
1386
1390
|
const request = {
|
|
1387
1391
|
method: "GET",
|
|
1388
1392
|
path: requestPath,
|