Skip to content

Commit 34ec9b0

Browse files
feat(api): update via SDK Studio
1 parent f0cda49 commit 34ec9b0

File tree

3 files changed

+71
-5
lines changed

3 files changed

+71
-5
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 7
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-aa34ccb9b2ee8e81ef56881ff7474ea2d69a059d5c1dbb7d0ec94e28a0b68559.yml
3-
openapi_spec_hash: c573fcd85b195ebe809a1039634652d6
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-39aa058a60035c34a636e7f580b4b9c76b05400ae401ef04a761572b20a5425b.yml
3+
openapi_spec_hash: bb79a204f9edb6b6ccfe783a0a82a423
44
config_hash: 4dfa4d870ce0e23e31ce33ab6a53dd21

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Types:
1818
Methods:
1919

2020
- <code title="post /deploy">client.apps.deployments.<a href="./src/resources/apps/deployments.ts">create</a>({ ...params }) -> DeploymentCreateResponse</code>
21-
- <code title="get /apps/{id}/events">client.apps.deployments.<a href="./src/resources/apps/deployments.ts">follow</a>(id) -> unknown</code>
21+
- <code title="get /apps/{id}/events">client.apps.deployments.<a href="./src/resources/apps/deployments.ts">follow</a>(id) -> DeploymentFollowResponse</code>
2222

2323
## Invocations
2424

src/resources/apps/deployments.ts

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

97163
export interface DeploymentCreateParams {
98164
/**

0 commit comments

Comments
 (0)