@@ -36,6 +36,8 @@ const zPreviewOutput = z
3636 */
3737const zExecutionError = z
3838 . object ( {
39+ prompt_id : z . string ( ) . optional ( ) ,
40+ timestamp : z . number ( ) . optional ( ) ,
3941 node_id : z . string ( ) ,
4042 node_type : z . string ( ) ,
4143 executed : z . array ( z . string ( ) ) . optional ( ) ,
@@ -61,20 +63,12 @@ const zRawJobListItem = z
6163 execution_end_time : z . number ( ) . nullable ( ) . optional ( ) ,
6264 preview_output : zPreviewOutput . nullable ( ) . optional ( ) ,
6365 outputs_count : z . number ( ) . optional ( ) ,
64- error_message : z . string ( ) . nullable ( ) . optional ( ) ,
6566 execution_error : zExecutionError . nullable ( ) . optional ( ) ,
6667 workflow_id : z . string ( ) . nullable ( ) . optional ( ) ,
6768 priority : z . number ( ) . optional ( )
6869 } )
6970 . passthrough ( )
7071
71- /**
72- * Job list item with priority always set (either from server or synthetic)
73- */
74- const zJobListItem = zRawJobListItem . extend ( {
75- priority : z . number ( ) // Always set: server-provided or synthetic (total - offset - index)
76- } )
77-
7872/**
7973 * Job detail - returned by GET /api/jobs/{job_id} (detail endpoint)
8074 * Includes full workflow and outputs for re-execution and downloads
@@ -117,5 +111,6 @@ export const zJobsListResponse = z
117111
118112export type JobStatus = z . infer < typeof zJobStatus >
119113export type RawJobListItem = z . infer < typeof zRawJobListItem >
120- export type JobListItem = z . infer < typeof zJobListItem >
114+ /** Job list item with priority always set (server-provided or synthetic) */
115+ export type JobListItem = RawJobListItem & { priority : number }
121116export type JobDetail = z . infer < typeof zJobDetail >
0 commit comments