Skip to content

Commit fdc599e

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#166)
1 parent 9872fdf commit fdc599e

File tree

8 files changed

+2
-63
lines changed

8 files changed

+2
-63
lines changed

api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4026,7 +4026,7 @@ from cloudflare.types.pages.projects import DeploymentListResponse, DeploymentDe
40264026
Methods:
40274027

40284028
- <code title="post /accounts/{account_id}/pages/projects/{project_name}/deployments">client.pages.projects.deployments.<a href="./src/cloudflare/resources/pages/projects/deployments/deployments.py">create</a>(project_name, \*, account_id, \*\*<a href="src/cloudflare/types/pages/projects/deployment_create_params.py">params</a>) -> <a href="./src/cloudflare/types/pages/pages_deployments.py">PagesDeployments</a></code>
4029-
- <code title="get /accounts/{account_id}/pages/projects/{project_name}/deployments">client.pages.projects.deployments.<a href="./src/cloudflare/resources/pages/projects/deployments/deployments.py">list</a>(project_name, \*, account_id, \*\*<a href="src/cloudflare/types/pages/projects/deployment_list_params.py">params</a>) -> <a href="./src/cloudflare/types/pages/projects/deployment_list_response.py">DeploymentListResponse</a></code>
4029+
- <code title="get /accounts/{account_id}/pages/projects/{project_name}/deployments">client.pages.projects.deployments.<a href="./src/cloudflare/resources/pages/projects/deployments/deployments.py">list</a>(project_name, \*, account_id) -> <a href="./src/cloudflare/types/pages/projects/deployment_list_response.py">DeploymentListResponse</a></code>
40304030
- <code title="delete /accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}">client.pages.projects.deployments.<a href="./src/cloudflare/resources/pages/projects/deployments/deployments.py">delete</a>(deployment_id, \*, account_id, project_name) -> <a href="./src/cloudflare/types/pages/projects/deployment_delete_response.py">object</a></code>
40314031
- <code title="get /accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}">client.pages.projects.deployments.<a href="./src/cloudflare/resources/pages/projects/deployments/deployments.py">get</a>(deployment_id, \*, account_id, project_name) -> <a href="./src/cloudflare/types/pages/pages_deployments.py">PagesDeployments</a></code>
40324032
- <code title="post /accounts/{account_id}/pages/projects/{project_name}/deployments/{deployment_id}/retry">client.pages.projects.deployments.<a href="./src/cloudflare/resources/pages/projects/deployments/deployments.py">retry</a>(deployment_id, \*, account_id, project_name) -> <a href="./src/cloudflare/types/pages/pages_deployments.py">PagesDeployments</a></code>

src/cloudflare/resources/pages/projects/deployments/deployments.py

+1-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from __future__ import annotations
44

55
from typing import Type, cast
6-
from typing_extensions import Literal
76

87
import httpx
98

@@ -34,7 +33,7 @@
3433
from ....._base_client import (
3534
make_request_options,
3635
)
37-
from .....types.pages.projects import DeploymentListResponse, deployment_list_params, deployment_create_params
36+
from .....types.pages.projects import DeploymentListResponse, deployment_create_params
3837

3938
__all__ = ["Deployments", "AsyncDeployments"]
4039

