@algolia/client-search 5.10.2 → 5.11.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/dist/fetch.d.ts CHANGED
@@ -755,6 +755,10 @@ type GetObjectsParams = {
755
755
  };
756
756
 
757
757
  type GetObjectsResponse<T = Record<string, unknown>> = {
758
+ /**
759
+ * An optional status message.
760
+ */
761
+ message?: string;
758
762
  /**
759
763
  * Retrieved records.
760
764
  */
@@ -1791,7 +1795,7 @@ type SearchRulesResponse = {
1791
1795
  /**
1792
1796
  * Synonym type.
1793
1797
  */
1794
- type SynonymType = 'synonym' | 'onewaysynonym' | 'altcorrection1' | 'altcorrection2' | 'placeholder';
1798
+ type SynonymType = 'synonym' | 'onewaysynonym' | 'altcorrection1' | 'altcorrection2' | 'placeholder' | 'oneWaySynonym' | 'altCorrection1' | 'altCorrection2';
1795
1799
 
1796
1800
  /**
1797
1801
  * Synonym object.
@@ -2999,19 +3003,19 @@ type SearchClientNodeHelpers = {
2999
3003
  generateSecuredApiKey: (opts: GenerateSecuredApiKeyOptions) => string;
3000
3004
  getSecuredApiKeyRemainingValidity: (opts: GetSecuredApiKeyRemainingValidityOptions) => number;
3001
3005
  };
3002
- type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName'> & {
3006
+ type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'waitForTasks'> & {
3003
3007
  /**
3004
3008
  * The objectIDs to delete.
3005
3009
  */
3006
3010
  objectIDs: string[];
3007
3011
  };
3008
- type PartialUpdateObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects'> & {
3012
+ type PartialUpdateObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects' | 'waitForTasks'> & {
3009
3013
  /**
3010
3014
  *To be provided if non-existing objects are passed, otherwise, the call will fail.
3011
3015
  */
3012
3016
  createIfNotExists?: boolean;
3013
3017
  };
