22
33from __future__ import annotations
44
5- from typing import Dict , Mapping , cast
5+ from typing import Any , Dict , Mapping , cast
66from typing_extensions import Literal
77
88import httpx
2121from ...types .apps import deployment_create_params
2222from ..._base_client import make_request_options
2323from ...types .apps .deployment_create_response import DeploymentCreateResponse
24+ from ...types .apps .deployment_follow_response import DeploymentFollowResponse
2425
2526__all__ = ["DeploymentsResource" , "AsyncDeploymentsResource" ]
2627
@@ -121,7 +122,7 @@ def follow(
121122 extra_query : Query | None = None ,
122123 extra_body : Body | None = None ,
123124 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
124- ) -> Stream [object ]:
125+ ) -> Stream [DeploymentFollowResponse ]:
125126 """
126127 Establishes a Server-Sent Events (SSE) stream that delivers real-time logs and
127128 status updates for a deployed application. The stream terminates automatically
@@ -144,9 +145,11 @@ def follow(
144145 options = make_request_options (
145146 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
146147 ),
147- cast_to = object ,
148+ cast_to = cast (
149+ Any , DeploymentFollowResponse
150+ ), # Union types cannot be passed in as arguments in the type system
148151 stream = True ,
149- stream_cls = Stream [object ],
152+ stream_cls = Stream [DeploymentFollowResponse ],
150153 )
151154
152155
@@ -246,7 +249,7 @@ async def follow(
246249 extra_query : Query | None = None ,
247250 extra_body : Body | None = None ,
248251 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
249- ) -> AsyncStream [object ]:
252+ ) -> AsyncStream [DeploymentFollowResponse ]:
250253 """
251254 Establishes a Server-Sent Events (SSE) stream that delivers real-time logs and
252255 status updates for a deployed application. The stream terminates automatically
@@ -269,9 +272,11 @@ async def follow(
269272 options = make_request_options (
270273 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
271274 ),
272- cast_to = object ,
275+ cast_to = cast (
276+ Any , DeploymentFollowResponse
277+ ), # Union types cannot be passed in as arguments in the type system
273278 stream = True ,
274- stream_cls = AsyncStream [object ],
279+ stream_cls = AsyncStream [DeploymentFollowResponse ],
275280 )
276281
277282
0 commit comments