Skip to content

Commit 63e9021

Browse files
feat(api): api update
1 parent c232d9c commit 63e9021

15 files changed

+160
-32
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: 1751
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7cc05e835aabf6b92eabd6d07f71ae13572c2c52d89206e39ea71af3a931e464.yml
3-
openapi_spec_hash: b8c95d96726d5832a5cf165fc33381e5
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2454197d26e8e823f53db986e1a984db69dc0df5a58af12b024ffa2b15021256.yml
3+
openapi_spec_hash: 5b71eae8e9f732f5604284120cf1996a
44
config_hash: 259b5eeae0358ea7d7756b294847f140

src/cloudflare/types/workers/script_update_params.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,18 +78,12 @@ class MetadataAssetsConfig(TypedDict, total=False):
7878
is no Worker script.
7979
"""
8080

81-
run_worker_first: bool
82-
"""When true, requests will always invoke the Worker script.
81+
run_worker_first: List[str]
82+
"""Contains a list path rules to control routing to either the Worker or assets.
8383
84-
Otherwise, attempt to serve an asset matching the request, falling back to the
85-
Worker script.
86-
"""
87-
88-
serve_directly: bool
89-
"""
90-
When true and the incoming request matches an asset, that will be served instead
91-
of invoking the Worker script. When false, requests will always invoke the
92-
Worker script.
84+
Glob (\\**) and negative (!) rules are supported. Rules must start with either '/'
85+
or '!/'. At least one non-negative rule must be provided, and negative rules
86+
have higher precedence than non-negative rules.
9387
"""
9488

9589

@@ -408,6 +402,18 @@ class MetadataBindingWorkersBindingKindWorkflow(TypedDict, total=False):
408402
workflow_name: Required[str]
409403
"""Name of the Workflow to bind to."""
410404

405+
class_name: str
406+
"""Class name of the Workflow.
407+
408+
Should only be provided if the Workflow belongs to this script.
409+
"""
410+
411+
script_name: str
412+
"""Script name that contains the Workflow.
413+
414+
If not provided, defaults to this script name.
415+
"""
416+
411417

