@@ -2422,16 +2422,20 @@ open class IngestionClient {
2422
2422
/// - parameter taskID: (path) Unique identifier of a task.
2423
2423
/// - parameter pushTaskPayload: (body) Request body of a Search API `batch` request that will be pushed in the
2424
2424
/// 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)
2425
2427
/// - returns: RunResponse
2426
2428
@available ( macOS 10 . 15 , iOS 13 . 0 , tvOS 13 . 0 , watchOS 6 . 0 , * )
2427
2429
open func pushTask(
2428
2430
taskID: String ,
2429
2431
pushTaskPayload: PushTaskPayload ,
2432
+ watch: Bool ? = nil ,
2430
2433
requestOptions: RequestOptions ? = nil
2431
2434
) async throws -> RunResponse {
2432
2435
let response : Response < RunResponse > = try await pushTaskWithHTTPInfo (
2433
2436
taskID: taskID,
2434
2437
pushTaskPayload: pushTaskPayload,
2438
+ watch: watch,
2435
2439
requestOptions: requestOptions
2436
2440
)
2437
2441
@@ -2453,11 +2457,15 @@ open class IngestionClient {
2453
2457
//
2454
2458
// - parameter pushTaskPayload: (body) Request body of a Search API `batch` request that will be pushed in the
2455
2459
// 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)
2456
2463
// - returns: RequestBuilder<RunResponse>
2457
2464
2458
2465
open func pushTaskWithHTTPInfo(
2459
2466
taskID: String ,
2460
2467
pushTaskPayload: PushTaskPayload ,
2468
+ watch: Bool ? = nil ,
2461
2469
requestOptions userRequestOptions: RequestOptions ? = nil
2462
2470
) async throws -> Response < RunResponse > {
2463
2471
guard !taskID. isEmpty else {
@@ -2475,7 +2483,9 @@ open class IngestionClient {
2475
2483
range: nil
2476
2484
)
2477
2485
let body = pushTaskPayload
2478
- let queryParameters : [ String : Any ? ] ? = nil
2486
+ let queryParameters : [ String : Any ? ] = [
2487
+ " watch " : watch? . encodeToJSON ( ) ,
2488
+ ]
2479
2489
2480
2490
let nillableHeaders : [ String : Any ? ] ? = nil
2481
2491
0 commit comments