Skip to content

Commit b6c2f22

Browse files
chore: update generated models from apify-docs PR #2422 (#719)
This PR updates the auto-generated Pydantic models based on OpenAPI specification changes in [apify-docs PR #2422](apify/apify-docs#2422). --------- Co-authored-by: apify-service-account <apify-service-account@users.noreply.github.com>
1 parent 261e2a3 commit b6c2f22

File tree

1 file changed

+29
-176
lines changed

1 file changed

+29
-176
lines changed

src/apify_client/_models.py

Lines changed: 29 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,38 @@ class ListOfActorsResponse(BaseModel):
9292

9393

9494
@docs_group('Models')
95-
class Error(BaseModel):
95+
class ErrorType(StrEnum):
96+
"""Machine-processable error type identifier."""
97+
98+
ACTOR_MEMORY_LIMIT_EXCEEDED = 'actor-memory-limit-exceeded'
99+
ACTOR_NOT_FOUND = 'actor-not-found'
100+
INVALID_INPUT = 'invalid-input'
101+
METHOD_NOT_ALLOWED = 'method-not-allowed'
102+
PAGE_NOT_FOUND = 'page-not-found'
103+
PERMISSION_DENIED = 'permission-denied'
104+
RATE_LIMIT_EXCEEDED = 'rate-limit-exceeded'
105+
RECORD_NOT_FOUND = 'record-not-found'
106+
RECORD_NOT_UNIQUE = 'record-not-unique'
107+
RECORD_OR_TOKEN_NOT_FOUND = 'record-or-token-not-found'
108+
REQUEST_ID_INVALID = 'request-id-invalid'
109+
REQUEST_TOO_LARGE = 'request-too-large'
110+
RUN_FAILED = 'run-failed'
111+
RUN_TIMEOUT_EXCEEDED = 'run-timeout-exceeded'
112+
SCHEDULE_ACTOR_NOT_FOUND = 'schedule-actor-not-found'
113+
SCHEDULE_ACTOR_TASK_NOT_FOUND = 'schedule-actor-task-not-found'
114+
TOKEN_NOT_VALID = 'token-not-valid'
115+
UNKNOWN_BUILD_TAG = 'unknown-build-tag'
116+
UNSUPPORTED_CONTENT_ENCODING = 'unsupported-content-encoding'
117+
USER_NOT_FOUND = 'user-not-found'
118+
119+
120+
@docs_group('Models')
121+
class ErrorDetail(BaseModel):
96122
model_config = ConfigDict(
97123
extra='allow',
98124
populate_by_name=True,
99125
)
100-
type: Annotated[ErrorType | None, Field(title='ErrorType')] = None
101-
"""
102-
Machine-processable error type identifier.
103-
"""
126+
type: ErrorType | None = None
104127
message: str | None = None
105128
"""
106129
Human-readable error message describing what went wrong.
@@ -113,7 +136,7 @@ class ErrorResponse(BaseModel):
113136
extra='allow',
114137
populate_by_name=True,
115138
)
116-
error: Annotated[Error, Field(title='ErrorDetail')]
139+
error: ErrorDetail
117140

118141

119142
@docs_group('Models')
@@ -612,104 +635,6 @@ class VersionResponse(BaseModel):
612635
data: Version
613636

614637

615-
@docs_group('Models')
616-
class ErrorType(StrEnum):
617-
"""Machine-processable error type identifier."""
618-
619-
ACTOR_MEMORY_LIMIT_EXCEEDED = 'actor-memory-limit-exceeded'
620-
ACTOR_NOT_FOUND = 'actor-not-found'
621-
INVALID_INPUT = 'invalid-input'
622-
METHOD_NOT_ALLOWED = 'method-not-allowed'
623-
PERMISSION_DENIED = 'permission-denied'
624-
RATE_LIMIT_EXCEEDED = 'rate-limit-exceeded'
625-
RECORD_NOT_FOUND = 'record-not-found'
626-
RECORD_NOT_UNIQUE = 'record-not-unique'
627-
RECORD_OR_TOKEN_NOT_FOUND = 'record-or-token-not-found'
628-
REQUEST_ID_INVALID = 'request-id-invalid'
629-
REQUEST_TOO_LARGE = 'request-too-large'
630-
RUN_FAILED = 'run-failed'
631-
RUN_TIMEOUT_EXCEEDED = 'run-timeout-exceeded'
632-
TOKEN_NOT_VALID = 'token-not-valid'
633-
UNKNOWN_BUILD_TAG = 'unknown-build-tag'
634-
UNSUPPORTED_CONTENT_ENCODING = 'unsupported-content-encoding'
635-
636-
637-
@docs_group('Models')
638-
class ErrorDetail(BaseModel):
639-
model_config = ConfigDict(
640-
extra='allow',
641-
populate_by_name=True,
642-
)
643-
type: ErrorType | None = None
644-
message: str | None = None
645-
"""
646-
Human-readable error message describing what went wrong.
647-
"""
648-
649-
650-
@docs_group('Models')
651-
class ActorNotFoundErrorDetail(ErrorDetail):
652-
model_config = ConfigDict(
653-
extra='allow',
654-
populate_by_name=True,
655-
)
656-
type: Annotated[Literal['actor-not-found'], Field(title='ErrorType')] = 'actor-not-found'
657-
"""
658-
Machine-processable error type identifier.
659-
"""
660-
661-
662-
@docs_group('Models')
663-
class ActorNotFoundError(BaseModel):
664-
model_config = ConfigDict(
665-
extra='allow',
666-
populate_by_name=True,
667-
)
668-
error: ActorNotFoundErrorDetail | None = None
669-
670-
671-
@docs_group('Models')
672-
class RecordOrTokenNotFoundErrorDetail(ErrorDetail):
673-
model_config = ConfigDict(
674-
extra='allow',
675-
populate_by_name=True,
676-
)
677-
type: Annotated[Literal['record-or-token-not-found'], Field(title='ErrorType')] = 'record-or-token-not-found'
678-
"""
679-
Machine-processable error type identifier.
680-
"""
681-
682-
683-
@docs_group('Models')
684-
class RecordOrTokenNotFoundError(BaseModel):
685-
model_config = ConfigDict(
686-
extra='allow',
687-
populate_by_name=True,
688-
)
689-
error: RecordOrTokenNotFoundErrorDetail | None = None
690-
691-
692-
@docs_group('Models')
693-
class RecordNotFoundErrorDetail(ErrorDetail):
694-
model_config = ConfigDict(
695-
extra='allow',
696-
populate_by_name=True,
697-
)
698-
type: Annotated[Literal['record-not-found'], Field(title='ErrorType')] = 'record-not-found'
699-
"""
700-
Machine-processable error type identifier.
701-
"""
702-
703-
704-
@docs_group('Models')
705-
class ActorVersionNotFoundError(BaseModel):
706-
model_config = ConfigDict(
707-
extra='allow',
708-
populate_by_name=True,
709-
)
710-
error: RecordNotFoundErrorDetail | None = None
711-
712-
713638
@docs_group('Models')
714639
class ListOfEnvVars(BaseModel):
715640
model_config = ConfigDict(
@@ -738,15 +663,6 @@ class EnvVarResponse(BaseModel):
738663
data: EnvVar
739664

740665

741-
@docs_group('Models')
742-
class EnvironmentVariableNotFoundError(BaseModel):
743-
model_config = ConfigDict(
744-
extra='allow',
745-
populate_by_name=True,
746-
)
747-
error: RecordNotFoundErrorDetail | None = None
748-
749-
750666
@docs_group('Models')
751667
class WebhookEventType(StrEnum):
752668
"""Type of event that triggers the webhook."""
@@ -1095,15 +1011,6 @@ class UnknownBuildTagError(BaseModel):
10951011
error: UnknownBuildTagErrorDetail | None = None
10961012

10971013

1098-
@docs_group('Models')
1099-
class ActorBuildNotFoundError(BaseModel):
1100-
model_config = ConfigDict(
1101-
extra='allow',
1102-
populate_by_name=True,
1103-
)
1104-
error: RecordNotFoundErrorDetail | None = None
1105-
1106-
11071014
@docs_group('Models')
11081015
class RunMeta(BaseModel):
11091016
model_config = ConfigDict(
@@ -1554,15 +1461,6 @@ class ActorRunTimeoutExceededError(BaseModel):
15541461
error: RunTimeoutExceededErrorDetail | None = None
15551462

15561463

1557-
@docs_group('Models')
1558-
class ActorRunNotFoundError(BaseModel):
1559-
model_config = ConfigDict(
1560-
extra='allow',
1561-
populate_by_name=True,
1562-
)
1563-
error: RecordNotFoundErrorDetail | None = None
1564-
1565-
15661464
@docs_group('Models')
15671465
class TaskStats(BaseModel):
15681466
model_config = ConfigDict(
@@ -1830,15 +1728,6 @@ class KeyValueStoreResponse(BaseModel):
18301728
data: KeyValueStore
18311729

18321730

1833-
@docs_group('Models')
1834-
class KeyValueStoreNotFoundError(BaseModel):
1835-
model_config = ConfigDict(
1836-
extra='allow',
1837-
populate_by_name=True,
1838-
)
1839-
error: RecordNotFoundErrorDetail | None = None
1840-
1841-
18421731
@docs_group('Models')
18431732
class UpdateStoreRequest(BaseModel):
18441733
model_config = ConfigDict(
@@ -1905,15 +1794,6 @@ class RecordResponse(BaseModel):
19051794
)
19061795

19071796

1908-
@docs_group('Models')
1909-
class RecordNotFoundError(BaseModel):
1910-
model_config = ConfigDict(
1911-
extra='allow',
1912-
populate_by_name=True,
1913-
)
1914-
error: RecordNotFoundErrorDetail | None = None
1915-
1916-
19171797
@docs_group('Models')
19181798
class PutRecordRequest(BaseModel):
19191799
"""The request body contains the value to store in the record. The content type
@@ -2048,15 +1928,6 @@ class DatasetResponse(BaseModel):
20481928
data: Dataset
20491929

20501930

2051-
@docs_group('Models')
2052-
class DatasetNotFoundError(BaseModel):
2053-
model_config = ConfigDict(
2054-
extra='allow',
2055-
populate_by_name=True,
2056-
)
2057-
error: RecordNotFoundErrorDetail | None = None
2058-
2059-
20601931
@docs_group('Models')
20611932
class UpdateDatasetRequest(BaseModel):
20621933
model_config = ConfigDict(
@@ -2397,15 +2268,6 @@ class RequestQueueResponse(BaseModel):
23972268
data: RequestQueue
23982269

23992270

2400-
@docs_group('Models')
2401-
class RequestQueueNotFoundError(BaseModel):
2402-
model_config = ConfigDict(
2403-
extra='allow',
2404-
populate_by_name=True,
2405-
)
2406-
error: RecordNotFoundErrorDetail | None = None
2407-
2408-
24092271
@docs_group('Models')
24102272
class UpdateRequestQueueRequest(BaseModel):
24112273
"""Request object for updating a request queue."""
@@ -2825,15 +2687,6 @@ class RequestResponse(BaseModel):
28252687
data: Request
28262688

28272689

2828-
@docs_group('Models')
2829-
class RequestNotFoundError(BaseModel):
2830-
model_config = ConfigDict(
2831-
extra='allow',
2832-
populate_by_name=True,
2833-
)
2834-
error: RecordNotFoundErrorDetail | None = None
2835-
2836-
28372690
@docs_group('Models')
28382691
class UpdateRequestResponse(BaseModel):
28392692
"""Response containing the result of updating a request in the request queue."""

0 commit comments

Comments
 (0)