Skip to content

Commit fdbd9a2

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 41b0ab9 commit fdbd9a2

File tree

1 file changed

+46
-2
lines changed

1 file changed

+46
-2
lines changed

algoliasearch/ingestion/client.py

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3459,6 +3459,12 @@ async def push_task_with_http_info(
34593459
],
34603460
dict[str, Any],
34613461
],
3462+
watch: Annotated[
3463+
Optional[StrictBool],
3464+
Field(
3465+
description="When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding."
3466+
),
3467+
] = None,
34623468
request_options: Optional[Union[dict, RequestOptions]] = None,
34633469
) -> ApiResponse[str]:
34643470
"""
@@ -3473,6 +3479,8 @@ async def push_task_with_http_info(
34733479
:type task_id: str
34743480
:param push_task_payload: Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
34753481
:type push_task_payload: PushTaskPayload
3482+
:param watch: When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
3483+
:type watch: bool
34763484
:param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
34773485
:return: Returns the raw algoliasearch 'APIResponse' object.
34783486
"""
@@ -3487,6 +3495,11 @@ async def push_task_with_http_info(
34873495
"Parameter `push_task_payload` is required when calling `push_task`."
34883496
)
34893497

3498+
_query_parameters: Dict[str, Any] = {}
3499+
3500+
if watch is not None:
3501+
_query_parameters["watch"] = watch
3502+
34903503
_data = {}
34913504
if push_task_payload is not None:
34923505
_data = push_task_payload
@@ -3497,6 +3510,7 @@ async def push_task_with_http_info(
34973510
"{taskID}", quote(str(task_id), safe="")
34983511
),
34993512
request_options=self._request_options.merge(
3513+
query_parameters=_query_parameters,
35003514
data=dumps(body_serializer(_data)),
35013515
user_request_options=request_options,
35023516
),
@@ -3517,6 +3531,12 @@ async def push_task(
35173531
],
35183532
dict[str, Any],
35193533
],
3534+
watch: Annotated[
3535+
Optional[StrictBool],
3536+
Field(
3537+
description="When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding."
3538+
),
3539+
] = None,
35203540
request_options: Optional[Union[dict, RequestOptions]] = None,
35213541
) -> RunResponse:
35223542
"""
@@ -3531,11 +3551,13 @@ async def push_task(
35313551
:type task_id: str
35323552
:param push_task_payload: Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
35333553
:type push_task_payload: PushTaskPayload
3554+
:param watch: When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
3555+
:type watch: bool
35343556
:param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
35353557
:return: Returns the deserialized response in a 'RunResponse' result object.
35363558
"""
35373559
resp = await self.push_task_with_http_info(
3538-
task_id, push_task_payload, request_options
3560+
task_id, push_task_payload, watch, request_options
35393561
)
35403562
return resp.deserialize(RunResponse, resp.raw_data)
35413563

@@ -8192,6 +8214,12 @@ def push_task_with_http_info(
81928214
],
81938215
dict[str, Any],
81948216
],
8217+
watch: Annotated[
8218+
Optional[StrictBool],
8219+
Field(
8220+
description="When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding."
8221+
),
8222+
] = None,
81958223
request_options: Optional[Union[dict, RequestOptions]] = None,
81968224
) -> ApiResponse[str]:
81978225
"""
@@ -8206,6 +8234,8 @@ def push_task_with_http_info(
82068234
:type task_id: str
82078235
:param push_task_payload: Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
82088236
:type push_task_payload: PushTaskPayload
8237+
:param watch: When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
8238+
:type watch: bool
82098239
:param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
82108240
:return: Returns the raw algoliasearch 'APIResponse' object.
82118241
"""
@@ -8220,6 +8250,11 @@ def push_task_with_http_info(
82208250
"Parameter `push_task_payload` is required when calling `push_task`."
82218251
)
82228252

8253+
_query_parameters: Dict[str, Any] = {}
8254+
8255+
if watch is not None:
8256+
_query_parameters["watch"] = watch
8257+
82238258
_data = {}
82248259
if push_task_payload is not None:
82258260
_data = push_task_payload
@@ -8230,6 +8265,7 @@ def push_task_with_http_info(
82308265
"{taskID}", quote(str(task_id), safe="")
82318266
),
82328267
request_options=self._request_options.merge(
8268+
query_parameters=_query_parameters,
82338269
data=dumps(body_serializer(_data)),
82348270
user_request_options=request_options,
82358271
),
@@ -8250,6 +8286,12 @@ def push_task(
82508286
],
82518287
dict[str, Any],
82528288
],
8289+
watch: Annotated[
8290+
Optional[StrictBool],
8291+
Field(
8292+
description="When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding."
8293+
),
8294+
] = None,
82538295
request_options: Optional[Union[dict, RequestOptions]] = None,
82548296
) -> RunResponse:
82558297
"""
@@ -8264,11 +8306,13 @@ def push_task(
82648306
:type task_id: str
82658307
:param push_task_payload: Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. (required)
82668308
:type push_task_payload: PushTaskPayload
8309+
:param watch: When provided, the push operation will be synchronous and the API will wait for the ingestion to be finished before responding.
8310+
:type watch: bool
82678311
:param request_options: The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)
82688312
:return: Returns the deserialized response in a 'RunResponse' result object.
82698313
"""
82708314
resp = self.push_task_with_http_info(
8271-
task_id, push_task_payload, request_options
8315+
task_id, push_task_payload, watch, request_options
82728316
)
82738317
return resp.deserialize(RunResponse, resp.raw_data)
82748318

0 commit comments

Comments
 (0)