33from __future__ import annotations
44
55from typing import Type , cast
6+ from typing_extensions import Literal
67
78import httpx
89
3334from ....._base_client import (
3435 make_request_options ,
3536)
36- from .....types .pages .projects import DeploymentListResponse , deployment_create_params
37+ from .....types .pages .projects import DeploymentListResponse , deployment_list_params , deployment_create_params
3738
3839__all__ = ["Deployments" , "AsyncDeployments" ]
3940
@@ -107,6 +108,7 @@ def list(
107108 project_name : str ,
108109 * ,
109110 account_id : str ,
111+ env : Literal ["production" , "preview" ] | NotGiven = NOT_GIVEN ,
110112 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
111113 # The extra values given here take precedence over values defined on the client or passed to this method.
112114 extra_headers : Headers | None = None ,
@@ -122,6 +124,8 @@ def list(
122124
123125 project_name: Name of the project.
124126
127+ env: What type of deployments to fetch.
128+
125129 extra_headers: Send extra headers
126130
127131 extra_query: Add additional query parameters to the request
@@ -141,6 +145,7 @@ def list(
141145 extra_query = extra_query ,
142146 extra_body = extra_body ,
143147 timeout = timeout ,
148+ query = maybe_transform ({"env" : env }, deployment_list_params .DeploymentListParams ),
144149 post_parser = ResultWrapper ._unwrapper ,
145150 ),
146151 cast_to = cast (Type [DeploymentListResponse ], ResultWrapper [DeploymentListResponse ]),
@@ -410,6 +415,7 @@ async def list(
410415 project_name : str ,
411416 * ,
412417 account_id : str ,
418+ env : Literal ["production" , "preview" ] | NotGiven = NOT_GIVEN ,
413419 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
414420 # The extra values given here take precedence over values defined on the client or passed to this method.
415421 extra_headers : Headers | None = None ,
@@ -425,6 +431,8 @@ async def list(
425431
426432 project_name: Name of the project.
427433
434+ env: What type of deployments to fetch.
435+
428436 extra_headers: Send extra headers
429437
430438 extra_query: Add additional query parameters to the request
@@ -444,6 +452,7 @@ async def list(
444452 extra_query = extra_query ,
445453 extra_body = extra_body ,
446454 timeout = timeout ,
455+ query = await async_maybe_transform ({"env" : env }, deployment_list_params .DeploymentListParams ),
447456 post_parser = ResultWrapper ._unwrapper ,
448457 ),
449458 cast_to = cast (Type [DeploymentListResponse ], ResultWrapper [DeploymentListResponse ]),
0 commit comments