File size: 660 Bytes
6242a59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
export type TaskStatus = 'pending' | 'running' | 'done' | 'failed' | 'interrupted' | 'saved';

export type Task = {
  id: string;
  api_task_id?: string;
  name?: string;
  type: string;
  status: TaskStatus;
  params: Record<string, any>;
  priority: number;
  result: string;
  bookmarked?: boolean;
};

export type ResponseStatus = {
  success: boolean;
  message: string;
};

export type TaskHistoryResponse = {
  tasks: Task[];
  total: number;
};

export type ProgressResponse = {
  active: boolean;
  completed: boolean;
  eta: number;
  id_live_preview: number;
  live_preview: string | null;
  paused: boolean;
  progress: number;
  queued: false;
};