Skip to content

Commit 6d34e85

Browse files
[TODO]: update generated models from apify-docs PR #2689
1 parent 4360695 commit 6d34e85

2 files changed

Lines changed: 130 additions & 13 deletions

File tree

src/apify_client/_literals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
'LIMITED_PERMISSIONS',
2222
'FULL_PERMISSIONS',
2323
]
24-
"""Determines permissions that the Actor requires to run. For more information, see the [Actor permissions documentation](https://docs.apify.com/platform/actors/development/permissions)."""
24+
"""Determines the permission level that the Actor requires to run. For details, see [Actor permissions](https://docs.apify.com/platform/actors/development/permissions)."""
2525

2626

2727
ErrorType = Literal[

src/apify_client/_models.py

Lines changed: 129 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,37 @@ class ActorStandby(BaseModel):
278278
alias_generator=to_camel,
279279
)
280280
is_enabled: bool | None = None
281+
"""
282+
Whether standby mode is enabled for the Actor.
283+
"""
281284
desired_requests_per_actor_run: int | None = None
285+
"""
286+
Target number of concurrent HTTP requests a single run is configured to handle.
287+
"""
282288
max_requests_per_actor_run: int | None = None
289+
"""
290+
Maximum number of concurrent HTTP requests that can be routed to a single run.
291+
"""
283292
idle_timeout_secs: int | None = None
293+
"""
294+
In seconds, how long a run can stay idle without incoming requests before it's terminated.
295+
"""
284296
build: str | None = None
297+
"""
298+
Which build to run in standby mode. Either a build tag or a version number.
299+
"""
285300
memory_mbytes: int | None = None
301+
"""
302+
In MB, the amount of memory allocated to the run.
303+
"""
286304
disable_standby_fields_override: bool | None = None
305+
"""
306+
If `true`, prevents the standby mode configuration from being overridden elsewhere.
307+
"""
287308
should_pass_actor_input: bool | None = None
309+
"""
310+
Whether to pass the Actor's input to the standby run. If `false`, the standby runs start with no input.
311+
"""
288312

289313

