Skip to content

Commit 1fcc47e

Browse files
[TODO]: update generated models from apify-docs PR #2403
1 parent 2021928 commit 1fcc47e

File tree

1 file changed

+30
-37
lines changed

1 file changed

+30
-37
lines changed

src/apify_client/_models.py

Lines changed: 30 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
2-
# filename: https://docs.apify.com/api/openapi.json
3-
# timestamp: 2026-04-09T08:30:29+00:00
2+
# filename: openapi.json
3+
# timestamp: 2026-04-09T09:58:44+00:00
44

55
from __future__ import annotations
66

@@ -139,8 +139,8 @@ class SourceCodeFile(BaseModel):
139139
extra='allow',
140140
populate_by_name=True,
141141
)
142-
format: SourceCodeFileFormat
143-
content: Annotated[str, Field(examples=["console.log('This is the main.js file');"])]
142+
format: SourceCodeFileFormat | None = None
143+
content: Annotated[str | None, Field(examples=["console.log('This is the main.js file');"])] = None
144144
name: Annotated[str, Field(examples=['src/main.js'])]
145145

146146

@@ -213,13 +213,6 @@ class CommonActorPricingInfo(BaseModel):
213213
reason_for_change: Annotated[str | None, Field(alias='reasonForChange')] = None
214214

215215

216-
class PricingModel(StrEnum):
217-
PAY_PER_EVENT = 'PAY_PER_EVENT'
218-
PRICE_PER_DATASET_ITEM = 'PRICE_PER_DATASET_ITEM'
219-
FLAT_PRICE_PER_MONTH = 'FLAT_PRICE_PER_MONTH'
220-
FREE = 'FREE'
221-
222-
223216
class ActorChargeEvent(BaseModel):
224217
model_config = ConfigDict(
225218
extra='allow',
@@ -636,6 +629,25 @@ class ActorNotFoundError(BaseModel):
636629
error: ActorNotFoundErrorDetail | None = None
637630

638631

632+
class RecordOrTokenNotFoundErrorDetail(ErrorDetail):
633+
model_config = ConfigDict(
634+
extra='allow',
635+
populate_by_name=True,
636+
)
637+
type: Annotated[Literal['record-or-token-not-found'], Field(title='ErrorType')] = 'record-or-token-not-found'
638+
"""
639+
Machine-processable error type identifier.
640+
"""
641+
642+
643+
class RecordOrTokenNotFoundError(BaseModel):
644+
model_config = ConfigDict(
645+
extra='allow',
646+
populate_by_name=True,
647+
)
648+
error: RecordOrTokenNotFoundErrorDetail | None = None
649+
650+
639651
class RecordNotFoundErrorDetail(ErrorDetail):
640652
model_config = ConfigDict(
641653
extra='allow',
@@ -1531,7 +1543,7 @@ class CreateTaskRequest(BaseModel):
15311543
populate_by_name=True,
15321544
)
15331545
act_id: Annotated[str, Field(alias='actId', examples=['asADASadYvn4mBZmm'])]
1534-
name: Annotated[str, Field(examples=['my-task'])]
1546+
name: Annotated[str | None, Field(examples=['my-task'])] = None
15351547
options: TaskOptions | None = None
15361548
input: TaskInput | None = None
15371549
title: str | None = None
@@ -1628,25 +1640,6 @@ class ChargeRunRequest(BaseModel):
16281640
count: Annotated[int, Field(examples=[1])]
16291641

16301642

1631-
class RecordOrTokenNotFoundErrorDetail(ErrorDetail):
1632-
model_config = ConfigDict(
1633-
extra='allow',
1634-
populate_by_name=True,
1635-
)
1636-
type: Annotated[Literal['record-or-token-not-found'], Field(title='ErrorType')] = 'record-or-token-not-found'
1637-
"""
1638-
Machine-processable error type identifier.
1639-
"""
1640-
1641-
1642-
class RecordOrTokenNotFoundError(BaseModel):
1643-
model_config = ConfigDict(
1644-
extra='allow',
1645-
populate_by_name=True,
1646-
)
1647-
error: RecordOrTokenNotFoundErrorDetail | None = None
1648-
1649-
16501643
class StorageOwnership(StrEnum):
16511644
OWNED_BY_ME = 'ownedByMe'
16521645
SHARED_WITH_ME = 'sharedWithMe'
@@ -2324,7 +2317,7 @@ class RequestBase(BaseModel):
23242317
"""
23252318
A unique key used for request de-duplication. Requests with the same unique key are considered identical.
23262319
"""
2327-
url: Annotated[AnyUrl | None, Field(examples=['https://apify.com'])] = None
2320+
url: Annotated[str | None, Field(examples=['https://apify.com'])] = None
23282321
"""
23292322
The URL of the request.
23302323
"""
@@ -2337,7 +2330,7 @@ class RequestBase(BaseModel):
23372330
"""
23382331
The final URL that was loaded, after redirects (if any).
23392332
"""
2340-
payload: Annotated[dict[str, Any] | None, Field(examples=[None])] = None
2333+
payload: Annotated[str | dict[str, Any] | None, Field(examples=[None])] = None
23412334
"""
23422335
The request payload, typically used with POST or PUT requests.
23432336
"""
@@ -2400,7 +2393,7 @@ class RequestDraft(BaseModel):
24002393
"""
24012394
A unique key used for request de-duplication. Requests with the same unique key are considered identical.
24022395
"""
2403-
url: Annotated[AnyUrl, Field(examples=['https://apify.com'])]
2396+
url: Annotated[str, Field(examples=['https://apify.com'])]
24042397
"""
24052398
The URL of the request.
24062399
"""
@@ -2699,7 +2692,7 @@ class HeadRequest(BaseModel):
26992692
"""
27002693
A unique key used for request de-duplication. Requests with the same unique key are considered identical.
27012694
"""
2702-
url: Annotated[AnyUrl, Field(examples=['https://apify.com'])]
2695+
url: Annotated[str, Field(examples=['https://apify.com'])]
27032696
"""
27042697
The URL of the request.
27052698
"""
@@ -2760,7 +2753,7 @@ class LockedHeadRequest(BaseModel):
27602753
"""
27612754
A unique key used for request de-duplication. Requests with the same unique key are considered identical.
27622755
"""
2763-
url: Annotated[AnyUrl, Field(examples=['https://apify.com'])]
2756+
url: Annotated[str, Field(examples=['https://apify.com'])]
27642757
"""
27652758
The URL of the request.
27662759
"""
@@ -2856,7 +2849,7 @@ class WebhookCreate(BaseModel):
28562849
idempotency_key: Annotated[str | None, Field(alias='idempotencyKey', examples=['fdSJmdP3nfs7sfk3y'])] = None
28572850
ignore_ssl_errors: Annotated[bool | None, Field(alias='ignoreSslErrors', examples=[False])] = None
28582851
do_not_retry: Annotated[bool | None, Field(alias='doNotRetry', examples=[False])] = None
2859-
request_url: Annotated[AnyUrl, Field(alias='requestUrl', examples=['http://example.com/'])]
2852+
request_url: Annotated[str, Field(alias='requestUrl', examples=['http://example.com/'])]
28602853
payload_template: Annotated[
28612854
str | None, Field(alias='payloadTemplate', examples=['{\\n "userId": {{userId}}...'])
28622855
] = None

0 commit comments

Comments
 (0)