From 2eaf1fc66e77a8770ef2a52f3d7384182cc4bb18 Mon Sep 17 00:00:00 2001 From: Apify Service Account <64261774+apify-service-account@users.noreply.github.com> Date: Mon, 24 Aug 2026 12:25:58 +0200 Subject: [PATCH 1/2] chore: Regenerate models from the published OpenAPI spec --- pyproject.toml | 2 +- src/apify_client/_models.py | 36 ++++++++++++++++++--------------- src/apify_client/_typeddicts.py | 8 ++++---- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 01e15bc8..438acf8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -257,7 +257,7 @@ keep_model_order = true # workflow committing nothing unless the models changed. A local regeneration that only moves this line is that # same case - drop it rather than committing it alone. [tool.apify.openapi-spec] -version = "v2-2026-08-14T072928Z" +version = "v2-2026-08-24T085852Z" [tool.uv] # Minimal defense against supply-chain atatcks. diff --git a/src/apify_client/_models.py b/src/apify_client/_models.py index 7e39f283..f585509b 100644 --- a/src/apify_client/_models.py +++ b/src/apify_client/_models.py @@ -735,9 +735,10 @@ class CommonActorPricingInfo(BaseModel): populate_by_name=True, alias_generator=to_camel, ) - apify_margin_percentage: float + apify_margin_percentage: Annotated[float, Field(examples=[0.2])] """ - In [0, 1], fraction of pricePerUnitUsd that goes to Apify + Apify's share of the revenue generated under this pricing info record, as a fraction between 0 and 1. Set by the Apify platform. + """ created_at: AwareDatetime """ @@ -792,18 +793,6 @@ class CreateActorRequest(BaseModel): """ An array of `Version` objects. Each object represents a specific version of the Actor's source code: its location, builds, and environment configuration. """ - pricing_infos: ( - list[ - Annotated[ - PayPerEventActorPricingInfo - | PricePerDatasetItemActorPricingInfo - | FlatPricePerMonthActorPricingInfo - | FreeActorPricingInfo, - Field(discriminator='pricing_model'), - ] - ] - | None - ) = None categories: Annotated[list[str] | None, Field(examples=[['SOCIAL_MEDIA']])] = None """ A list of categories that best define the Actor. Reflected in Apify Store's search and filtering options. @@ -920,6 +909,10 @@ class CurrentPricingInfo(BaseModel): ) pricing_model: Annotated[str, Field(examples=['FREE'])] apify_margin_percentage: Annotated[float | None, Field(examples=[0.2])] = None + """ + Apify's share of the revenue generated under this pricing info record, as a fraction between 0 and 1. Set by the Apify platform. + + """ created_at: Annotated[AwareDatetime | None, Field(examples=['2023-01-01T00:00:00.000Z'])] = None started_at: Annotated[AwareDatetime | None, Field(examples=['2023-01-01T00:00:00.000Z'])] = None notified_about_change_at: Annotated[AwareDatetime | None, Field(examples=[None])] = None @@ -2430,11 +2423,11 @@ class RequestBase(BaseModel): populate_by_name=True, alias_generator=to_camel, ) - unique_key: Annotated[str | None, Field(examples=['GET|60d83e70|e3b0c442|https://apify.com'])] = None + unique_key: Annotated[str, Field(examples=['GET|60d83e70|e3b0c442|https://apify.com'])] """ A unique key used for request de-duplication. Requests with the same unique key are considered identical. """ - url: Annotated[str | None, Field(examples=['https://apify.com'])] = None + url: Annotated[str, Field(examples=['https://apify.com'])] """ The URL of the request. """ @@ -2838,6 +2831,17 @@ class RequestUserData(BaseModel): ) +@docs_group('Models') +class RequestWithoutId(RequestBase): + """A request stored in the request queue, including its metadata and processing state, without the assigned ID.""" + + model_config = ConfigDict( + extra='allow', + populate_by_name=True, + alias_generator=to_camel, + ) + + @docs_group('Models') class Run(BaseModel): """Represents an Actor run and its associated data.""" diff --git a/src/apify_client/_typeddicts.py b/src/apify_client/_typeddicts.py index adbad385..ec967615 100644 --- a/src/apify_client/_typeddicts.py +++ b/src/apify_client/_typeddicts.py @@ -9,11 +9,11 @@ @docs_group('Typed dicts') class RequestBaseDict(TypedDict): - unique_key: NotRequired[str] + unique_key: str """ A unique key used for request de-duplication. Requests with the same unique key are considered identical. """ - url: NotRequired[str] + url: str """ The URL of the request. """ @@ -51,11 +51,11 @@ class RequestBaseDict(TypedDict): @docs_group('Typed dicts') class RequestBaseCamelDict(TypedDict): - uniqueKey: NotRequired[str] + uniqueKey: str """ A unique key used for request de-duplication. Requests with the same unique key are considered identical. """ - url: NotRequired[str] + url: str """ The URL of the request. """ From 1f7a05781fca7285c97e68691d90ee04ff2a2bd5 Mon Sep 17 00:00:00 2001 From: Vlada Dusek Date: Mon, 24 Aug 2026 12:46:25 +0200 Subject: [PATCH 2/2] revert: drop actor pricing model changes from this regeneration Splits this PR down to the request-queue changes only. The pricing_infos and apify_margin_percentage changes are unrelated and will come back as their own PR on the next model-sync run. --- src/apify_client/_models.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/apify_client/_models.py b/src/apify_client/_models.py index f585509b..33c0ce63 100644 --- a/src/apify_client/_models.py +++ b/src/apify_client/_models.py @@ -735,10 +735,9 @@ class CommonActorPricingInfo(BaseModel): populate_by_name=True, alias_generator=to_camel, ) - apify_margin_percentage: Annotated[float, Field(examples=[0.2])] + apify_margin_percentage: float """ - Apify's share of the revenue generated under this pricing info record, as a fraction between 0 and 1. Set by the Apify platform. - + In [0, 1], fraction of pricePerUnitUsd that goes to Apify """ created_at: AwareDatetime """ @@ -793,6 +792,18 @@ class CreateActorRequest(BaseModel): """ An array of `Version` objects. Each object represents a specific version of the Actor's source code: its location, builds, and environment configuration. """ + pricing_infos: ( + list[ + Annotated[ + PayPerEventActorPricingInfo + | PricePerDatasetItemActorPricingInfo + | FlatPricePerMonthActorPricingInfo + | FreeActorPricingInfo, + Field(discriminator='pricing_model'), + ] + ] + | None + ) = None categories: Annotated[list[str] | None, Field(examples=[['SOCIAL_MEDIA']])] = None """ A list of categories that best define the Actor. Reflected in Apify Store's search and filtering options. @@ -909,10 +920,6 @@ class CurrentPricingInfo(BaseModel): ) pricing_model: Annotated[str, Field(examples=['FREE'])] apify_margin_percentage: Annotated[float | None, Field(examples=[0.2])] = None - """ - Apify's share of the revenue generated under this pricing info record, as a fraction between 0 and 1. Set by the Apify platform. - - """ created_at: Annotated[AwareDatetime | None, Field(examples=['2023-01-01T00:00:00.000Z'])] = None started_at: Annotated[AwareDatetime | None, Field(examples=['2023-01-01T00:00:00.000Z'])] = None notified_about_change_at: Annotated[AwareDatetime | None, Field(examples=[None])] = None