290314
@docs_group('Models')
@@ -640,14 +664,37 @@ class CreateActorRequest(BaseModel):
640664
populate_by_name=True,
641665
alias_generator=to_camel,
642666
)
643-
name: Annotated[str | None, Field(examples=['MyActor'])] = None
644-
description: Annotated[str | None, Field(examples=['My favourite actor!'])] = None
645-
title: Annotated[str | None, Field(examples=['My actor'])] = None
667+
name: Annotated[str | None, Field(examples=['instagram-scraper'])] = None
668+
"""
669+
The identifier of the Actor. Use lowercase letters, numbers, and hyphens. Spaces or special characters aren't allowed. Must be unique across your account.
670+
"""
671+
description: Annotated[str | None, Field(examples=['This scraper extracts posts and comments from Instagram.'])] = (
672+
None
673+
)
674+
"""
675+
Short description of the Actor, displayed in Apify Store and Console.
676+
"""
677+
title: Annotated[str | None, Field(examples=['Instagram scraper'])] = None
678+
"""
679+
Human-readable name of the Actor, displayed in Apify Store and Console. Can contain spaces and capital letters. Recommended length is 40-50 characters. You can change this title without affecting the Actor's URL or SEO.
680+
"""
646681
is_public: Annotated[bool | None, Field(examples=[False])] = None
647-
seo_title: Annotated[str | None, Field(examples=['My actor'])] = None
648-
seo_description: Annotated[str | None, Field(examples=['My actor is the best'])] = None
682+
"""
683+
Whether the Actor is available to users in Apify Store. If `false`, the Actor is private and only visible to you.
684+
"""
685+
seo_title: Annotated[str | None, Field(examples=['Free Instagram scraper'])] = None
686+
"""
687+
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. Recommended length is 40-50 characters.
688+
"""
689+
seo_description: Annotated[str | None, Field(examples=['The best scraper for Instagram'])] = None
690+
"""
691+
Description of the Actor to display by search engines such as Google. Recommended length is 140-156 characters.
692+
"""
649693
restart_on_error: Annotated[bool | None, Field(deprecated=True, examples=[False])] = None
650694
versions: list[Version] | None = None
695+
"""
696+
An array of `Version` objects. Each object represents a specific version of the Actor's source code: its location, builds, and environment configuration.
697+
"""
651698
pricing_infos: (
652699
list[
653700
Annotated[
@@ -660,11 +707,23 @@ class CreateActorRequest(BaseModel):
660707
]
661708
| None
662709
) = None
663-
categories: list[str] | None = None
710+
categories: Annotated[list[str] | None, Field(examples=[['SOCIAL_MEDIA']])] = None
711+
"""
712+
A list of categories that best define the Actor. Reflected in Apify Store's search and filtering options.
713+
"""
664714
default_run_options: DefaultRunOptions | None = None
665715
actor_standby: ActorStandby | None = None
716+
"""
717+
The configuration of the Actor's standby mode. For details, see [Standby mode](https://docs.apify.com/platform/actors/development/programming-interface/standby).
718+
"""
666719
example_run_input: ExampleRunInput | None = None
720+
"""
721+
Sample input payload that demonstrates what a typical run input for an Actor looks like. Used when no explicit input for a run is provided.
722+
"""
667723
is_deprecated: bool | None = None
724+
"""
725+
Whether the Actor is deprecated.
726+
"""
668727

669728

670729
@docs_group('Models')
@@ -996,16 +1055,33 @@ class DecodeAndVerifyResponse(BaseModel):
9961055

9971056
@docs_group('Models')
9981057
class DefaultRunOptions(BaseModel):
1058+
"""The default settings applied to an Actor run. Can be overridden elsewhere."""
1059+
9991060
model_config = ConfigDict(
10001061
extra='allow',
10011062
populate_by_name=True,
10021063
alias_generator=to_camel,
10031064
)
10041065
build: Annotated[str | None, Field(examples=['latest'])] = None
1066+
"""
1067+
Which build to run. Either a build tag or a version number.
1068+
"""
10051069
timeout_secs: Annotated[int | None, Field(examples=[3600])] = None
1070+
"""
1071+
Timeout in seconds. 0 if no timeout.
1072+
"""
10061073
memory_mbytes: Annotated[int | None, Field(examples=[2048])] = None
1074+
"""
1075+
In MB, the amount of memory allocated to the run.
1076+
"""
10071077
restart_on_error: Annotated[bool | None, Field(examples=[False])] = None
1078+
"""
1079+
Whether to automatically restart the run if it fails.
1080+
"""
10081081
max_items: int | None = None
1082+
"""
1083+
Maximum number of items the run might produce.
1084+
"""
10091085
force_permission_level: ActorPermissionLevel | None = None
10101086

10111087

@@ -1120,11 +1196,17 @@ class EnvVar(BaseModel):
11201196
alias_generator=to_camel,
11211197
)
11221198
name: Annotated[str, Field(examples=['MY_ENV_VAR'])]
1199+
"""
1200+
The name of the environment variable.
1201+
"""
11231202
value: Annotated[str | None, Field(examples=['my-value'])] = None
11241203
"""
1125-
The environment variable value. This field is absent in responses when `isSecret` is `true`, as secret values are never returned by the API.
1204+
The value of the environment variable. If `isSecret` is `true`, this value isn't returned by the API.
11261205
"""
11271206
is_secret: Annotated[bool | None, Field(examples=[False])] = None
1207+
"""
1208+
Whether the environment variable is encrypted. Secret values aren't returned by the API.
1209+
"""
11281210

11291211

11301212
@docs_group('Models')
@@ -1189,7 +1271,13 @@ class ExampleRunInput(BaseModel):
11891271
alias_generator=to_camel,
11901272
)
11911273
body: Annotated[str | None, Field(examples=['{ "helloWorld": 123 }'])] = None
1274+
"""
1275+
Sample input, serialized as a string.
1276+
"""
11921277
content_type: Annotated[str | None, Field(examples=['application/json; charset=utf-8'])] = None
1278+
"""
1279+
MIME type of `body`.
1280+
"""
11931281

