diff --git a/api.md b/api.md index 162b12360f8..f33d822790b 100644 --- a/api.md +++ b/api.md @@ -4026,7 +4026,7 @@ from cloudflare.types.pages.projects import DeploymentListResponse, DeploymentDe Methods: - client.pages.projects.deployments.create(project_name, \*, account_id, \*\*params) -> PagesDeployments -- client.pages.projects.deployments.list(project_name, \*, account_id, \*\*params) -> DeploymentListResponse +- client.pages.projects.deployments.list(project_name, \*, account_id) -> DeploymentListResponse - client.pages.projects.deployments.delete(deployment_id, \*, account_id, project_name) -> object - client.pages.projects.deployments.get(deployment_id, \*, account_id, project_name) -> PagesDeployments - client.pages.projects.deployments.retry(deployment_id, \*, account_id, project_name) -> PagesDeployments diff --git a/src/cloudflare/resources/pages/projects/deployments/deployments.py b/src/cloudflare/resources/pages/projects/deployments/deployments.py index 83cd0a1c3c4..578f1664d86 100644 --- a/src/cloudflare/resources/pages/projects/deployments/deployments.py +++ b/src/cloudflare/resources/pages/projects/deployments/deployments.py @@ -3,7 +3,6 @@ from __future__ import annotations from typing import Type, cast -from typing_extensions import Literal import httpx @@ -34,7 +33,7 @@ from ....._base_client import ( make_request_options, ) -from .....types.pages.projects import DeploymentListResponse, deployment_list_params, deployment_create_params +from .....types.pages.projects import DeploymentListResponse, deployment_create_params __all__ = ["Deployments", "AsyncDeployments"] @@ -108,7 +107,6 @@ def list( project_name: str, *, account_id: str, - env: Literal["production", "preview"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -124,8 +122,6 @@ def list( project_name: Name of the project. - env: What type of deployments to fetch. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -145,7 +141,6 @@ def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform({"env": env}, deployment_list_params.DeploymentListParams), post_parser=ResultWrapper._unwrapper, ), cast_to=cast(Type[DeploymentListResponse], ResultWrapper[DeploymentListResponse]), @@ -415,7 +410,6 @@ async def list( project_name: str, *, account_id: str, - env: Literal["production", "preview"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -431,8 +425,6 @@ async def list( project_name: Name of the project. - env: What type of deployments to fetch. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -452,7 +444,6 @@ async def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform({"env": env}, deployment_list_params.DeploymentListParams), post_parser=ResultWrapper._unwrapper, ), cast_to=cast(Type[DeploymentListResponse], ResultWrapper[DeploymentListResponse]), diff --git a/src/cloudflare/types/pages/pages_projects.py b/src/cloudflare/types/pages/pages_projects.py index bbdeb24b7e7..7242cd80935 100644 --- a/src/cloudflare/types/pages/pages_projects.py +++ b/src/cloudflare/types/pages/pages_projects.py @@ -211,9 +211,6 @@ class DeploymentConfigsPreviewR2Buckets(BaseModel): class DeploymentConfigsPreviewServicesServiceBinding(BaseModel): - entrypoint: Optional[str] = None - """The entrypoint to bind to.""" - environment: Optional[str] = None """The Service environment.""" @@ -408,9 +405,6 @@ class DeploymentConfigsProductionR2Buckets(BaseModel): class DeploymentConfigsProductionServicesServiceBinding(BaseModel): - entrypoint: Optional[str] = None - """The entrypoint to bind to.""" - environment: Optional[str] = None """The Service environment.""" diff --git a/src/cloudflare/types/pages/project_create_params.py b/src/cloudflare/types/pages/project_create_params.py index 2963483f662..bf5a0f825ca 100644 --- a/src/cloudflare/types/pages/project_create_params.py +++ b/src/cloudflare/types/pages/project_create_params.py @@ -228,9 +228,6 @@ class DeploymentConfigsPreviewR2Buckets(TypedDict, total=False): class DeploymentConfigsPreviewServicesServiceBinding(TypedDict, total=False): - entrypoint: Optional[str] - """The entrypoint to bind to.""" - environment: str """The Service environment.""" @@ -420,9 +417,6 @@ class DeploymentConfigsProductionR2Buckets(TypedDict, total=False): class DeploymentConfigsProductionServicesServiceBinding(TypedDict, total=False): - entrypoint: Optional[str] - """The entrypoint to bind to.""" - environment: str """The Service environment.""" diff --git a/src/cloudflare/types/pages/projects/__init__.py b/src/cloudflare/types/pages/projects/__init__.py index 92edb94f56f..08f92483ba0 100644 --- a/src/cloudflare/types/pages/projects/__init__.py +++ b/src/cloudflare/types/pages/projects/__init__.py @@ -6,7 +6,6 @@ from .domain_create_params import DomainCreateParams as DomainCreateParams from .domain_edit_response import DomainEditResponse as DomainEditResponse from .domain_list_response import DomainListResponse as DomainListResponse -from .deployment_list_params import DeploymentListParams as DeploymentListParams from .domain_create_response import DomainCreateResponse as DomainCreateResponse from .deployment_create_params import DeploymentCreateParams as DeploymentCreateParams from .deployment_list_response import DeploymentListResponse as DeploymentListResponse diff --git a/src/cloudflare/types/pages/projects/deployment_list_params.py b/src/cloudflare/types/pages/projects/deployment_list_params.py deleted file mode 100644 index 5eec7e2468d..00000000000 --- a/src/cloudflare/types/pages/projects/deployment_list_params.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["DeploymentListParams"] - - -class DeploymentListParams(TypedDict, total=False): - account_id: Required[str] - """Identifier""" - - env: Literal["production", "preview"] - """What type of deployments to fetch.""" diff --git a/tests/api_resources/pages/projects/test_deployments.py b/tests/api_resources/pages/projects/test_deployments.py index e883433ddd1..d55b9e1feab 100644 --- a/tests/api_resources/pages/projects/test_deployments.py +++ b/tests/api_resources/pages/projects/test_deployments.py @@ -89,16 +89,6 @@ def test_method_list(self, client: Cloudflare) -> None: ) assert_matches_type(DeploymentListResponse, deployment, path=["response"]) - @pytest.mark.skip() - @parametrize - def test_method_list_with_all_params(self, client: Cloudflare) -> None: - deployment = client.pages.projects.deployments.list( - "this-is-my-project-01", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - env="preview", - ) - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) - @pytest.mark.skip() @parametrize def test_raw_response_list(self, client: Cloudflare) -> None: @@ -473,16 +463,6 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: ) assert_matches_type(DeploymentListResponse, deployment, path=["response"]) - @pytest.mark.skip() - @parametrize - async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None: - deployment = await async_client.pages.projects.deployments.list( - "this-is-my-project-01", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - env="preview", - ) - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) - @pytest.mark.skip() @parametrize async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: diff --git a/tests/api_resources/pages/test_projects.py b/tests/api_resources/pages/test_projects.py index 1a4093fbd97..742683668f9 100644 --- a/tests/api_resources/pages/test_projects.py +++ b/tests/api_resources/pages/test_projects.py @@ -67,7 +67,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "r2_buckets": {"r2_binding": {"name": "some-bucket"}}, "services": { "service_binding": { - "entrypoint": "MyHandler", "environment": "production", "service": "example-worker", } @@ -96,7 +95,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "r2_buckets": {"r2_binding": {"name": "some-bucket"}}, "services": { "service_binding": { - "entrypoint": "MyHandler", "environment": "production", "service": "example-worker", } @@ -523,7 +521,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "r2_buckets": {"r2_binding": {"name": "some-bucket"}}, "services": { "service_binding": { - "entrypoint": "MyHandler", "environment": "production", "service": "example-worker", } @@ -552,7 +549,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "r2_buckets": {"r2_binding": {"name": "some-bucket"}}, "services": { "service_binding": { - "entrypoint": "MyHandler", "environment": "production", "service": "example-worker", }