@algolia/client-search 5.49.1 → 5.50.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 +3 -2
- package/dist/builds/browser.js +3 -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 +3 -3
- package/dist/builds/fetch.js +3 -1
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +3 -1
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +3 -1
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +3 -2
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +3 -2
- package/dist/node.d.cts +3 -2
- package/dist/node.d.ts +3 -2
- package/dist/src/searchClient.cjs +1 -1
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +6 -3
- package/dist/src/searchClient.js.map +1 -1
- package/dist/worker.d.ts +3 -2
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -40,11 +40,11 @@ All of our clients comes with type definition, and are available for both browse
|
|
|
40
40
|
### With a package manager
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
yarn add @algolia/client-search@5.
|
|
43
|
+
yarn add @algolia/client-search@5.50.0
|
|
44
44
|
# or
|
|
45
|
-
npm install @algolia/client-search@5.
|
|
45
|
+
npm install @algolia/client-search@5.50.0
|
|
46
46
|
# or
|
|
47
|
-
pnpm add @algolia/client-search@5.
|
|
47
|
+
pnpm add @algolia/client-search@5.50.0
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
### Without a package manager
|
|
@@ -52,7 +52,7 @@ pnpm add @algolia/client-search@5.49.1
|
|
|
52
52
|
Add the following JavaScript snippet to the <head> of your website:
|
|
53
53
|
|
|
54
54
|
```html
|
|
55
|
-
<script src="https://cdn.jsdelivr.net/npm/@algolia/client-search@5.
|
|
55
|
+
<script src="https://cdn.jsdelivr.net/npm/@algolia/client-search@5.50.0/dist/builds/browser.umd.js"></script>
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
### Usage
|
package/dist/browser.d.ts
CHANGED
|
@@ -1548,6 +1548,7 @@ type Rule = {
|
|
|
1548
1548
|
validity?: Array<TimeRange> | undefined;
|
|
1549
1549
|
tags?: Array<string> | undefined;
|
|
1550
1550
|
scope?: string | undefined;
|
|
1551
|
+
condition?: Condition | undefined;
|
|
1551
1552
|
};
|
|
1552
1553
|
|
|
1553
1554
|
type SaveObjectResponse = {
|
|
@@ -3065,7 +3066,7 @@ type AccountCopyIndexOptions = {
|
|
|
3065
3066
|
batchSize?: number | undefined;
|
|
3066
3067
|
};
|
|
3067
3068
|
|
|
3068
|
-
declare const apiClientVersion = "5.
|
|
3069
|
+
declare const apiClientVersion = "5.50.0";
|
|
3069
3070
|
declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
3070
3071
|
transporter: _algolia_client_common.Transporter;
|
|
3071
3072
|
/**
|
|
@@ -3551,7 +3552,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3551
3552
|
* @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.
|
|
3552
3553
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3553
3554
|
*/
|
|
3554
|
-
getObject({ indexName, objectID, attributesToRetrieve }: GetObjectProps, requestOptions?: RequestOptions): Promise<
|
|
3555
|
+
getObject<T = Record<string, unknown>>({ indexName, objectID, attributesToRetrieve }: GetObjectProps, requestOptions?: RequestOptions): Promise<T>;
|
|
3555
3556
|
/**
|
|
3556
3557
|
* Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
|
|
3557
3558
|
*
|
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.50.0";
|
|
20
20
|
function getDefaultHosts(appId) {
|
|
21
21
|
return [
|
|
22
22
|
{
|
|
@@ -2356,6 +2356,7 @@ function searchClient(appId, apiKey, options) {
|
|
|
2356
2356
|
if (!apiKey || typeof apiKey !== "string") {
|
|
2357
2357
|
throw new Error("`apiKey` is missing.");
|
|
2358
2358
|
}
|
|
2359
|
+
const { compression: _compression, ...browserOptions } = options || {};
|
|
2359
2360
|
return createSearchClient({
|
|
2360
2361
|
appId,
|
|
2361
2362
|
apiKey,
|
|
@@ -2373,7 +2374,7 @@ function searchClient(appId, apiKey, options) {
|
|
|
2373
2374
|
hostsCache: createFallbackableCache({
|
|
2374
2375
|
caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()]
|
|
2375
2376
|
}),
|
|
2376
|
-
...
|
|
2377
|
+
...browserOptions
|
|
2377
2378
|
});
|
|
2378
2379
|
}
|
|
2379
2380
|
export {
|