2727from ...lib .polling import PollingConfig , poll_until
2828from ..._base_client import AsyncPaginator , make_request_options
2929from ...types .scenarios import run_list_params
30- from ...lib .polling_async import async_poll_until
3130from ...lib .cancellation import CancellationToken
31+ from ...lib .polling_async import async_poll_until
3232from ...types .scenario_run_view import ScenarioRunView
3333
3434__all__ = ["RunsResource" , "AsyncRunsResource" ]
@@ -429,6 +429,7 @@ def score_and_complete(
429429 id : str ,
430430 * ,
431431 polling_config : PollingConfig | None = None ,
432+ cancellation_token : CancellationToken | None = None ,
432433 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
433434 # The extra values given here take precedence over values defined on the client or passed to this method.
434435 extra_headers : Headers | None = None ,
@@ -441,6 +442,7 @@ def score_and_complete(
441442 Args:
442443 id: The ID of the scenario run to score, wait for, and complete
443444 polling_config: Optional polling configuration
445+ cancellation_token: Token to cancel the wait operation
444446 extra_headers: Send extra headers
445447 extra_query: Add additional query parameters to the request
446448 extra_body: Add additional JSON properties to the request
@@ -456,6 +458,7 @@ def score_and_complete(
456458 self .score_and_await (
457459 id ,
458460 polling_config = polling_config ,
461+ cancellation_token = cancellation_token ,
459462 extra_headers = extra_headers ,
460463 extra_query = extra_query ,
461464 extra_body = extra_body ,
@@ -866,6 +869,7 @@ async def score_and_complete(
866869 id : str ,
867870 * ,
868871 polling_config : PollingConfig | None = None ,
872+ cancellation_token : CancellationToken | None = None ,
869873 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
870874 # The extra values given here take precedence over values defined on the client or passed to this method.
871875 extra_headers : Headers | None = None ,
@@ -878,6 +882,7 @@ async def score_and_complete(
878882 Args:
879883 id: The ID of the scenario run to score, wait for, and complete
880884 polling_config: Optional polling configuration
885+ cancellation_token: Token to cancel the wait operation
881886 extra_headers: Send extra headers
882887 extra_query: Add additional query parameters to the request
883888 extra_body: Add additional JSON properties to the request
@@ -893,6 +898,7 @@ async def score_and_complete(
893898 await self .score_and_await (
894899 id ,
895900 polling_config = polling_config ,
901+ cancellation_token = cancellation_token ,
896902 extra_headers = extra_headers ,
897903 extra_query = extra_query ,
898904 extra_body = extra_body ,
0 commit comments