Skip to content

Commit ff7eab3

Browse files
feat(api): add environment field to WakeEventParam
1 parent e5a82b6 commit ff7eab3

3 files changed

Lines changed: 25 additions & 3 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: 193
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-e8866ae81b8afaf96e76b281290be1485af1674c03262cfd43cd0f5b2851c775.yml
3-
openapi_spec_hash: a157c52535f5028047eea5d0d7750af2
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-cade77d00e2ea53642be459df51982a608717dc6a15fdf5c6403a52571e7709b.yml
3+
openapi_spec_hash: 88a0edaa03c6a9ae7eed84333977bfe2
44
config_hash: 60242c6ae6fc727bce872753690be6fd

src/gitpod/types/wake_event_param.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,19 @@
66
from datetime import datetime
77
from typing_extensions import Annotated, TypedDict
88

9+
from .._types import SequenceNotStr
910
from .._utils import PropertyInfo
1011

11-
__all__ = ["WakeEventParam", "LoopRetrigger", "LoopRetriggerUnmetCondition", "Timer"]
12+
__all__ = ["WakeEventParam", "Environment", "LoopRetrigger", "LoopRetriggerUnmetCondition", "Timer"]
13+
14+
15+
class Environment(TypedDict, total=False):
16+
environment_id: Annotated[str, PropertyInfo(alias="environmentId")]
17+
18+
failure_message: Annotated[SequenceNotStr[str], PropertyInfo(alias="failureMessage")]
19+
20+
phase: str
21+
"""The phase the environment reached (e.g. "running", "stopped", "deleted")."""
1222

1323

1424
class LoopRetriggerUnmetCondition(TypedDict, total=False):
@@ -42,6 +52,8 @@ class WakeEventParam(TypedDict, total=False):
4252
Delivered via SendToAgentExecution as a new oneof variant.
4353
"""
4454

55+
environment: Environment
56+
4557
interest_id: Annotated[str, PropertyInfo(alias="interestId")]
4658
"""The interest ID that fired (from WaitingInfo.Interest.id)."""
4759

tests/api_resources/test_agents.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,11 @@ def test_method_send_to_execution_with_all_params(self, client: Gitpod) -> None:
385385
"text": {"content": "Generate a report based on the latest logs."},
386386
},
387387
wake_event={
388+
"environment": {
389+
"environment_id": "environmentId",
390+
"failure_message": ["string"],
391+
"phase": "phase",
392+
},
388393
"interest_id": "interestId",
389394
"loop_retrigger": {
390395
"outputs": {"foo": "string"},
@@ -938,6 +943,11 @@ async def test_method_send_to_execution_with_all_params(self, async_client: Asyn
938943
"text": {"content": "Generate a report based on the latest logs."},
939944
},
940945
wake_event={
946+
"environment": {
947+
"environment_id": "environmentId",
948+
"failure_message": ["string"],
949+
"phase": "phase",
950+
},
941951
"interest_id": "interestId",
942952
"loop_retrigger": {
943953
"outputs": {"foo": "string"},

0 commit comments

Comments
 (0)