Skip to content

Commit a94d78a

Browse files
fix: add new error types and drop rental pricing fields from CurrentPricingInfo (#1156)
1 parent ed76532 commit a94d78a

3 files changed

Lines changed: 26 additions & 9 deletions

File tree

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ keep_model_order = true
251251
# workflow committing nothing unless the models changed. A local regeneration that only moves this line is that
252252
# same case - drop it rather than committing it alone.
253253
[tool.apify.openapi-spec]
254-
version = "v2-2026-10-08T073338Z"
254+
version = "v2-2026-10-20T095308Z"
255255

256256
[tool.uv]
257257
# Minimal defense against supply-chain atatcks.

‎src/apify_client/_literals.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@
160160
'final-invoice-negative',
161161
'full-permission-actor-blocked-for-admin',
162162
'full-permission-actor-not-approved',
163+
'full-permissions-require-verified-owner',
163164
'github-branch-empty',
164165
'github-issue-already-exists',
165166
'github-public-key-not-found',
@@ -176,6 +177,7 @@
176177
'input-json-not-object',
177178
'input-json-too-long',
178179
'input-update-collision',
180+
'input-validation-timed-out',
179181
'insufficient-permissions',
180182
'insufficient-permissions-to-change-field',
181183
'insufficient-security-measures',
@@ -247,6 +249,7 @@
247249
'max-metamorphs-exceeded',
248250
'max-total-charge-usd-below-minimum',
249251
'max-total-charge-usd-must-be-greater-than-zero',
252+
'mcp-connector-actor-not-allowed',
250253
'method-not-allowed',
251254
'migration-disabled',
252255
'missing-actor-rights',
@@ -261,6 +264,7 @@
261264
'missing-settings',
262265
'missing-username',
263266
'monthly-usage-limit-too-low',
267+
'more-public-actors-require-verified-owner',
264268
'more-than-one-update-not-allowed',
265269
'multiple-records-found',
266270
'must-be-admin',
@@ -313,6 +317,7 @@
313317
'query-timeout',
314318
'quoted-price-outdated',
315319
'rate-limit-exceeded',
320+
'readme-required',
316321
'recaptcha-invalid',
317322
'recaptcha-required',
318323
'record-not-found',
@@ -341,11 +346,13 @@
341346
'schema-validation',
342347
'schema-validation-error',
343348
'schema-validation-failed',
349+
'schemas-required',
344350
'service-worker-registration-not-allowed',
345351
'sign-up-method-not-allowed',
346352
'slack-integration-not-custom',
347353
'socket-closed',
348354
'socket-destroyed',
355+
'standby-deployment-invalid',
349356
'store-schema-invalid',
350357
'store-terms-not-accepted',
351358
'stripe-enabled',
@@ -367,6 +374,8 @@
367374
'too-many-mcp-connectors',
368375
'too-many-o-auth-apps',
369376
'too-many-organizations',
377+
'too-many-public-actor-tasks-per-account',
378+
'too-many-public-actor-tasks-per-actor',
370379
'too-many-requests',
371380
'too-many-schedules',
372381
'too-many-ui-access-keys',

‎src/apify_client/_models.py‎

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class ActVersion(BaseModel):
5757
)
5858
source_type: VersionSourceType | None = None
5959
build_tag: Annotated[str | None, Field(examples=['experimental'])] = None
60+
"""
61+
The build tag of the Actor version this build was created from. Can be `null` when the version has no build tag, in which case the build is tagged on success only if the `tag` parameter was passed when starting it.
62+
"""
6063
version_number: Annotated[
6164
str | None, Field(examples=['0.0'], pattern='^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])$')
6265
] = None
@@ -260,6 +263,9 @@ class ActorResource(BaseModel):
260263
]
261264
| None
262265
) = None
266+
"""
267+
The Actor's pricing records, including past ones.
268+
"""
263269
default_run_options: DefaultRunOptions
264270
example_run_input: ExampleRunInput | None = None
265271
is_deprecated: Annotated[bool | None, Field(examples=[False])] = None
@@ -947,9 +953,6 @@ class CurrentPricingInfo(BaseModel):
947953
bool | None, Field(alias='isPPEPlatformUsagePaidByUser', examples=[False])
948954
] = None
949955
reason_for_change: Annotated[str | None, Field(examples=[None])] = None
950-
trial_minutes: Annotated[int | None, Field(examples=[None])] = None
951-
unit_name: Annotated[str | None, Field(examples=[None])] = None
952-
price_per_unit_usd: Annotated[float | None, Field(examples=[None])] = None
953956
minimal_max_total_charge_usd: Annotated[float | None, Field(examples=[0.5])] = None
954957
pricing_per_event: dict[str, Any] | None = None
955958
"""
@@ -1495,6 +1498,8 @@ class ExampleRunInput(BaseModel):
14951498

14961499
@docs_group('Models')
14971500
class FlatPricePerMonthActorPricingInfo(CommonActorPricingInfo):
1501+
"""Rental pricing model, which is no longer supported."""
1502+
14981503
model_config = ConfigDict(
14991504
extra='allow',
15001505
populate_by_name=True,
@@ -1503,11 +1508,11 @@ class FlatPricePerMonthActorPricingInfo(CommonActorPricingInfo):
15031508
pricing_model: Literal['FLAT_PRICE_PER_MONTH']
15041509
trial_minutes: int
15051510
"""
1506-
For how long this Actor can be used for free in trial period
1511+
Number of minutes a user could run the Actor for free before having to rent it. Apify no longer offers rental pricing, so you can see this field only in pricing history and in runs started before rented Actors moved to other pricing models.
15071512
"""
15081513
price_per_unit_usd: float
15091514
"""
1510-
Monthly flat price in USD
1515+
Monthly flat price in USD. Apify no longer offers rental pricing, so you can see this field only in pricing history and in runs started before rented Actors moved to other pricing models.
15111516
"""
15121517

15131518

@@ -2901,11 +2906,11 @@ class Run(BaseModel):
29012906
"""
29022907
usage_total_usd: Annotated[float | None, Field(examples=[0.2654])] = None
29032908
"""
2904-
Total cost in USD for this run. Represents what you actually pay. For run owners: includes platform usage (compute units) and/or event costs depending on the Actor's pricing model. For run non-owners: only available for Pay-Per-Event Actors (event costs only). Requires authentication token to access.
2909+
Total cost in USD for this run. Represents what you actually pay. For run owners: includes platform usage (compute units) and/or event costs depending on the Actor's pricing model. For run non-owners: only available for pay-per-event Actors (event costs only). Requires authentication token to access.
29052910
"""
29062911
usage_usd: RunUsageUsd | None = None
29072912
"""
2908-
Platform usage costs breakdown in USD. Only present if you own the run AND are paying for platform usage (Pay-Per-Usage, Rental, or Pay-Per-Event with usage costs like standby Actors). Not available for standard Pay-Per-Event Actors. Requires authentication token to access.
2913+
Platform usage costs breakdown in USD. Only present if you own the run and are paying for platform usage (pay-per-usage or pay-per-event with usage costs like Standby Actors). Not available for standard pay-per-event Actors. Requires authentication token to access.
29092914
"""
29102915
metamorphs: list[RunMetamorphEvent] | None = None
29112916
"""
@@ -3518,7 +3523,7 @@ class TaskPublicConfig(BaseModel):
35183523
"""
35193524
Time when the task was published, or `null` if the task isn't published.
35203525
This field is server-controlled. To publish or unpublish a task, use the
3521-
[Update task](https://docs.apify.com/api/v2/actor-task-put) endpoint and set `isPublic`.
3526+
[Update Actor task](https://docs.apify.com/api/v2/actor-task-put) endpoint and set `isPublic`.
35223527
35233528
"""
35243529
seo_title: Annotated[str | None, Field(examples=['Scrape data from a website'], max_length=60)] = None
@@ -3706,6 +3711,9 @@ class UpdateActorRequest(BaseModel):
37063711
]
37073712
| None
37083713
) = None
3714+
"""
3715+
The Actor's pricing records. You can't add the `FLAT_PRICE_PER_MONTH` or `PRICE_PER_DATASET_ITEM` records, because these pricing models are no longer supported.
3716+
"""
37093717
categories: Annotated[list[str] | None, Field(examples=[['SOCIAL_MEDIA']])] = None
37103718
"""
37113719
A list of categories that best define the Actor. Reflected in Apify Store's search and filtering options.

0 commit comments

Comments
 (0)