diff --git a/gui/src/types/api-v2.ts b/gui/src/types/api-v2.ts index d7a993d7..875a84ee 100644 --- a/gui/src/types/api-v2.ts +++ b/gui/src/types/api-v2.ts @@ -60,14 +60,22 @@ export interface BaseJobResponse { tiles: Progress; } +export interface CancelledJobResponse extends BaseJobResponse { + status: JobStatus.CANCELLED; +} + /** * Pending image job. */ export interface PendingJobResponse extends BaseJobResponse { - status: JobStatus.PENDING | JobStatus.RUNNING; + status: JobStatus.PENDING; queue: Progress; } +export interface RunningJobResponse extends BaseJobResponse { + status: JobStatus.RUNNING; +} + /** * Failed image job with error information. */ @@ -144,7 +152,12 @@ export type SuccessJobResponse | SuccessBlendJobResponse | SuccessChainJobResponse; -export type JobResponse = PendingJobResponse | FailedJobResponse | SuccessJobResponse; +export type JobResponse + = CancelledJobResponse + | PendingJobResponse + | RunningJobResponse + | FailedJobResponse + | SuccessJobResponse; /** * Status response from the job endpoint, with parameters to retry the job if it fails.