diff --git a/algoliasearch/Clients/IngestionClient.cs b/algoliasearch/Clients/IngestionClient.cs index 474dc4f6..350509c6 100644 --- a/algoliasearch/Clients/IngestionClient.cs +++ b/algoliasearch/Clients/IngestionClient.cs @@ -1275,13 +1275,14 @@ public interface IIngestionClient /// - editSettings /// Unique identifier of a task. /// Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. + /// When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint /// Task of RunResponse - Task PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, RequestOptions options = null, CancellationToken cancellationToken = default); + Task PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// /// Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints. (Synchronous version) @@ -1293,13 +1294,14 @@ public interface IIngestionClient /// - editSettings /// Unique identifier of a task. /// Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. + /// When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding. (optional) /// Add extra http header or query parameters to Algolia. /// Cancellation Token to cancel the request. /// Thrown when arguments are not correct /// Thrown when the API call was rejected by Algolia /// Thrown when the client failed to call the endpoint /// RunResponse - RunResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, RequestOptions options = null, CancellationToken cancellationToken = default); + RunResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default); /// /// Runs all tasks linked to a source, only available for Shopify sources. It will create 1 run per task. @@ -2802,7 +2804,7 @@ public ListTransformationsResponse ListTransformations(int? itemsPerPage = defau /// - public async Task PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, RequestOptions options = null, CancellationToken cancellationToken = default) + public async Task PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default) { if (taskID == null) @@ -2816,14 +2818,15 @@ public async Task PushTaskAsync(string taskID, PushTaskPayload push requestOptions.PathParameters.Add("taskID", QueryStringHelper.ParameterToString(taskID)); + requestOptions.AddQueryParameter("watch", watch); requestOptions.Data = pushTaskPayload; return await _transport.ExecuteRequestAsync(new HttpMethod("POST"), "/2/tasks/{taskID}/push", requestOptions, cancellationToken).ConfigureAwait(false); } /// - public RunResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, RequestOptions options = null, CancellationToken cancellationToken = default) => - AsyncHelper.RunSync(() => PushTaskAsync(taskID, pushTaskPayload, options, cancellationToken)); + public RunResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default) => + AsyncHelper.RunSync(() => PushTaskAsync(taskID, pushTaskPayload, watch, options, cancellationToken)); ///