3014
- type SaveObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects'>;
3018
+ type SaveObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects' | 'waitForTasks'>;
3015
3019
  type ChunkedBatchOptions = ReplaceAllObjectsOptions & {
3016
3020
  /**
3017
3021
  * The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
@@ -3037,7 +3041,7 @@ type ReplaceAllObjectsOptions = {
3037
3041
  batchSize?: number;
3038
3042
  };
3039
3043
 
3040
- declare const apiClientVersion = "5.10.2";
3044
+ declare const apiClientVersion = "5.11.0";
3041
3045
  declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
3042
3046
  transporter: _algolia_client_common.Transporter;
3043
3047
  /**
@@ -3160,9 +3164,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3160
3164
  * @param saveObjects - The `saveObjects` object.
3161
3165
  * @param saveObjects.indexName - The `indexName` to save `objects` in.
3162
3166
  * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
3167
+ * @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.
3163
3168
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
3164
3169
  */
3165
- saveObjects({ indexName, objects }: SaveObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3170
+ saveObjects({ indexName, objects, waitForTasks }: SaveObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3166
3171
  /**
3167
3172
  * Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
3168
3173
  *
@@ -3170,9 +3175,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3170
3175
  * @param deleteObjects - The `deleteObjects` object.
3171
3176
  * @param deleteObjects.indexName - The `indexName` to delete `objectIDs` from.
3172
3177
  * @param deleteObjects.objectIDs - The objectIDs to delete.
3178
+ * @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.
3173
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.
3174
3180
  */
3175
- deleteObjects({ indexName, objectIDs }: DeleteObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3181
+ deleteObjects({ indexName, objectIDs, waitForTasks }: DeleteObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3176
3182
  /**
3177
3183
  * Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
3178
3184
  *
@@ -3181,9 +3187,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3181
3187
  * @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.
3182
3188
  * @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.
3183
3189
  * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail..
3190
+ * @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.
3184
3191
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
3185
3192
  */
3186
- partialUpdateObjects({ indexName, objects, createIfNotExists }: PartialUpdateObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3193
+ partialUpdateObjects({ indexName, objects, createIfNotExists, waitForTasks }: PartialUpdateObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3187
3194
  /**
3188
3195
  * Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
3189
3196
  * See https://api-clients-automation.netlify.app/docs/add-new-api-client#5-helpers for implementation details.
package/dist/node.d.cts CHANGED
@@ -755,6 +755,10 @@ type GetObjectsParams = {
755
755
  };
756
756
 
757
757
  type GetObjectsResponse<T = Record<string, unknown>> = {
758
+ /**
759
+ * An optional status message.
760
+ */
761
+ message?: string;
758
762
  /**
759
763
  * Retrieved records.
760
764
  */
@@ -1791,7 +1795,7 @@ type SearchRulesResponse = {
1791
1795
  /**
1792
1796
  * Synonym type.
1793
1797
  */
1794
- type SynonymType = 'synonym' | 'onewaysynonym' | 'altcorrection1' | 'altcorrection2' | 'placeholder';
1798
+ type SynonymType = 'synonym' | 'onewaysynonym' | 'altcorrection1' | 'altcorrection2' | 'placeholder' | 'oneWaySynonym' | 'altCorrection1' | 'altCorrection2';
1795
1799
 
1796
1800
  /**
1797
1801
  * Synonym object.
@@ -2999,19 +3003,19 @@ type SearchClientNodeHelpers = {
2999
3003
  generateSecuredApiKey: (opts: GenerateSecuredApiKeyOptions) => string;
3000
3004
  getSecuredApiKeyRemainingValidity: (opts: GetSecuredApiKeyRemainingValidityOptions) => number;
3001
3005
  };
3002
- type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName'> & {
3006
+ type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'waitForTasks'> & {
3003
3007
  /**
3004
3008
  * The objectIDs to delete.
3005
3009
  */
3006
3010
  objectIDs: string[];
3007
3011
  };
3008
- type PartialUpdateObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects'> & {
3012
+ type PartialUpdateObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects' | 'waitForTasks'> & {
3009
3013
  /**
3010
3014
  *To be provided if non-existing objects are passed, otherwise, the call will fail.
3011
3015
  */
3012
3016
  createIfNotExists?: boolean;
3013
3017
  };
3014
- type SaveObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects'>;
3018
+ type SaveObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects' | 'waitForTasks'>;
3015
3019
  type ChunkedBatchOptions = ReplaceAllObjectsOptions & {
3016
3020
  /**
3017
3021
  * The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
@@ -3037,7 +3041,7 @@ type ReplaceAllObjectsOptions = {
3037
3041
  batchSize?: number;
3038
3042
  };
3039
3043
 
3040
- declare const apiClientVersion = "5.10.2";
3044
+ declare const apiClientVersion = "5.11.0";
3041
3045
  declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
3042
3046
  transporter: _algolia_client_common.Transporter;
3043
3047
  /**
@@ -3160,9 +3164,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3160
3164
  * @param saveObjects - The `saveObjects` object.
3161
3165
  * @param saveObjects.indexName - The `indexName` to save `objects` in.
3162
3166
  * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
3167
+ * @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.
3163
3168
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
3164
3169
  */
3165
- saveObjects({ indexName, objects }: SaveObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3170
+ saveObjects({ indexName, objects, waitForTasks }: SaveObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3166
3171
  /**
3167
3172
  * Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
3168
3173
  *
@@ -3170,9 +3175,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3170
3175
  * @param deleteObjects - The `deleteObjects` object.
3171
3176
  * @param deleteObjects.indexName - The `indexName` to delete `objectIDs` from.
3172
3177
  * @param deleteObjects.objectIDs - The objectIDs to delete.
3178
+ * @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.
3173
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.
3174
3180
  */
3175
- deleteObjects({ indexName, objectIDs }: DeleteObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3181
+ deleteObjects({ indexName, objectIDs, waitForTasks }: DeleteObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3176
3182
  /**
3177
3183
  * Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
3178
3184
  *
@@ -3181,9 +3187,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3181
3187
  * @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.
3182
3188
  * @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.
3183
3189
  * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail..
3190
+ * @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.
3184
3191
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
3185
3192
  */
3186
- partialUpdateObjects({ indexName, objects, createIfNotExists }: PartialUpdateObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3193
+ partialUpdateObjects({ indexName, objects, createIfNotExists, waitForTasks }: PartialUpdateObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3187
3194
  /**
3188
3195
  * Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
3189
3196
  * See https://api-clients-automation.netlify.app/docs/add-new-api-client#5-helpers for implementation details.
package/dist/node.d.ts CHANGED
@@ -755,6 +755,10 @@ type GetObjectsParams = {
755
755
  };
756
756
 
757
757
  type GetObjectsResponse<T = Record<string, unknown>> = {
758
+ /**
759
+ * An optional status message.
760
+ */
761
+ message?: string;
758
762
  /**
759
763
  * Retrieved records.
760
764
  */
@@ -1791,7 +1795,7 @@ type SearchRulesResponse = {
1791
1795
  /**
1792
1796
  * Synonym type.
1793
1797
  */
1794
- type SynonymType = 'synonym' | 'onewaysynonym' | 'altcorrection1' | 'altcorrection2' | 'placeholder';
1798
+ type SynonymType = 'synonym' | 'onewaysynonym' | 'altcorrection1' | 'altcorrection2' | 'placeholder' | 'oneWaySynonym' | 'altCorrection1' | 'altCorrection2';
1795
1799
 
1796
1800
  /**
1797
1801
  * Synonym object.
@@ -2999,19 +3003,19 @@ type SearchClientNodeHelpers = {
2999
3003
  generateSecuredApiKey: (opts: GenerateSecuredApiKeyOptions) => string;
3000
3004
  getSecuredApiKeyRemainingValidity: (opts: GetSecuredApiKeyRemainingValidityOptions) => number;
3001
3005
  };
3002
- type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName'> & {
3006
+ type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'waitForTasks'> & {
3003
3007
  /**
3004
3008
  * The objectIDs to delete.
3005
3009
  */
3006
3010
  objectIDs: string[];
3007
3011
  };
3008
- type PartialUpdateObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects'> & {
3012
+ type PartialUpdateObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects' | 'waitForTasks'> & {
3009
3013
  /**
3010
3014
  *To be provided if non-existing objects are passed, otherwise, the call will fail.
3011
3015
  */
3012
3016
  createIfNotExists?: boolean;
3013
3017
  };
3014
- type SaveObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects'>;
3018
+ type SaveObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects' | 'waitForTasks'>;
3015
3019
  type ChunkedBatchOptions = ReplaceAllObjectsOptions & {
3016
3020
  /**
3017
3021
  * The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
@@ -3037,7 +3041,7 @@ type ReplaceAllObjectsOptions = {
3037
3041
  batchSize?: number;
3038
3042
  };
3039
3043
 
3040
- declare const apiClientVersion = "5.10.2";
3044
+ declare const apiClientVersion = "5.11.0";
3041
3045
  declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
3042
3046
  transporter: _algolia_client_common.Transporter;
3043
3047
  /**
@@ -3160,9 +3164,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3160
3164
  * @param saveObjects - The `saveObjects` object.
3161
3165
  * @param saveObjects.indexName - The `indexName` to save `objects` in.
3162
3166
  * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
3167
+ * @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.
3163
3168
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
3164
3169
  */
3165
- saveObjects({ indexName, objects }: SaveObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3170
+ saveObjects({ indexName, objects, waitForTasks }: SaveObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3166
3171
  /**
3167
3172
  * Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
3168
3173
  *
@@ -3170,9 +3175,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3170
3175
  * @param deleteObjects - The `deleteObjects` object.
3171
3176
  * @param deleteObjects.indexName - The `indexName` to delete `objectIDs` from.
3172
3177
  * @param deleteObjects.objectIDs - The objectIDs to delete.
3178
+ * @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.
3173
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.
3174
3180
  */
3175
- deleteObjects({ indexName, objectIDs }: DeleteObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3181
+ deleteObjects({ indexName, objectIDs, waitForTasks }: DeleteObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3176
3182
  /**
3177
3183
  * Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
3178
3184
  *
@@ -3181,9 +3187,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3181
3187
  * @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.
3182
3188
  * @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.
3183
3189
  * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail..
3190
+ * @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.
3184
3191
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
3185
3192
  */
3186
- partialUpdateObjects({ indexName, objects, createIfNotExists }: PartialUpdateObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3193
+ partialUpdateObjects({ indexName, objects, createIfNotExists, waitForTasks }: PartialUpdateObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3187
3194
  /**
3188
3195
  * Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
3189
3196
  * See https://api-clients-automation.netlify.app/docs/add-new-api-client#5-helpers for implementation details.
@@ -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.10.2";
28
+ var apiClientVersion = "5.11.0";
29
29
  function getDefaultHosts(appId) {
30
30
  return [
31
31
  {
@@ -381,10 +381,11 @@ function createSearchClient({
381
381
  * @param saveObjects - The `saveObjects` object.
382
382
  * @param saveObjects.indexName - The `indexName` to save `objects` in.
383
383
  * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
384
+ * @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.
384
385
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
385
386
  */
386
- async saveObjects({ indexName, objects }, requestOptions) {
387
- return await this.chunkedBatch({ indexName, objects, action: "addObject" }, requestOptions);
387
+ async saveObjects({ indexName, objects, waitForTasks }, requestOptions) {
388
+ return await this.chunkedBatch({ indexName, objects, action: "addObject", waitForTasks }, requestOptions);
388
389
  },
389
390
  /**
390
391
  * Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
@@ -393,14 +394,16 @@ function createSearchClient({
393
394
  * @param deleteObjects - The `deleteObjects` object.
394
395
  * @param deleteObjects.indexName - The `indexName` to delete `objectIDs` from.
395
396
  * @param deleteObjects.objectIDs - The objectIDs to delete.
397
+ * @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.
396
398
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
397
399
  */
398
- async deleteObjects({ indexName, objectIDs }, requestOptions) {
400
+ async deleteObjects({ indexName, objectIDs, waitForTasks }, requestOptions) {
399
401
  return await this.chunkedBatch(
400
402
  {
401
403
  indexName,
402
404
  objects: objectIDs.map((objectID) => ({ objectID })),
403
- action: "deleteObject"
405
+ action: "deleteObject",
406
+ waitForTasks
404
407
  },
405
408
  requestOptions
406
409
  );
@@ -413,14 +416,16 @@ function createSearchClient({
413
416
  * @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.
414
417
  * @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.
415
418
  * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail..
419
+ * @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.
416
420
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
417
421
  */
418
- async partialUpdateObjects({ indexName, objects, createIfNotExists }, requestOptions) {
422
+ async partialUpdateObjects({ indexName, objects, createIfNotExists, waitForTasks }, requestOptions) {
419
423
  return await this.chunkedBatch(
420
424
  {
421
425
  indexName,
422
426
  objects,
423
- action: createIfNotExists ? "partialUpdateObject" : "partialUpdateObjectNoCreate"
427
+ action: createIfNotExists ? "partialUpdateObject" : "partialUpdateObjectNoCreate",
428
+ waitForTasks
424
429
  },
425
430
  requestOptions
426
431
  );