@algolia/client-search 5.55.0 → 5.55.1
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 +4 -4
- package/dist/builds/browser.js +10 -3
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +4 -4
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +5 -5
- package/dist/builds/fetch.js +10 -3
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +9 -3
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +10 -3
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +10 -3
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +4 -4
- package/dist/node.d.cts +4 -4
- package/dist/node.d.ts +4 -4
- package/dist/src/searchClient.cjs +9 -3
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +10 -3
- package/dist/src/searchClient.js.map +1 -1
- package/dist/worker.d.ts +4 -4
- package/package.json +6 -6
package/dist/fetch.d.ts
CHANGED
|
@@ -847,7 +847,7 @@ type GetObjectsResponse<T = Record<string, unknown>> = {
|
|
|
847
847
|
/**
|
|
848
848
|
* Retrieved records.
|
|
849
849
|
*/
|
|
850
|
-
results: T[];
|
|
850
|
+
results: (T | null)[];
|
|
851
851
|
};
|
|
852
852
|
|
|
853
853
|
/**
|
|
@@ -3242,7 +3242,7 @@ type AccountCopyIndexOptions = ChunkedHelperOptions & {
|
|
|
3242
3242
|
batchSize?: number | undefined;
|
|
3243
3243
|
};
|
|
3244
3244
|
|
|
3245
|
-
declare const apiClientVersion = "5.55.
|
|
3245
|
+
declare const apiClientVersion = "5.55.1";
|
|
3246
3246
|
declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
3247
3247
|
transporter: _algolia_client_common.Transporter;
|
|
3248
3248
|
/**
|
|
@@ -3413,10 +3413,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3413
3413
|
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
3414
3414
|
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.
|
|
3415
3415
|
* @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].
|
|
3416
|
-
* @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion.
|
|
3416
|
+
* @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion. 800 by default.
|
|
3417
3417
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch`, `operationIndex` and `getTask` method and merged with the transporter requestOptions.
|
|
3418
3418
|
*/
|
|
3419
|
-
replaceAllObjects({ indexName, objects, batchSize, scopes, maxRetries }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<ReplaceAllObjectsResponse>;
|
|
3419
|
+
replaceAllObjects({ indexName, objects, batchSize, scopes, maxRetries, }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<ReplaceAllObjectsResponse>;
|
|
3420
3420
|
indexExists({ indexName }: GetSettingsProps): Promise<boolean>;
|
|
3421
3421
|
/**
|
|
3422
3422
|
* Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
|
package/dist/node.d.cts
CHANGED
|
@@ -847,7 +847,7 @@ type GetObjectsResponse<T = Record<string, unknown>> = {
|
|
|
847
847
|
/**
|
|
848
848
|
* Retrieved records.
|
|
849
849
|
*/
|
|
850
|
-
results: T[];
|
|
850
|
+
results: (T | null)[];
|
|
851
851
|
};
|
|
852
852
|
|
|
853
853
|
/**
|
|
@@ -3242,7 +3242,7 @@ type AccountCopyIndexOptions = ChunkedHelperOptions & {
|
|
|
3242
3242
|
batchSize?: number | undefined;
|
|
3243
3243
|
};
|
|
3244
3244
|
|
|
3245
|
-
declare const apiClientVersion = "5.55.
|
|
3245
|
+
declare const apiClientVersion = "5.55.1";
|
|
3246
3246
|
declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
3247
3247
|
transporter: _algolia_client_common.Transporter;
|
|
3248
3248
|
/**
|
|
@@ -3413,10 +3413,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3413
3413
|
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
3414
3414
|
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.
|
|
3415
3415
|
* @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].
|
|
3416
|
-
* @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion.
|
|
3416
|
+
* @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion. 800 by default.
|
|
3417
3417
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch`, `operationIndex` and `getTask` method and merged with the transporter requestOptions.
|
|
3418
3418
|
*/
|
|
3419
|
-
replaceAllObjects({ indexName, objects, batchSize, scopes, maxRetries }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<ReplaceAllObjectsResponse>;
|
|
3419
|
+
replaceAllObjects({ indexName, objects, batchSize, scopes, maxRetries, }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<ReplaceAllObjectsResponse>;
|
|
3420
3420
|
indexExists({ indexName }: GetSettingsProps): Promise<boolean>;
|
|
3421
3421
|
/**
|
|
3422
3422
|
* Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
|
package/dist/node.d.ts
CHANGED
|
@@ -847,7 +847,7 @@ type GetObjectsResponse<T = Record<string, unknown>> = {
|
|
|
847
847
|
/**
|
|
848
848
|
* Retrieved records.
|
|
849
849
|
*/
|
|
850
|
-
results: T[];
|
|
850
|
+
results: (T | null)[];
|
|
851
851
|
};
|
|
852
852
|
|
|
853
853
|
/**
|
|
@@ -3242,7 +3242,7 @@ type AccountCopyIndexOptions = ChunkedHelperOptions & {
|
|
|
3242
3242
|
batchSize?: number | undefined;
|
|
3243
3243
|
};
|
|
3244
3244
|
|
|
3245
|
-
declare const apiClientVersion = "5.55.
|
|
3245
|
+
declare const apiClientVersion = "5.55.1";
|
|
3246
3246
|
declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
3247
3247
|
transporter: _algolia_client_common.Transporter;
|
|
3248
3248
|
/**
|
|
@@ -3413,10 +3413,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3413
3413
|
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
3414
3414
|
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.
|
|
3415
3415
|
* @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].
|
|
3416
|
-
* @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion.
|
|
3416
|
+
* @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion. 800 by default.
|
|
3417
3417
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch`, `operationIndex` and `getTask` method and merged with the transporter requestOptions.
|
|
3418
3418
|
*/
|
|
3419
|
-
replaceAllObjects({ indexName, objects, batchSize, scopes, maxRetries }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<ReplaceAllObjectsResponse>;
|
|
3419
|
+
replaceAllObjects({ indexName, objects, batchSize, scopes, maxRetries, }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<ReplaceAllObjectsResponse>;
|
|
3420
3420
|
indexExists({ indexName }: GetSettingsProps): Promise<boolean>;
|
|
3421
3421
|
/**
|
|
3422
3422
|
* Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
|
|
@@ -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.55.
|
|
28
|
+
var apiClientVersion = "5.55.1";
|
|
29
29
|
function getDefaultHosts(appId) {
|
|
30
30
|
return [
|
|
31
31
|
{
|
|
@@ -466,10 +466,16 @@ function createSearchClient({
|
|
|
466
466
|
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
467
467
|
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.
|
|
468
468
|
* @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].
|
|
469
|
-
* @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion.
|
|
469
|
+
* @param replaceAllObjects.maxRetries - The maximum number of retries when polling for task completion. 800 by default.
|
|
470
470
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch`, `operationIndex` and `getTask` method and merged with the transporter requestOptions.
|
|
471
471
|
*/
|
|
472
|
-
async replaceAllObjects({
|
|
472
|
+
async replaceAllObjects({
|
|
473
|
+
indexName,
|
|
474
|
+
objects,
|
|
475
|
+
batchSize,
|
|
476
|
+
scopes,
|
|
477
|
+
maxRetries = import_client_common.DEFAULT_REPLACE_ALL_OBJECTS_MAX_RETRIES
|
|
478
|
+
}, requestOptions) {
|
|
473
479
|
const randomSuffix = Math.floor(Math.random() * 1e6) + 1e5;
|
|
474
480
|
const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
|
|
475
481
|
if (scopes === void 0) {
|