Skip to content

Commit f9cb518

Browse files
update generated models from apify-docs PR #2841
1 parent 8713d82 commit f9cb518

1 file changed

Lines changed: 141 additions & 14 deletions

File tree

src/apify_client/_models.py

Lines changed: 141 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from enum import Enum
56
from typing import Annotated, Any, Literal
67

78
from pydantic import AnyUrl, AwareDatetime, BaseModel, ConfigDict, EmailStr, Field, RootModel
@@ -68,17 +69,44 @@ class Actor(BaseModel):
6869
alias_generator=to_camel,
6970
)
7071
id: Annotated[str, Field(examples=['zdc3Pyhyz3m8vjDeM'])]
72+
"""
73+
The ID of the Actor.
74+
"""
7175
user_id: Annotated[str, Field(examples=['wRsJZtadYvn4mBZmm'])]
72-
name: Annotated[str, Field(examples=['MyActor'])]
73-
username: Annotated[str, Field(examples=['jane35'])]
74-
description: Annotated[str | None, Field(examples=['My favourite actor!'])] = None
76+
"""
77+
The ID of the user who owns the Actor.
78+
"""
79+
name: Annotated[str, Field(examples=['google-search-extractor'])]
80+
"""
81+
The name of the Actor.
82+
"""
83+
username: Annotated[str, Field(examples=['compass'])]
84+
"""
85+
The username of the Actor owner.
86+
"""
87+
description: Annotated[str | None, Field(examples=['Extract data from hundreds of places fast.'])] = None
88+
"""
89+
Short description of the Actor, displayed in Apify Store and Console.
90+
"""
7591
restart_on_error: Annotated[bool | None, Field(deprecated=True, examples=[False])] = None
7692
is_public: Annotated[bool, Field(examples=[False])]
93+
"""
94+
Whether the Actor is available to users in Apify Store.
95+
"""
7796
actor_permission_level: ActorPermissionLevel | None = None
7897
created_at: Annotated[AwareDatetime, Field(examples=['2019-07-08T11:27:57.401Z'])]
98+
"""
99+
The date and time the Actor was created.
100+
"""
79101
modified_at: Annotated[AwareDatetime, Field(examples=['2019-07-08T14:01:05.546Z'])]
102+
"""
103+
The date and time the Actor was last modified.
104+
"""
80105
stats: ActorStats
81106
versions: list[Version]
107+
"""
108+
An array of `Version` objects. Each object represents a specific version of the Actor's source code: its location, builds, and environment configuration.
109+
"""
82110
pricing_infos: (
83111
list[
84112
Annotated[
@@ -94,28 +122,66 @@ class Actor(BaseModel):
94122
default_run_options: DefaultRunOptions
95123
example_run_input: ExampleRunInput | None = None
96124
is_deprecated: Annotated[bool | None, Field(examples=[False])] = None
125+
"""
126+
Whether the Actor is deprecated.
127+
"""
97128
deployment_key: Annotated[str | None, Field(examples=['ssh-rsa AAAA ...'])] = None
98-
title: Annotated[str | None, Field(examples=['My Actor'])] = None
129+
"""
130+
The Actor's public SSH key, used as a deployment key for private Git repositories.
131+
"""
132+
title: Annotated[str | None, Field(examples=['Google Search Extractor'])] = None
133+
"""
134+
Human-readable name of the Actor, displayed in Apify Store and Console.
135+
"""
99136
tagged_builds: dict[str, TaggedBuildInfo | None] | None = None
100137
actor_standby: ActorStandby | None = None
101138
readme_summary: str | None = None
102139
"""
103-
A brief, LLM-generated readme summary
140+
An AI-generated Markdown summary of the Actor's README, optimized for search and AI agents. Contains an overview and a list of use cases. Generated only for public Actors.
104141
"""
105142
seo_title: Annotated[str | None, Field(examples=['Web Scraper'])] = None
143+
"""
144+
Name of the Actor to display by search engines such as Google. Can be different from the Actor's name displayed in Apify Store and Console.
145+
"""
106146
seo_description: Annotated[
107147
str | None, Field(examples=['Crawls websites using Chrome and extracts data from pages using JavaScript.'])
108148
] = None
149+
"""
150+
Description of the Actor to display by search engines such as Google.
151+
"""
109152
picture_url: Annotated[
110153
str | None, Field(examples=['https://apify-image-uploads-prod.s3.amazonaws.com/.../actor-picture.png'])
111154
] = None
112-
standby_url: Annotated[str | None, Field(examples=['https://my-actor.apify.actor'])] = None
113-
notice: Annotated[str | None, Field(examples=['NONE'])] = None
155+
"""
156+
URL of the Actor's icon, displayed on the Actor's page in Apify Store and Console.
157+
"""
158+
standby_url: Annotated[str | None, Field(examples=['https://jane35--my-actor.apify.actor'])] = None
159+
"""
160+
URL for sending requests to the Actor in Standby mode.
161+
`null` if the Standby mode isn't enabled.
162+
163+
"""
164+
notice: ActorNotice | None = None
114165
categories: Annotated[list[str] | None, Field(examples=[['DEVELOPER_TOOLS', 'OPEN_SOURCE']])] = None
166+
"""
167+
A list of categories that best define the Actor. Reflected in Apify Store's search and filtering options.
168+
"""
115169
is_critical: Annotated[bool | None, Field(examples=[False])] = None
170+
"""
171+
Whether the Actor is maintained by Apify.
172+
"""
116173
is_generic: Annotated[bool | None, Field(examples=[False])] = None
117-
is_source_code_hidden: Annotated[bool | None, Field(examples=[False])] = None
174+
"""
175+
Whether the Actor is intended for developers. Set by Apify.
176+
"""
177+
is_source_code_hidden: Annotated[bool | None, Field(examples=[True])] = True
178+
"""
179+
Whether the Actor's source files are hidden on its detail page.
180+
"""
118181
has_no_dataset: Annotated[bool | None, Field(examples=[False])] = None
182+
"""
183+
Whether the Actor stores results in a dataset. Set by Apify.
184+
"""
119185

120186

121187
@docs_group('Models')
@@ -222,6 +288,15 @@ class ActorDefinition(BaseModel):
222288
"""
223289

224290

291+
@docs_group('Models')
292+
class ActorNotice(Enum):
293+
"""A warning displayed on the Actor's page in Apify Store and Console. Can be set by the Actor's developer or automatically by Apify's quality checks."""
294+
295+
NONE = 'NONE'
296+
RESIDENTIAL_PROXY_REQUIRED = 'RESIDENTIAL_PROXY_REQUIRED'
297+
UNDER_MAINTENANCE = 'UNDER_MAINTENANCE'
298+
299+
225300
@docs_group('Models')
226301
class ActorResponse(BaseModel):
227302
"""Response containing Actor data."""
@@ -293,25 +368,62 @@ class ActorStandby(BaseModel):
293368

294369
@docs_group('Models')
295370
class ActorStats(BaseModel):
371+
"""Usage statistics and Apify Store metrics for the Actor."""
372+
296373
model_config = ConfigDict(
297374
extra='allow',
298375
populate_by_name=True,
299376
alias_generator=to_camel,
300377
)
301378
total_builds: Annotated[int | None, Field(examples=[9])] = None
379+
"""
380+
The total number of builds of the Actor.
381+
"""
302382
total_runs: Annotated[int | None, Field(examples=[16])] = None
383+
"""
384+
The total number of runs of the Actor.
385+
"""
303386
total_users: Annotated[int | None, Field(examples=[6])] = None
387+
"""
388+
The total number of Actor users, including its owner.
389+
"""
304390
total_users7_days: Annotated[int | None, Field(examples=[2])] = None
391+
"""
392+
The number of active users of the Actor in the last 7 days.
393+
"""
305394
total_users30_days: Annotated[int | None, Field(examples=[6])] = None
395+
"""
396+
The number of active users of the Actor in the last 30 days.
397+
"""
306398
total_users90_days: Annotated[int | None, Field(examples=[6])] = None
399+
"""
400+
The number of active users of the Actor in the last 90 days.
401+
"""
307402
total_metamorphs: Annotated[int | None, Field(examples=[2])] = None
403+
"""
404+
The total number of times a run of another Actor was [metamorphed](https://docs.apify.com/platform/actors/development/programming-interface/metamorph) into this Actor.
405+
"""
308406
last_run_started_at: Annotated[AwareDatetime | None, Field(examples=['2019-07-08T14:01:05.546Z'])] = None
407+
"""
408+
The date and time the most recent run of the Actor started.
409+
"""
309410
actor_review_count: Annotated[int | None, Field(examples=[69])] = None
411+
"""
412+
The number of reviews the Actor has received in Apify Store.
413+
"""
310414
actor_review_rating: Annotated[float | None, Field(examples=[4.7])] = None
415+
"""
416+
The average rating of the Actor in Apify Store.
417+
"""
311418
bookmark_count: Annotated[int | None, Field(examples=[1269])] = None
419+
"""
420+
The number of users who bookmarked the Actor in Apify Store.
421+
"""
312422
public_actor_run_stats30_days: PublicActorRunStats30Days | None = None
313423
"""
314-
Run status counts over the past 30 days.
424+
Run status counts from the last 30 days. Only for public Actors.
425+
Excludes runs started by the Actor's owner.
426+
315427
"""
316428

317429

@@ -2087,9 +2199,6 @@ class Plan(BaseModel):
20872199
max_actor_task_count: Annotated[int | None, Field(examples=[1000])] = None
20882200
data_retention_days: Annotated[int | None, Field(examples=[14])] = None
20892201
available_proxy_groups: dict[str, int]
2090-
"""
2091-
The number of available proxies in this group.
2092-
"""
20932202
team_account_seat_count: Annotated[int | None, Field(examples=[1])] = None
20942203
support_level: Annotated[str | None, Field(examples=['COMMUNITY'])] = None
20952204
available_add_ons: Annotated[list[str] | None, Field(examples=[[]])] = None
@@ -2210,18 +2319,36 @@ class ProxyGroup(BaseModel):
22102319

22112320
@docs_group('Models')
22122321
class PublicActorRunStats30Days(BaseModel):
2213-
"""Run status counts over the past 30 days."""
2322+
"""Run status counts from the last 30 days. Only for public Actors.
2323+
Excludes runs started by the Actor's owner.
2324+
2325+
"""
22142326

22152327
model_config = ConfigDict(
22162328
extra='allow',
22172329
populate_by_name=True,
22182330
alias_generator=to_camel,
22192331
)
22202332
aborted: Annotated[int | None, Field(alias='ABORTED', examples=[2542])] = None
2333+
"""
2334+
The number of runs that were aborted.
2335+
"""
22212336
failed: Annotated[int | None, Field(alias='FAILED', examples=[1234])] = None
2337+
"""
2338+
The number of runs that failed.
2339+
"""
22222340
succeeded: Annotated[int | None, Field(alias='SUCCEEDED', examples=[732805])] = None
2341+
"""
2342+
The number of runs that succeeded.
2343+
"""
22232344
timed_out: Annotated[int | None, Field(alias='TIMED-OUT', examples=[12556])] = None
2345+
"""
2346+
The number of runs that timed out.
2347+
"""
22242348
total: Annotated[int | None, Field(alias='TOTAL', examples=[749137])] = None
2349+
"""
2350+
The total number of runs.
2351+
"""
22252352

22262353

22272354
@docs_group('Models')
@@ -3295,7 +3422,7 @@ class StoreListActor(BaseModel):
32953422
user_full_name: Annotated[str | None, Field(examples=['Jane H. Doe'])] = None
32963423
description: Annotated[str | None, Field(examples=['My public actor!'])] = None
32973424
categories: Annotated[list[str] | None, Field(examples=[['MARKETING', 'LEAD_GENERATION']])] = None
3298-
notice: str | None = None
3425+
notice: ActorNotice | None = None
32993426
picture_url: Annotated[AnyUrl | None, Field(examples=['https://...'])] = None
33003427
user_picture_url: Annotated[AnyUrl | None, Field(examples=['https://...'])] = None
33013428
url: Annotated[AnyUrl | None, Field(examples=['https://...'])] = None

0 commit comments

Comments
 (0)