412418
MetadataBinding: TypeAlias = Union[
413419
MetadataBindingWorkersBindingKindAI,

src/cloudflare/types/workers/scripts/script_and_version_setting_edit_params.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,18 @@ class SettingsBindingWorkersBindingKindWorkflow(TypedDict, total=False):
361361
workflow_name: Required[str]
362362
"""Name of the Workflow to bind to."""
363363

364+
class_name: str
365+
"""Class name of the Workflow.
366+
367+
Should only be provided if the Workflow belongs to this script.
368+
"""
369+
370+
script_name: str
371+
"""Script name that contains the Workflow.
372+
373+
If not provided, defaults to this script name.
374+
"""
375+
364376

365377
SettingsBinding: TypeAlias = Union[
366378
SettingsBindingWorkersBindingKindAI,

src/cloudflare/types/workers/scripts/script_and_version_setting_edit_response.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,18 @@ class BindingWorkersBindingKindWorkflow(BaseModel):
340340
workflow_name: str
341341
"""Name of the Workflow to bind to."""
342342

343+
class_name: Optional[str] = None
344+
"""Class name of the Workflow.
345+
346+
Should only be provided if the Workflow belongs to this script.
347+
"""
348+
349+
script_name: Optional[str] = None
350+
"""Script name that contains the Workflow.
351+
352+
If not provided, defaults to this script name.
353+
"""
354+
343355

344356
Binding: TypeAlias = Annotated[
345357
Union[

src/cloudflare/types/workers/scripts/script_and_version_setting_get_response.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,18 @@ class BindingWorkersBindingKindWorkflow(BaseModel):
340340
workflow_name: str
341341
"""Name of the Workflow to bind to."""
342342

343+
class_name: Optional[str] = None
344+
"""Class name of the Workflow.
345+
346+
Should only be provided if the Workflow belongs to this script.
347+
"""
348+
349+
script_name: Optional[str] = None
350+
"""Script name that contains the Workflow.
351+
352+
If not provided, defaults to this script name.
353+
"""
354+
343355

344356
Binding: TypeAlias = Annotated[
345357
Union[

src/cloudflare/types/workers/scripts/version_create_params.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,18 @@ class MetadataBindingWorkersBindingKindWorkflow(TypedDict, total=False):
363363
workflow_name: Required[str]
364364
"""Name of the Workflow to bind to."""
365365

366+
class_name: str
367+
"""Class name of the Workflow.
368+
369+
Should only be provided if the Workflow belongs to this script.
370+
"""
371+
372+
script_name: str
373+
"""Script name that contains the Workflow.
374+
375+
If not provided, defaults to this script name.
376+
"""
377+
366378

367379
MetadataBinding: TypeAlias = Union[
368380
MetadataBindingWorkersBindingKindAI,

src/cloudflare/types/workers/scripts/version_create_response.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,18 @@ class ResourcesBindingsResultWorkersBindingKindWorkflow(BaseModel):
338338
workflow_name: str
339339
"""Name of the Workflow to bind to."""
340340

341+
class_name: Optional[str] = None
342+
"""Class name of the Workflow.
343+
344+
Should only be provided if the Workflow belongs to this script.
345+
"""
346+
347+
script_name: Optional[str] = None
348+
"""Script name that contains the Workflow.
349+
350+
If not provided, defaults to this script name.
351+
"""
352+
341353

342354
ResourcesBindingsResult: TypeAlias = Annotated[
343355
Union[

src/cloudflare/types/workers/scripts/version_get_response.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,18 @@ class ResourcesBindingsResultWorkersBindingKindWorkflow(BaseModel):
338338
workflow_name: str
339339
"""Name of the Workflow to bind to."""
340340

341+
class_name: Optional[str] = None
342+
"""Class name of the Workflow.
343+
344+
Should only be provided if the Workflow belongs to this script.
345+
"""
346+
347+
script_name: Optional[str] = None
348+
"""Script name that contains the Workflow.
349+
350+
If not provided, defaults to this script name.
351+
"""
352+
341353

342354
ResourcesBindingsResult: TypeAlias = Annotated[
343355
Union[

src/cloudflare/types/workers_for_platforms/dispatch/namespaces/script_update_params.py

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,12 @@ class MetadataAssetsConfig(TypedDict, total=False):
8181
is no Worker script.
8282
"""
8383

84-
run_worker_first: bool
85-
"""When true, requests will always invoke the Worker script.
84+
run_worker_first: List[str]
85+
"""Contains a list path rules to control routing to either the Worker or assets.
8686
87-
Otherwise, attempt to serve an asset matching the request, falling back to the
88-
Worker script.
89-
"""
90-
91-
serve_directly: bool
92-
"""
93-
When true and the incoming request matches an asset, that will be served instead
94-
of invoking the Worker script. When false, requests will always invoke the
95-
Worker script.
87+
Glob (\\**) and negative (!) rules are supported. Rules must start with either '/'
88+
or '!/'. At least one non-negative rule must be provided, and negative rules
89+
have higher precedence than non-negative rules.
9690
"""
9791

9892

@@ -411,6 +405,18 @@ class MetadataBindingWorkersBindingKindWorkflow(TypedDict, total=False):
411405
workflow_name: Required[str]
412406
"""Name of the Workflow to bind to."""
413407

408+
class_name: str
409+
"""Class name of the Workflow.
410+
411+
Should only be provided if the Workflow belongs to this script.
412+
"""
413+
414+
script_name: str
415+
"""Script name that contains the Workflow.
416+
417+
If not provided, defaults to this script name.
418+
"""
419+
414420

415421
MetadataBinding: TypeAlias = Union[
416422
MetadataBindingWorkersBindingKindAI,

src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/binding_get_response.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,18 @@ class WorkersBindingKindWorkflow(BaseModel):
330330
workflow_name: str
331331
"""Name of the Workflow to bind to."""
332332

333+
class_name: Optional[str] = None
334+
"""Class name of the Workflow.
335+
336+
Should only be provided if the Workflow belongs to this script.
337+
"""
338+
339+
script_name: Optional[str] = None
340+
"""Script name that contains the Workflow.
341+
342+
If not provided, defaults to this script name.
343+
"""
344+
333345

334346
BindingGetResponse: TypeAlias = Annotated[
335347
Union[

src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_params.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,18 @@ class SettingsBindingWorkersBindingKindWorkflow(TypedDict, total=False):
364364
workflow_name: Required[str]
365365
"""Name of the Workflow to bind to."""
366366

367+
class_name: str
368+
"""Class name of the Workflow.
369+
370+
Should only be provided if the Workflow belongs to this script.
371+
"""
372+
373+
script_name: str
374+
"""Script name that contains the Workflow.
375+
376+
If not provided, defaults to this script name.
377+
"""
378+
367379

368380
SettingsBinding: TypeAlias = Union[
369381
SettingsBindingWorkersBindingKindAI,

src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_response.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,18 @@ class BindingWorkersBindingKindWorkflow(BaseModel):
340340
workflow_name: str
341341
"""Name of the Workflow to bind to."""
342342

343+
class_name: Optional[str] = None
344+
"""Class name of the Workflow.
345+
346+
Should only be provided if the Workflow belongs to this script.
347+
"""
348+
349+
script_name: Optional[str] = None
350+
"""Script name that contains the Workflow.
351+
352+
If not provided, defaults to this script name.
353+
"""
354+
343355

344356
Binding: TypeAlias = Annotated[
345357
Union[

src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_get_response.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,18 @@ class BindingWorkersBindingKindWorkflow(BaseModel):
340340
workflow_name: str
341341
"""Name of the Workflow to bind to."""
342342

343+
class_name: Optional[str] = None
344+
"""Class name of the Workflow.
345+
346+
Should only be provided if the Workflow belongs to this script.
347+
"""
348+
349+
script_name: Optional[str] = None
350+
"""Script name that contains the Workflow.
351+
352+
If not provided, defaults to this script name.
353+
"""
354+
343355

344356
Binding: TypeAlias = Annotated[
345357
Union[

tests/api_resources/workers/test_scripts.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
4444
"_redirects": "/foo /bar 301\n/news/* /blog/:splat",
4545
"html_handling": "auto-trailing-slash",
4646
"not_found_handling": "404-page",
47-
"run_worker_first": False,
48-
"serve_directly": True,
47+
"run_worker_first": ["string"],
4948
},
5049
"jwt": "jwt",
5150
},
@@ -323,8 +322,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
323322
"_redirects": "/foo /bar 301\n/news/* /blog/:splat",
324323
"html_handling": "auto-trailing-slash",
325324
"not_found_handling": "404-page",
326-
"run_worker_first": False,
327-
"serve_directly": True,
325+
"run_worker_first": ["string"],
328326
},
329327
"jwt": "jwt",
330328
},

tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
4545
"_redirects": "/foo /bar 301\n/news/* /blog/:splat",
4646
"html_handling": "auto-trailing-slash",
4747
"not_found_handling": "404-page",
48-
"run_worker_first": False,
49-
"serve_directly": True,
48+
"run_worker_first": ["string"],
5049
},
5150
"jwt": "jwt",
5251
},
@@ -325,8 +324,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
325324
"_redirects": "/foo /bar 301\n/news/* /blog/:splat",
326325
"html_handling": "auto-trailing-slash",
327326
"not_found_handling": "404-page",
328-
"run_worker_first": False,
329-
"serve_directly": True,
327+
"run_worker_first": ["string"],
330328
},
331329
"jwt": "jwt",
332330
},

0 commit comments

Comments
 (0)