3
3
from __future__ import annotations
4
4
5
5
from typing import Type , cast
6
+ from typing_extensions import Literal
6
7
7
8
import httpx
8
9
33
34
from ....._base_client import (
34
35
make_request_options ,
35
36
)
36
- from .....types .pages .projects import DeploymentListResponse , deployment_create_params
37
+ from .....types .pages .projects import DeploymentListResponse , deployment_list_params , deployment_create_params
37
38
38
39
__all__ = ["Deployments" , "AsyncDeployments" ]
39
40
@@ -107,6 +108,7 @@ def list(
107
108
project_name : str ,
108
109
* ,
109
110
account_id : str ,
111
+ env : Literal ["production" , "preview" ] | NotGiven = NOT_GIVEN ,
110
112
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
111
113
# The extra values given here take precedence over values defined on the client or passed to this method.
112
114
extra_headers : Headers | None = None ,
@@ -122,6 +124,8 @@ def list(
122
124
123
125
project_name: Name of the project.
124
126
127
+ env: What type of deployments to fetch.
128
+
125
129
extra_headers: Send extra headers
126
130
127
131
extra_query: Add additional query parameters to the request
@@ -141,6 +145,7 @@ def list(
141
145
extra_query = extra_query ,
142
146
extra_body = extra_body ,
143
147
timeout = timeout ,
148
+ query = maybe_transform ({"env" : env }, deployment_list_params .DeploymentListParams ),
144
149
post_parser = ResultWrapper ._unwrapper ,
145
150
),
146
151
cast_to = cast (Type [DeploymentListResponse ], ResultWrapper [DeploymentListResponse ]),
@@ -410,6 +415,7 @@ async def list(
410
415
project_name : str ,
411
416
* ,
412
417
account_id : str ,
418
+ env : Literal ["production" , "preview" ] | NotGiven = NOT_GIVEN ,
413
419
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
414
420
# The extra values given here take precedence over values defined on the client or passed to this method.
415
421
extra_headers : Headers | None = None ,
@@ -425,6 +431,8 @@ async def list(
425
431
426
432
project_name: Name of the project.
427
433
434
+ env: What type of deployments to fetch.
435
+
428
436
extra_headers: Send extra headers
429
437
430
438
extra_query: Add additional query parameters to the request
@@ -444,6 +452,7 @@ async def list(
444
452
extra_query = extra_query ,
445
453
extra_body = extra_body ,
446
454
timeout = timeout ,
455
+ query = await async_maybe_transform ({"env" : env }, deployment_list_params .DeploymentListParams ),
447
456
post_parser = ResultWrapper ._unwrapper ,
448
457
),
449
458
cast_to = cast (Type [DeploymentListResponse ], ResultWrapper [DeploymentListResponse ]),
0 commit comments