@@ -108,7 +107,6 @@ def list(
108107
project_name: str,
109108
*,
110109
account_id: str,
111-
env: Literal["production", "preview"] | NotGiven = NOT_GIVEN,
112110
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
113111
# The extra values given here take precedence over values defined on the client or passed to this method.
114112
extra_headers: Headers | None = None,
@@ -124,8 +122,6 @@ def list(
124122
125123
project_name: Name of the project.
126124
127-
env: What type of deployments to fetch.
128-
129125
extra_headers: Send extra headers
130126
131127
extra_query: Add additional query parameters to the request
@@ -145,7 +141,6 @@ def list(
145141
extra_query=extra_query,
146142
extra_body=extra_body,
147143
timeout=timeout,
148-
query=maybe_transform({"env": env}, deployment_list_params.DeploymentListParams),
149144
post_parser=ResultWrapper._unwrapper,
150145
),
151146
cast_to=cast(Type[DeploymentListResponse], ResultWrapper[DeploymentListResponse]),
@@ -415,7 +410,6 @@ async def list(
415410
project_name: str,
416411
*,
417412
account_id: str,
418-
env: Literal["production", "preview"] | NotGiven = NOT_GIVEN,
419413
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
420414
# The extra values given here take precedence over values defined on the client or passed to this method.
421415
extra_headers: Headers | None = None,
@@ -431,8 +425,6 @@ async def list(
431425
432426
project_name: Name of the project.
433427
434-
env: What type of deployments to fetch.
435-
436428
extra_headers: Send extra headers
437429
438430
extra_query: Add additional query parameters to the request
@@ -452,7 +444,6 @@ async def list(
452444
extra_query=extra_query,
453445
extra_body=extra_body,
454446
timeout=timeout,
455-
query=await async_maybe_transform({"env": env}, deployment_list_params.DeploymentListParams),
456447
post_parser=ResultWrapper._unwrapper,
457448
),
458449
cast_to=cast(Type[DeploymentListResponse], ResultWrapper[DeploymentListResponse]),

src/cloudflare/types/pages/pages_projects.py

-6
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,6 @@ class DeploymentConfigsPreviewR2Buckets(BaseModel):
211211

212212

213213
class DeploymentConfigsPreviewServicesServiceBinding(BaseModel):
214-
entrypoint: Optional[str] = None
215-
"""The entrypoint to bind to."""
216-
217214
environment: Optional[str] = None
218215
"""The Service environment."""
219216

@@ -408,9 +405,6 @@ class DeploymentConfigsProductionR2Buckets(BaseModel):
408405

409406

410407
class DeploymentConfigsProductionServicesServiceBinding(BaseModel):
411-
entrypoint: Optional[str] = None
412-
"""The entrypoint to bind to."""
413-
414408
environment: Optional[str] = None
415409
"""The Service environment."""
416410

src/cloudflare/types/pages/project_create_params.py

-6
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,6 @@ class DeploymentConfigsPreviewR2Buckets(TypedDict, total=False):
228228

229229

230230
class DeploymentConfigsPreviewServicesServiceBinding(TypedDict, total=False):
231-
entrypoint: Optional[str]
232-
"""The entrypoint to bind to."""
233-
234231
environment: str
235232
"""The Service environment."""
236233

@@ -420,9 +417,6 @@ class DeploymentConfigsProductionR2Buckets(TypedDict, total=False):
420417

421418

422419
class DeploymentConfigsProductionServicesServiceBinding(TypedDict, total=False):
423-
entrypoint: Optional[str]
424-
"""The entrypoint to bind to."""
425-
426420
environment: str
427421
"""The Service environment."""
428422

src/cloudflare/types/pages/projects/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from .domain_create_params import DomainCreateParams as DomainCreateParams
77
from .domain_edit_response import DomainEditResponse as DomainEditResponse
88
from .domain_list_response import DomainListResponse as DomainListResponse
9-
from .deployment_list_params import DeploymentListParams as DeploymentListParams
109
from .domain_create_response import DomainCreateResponse as DomainCreateResponse
1110
from .deployment_create_params import DeploymentCreateParams as DeploymentCreateParams
1211
from .deployment_list_response import DeploymentListResponse as DeploymentListResponse

src/cloudflare/types/pages/projects/deployment_list_params.py

-15
This file was deleted.

tests/api_resources/pages/projects/test_deployments.py

-20
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,6 @@ def test_method_list(self, client: Cloudflare) -> None:
8989
)
9090
assert_matches_type(DeploymentListResponse, deployment, path=["response"])
9191

92-
@pytest.mark.skip()
93-
@parametrize
94-
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
95-
deployment = client.pages.projects.deployments.list(
96-
"this-is-my-project-01",
97-
account_id="023e105f4ecef8ad9ca31a8372d0c353",
98-
env="preview",
99-
)
100-
assert_matches_type(DeploymentListResponse, deployment, path=["response"])
101-
10292
@pytest.mark.skip()
10393
@parametrize
10494
def test_raw_response_list(self, client: Cloudflare) -> None:
@@ -473,16 +463,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
473463
)
474464
assert_matches_type(DeploymentListResponse, deployment, path=["response"])
475465

476-
@pytest.mark.skip()
477-
@parametrize
478-
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
479-
deployment = await async_client.pages.projects.deployments.list(
480-
"this-is-my-project-01",
481-
account_id="023e105f4ecef8ad9ca31a8372d0c353",
482-
env="preview",
483-
)
484-
assert_matches_type(DeploymentListResponse, deployment, path=["response"])
485-
486466
@pytest.mark.skip()
487467
@parametrize
488468
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:

tests/api_resources/pages/test_projects.py

-4
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
6767
"r2_buckets": {"r2_binding": {"name": "some-bucket"}},
6868
"services": {
6969
"service_binding": {
70-
"entrypoint": "MyHandler",
7170
"environment": "production",
7271
"service": "example-worker",
7372
}
@@ -96,7 +95,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
9695
"r2_buckets": {"r2_binding": {"name": "some-bucket"}},
9796
"services": {
9897
"service_binding": {
99-
"entrypoint": "MyHandler",
10098
"environment": "production",
10199
"service": "example-worker",
102100
}
@@ -523,7 +521,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
523521
"r2_buckets": {"r2_binding": {"name": "some-bucket"}},
524522
"services": {
525523
"service_binding": {
526-
"entrypoint": "MyHandler",
527524
"environment": "production",
528525
"service": "example-worker",
529526
}
@@ -552,7 +549,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
552549
"r2_buckets": {"r2_binding": {"name": "some-bucket"}},
553550
"services": {
554551
"service_binding": {
555-
"entrypoint": "MyHandler",
556552
"environment": "production",
557553
"service": "example-worker",
558554
}

0 commit comments

Comments
 (0)