@@ -122,6 +122,21 @@ export class Schedules extends APIResource {
122122 }
123123}
124124
125+ /**
126+ * Scheduler-derived history metadata for a scheduled agent
127+ */
128+ export interface ScheduledAgentHistoryItem {
129+ /**
130+ * Timestamp of the last successful run (RFC3339)
131+ */
132+ last_ran ?: string | null ;
133+
134+ /**
135+ * Timestamp of the next scheduled run (RFC3339)
136+ */
137+ next_run ?: string | null ;
138+ }
139+
125140export interface ScheduledAgentItem {
126141 /**
127142 * Unique identifier for the scheduled agent
@@ -174,7 +189,7 @@ export interface ScheduledAgentItem {
174189 /**
175190 * Scheduler-derived history metadata for a scheduled agent
176191 */
177- history ?: ScheduledAgentItem . History ;
192+ history ?: ScheduledAgentHistoryItem ;
178193
179194 /**
180195 * Error message from the last failed spawn attempt, if any
@@ -184,43 +199,11 @@ export interface ScheduledAgentItem {
184199 /**
185200 * Ownership scope for a resource (team or personal)
186201 */
187- scope ?: ScheduledAgentItem . Scope ;
202+ scope ?: AgentAPI . Scope ;
188203
189204 updated_by ?: AgentAPI . UserProfile ;
190205}
191206
192- export namespace ScheduledAgentItem {
193- /**
194- * Scheduler-derived history metadata for a scheduled agent
195- */
196- export interface History {
197- /**
198- * Timestamp of the last successful run (RFC3339)
199- */
200- last_ran ?: string | null ;
201-
202- /**
203- * Timestamp of the next scheduled run (RFC3339)
204- */
205- next_run ?: string | null ;
206- }
207-
208- /**
209- * Ownership scope for a resource (team or personal)
210- */
211- export interface Scope {
212- /**
213- * Type of ownership ("User" for personal, "Team" for team-owned)
214- */
215- type : 'User' | 'Team' ;
216-
217- /**
218- * UID of the owning user or team
219- */
220- uid ?: string ;
221- }
222- }
223-
224207export interface ScheduleListResponse {
225208 /**
226209 * List of scheduled agents
@@ -300,6 +283,7 @@ export interface ScheduleUpdateParams {
300283
301284export declare namespace Schedules {
302285 export {
286+ type ScheduledAgentHistoryItem as ScheduledAgentHistoryItem ,
303287 type ScheduledAgentItem as ScheduledAgentItem ,
304288 type ScheduleListResponse as ScheduleListResponse ,
305289 type ScheduleDeleteResponse as ScheduleDeleteResponse ,
0 commit comments