diff --git a/src/apify_client/_models.py b/src/apify_client/_models.py index 40cf6311..417422de 100644 --- a/src/apify_client/_models.py +++ b/src/apify_client/_models.py @@ -2293,11 +2293,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. """ @@ -2701,6 +2701,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 46854805..79444054 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. """