Skip to content

Commit ef3bdb3

Browse files
committed
Update
1 parent 74aa17d commit ef3bdb3

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

src/apify_client/_models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: openapi.json
3-
# timestamp: 2026-01-02T15:04:48+00:00
3+
# timestamp: 2026-01-03T09:11:13+00:00
44

55
from __future__ import annotations
66

@@ -478,15 +478,15 @@ class Storages(BaseModel):
478478
class ActorDefinition(BaseModel):
479479
"""The definition of the Actor, the full specification of this field can be found in [Apify docs](https://docs.apify.com/platform/actors/development/actor-definition/actor-json)"""
480480

481-
actor_specification: Annotated[ActorSpecification, Field(alias='actorSpecification')]
481+
actor_specification: Annotated[ActorSpecification | None, Field(alias='actorSpecification')] = None
482482
"""
483483
The Actor specification version that this Actor follows. This property must be set to 1.
484484
"""
485-
name: str
485+
name: str | None = None
486486
"""
487487
The name of the Actor.
488488
"""
489-
version: Annotated[str, Field(pattern='^[0-9]+\\\\.[0-9]+$')]
489+
version: Annotated[str | None, Field(pattern='^[0-9]+\\\\.[0-9]+$')] = None
490490
"""
491491
The version of the Actor, specified in the format [Number].[Number], e.g., 0.1, 1.0.
492492
"""

src/apify_client/_resource_clients/run.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def metamorph(
160160
)
161161

162162
data = response_to_dict(response)
163-
return Run.model_validate(data)
163+
return RunResponse.model_validate(data).data
164164

165165
def resurrect(
166166
self,
@@ -212,7 +212,7 @@ def resurrect(
212212
)
213213

214214
data = response_to_dict(response)
215-
return Run.model_validate(data)
215+
return RunResponse.model_validate(data).data
216216

217217
def reboot(self) -> Run:
218218
"""Reboot an Actor run. Only runs that are running, i.e. runs with status RUNNING can be rebooted.
@@ -227,7 +227,7 @@ def reboot(self) -> Run:
227227
method='POST',
228228
)
229229
data = response_to_dict(response)
230-
return Run.model_validate(data)
230+
return RunResponse.model_validate(data).data
231231

232232
def dataset(self) -> DatasetClient:
233233
"""Get the client for the default dataset of the Actor run.
@@ -385,7 +385,11 @@ async def get(self) -> Run | None:
385385
The retrieved Actor run data.
386386
"""
387387
result = await self._get()
388-
return RunResponse.model_validate(result).data if result is not None else None
388+
389+
if result is None:
390+
return None
391+
392+
return RunResponse.model_validate(result).data
389393

390394
async def update(
391395
self,
@@ -492,7 +496,7 @@ async def metamorph(
492496
)
493497

494498
data = response_to_dict(response)
495-
return Run.model_validate(data)
499+
return RunResponse.model_validate(data).data
496500

497501
async def resurrect(
498502
self,
@@ -544,7 +548,7 @@ async def resurrect(
544548
)
545549

546550
data = response_to_dict(response)
547-
return Run.model_validate(data)
551+
return RunResponse.model_validate(data).data
548552

549553
async def reboot(self) -> Run:
550554
"""Reboot an Actor run. Only runs that are running, i.e. runs with status RUNNING can be rebooted.
@@ -559,7 +563,7 @@ async def reboot(self) -> Run:
559563
method='POST',
560564
)
561565
data = response_to_dict(response)
562-
return Run.model_validate(data)
566+
return RunResponse.model_validate(data).data
563567

564568
def dataset(self) -> DatasetClientAsync:
565569
"""Get the client for the default dataset of the Actor run.

0 commit comments

Comments
 (0)