Skip to content

Commit 9e7e017

Browse files
[TODO]: update generated models from apify-docs PR #2422
1 parent e7c2b7b commit 9e7e017

File tree

1 file changed

+29
-63
lines changed

1 file changed

+29
-63
lines changed

src/apify_client/_models.py

Lines changed: 29 additions & 63 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')
@@ -967,63 +990,6 @@ class BuildResponse(BaseModel):
967990
data: Build
968991

969992

970-
@docs_group('Models')
971-
class ErrorType(StrEnum):
972-
"""Machine-processable error type identifier."""
973-
974-
ACTOR_MEMORY_LIMIT_EXCEEDED = 'actor-memory-limit-exceeded'
975-
ACTOR_NOT_FOUND = 'actor-not-found'
976-
INVALID_INPUT = 'invalid-input'
977-
METHOD_NOT_ALLOWED = 'method-not-allowed'
978-
PERMISSION_DENIED = 'permission-denied'
979-
RATE_LIMIT_EXCEEDED = 'rate-limit-exceeded'
980-
RECORD_NOT_FOUND = 'record-not-found'
981-
RECORD_NOT_UNIQUE = 'record-not-unique'
982-
RECORD_OR_TOKEN_NOT_FOUND = 'record-or-token-not-found'
983-
REQUEST_ID_INVALID = 'request-id-invalid'
984-
REQUEST_TOO_LARGE = 'request-too-large'
985-
RUN_FAILED = 'run-failed'
986-
RUN_TIMEOUT_EXCEEDED = 'run-timeout-exceeded'
987-
TOKEN_NOT_VALID = 'token-not-valid'
988-
UNKNOWN_BUILD_TAG = 'unknown-build-tag'
989-
UNSUPPORTED_CONTENT_ENCODING = 'unsupported-content-encoding'
990-
991-
992-
@docs_group('Models')
993-
class ErrorDetail(BaseModel):
994-
model_config = ConfigDict(
995-
extra='allow',
996-
populate_by_name=True,
997-
)
998-
type: ErrorType | None = None
999-
message: str | None = None
1000-
"""
1001-
Human-readable error message describing what went wrong.
1002-
"""
1003-
1004-
1005-
@docs_group('Models')
1006-
class Type1(StrEnum):
1007-
"""Machine-processable error type identifier."""
1008-
1009-
ACTOR_MEMORY_LIMIT_EXCEEDED = 'actor-memory-limit-exceeded'
1010-
ACTOR_NOT_FOUND = 'actor-not-found'
1011-
INVALID_INPUT = 'invalid-input'
1012-
METHOD_NOT_ALLOWED = 'method-not-allowed'
1013-
PERMISSION_DENIED = 'permission-denied'
1014-
RATE_LIMIT_EXCEEDED = 'rate-limit-exceeded'
1015-
RECORD_NOT_FOUND = 'record-not-found'
1016-
RECORD_NOT_UNIQUE = 'record-not-unique'
1017-
RECORD_OR_TOKEN_NOT_FOUND = 'record-or-token-not-found'
1018-
REQUEST_ID_INVALID = 'request-id-invalid'
1019-
REQUEST_TOO_LARGE = 'request-too-large'
1020-
RUN_FAILED = 'run-failed'
1021-
RUN_TIMEOUT_EXCEEDED = 'run-timeout-exceeded'
1022-
TOKEN_NOT_VALID = 'token-not-valid'
1023-
UNKNOWN_BUILD_TAG = 'unknown-build-tag'
1024-
UNSUPPORTED_CONTENT_ENCODING = 'unsupported-content-encoding'
1025-
1026-
1027993
@docs_group('Models')
1028994
class UnknownBuildTagErrorDetail(ErrorDetail):
1029995
model_config = ConfigDict(

0 commit comments

Comments
 (0)