@@ -38,6 +38,21 @@ export class Deployments extends APIResource {
3838 return this . _client . get ( path `/deployments/${ id } ` , options ) ;
3939 }
4040
41+ /**
42+ * List deployments. Optionally filter by application name.
43+ *
44+ * @example
45+ * ```ts
46+ * const deployments = await client.deployments.list();
47+ * ```
48+ */
49+ list (
50+ query : DeploymentListParams | null | undefined = { } ,
51+ options ?: RequestOptions ,
52+ ) : APIPromise < DeploymentListResponse > {
53+ return this . _client . get ( '/deployments' , { query, ...options } ) ;
54+ }
55+
4156 /**
4257 * Establishes a Server-Sent Events (SSE) stream that delivers real-time logs and
4358 * status updates for a deployment. The stream terminates automatically once the
@@ -219,6 +234,55 @@ export interface DeploymentRetrieveResponse {
219234 updated_at ?: string | null ;
220235}
221236
237+ export type DeploymentListResponse = Array < DeploymentListResponse . DeploymentListResponseItem > ;
238+
239+ export namespace DeploymentListResponse {
240+ /**
241+ * Deployment record information.
242+ */
243+ export interface DeploymentListResponseItem {
244+ /**
245+ * Unique identifier for the deployment
246+ */
247+ id : string ;
248+
249+ /**
250+ * Timestamp when the deployment was created
251+ */
252+ created_at : string ;
253+
254+ /**
255+ * Deployment region code
256+ */
257+ region : 'aws.us-east-1a' ;
258+
259+ /**
260+ * Current status of the deployment
261+ */
262+ status : 'queued' | 'in_progress' | 'running' | 'failed' | 'stopped' ;
263+
264+ /**
265+ * Relative path to the application entrypoint
266+ */
267+ entrypoint_rel_path ?: string ;
268+
269+ /**
270+ * Environment variables configured for this deployment
271+ */
272+ env_vars ?: { [ key : string ] : string } ;
273+
274+ /**
275+ * Status reason
276+ */
277+ status_reason ?: string ;
278+
279+ /**
280+ * Timestamp when the deployment was last updated
281+ */
282+ updated_at ?: string | null ;
283+ }
284+ }
285+
222286/**
223287 * Union type representing any deployment event.
224288 */
@@ -309,6 +373,13 @@ export interface DeploymentCreateParams {
309373 version ?: string ;
310374}
311375
376+ export interface DeploymentListParams {
377+ /**
378+ * Filter results by application name.
379+ */
380+ app_name ?: string ;
381+ }
382+
312383export interface DeploymentFollowParams {
313384 /**
314385 * Show logs since the given time (RFC timestamps or durations like 5m).
@@ -321,8 +392,10 @@ export declare namespace Deployments {
321392 type DeploymentStateEvent as DeploymentStateEvent ,
322393 type DeploymentCreateResponse as DeploymentCreateResponse ,
323394 type DeploymentRetrieveResponse as DeploymentRetrieveResponse ,
395+ type DeploymentListResponse as DeploymentListResponse ,
324396 type DeploymentFollowResponse as DeploymentFollowResponse ,
325397 type DeploymentCreateParams as DeploymentCreateParams ,
398+ type DeploymentListParams as DeploymentListParams ,
326399 type DeploymentFollowParams as DeploymentFollowParams ,
327400 } ;
328401}
0 commit comments