Skip to content

Commit a711fce

Browse files
feat(api): api update
1 parent c723f1e commit a711fce

File tree

15 files changed

+469
-1407
lines changed

15 files changed

+469
-1407
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1807
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-150d55234ca7153696f2077e08ca2aab81aaa7ef208a20a4cd5eb74f9b16fac0.yml
3-
openapi_spec_hash: fb6c6af457e126b4a0d059b56f42e8b9
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-057398205ce8fcfc44a4d5ae4242ef641556ad96e553c6fadbbeb4ae4429b8bb.yml
3+
openapi_spec_hash: e00830cabee34b8add76c76d7f0e7733
44
config_hash: 9f61e9f02b675e373b140471d52b670c

src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from ......_wrappers import ResultWrapper
3434
from ......_base_client import make_request_options
3535
from ......types.workers.script import Script
36+
from ......types.workers.worker_metadata_param import WorkerMetadataParam
3637
from ......types.workers_for_platforms.dispatch.namespaces.scripts import content_update_params
3738

3839
__all__ = ["ContentResource", "AsyncContentResource"]
@@ -64,7 +65,7 @@ def update(
6465
*,
6566
account_id: str,
6667
dispatch_namespace: str,
67-
metadata: content_update_params.Metadata,
68+
metadata: WorkerMetadataParam,
6869
files: List[FileTypes] | NotGiven = NOT_GIVEN,
6970
cf_worker_body_part: str | NotGiven = NOT_GIVEN,
7071
cf_worker_main_module_part: str | NotGiven = NOT_GIVEN,
@@ -217,7 +218,7 @@ async def update(
217218
*,
218219
account_id: str,
219220
dispatch_namespace: str,
220-
metadata: content_update_params.Metadata,
221+
metadata: WorkerMetadataParam,
221222
files: List[FileTypes] | NotGiven = NOT_GIVEN,
222223
cf_worker_body_part: str | NotGiven = NOT_GIVEN,
223224
cf_worker_main_module_part: str | NotGiven = NOT_GIVEN,

src/cloudflare/types/workers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from .route_delete_response import RouteDeleteResponse as RouteDeleteResponse
2222
from .route_update_response import RouteUpdateResponse as RouteUpdateResponse
2323
from .single_step_migration import SingleStepMigration as SingleStepMigration
24+
from .worker_metadata_param import WorkerMetadataParam as WorkerMetadataParam
2425
from .script_update_response import ScriptUpdateResponse as ScriptUpdateResponse
2526
from .subdomain_get_response import SubdomainGetResponse as SubdomainGetResponse
2627
from .subdomain_update_params import SubdomainUpdateParams as SubdomainUpdateParams

src/cloudflare/types/workers/script.py

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@
77
from ..._models import BaseModel
88
from .scripts.consumer_script import ConsumerScript
99

10-
__all__ = ["Script", "Placement"]
10+
__all__ = ["Script", "NamedHandler", "Placement"]
11+
12+
13+
class NamedHandler(BaseModel):
14+
handlers: Optional[List[str]] = None
15+
"""The names of handlers exported as part of the named export."""
16+
17+
name: Optional[str] = None
18+
"""The name of the export."""
1119

1220

1321
class Placement(BaseModel):
@@ -34,24 +42,56 @@ class Script(BaseModel):
3442
id: Optional[str] = None
3543
"""The id of the script in the Workers system. Usually the script name."""
3644

45+
compatibility_date: Optional[str] = None
46+
"""Date indicating targeted support in the Workers runtime.
47+
48+
Backwards incompatible fixes to the runtime following this date will not affect
49+
this Worker.
50+
"""
51+
52+
compatibility_flags: Optional[List[str]] = None
53+
"""Flags that enable or disable certain features in the Workers runtime.
54+
55+
Used to enable upcoming features or opt in or out of specific changes not
56+
included in a `compatibility_date`.
57+
"""
58+
3759
created_on: Optional[datetime] = None
3860
"""When the script was created."""
3961

4062
etag: Optional[str] = None
4163
"""Hashed script content, can be used in a If-None-Match header when updating."""
4264

65+
handlers: Optional[List[str]] = None
66+
"""The names of handlers exported as part of the default export."""
67+
4368
has_assets: Optional[bool] = None
4469
"""Whether a Worker contains assets."""
4570

4671
has_modules: Optional[bool] = None
4772
"""Whether a Worker contains modules."""
4873

74+
last_deployed_from: Optional[str] = None
75+
"""The client most recently used to deploy this Worker."""
76+
4977
logpush: Optional[bool] = None
5078
"""Whether Logpush is turned on for the Worker."""
5179

80+
migration_tag: Optional[str] = None
81+
"""
82+
The tag of the Durable Object migration that was most recently applied for this
83+
Worker.
84+
"""
85+
5286
modified_on: Optional[datetime] = None
5387
"""When the script was last modified."""
5488

89+
named_handlers: Optional[List[NamedHandler]] = None
90+
"""
91+
Named exports, such as Durable Object class implementations and named
92+
entrypoints.
93+
"""
94+
5595
placement: Optional[Placement] = None
5696
"""
5797
Configuration for

0 commit comments

Comments
 (0)