Skip to content

Commit f387f67

Browse files
chore: Regenerate models from the published OpenAPI spec
1 parent 1fc037f commit f387f67

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

‎src/apify_client/_models.py‎

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,12 @@ class CreateTaskRequest(BaseModel):
883883
input: TaskInput | None = None
884884
title: str | None = None
885885
actor_standby: ActorStandby | None = None
886+
public_config: TaskPublicConfig | None = None
887+
"""
888+
Configuration that controls how the published task appears on its public landing page.
889+
Editing this object requires write permission to the Actor that the task belongs to.
890+
891+
"""
886892

887893

888894
@docs_group('Models')
@@ -3496,6 +3502,12 @@ class Task(BaseModel):
34963502
title: str | None = None
34973503
actor_standby: ActorStandby | None = None
34983504
standby_url: AnyUrl | None = None
3505+
is_public: Annotated[bool | None, Field(examples=[False])] = None
3506+
"""
3507+
Whether the task is published. Based on the `publicConfig.publishedAt` field.
3508+
3509+
"""
3510+
public_config: TaskPublicConfig | None = None
34993511

35003512

35013513
@docs_group('Models')
@@ -3527,6 +3539,57 @@ class TaskOptions(BaseModel):
35273539
restart_on_error: Annotated[bool | None, Field(examples=[False])] = None
35283540

35293541

3542+
@docs_group('Models')
3543+
class TaskPublicConfig(BaseModel):
3544+
"""Public-facing configuration of a published task, used by the task's public landing page.
3545+
The task's publication state is determined by `publishedAt` - a task is published when
3546+
`publishedAt` is set and unpublished when it is `null`.
3547+
3548+
"""
3549+
3550+
model_config = ConfigDict(
3551+
extra='allow',
3552+
populate_by_name=True,
3553+
alias_generator=to_camel,
3554+
)
3555+
published_at: Annotated[AwareDatetime | None, Field(examples=['2025-06-16T09:20:45.777Z'])] = None
3556+
"""
3557+
Time when the task was published, or `null` if the task isn't published.
3558+
This field is server-controlled. To publish or unpublish a task, use the
3559+
[Update task](https://docs.apify.com/api/v2/actor-task-put) endpoint and set `isPublic`.
3560+
3561+
"""
3562+
seo_title: Annotated[str | None, Field(examples=['Scrape data from a website'], max_length=60)] = None
3563+
"""
3564+
Name of the Actor task to display by search engines such as Google. Defaults to the task
3565+
title. At most 60 characters.
3566+
3567+
"""
3568+
seo_description: Annotated[str | None, Field(max_length=160)] = None
3569+
"""
3570+
Description of the Actor task to display by search engines such as Google. Defaults to the
3571+
task description. At most 160 characters.
3572+
3573+
"""
3574+
input_schema_fields: list[str] | None = None
3575+
"""
3576+
Names of the task input fields displayed on the public task page.
3577+
"""
3578+
dataset_name: str | None = None
3579+
"""
3580+
Name of the dataset from the Actor's dataset schema whose results are displayed. When
3581+
`null`, the Actor's default dataset is used. That is, the only dataset the Actor declares,
3582+
or the one named `default` when it declares several.
3583+
3584+
"""
3585+
dataset_view: str | None = None
3586+
"""
3587+
Key of the dataset view from the Actor's dataset schema used to display results. Must be
3588+
one of the views declared on the resolved dataset. You can't publish a task without it.
3589+
3590+
"""
3591+
3592+
35303593
@docs_group('Models')
35313594
class TaskResponse(BaseModel):
35323595
"""Response containing Actor task data."""
@@ -3802,6 +3865,22 @@ class UpdateTaskRequest(BaseModel):
38023865
input: TaskInput | None = None
38033866
title: str | None = None
38043867
actor_standby: ActorStandby | None = None
3868+
public_config: TaskPublicConfig | None = None
3869+
"""
3870+
Configuration that controls how the published task appears on its public landing page.
3871+
Editing this object requires write permission to the Actor that the task belongs to.
3872+
3873+
The fields you send are merged into the stored configuration, so you only need to include
3874+
the ones you're changing. To clear a field, set it to `null`. Sending `publicConfig: null`
3875+
is rejected, so the object as a whole can't be cleared.
3876+
3877+
"""
3878+
is_public: Annotated[bool | None, Field(examples=[True])] = None
3879+
"""
3880+
Set to `true` to publish the task on its public landing page, or `false` to unpublish it.
3881+
Sending the value the task already has does nothing.
3882+
3883+
"""
38053884

38063885

38073886
@docs_group('Models')

0 commit comments

Comments
 (0)