Skip to content

Commit 7becbcf

Browse files
feat(specs): add watch to pushTask ingestion (generated)
algolia/api-clients-automation#4224 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 412fedf commit 7becbcf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

client/src/commonMain/kotlin/com/algolia/client/api/IngestionClient.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,13 +922,17 @@ public class IngestionClient(
922922
* - editSettings
923923
* @param taskID Unique identifier of a task.
924924
* @param pushTaskPayload Request body of a Search API `batch` request that will be pushed in the Connectors pipeline.
925+
* @param watch When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
925926
* @param requestOptions additional request configuration.
926927
*/
927-
public suspend fun pushTask(taskID: String, pushTaskPayload: PushTaskPayload, requestOptions: RequestOptions? = null): RunResponse {
928+
public suspend fun pushTask(taskID: String, pushTaskPayload: PushTaskPayload, watch: Boolean? = null, requestOptions: RequestOptions? = null): RunResponse {
928929
require(taskID.isNotBlank()) { "Parameter `taskID` is required when calling `pushTask`." }
929930
val requestConfig = RequestConfig(
930931
method = RequestMethod.POST,
931932
path = listOf("2", "tasks", "$taskID", "push"),
933+
query = buildMap {
934+
watch?.let { put("watch", it) }
935+
},
932936
body = pushTaskPayload,
933937
)
934938
return requester.execute(

0 commit comments

Comments
 (0)