@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/dist/fetch.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/node.d.cts
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/node.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
|
*
|
|
@@ -25,7 +25,7 @@ __export(searchClient_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(searchClient_exports);
|
|
27
27
|
var import_client_common = require("@algolia/client-common");
|
|
28
|
-
var apiClientVersion = "5.
|
|
28
|
+
var apiClientVersion = "5.26.0";
|
|
29
29
|
function getDefaultHosts(appId) {
|
|
30
30
|
return [
|
|
31
31
|
{
|
|
@@ -386,7 +386,7 @@ function createSearchClient({
|
|
|
386
386
|
* @param saveObjects - The `saveObjects` object.
|
|
387
387
|
* @param saveObjects.indexName - The `indexName` to save `objects` in.
|
|
388
388
|
* @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
389
|
-
* @param
|
|
389
|
+
* @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.
|
|
390
390
|
* @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.
|
|
391
391
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
392
392
|
*/
|
|
@@ -403,7 +403,7 @@ function createSearchClient({
|
|
|
403
403
|
* @param deleteObjects - The `deleteObjects` object.
|
|
404
404
|
* @param deleteObjects.indexName - The `indexName` to delete `objectIDs` from.
|
|
405
405
|
* @param deleteObjects.objectIDs - The objectIDs to delete.
|
|
406
|
-
* @param
|
|
406
|
+
* @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.
|
|
407
407
|
* @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.
|
|
408
408
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
409
409
|
*/
|
|
@@ -427,7 +427,7 @@ function createSearchClient({
|
|
|
427
427
|
* @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.
|
|
428
428
|
* @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.
|
|
429
429
|
* @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail..
|
|
430
|
-
* @param
|
|
430
|
+
* @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.
|
|
431
431
|
* @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.
|
|
432
432
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
433
433
|
*/
|
|
@@ -1053,7 +1053,7 @@ function createSearchClient({
|
|
|
1053
1053
|
return transporter.request(request, requestOptions);
|
|
1054
1054
|
},
|
|
1055
1055
|
/**
|
|
1056
|
-
* 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 [`
|
|
1056
|
+
* 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).
|
|
1057
1057
|
*
|
|
1058
1058
|
* Required API Key ACLs:
|
|
1059
1059
|
* - deleteObject
|
|
@@ -1380,7 +1380,7 @@ function createSearchClient({
|
|
|
1380
1380
|
* Retrieves an object with non-null index settings.
|
|
1381
1381
|
*
|
|
1382
1382
|
* Required API Key ACLs:
|
|
1383
|
-
* -
|
|
1383
|
+
* - settings
|
|
1384
1384
|
* @param getSettings - The getSettings object.
|
|
1385
1385
|
* @param getSettings.indexName - Name of the index on which to perform the operation.
|
|
1386
1386
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|