Skip to content

Commit a098dd5

Browse files
fix: Loosen StoreListActor.picture_url to str and add new API error type (#1038)
Regenerates the Pydantic models, TypedDicts, and literal aliases from the [published OpenAPI specification](https://docs.apify.com/api/openapi.json) (`v2-2026-08-24T085852Z` -> `v2-2026-08-27T071624Z`), picking up the spec fixes from apify/apify-docs#2859. - `StoreListActor.picture_url` is now `str | None` instead of `AnyUrl | None`. The API doesn't guarantee an RFC 3986 URI here - legacy Actors can carry an empty or malformed `pictureUrl` - so such Store items no longer fail validation. - `ErrorType` gains `cannot-publish-actor-task`, returned with 400 by `POST /v2/actor-tasks` and `PUT /v2/actor-tasks/{actorTaskId}`. - `ActorNotice` gains a `NONE_TYPE_NONE = None` member. The spec now lists `null` in the enum (the API does return `notice: null`); since the field is typed `ActorNotice | None`, `None` still validates to plain `None`, so this is cosmetic. *✍️ Drafted by Claude Code*
1 parent 79e205b commit a098dd5

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ keep_model_order = true
258258
# workflow committing nothing unless the models changed. A local regeneration that only moves this line is that
259259
# same case - drop it rather than committing it alone.
260260
[tool.apify.openapi-spec]
261-
version = "v2-2026-08-24T085852Z"
261+
version = "v2-2026-08-27T071624Z"
262262

263263
[tool.uv]
264264
# Minimal defense against supply-chain atatcks.

‎src/apify_client/_literals.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
'cannot-override-paid-actor-trial',
100100
'cannot-permanently-delete-subscription',
101101
'cannot-publish-actor',
102+
'cannot-publish-actor-task',
102103
'cannot-reduce-last-full-token',
103104
'cannot-reimburse-more-than-original-charge',
104105
'cannot-reimburse-non-rental-charge',

‎src/apify_client/_models.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ class ActorNotice(Enum):
295295
NONE = 'NONE'
296296
RESIDENTIAL_PROXY_REQUIRED = 'RESIDENTIAL_PROXY_REQUIRED'
297297
UNDER_MAINTENANCE = 'UNDER_MAINTENANCE'
298+
NONE_TYPE_NONE = None
298299

299300

300301
@docs_group('Models')
@@ -3437,7 +3438,7 @@ class StoreListActor(BaseModel):
34373438
description: Annotated[str | None, Field(examples=['My public actor!'])] = None
34383439
categories: Annotated[list[str] | None, Field(examples=[['MARKETING', 'LEAD_GENERATION']])] = None
34393440
notice: ActorNotice | None = None
3440-
picture_url: Annotated[AnyUrl | None, Field(examples=['https://...'])] = None
3441+
picture_url: Annotated[str | None, Field(examples=['https://...'])] = None
34413442
user_picture_url: Annotated[AnyUrl | None, Field(examples=['https://...'])] = None
34423443
url: Annotated[AnyUrl | None, Field(examples=['https://...'])] = None
34433444
stats: ActorStats

0 commit comments

Comments
 (0)