Skip to content

Commit 1d246d2

Browse files
committed
fix: javascript
1 parent 24d5c2d commit 1d246d2

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

templates/javascript/clients/client/api/helpers.mustache

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,10 +363,11 @@ async deleteObjects(
363363
* @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.
364364
* @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.
365365
* @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail..
366+
* @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.
366367
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
367368
*/
368369
async partialUpdateObjects(
369-
{ indexName, objects, createIfNotExists }: PartialUpdateObjectsOptions,
370+
{ indexName, objects, createIfNotExists, waitForTasks }: PartialUpdateObjectsOptions,
370371
requestOptions?: RequestOptions
371372
): Promise<BatchResponse[]> {
372373
return await this.chunkedBatch(
@@ -376,6 +377,7 @@ async partialUpdateObjects(
376377
action: createIfNotExists
377378
? 'partialUpdateObject'
378379
: 'partialUpdateObjectNoCreate',
380+
waitForTasks
379381
},
380382
requestOptions
381383
);

templates/javascript/clients/client/model/clientMethodProps.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'wait
141141

142142
export type PartialUpdateObjectsOptions = Pick<
143143
ChunkedBatchOptions,
144-
'indexName' | 'objects'
144+
'indexName' | 'objects' | 'waitForTasks'
145145
> & {
146146
/**
147147
*To be provided if non-existing objects are passed, otherwise, the call will fail.

0 commit comments

Comments
 (0)