@algolia/client-search 5.24.0 → 5.26.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 +13 -13
- package/dist/builds/browser.js +6 -6
- 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 -6
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +6 -6
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +7 -7
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +6 -6
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +13 -13
- package/dist/node.d.cts +13 -13
- package/dist/node.d.ts +13 -13
- package/dist/src/searchClient.cjs +6 -6
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +6 -6
- package/dist/src/searchClient.js.map +1 -1
- package/dist/worker.d.ts +13 -13
- package/package.json +9 -9
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.26.0
|
|
45
45
|
# or
|
|
46
|
-
npm install @algolia/client-search@5.
|
|
46
|
+
npm install @algolia/client-search@5.26.0
|
|
47
47
|
# or
|
|
48
|
-
pnpm add @algolia/client-search@5.
|
|
48
|
+
pnpm add @algolia/client-search@5.26.0
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
### Without a package manager
|
|
@@ -53,7 +53,7 @@ pnpm add @algolia/client-search@5.24.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.26.0/dist/builds/browser.umd.js"></script>
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
### Usage
|
package/dist/browser.d.ts
CHANGED
|
@@ -1240,7 +1240,7 @@ type SemanticSearch = {
|
|
|
1240
1240
|
/**
|
|
1241
1241
|
* - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.
|
|
1242
1242
|
*/
|
|
1243
|
-
type TypoToleranceEnum = 'min' | 'strict';
|
|
1243
|
+
type TypoToleranceEnum = 'min' | 'strict' | 'true' | 'false';
|
|
1244
1244
|
|
|
1245
1245
|
/**
|
|
1246
1246
|
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) are also active.
|
|
@@ -2269,7 +2269,7 @@ type SecuredApiKeyRestrictions = {
|
|
|
2269
2269
|
/**
|
|
2270
2270
|
* Properties for the `addOrUpdateObject` method.
|
|
2271
2271
|
*/
|
|
2272
|
-
type AddOrUpdateObjectProps = {
|
|
2272
|
+
type AddOrUpdateObjectProps<T extends object> = {
|
|
2273
2273
|
/**
|
|
2274
2274
|
* Name of the index on which to perform the operation.
|
|
2275
2275
|
*/
|
|
@@ -2281,7 +2281,7 @@ type AddOrUpdateObjectProps = {
|
|
|
2281
2281
|
/**
|
|
2282
2282
|
* The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
2283
2283
|
*/
|
|
2284
|
-
body:
|
|
2284
|
+
body: T;
|
|
2285
2285
|
};
|
|
2286
2286
|
/**
|
|
2287
2287
|
* Properties for the `assignUserId` method.
|
|
@@ -2729,7 +2729,7 @@ type RestoreApiKeyProps = {
|
|
|
2729
2729
|
/**
|
|
2730
2730
|
* Properties for the `saveObject` method.
|
|
2731
2731
|
*/
|
|
2732
|
-
type SaveObjectProps = {
|
|
2732
|
+
type SaveObjectProps<T extends object> = {
|
|
2733
2733
|
/**
|
|
2734
2734
|
* Name of the index on which to perform the operation.
|
|
2735
2735
|
*/
|
|
@@ -2737,7 +2737,7 @@ type SaveObjectProps = {
|
|
|
2737
2737
|
/**
|
|
2738
2738
|
* The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
2739
2739
|
*/
|
|
2740
|
-
body:
|
|
2740
|
+
body: T;
|
|
2741
2741
|
};
|
|
2742
2742
|
/**
|
|
2743
2743
|
* Properties for the `saveRule` method.
|
|
@@ -3047,7 +3047,7 @@ type AccountCopyIndexOptions = {
|
|
|
3047
3047
|
destinationIndexName: string;
|
|
3048
3048
|
};
|
|
3049
3049
|
|
|
3050
|
-
declare const apiClientVersion = "5.
|
|
3050
|
+
declare const apiClientVersion = "5.26.0";
|
|
3051
3051
|
declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
3052
3052
|
transporter: _algolia_client_common.Transporter;
|
|
3053
3053
|
/**
|
|
@@ -3174,7 +3174,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3174
3174
|
* @param saveObjects - The `saveObjects` object.
|
|
3175
3175
|
* @param saveObjects.indexName - The `indexName` to save `objects` in.
|
|
3176
3176
|
* @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
3177
|
-
* @param
|
|
3177
|
+
* @param saveObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
3178
3178
|
* @param saveObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
3179
3179
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
3180
3180
|
*/
|
|
@@ -3186,7 +3186,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3186
3186
|
* @param deleteObjects - The `deleteObjects` object.
|
|
3187
3187
|
* @param deleteObjects.indexName - The `indexName` to delete `objectIDs` from.
|
|
3188
3188
|
* @param deleteObjects.objectIDs - The objectIDs to delete.
|
|
3189
|
-
* @param
|
|
3189
|
+
* @param deleteObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
3190
3190
|
* @param deleteObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
3191
3191
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
3192
3192
|
*/
|
|
@@ -3199,7 +3199,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3199
3199
|
* @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.
|
|
3200
3200
|
* @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.
|
|
3201
3201
|
* @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail..
|
|
3202
|
-
* @param
|
|
3202
|
+
* @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
3203
3203
|
* @param partialUpdateObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
3204
3204
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
3205
3205
|
*/
|
|
@@ -3260,7 +3260,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3260
3260
|
* @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
3261
3261
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3262
3262
|
*/
|
|
3263
|
-
addOrUpdateObject({ indexName, objectID, body }: AddOrUpdateObjectProps
|
|
3263
|
+
addOrUpdateObject<T extends object>({ indexName, objectID, body }: AddOrUpdateObjectProps<T>, requestOptions?: RequestOptions): Promise<UpdatedAtWithObjectIdResponse>;
|
|
3264
3264
|
/**
|
|
3265
3265
|
* Adds a source to the list of allowed sources.
|
|
3266
3266
|
*
|
|
@@ -3424,7 +3424,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3424
3424
|
*/
|
|
3425
3425
|
deleteIndex({ indexName }: DeleteIndexProps, requestOptions?: RequestOptions): Promise<DeletedAtResponse>;
|
|
3426
3426
|
/**
|
|
3427
|
-
* Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`
|
|
3427
|
+
* Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteBy` operation](#tag/Records/operation/deleteBy).
|
|
3428
3428
|
*
|
|
3429
3429
|
* Required API Key ACLs:
|
|
3430
3430
|
* - deleteObject
|
|
@@ -3552,7 +3552,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3552
3552
|
* Retrieves an object with non-null index settings.
|
|
3553
3553
|
*
|
|
3554
3554
|
* Required API Key ACLs:
|
|
3555
|
-
* -
|
|
3555
|
+
* - settings
|
|
3556
3556
|
* @param getSettings - The getSettings object.
|
|
3557
3557
|
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
3558
3558
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3736,7 +3736,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3736
3736
|
* @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
|
|
3737
3737
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3738
3738
|
*/
|
|
3739
|
-
saveObject({ indexName, body }: SaveObjectProps
|
|
3739
|
+
saveObject<T extends object>({ indexName, body }: SaveObjectProps<T>, requestOptions?: RequestOptions): Promise<SaveObjectResponse>;
|
|
3740
3740
|
/**
|
|
3741
3741
|
* If a rule with the specified object ID doesn\'t exist, it\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
|
|
3742
3742
|
*
|
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.26.0";
|
|
20
20
|
function getDefaultHosts(appId) {
|
|
21
21
|
return [
|
|
22
22
|
{
|
|
@@ -377,7 +377,7 @@ function createSearchClient({
|
|
|
377
377
|
* @param saveObjects - The `saveObjects` object.
|
|
378
378
|
* @param saveObjects.indexName - The `indexName` to save `objects` in.
|
|
379
379
|
* @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
380
|
-
* @param
|
|
380
|
+
* @param saveObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
381
381
|
* @param saveObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
382
382
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
383
383
|
*/
|
|
@@ -394,7 +394,7 @@ function createSearchClient({
|
|
|
394
394
|
* @param deleteObjects - The `deleteObjects` object.
|
|
395
395
|
* @param deleteObjects.indexName - The `indexName` to delete `objectIDs` from.
|
|
396
396
|
* @param deleteObjects.objectIDs - The objectIDs to delete.
|
|
397
|
-
* @param
|
|
397
|
+
* @param deleteObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
398
398
|
* @param deleteObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
399
399
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
400
400
|
*/
|
|
@@ -418,7 +418,7 @@ function createSearchClient({
|
|
|
418
418
|
* @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.
|
|
419
419
|
* @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.
|
|
420
420
|
* @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail..
|
|
421
|
-
* @param
|
|
421
|
+
* @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
422
422
|
* @param partialUpdateObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
423
423
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
424
424
|
*/
|
|
@@ -1044,7 +1044,7 @@ function createSearchClient({
|
|
|
1044
1044
|
return transporter.request(request, requestOptions);
|
|
1045
1045
|
},
|
|
1046
1046
|
/**
|
|
1047
|
-
* Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`
|
|
1047
|
+
* Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteBy` operation](#tag/Records/operation/deleteBy).
|
|
1048
1048
|
*
|
|
1049
1049
|
* Required API Key ACLs:
|
|
1050
1050
|
* - deleteObject
|
|
@@ -1371,7 +1371,7 @@ function createSearchClient({
|
|
|
1371
1371
|
* Retrieves an object with non-null index settings.
|
|
1372
1372
|
*
|
|
1373
1373
|
* Required API Key ACLs:
|
|
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
1377
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|