@@ -90,9 +90,75 @@ export namespace DeploymentCreateResponse {
9090}
9191
9292/**
93- * A stream of application events (state updates and logs) in SSE format.
93+ * Union type representing any application event. Actual schema is determined by
94+ * the 'event' field.
9495 */
95- export type DeploymentFollowResponse = unknown ;
96+ export type DeploymentFollowResponse =
97+ | DeploymentFollowResponse . StateEvent
98+ | DeploymentFollowResponse . StateUpdateEvent
99+ | DeploymentFollowResponse . LogEvent ;
100+
101+ export namespace DeploymentFollowResponse {
102+ /**
103+ * Initial state of the application, emitted once when subscribing.
104+ */
105+ export interface StateEvent {
106+ /**
107+ * Event type identifier (always "state").
108+ */
109+ event : 'state' ;
110+
111+ /**
112+ * Current application state (e.g., "deploying", "running", "succeeded", "failed").
113+ */
114+ state : string ;
115+
116+ /**
117+ * Time the state was reported.
118+ */
119+ timestamp ?: string ;
120+ }
121+
122+ /**
123+ * An update emitted when the application's state changes.
124+ */
125+ export interface StateUpdateEvent {
126+ /**
127+ * Event type identifier (always "state_update").
128+ */
129+ event : 'state_update' ;
130+
131+ /**
132+ * New application state (e.g., "running", "succeeded", "failed").
133+ */
134+ state : string ;
135+
136+ /**
137+ * Time the state change occurred.
138+ */
139+ timestamp ?: string ;
140+ }
141+
142+ /**
143+ * A log entry from the application.
144+ */
145+ export interface LogEvent {
146+ /**
147+ * Event type identifier (always "log").
148+ */
149+ event : 'log' ;
150+
151+ /**
152+ * Log message text.
153+ */
154+ message : string ;
155+
156+ /**
157+ * Time the log entry was produced.
158+ */
159+ timestamp ?: string ;
160+ }
161+ }
96162
97163export interface DeploymentCreateParams {
98164 /**
0 commit comments