11941282

11951283
@docs_group('Models')
@@ -3136,14 +3224,25 @@ class SchemaValidationErrorData(BaseModel):
31363224

31373225
@docs_group('Models')
31383226
class SourceCodeFile(BaseModel):
3227+
"""Represents a single file in the Actor's source code."""
3228+
31393229
model_config = ConfigDict(
31403230
extra='allow',
31413231
populate_by_name=True,
31423232
alias_generator=to_camel,
31433233
)
31443234
format: SourceCodeFileFormat | None = None
3235+
"""
3236+
Format of the file's content, `TEXT` for plain text and `BASE64` for encoded content.
3237+
"""
31453238
content: Annotated[str | None, Field(examples=["console.log('This is the main.js file');"])] = None
3239+
"""
3240+
The contents of the file. Interpreted based on the value of `format`.
3241+
"""
31463242
name: Annotated[str, Field(examples=['src/main.js'])]
3243+
"""
3244+
The path of the file relative to the Actor's root directory.
3245+
"""
31473246

31483247

31493248
@docs_group('Models')
@@ -3160,11 +3259,11 @@ class SourceCodeFolder(BaseModel):
31603259
)
31613260
name: Annotated[str, Field(examples=['src/utils'])]
31623261
"""
3163-
The folder path relative to the Actor's root directory.
3262+
The path of the folder relative to the Actor's root directory.
31643263
"""
31653264
folder: Annotated[bool, Field(examples=[True])]
31663265
"""
3167-
Always `true` for folders. Used to distinguish folders from files.
3266+
Whether it's a folder. Distinguishes folders from files.
31683267
"""
31693268

31703269

@@ -3687,22 +3786,40 @@ class Version(BaseModel):
36873786
alias_generator=to_camel,
36883787
)
36893788
version_number: Annotated[str, Field(examples=['0.0'], pattern='^([0-9]|[1-9][0-9])\\.([0-9]|[1-9][0-9])$')]
3789+
"""
3790+
The version number of the Actor. Must be a dot-separated sequence of numbers.
3791+
"""
36903792
source_type: VersionSourceType | None
3793+
"""
3794+
Where the source code of the version lives.
3795+
"""
36913796
env_vars: list[EnvVar] | None = None
3797+
"""
3798+
Environment variables for the version.
3799+
"""
36923800
apply_env_vars_to_build: Annotated[bool | None, Field(examples=[False])] = None
3801+
"""
3802+
Whether to inject the environment variables at build time.
3803+
"""
36933804
build_tag: Annotated[str | None, Field(examples=['latest'])] = None
3805+
"""
3806+
The tag name to apply to a successful build of this version.
3807+
"""
36943808
source_files: Annotated[list[SourceCodeFile | SourceCodeFolder] | None, Field(title='VersionSourceFiles')] = None
3809+
"""
3810+
Applies when the `sourceType` is `SOURCE_FILES`. Represents the Actor's file structure as an array of files and folders.
3811+
"""
36953812
git_repo_url: str | None = None
36963813
"""
3697-
URL of the Git repository when sourceType is GIT_REPO.
3814+
URL of the Git repository to clone the source code from. Applies when the `sourceType` is `GIT_REPO`.
36983815
"""
36993816
tarball_url: str | None = None
37003817
"""
3701-
URL of the tarball when sourceType is TARBALL.
3818+
URL to download the source code from as a tarball or ZIP file. Applies when the `sourceType` is `TARBALL`.
37023819
"""
37033820
github_gist_url: Annotated[str | None, Field(alias='gitHubGistUrl')] = None
37043821
"""
3705-
URL of the GitHub Gist when sourceType is GITHUB_GIST.
3822+
URL of the GitHub Gist to clone the source code from. Applies when the `sourceType` is `GITHUB_GIST`.
37063823
"""
37073824

37083825

0 commit comments

Comments
 (0)