2929from apify ._configuration import Configuration
3030from apify ._consts import EVENT_LISTENERS_TIMEOUT , ActorEnvVars , ActorExitCodes , ApifyEnvVars
3131from apify ._crypto import decrypt_input_secrets , load_private_key
32- from apify ._models import ActorRun
3332from apify ._proxy_configuration import ProxyConfiguration
3433from apify ._utils import docs_group , docs_name , ensure_context , get_system_info , is_running_in_ipython
3534from apify .events import ApifyEventManager , EventManager , LocalEventManager
4443 from types import TracebackType
4544 from typing import Self
4645
46+ from apify_client ._models import Run
4747 from crawlee ._types import JsonSerializable
4848 from crawlee .proxy_configuration import _NewUrlFunction
4949
@@ -869,7 +869,7 @@ async def start(
869869 timeout : timedelta | None | Literal ['inherit' , 'RemainingTime' ] = None ,
870870 wait_for_finish : int | None = None ,
871871 webhooks : list [Webhook ] | None = None ,
872- ) -> ActorRun :
872+ ) -> Run :
873873 """Run an Actor on the Apify platform.
874874
875875 Unlike `Actor.call`, this method just starts the run without waiting for finish.
@@ -935,7 +935,7 @@ async def start(
935935 if run is None :
936936 raise RuntimeError (f'Failed to start Actor with ID "{ actor_id } ".' )
937937
938- return ActorRun . from_client_actor_run ( run )
938+ return run
939939
940940 @_ensure_context
941941 async def abort (
@@ -945,7 +945,7 @@ async def abort(
945945 token : str | None = None ,
946946 status_message : str | None = None ,
947947 gracefully : bool | None = None ,
948- ) -> ActorRun :
948+ ) -> Run :
949949 """Abort given Actor run on the Apify platform using the current user account.
950950
951951 The user account is determined by the `APIFY_TOKEN` environment variable.
@@ -972,7 +972,7 @@ async def abort(
972972 if run is None :
973973 raise RuntimeError (f'Failed to abort Actor run with ID "{ run_id } ".' )
974974
975- return ActorRun . from_client_actor_run ( run )
975+ return run
976976
977977 @_ensure_context
978978 async def call (
@@ -988,7 +988,7 @@ async def call(
988988 webhooks : list [Webhook ] | None = None ,
989989 wait : timedelta | None = None ,
990990 logger : logging .Logger | None | Literal ['default' ] = 'default' ,
991- ) -> ActorRun | None :
991+ ) -> Run | None :
992992 """Start an Actor on the Apify Platform and wait for it to finish before returning.
993993
994994 It waits indefinitely, unless the wait argument is provided.
@@ -1059,7 +1059,7 @@ async def call(
10591059 if run is None :
10601060 raise RuntimeError (f'Failed to call Actor with ID "{ actor_id } ".' )
10611061
1062- return ActorRun . from_client_actor_run ( run )
1062+ return run
10631063
10641064 @_ensure_context
10651065 async def call_task (
@@ -1073,7 +1073,7 @@ async def call_task(
10731073 webhooks : list [Webhook ] | None = None ,
10741074 wait : timedelta | None = None ,
10751075 token : str | None = None ,
1076- ) -> ActorRun | None :
1076+ ) -> Run | None :
10771077 """Start an Actor task on the Apify Platform and wait for it to finish before returning.
10781078
10791079 It waits indefinitely, unless the wait argument is provided.
@@ -1133,7 +1133,7 @@ async def call_task(
11331133 if run is None :
11341134 raise RuntimeError (f'Failed to call Task with ID "{ task_id } ".' )
11351135
1136- return ActorRun . from_client_actor_run ( run )
1136+ return run
11371137
11381138 @_ensure_context
11391139 async def metamorph (
@@ -1292,7 +1292,7 @@ async def set_status_message(
12921292 status_message : str ,
12931293 * ,
12941294 is_terminal : bool | None = None ,
1295- ) -> ActorRun | None :
1295+ ) -> Run | None :
12961296 """Set the status message for the current Actor run.
12971297
12981298 Args:
@@ -1322,7 +1322,7 @@ async def set_status_message(
13221322 f'Failed to set status message for Actor run with ID "{ self .configuration .actor_run_id } ".'
13231323 )
13241324
1325- return ActorRun . from_client_actor_run ( run )
1325+ return run
13261326
13271327 @_ensure_context
13281328 async def create_proxy_configuration (
0 commit comments