Skip to content

Commit 340b6f2

Browse files
feat(api): remove acknowledge_token parameter from environments.start
1 parent 96071da commit 340b6f2

4 files changed

Lines changed: 4 additions & 33 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 175
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-def2db81f6becdef534b062180365fc518fd77f8a8dfaf6bc50a79b65f34530a.yml
3-
openapi_spec_hash: cc85813a9997d3e1305d1f500253438f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-227a61cdae589a1212231e9cd93e8aeef25f78c3360bb3622bc1e749f8508971.yml
3+
openapi_spec_hash: d55bb6b8967f31e9b8cb6f6de9f8fefd
44
config_hash: 2ccc720c40279ba2b77b64507b6e9621

src/gitpod/resources/environments/environments.py

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,6 @@ def mark_active(
748748
def start(
749749
self,
750750
*,
751-
acknowledge_token: str | Omit = omit,
752751
environment_id: str | Omit = omit,
753752
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
754753
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -775,10 +774,6 @@ def start(
775774
```
776775
777776
Args:
778-
acknowledge_token: acknowledge_token is the HMAC token from a previous
779-
EnvironmentMaxLifetimeEnforcementDetails response, allowing the user to start an
780-
environment past its max lifetime in warn mode.
781-
782777
environment_id: environment_id specifies which environment should be started.
783778
784779
extra_headers: Send extra headers
@@ -791,13 +786,7 @@ def start(
791786
"""
792787
return self._post(
793788
"/gitpod.v1.EnvironmentService/StartEnvironment",
794-
body=maybe_transform(
795-
{
796-
"acknowledge_token": acknowledge_token,
797-
"environment_id": environment_id,
798-
},
799-
environment_start_params.EnvironmentStartParams,
800-
),
789+
body=maybe_transform({"environment_id": environment_id}, environment_start_params.EnvironmentStartParams),
801790
options=make_request_options(
802791
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
803792
),
@@ -1588,7 +1577,6 @@ async def mark_active(
15881577
async def start(
15891578
self,
15901579
*,
1591-
acknowledge_token: str | Omit = omit,
15921580
environment_id: str | Omit = omit,
15931581
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
15941582
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1615,10 +1603,6 @@ async def start(
16151603
```
16161604
16171605
Args:
1618-
acknowledge_token: acknowledge_token is the HMAC token from a previous
1619-
EnvironmentMaxLifetimeEnforcementDetails response, allowing the user to start an
1620-
environment past its max lifetime in warn mode.
1621-
16221606
environment_id: environment_id specifies which environment should be started.
16231607
16241608
extra_headers: Send extra headers
@@ -1632,11 +1616,7 @@ async def start(
16321616
return await self._post(
16331617
"/gitpod.v1.EnvironmentService/StartEnvironment",
16341618
body=await async_maybe_transform(
1635-
{
1636-
"acknowledge_token": acknowledge_token,
1637-
"environment_id": environment_id,
1638-
},
1639-
environment_start_params.EnvironmentStartParams,
1619+
{"environment_id": environment_id}, environment_start_params.EnvironmentStartParams
16401620
),
16411621
options=make_request_options(
16421622
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout

src/gitpod/types/environment_start_params.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,5 @@
1010

1111

1212
class EnvironmentStartParams(TypedDict, total=False):
13-
acknowledge_token: Annotated[str, PropertyInfo(alias="acknowledgeToken")]
14-
"""
15-
acknowledge_token is the HMAC token from a previous
16-
EnvironmentMaxLifetimeEnforcementDetails response, allowing the user to start an
17-
environment past its max lifetime in warn mode.
18-
"""
19-
2013
environment_id: Annotated[str, PropertyInfo(alias="environmentId")]
2114
"""environment_id specifies which environment should be started."""

tests/api_resources/test_environments.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,6 @@ def test_method_start(self, client: Gitpod) -> None:
609609
@parametrize
610610
def test_method_start_with_all_params(self, client: Gitpod) -> None:
611611
environment = client.environments.start(
612-
acknowledge_token="acknowledgeToken",
613612
environment_id="07e03a28-65a5-4d98-b532-8ea67b188048",
614613
)
615614
assert_matches_type(object, environment, path=["response"])
@@ -1297,7 +1296,6 @@ async def test_method_start(self, async_client: AsyncGitpod) -> None:
12971296
@parametrize
12981297
async def test_method_start_with_all_params(self, async_client: AsyncGitpod) -> None:
12991298
environment = await async_client.environments.start(
1300-
acknowledge_token="acknowledgeToken",
13011299
environment_id="07e03a28-65a5-4d98-b532-8ea67b188048",
13021300
)
13031301
assert_matches_type(object, environment, path=["response"])

0 commit comments

Comments
 (0)