@@ -2422,16 +2422,20 @@ open class IngestionClient {
24222422 /// - parameter taskID: (path) Unique identifier of a task.
24232423 /// - parameter pushTaskPayload: (body) Request body of a Search API `batch` request that will be pushed in the
24242424 /// Connectors pipeline.
2425+ /// - parameter watch: (query) When provided, the push operation will be synchronous and the API will wait for the
2426+ /// ingestion to be finished before responding. (optional)
24252427 /// - returns: RunResponse
24262428 @available ( macOS 10 . 15 , iOS 13 . 0 , tvOS 13 . 0 , watchOS 6 . 0 , * )
24272429 open func pushTask(
24282430 taskID: String ,
24292431 pushTaskPayload: PushTaskPayload ,
2432+ watch: Bool ? = nil ,
24302433 requestOptions: RequestOptions ? = nil
24312434 ) async throws -> RunResponse {
24322435 let response : Response < RunResponse > = try await pushTaskWithHTTPInfo (
24332436 taskID: taskID,
24342437 pushTaskPayload: pushTaskPayload,
2438+ watch: watch,
24352439 requestOptions: requestOptions
24362440 )
24372441
@@ -2453,11 +2457,15 @@ open class IngestionClient {
24532457 //
24542458 // - parameter pushTaskPayload: (body) Request body of a Search API `batch` request that will be pushed in the
24552459 // Connectors pipeline.
2460+ //
2461+ // - parameter watch: (query) When provided, the push operation will be synchronous and the API will wait for the
2462+ // ingestion to be finished before responding. (optional)
24562463 // - returns: RequestBuilder<RunResponse>
24572464
24582465 open func pushTaskWithHTTPInfo(
24592466 taskID: String ,
24602467 pushTaskPayload: PushTaskPayload ,
2468+ watch: Bool ? = nil ,
24612469 requestOptions userRequestOptions: RequestOptions ? = nil
24622470 ) async throws -> Response < RunResponse > {
24632471 guard !taskID. isEmpty else {
@@ -2475,7 +2483,9 @@ open class IngestionClient {
24752483 range: nil
24762484 )
24772485 let body = pushTaskPayload
2478- let queryParameters : [ String : Any ? ] ? = nil
2486+ let queryParameters : [ String : Any ? ] = [
2487+ " watch " : watch? . encodeToJSON ( ) ,
2488+ ]
24792489
24802490 let nillableHeaders : [ String : Any ? ] ? = nil
24812491
0 commit comments