add types for cancelled and running jobs
This commit is contained in:
parent
492bc1e992
commit
6f0adcbae3
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue